moved includes back to the top of the files (before gtk-doc SECTION
authorMichael Natterer <mitch@imendio.com>
Sun, 22 Jun 2008 14:29:25 +0000 (14:29 +0000)
committerMichael Natterer <mitch@src.gnome.org>
Sun, 22 Jun 2008 14:29:25 +0000 (14:29 +0000)
2008-06-22  Michael Natterer  <mitch@imendio.com>

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

18 files changed:
gobject/ChangeLog
gobject/gboxed.c
gobject/gclosure.c
gobject/genums.c
gobject/glib-genmarshal.c
gobject/gobject-query.c
gobject/gobject.c
gobject/gobjectnotifyqueue.c
gobject/gparam.c
gobject/gparamspecs.c
gobject/gsignal.c
gobject/gsourceclosure.c
gobject/gtype.c
gobject/gtypemodule.c
gobject/gtypeplugin.c
gobject/gvaluearray.c
gobject/gvaluetransform.c
gobject/gvaluetypes.c

index ff126f50102994aeaeeb5988c0fb726359f214b8..c263bbd38f63b3a193aff6bd40c1d31a33702576 100644 (file)
@@ -1,3 +1,11 @@
+2008-06-22  Michael Natterer  <mitch@imendio.com>
+
+       * *.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  <ensonic@users.sf.net>
 
        * docs/reference/gobject/tmpl/gobject-unused.sgml:
index a3fb202a7b4cc713ef120eaee9f7fb8fbcc0e27e..9383ab89baefba2a3299de292432b6975e142574 100644 (file)
  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  * Boston, MA 02111-1307, USA.
  */
+
+#include "config.h"
+
+#include <string.h>
+
+#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 <string.h>
-
 /* --- typedefs & structures --- */
 typedef struct
 {
index b16a81145b68b7bdb00f7fb5ca1f0b0aa9487afe..1fd456c615b4a32eeb4860cc13a244a2a768018c 100644 (file)
  * 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 <string.h>
+
+#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 #GValue<!-- -->s 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 #GValue<!-- -->s 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
- * <link linkend="glib-genmarshal">glib-genmarshal</link> 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 #GValue<!-- -->s 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 #GValue<!--
+ * -->s 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 <link
+ * linkend="glib-genmarshal">glib-genmarshal</link> 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:
  * <itemizedlist>
  * <listitem><para>
- * 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.
  * </para></listitem>
  * <listitem><para>
- * 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.
  * </para></listitem>
  * <listitem><para>
  * g_closure_invalidate() and invalidation notifiers allow callbacks to be
  * </itemizedlist>
  */
 
-#include       "gclosure.h"
-
-/*
- * MT safe with regards to reference counting.
- */
-
-#include       "gvalue.h"
-#include       "gobjectalias.h"
-#include       <string.h>
-
-
 #define        CLOSURE_MAX_REF_COUNT           ((1 << 15) - 1)
 #define        CLOSURE_MAX_N_GUARDS            ((1 << 1) - 1)
 #define        CLOSURE_MAX_N_FNOTIFIERS        ((1 << 2) - 1)
index a2bce4c91666af88737c927d5a9a20195ca99561..f90cc7b4b04d652e9f6117536bc848ddf1d7792a 100644 (file)
  * 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(), 
- * <link linkend="glib-mkenums">glib-mkenums</link>
- * @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 <link linkend="glib-mkenums">glib-mkenums</link> that can 
- * construct suitable type registration functions from C enumeration definitions.
- */
 
 /*
  * MT safe
  */
 
-#include        <string.h>
+#include "config.h"
 
-#include       "genums.h"
+#include <string.h>
 
-#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(),
+ *
+ * <link linkend="glib-mkenums">glib-mkenums</link>
+ * @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 <link
+ * linkend="glib-mkenums">glib-mkenums</link> that can construct
+ * suitable type registration functions from C enumeration
+ * definitions.
+ */
 
 
 /* --- prototypes --- */
index 61ac8ada65b00e6a9c4c7d6e403394023e9e083e..4de9932ecb795e490e50c1b0789134f8e1fba55d 100644 (file)
  * 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       <glib.h>
+#include "config.h"
 
-#include       <glib/gprintf.h>
-#include       <stdlib.h>
-#include       <fcntl.h>
-#include       <string.h>
-#include       <errno.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <string.h>
+#include <errno.h>
 #ifdef HAVE_UNISTD_H
-#include       <unistd.h>
+#include <unistd.h>
 #endif
-#include       <sys/types.h>
-#include       <sys/stat.h>
+#include <sys/types.h>
+#include <sys/stat.h>
 
 #ifdef G_OS_WIN32
 #include <io.h>
 #endif
 
+#undef G_LOG_DOMAIN
+#define G_LOG_DOMAIN "GLib-Genmarshal"
+#include <glib.h>
+#include <glib/gprintf.h>
+
+
 /* --- defines --- */
 #define        PRG_NAME        "glib-genmarshal"
 #define        PKG_NAME        "GLib"
index 693474825c5e3480d4c49a848bdbf587b1c51fce..b13b8165abcd180d0f5c93d937f26603388db62c 100644 (file)
  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  * Boston, MA 02111-1307, USA.
  */
-#include       "../config.h"
 
-#include        <glib-object.h>
+#include "config.h"
 
-#include       <glib/gprintf.h>
-#include       <stdlib.h>
-#include       <string.h>
+#include <stdlib.h>
+#include <string.h>
 #ifdef HAVE_UNISTD_H
-#include       <unistd.h>
+#include <unistd.h>
 #endif
-#include       <sys/stat.h>
-#include       <fcntl.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#include <glib-object.h>
+#include <glib/gprintf.h>
+
 
 static gchar *indent_inc = NULL;
 static guint spacing = 1;
index 2de811060f4f8e08eb277481034fcb6bb93a58ba..bb2e36b3edf8495d3f0c6cb83f3beccbe4e3743a 100644 (file)
  * 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 <string.h>
+#include <signal.h>
+
+#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 <xref linkend="gobject-Signals"/>.
- * 
+ *
+ * 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 <xref
+ * linkend="gobject-Signals"/>.
+ *
  * <para id="floating-ref">
  * #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 <firstterm>floating</firstterm> 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
  * maintenance (such as smart pointers or garbage collection) therefore don't
  * need to expose floating references in their API.
  * </para>
- * 
+ *
  * 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);
  * g_obejct_unref (object); // release previously acquired reference
  * ]|
  */
-#include       "gobject.h"
-#include        <glib/gdatasetprivate.h>
-
-/*
- * MT safe with regards to reference counting.
- */
-
-#include       "gvaluecollector.h"
-#include       "gsignal.h"
-#include       "gparamspecs.h"
-#include       "gvaluetypes.h"
-#include       <string.h>
-#include       <signal.h>
-
-#include       "gobjectalias.h"
-
-/* This should be included after gobjectalias.h (or pltcheck.sh will fail) */
-#include       "gobjectnotifyqueue.c"
 
 
 #define        PREALLOC_CPARAMS        (8)
index 60c1c280728e3d76085548e42bcc8eb3b490e0c7..1d5787b5c0b245ee1744e56f649adbac9bdd492e 100644 (file)
  * 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        <string.h> /* memset */
-#include        <glib-object.h>
+#include <string.h> /* memset */
+
+#include <glib-object.h>
 
 G_BEGIN_DECLS
 
index 1a898292a7e0560c04000107a2774225e40b11d5..e9b12926dfd0e99ded867481f31f7350c8a9a71f 100644 (file)
  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  * Boston, MA 02111-1307, USA.
  */
+
+/*
+ * MT safe
+ */
+
+#include "config.h"
+
+#include <string.h>
+
+#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.
- * 
+ *
  * <para id="canonical-parameter-name">
  * Parameter names need to start with a letter (a-z or A-Z). Subsequent
  * characters can be letters, numbers or a '-'.
  * parameter.
  * </para>
  */
-/*
- * MT safe
- */
-
-#include       "gparam.h"
-#include        "gparamspecs.h"
-
-#include       "gvaluecollector.h"
-#include       "gobjectalias.h"
-#include       <string.h>
-
 
 
 /* --- defines --- */
index c956a5c5524fb7aebbd676239f37d3edb83d0b36..6aba4df6fc3d36e003f6b57a931d593eb333744f 100644 (file)
  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  * Boston, MA 02111-1307, USA.
  */
+
+/*
+ * MT safe
+ */
+
+#include "config.h"
+
+#include <string.h>
+
+#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       <string.h>
 
 #define        G_FLOAT_EPSILON         (1e-30)
 #define        G_DOUBLE_EPSILON        (1e-90)
index 3eaa7c68f2158e2f55d766584c350fd5f5228f61..3ede9e82b006a406c5ac110de0eede8ced4c6716 100644 (file)
  * this code is based on the original GtkSignal implementation
  * for the Gtk+ library by Peter Mattis <petm@xcf.berkeley.edu>
  */
+
+/*
+ * MT safe
+ */
+
+#include "config.h"
+
+#include <string.h>
+#include <signal.h>
+
+#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 <emphasis>emission</emphasis>
- * 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
+ * <emphasis>emission</emphasis> 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:
  * <variablelist>
  * <varlistentry><term></term><listitem><para>
  * detail part of the signal specification upon connection) serves as a
  * wildcard and matches any detail argument passed in to emission.
  */
-/*
- * MT safe
- */
-
-#include <config.h>
-
-#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       <string.h> 
-#include       <signal.h>
 
 
 /* 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"
index 2fa7748c9f04bf90a514762b8f4c9e27bb148883..345c322891152550dc90e0b6a094028eae96af31 100644 (file)
@@ -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)
 {
index f244829d22b1f905c46d785c28a9f2055d4f258d..bcb6a0d9dc78646c17d66e9d3eb58c79097cfb18 100644 (file)
  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  * Boston, MA 02111-1307, USA.
  */
+
+/*
+ * MT safe
+ */
+
+#include "config.h"
+
+#include <string.h>
+
+#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.
  * 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        <config.h>
-#include       "gtype.h"
-
-/*
- * MT safe
- */
-
-#include       "gtypeplugin.h"
-#include       "gvaluecollector.h"
-#include       "gbsearcharray.h"
-#include       <string.h>
 
-#include       "gobjectalias.h"
 
 /* NOTE: some functions (some internal variants and exported ones)
  * invalidate data portions of the TypeNodes. if external functions/callbacks
index 94b8e0986fec48e8444b8ca67f7071d2096b57b9..c4fc30d2aa8834ddcaae5f5bb5dfe30290848e38 100644 (file)
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 02111-1307, USA.
  */
+
+#include "config.h"
+
+#include <stdlib.h>
+
+#include "gtypeplugin.h"
+#include "gtypemodule.h"
+#include "gobjectalias.h"
+
+
 /**
  * SECTION:gtypemodule
  * @Short_description: Type loading modules
@@ -30,7 +40,7 @@
  * </varlistentry>
  * </variablelist>
  * @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
  * 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 <stdlib.h>
-
-#include "gtypeplugin.h"
-#include "gtypemodule.h"
-#include "gobjectalias.h"
 
 typedef struct _ModuleTypeInfo ModuleTypeInfo;
 typedef struct _ModuleInterfaceInfo ModuleInterfaceInfo;
index 8aaa7e4d655e00c8982f39b5d839088aa71e37c5..12698b01c705ad8e3d4c5e76394fdbc70ae9ed76 100644 (file)
  * 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:
+ *
  * <orderedlist>
  * <listitem><para>
  *   The type is initially introduced (usually upon loading the module
  * </para></listitem>
  * <listitem><para>
  *    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 <literal>new_type_id</literal>.
  * </para></listitem>
  * <listitem><para>
  *    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
  *    <literal>new_type_plugin</literal>.
  * </para></listitem>
  * <listitem><para>
  *    Things may repeat from the second step.
  * </para></listitem>
  * </orderedlist>
- * 
- * 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 --- */
index d0c963fbb652819eab1c641141ba4117bc570605..ff1249f20eeee04958349b0eafefcd4da0dfe65c 100644 (file)
  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  * Boston, MA 02111-1307, USA.
  */
+
+/*
+ * MT safe
+ */
+
+#include "config.h"
+
+#include <string.h>
+#include <stdlib.h>  /* 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 <config.h>
-
-#include       "gvaluearray.h"
-#include       "gobjectalias.h"
-#include       <string.h>
-#include       <stdlib.h>      /* qsort() */
 
 #ifdef DISABLE_MEM_POOLS
 #  define      GROUP_N_VALUES  (1)     /* power of 2 !! */
index 2f296e174b2f8758b00421a7c2b541aa4fc18714..ca091606f11577c8b6a1cd24e93302a59697ff38 100644 (file)
  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  * Boston, MA 02111-1307, USA.
  */
-#include        <string.h>
 
-#include        "gvalue.h"
-#include        "genums.h"
-#include       "gobjectalias.h"
+#include "config.h"
+
+#include <string.h>
+
+#include "gvalue.h"
+#include "genums.h"
+
+#include "gobjectalias.h"
 
 
 /* same type transforms
index 7c519f5a9f426ef9ad55d3476a31b350841fd818..765a8d6ecb980e9ff268dec52134e710dfdf98d5 100644 (file)
  * MT safe
  */
 
-#include       "gvaluetypes.h"
+#include "config.h"
 
-#include       "gvaluecollector.h"
+#include <string.h>
+#include <stdlib.h> /* qsort() */
 
+#include "gvaluetypes.h"
+#include "gvaluecollector.h"
 #include "gobject.h"
 #include "gparam.h"
 #include "gboxed.h"
 #include "genums.h"
 
-#include       "gobjectalias.h"
-#include       <string.h>
-#include       <stdlib.h>      /* qsort() */
+#include "gobjectalias.h"
 
 
 /* --- value functions --- */