emu8086 Docs
Extending With Plugins
Extending With Plugins
The gtkemu8086 emulator uses the Libpeas library to allow developers to provide extended features with plugins. there are already a few that are bundled with the software.
Adding a plugin
Currently the only supported plugin languages are Python and C, there is no support for Lua. The PluginsBox object is passed to the plugin in development. You can access the main application window by accessing the window property on the PluginsBox object. Here are some of the public methods on the MainWindow object
win.get_revealer()
This returns the Revealer widget that is seen on the main window, i.e the dock where registers are displayed when a program is runningwin.get_bottom_bar()
This returns the bottombar widget which is of the type GtkBox
You can go through
import gigi.require_version('Gtk', '3.0')from gi.repository import Gtk, Peas,GObjectclass HelloWorldlugin(GObject.Object, Peas.Activatable): object = GObject.Property(type=GObject.Object) def __init__(self): GObject.Object.__init__(self) def do_activate(self): window = self.object.get_property("window") code = window.get_code() window = self.object.get_property("window") buffer = code.get_buffer() buffer.set_text('db "Hello World"') def do_deactivate(self): print("Goodbye")