aboutsummaryrefslogtreecommitdiffhomepage
path: root/gtk/ScintillaGTK.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/ScintillaGTK.cxx')
-rw-r--r--gtk/ScintillaGTK.cxx20
1 files changed, 11 insertions, 9 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx
index 9fc8e4cc4..3caab96a4 100644
--- a/gtk/ScintillaGTK.cxx
+++ b/gtk/ScintillaGTK.cxx
@@ -72,8 +72,6 @@
#include "ExternalLexer.h"
#endif
-#include "scintilla-marshal.h"
-
#include "Converter.h"
#if defined(__clang__)
@@ -3162,9 +3160,6 @@ void ScintillaGTK::ClassInit(OBJECT_CLASS* object_class, GtkWidgetClass *widget_
container_class->forall = MainForAll;
}
-#define SIG_MARSHAL scintilla_marshal_NONE__INT_POINTER
-#define MARSHAL_ARGUMENTS G_TYPE_INT, G_TYPE_POINTER
-
static void scintilla_class_init(ScintillaClass *klass) {
try {
OBJECT_CLASS *object_class = (OBJECT_CLASS*) klass;
@@ -3179,9 +3174,9 @@ static void scintilla_class_init(ScintillaClass *klass) {
G_STRUCT_OFFSET(ScintillaClass, command),
NULL, //(GSignalAccumulator)
NULL, //(gpointer)
- SIG_MARSHAL,
+ NULL,
G_TYPE_NONE,
- 2, MARSHAL_ARGUMENTS);
+ 2, G_TYPE_INT, GTK_TYPE_WIDGET);
scintilla_signals[NOTIFY_SIGNAL] = g_signal_new(
SCINTILLA_NOTIFY,
@@ -3190,9 +3185,9 @@ static void scintilla_class_init(ScintillaClass *klass) {
G_STRUCT_OFFSET(ScintillaClass, notify),
NULL,
NULL,
- SIG_MARSHAL,
+ NULL,
G_TYPE_NONE,
- 2, MARSHAL_ARGUMENTS);
+ 2, G_TYPE_INT, SCINTILLA_TYPE_NOTIFICATION);
klass->command = NULL;
klass->notify = NULL;
@@ -3233,3 +3228,10 @@ void scintilla_release_resources(void) {
} catch (...) {
}
}
+
+/* Define a dummy boxed type because g-ir-scanner is unable to
+ * recognize gpointer-derived types. Note that SCNotificaiton
+ * is always allocated on stack so copying is not appropriate. */
+static void *copy_(void *src) { return src; }
+static void free_(void *doc) { }
+G_DEFINE_BOXED_TYPE(SCNotification, scnotification, copy_, free_)