[geany/geany] 7702a4: plugin api: convert GeanyFiletype to GBoxed internally

Thomas Martitz git-noreply at xxxxx
Wed Jun 22 14:10:11 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:11 UTC
Commit:      7702a4639b5ce711ce1560bb14d4c94cf5e5de28
             https://github.com/geany/geany/commit/7702a4639b5ce711ce1560bb14d4c94cf5e5de28

Log Message:
-----------
plugin api: convert GeanyFiletype to GBoxed internally

GeanyObject signals require GTypes to be gobject-introspection compatible.


Modified Paths:
--------------
    src/filetypes.c
    src/filetypes.h

Modified: src/filetypes.c
12 lines changed, 12 insertions(+), 0 deletions(-)
===================================================================
@@ -1585,3 +1585,15 @@ gboolean filetype_get_comment_open_close(const GeanyFiletype *ft, gboolean singl
 
 	return !EMPTY(*co);
 }
+
+static void        *copy_(void *src) { return src; }
+static void         free_(void *doc) { }
+
+/** @gironly
+ * Gets the GType of GeanyFiletype
+ *
+ * @return the GeanyFiletype type */
+GEANY_API_SYMBOL
+GType filetype_get_type (void);
+
+G_DEFINE_BOXED_TYPE(GeanyFiletype, filetype, copy_, free_);


Modified: src/filetypes.h
3 lines changed, 3 insertions(+), 0 deletions(-)
===================================================================
@@ -186,6 +186,9 @@ const gchar *filetypes_get_display_name(GeanyFiletype *ft);
 
 const GSList *filetypes_get_sorted_by_name(void);
 
+#define GEANY_TYPE_FILETYPE (filetype_get_type())
+
+GType filetype_get_type (void);
 
 #ifdef GEANY_PRIVATE
 



--------------
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