glib r7089 - trunk/gobject



Author: mitch
Date: Sun Jun 22 14:29:25 2008
New Revision: 7089
URL: http://svn.gnome.org/viewvc/glib?rev=7089&view=rev

Log:
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.



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

Modified: trunk/gobject/gboxed.c
==============================================================================
--- trunk/gobject/gboxed.c	(original)
+++ trunk/gobject/gboxed.c	Sun Jun 22 14:29:25 2008
@@ -16,33 +16,38 @@
  * 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
 {

Modified: trunk/gobject/gclosure.c
==============================================================================
--- trunk/gobject/gclosure.c	(original)
+++ trunk/gobject/gclosure.c	Sun Jun 22 14:29:25 2008
@@ -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 <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
@@ -68,17 +84,6 @@
  * </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)

Modified: trunk/gobject/genums.c
==============================================================================
--- trunk/gobject/genums.c	(original)
+++ trunk/gobject/genums.c	Sun Jun 22 14:29:25 2008
@@ -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(), 
- * <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 --- */

Modified: trunk/gobject/glib-genmarshal.c
==============================================================================
--- trunk/gobject/glib-genmarshal.c	(original)
+++ trunk/gobject/glib-genmarshal.c	Sun Jun 22 14:29:25 2008
@@ -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	<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"

Modified: trunk/gobject/gobject-query.c
==============================================================================
--- trunk/gobject/gobject-query.c	(original)
+++ trunk/gobject/gobject-query.c	Sun Jun 22 14:29:25 2008
@@ -16,18 +16,20 @@
  * 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;

Modified: trunk/gobject/gobject.c
==============================================================================
--- trunk/gobject/gobject.c	(original)
+++ trunk/gobject/gobject.c	Sun Jun 22 14:29:25 2008
@@ -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 <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
@@ -61,11 +85,11 @@
  * 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);
@@ -78,24 +102,6 @@
  * 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)

Modified: trunk/gobject/gobjectnotifyqueue.c
==============================================================================
--- trunk/gobject/gobjectnotifyqueue.c	(original)
+++ trunk/gobject/gobjectnotifyqueue.c	Sun Jun 22 14:29:25 2008
@@ -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        <string.h> /* memset */
-#include        <glib-object.h>
+#include <string.h> /* memset */
+
+#include <glib-object.h>
 
 G_BEGIN_DECLS
 

Modified: trunk/gobject/gparam.c
==============================================================================
--- trunk/gobject/gparam.c	(original)
+++ trunk/gobject/gparam.c	Sun Jun 22 14:29:25 2008
@@ -16,16 +16,31 @@
  * 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 '-'.
@@ -34,17 +49,6 @@
  * parameter.
  * </para>
  */
-/*
- * MT safe
- */
-
-#include	"gparam.h"
-#include        "gparamspecs.h"
-
-#include	"gvaluecollector.h"
-#include	"gobjectalias.h"
-#include	<string.h>
-
 
 
 /* --- defines --- */

Modified: trunk/gobject/gparamspecs.c
==============================================================================
--- trunk/gobject/gparamspecs.c	(original)
+++ trunk/gobject/gparamspecs.c	Sun Jun 22 14:29:25 2008
@@ -16,35 +16,39 @@
  * 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)

Modified: trunk/gobject/gsignal.c
==============================================================================
--- trunk/gobject/gsignal.c	(original)
+++ trunk/gobject/gsignal.c	Sun Jun 22 14:29:25 2008
@@ -19,22 +19,42 @@
  * 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>
@@ -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 <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 @@
 }
 
 /* --- compile standard marshallers --- */
-#include        "gmarshal.c"
+#include "gmarshal.c"
 
 #define __G_SIGNAL_C__
 #include "gobjectaliasdef.c"

Modified: trunk/gobject/gsourceclosure.c
==============================================================================
--- trunk/gobject/gsourceclosure.c	(original)
+++ trunk/gobject/gsourceclosure.c	Sun Jun 22 14:29:25 2008
@@ -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)
 {

Modified: trunk/gobject/gtype.c
==============================================================================
--- trunk/gobject/gtype.c	(original)
+++ trunk/gobject/gtype.c	Sun Jun 22 14:29:25 2008
@@ -16,17 +16,33 @@
  * 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.
@@ -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        <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

Modified: trunk/gobject/gtypemodule.c
==============================================================================
--- trunk/gobject/gtypemodule.c	(original)
+++ trunk/gobject/gtypemodule.c	Sun Jun 22 14:29:25 2008
@@ -16,6 +16,16 @@
  * 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
@@ -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 <stdlib.h>
-
-#include "gtypeplugin.h"
-#include "gtypemodule.h"
-#include "gobjectalias.h"
 
 typedef struct _ModuleTypeInfo ModuleTypeInfo;
 typedef struct _ModuleInterfaceInfo ModuleInterfaceInfo;

Modified: trunk/gobject/gtypeplugin.c
==============================================================================
--- trunk/gobject/gtypeplugin.c	(original)
+++ trunk/gobject/gtypeplugin.c	Sun Jun 22 14:29:25 2008
@@ -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:
+ *
  * <orderedlist>
  * <listitem><para>
  *   The type is initially introduced (usually upon loading the module
@@ -42,13 +49,13 @@
  * </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>
@@ -65,22 +72,20 @@
  *    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 --- */

Modified: trunk/gobject/gvaluearray.c
==============================================================================
--- trunk/gobject/gvaluearray.c	(original)
+++ trunk/gobject/gvaluearray.c	Sun Jun 22 14:29:25 2008
@@ -16,26 +16,33 @@
  * 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.
+ *
+ * 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
- */
-
-#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 !! */

Modified: trunk/gobject/gvaluetransform.c
==============================================================================
--- trunk/gobject/gvaluetransform.c	(original)
+++ trunk/gobject/gvaluetransform.c	Sun Jun 22 14:29:25 2008
@@ -16,11 +16,15 @@
  * 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

Modified: trunk/gobject/gvaluetypes.c
==============================================================================
--- trunk/gobject/gvaluetypes.c	(original)
+++ trunk/gobject/gvaluetypes.c	Sun Jun 22 14:29:25 2008
@@ -21,18 +21,19 @@
  * 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 --- */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]