gtype: add type declaration macros for headers

Add G_DECLARE_DERIVABLE_TYPE() and G_DECLARE_FINAL_TYPE() to allow
skipping almost all of the typical GObject boilerplate code.

These macros make some assumptions about GObject best practice that mean
that they may not be usable with older classes that have to preserve
API/ABI compatibility with a time before these practices existed.

https://bugzilla.gnome.org/show_bug.cgi?id=389585
This commit is contained in:
Ryan Lortie
2014-02-03 17:40:17 +00:00
parent e07cc89dee
commit 3b4cb28e17
2 changed files with 160 additions and 0 deletions

View File

@@ -103,6 +103,8 @@ g_type_ensure
g_type_get_type_registration_serial
g_type_get_instance_count
G_DECLARE_FINAL_TYPE
G_DECLARE_DERIVABLE_TYPE
G_DEFINE_TYPE
G_DEFINE_TYPE_WITH_PRIVATE
G_DEFINE_TYPE_WITH_CODE