diff options
author | Thomas Martitz <kugel@rockbox.org> | 2016-05-17 22:11:17 +0200 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2016-05-17 22:11:17 +0200 |
commit | ace28857b70d8a8fe97cdf29f937614eb13de781 (patch) | |
tree | 11c759eaec999dd5a934797546b35a1fa5d42179 /include/ScintillaWidget.h | |
parent | 99d52264a609b61e8639f3c1087a78fedb0b9de8 (diff) | |
download | scintilla-mirror-ace28857b70d8a8fe97cdf29f937614eb13de781.tar.gz |
Enable g-ir-scanner to scan ScintillaObject signals
Currently, the ScintillaObject signals can't be used from python code via
gobject-introspection. This is because g-ir-scanner does not properly scan
the signals.
For signals, there is the additional requirement that parameters have are
registered GTypes. For the sci-notify signal, this can be accomplished by
boxing SCNotification.
In addition, g-ir-scanner also runs on Scintilla.h where it picks up
additional structs.
test/gi/ is updated accordingly. The test python script is enhanced
to showcase the signals (some fixes to the makefile are included as well).
Diffstat (limited to 'include/ScintillaWidget.h')
-rw-r--r-- | include/ScintillaWidget.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/ScintillaWidget.h b/include/ScintillaWidget.h index f4ae18208..1721f65d9 100644 --- a/include/ScintillaWidget.h +++ b/include/ScintillaWidget.h @@ -38,14 +38,18 @@ struct _ScintillaObject { struct _ScintillaClass { GtkContainerClass parent_class; - void (* command) (ScintillaObject *ttt); - void (* notify) (ScintillaObject *ttt); + void (* command) (ScintillaObject *sci, int cmd, GtkWidget *window); + void (* notify) (ScintillaObject *sci, int id, SCNotification *scn); }; GType scintilla_object_get_type (void); GtkWidget* scintilla_object_new (void); gintptr scintilla_object_send_message (ScintillaObject *sci, unsigned int iMessage, guintptr wParam, gintptr lParam); + +GType scnotification_get_type (void); +#define SCINTILLA_TYPE_NOTIFICATION (scnotification_get_type()) + #ifndef G_IR_SCANNING /* The legacy names confuse the g-ir-scanner program */ typedef struct _ScintillaClass ScintillaClass; |