ScintillaWidget.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 <neilh@scintilla.org>
  8. * The License.txt file describes the conditions under which this software may be distributed. */
  9. #ifndef SCINTILLAWIDGET_H
  10. #define SCINTILLAWIDGET_H
  11. #if defined(GTK)
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. #define SCINTILLA(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, scintilla_get_type (), ScintillaObject)
  16. #define SCINTILLA_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, scintilla_get_type (), ScintillaClass)
  17. #define IS_SCINTILLA(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, scintilla_get_type ())
  18. #define SCINTILLA_TYPE_OBJECT (scintilla_object_get_type())
  19. #define SCINTILLA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SCINTILLA_TYPE_OBJECT, ScintillaObject))
  20. #define SCINTILLA_IS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SCINTILLA_TYPE_OBJECT))
  21. #define SCINTILLA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), SCINTILLA_TYPE_OBJECT, ScintillaObjectClass))
  22. #define SCINTILLA_IS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SCINTILLA_TYPE_OBJECT))
  23. #define SCINTILLA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), SCINTILLA_TYPE_OBJECT, ScintillaObjectClass))
  24. typedef struct _ScintillaObject ScintillaObject;
  25. typedef struct _ScintillaClass ScintillaObjectClass;
  26. struct _ScintillaObject {
  27. GtkContainer cont;
  28. void *pscin;
  29. };
  30. struct _ScintillaClass {
  31. GtkContainerClass parent_class;
  32. void (* command) (ScintillaObject *sci, int cmd, GtkWidget *window);
  33. void (* notify) (ScintillaObject *sci, int id, SCNotification *scn);
  34. };
  35. GType scintilla_object_get_type (void);
  36. GtkWidget* scintilla_object_new (void);
  37. gintptr scintilla_object_send_message (ScintillaObject *sci, unsigned int iMessage, guintptr wParam, gintptr lParam);
  38. GType scnotification_get_type (void);
  39. #define SCINTILLA_TYPE_NOTIFICATION (scnotification_get_type())
  40. #ifndef G_IR_SCANNING
  41. /* The legacy names confuse the g-ir-scanner program */
  42. typedef struct _ScintillaClass ScintillaClass;
  43. GType scintilla_get_type (void);
  44. GtkWidget* scintilla_new (void);
  45. void scintilla_set_id (ScintillaObject *sci, uptr_t id);
  46. sptr_t scintilla_send_message (ScintillaObject *sci,unsigned int iMessage, uptr_t wParam, sptr_t lParam);
  47. void scintilla_release_resources(void);
  48. #endif
  49. #define SCINTILLA_NOTIFY "sci-notify"
  50. #ifdef __cplusplus
  51. }
  52. #endif
  53. #endif
  54. #endif