Commit Graph

20 Commits

Author SHA1 Message Date
Sébastien Wilmet
9551a81198 Fix G_ADD_PRIVATE_DYNAMIC() 2013-07-29 17:29:05 +02:00
Emmanuele Bassi
ca6b93d093 Add macros and symbols for private data on dynamic types
We need a TypeName_private_offset variable defined by the macros used to
register dynamic types. We also need to call the adjust_private_offset()
function inside class_init(). G_ADD_PRIVATE_DYNAMIC only sets the size
of the private data structure, and relies on the behaviour of the
g_type_class_adjuset_private_offset() function to register the private
data structure at class init time if passed a value greater than zero.

This allows using G_PRIVATE_OFFSET with dynamic types.
2013-07-26 20:56:54 -04:00
Ryan Lortie
0156092a42 various: add GLIB_AVAILABLE_IN_ALL everywhere else
Add the GLIB_AVAILABLE_IN_ALL annotation to all old functions (that
haven't already been annotated with the GLIB_AVAILABLE_IN_* macros or a
deprecation macro).

If we discover in the future that we cannot use only one macro on
Windows, it will be an easy sed patch to fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=688681
2013-01-13 13:11:57 -05:00
Matthias Clasen
e1b99b2ddc Move single-include guards inside include guards
gcc has optimizations for include guards that only work
if they are outermost in the the header.
https://bugzilla.gnome.org/show_bug.cgi?id=689810
2012-12-27 23:43:14 -05:00
Krzesimir Nowak
ed1f10bc1c docs: Fix typo in G_DEFINE_DYNAMIC_TYPE_EXTENDED example. 2012-05-04 09:31:25 +02:00
Matthias Clasen
6fe2f5f11b Prevent unused variable warnings from G_DEFINE_DYNAMIC_TYPE 2011-01-28 12:26:23 -05:00
Alexander Larsson
b35fa1994d Cast iface_init to GInterfaceInitFunc
This is in line with what all other type define macros do.

https://bugzilla.gnome.org/show_bug.cgi?id=508157
2009-11-26 12:32:36 +01:00
Alexander Larsson
7d51c96e5e Add G_IMPLEMENT_INTERFACE_DYNAMIC
Convenience macro to easy interface addition for dynamic types.

https://bugzilla.gnome.org/show_bug.cgi?id=508157
2009-11-26 11:20:18 +01:00
Stefan Kost
f2da2e8e92 Migrating docs.
* docs/reference/gobject/tmpl/gtypemodule.sgml:
	* gobject/gtypemodule.c:
	* gobject/gtypemodule.h:
	  Migrating docs.


svn path=/trunk/; revision=7077
2008-06-21 16:35:50 +00:00
Carlos Garnacho
bce526dfd0 make sure we define GType g_define_type_id in
2007-09-20  Carlos Garnacho  <carlos@imendio.com>

        * gtypemodule.h: make sure we define GType g_define_type_id in
        G_G_DEFINE_DYNAMIC_TYPE_EXTENDED so it works together with
        G_IMPLEMENT_INTERFACE. (#478459)


svn path=/trunk/; revision=5777
2007-09-20 10:56:34 +00:00
Matthias Clasen
d7b7c44e40 Define G_DEFINE_DYNAMIC_TYPE and and _EXTENDED variant. (#334437)
2006-12-29 Matthias Clasen  <mclasen@redhat.com>

        * gtypemodule.h: Define G_DEFINE_DYNAMIC_TYPE and
        and _EXTENDED variant.  (#334437)
2006-12-29 06:12:11 +00:00
Matthias Clasen
c1dee8766e Forgotten commit. 2004-11-23 19:40:13 +00:00
Matthias Clasen
a41b04a301 Fix the declarations of the new functions to return GType, not void. Also
Tue Jul  6 00:46:43 2004  Matthias Clasen  <maclas@gmx.de>

	* gtypemodule.h:
	* gtypemodule.c: Fix the declarations of the new
	functions to return GType, not void.
	Also add missing includes.  (#145508, Morten Welinder)
2004-07-06 14:13:24 +00:00
Matthias Clasen
8414d97c5b Add g_type_module_register_enum() and g_type_module_register_flags().
Tue Jul  6 00:54:38 2004  Matthias Clasen  <maclas@gmx.de>

	* gobject/gobject-sections.txt:
	* gobject/tmpl/gtypemodule.sgml: Add g_type_module_register_enum()
	and g_type_module_register_flags().
2004-07-06 04:56:36 +00:00
Matthias Clasen
0aeb066667 Add /*< public >*/ and /*< private >*/ markers for documentation purposes.
Tue Oct 21 23:17:06 2003  Matthias Clasen  <maclas@gmx.de>

	* genums.h (struct _GEnumClass):
	* genums.h (struct _GFlagsClass):
	* gtypemodule.h (struct _GTypeModuleClass):
	* gtypemodule.h (struct _GTypeModule): Add /*< public >*/
	and /*< private >*/ markers for documentation purposes.
2003-10-28 22:26:18 +00:00
Owen Taylor
56377271ef Make GInterfaceInfo paramter const to correspond to the conventions for
Sun Feb 24 22:08:29 2002  Owen Taylor  <otaylor@redhat.com>

        * gtypemodule.[ch] (g_type_module_add_interface): Make
        GInterfaceInfo paramter const to correspond to the
        conventions for the g_type_add_interface() functions.
        (#72461, Miroslaw Dobrzanski-Neumann)
2002-02-25 03:15:25 +00:00
Owen Taylor
600f880935 Add some padding to the class.
Sat Feb 23 13:28:56 2002  Owen Taylor  <otaylor@redhat.com>

        * gtypeplugin.h (struct _GTypePluginClass): Add some
        padding to the class.

        * gclosure.h (struct _GClosure): Fix typo in comment.
2002-02-23 20:08:13 +00:00
Owen Taylor
e767aa0a4f Improve the detection of invalid includes by moving the test outside the
Mon Nov 19 14:35:56 2001  Owen Taylor  <otaylor@redhat.com>

        * *.h: Improve the detection of invalid includes by moving
        the test outside the duplicate include guards.

        * gsourceclosure.c (g_source_set_closure): Doc fix.
2001-11-22 18:55:06 +00:00
Owen Taylor
5852eace66 Include gtypes.h not gobject/gtype.h
Sat Nov 17 14:10:35 2001  Owen Taylor  <otaylor@redhat.com>

	* glib/gbsearcharray.h: Include gtypes.h not gobject/gtype.h

	* glib/glib-object.h gobject/*.h: Prevent headers from
	being included directly except when compiling GObject.

	* gobject/gvaluecollector.h: Include glib-object.h so that
	this file can be included directly, since we don't
	include it _from_ glib-object.h.

	* gobject/gtype.c: Remove struct _GValue hack since we
	now include glib/gvaluecollector.h which simply pulls in
        glib-object.h.
2001-11-18 00:38:48 +00:00
Owen Taylor
40cfd305c2 *** empty log message *** 2000-11-11 06:46:30 +00:00