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.
7 /* Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
8 * The License.txt file describes the conditions under which this software may be distributed. */
10 #ifndef SCINTILLAWIDGET_H
11 #define SCINTILLAWIDGET_H
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 ())
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))
30 typedef struct _ScintillaObject ScintillaObject
;
31 typedef struct _ScintillaClass ScintillaObjectClass
;
33 struct _ScintillaObject
{
38 struct _ScintillaClass
{
39 GtkContainerClass parent_class
;
41 void (* command
) (ScintillaObject
*sci
, int cmd
, GtkWidget
*window
);
42 void (* notify
) (ScintillaObject
*sci
, int id
, SCNotification
*scn
);
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
);
50 GType
scnotification_get_type (void);
51 #define SCINTILLA_TYPE_NOTIFICATION (scnotification_get_type())
54 /* The legacy names confuse the g-ir-scanner program */
55 typedef struct _ScintillaClass ScintillaClass
;
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);
64 #define SCINTILLA_NOTIFY "sci-notify"