[geany/geany] 2acba3: plugin api: export geanyobject
Thomas Martitz
git-noreply at xxxxx
Wed Jun 22 14:10:32 UTC 2016
Branch: refs/heads/master
Author: Thomas Martitz <kugel at rockbox.org>
Committer: Thomas Martitz <kugel at rockbox.org>
Date: Wed, 22 Jun 2016 14:10:32 UTC
Commit: 2acba3dc3193176f447a06d4ac03c561da1ad978
https://github.com/geany/geany/commit/2acba3dc3193176f447a06d4ac03c561da1ad978
Log Message:
-----------
plugin api: export geanyobject
geanyobject can be used by plugins to connect to plugin signals directly
(required for GI-based plugins). Access through GeanyData::object. The related
doxygen comments are @gironly for now, since plugin_signal_connect() is still
preferred.
Finally, the useless function pointer prototypes are removed from the
GeanyObjectClass structure as they became useless (they have been unused and
generally wrong since ever).
Modified Paths:
--------------
src/geanyobject.c
src/geanyobject.h
src/plugindata.h
src/plugins.c
Modified: src/geanyobject.c
6 lines changed, 6 insertions(+), 0 deletions(-)
===================================================================
@@ -52,6 +52,12 @@ struct _GeanyObjectPrivate
gchar dummy;
};
+/** @gironly
+ * Get the GObject-derived GType for GeanyObject
+ *
+ * @return GeanyObject type */
+GEANY_API_SYMBOL
+GType geany_object_get_type(void);
G_DEFINE_TYPE(GeanyObject, geany_object, G_TYPE_OBJECT)
Modified: src/geanyobject.h
25 lines changed, 4 insertions(+), 21 deletions(-)
===================================================================
@@ -74,6 +74,8 @@ GeanyCallbackId;
typedef struct _GeanyObject GeanyObject;
typedef struct _GeanyObjectClass GeanyObjectClass;
+/** @gironly
+ * Instance structure for GeanyObject */
struct _GeanyObject
{
GObject parent;
@@ -82,30 +84,11 @@ struct _GeanyObject
extern GObject *geany_object;
+/** @gironly
+ * Class structure for @a GeanyObject */
struct _GeanyObjectClass
{
GObjectClass parent_class;
-
- void (*document_new)(GeanyDocument *doc);
- void (*document_open)(GeanyDocument *doc);
- void (*document_reload)(GeanyDocument *doc);
- void (*document_before_save)(GeanyDocument *doc);
- void (*document_save)(GeanyDocument *doc);
- void (*document_filetype_set)(GeanyDocument *doc, GeanyFiletype *filetype_old);
- void (*document_activate)(GeanyDocument *doc);
- void (*document_close)(GeanyDocument *doc);
- void (*project_open)(GKeyFile *keyfile);
- void (*project_save)(GKeyFile *keyfile);
- void (*project_close)(void);
- void (*project_dialog_open)(GtkWidget *notebook);
- void (*project_dialog_confirmed)(GtkWidget *notebook);
- void (*project_dialog_close)(GtkWidget *notebook);
- void (*update_editor_menu)(const gchar *word, gint click_pos, GeanyDocument *doc);
- gboolean (*editor_notify)(GeanyEditor *editor, gpointer scnt);
- void (*geany_startup_complete)(void);
- void (*build_start)(void);
- void (*save_settings)(GKeyFile *keyfile);
- void (*load_settings)(GKeyFile *keyfile);
};
GType geany_object_get_type (void);
Modified: src/plugindata.h
6 lines changed, 6 insertions(+), 0 deletions(-)
===================================================================
@@ -183,6 +183,12 @@ typedef struct GeanyData
struct GeanyTemplatePrefs *template_prefs; /**< Template settings */
gpointer *_compat; /* Remove field on next ABI break (abi-todo) */
GSList *filetypes_by_title; /**< See filetypes.h#filetypes_by_title. */
+ /** @gironly
+ * Global object signalling events via signals
+ *
+ * This is mostly for language bindings. Otherwise prefer to use
+ * plugin_signal_connect() instead this which adds automatic cleanup. */
+ GObject *object;
}
GeanyData;
Modified: src/plugins.c
3 lines changed, 2 insertions(+), 1 deletions(-)
===================================================================
@@ -120,7 +120,8 @@ geany_data_init(void)
&tool_prefs,
&template_prefs,
NULL, /* Remove field on next ABI break (abi-todo) */
- filetypes_by_title
+ filetypes_by_title,
+ geany_object,
};
geany_data = gd;
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list