plugin api: convert GeanyEditor to GBoxed internally

GeanyObject signals require GTypes to be gobject-introspection compatible.
This commit is contained in:
Thomas Martitz 2016-04-27 16:33:51 +02:00
parent 7702a4639b
commit be64b177ca
2 changed files with 16 additions and 0 deletions

View File

@ -5309,3 +5309,15 @@ void editor_insert_snippet(GeanyEditor *editor, gint pos, const gchar *snippet)
editor_insert_text_block(editor, pattern->str, pos, -1, -1, TRUE); editor_insert_text_block(editor, pattern->str, pos, -1, -1, TRUE);
g_string_free(pattern, TRUE); g_string_free(pattern, TRUE);
} }
static void *copy_(void *src) { return src; }
static void free_(void *doc) { }
/** @gironly
* Gets the GType of GeanyEditor
*
* @return the GeanyEditor type */
GEANY_API_SYMBOL
GType editor_get_type (void);
G_DEFINE_BOXED_TYPE(GeanyEditor, editor, copy_, free_);

View File

@ -139,6 +139,10 @@ typedef struct GeanyEditorPrefs
} }
GeanyEditorPrefs; GeanyEditorPrefs;
#define GEANY_TYPE_EDITOR (editor_get_type())
GType editor_get_type (void);
/** Editor-owned fields for each document. */ /** Editor-owned fields for each document. */
typedef struct GeanyEditor typedef struct GeanyEditor
{ {