From: Michael Natterer Date: Sun, 22 Jun 2008 14:29:25 +0000 (+0000) Subject: moved includes back to the top of the files (before gtk-doc SECTION X-Git-Tag: GLIB_2_17_3~41 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5602b7e275ef5fb76cf7847f35b120dce3111705;p=platform%2Fupstream%2Fglib.git moved includes back to the top of the files (before gtk-doc SECTION 2008-06-22 Michael Natterer * *.c: moved includes back to the top of the files (before gtk-doc SECTION comments). Add "config.h" in all files and move system included before glib includes. Remove trailing whitespace from SECTION comments and did some reformatting where lines were overly long, no documentation content was changed. svn path=/trunk/; revision=7089 --- diff --git a/gobject/ChangeLog b/gobject/ChangeLog index ff126f5..c263bbd 100644 --- a/gobject/ChangeLog +++ b/gobject/ChangeLog @@ -1,3 +1,11 @@ +2008-06-22 Michael Natterer + + * *.c: moved includes back to the top of the files (before gtk-doc + SECTION comments). Add "config.h" in all files and move system + included before glib includes. Remove trailing whitespace from + SECTION comments and did some reformatting where lines were overly + long, no documentation content was changed. + 2008-06-22 Stefan Kost * docs/reference/gobject/tmpl/gobject-unused.sgml: diff --git a/gobject/gboxed.c b/gobject/gboxed.c index a3fb202..9383ab8 100644 --- a/gobject/gboxed.c +++ b/gobject/gboxed.c @@ -16,33 +16,38 @@ * Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307, USA. */ + +#include "config.h" + +#include + +#include "gboxed.h" +#include "gbsearcharray.h" +#include "gvalue.h" +#include "gvaluearray.h" +#include "gclosure.h" +#include "gvaluecollector.h" +#include "gobjectalias.h" + + /** * SECTION:gboxed - * @Short_description: A mechanism to wrap opaque C structures registered by the type system - * @See_also:#GParamSpecBoxed, g_param_spec_boxed() + * @Short_description: A mechanism to wrap opaque C structures registered + * by the type system + * + * @See_also: #GParamSpecBoxed, g_param_spec_boxed() + * * @Title: Boxed Types - * + * * GBoxed is a generic wrapper mechanism for arbitrary C structures. The only * thing the type system needs to know about the structures is how to copy and * free them, beyond that they are treated as opaque chunks of memory. - * + * * Boxed types are useful for simple value-holder structures like rectangles or * points. They can also be used for wrapping structures defined in non-GObject * based libraries. */ -#include "gboxed.h" - -#include "gbsearcharray.h" -#include "gvalue.h" -#include "gvaluearray.h" -#include "gclosure.h" -#include "gvaluecollector.h" - -#include "gobjectalias.h" - -#include - /* --- typedefs & structures --- */ typedef struct { diff --git a/gobject/gclosure.c b/gobject/gclosure.c index b16a811..1fd456c 100644 --- a/gobject/gclosure.c +++ b/gobject/gclosure.c @@ -17,49 +17,65 @@ * Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307, USA. */ + +/* + * MT safe with regards to reference counting. + */ + +#include "config.h" + +#include + +#include "gclosure.h" +#include "gvalue.h" +#include "gobjectalias.h" + /** * SECTION:gclosure * @Short_description: Functions as first-class objects * @Title: Closures - * - * A #GClosure represents a callback supplied by the programmer. It will generally - * comprise a function of some kind and a marshaller used to call it. It is the - * reponsibility of the marshaller to convert the arguments for the invocation - * from #GValues into a suitable form, perform the callback on the - * converted arguments, and transform the return value back into a #GValue. - * - * In the case of C programs, a closure usually just holds a pointer to a function - * and maybe a data argument, and the marshaller converts between #GValue - * and native C types. The GObject library provides the #GCClosure type for this - * purpose. Bindings for other languages need marshallers which - * convert between #GValues and suitable representations in the runtime - * of the language in order to use functions written in that languages as - * callbacks. - * - * Within GObject, closures play an important role in the implementation of - * signals. When a signal is registered, the @c_marshaller argument to - * g_signal_new() specifies the default C marshaller for any closure which is - * connected to this signal. GObject provides a number of C marshallers - * for this purpose, see the g_cclosure_marshal_*() functions. Additional - * C marshallers can be generated with the - * glib-genmarshal utility. - * Closures can be explicitly connected to signals with - * g_signal_connect_closure(), but it usually more convenient to let GObject - * create a closure automatically by using one of the g_signal_connect_*() - * functions which take a callback function/user data pair. - * + * + * A #GClosure represents a callback supplied by the programmer. It + * will generally comprise a function of some kind and a marshaller + * used to call it. It is the reponsibility of the marshaller to + * convert the arguments for the invocation from #GValues into + * a suitable form, perform the callback on the converted arguments, + * and transform the return value back into a #GValue. + * + * In the case of C programs, a closure usually just holds a pointer + * to a function and maybe a data argument, and the marshaller + * converts between #GValue and native C types. The GObject + * library provides the #GCClosure type for this purpose. Bindings for + * other languages need marshallers which convert between #GValues and suitable representations in the runtime of the language in + * order to use functions written in that languages as callbacks. + * + * Within GObject, closures play an important role in the + * implementation of signals. When a signal is registered, the + * @c_marshaller argument to g_signal_new() specifies the default C + * marshaller for any closure which is connected to this + * signal. GObject provides a number of C marshallers for this + * purpose, see the g_cclosure_marshal_*() functions. Additional C + * marshallers can be generated with the glib-genmarshal utility. Closures + * can be explicitly connected to signals with + * g_signal_connect_closure(), but it usually more convenient to let + * GObject create a closure automatically by using one of the + * g_signal_connect_*() functions which take a callback function/user + * data pair. + * * Using closures has a number of important advantages over a simple * callback function/data pointer combination: * * - * Closures allow the callee to get the types of the callback parameters, - * which means that language bindings don't have to write individual glue + * Closures allow the callee to get the types of the callback parameters, + * which means that language bindings don't have to write individual glue * for each callback type. * * - * The reference counting of #GClosure makes it easy to handle reentrancy - * right; if a callback is removed while it is being invoked, the closure - * and it's parameters won't be freed until the invocation finishes. + * The reference counting of #GClosure makes it easy to handle reentrancy + * right; if a callback is removed while it is being invoked, the closure + * and it's parameters won't be freed until the invocation finishes. * * * g_closure_invalidate() and invalidation notifiers allow callbacks to be @@ -68,17 +84,6 @@ * */ -#include "gclosure.h" - -/* - * MT safe with regards to reference counting. - */ - -#include "gvalue.h" -#include "gobjectalias.h" -#include - - #define CLOSURE_MAX_REF_COUNT ((1 << 15) - 1) #define CLOSURE_MAX_N_GUARDS ((1 << 1) - 1) #define CLOSURE_MAX_N_FNOTIFIERS ((1 << 2) - 1) diff --git a/gobject/genums.c b/gobject/genums.c index a2bce4c..f90cc7b 100644 --- a/gobject/genums.c +++ b/gobject/genums.c @@ -16,38 +16,48 @@ * Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307, USA. */ -/** - * SECTION:enumerations_flags - * @Short_description: Enumeration and flags types - * @See_also:#GParamSpecEnum, #GParamSpecFlags, g_param_spec_enum(), g_param_spec_flags(), - * glib-mkenums - * @Title: Enumeration and Flag Types - * - * The GLib type system provides fundamental types for enumeration and flags types. (Flags types - * are like enumerations, but allow their values to be combined by bitwise or). A registered - * enumeration or flags type associates a name and a nickname with each allowed value, and - * the methods g_enum_get_value_by_name(), g_enum_get_value_by_nick(), g_flags_get_value_by_name() - * and g_flags_get_value_by_nick() can look up values by their name or nickname. - * When an enumeration or flags type is registered with the GLib type system, it can - * be used as value type for object properties, using g_param_spec_enum() or - * g_param_spec_flags(). - * - * GObject ships with a utility called glib-mkenums that can - * construct suitable type registration functions from C enumeration definitions. - */ /* * MT safe */ -#include +#include "config.h" -#include "genums.h" +#include -#include "gvalue.h" -#include "gvaluecollector.h" +#include "genums.h" +#include "gvalue.h" +#include "gvaluecollector.h" +#include "gobjectalias.h" -#include "gobjectalias.h" + +/** + * SECTION:enumerations_flags + * + * @Short_description: Enumeration and flags types + * + * @See_also:#GParamSpecEnum, #GParamSpecFlags, g_param_spec_enum(), + * g_param_spec_flags(), + * + * glib-mkenums + * @Title: Enumeration and Flag Types + * + * The GLib type system provides fundamental types for enumeration and + * flags types. (Flags types are like enumerations, but allow their + * values to be combined by bitwise or). A registered enumeration or + * flags type associates a name and a nickname with each allowed + * value, and the methods g_enum_get_value_by_name(), + * g_enum_get_value_by_nick(), g_flags_get_value_by_name() and + * g_flags_get_value_by_nick() can look up values by their name or + * nickname. When an enumeration or flags type is registered with the + * GLib type system, it can be used as value type for object + * properties, using g_param_spec_enum() or g_param_spec_flags(). + * + * GObject ships with a utility called glib-mkenums that can construct + * suitable type registration functions from C enumeration + * definitions. + */ /* --- prototypes --- */ diff --git a/gobject/glib-genmarshal.c b/gobject/glib-genmarshal.c index 61ac8ad..4de9932 100644 --- a/gobject/glib-genmarshal.c +++ b/gobject/glib-genmarshal.c @@ -16,27 +16,29 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#include "config.h" -#undef G_LOG_DOMAIN -#define G_LOG_DOMAIN "GLib-Genmarshal" -#include +#include "config.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include #ifdef HAVE_UNISTD_H -#include +#include #endif -#include -#include +#include +#include #ifdef G_OS_WIN32 #include #endif +#undef G_LOG_DOMAIN +#define G_LOG_DOMAIN "GLib-Genmarshal" +#include +#include + + /* --- defines --- */ #define PRG_NAME "glib-genmarshal" #define PKG_NAME "GLib" diff --git a/gobject/gobject-query.c b/gobject/gobject-query.c index 6934748..b13b816 100644 --- a/gobject/gobject-query.c +++ b/gobject/gobject-query.c @@ -16,18 +16,20 @@ * Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307, USA. */ -#include "../config.h" -#include +#include "config.h" -#include -#include -#include +#include +#include #ifdef HAVE_UNISTD_H -#include +#include #endif -#include -#include +#include +#include + +#include +#include + static gchar *indent_inc = NULL; static guint spacing = 1; diff --git a/gobject/gobject.c b/gobject/gobject.c index 2de8110..bb2e36b 100644 --- a/gobject/gobject.c +++ b/gobject/gobject.c @@ -16,21 +16,45 @@ * Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307, USA. */ + +/* + * MT safe with regards to reference counting. + */ + +#include "config.h" + +#include +#include + +#include "glib/gdatasetprivate.h" + +#include "gobject.h" +#include "gvaluecollector.h" +#include "gsignal.h" +#include "gparamspecs.h" +#include "gvaluetypes.h" +#include "gobjectalias.h" + +/* This should be included after gobjectalias.h (or pltcheck.sh will fail) */ +#include "gobjectnotifyqueue.c" + + /** * SECTION:objects * @Short_description: The base object type * @See_also:#GParamSpecObject, g_param_spec_object() * @Title: The Base Object Type - * - * GObject is the fundamental type providing the common attributes and methods - * for all object types in GTK+, Pango and other libraries based on GObject. - * The GObject class provides methods for object construction and destruction, - * property access methods, and signal support. - * Signals are described in detail in . - * + * + * GObject is the fundamental type providing the common attributes and + * methods for all object types in GTK+, Pango and other libraries + * based on GObject. The GObject class provides methods for object + * construction and destruction, property access methods, and signal + * support. Signals are described in detail in . + * * * #GInitiallyUnowned is derived from #GObject. The only difference between - * the two is that the initial reference of a #GInitiallyUnowned is flagged + * the two is that the initial reference of a #GInitiallyUnowned is flagged * as a floating reference. * This means that it is not specifically claimed to be "owned" by * any code portion. The main motivation for providing floating references is @@ -51,7 +75,7 @@ * container_add_child (container, child); * g_object_unref (child); * ]| - * The floating reference can be converted into + * The floating reference can be converted into * an ordinary reference by calling g_object_ref_sink(). * For already sunken objects (objects that don't have a floating reference * anymore), g_object_ref_sink() is equivalent to g_object_ref() and returns @@ -61,11 +85,11 @@ * maintenance (such as smart pointers or garbage collection) therefore don't * need to expose floating references in their API. * - * + * * Some object implementations may need to save an objects floating state * across certain code portions (an example is #GtkMenu), to achive this, the * following sequence can be used: - * + * * |[ * // save floating state * gboolean was_floating = g_object_is_floating (object); @@ -78,24 +102,6 @@ * g_obejct_unref (object); // release previously acquired reference * ]| */ -#include "gobject.h" -#include - -/* - * MT safe with regards to reference counting. - */ - -#include "gvaluecollector.h" -#include "gsignal.h" -#include "gparamspecs.h" -#include "gvaluetypes.h" -#include -#include - -#include "gobjectalias.h" - -/* This should be included after gobjectalias.h (or pltcheck.sh will fail) */ -#include "gobjectnotifyqueue.c" #define PREALLOC_CPARAMS (8) diff --git a/gobject/gobjectnotifyqueue.c b/gobject/gobjectnotifyqueue.c index 60c1c28..1d5787b 100644 --- a/gobject/gobjectnotifyqueue.c +++ b/gobject/gobjectnotifyqueue.c @@ -16,11 +16,13 @@ * Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307, USA. */ + #ifndef __G_OBJECT_NOTIFY_QUEUE_H__ #define __G_OBJECT_NOTIFY_QUEUE_H__ -#include /* memset */ -#include +#include /* memset */ + +#include G_BEGIN_DECLS diff --git a/gobject/gparam.c b/gobject/gparam.c index 1a89829..e9b1292 100644 --- a/gobject/gparam.c +++ b/gobject/gparam.c @@ -16,16 +16,31 @@ * Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307, USA. */ + +/* + * MT safe + */ + +#include "config.h" + +#include + +#include "gparam.h" +#include "gparamspecs.h" +#include "gvaluecollector.h" +#include "gobjectalias.h" + + /** * SECTION:gparamspec * @Short_description: Metadata for parameter specifications * @See_also:g_object_class_install_property(), g_object_set(), g_object_get(), * g_object_set_property(), g_object_get_property(), g_value_register_transform_func() * @Title: GParamSpec - * + * * #GParamSpec is an object structure that encapsulates the metadata * required to specify parameters, such as e.g. #GObject properties. - * + * * * Parameter names need to start with a letter (a-z or A-Z). Subsequent * characters can be letters, numbers or a '-'. @@ -34,17 +49,6 @@ * parameter. * */ -/* - * MT safe - */ - -#include "gparam.h" -#include "gparamspecs.h" - -#include "gvaluecollector.h" -#include "gobjectalias.h" -#include - /* --- defines --- */ diff --git a/gobject/gparamspecs.c b/gobject/gparamspecs.c index c956a5c..6aba4df 100644 --- a/gobject/gparamspecs.c +++ b/gobject/gparamspecs.c @@ -16,35 +16,39 @@ * Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307, USA. */ + +/* + * MT safe + */ + +#include "config.h" + +#include + +#include "gparamspecs.h" +#include "gvaluecollector.h" +#include "gvaluearray.h" +#include "gobjectalias.h" + + /** * SECTION:param_value_types * @Short_description: Standard Parameter and Value Types * @See_also:#GParamSpec, #GValue, g_object_class_install_property(). * @Title: Parameters and Values - * + * * #GValue provides an abstract container structure which can be copied, * transformed and compared while holding a value of any (derived) type, which * is registered as a #GType with a #GTypeValueTable in its #GTypeInfo structure. * Parameter specifications for most value types can be created as * #GParamSpec derived instances, to implement e.g. #GObject properties which * operate on #GValue containers. - * + * * Parameter names need to start with a letter (a-z or A-Z). Subsequent * characters can be letters, numbers or a '-'. * All other characters are replaced by a '-' during construction. */ -/* - * MT safe - */ - -#include "../config.h" - -#include "gparamspecs.h" -#include "gvaluecollector.h" -#include "gvaluearray.h" -#include "gobjectalias.h" -#include #define G_FLOAT_EPSILON (1e-30) #define G_DOUBLE_EPSILON (1e-90) diff --git a/gobject/gsignal.c b/gobject/gsignal.c index 3eaa7c6..3ede9e8 100644 --- a/gobject/gsignal.c +++ b/gobject/gsignal.c @@ -19,22 +19,42 @@ * this code is based on the original GtkSignal implementation * for the Gtk+ library by Peter Mattis */ + +/* + * MT safe + */ + +#include "config.h" + +#include +#include + +#include "gsignal.h" +#include "gbsearcharray.h" +#include "gvaluecollector.h" +#include "gvaluetypes.h" +#include "gboxed.h" +#include "gobject.h" +#include "genums.h" +#include "gobjectalias.h" + + /** * SECTION:signals * @Short_description: A means for customization of object behaviour and a general purpose notification mechanism * @Title: Signals - * - * The basic concept of the signal system is that of the emission - * of a signal. - * Signals are introduced per-type and are identified through strings. - * Signals introduced for a parent type are available in derived types as well, - * so basically they are a per-type facility that is inherited. - * A signal emission mainly involves invocation of a certain set of callbacks in - * precisely defined manner. There are two main categories of such callbacks, - * per-object - * i'm referring to those types as "object types" in the following, simply - * because that is the context most users will encounter signals in. - * + * + * The basic concept of the signal system is that of the + * emission of a signal. Signals are introduced + * per-type and are identified through strings. Signals introduced + * for a parent type are available in derived types as well, so + * basically they are a per-type facility that is inherited. A signal + * emission mainly involves invocation of a certain set of callbacks + * in precisely defined manner. There are two main categories of such + * callbacks, per-object i'm referring to those types as "object + * types" in the following, simply because that is the context most + * users will encounter signals in. + * * ones and user provided ones. * The per-object callbacks are most often referred to as "object method * handler" or "default (signal) handler", while user provided callbacks are @@ -43,7 +63,7 @@ * frequently happens at the end of an object class' creation), while user * provided handlers are frequently connected and disconnected to/from a certain * signal on certain object instances. - * + * * A signal emission consists of five stages, unless prematurely stopped: * * @@ -80,25 +100,6 @@ * detail part of the signal specification upon connection) serves as a * wildcard and matches any detail argument passed in to emission. */ -/* - * MT safe - */ - -#include - -#include "gsignal.h" - -#include "gbsearcharray.h" -#include "gvaluecollector.h" -#include "gvaluetypes.h" -#include "gboxed.h" -#include "gobject.h" -#include "genums.h" - -#include "gobjectalias.h" - -#include -#include /* pre allocation configurations @@ -3156,7 +3157,7 @@ g_signal_accumulator_true_handled (GSignalInvocationHint *ihint, } /* --- compile standard marshallers --- */ -#include "gmarshal.c" +#include "gmarshal.c" #define __G_SIGNAL_C__ #include "gobjectaliasdef.c" diff --git a/gobject/gsourceclosure.c b/gobject/gsourceclosure.c index 2fa7748..345c322 100644 --- a/gobject/gsourceclosure.c +++ b/gobject/gsourceclosure.c @@ -17,6 +17,8 @@ * Boston, MA 02111-1307, USA. */ +#include "config.h" + #include "gsourceclosure.h" #include "gboxed.h" #include "genums.h" @@ -25,6 +27,7 @@ #include "gvaluetypes.h" #include "gobjectalias.h" + GType g_io_channel_get_type (void) { diff --git a/gobject/gtype.c b/gobject/gtype.c index f244829..bcb6a0d 100644 --- a/gobject/gtype.c +++ b/gobject/gtype.c @@ -16,17 +16,33 @@ * Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307, USA. */ + +/* + * MT safe + */ + +#include "config.h" + +#include + +#include "gtype.h" +#include "gtypeplugin.h" +#include "gvaluecollector.h" +#include "gbsearcharray.h" +#include "gobjectalias.h" + + /** * SECTION:gtype * @Short_description: The GLib Runtime type identification and management system * @Title:Type Information - * + * * The GType API is the foundation of the GObject system. It provides the * facilities for registering and managing all fundamental data types, * user-defined object and interface types. Before using any GType * or GObject functions, g_type_init() must be called to initialize the * type system. - * + * * For type creation and registration purposes, all types fall into one of * two categories: static or dynamic. Static types are never loaded or * unloaded at run-time as dynamic types may be. Static types are created @@ -36,8 +52,8 @@ * #GTypePlugin structure instead. The remaining type information (the * #GTypeInfo structure) is retrieved during runtime through #GTypePlugin * and the g_type_plugin_*() API. - * These registration functions are usually called only once from a - * function whose only purpose is to return the type identifier for a + * These registration functions are usually called only once from a + * function whose only purpose is to return the type identifier for a * specific class. Once the type (or class or interface) is registered, * it may be instantiated, inherited, or implemented depending on exactly * what sort of type it is. @@ -45,26 +61,14 @@ * types called g_type_register_fundamental() which requires both a #GTypeInfo * structure and a #GTypeFundamentalInfo structure but it is seldom used * since most fundamental types are predefined rather than user-defined. - * + * * A final word about type names. * Such an identifier needs to be at least three characters long. There is no * upper length limit. The first character needs to be a letter (a-z or A-Z) * or an underscore '_'. Subsequent characters can be letters, numbers or * any of '-_+'. */ -#include -#include "gtype.h" - -/* - * MT safe - */ - -#include "gtypeplugin.h" -#include "gvaluecollector.h" -#include "gbsearcharray.h" -#include -#include "gobjectalias.h" /* NOTE: some functions (some internal variants and exported ones) * invalidate data portions of the TypeNodes. if external functions/callbacks diff --git a/gobject/gtypemodule.c b/gobject/gtypemodule.c index 94b8e09..c4fc30d 100644 --- a/gobject/gtypemodule.c +++ b/gobject/gtypemodule.c @@ -16,6 +16,16 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + +#include "config.h" + +#include + +#include "gtypeplugin.h" +#include "gtypemodule.h" +#include "gobjectalias.h" + + /** * SECTION:gtypemodule * @Short_description: Type loading modules @@ -30,7 +40,7 @@ * * * @Title: GTypeModule - * + * * #GTypeModule provides a simple implementation of the #GTypePlugin * interface. The model of #GTypeModule is a dynamically loaded module * which implements some number of types and interface @@ -43,7 +53,7 @@ * will be reloaded. Note that the last unref can not happen in module * code, since that would lead to the caller's code being unloaded before * g_object_unref() returns to it. - * + * * Keeping track of whether the module should be loaded or not is done by * using a use count - it starts at zero, and whenever it is greater than * zero, the module is loaded. The use count is maintained internally by @@ -53,18 +63,13 @@ * it so that it can initialize its types. At some later point, when the * module no longer needs to be loaded except for the type * implementations it contains, g_type_module_unuse() is called. - * + * * #GTypeModule does not actually provide any implementation of module * loading and unloading. To create a particular module type you must * derive from #GTypeModule and implement the load and unload functions * in #GTypeModuleClass. */ -#include - -#include "gtypeplugin.h" -#include "gtypemodule.h" -#include "gobjectalias.h" typedef struct _ModuleTypeInfo ModuleTypeInfo; typedef struct _ModuleInterfaceInfo ModuleInterfaceInfo; diff --git a/gobject/gtypeplugin.c b/gobject/gtypeplugin.c index 8aaa7e4..12698b0 100644 --- a/gobject/gtypeplugin.c +++ b/gobject/gtypeplugin.c @@ -16,16 +16,23 @@ * Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307, USA. */ + +#include "config.h" + +#include "gtypeplugin.h" +#include "gobjectalias.h" + + /** * SECTION:gtypeplugin * @Short_description: An interface for dynamically loadable types * @See_also:#GTypeModule and g_type_register_dynamic(). * @Titile: GTypePlugin - * - * The GObject type system supports dynamic loading of types. The #GTypePlugin - * interface is used to handle the lifecycle of dynamically loaded types. - * It goes as follows: - * + * + * The GObject type system supports dynamic loading of types. The + * #GTypePlugin interface is used to handle the lifecycle of + * dynamically loaded types. It goes as follows: + * * * * The type is initially introduced (usually upon loading the module @@ -42,13 +49,13 @@ * * * The type's implementation is referenced, e.g. through - * g_type_class_ref() or through g_type_create_instance() (this is - * being called by g_object_new()) or through one of the above done on + * g_type_class_ref() or through g_type_create_instance() (this is + * being called by g_object_new()) or through one of the above done on * a type derived from new_type_id. * * * This causes the type system to load the type's implementation by calling - * g_type_plugin_use() and g_type_plugin_complete_type_info() on + * g_type_plugin_use() and g_type_plugin_complete_type_info() on * new_type_plugin. * * @@ -65,22 +72,20 @@ * Things may repeat from the second step. * * - * - * So basically, you need to implement a #GTypePlugin type that carries a - * use_count, once use_count goes from zero to one, you need to load the - * implementation to successfully handle the upcoming - * g_type_plugin_complete_type_info() call. Later, maybe after succeeding - * use/unuse calls, once use_count drops to zero, you can unload the - * implementation again. The type system makes sure to call g_type_plugin_use() - * and g_type_plugin_complete_type_info() again when the type is needed again. - * - * #GTypeModule is an implementation of #GTypePlugin that already implements - * most of this except for the actual module loading and unloading. It even - * handles multiple registered types per module. + * + * So basically, you need to implement a #GTypePlugin type that + * carries a use_count, once use_count goes from zero to one, you need + * to load the implementation to successfully handle the upcoming + * g_type_plugin_complete_type_info() call. Later, maybe after + * succeeding use/unuse calls, once use_count drops to zero, you can + * unload the implementation again. The type system makes sure to call + * g_type_plugin_use() and g_type_plugin_complete_type_info() again + * when the type is needed again. + * + * #GTypeModule is an implementation of #GTypePlugin that already + * implements most of this except for the actual module loading and + * unloading. It even handles multiple registered types per module. */ -#include "gtypeplugin.h" -#include "gobjectalias.h" - /* --- functions --- */ diff --git a/gobject/gvaluearray.c b/gobject/gvaluearray.c index d0c963f..ff1249f 100644 --- a/gobject/gvaluearray.c +++ b/gobject/gvaluearray.c @@ -16,26 +16,33 @@ * Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307, USA. */ + +/* + * MT safe + */ + +#include "config.h" + +#include +#include /* qsort() */ + +#include "gvaluearray.h" + +#include "gobjectalias.h" + + /** * SECTION:value_arrays * @Short_description: A container structure to maintain an array of generic values * @See_also:#GValue, #GParamSpecValueArray, g_param_spec_value_array() * @Title: Value arrays - * - * The prime purpose of a #GValueArray is for it to be used as an object property - * that holds an array of values. A #GValueArray wraps an array of #GValue elements - * in order for it to be used as a boxed type through %G_TYPE_VALUE_ARRAY. - */ -/* - * MT safe + * + * The prime purpose of a #GValueArray is for it to be used as an + * object property that holds an array of values. A #GValueArray wraps + * an array of #GValue elements in order for it to be used as a boxed + * type through %G_TYPE_VALUE_ARRAY. */ -#include - -#include "gvaluearray.h" -#include "gobjectalias.h" -#include -#include /* qsort() */ #ifdef DISABLE_MEM_POOLS # define GROUP_N_VALUES (1) /* power of 2 !! */ diff --git a/gobject/gvaluetransform.c b/gobject/gvaluetransform.c index 2f296e1..ca09160 100644 --- a/gobject/gvaluetransform.c +++ b/gobject/gvaluetransform.c @@ -16,11 +16,15 @@ * Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307, USA. */ -#include -#include "gvalue.h" -#include "genums.h" -#include "gobjectalias.h" +#include "config.h" + +#include + +#include "gvalue.h" +#include "genums.h" + +#include "gobjectalias.h" /* same type transforms diff --git a/gobject/gvaluetypes.c b/gobject/gvaluetypes.c index 7c519f5..765a8d6 100644 --- a/gobject/gvaluetypes.c +++ b/gobject/gvaluetypes.c @@ -21,18 +21,19 @@ * MT safe */ -#include "gvaluetypes.h" +#include "config.h" -#include "gvaluecollector.h" +#include +#include /* qsort() */ +#include "gvaluetypes.h" +#include "gvaluecollector.h" #include "gobject.h" #include "gparam.h" #include "gboxed.h" #include "genums.h" -#include "gobjectalias.h" -#include -#include /* qsort() */ +#include "gobjectalias.h" /* --- value functions --- */