aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2015-08-10 13:46:40 +0200
committerThomas Martitz <kugel@rockbox.org>2015-08-10 13:46:40 +0200
commit4ec6923a5f5df2961fc16bd53eba10c81dded1e3 (patch)
tree24b5acf0ecbc50db3e70318489fdc9f88bb416ef /include
parent5f346c235306e50a0785fad89275e4d3548f2c5a (diff)
downloadscintilla-mirror-4ec6923a5f5df2961fc16bd53eba10c81dded1e3.tar.gz
Enable g-ir-scanner to run on ScintillaWidget.h
g-ir-scanner expects a certain naming scheme. Adhering gives the benefit of automatically getting correct gobject-introspection data.
Diffstat (limited to 'include')
-rw-r--r--include/ScintillaWidget.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/include/ScintillaWidget.h b/include/ScintillaWidget.h
index f8cd212b0..37bb2ecbe 100644
--- a/include/ScintillaWidget.h
+++ b/include/ScintillaWidget.h
@@ -19,8 +19,15 @@ extern "C" {
#define SCINTILLA_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, scintilla_get_type (), ScintillaClass)
#define IS_SCINTILLA(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, scintilla_get_type ())
+#define SCINTILLA_TYPE_OBJECT (scintilla_object_get_type())
+#define SCINTILLA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SCINTILLA_TYPE_OBJECT, ScintillaObject))
+#define SCINTILLA_IS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SCINTILLA_TYPE_OBJECT))
+#define SCINTILLA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), SCINTILLA_TYPE_OBJECT, ScintillaObjectClass))
+#define SCINTILLA_IS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SCINTILLA_TYPE_OBJECT))
+#define SCINTILLA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), SCINTILLA_TYPE_OBJECT, ScintillaObjectClass))
+
typedef struct _ScintillaObject ScintillaObject;
-typedef struct _ScintillaClass ScintillaClass;
+typedef struct _ScintillaClass ScintillaObjectClass;
struct _ScintillaObject {
GtkContainer cont;
@@ -34,11 +41,21 @@ struct _ScintillaClass {
void (* notify) (ScintillaObject *ttt);
};
+GType scintilla_object_get_type (void);
+GtkWidget* scintilla_object_new (void);
+long scintilla_object_send_message (ScintillaObject *sci, unsigned int iMessage, guintptr wParam, gintptr lParam);
+
+#ifndef G_IR_SCANNING
+/* The following declarations are preserved for compatibility reasons. However, they confuse
+ * the g-ir-scanner program */
+typedef struct _ScintillaClass ScintillaClass;
+
GType scintilla_get_type (void);
GtkWidget* scintilla_new (void);
void scintilla_set_id (ScintillaObject *sci, uptr_t id);
sptr_t scintilla_send_message (ScintillaObject *sci,unsigned int iMessage, uptr_t wParam, sptr_t lParam);
void scintilla_release_resources(void);
+#endif
#define SCINTILLA_NOTIFY "sci-notify"