GObject: Convert docs to markdown

In particular, convert lists to markdown syntax.
This commit is contained in:
Matthias Clasen 2014-02-01 10:19:07 -05:00
parent c93c05faa3
commit 60b623d3fb
5 changed files with 72 additions and 150 deletions

View File

@ -71,22 +71,17 @@
* *
* Using closures has a number of important advantages over a simple * Using closures has a number of important advantages over a simple
* callback function/data pointer combination: * callback function/data pointer combination:
* <itemizedlist> *
* <listitem><para> * - Closures allow the callee to get the types of the callback parameters,
* Closures allow the callee to get the types of the callback parameters,
* which means that language bindings don't have to write individual glue * which means that language bindings don't have to write individual glue
* for each callback type. * for each callback type.
* </para></listitem> *
* <listitem><para> * - The reference counting of #GClosure makes it easy to handle reentrancy
* The reference counting of #GClosure makes it easy to handle reentrancy
* right; if a callback is removed while it is being invoked, the closure * right; if a callback is removed while it is being invoked, the closure
* and its parameters won't be freed until the invocation finishes. * and its parameters won't be freed until the invocation finishes.
* </para></listitem> *
* <listitem><para> * - g_closure_invalidate() and invalidation notifiers allow callbacks to be
* g_closure_invalidate() and invalidation notifiers allow callbacks to be
* automatically removed when the objects they point to go away. * automatically removed when the objects they point to go away.
* </para></listitem>
* </itemizedlist>
*/ */
#define CLOSURE_MAX_REF_COUNT ((1 << 15) - 1) #define CLOSURE_MAX_REF_COUNT ((1 << 15) - 1)

View File

@ -2399,63 +2399,14 @@ g_object_get_property (GObject *object,
* *
* The signal specs expected by this function have the form * The signal specs expected by this function have the form
* "modifier::signal_name", where modifier can be one of the following: * "modifier::signal_name", where modifier can be one of the following:
* <variablelist> * * - signal: equivalent to g_signal_connect_data (..., NULL, 0)
* <varlistentry> * - object-signal, object_signal: equivalent to g_signal_connect_object (..., 0)
* <term>signal</term> * - swapped-signal, swapped_signal: equivalent to g_signal_connect_data (..., NULL, G_CONNECT_SWAPPED)
* <listitem><para> * - swapped_object_signal, swapped-object-signal: equivalent to g_signal_connect_object (..., G_CONNECT_SWAPPED)
* equivalent to <literal>g_signal_connect_data (..., NULL, 0)</literal> * - signal_after, signal-after: equivalent to g_signal_connect_data (..., NULL, G_CONNECT_AFTER)
* </para></listitem> * - object_signal_after, object-signal-after: equivalent to g_signal_connect_object (..., G_CONNECT_AFTER)
* </varlistentry> * - swapped_signal_after, swapped-signal-after: equivalent to g_signal_connect_data (..., NULL, G_CONNECT_SWAPPED | G_CONNECT_AFTER)
* <varlistentry> * - swapped_object_signal_after, swapped-object-signal-after: equivalent to g_signal_connect_object (..., G_CONNECT_SWAPPED | G_CONNECT_AFTER)
* <term>object_signal</term>
* <term>object-signal</term>
* <listitem><para>
* equivalent to <literal>g_signal_connect_object (..., 0)</literal>
* </para></listitem>
* </varlistentry>
* <varlistentry>
* <term>swapped_signal</term>
* <term>swapped-signal</term>
* <listitem><para>
* equivalent to <literal>g_signal_connect_data (..., NULL, G_CONNECT_SWAPPED)</literal>
* </para></listitem>
* </varlistentry>
* <varlistentry>
* <term>swapped_object_signal</term>
* <term>swapped-object-signal</term>
* <listitem><para>
* equivalent to <literal>g_signal_connect_object (..., G_CONNECT_SWAPPED)</literal>
* </para></listitem>
* </varlistentry>
* <varlistentry>
* <term>signal_after</term>
* <term>signal-after</term>
* <listitem><para>
* equivalent to <literal>g_signal_connect_data (..., NULL, G_CONNECT_AFTER)</literal>
* </para></listitem>
* </varlistentry>
* <varlistentry>
* <term>object_signal_after</term>
* <term>object-signal-after</term>
* <listitem><para>
* equivalent to <literal>g_signal_connect_object (..., G_CONNECT_AFTER)</literal>
* </para></listitem>
* </varlistentry>
* <varlistentry>
* <term>swapped_signal_after</term>
* <term>swapped-signal-after</term>
* <listitem><para>
* equivalent to <literal>g_signal_connect_data (..., NULL, G_CONNECT_SWAPPED | G_CONNECT_AFTER)</literal>
* </para></listitem>
* </varlistentry>
* <varlistentry>
* <term>swapped_object_signal_after</term>
* <term>swapped-object-signal-after</term>
* <listitem><para>
* equivalent to <literal>g_signal_connect_object (..., G_CONNECT_SWAPPED | G_CONNECT_AFTER)</literal>
* </para></listitem>
* </varlistentry>
* </variablelist>
* *
* |[ * |[
* menu->toplevel = g_object_connect (g_object_new (GTK_TYPE_WINDOW, * menu->toplevel = g_object_connect (g_object_new (GTK_TYPE_WINDOW,

View File

@ -65,23 +65,18 @@
* certain signal on certain object instances. * certain signal on certain object instances.
* *
* A signal emission consists of five stages, unless prematurely stopped: * A signal emission consists of five stages, unless prematurely stopped:
* <variablelist> *
* <varlistentry><term></term><listitem><para> * 1. Invocation of the object method handler for %G_SIGNAL_RUN_FIRST signals
* 1 - Invocation of the object method handler for %G_SIGNAL_RUN_FIRST signals *
* </para></listitem></varlistentry> * 2. Invocation of normal user-provided signal handlers (where the @after
* <varlistentry><term></term><listitem><para> * flag is not set)
* 2 - Invocation of normal user-provided signal handlers (where the @after flag is not set) *
* </para></listitem></varlistentry> * 3. Invocation of the object method handler for %G_SIGNAL_RUN_LAST signals
* <varlistentry><term></term><listitem><para> *
* 3 - Invocation of the object method handler for %G_SIGNAL_RUN_LAST signals * 4. Invocation of user provided signal handlers (where the @after flag is set)
* </para></listitem></varlistentry> *
* <varlistentry><term></term><listitem><para> * 5. Invocation of the object method handler for %G_SIGNAL_RUN_CLEANUP signals
* 4 - Invocation of user provided signal handlers (where the @after flag is set)
* </para></listitem></varlistentry>
* <varlistentry><term></term><listitem><para>
* 5 - Invocation of the object method handler for %G_SIGNAL_RUN_CLEANUP signals
* </para></listitem></varlistentry>
* </variablelist>
* The user-provided signal handlers are called in the order they were * The user-provided signal handlers are called in the order they were
* connected in. * connected in.
* *

View File

@ -26,30 +26,20 @@
/** /**
* SECTION:gtypemodule * SECTION:gtypemodule
* @short_description: Type loading modules * @short_description: Type loading modules
* @see_also:<variablelist> * @see_also: #GTypePlugin, #GModule
* <varlistentry>
* <term>#GTypePlugin</term>
* <listitem><para>The abstract type loader interface.</para></listitem>
* </varlistentry>
* <varlistentry>
* <term>#GModule</term>
* <listitem><para>Portable mechanism for dynamically loaded modules.</para></listitem>
* </varlistentry>
* </variablelist>
* @title: GTypeModule * @title: GTypeModule
* *
* #GTypeModule provides a simple implementation of the #GTypePlugin * #GTypeModule provides a simple implementation of the #GTypePlugin
* interface. The model of #GTypeModule is a dynamically loaded module * interface. The model of #GTypeModule is a dynamically loaded module
* which implements some number of types and interface * which implements some number of types and interface implementations.
* implementations. When the module is loaded, it registers its types * When the module is loaded, it registers its types and interfaces
* and interfaces using g_type_module_register_type() and * using g_type_module_register_type() and g_type_module_add_interface().
* g_type_module_add_interface(). As long as any instances of these * As long as any instances of these types and interface implementations
* types and interface implementations are in use, the module is kept * are in use, the module is kept loaded. When the types and interfaces
* loaded. When the types and interfaces are gone, the module may be * are gone, the module may be unloaded. If the types and interfaces
* unloaded. If the types and interfaces become used again, the module * become used again, the module will be reloaded. Note that the last
* will be reloaded. Note that the last unref cannot happen in module * unref cannot happen in module code, since that would lead to the
* code, since that would lead to the caller's code being unloaded before * caller's code being unloaded before g_object_unref() returns to it.
* g_object_unref() returns to it.
* *
* Keeping track of whether the module should be loaded or not is done by * 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 * using a use count - it starts at zero, and whenever it is greater than

View File

@ -26,13 +26,11 @@
* @see_also: #GTypeModule and g_type_register_dynamic(). * @see_also: #GTypeModule and g_type_register_dynamic().
* @title: GTypePlugin * @title: GTypePlugin
* *
* The GObject type system supports dynamic loading of types. The * The GObject type system supports dynamic loading of types.
* #GTypePlugin interface is used to handle the lifecycle of * The #GTypePlugin interface is used to handle the lifecycle
* dynamically loaded types. It goes as follows: * of dynamically loaded types. It goes as follows:
* *
* <orderedlist> * 1. The type is initially introduced (usually upon loading the module
* <listitem><para>
* The type is initially introduced (usually upon loading the module
* the first time, or by your main application that knows what modules * the first time, or by your main application that knows what modules
* introduces what types), like this: * introduces what types), like this:
* |[ * |[
@ -41,34 +39,27 @@
* new_type_plugin, * new_type_plugin,
* type_flags); * type_flags);
* ]| * ]|
* where <literal>new_type_plugin</literal> is an implementation of the * where @new_type_plugin is an implementation of the
* #GTypePlugin interface. * #GTypePlugin interface.
* </para></listitem> *
* <listitem><para> * 2. The type's implementation is referenced, e.g. through
* The type's implementation is referenced, e.g. through
* g_type_class_ref() or through g_type_create_instance() (this is * 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 * being called by g_object_new()) or through one of the above done on
* a type derived from <literal>new_type_id</literal>. * a type derived from @new_type_id.
* </para></listitem> *
* <listitem><para> * 3. This causes the type system to load the type's implementation by
* This causes the type system to load the type's implementation by calling * calling g_type_plugin_use() and g_type_plugin_complete_type_info()
* g_type_plugin_use() and g_type_plugin_complete_type_info() on * on @new_type_plugin.
* <literal>new_type_plugin</literal>. *
* </para></listitem> * 4. At some point the type's implementation isn't required anymore,
* <listitem><para> * e.g. after g_type_class_unref() or g_type_free_instance() (called
* At some point the type's implementation isn't required anymore, e.g. after * when the reference count of an instance drops to zero).
* g_type_class_unref() or g_type_free_instance() (called when the reference *
* count of an instance drops to zero). * 5. This causes the type system to throw away the information retrieved
* </para></listitem> * from g_type_plugin_complete_type_info() and then it calls
* <listitem><para> * g_type_plugin_unuse() on @new_type_plugin.
* This causes the type system to throw away the information retrieved from *
* g_type_plugin_complete_type_info() and then it calls * 6. Things may repeat from the second step.
* g_type_plugin_unuse() 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 * So basically, you need to implement a #GTypePlugin type that
* carries a use_count, once use_count goes from zero to one, you need * carries a use_count, once use_count goes from zero to one, you need