1 /* Scintilla source code edit control */ 2 /* @file ScintillaWidget.h 3 * Definition of Scintilla widget for GTK+. 4 * Only needed by GTK+ code but is harmless on other platforms. 5 * This comment is not a doc-comment as that causes warnings from g-ir-scanner. 6 */ 7 /* Copyright 1998-2001 by Neil Hodgson <[email protected]> 8 * The License.txt file describes the conditions under which this software may be distributed. */ 9 10 #ifndef SCINTILLAWIDGET_H 11 #define SCINTILLAWIDGET_H 12 13 #if defined(GTK) 14 15 #ifdef __cplusplus 16 extern "C" { 17 #endif 18 19 #define SCINTILLA(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, scintilla_get_type (), ScintillaObject) 20 #define SCINTILLA_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, scintilla_get_type (), ScintillaClass) 21 #define IS_SCINTILLA(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, scintilla_get_type ()) 22 23 #define SCINTILLA_TYPE_OBJECT (scintilla_object_get_type()) 24 #define SCINTILLA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SCINTILLA_TYPE_OBJECT, ScintillaObject)) 25 #define SCINTILLA_IS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SCINTILLA_TYPE_OBJECT)) 26 #define SCINTILLA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), SCINTILLA_TYPE_OBJECT, ScintillaObjectClass)) 27 #define SCINTILLA_IS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SCINTILLA_TYPE_OBJECT)) 28 #define SCINTILLA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), SCINTILLA_TYPE_OBJECT, ScintillaObjectClass)) 29 30 typedef struct _ScintillaObject ScintillaObject; 31 typedef struct _ScintillaClass ScintillaObjectClass; 32 33 struct _ScintillaObject { 34 GtkContainer cont; 35 void *pscin; 36 }; 37 38 struct _ScintillaClass { 39 GtkContainerClass parent_class; 40 41 void (* command) (ScintillaObject *sci, int cmd, GtkWidget *window); 42 void (* notify) (ScintillaObject *sci, int id, SCNotification *scn); 43 }; 44 45 GType scintilla_object_get_type (void); 46 GtkWidget* scintilla_object_new (void); 47 gintptr scintilla_object_send_message (ScintillaObject *sci, unsigned int iMessage, guintptr wParam, gintptr lParam); 48 49 50 GType scnotification_get_type (void); 51 #define SCINTILLA_TYPE_NOTIFICATION (scnotification_get_type()) 52 53 #ifndef G_IR_SCANNING 54 /* The legacy names confuse the g-ir-scanner program */ 55 typedef struct _ScintillaClass ScintillaClass; 56 57 GType scintilla_get_type (void); 58 GtkWidget* scintilla_new (void); 59 void scintilla_set_id (ScintillaObject *sci, uptr_t id); 60 sptr_t scintilla_send_message (ScintillaObject *sci,unsigned int iMessage, uptr_t wParam, sptr_t lParam); 61 void scintilla_release_resources(void); 62 #endif 63 64 #define SCINTILLA_NOTIFY "sci-notify" 65 66 #ifdef __cplusplus 67 } 68 #endif 69 70 #endif 71 72 #endif 73