From 17a38b0f6efc4a0d847ab502773dafa9939999d8 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Tue, 26 Apr 2016 17:09:25 +0200 Subject: 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). --- include/ScintillaWidget.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include/ScintillaWidget.h') 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; -- cgit v1.2.3