mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 07:26:15 +01:00
remove trailing whitespace from newly added gtk-doc comments and
2008-06-22 Michael Natterer <mitch@imendio.com> * *.c: remove trailing whitespace from newly added gtk-doc comments and reformatted some where they contained overly long or ill-formatted lines. svn path=/trunk/; revision=7090
This commit is contained in:
parent
5602b7e275
commit
6347be5fb6
@ -1,3 +1,9 @@
|
|||||||
|
2008-06-22 Michael Natterer <mitch@imendio.com>
|
||||||
|
|
||||||
|
* *.c: remove trailing whitespace from newly added gtk-doc
|
||||||
|
comments and reformatted some where they contained overly long or
|
||||||
|
ill-formatted lines.
|
||||||
|
|
||||||
2008-06-22 Michael Natterer <mitch@imendio.com>
|
2008-06-22 Michael Natterer <mitch@imendio.com>
|
||||||
|
|
||||||
* *.c: moved includes back to the top of the files (before gtk-doc
|
* *.c: moved includes back to the top of the files (before gtk-doc
|
||||||
|
@ -32,8 +32,9 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:gboxed
|
* SECTION:gboxed
|
||||||
|
*
|
||||||
* @Short_description: A mechanism to wrap opaque C structures registered
|
* @Short_description: A mechanism to wrap opaque C structures registered
|
||||||
* by the type system
|
* by the type system
|
||||||
*
|
*
|
||||||
* @See_also: #GParamSpecBoxed, g_param_spec_boxed()
|
* @See_also: #GParamSpecBoxed, g_param_spec_boxed()
|
||||||
*
|
*
|
||||||
@ -558,9 +559,10 @@ g_value_get_boxed (const GValue *value)
|
|||||||
* g_value_dup_boxed:
|
* g_value_dup_boxed:
|
||||||
* @value: a valid #GValue of %G_TYPE_BOXED derived type
|
* @value: a valid #GValue of %G_TYPE_BOXED derived type
|
||||||
*
|
*
|
||||||
* Get the contents of a %G_TYPE_BOXED derived #GValue.
|
* Get the contents of a %G_TYPE_BOXED derived #GValue. Upon getting,
|
||||||
* Upon getting, the boxed value is duplicated and needs to be
|
* the boxed value is duplicated and needs to be later freed with
|
||||||
* later freed with g_boxed_free(), e.g. like: g_boxed_free (G_VALUE_TYPE (@value), return_value);
|
* g_boxed_free(), e.g. like: g_boxed_free (G_VALUE_TYPE (@value),
|
||||||
|
* return_value);
|
||||||
*
|
*
|
||||||
* Returns: boxed contents of @value
|
* Returns: boxed contents of @value
|
||||||
*/
|
*/
|
||||||
@ -673,8 +675,8 @@ g_value_set_boxed_take_ownership (GValue *value,
|
|||||||
* @value: a valid #GValue of %G_TYPE_BOXED derived type
|
* @value: a valid #GValue of %G_TYPE_BOXED derived type
|
||||||
* @v_boxed: duplicated unowned boxed value to be set
|
* @v_boxed: duplicated unowned boxed value to be set
|
||||||
*
|
*
|
||||||
* Sets the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed and
|
* Sets the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed
|
||||||
* takes over the ownership of the callers reference to @v_boxed;
|
* and takes over the ownership of the callers reference to @v_boxed;
|
||||||
* the caller doesn't have to unref it any more.
|
* the caller doesn't have to unref it any more.
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
|
@ -30,9 +30,12 @@
|
|||||||
#include "gvalue.h"
|
#include "gvalue.h"
|
||||||
#include "gobjectalias.h"
|
#include "gobjectalias.h"
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:gclosure
|
* SECTION:gclosure
|
||||||
|
*
|
||||||
* @Short_description: Functions as first-class objects
|
* @Short_description: Functions as first-class objects
|
||||||
|
*
|
||||||
* @Title: Closures
|
* @Title: Closures
|
||||||
*
|
*
|
||||||
* A #GClosure represents a callback supplied by the programmer. It
|
* A #GClosure represents a callback supplied by the programmer. It
|
||||||
@ -84,6 +87,7 @@
|
|||||||
* </itemizedlist>
|
* </itemizedlist>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#define CLOSURE_MAX_REF_COUNT ((1 << 15) - 1)
|
#define CLOSURE_MAX_REF_COUNT ((1 << 15) - 1)
|
||||||
#define CLOSURE_MAX_N_GUARDS ((1 << 1) - 1)
|
#define CLOSURE_MAX_N_GUARDS ((1 << 1) - 1)
|
||||||
#define CLOSURE_MAX_N_FNOTIFIERS ((1 << 2) - 1)
|
#define CLOSURE_MAX_N_FNOTIFIERS ((1 << 2) - 1)
|
||||||
@ -145,12 +149,12 @@ enum {
|
|||||||
/**
|
/**
|
||||||
* g_closure_new_simple:
|
* g_closure_new_simple:
|
||||||
* @sizeof_closure: the size of the structure to allocate, must be at least
|
* @sizeof_closure: the size of the structure to allocate, must be at least
|
||||||
* <literal>sizeof (GClosure)</literal>
|
* <literal>sizeof (GClosure)</literal>
|
||||||
* @data: data to store in the @data field of the newly allocated #GClosure
|
* @data: data to store in the @data field of the newly allocated #GClosure
|
||||||
*
|
*
|
||||||
* Allocates a struct of the given size and initializes the initial part
|
* Allocates a struct of the given size and initializes the initial
|
||||||
* as a #GClosure. This function is mainly useful when implementing new types
|
* part as a #GClosure. This function is mainly useful when
|
||||||
* of closures.
|
* implementing new types of closures.
|
||||||
*
|
*
|
||||||
* |[
|
* |[
|
||||||
* typedef struct _MyClosure MyClosure;
|
* typedef struct _MyClosure MyClosure;
|
||||||
@ -297,19 +301,21 @@ closure_invoke_notifiers (GClosure *closure,
|
|||||||
* @marshal_data: context-dependent data to pass to @meta_marshal
|
* @marshal_data: context-dependent data to pass to @meta_marshal
|
||||||
* @meta_marshal: a #GClosureMarshal function
|
* @meta_marshal: a #GClosureMarshal function
|
||||||
*
|
*
|
||||||
* Sets the meta marshaller of @closure.
|
* Sets the meta marshaller of @closure. A meta marshaller wraps
|
||||||
* A meta marshaller wraps @closure->marshal and modifies the way it is called
|
* @closure->marshal and modifies the way it is called in some
|
||||||
* in some fashion. The most common use of this facility is for C callbacks.
|
* fashion. The most common use of this facility is for C callbacks.
|
||||||
* The same marshallers (generated by
|
* The same marshallers (generated by <link
|
||||||
* <link linkend="glib-genmarshal">glib-genmarshal</link>) are used everywhere,
|
* linkend="glib-genmarshal">glib-genmarshal</link>) are used
|
||||||
* but the way that we get the callback function differs. In most cases we want
|
* everywhere, but the way that we get the callback function
|
||||||
* to use @closure->callback, but in other cases we want to use some
|
* differs. In most cases we want to use @closure->callback, but in
|
||||||
* different technique to retrieve the callback function.
|
* other cases we want to use some different technique to retrieve the
|
||||||
|
* callback function.
|
||||||
*
|
*
|
||||||
* For example, class closures for signals (see g_signal_type_cclosure_new())
|
* For example, class closures for signals (see
|
||||||
* retrieve the callback function from a fixed offset in the class structure.
|
* g_signal_type_cclosure_new()) retrieve the callback function from a
|
||||||
* The meta marshaller retrieves the right callback and passes it to the
|
* fixed offset in the class structure. The meta marshaller retrieves
|
||||||
* marshaller as the @marshal_data argument.
|
* the right callback and passes it to the marshaller as the
|
||||||
|
* @marshal_data argument.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
g_closure_set_meta_marshal (GClosure *closure,
|
g_closure_set_meta_marshal (GClosure *closure,
|
||||||
@ -347,10 +353,10 @@ g_closure_set_meta_marshal (GClosure *closure,
|
|||||||
* @post_marshal_data: data to pass to @post_marshal_notify
|
* @post_marshal_data: data to pass to @post_marshal_notify
|
||||||
* @post_marshal_notify: a function to call after the closure callback
|
* @post_marshal_notify: a function to call after the closure callback
|
||||||
*
|
*
|
||||||
* Adds a pair of notifiers which get invoked before and after the closure
|
* Adds a pair of notifiers which get invoked before and after the
|
||||||
* callback, respectively. This is typically used to protect the extra arguments
|
* closure callback, respectively. This is typically used to protect
|
||||||
* for the duration of the callback. See g_object_watch_closure() for an
|
* the extra arguments for the duration of the callback. See
|
||||||
* example of marshal guards.
|
* g_object_watch_closure() for an example of marshal guards.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
g_closure_add_marshal_guards (GClosure *closure,
|
g_closure_add_marshal_guards (GClosure *closure,
|
||||||
@ -403,12 +409,12 @@ g_closure_add_marshal_guards (GClosure *closure,
|
|||||||
* @notify_data: data to pass to @notify_func
|
* @notify_data: data to pass to @notify_func
|
||||||
* @notify_func: the callback function to register
|
* @notify_func: the callback function to register
|
||||||
*
|
*
|
||||||
* Registers a finalization notifier which will be called when the reference
|
* Registers a finalization notifier which will be called when the
|
||||||
* count of @closure goes down to 0. Multiple finalization notifiers on a
|
* reference count of @closure goes down to 0. Multiple finalization
|
||||||
* single closure are invoked in unspecified order. If a single call to
|
* notifiers on a single closure are invoked in unspecified order. If
|
||||||
* g_closure_unref() results in the closure being both invalidated and
|
* a single call to g_closure_unref() results in the closure being
|
||||||
* finalized, then the invalidate notifiers will be run before the finalize
|
* both invalidated and finalized, then the invalidate notifiers will
|
||||||
* notifiers.
|
* be run before the finalize notifiers.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
g_closure_add_finalize_notifier (GClosure *closure,
|
g_closure_add_finalize_notifier (GClosure *closure,
|
||||||
@ -439,9 +445,10 @@ g_closure_add_finalize_notifier (GClosure *closure,
|
|||||||
* @notify_data: data to pass to @notify_func
|
* @notify_data: data to pass to @notify_func
|
||||||
* @notify_func: the callback function to register
|
* @notify_func: the callback function to register
|
||||||
*
|
*
|
||||||
* Registers an invalidation notifier which will be called when the @closure
|
* Registers an invalidation notifier which will be called when the
|
||||||
* is invalidated with g_closure_invalidate(). Invalidation notifiers are
|
* @closure is invalidated with g_closure_invalidate(). Invalidation
|
||||||
* invoked before finalization notifiers, in an unspecified order.
|
* notifiers are invoked before finalization notifiers, in an
|
||||||
|
* unspecified order.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
g_closure_add_invalidate_notifier (GClosure *closure,
|
g_closure_add_invalidate_notifier (GClosure *closure,
|
||||||
@ -533,17 +540,19 @@ g_closure_ref (GClosure *closure)
|
|||||||
* g_closure_invalidate:
|
* g_closure_invalidate:
|
||||||
* @closure: GClosure to invalidate
|
* @closure: GClosure to invalidate
|
||||||
*
|
*
|
||||||
* Sets a flag on the closure to indicate that it's calling environment has
|
* Sets a flag on the closure to indicate that it's calling
|
||||||
* become invalid, and thus causes any future invocations of g_closure_invoke()
|
* environment has become invalid, and thus causes any future
|
||||||
* on this @closure to be ignored. Also, invalidation notifiers installed on
|
* invocations of g_closure_invoke() on this @closure to be
|
||||||
* the closure will be called at this point. Note that unless you are holding
|
* ignored. Also, invalidation notifiers installed on the closure will
|
||||||
* a reference to the closure yourself, the invalidation notifiers may unref
|
* be called at this point. Note that unless you are holding a
|
||||||
* the closure and cause it to be destroyed, so if you need to access the
|
* reference to the closure yourself, the invalidation notifiers may
|
||||||
* closure after calling g_closure_invalidate(), make sure that you've
|
* unref the closure and cause it to be destroyed, so if you need to
|
||||||
* previously called g_closure_ref().
|
* access the closure after calling g_closure_invalidate(), make sure
|
||||||
|
* that you've previously called g_closure_ref().
|
||||||
*
|
*
|
||||||
* Note that g_closure_invalidate() will also be called when the reference count
|
* Note that g_closure_invalidate() will also be called when the
|
||||||
* of a closure drops to zero (unless it has already been invalidated before).
|
* reference count of a closure drops to zero (unless it has already
|
||||||
|
* been invalidated before).
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
g_closure_invalidate (GClosure *closure)
|
g_closure_invalidate (GClosure *closure)
|
||||||
@ -567,8 +576,8 @@ g_closure_invalidate (GClosure *closure)
|
|||||||
* @closure: #GClosure to decrement the reference count on
|
* @closure: #GClosure to decrement the reference count on
|
||||||
*
|
*
|
||||||
* Decrements the reference count of a closure after it was previously
|
* Decrements the reference count of a closure after it was previously
|
||||||
* incremented by the same caller. If no other callers are using the closure,
|
* incremented by the same caller. If no other callers are using the
|
||||||
* then the closure will be destroyed and freed.
|
* closure, then the closure will be destroyed and freed.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
g_closure_unref (GClosure *closure)
|
g_closure_unref (GClosure *closure)
|
||||||
@ -594,15 +603,16 @@ g_closure_unref (GClosure *closure)
|
|||||||
/**
|
/**
|
||||||
* g_closure_sink:
|
* g_closure_sink:
|
||||||
* @closure: #GClosure to decrement the initial reference count on, if it's
|
* @closure: #GClosure to decrement the initial reference count on, if it's
|
||||||
* still being held
|
* still being held
|
||||||
*
|
*
|
||||||
* Takes over the initial ownership of a closure.
|
* Takes over the initial ownership of a closure. Each closure is
|
||||||
* Each closure is initially created in a <firstterm>floating</firstterm> state,
|
* initially created in a <firstterm>floating</firstterm> state, which
|
||||||
* which means that the initial reference count is not owned by any caller.
|
* means that the initial reference count is not owned by any caller.
|
||||||
* g_closure_sink() checks to see if the object is still floating, and if so,
|
* g_closure_sink() checks to see if the object is still floating, and
|
||||||
* unsets the floating state and decreases the reference count. If the closure
|
* if so, unsets the floating state and decreases the reference
|
||||||
* is not floating, g_closure_sink() does nothing. The reason for the existance
|
* count. If the closure is not floating, g_closure_sink() does
|
||||||
* of the floating state is to prevent cumbersome code sequences like:
|
* nothing. The reason for the existance of the floating state is to
|
||||||
|
* prevent cumbersome code sequences like:
|
||||||
* |[
|
* |[
|
||||||
* closure = g_cclosure_new (cb_func, cb_data);
|
* closure = g_cclosure_new (cb_func, cb_data);
|
||||||
* g_source_set_closure (source, closure);
|
* g_source_set_closure (source, closure);
|
||||||
@ -661,12 +671,11 @@ g_closure_sink (GClosure *closure)
|
|||||||
* g_closure_remove_invalidate_notifier:
|
* g_closure_remove_invalidate_notifier:
|
||||||
* @closure: a #GClosure
|
* @closure: a #GClosure
|
||||||
* @notify_data: data which was passed to g_closure_add_invalidate_notifier()
|
* @notify_data: data which was passed to g_closure_add_invalidate_notifier()
|
||||||
* when registering @notify_func
|
* when registering @notify_func
|
||||||
* @notify_func: the callback function to remove
|
* @notify_func: the callback function to remove
|
||||||
*
|
*
|
||||||
* Removes an invalidation notifier.
|
* Removes an invalidation notifier.
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* Notice that notifiers are automatically removed after they are run.
|
* Notice that notifiers are automatically removed after they are run.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
@ -718,10 +727,10 @@ g_closure_remove_finalize_notifier (GClosure *closure,
|
|||||||
* g_closure_invoke:
|
* g_closure_invoke:
|
||||||
* @closure: a #GClosure
|
* @closure: a #GClosure
|
||||||
* @return_value: a #GValue to store the return value. May be %NULL if the
|
* @return_value: a #GValue to store the return value. May be %NULL if the
|
||||||
* callback of @closure doesn't return a value.
|
* callback of @closure doesn't return a value.
|
||||||
* @n_param_values: the length of the @param_values array
|
* @n_param_values: the length of the @param_values array
|
||||||
* @param_values: an array of #GValue<!-- -->s holding the arguments on
|
* @param_values: an array of #GValue<!-- -->s holding the arguments on
|
||||||
* which to invoke the callback of @closure
|
* which to invoke the callback of @closure
|
||||||
* @invocation_hint: a context-dependent invocation hint
|
* @invocation_hint: a context-dependent invocation hint
|
||||||
*
|
*
|
||||||
* Invokes the closure, i.e. executes the callback represented by the @closure.
|
* Invokes the closure, i.e. executes the callback represented by the @closure.
|
||||||
@ -942,6 +951,7 @@ g_signal_type_cclosure_new (GType itype,
|
|||||||
* A marshaller for a #GCClosure with a callback of type
|
* A marshaller for a #GCClosure with a callback of type
|
||||||
* <literal>void (*callback) (gpointer instance, gpointer user_data)</literal>.
|
* <literal>void (*callback) (gpointer instance, gpointer user_data)</literal>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_cclosure_marshal_VOID__BOOLEAN:
|
* g_cclosure_marshal_VOID__BOOLEAN:
|
||||||
* @closure: the #GClosure to which the marshaller belongs
|
* @closure: the #GClosure to which the marshaller belongs
|
||||||
@ -955,6 +965,7 @@ g_signal_type_cclosure_new (GType itype,
|
|||||||
* A marshaller for a #GCClosure with a callback of type
|
* A marshaller for a #GCClosure with a callback of type
|
||||||
* <literal>void (*callback) (gpointer instance, gboolean arg1, gpointer user_data)</literal>.
|
* <literal>void (*callback) (gpointer instance, gboolean arg1, gpointer user_data)</literal>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_cclosure_marshal_VOID__CHAR:
|
* g_cclosure_marshal_VOID__CHAR:
|
||||||
* @closure: the #GClosure to which the marshaller belongs
|
* @closure: the #GClosure to which the marshaller belongs
|
||||||
@ -968,6 +979,7 @@ g_signal_type_cclosure_new (GType itype,
|
|||||||
* A marshaller for a #GCClosure with a callback of type
|
* A marshaller for a #GCClosure with a callback of type
|
||||||
* <literal>void (*callback) (gpointer instance, gchar arg1, gpointer user_data)</literal>.
|
* <literal>void (*callback) (gpointer instance, gchar arg1, gpointer user_data)</literal>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_cclosure_marshal_VOID__UCHAR:
|
* g_cclosure_marshal_VOID__UCHAR:
|
||||||
* @closure: the #GClosure to which the marshaller belongs
|
* @closure: the #GClosure to which the marshaller belongs
|
||||||
@ -981,6 +993,7 @@ g_signal_type_cclosure_new (GType itype,
|
|||||||
* A marshaller for a #GCClosure with a callback of type
|
* A marshaller for a #GCClosure with a callback of type
|
||||||
* <literal>void (*callback) (gpointer instance, guchar arg1, gpointer user_data)</literal>.
|
* <literal>void (*callback) (gpointer instance, guchar arg1, gpointer user_data)</literal>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_cclosure_marshal_VOID__INT:
|
* g_cclosure_marshal_VOID__INT:
|
||||||
* @closure: the #GClosure to which the marshaller belongs
|
* @closure: the #GClosure to which the marshaller belongs
|
||||||
@ -994,6 +1007,7 @@ g_signal_type_cclosure_new (GType itype,
|
|||||||
* A marshaller for a #GCClosure with a callback of type
|
* A marshaller for a #GCClosure with a callback of type
|
||||||
* <literal>void (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal>.
|
* <literal>void (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_cclosure_marshal_VOID__UINT:
|
* g_cclosure_marshal_VOID__UINT:
|
||||||
* @closure: the #GClosure to which the marshaller belongs
|
* @closure: the #GClosure to which the marshaller belongs
|
||||||
@ -1007,6 +1021,7 @@ g_signal_type_cclosure_new (GType itype,
|
|||||||
* A marshaller for a #GCClosure with a callback of type
|
* A marshaller for a #GCClosure with a callback of type
|
||||||
* <literal>void (*callback) (gpointer instance, guint arg1, gpointer user_data)</literal>.
|
* <literal>void (*callback) (gpointer instance, guint arg1, gpointer user_data)</literal>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_cclosure_marshal_VOID__LONG:
|
* g_cclosure_marshal_VOID__LONG:
|
||||||
* @closure: the #GClosure to which the marshaller belongs
|
* @closure: the #GClosure to which the marshaller belongs
|
||||||
@ -1020,6 +1035,7 @@ g_signal_type_cclosure_new (GType itype,
|
|||||||
* A marshaller for a #GCClosure with a callback of type
|
* A marshaller for a #GCClosure with a callback of type
|
||||||
* <literal>void (*callback) (gpointer instance, glong arg1, gpointer user_data)</literal>.
|
* <literal>void (*callback) (gpointer instance, glong arg1, gpointer user_data)</literal>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_cclosure_marshal_VOID__ULONG:
|
* g_cclosure_marshal_VOID__ULONG:
|
||||||
* @closure: the #GClosure to which the marshaller belongs
|
* @closure: the #GClosure to which the marshaller belongs
|
||||||
@ -1033,6 +1049,7 @@ g_signal_type_cclosure_new (GType itype,
|
|||||||
* A marshaller for a #GCClosure with a callback of type
|
* A marshaller for a #GCClosure with a callback of type
|
||||||
* <literal>void (*callback) (gpointer instance, gulong arg1, gpointer user_data)</literal>.
|
* <literal>void (*callback) (gpointer instance, gulong arg1, gpointer user_data)</literal>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_cclosure_marshal_VOID__ENUM:
|
* g_cclosure_marshal_VOID__ENUM:
|
||||||
* @closure: the #GClosure to which the marshaller belongs
|
* @closure: the #GClosure to which the marshaller belongs
|
||||||
@ -1046,6 +1063,7 @@ g_signal_type_cclosure_new (GType itype,
|
|||||||
* A marshaller for a #GCClosure with a callback of type
|
* A marshaller for a #GCClosure with a callback of type
|
||||||
* <literal>void (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal> where the #gint parameter denotes an enumeration type..
|
* <literal>void (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal> where the #gint parameter denotes an enumeration type..
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_cclosure_marshal_VOID__FLAGS:
|
* g_cclosure_marshal_VOID__FLAGS:
|
||||||
* @closure: the #GClosure to which the marshaller belongs
|
* @closure: the #GClosure to which the marshaller belongs
|
||||||
@ -1059,6 +1077,7 @@ g_signal_type_cclosure_new (GType itype,
|
|||||||
* A marshaller for a #GCClosure with a callback of type
|
* A marshaller for a #GCClosure with a callback of type
|
||||||
* <literal>void (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal> where the #gint parameter denotes a flags type.
|
* <literal>void (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal> where the #gint parameter denotes a flags type.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_cclosure_marshal_VOID__FLOAT:
|
* g_cclosure_marshal_VOID__FLOAT:
|
||||||
* @closure: the #GClosure to which the marshaller belongs
|
* @closure: the #GClosure to which the marshaller belongs
|
||||||
@ -1072,6 +1091,7 @@ g_signal_type_cclosure_new (GType itype,
|
|||||||
* A marshaller for a #GCClosure with a callback of type
|
* A marshaller for a #GCClosure with a callback of type
|
||||||
* <literal>void (*callback) (gpointer instance, gfloat arg1, gpointer user_data)</literal>.
|
* <literal>void (*callback) (gpointer instance, gfloat arg1, gpointer user_data)</literal>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_cclosure_marshal_VOID__DOUBLE:
|
* g_cclosure_marshal_VOID__DOUBLE:
|
||||||
* @closure: the #GClosure to which the marshaller belongs
|
* @closure: the #GClosure to which the marshaller belongs
|
||||||
@ -1085,6 +1105,7 @@ g_signal_type_cclosure_new (GType itype,
|
|||||||
* A marshaller for a #GCClosure with a callback of type
|
* A marshaller for a #GCClosure with a callback of type
|
||||||
* <literal>void (*callback) (gpointer instance, gdouble arg1, gpointer user_data)</literal>.
|
* <literal>void (*callback) (gpointer instance, gdouble arg1, gpointer user_data)</literal>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_cclosure_marshal_VOID__STRING:
|
* g_cclosure_marshal_VOID__STRING:
|
||||||
* @closure: the #GClosure to which the marshaller belongs
|
* @closure: the #GClosure to which the marshaller belongs
|
||||||
@ -1098,6 +1119,7 @@ g_signal_type_cclosure_new (GType itype,
|
|||||||
* A marshaller for a #GCClosure with a callback of type
|
* A marshaller for a #GCClosure with a callback of type
|
||||||
* <literal>void (*callback) (gpointer instance, const gchar *arg1, gpointer user_data)</literal>.
|
* <literal>void (*callback) (gpointer instance, const gchar *arg1, gpointer user_data)</literal>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_cclosure_marshal_VOID__PARAM:
|
* g_cclosure_marshal_VOID__PARAM:
|
||||||
* @closure: the #GClosure to which the marshaller belongs
|
* @closure: the #GClosure to which the marshaller belongs
|
||||||
@ -1111,6 +1133,7 @@ g_signal_type_cclosure_new (GType itype,
|
|||||||
* A marshaller for a #GCClosure with a callback of type
|
* A marshaller for a #GCClosure with a callback of type
|
||||||
* <literal>void (*callback) (gpointer instance, GParamSpec *arg1, gpointer user_data)</literal>.
|
* <literal>void (*callback) (gpointer instance, GParamSpec *arg1, gpointer user_data)</literal>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_cclosure_marshal_VOID__BOXED:
|
* g_cclosure_marshal_VOID__BOXED:
|
||||||
* @closure: the #GClosure to which the marshaller belongs
|
* @closure: the #GClosure to which the marshaller belongs
|
||||||
@ -1124,6 +1147,7 @@ g_signal_type_cclosure_new (GType itype,
|
|||||||
* A marshaller for a #GCClosure with a callback of type
|
* A marshaller for a #GCClosure with a callback of type
|
||||||
* <literal>void (*callback) (gpointer instance, GBoxed *arg1, gpointer user_data)</literal>.
|
* <literal>void (*callback) (gpointer instance, GBoxed *arg1, gpointer user_data)</literal>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_cclosure_marshal_VOID__POINTER:
|
* g_cclosure_marshal_VOID__POINTER:
|
||||||
* @closure: the #GClosure to which the marshaller belongs
|
* @closure: the #GClosure to which the marshaller belongs
|
||||||
@ -1137,6 +1161,7 @@ g_signal_type_cclosure_new (GType itype,
|
|||||||
* A marshaller for a #GCClosure with a callback of type
|
* A marshaller for a #GCClosure with a callback of type
|
||||||
* <literal>void (*callback) (gpointer instance, gpointer arg1, gpointer user_data)</literal>.
|
* <literal>void (*callback) (gpointer instance, gpointer arg1, gpointer user_data)</literal>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_cclosure_marshal_VOID__OBJECT:
|
* g_cclosure_marshal_VOID__OBJECT:
|
||||||
* @closure: the #GClosure to which the marshaller belongs
|
* @closure: the #GClosure to which the marshaller belongs
|
||||||
@ -1150,6 +1175,7 @@ g_signal_type_cclosure_new (GType itype,
|
|||||||
* A marshaller for a #GCClosure with a callback of type
|
* A marshaller for a #GCClosure with a callback of type
|
||||||
* <literal>void (*callback) (gpointer instance, GOBject *arg1, gpointer user_data)</literal>.
|
* <literal>void (*callback) (gpointer instance, GOBject *arg1, gpointer user_data)</literal>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_cclosure_marshal_VOID__UINT_POINTER:
|
* g_cclosure_marshal_VOID__UINT_POINTER:
|
||||||
* @closure: the #GClosure to which the marshaller belongs
|
* @closure: the #GClosure to which the marshaller belongs
|
||||||
@ -1163,6 +1189,7 @@ g_signal_type_cclosure_new (GType itype,
|
|||||||
* A marshaller for a #GCClosure with a callback of type
|
* A marshaller for a #GCClosure with a callback of type
|
||||||
* <literal>void (*callback) (gpointer instance, guint arg1, gpointer arg2, gpointer user_data)</literal>.
|
* <literal>void (*callback) (gpointer instance, guint arg1, gpointer arg2, gpointer user_data)</literal>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_cclosure_marshal_BOOLEAN__FLAGS:
|
* g_cclosure_marshal_BOOLEAN__FLAGS:
|
||||||
* @closure: the #GClosure to which the marshaller belongs
|
* @closure: the #GClosure to which the marshaller belongs
|
||||||
@ -1177,6 +1204,7 @@ g_signal_type_cclosure_new (GType itype,
|
|||||||
* <literal>gboolean (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal> where the #gint parameter
|
* <literal>gboolean (*callback) (gpointer instance, gint arg1, gpointer user_data)</literal> where the #gint parameter
|
||||||
* denotes a flags type.
|
* denotes a flags type.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_cclosure_marshal_BOOL__FLAGS:
|
* g_cclosure_marshal_BOOL__FLAGS:
|
||||||
*
|
*
|
||||||
|
@ -177,8 +177,9 @@ value_flags_enum_lcopy_value (const GValue *value,
|
|||||||
*
|
*
|
||||||
* Registers a new static enumeration type with the name @name.
|
* Registers a new static enumeration type with the name @name.
|
||||||
*
|
*
|
||||||
* It is normally more convenient to let <link linkend="glib-mkenums">glib-mkenums</link>
|
* It is normally more convenient to let <link
|
||||||
* generate a my_enum_get_type() function from a usual C enumeration definition
|
* linkend="glib-mkenums">glib-mkenums</link> generate a
|
||||||
|
* my_enum_get_type() function from a usual C enumeration definition
|
||||||
* than to write one yourself using g_enum_register_static().
|
* than to write one yourself using g_enum_register_static().
|
||||||
*
|
*
|
||||||
* Returns: The new type identifier.
|
* Returns: The new type identifier.
|
||||||
@ -220,8 +221,9 @@ g_enum_register_static (const gchar *name,
|
|||||||
*
|
*
|
||||||
* Registers a new static flags type with the name @name.
|
* Registers a new static flags type with the name @name.
|
||||||
*
|
*
|
||||||
* It is normally more convenient to let <link linkend="glib-mkenums">glib-mkenums</link>
|
* It is normally more convenient to let <link
|
||||||
* generate a my_flags_get_type() function from a usual C enumeration definition
|
* linkend="glib-mkenums">glib-mkenums</link> generate a
|
||||||
|
* my_flags_get_type() function from a usual C enumeration definition
|
||||||
* than to write one yourself using g_flags_register_static().
|
* than to write one yourself using g_flags_register_static().
|
||||||
*
|
*
|
||||||
* Returns: The new type identifier.
|
* Returns: The new type identifier.
|
||||||
@ -262,8 +264,9 @@ g_flags_register_static (const gchar *name,
|
|||||||
* enumeration values. The array is terminated by a struct with all
|
* enumeration values. The array is terminated by a struct with all
|
||||||
* members being 0.
|
* members being 0.
|
||||||
*
|
*
|
||||||
* This function is meant to be called from the complete_type_info() function
|
* This function is meant to be called from the complete_type_info()
|
||||||
* of a #GTypePlugin implementation, as in the following example:
|
* function of a #GTypePlugin implementation, as in the following
|
||||||
|
* example:
|
||||||
*
|
*
|
||||||
* |[
|
* |[
|
||||||
* static void
|
* static void
|
||||||
@ -307,8 +310,8 @@ g_enum_complete_type_info (GType g_enum_type,
|
|||||||
* enumeration values. The array is terminated by a struct with all
|
* enumeration values. The array is terminated by a struct with all
|
||||||
* members being 0.
|
* members being 0.
|
||||||
*
|
*
|
||||||
* This function is meant to be called from the complete_type_info() function
|
* This function is meant to be called from the complete_type_info()
|
||||||
* of a #GTypePlugin implementation, see the example for
|
* function of a #GTypePlugin implementation, see the example for
|
||||||
* g_enum_complete_type_info() above.
|
* g_enum_complete_type_info() above.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
@ -383,8 +386,8 @@ g_flags_class_init (GFlagsClass *class,
|
|||||||
*
|
*
|
||||||
* Looks up a #GEnumValue by name.
|
* Looks up a #GEnumValue by name.
|
||||||
*
|
*
|
||||||
* Returns: the #GEnumValue with name @name, or %NULL if the enumeration doesn'
|
* Returns: the #GEnumValue with name @name, or %NULL if the
|
||||||
* t have a member with that name
|
* enumeration doesn't have a member with that name
|
||||||
*/
|
*/
|
||||||
GEnumValue*
|
GEnumValue*
|
||||||
g_enum_get_value_by_name (GEnumClass *enum_class,
|
g_enum_get_value_by_name (GEnumClass *enum_class,
|
||||||
@ -412,8 +415,8 @@ g_enum_get_value_by_name (GEnumClass *enum_class,
|
|||||||
*
|
*
|
||||||
* Looks up a #GFlagsValue by name.
|
* Looks up a #GFlagsValue by name.
|
||||||
*
|
*
|
||||||
* Returns: the #GFlagsValue with name @name, or %NULL if there is no flag with
|
* Returns: the #GFlagsValue with name @name, or %NULL if there is no
|
||||||
* that name
|
* flag with that name
|
||||||
*/
|
*/
|
||||||
GFlagsValue*
|
GFlagsValue*
|
||||||
g_flags_get_value_by_name (GFlagsClass *flags_class,
|
g_flags_get_value_by_name (GFlagsClass *flags_class,
|
||||||
@ -441,8 +444,8 @@ g_flags_get_value_by_name (GFlagsClass *flags_class,
|
|||||||
*
|
*
|
||||||
* Looks up a #GEnumValue by nickname.
|
* Looks up a #GEnumValue by nickname.
|
||||||
*
|
*
|
||||||
* Returns: the #GEnumValue with nickname @nick, or %NULL if the enumeration doesn'
|
* Returns: the #GEnumValue with nickname @nick, or %NULL if the
|
||||||
* t have a member with that nickname
|
* enumeration doesn't have a member with that nickname
|
||||||
*/
|
*/
|
||||||
GEnumValue*
|
GEnumValue*
|
||||||
g_enum_get_value_by_nick (GEnumClass *enum_class,
|
g_enum_get_value_by_nick (GEnumClass *enum_class,
|
||||||
@ -470,8 +473,8 @@ g_enum_get_value_by_nick (GEnumClass *enum_class,
|
|||||||
*
|
*
|
||||||
* Looks up a #GFlagsValue by nickname.
|
* Looks up a #GFlagsValue by nickname.
|
||||||
*
|
*
|
||||||
* Returns: the #GFlagsValue with nickname @nick, or %NULL if there is no flag
|
* Returns: the #GFlagsValue with nickname @nick, or %NULL if there is
|
||||||
* with that nickname
|
* no flag with that nickname
|
||||||
*/
|
*/
|
||||||
GFlagsValue*
|
GFlagsValue*
|
||||||
g_flags_get_value_by_nick (GFlagsClass *flags_class,
|
g_flags_get_value_by_nick (GFlagsClass *flags_class,
|
||||||
@ -499,8 +502,8 @@ g_flags_get_value_by_nick (GFlagsClass *flags_class,
|
|||||||
*
|
*
|
||||||
* Returns the #GEnumValue for a value.
|
* Returns the #GEnumValue for a value.
|
||||||
*
|
*
|
||||||
* Returns: the #GEnumValue for @value, or %NULL if @value is not
|
* Returns: the #GEnumValue for @value, or %NULL if @value is not a
|
||||||
* a member of the enumeration
|
* member of the enumeration
|
||||||
*/
|
*/
|
||||||
GEnumValue*
|
GEnumValue*
|
||||||
g_enum_get_value (GEnumClass *enum_class,
|
g_enum_get_value (GEnumClass *enum_class,
|
||||||
@ -527,7 +530,8 @@ g_enum_get_value (GEnumClass *enum_class,
|
|||||||
*
|
*
|
||||||
* Returns the first #GFlagsValue which is set in @value.
|
* Returns the first #GFlagsValue which is set in @value.
|
||||||
*
|
*
|
||||||
* Returns: the first #GFlagsValue which is set in @value, or %NULL if none is set
|
* Returns: the first #GFlagsValue which is set in @value, or %NULL if
|
||||||
|
* none is set
|
||||||
*/
|
*/
|
||||||
GFlagsValue*
|
GFlagsValue*
|
||||||
g_flags_get_first_value (GFlagsClass *flags_class,
|
g_flags_get_first_value (GFlagsClass *flags_class,
|
||||||
|
@ -41,8 +41,11 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:objects
|
* SECTION:objects
|
||||||
|
*
|
||||||
* @Short_description: The base object type
|
* @Short_description: The base object type
|
||||||
|
*
|
||||||
* @See_also:#GParamSpecObject, g_param_spec_object()
|
* @See_also:#GParamSpecObject, g_param_spec_object()
|
||||||
|
*
|
||||||
* @Title: The Base Object Type
|
* @Title: The Base Object Type
|
||||||
*
|
*
|
||||||
* GObject is the fundamental type providing the common attributes and
|
* GObject is the fundamental type providing the common attributes and
|
||||||
@ -198,6 +201,7 @@ G_LOCK_DEFINE_STATIC (debug_objects);
|
|||||||
static volatile GObject *g_trap_object_ref = NULL;
|
static volatile GObject *g_trap_object_ref = NULL;
|
||||||
static guint debug_objects_count = 0;
|
static guint debug_objects_count = 0;
|
||||||
static GHashTable *debug_objects_ht = NULL;
|
static GHashTable *debug_objects_ht = NULL;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
debug_objects_foreach (gpointer key,
|
debug_objects_foreach (gpointer key,
|
||||||
gpointer value,
|
gpointer value,
|
||||||
@ -210,6 +214,7 @@ debug_objects_foreach (gpointer key,
|
|||||||
G_OBJECT_TYPE_NAME (object),
|
G_OBJECT_TYPE_NAME (object),
|
||||||
object->ref_count);
|
object->ref_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
debug_objects_atexit (void)
|
debug_objects_atexit (void)
|
||||||
{
|
{
|
||||||
@ -338,10 +343,11 @@ g_object_do_class_init (GObjectClass *class)
|
|||||||
* @pspec: the #GParamSpec of the property which changed
|
* @pspec: the #GParamSpec of the property which changed
|
||||||
* @gobject: the object which received the signal.
|
* @gobject: the object which received the signal.
|
||||||
*
|
*
|
||||||
* The notify signal is emitted on an object when one of its properties
|
* The notify signal is emitted on an object when one of its
|
||||||
* has been changed. Note that getting this signal doesn't guarantee that the
|
* properties has been changed. Note that getting this signal
|
||||||
* value of the property has actually changed, it may also be emitted when
|
* doesn't guarantee that the value of the property has actually
|
||||||
* the setter for the property is called to reinstate the previous value.
|
* changed, it may also be emitted when the setter for the property
|
||||||
|
* is called to reinstate the previous value.
|
||||||
*
|
*
|
||||||
* This signal is typically used to obtain change notification for a
|
* This signal is typically used to obtain change notification for a
|
||||||
* single property, by specifying the property name as a detail in the
|
* single property, by specifying the property name as a detail in the
|
||||||
@ -473,8 +479,8 @@ g_object_interface_install_property (gpointer g_iface,
|
|||||||
*
|
*
|
||||||
* Looks up the #GParamSpec for a property of a class.
|
* Looks up the #GParamSpec for a property of a class.
|
||||||
*
|
*
|
||||||
* Returns: the #GParamSpec for the property, or %NULL if the class doesn't have
|
* Returns: the #GParamSpec for the property, or %NULL if the class
|
||||||
* a property of that name
|
* doesn't have a property of that name
|
||||||
*/
|
*/
|
||||||
GParamSpec*
|
GParamSpec*
|
||||||
g_object_class_find_property (GObjectClass *class,
|
g_object_class_find_property (GObjectClass *class,
|
||||||
@ -515,9 +521,9 @@ g_object_class_find_property (GObjectClass *class,
|
|||||||
* g_type_default_interface_peek().
|
* g_type_default_interface_peek().
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
* Returns: the #GParamSpec for the property of the
|
*
|
||||||
* interface with the name @property_name, or %NULL
|
* Returns: the #GParamSpec for the property of the interface with the
|
||||||
* if no such property exists.
|
* name @property_name, or %NULL if no such property exists.
|
||||||
*/
|
*/
|
||||||
GParamSpec*
|
GParamSpec*
|
||||||
g_object_interface_find_property (gpointer g_iface,
|
g_object_interface_find_property (gpointer g_iface,
|
||||||
@ -652,9 +658,11 @@ g_object_class_list_properties (GObjectClass *class,
|
|||||||
* already been loaded, g_type_default_interface_peek().
|
* already been loaded, g_type_default_interface_peek().
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
* Returns: a pointer to an array of pointers to #GParamSpec structures.
|
*
|
||||||
* The paramspecs are owned by GLib, but the array should
|
* Returns: a pointer to an array of pointers to #GParamSpec
|
||||||
* be freed with g_free() when you are done with it.
|
* structures. The paramspecs are owned by GLib, but the
|
||||||
|
* array should be freed with g_free() when you are done with
|
||||||
|
* it.
|
||||||
*/
|
*/
|
||||||
GParamSpec**
|
GParamSpec**
|
||||||
g_object_interface_list_properties (gpointer g_iface,
|
g_object_interface_list_properties (gpointer g_iface,
|
||||||
@ -1430,9 +1438,9 @@ g_object_set_valist (GObject *object,
|
|||||||
*
|
*
|
||||||
* Gets properties of an object.
|
* Gets properties of an object.
|
||||||
*
|
*
|
||||||
* In general, a copy is made of the property contents and the caller is
|
* In general, a copy is made of the property contents and the caller
|
||||||
* responsible for freeing the memory in the appropriate manner for the type,
|
* is responsible for freeing the memory in the appropriate manner for
|
||||||
* for instance by calling g_free() or g_object_unref().
|
* the type, for instance by calling g_free() or g_object_unref().
|
||||||
*
|
*
|
||||||
* See g_object_get().
|
* See g_object_get().
|
||||||
*/
|
*/
|
||||||
@ -1530,9 +1538,9 @@ g_object_set (gpointer _object,
|
|||||||
*
|
*
|
||||||
* Gets properties of an object.
|
* Gets properties of an object.
|
||||||
*
|
*
|
||||||
* In general, a copy is made of the property contents and the caller is
|
* In general, a copy is made of the property contents and the caller
|
||||||
* responsible for freeing the memory in the appropriate manner for the type,
|
* is responsible for freeing the memory in the appropriate manner for
|
||||||
* for instance by calling g_free() or g_object_unref().
|
* the type, for instance by calling g_free() or g_object_unref().
|
||||||
*
|
*
|
||||||
* <example>
|
* <example>
|
||||||
* <title>Using g_object_get(<!-- -->)</title>
|
* <title>Using g_object_get(<!-- -->)</title>
|
||||||
@ -1700,9 +1708,9 @@ g_object_get_property (GObject *object,
|
|||||||
* g_object_connect:
|
* g_object_connect:
|
||||||
* @object: a #GObject
|
* @object: a #GObject
|
||||||
* @signal_spec: the spec for the first signal
|
* @signal_spec: the spec for the first signal
|
||||||
* @...: #GCallback for the first signal, followed by data for the first signal,
|
* @...: #GCallback for the first signal, followed by data for the
|
||||||
* followed optionally by more signal spec/callback/data triples,
|
* first signal, followed optionally by more signal
|
||||||
* followed by %NULL
|
* spec/callback/data triples, followed by %NULL
|
||||||
*
|
*
|
||||||
* A convenience function to connect multiple signals at once.
|
* A convenience function to connect multiple signals at once.
|
||||||
*
|
*
|
||||||
@ -1858,9 +1866,10 @@ g_object_connect (gpointer _object,
|
|||||||
*
|
*
|
||||||
* A convenience function to disconnect multiple signals at once.
|
* A convenience function to disconnect multiple signals at once.
|
||||||
*
|
*
|
||||||
* The signal specs expected by this function have the form "any_signal", which
|
* The signal specs expected by this function have the form
|
||||||
* means to disconnect any signal with matching callback and data, or
|
* "any_signal", which means to disconnect any signal with matching
|
||||||
* "any_signal::signal_name", which only disconnects the signal named "signal_name".
|
* callback and data, or "any_signal::signal_name", which only
|
||||||
|
* disconnects the signal named "signal_name".
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
g_object_disconnect (gpointer _object,
|
g_object_disconnect (gpointer _object,
|
||||||
@ -1936,11 +1945,11 @@ weak_refs_notify (gpointer data)
|
|||||||
* @notify: callback to invoke before the object is freed
|
* @notify: callback to invoke before the object is freed
|
||||||
* @data: extra data to pass to notify
|
* @data: extra data to pass to notify
|
||||||
*
|
*
|
||||||
* Adds a weak reference callback to an object. Weak references are used for
|
* Adds a weak reference callback to an object. Weak references are
|
||||||
* notification when an object is finalized. They are called "weak references"
|
* used for notification when an object is finalized. They are called
|
||||||
* because they allow you to safely hold a pointer to an object without calling
|
* "weak references" because they allow you to safely hold a pointer
|
||||||
* g_object_ref() (g_object_ref() adds a strong reference, that is, forces the
|
* to an object without calling g_object_ref() (g_object_ref() adds a
|
||||||
* object to stay alive).
|
* strong reference, that is, forces the object to stay alive).
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
g_object_weak_ref (GObject *object,
|
g_object_weak_ref (GObject *object,
|
||||||
@ -2018,9 +2027,9 @@ g_object_weak_unref (GObject *object,
|
|||||||
* @weak_pointer_location: The memory address of a pointer.
|
* @weak_pointer_location: The memory address of a pointer.
|
||||||
*
|
*
|
||||||
* Adds a weak reference from weak_pointer to @object to indicate that
|
* Adds a weak reference from weak_pointer to @object to indicate that
|
||||||
* the pointer located at @weak_pointer_location is only valid during the
|
* the pointer located at @weak_pointer_location is only valid during
|
||||||
* lifetime of @object. When the @object is finalized, @weak_pointer will
|
* the lifetime of @object. When the @object is finalized,
|
||||||
* be set to %NULL.
|
* @weak_pointer will be set to %NULL.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
g_object_add_weak_pointer (GObject *object,
|
g_object_add_weak_pointer (GObject *object,
|
||||||
@ -2087,6 +2096,7 @@ object_floating_flag_handler (GObject *object,
|
|||||||
* reference.
|
* reference.
|
||||||
*
|
*
|
||||||
* Since: 2.10
|
* Since: 2.10
|
||||||
|
*
|
||||||
* Returns: %TRUE if @object has a floating reference
|
* Returns: %TRUE if @object has a floating reference
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
@ -2106,12 +2116,13 @@ g_object_is_floating (gpointer _object)
|
|||||||
* has a floating reference.
|
* has a floating reference.
|
||||||
*
|
*
|
||||||
* In other words, if the object is floating, then this call "assumes
|
* In other words, if the object is floating, then this call "assumes
|
||||||
* ownership" of the floating reference, converting it to a normal reference
|
* ownership" of the floating reference, converting it to a normal
|
||||||
* by clearing the floating flag while leaving the reference count unchanged.
|
* reference by clearing the floating flag while leaving the reference
|
||||||
* If the object is not floating, then this call adds a new normal reference
|
* count unchanged. If the object is not floating, then this call
|
||||||
* increasing the reference count by one.
|
* adds a new normal reference increasing the reference count by one.
|
||||||
*
|
*
|
||||||
* Since: 2.10
|
* Since: 2.10
|
||||||
|
*
|
||||||
* Returns: @object
|
* Returns: @object
|
||||||
*/
|
*/
|
||||||
gpointer
|
gpointer
|
||||||
@ -2337,9 +2348,8 @@ g_object_ref (gpointer _object)
|
|||||||
* g_object_unref:
|
* g_object_unref:
|
||||||
* @object: a #GObject
|
* @object: a #GObject
|
||||||
*
|
*
|
||||||
* Decreases the reference count of @object.
|
* Decreases the reference count of @object. When its reference count
|
||||||
* When its reference count drops to 0, the object is finalized
|
* drops to 0, the object is finalized (i.e. its memory is freed).
|
||||||
* (i.e. its memory is freed).
|
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
g_object_unref (gpointer _object)
|
g_object_unref (gpointer _object)
|
||||||
@ -2464,7 +2474,8 @@ g_object_set_qdata (GObject *object,
|
|||||||
* @object: The GObject to set store a user data pointer
|
* @object: The GObject to set store a user data pointer
|
||||||
* @quark: A #GQuark, naming the user data pointer
|
* @quark: A #GQuark, naming the user data pointer
|
||||||
* @data: An opaque user data pointer
|
* @data: An opaque user data pointer
|
||||||
* @destroy: Function to invoke with @data as argument, when @data needs to be freed
|
* @destroy: Function to invoke with @data as argument, when @data
|
||||||
|
* needs to be freed
|
||||||
*
|
*
|
||||||
* This function works like g_object_set_qdata(), but in addition,
|
* This function works like g_object_set_qdata(), but in addition,
|
||||||
* a void (*destroy) (gpointer) function may be specified which is
|
* a void (*destroy) (gpointer) function may be specified which is
|
||||||
@ -2521,9 +2532,10 @@ g_object_set_qdata_full (GObject *object,
|
|||||||
* g_list_free (list);
|
* g_list_free (list);
|
||||||
* }
|
* }
|
||||||
* ]|
|
* ]|
|
||||||
* Using g_object_get_qdata() in the above example, instead of g_object_steal_qdata()
|
* Using g_object_get_qdata() in the above example, instead of
|
||||||
* would have left the destroy function set, and thus the partial string list would
|
* g_object_steal_qdata() would have left the destroy function set,
|
||||||
* have been freed upon g_object_set_qdata_full().
|
* and thus the partial string list would have been freed upon
|
||||||
|
* g_object_set_qdata_full().
|
||||||
*
|
*
|
||||||
* Returns: The user data pointer set, or %NULL
|
* Returns: The user data pointer set, or %NULL
|
||||||
*/
|
*/
|
||||||
@ -2732,11 +2744,10 @@ g_value_object_lcopy_value (const GValue *value,
|
|||||||
* Set the contents of a %G_TYPE_OBJECT derived #GValue to @v_object.
|
* Set the contents of a %G_TYPE_OBJECT derived #GValue to @v_object.
|
||||||
*
|
*
|
||||||
* g_value_set_object() increases the reference count of @v_object
|
* g_value_set_object() increases the reference count of @v_object
|
||||||
* (the #GValue holds a reference to @v_object).
|
* (the #GValue holds a reference to @v_object). If you do not wish
|
||||||
* If you do not wish to increase the reference count of the object
|
* to increase the reference count of the object (i.e. you wish to
|
||||||
* (i.e. you wish to pass your current reference to the #GValue because you no
|
* pass your current reference to the #GValue because you no longer
|
||||||
* longer need it),
|
* need it), use g_value_take_object() instead.
|
||||||
* use g_value_take_object() instead.
|
|
||||||
*
|
*
|
||||||
* It is important that your #GValue holds a reference to @v_object (either its
|
* It is important that your #GValue holds a reference to @v_object (either its
|
||||||
* own, or one it has taken) to ensure that the object won't be destroyed while
|
* own, or one it has taken) to ensure that the object won't be destroyed while
|
||||||
@ -2839,9 +2850,11 @@ g_value_get_object (const GValue *value)
|
|||||||
* g_value_dup_object:
|
* g_value_dup_object:
|
||||||
* @value: a valid #GValue whose type is derived from %G_TYPE_OBJECT
|
* @value: a valid #GValue whose type is derived from %G_TYPE_OBJECT
|
||||||
*
|
*
|
||||||
* Get the contents of a %G_TYPE_OBJECT derived #GValue, increasing its reference count.
|
* Get the contents of a %G_TYPE_OBJECT derived #GValue, increasing
|
||||||
|
* its reference count.
|
||||||
*
|
*
|
||||||
* Returns: object content of @value, should be unreferenced when no longer needed.
|
* Returns: object content of @value, should be unreferenced when no
|
||||||
|
* longer needed.
|
||||||
*/
|
*/
|
||||||
gpointer
|
gpointer
|
||||||
g_value_dup_object (const GValue *value)
|
g_value_dup_object (const GValue *value)
|
||||||
@ -2859,24 +2872,24 @@ g_value_dup_object (const GValue *value)
|
|||||||
* @gobject: the object to pass as data to @c_handler.
|
* @gobject: the object to pass as data to @c_handler.
|
||||||
* @connect_flags: a combination of #GConnnectFlags.
|
* @connect_flags: a combination of #GConnnectFlags.
|
||||||
*
|
*
|
||||||
* This is similar to g_signal_connect_data(), but uses a closure which
|
* This is similar to g_signal_connect_data(), but uses a closure which
|
||||||
* ensures that the @gobject stays alive during the call to @c_handler
|
* ensures that the @gobject stays alive during the call to @c_handler
|
||||||
* by temporarily adding a reference count to @gobject.
|
* by temporarily adding a reference count to @gobject.
|
||||||
*
|
*
|
||||||
* Note that there is a bug in GObject that makes this function
|
* Note that there is a bug in GObject that makes this function
|
||||||
* much less useful than it might seem otherwise. Once @gobject is
|
* much less useful than it might seem otherwise. Once @gobject is
|
||||||
* disposed, the callback will no longer be called, but, the signal
|
* disposed, the callback will no longer be called, but, the signal
|
||||||
* handler is <emphasis>not</emphasis> currently disconnected. If the
|
* handler is <emphasis>not</emphasis> currently disconnected. If the
|
||||||
* @instance is itself being freed at the same time than this doesn't
|
* @instance is itself being freed at the same time than this doesn't
|
||||||
* matter, since the signal will automatically be removed, but
|
* matter, since the signal will automatically be removed, but
|
||||||
* if @instance persists, then the signal handler will leak. You
|
* if @instance persists, then the signal handler will leak. You
|
||||||
* should not remove the signal yourself because in a future versions of
|
* should not remove the signal yourself because in a future versions of
|
||||||
* GObject, the handler <emphasis>will</emphasis> automatically
|
* GObject, the handler <emphasis>will</emphasis> automatically
|
||||||
* be disconnected.
|
* be disconnected.
|
||||||
*
|
*
|
||||||
* It's possible to work around this problem in a way that will
|
* It's possible to work around this problem in a way that will
|
||||||
* continue to work with future versions of GObject by checking
|
* continue to work with future versions of GObject by checking
|
||||||
* that the signal handler is still connected before disconnected it:
|
* that the signal handler is still connected before disconnected it:
|
||||||
* <informalexample><programlisting>
|
* <informalexample><programlisting>
|
||||||
* if (g_signal_handler_is_connected (instance, id))
|
* if (g_signal_handler_is_connected (instance, id))
|
||||||
* g_signal_handler_disconnect (instance, id);
|
* g_signal_handler_disconnect (instance, id);
|
||||||
@ -2977,15 +2990,15 @@ destroy_closure_array (gpointer data)
|
|||||||
* @object: GObject restricting lifetime of @closure
|
* @object: GObject restricting lifetime of @closure
|
||||||
* @closure: GClosure to watch
|
* @closure: GClosure to watch
|
||||||
*
|
*
|
||||||
* This function essentially limits the life time of the @closure
|
* This function essentially limits the life time of the @closure to
|
||||||
* to the life time of the object. That is, when the object is finalized,
|
* the life time of the object. That is, when the object is finalized,
|
||||||
* the @closure is invalidated by calling g_closure_invalidate() on it,
|
* the @closure is invalidated by calling g_closure_invalidate() on
|
||||||
* in order to prevent invocations of the closure with a finalized
|
* it, in order to prevent invocations of the closure with a finalized
|
||||||
* (nonexisting) object. Also, g_object_ref() and g_object_unref() are added
|
* (nonexisting) object. Also, g_object_ref() and g_object_unref() are
|
||||||
* as marshal guards to the @closure, to ensure that an extra reference
|
* added as marshal guards to the @closure, to ensure that an extra
|
||||||
* count is held on @object during invocation of the @closure.
|
* reference count is held on @object during invocation of the
|
||||||
* Usually, this function will be called on closures that use this @object
|
* @closure. Usually, this function will be called on closures that
|
||||||
* as closure data.
|
* use this @object as closure data.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
g_object_watch_closure (GObject *object,
|
g_object_watch_closure (GObject *object,
|
||||||
@ -3028,10 +3041,10 @@ g_object_watch_closure (GObject *object,
|
|||||||
* @object: a #GObject pointer to store in the @data field of the newly
|
* @object: a #GObject pointer to store in the @data field of the newly
|
||||||
* allocated #GClosure
|
* allocated #GClosure
|
||||||
*
|
*
|
||||||
* A variant of g_closure_new_simple() which stores @object in the @data
|
* A variant of g_closure_new_simple() which stores @object in the
|
||||||
* field of the closure and calls g_object_watch_closure() on @object and the
|
* @data field of the closure and calls g_object_watch_closure() on
|
||||||
* created closure. This function is mainly useful when implementing new types
|
* @object and the created closure. This function is mainly useful
|
||||||
* of closures.
|
* when implementing new types of closures.
|
||||||
*
|
*
|
||||||
* Returns: a newly allocated #GClosure
|
* Returns: a newly allocated #GClosure
|
||||||
*/
|
*/
|
||||||
@ -3055,10 +3068,11 @@ g_closure_new_object (guint sizeof_closure,
|
|||||||
* @callback_func: the function to invoke
|
* @callback_func: the function to invoke
|
||||||
* @object: a #GObject pointer to pass to @callback_func
|
* @object: a #GObject pointer to pass to @callback_func
|
||||||
*
|
*
|
||||||
* A variant of g_cclosure_new() which uses @object as @user_data and calls
|
* A variant of g_cclosure_new() which uses @object as @user_data and
|
||||||
* g_object_watch_closure() on @object and the created closure. This function
|
* calls g_object_watch_closure() on @object and the created
|
||||||
* is useful when you have a callback closely associated with a #GObject,
|
* closure. This function is useful when you have a callback closely
|
||||||
* and want the callback to no longer run after the object is is freed.
|
* associated with a #GObject, and want the callback to no longer run
|
||||||
|
* after the object is is freed.
|
||||||
*
|
*
|
||||||
* Returns: a new #GCClosure
|
* Returns: a new #GCClosure
|
||||||
*/
|
*/
|
||||||
@ -3083,10 +3097,11 @@ g_cclosure_new_object (GCallback callback_func,
|
|||||||
* @callback_func: the function to invoke
|
* @callback_func: the function to invoke
|
||||||
* @object: a #GObject pointer to pass to @callback_func
|
* @object: a #GObject pointer to pass to @callback_func
|
||||||
*
|
*
|
||||||
* A variant of g_cclosure_new_swap() which uses @object as @user_data and calls
|
* A variant of g_cclosure_new_swap() which uses @object as @user_data
|
||||||
* g_object_watch_closure() on @object and the created closure. This function
|
* and calls g_object_watch_closure() on @object and the created
|
||||||
* is useful when you have a callback closely associated with a #GObject,
|
* closure. This function is useful when you have a callback closely
|
||||||
* and want the callback to no longer run after the object is is freed.
|
* associated with a #GObject, and want the callback to no longer run
|
||||||
|
* after the object is is freed.
|
||||||
*
|
*
|
||||||
* Returns: a new #GCClosure
|
* Returns: a new #GCClosure
|
||||||
*/
|
*/
|
||||||
|
113
gobject/gparam.c
113
gobject/gparam.c
@ -33,9 +33,13 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:gparamspec
|
* SECTION:gparamspec
|
||||||
|
*
|
||||||
* @Short_description: Metadata for parameter specifications
|
* @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()
|
* @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
|
* @Title: GParamSpec
|
||||||
*
|
*
|
||||||
* #GParamSpec is an object structure that encapsulates the metadata
|
* #GParamSpec is an object structure that encapsulates the metadata
|
||||||
@ -226,13 +230,13 @@ g_param_spec_unref (GParamSpec *pspec)
|
|||||||
* g_param_spec_sink:
|
* g_param_spec_sink:
|
||||||
* @pspec: a valid #GParamSpec
|
* @pspec: a valid #GParamSpec
|
||||||
*
|
*
|
||||||
* The initial reference count of a newly created #GParamSpec is 1, even
|
* The initial reference count of a newly created #GParamSpec is 1,
|
||||||
* though no one has explicitly called g_param_spec_ref() on it yet. So the
|
* even though no one has explicitly called g_param_spec_ref() on it
|
||||||
* initial reference count is flagged as "floating", until someone calls
|
* yet. So the initial reference count is flagged as "floating", until
|
||||||
* <literal>g_param_spec_ref (pspec); g_param_spec_sink (pspec);</literal>
|
* someone calls <literal>g_param_spec_ref (pspec); g_param_spec_sink
|
||||||
* in sequence on it, taking over the initial reference count (thus
|
* (pspec);</literal> in sequence on it, taking over the initial
|
||||||
* ending up with a @pspec that has a reference count of 1 still, but is
|
* reference count (thus ending up with a @pspec that has a reference
|
||||||
* not flagged "floating" anymore).
|
* count of 1 still, but is not flagged "floating" anymore).
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
g_param_spec_sink (GParamSpec *pspec)
|
g_param_spec_sink (GParamSpec *pspec)
|
||||||
@ -390,15 +394,16 @@ is_canonical (const gchar *key)
|
|||||||
* character of a property name must be a letter. Names which violate these
|
* character of a property name must be a letter. Names which violate these
|
||||||
* rules lead to undefined behaviour.
|
* rules lead to undefined behaviour.
|
||||||
*
|
*
|
||||||
* When creating and looking up a #GParamSpec, either separator can be used,
|
* When creating and looking up a #GParamSpec, either separator can be
|
||||||
* but they cannot be mixed. Using '-' is considerably more efficient and in
|
* used, but they cannot be mixed. Using '-' is considerably more
|
||||||
* fact required when using property names as detail strings for signals.
|
* efficient and in fact required when using property names as detail
|
||||||
|
* strings for signals.
|
||||||
*
|
*
|
||||||
* Beyond the name, #GParamSpec<!-- -->s have two more descriptive strings
|
* Beyond the name, #GParamSpec<!-- -->s have two more descriptive
|
||||||
* associated with them, the @nick, which should be suitable for use as
|
* strings associated with them, the @nick, which should be suitable
|
||||||
* a label for the property in a property editor, and the @blurb, which should
|
* for use as a label for the property in a property editor, and the
|
||||||
* be a somewhat longer description, suitable for e.g. a tooltip. The @nick
|
* @blurb, which should be a somewhat longer description, suitable for
|
||||||
* and @blurb should ideally be localized.
|
* e.g. a tooltip. The @nick and @blurb should ideally be localized.
|
||||||
*
|
*
|
||||||
* Returns: a newly allocated #GParamSpec instance
|
* Returns: a newly allocated #GParamSpec instance
|
||||||
*/
|
*/
|
||||||
@ -470,12 +475,12 @@ g_param_spec_get_qdata (GParamSpec *pspec,
|
|||||||
* @quark: a #GQuark, naming the user data pointer
|
* @quark: a #GQuark, naming the user data pointer
|
||||||
* @data: an opaque user data pointer
|
* @data: an opaque user data pointer
|
||||||
*
|
*
|
||||||
* Sets an opaque, named pointer on a #GParamSpec. The name is specified
|
* Sets an opaque, named pointer on a #GParamSpec. The name is
|
||||||
* through a #GQuark (retrieved e.g. via g_quark_from_static_string()), and
|
* specified through a #GQuark (retrieved e.g. via
|
||||||
* the pointer can be gotten back from the @pspec with g_param_spec_get_qdata().
|
* g_quark_from_static_string()), and the pointer can be gotten back
|
||||||
* Setting a previously set user data pointer, overrides (frees)
|
* from the @pspec with g_param_spec_get_qdata(). Setting a
|
||||||
* the old pointer set, using %NULL as pointer essentially
|
* previously set user data pointer, overrides (frees) the old pointer
|
||||||
* removes the data stored.
|
* set, using %NULL as pointer essentially removes the data stored.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
g_param_spec_set_qdata (GParamSpec *pspec,
|
g_param_spec_set_qdata (GParamSpec *pspec,
|
||||||
@ -519,11 +524,10 @@ g_param_spec_set_qdata_full (GParamSpec *pspec,
|
|||||||
* @pspec: the #GParamSpec to get a stored user data pointer from
|
* @pspec: the #GParamSpec to get a stored user data pointer from
|
||||||
* @quark: a #GQuark, naming the user data pointer
|
* @quark: a #GQuark, naming the user data pointer
|
||||||
*
|
*
|
||||||
* Gets back user data pointers stored via g_param_spec_set_qdata() and
|
* Gets back user data pointers stored via g_param_spec_set_qdata()
|
||||||
* removes the @data from @pspec without invoking it's destroy() function
|
* and removes the @data from @pspec without invoking it's destroy()
|
||||||
* (if any was set).
|
* function (if any was set). Usually, calling this function is only
|
||||||
* Usually, calling this function is only required to update
|
* required to update user data pointers with a destroy notifier.
|
||||||
* user data pointers with a destroy notifier.
|
|
||||||
*
|
*
|
||||||
* Returns: the user data pointer set, or %NULL
|
* Returns: the user data pointer set, or %NULL
|
||||||
*/
|
*/
|
||||||
@ -550,8 +554,9 @@ g_param_spec_steal_qdata (GParamSpec *pspec,
|
|||||||
* for an example of the use of this capability.
|
* for an example of the use of this capability.
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
|
*
|
||||||
* Returns: paramspec to which requests on this paramspec should
|
* Returns: paramspec to which requests on this paramspec should
|
||||||
* be redirected, or %NULL if none.
|
* be redirected, or %NULL if none.
|
||||||
*/
|
*/
|
||||||
GParamSpec*
|
GParamSpec*
|
||||||
g_param_spec_get_redirect_target (GParamSpec *pspec)
|
g_param_spec_get_redirect_target (GParamSpec *pspec)
|
||||||
@ -654,12 +659,13 @@ g_param_value_validate (GParamSpec *pspec,
|
|||||||
* @pspec: a valid #GParamSpec
|
* @pspec: a valid #GParamSpec
|
||||||
* @src_value: souce #GValue
|
* @src_value: souce #GValue
|
||||||
* @dest_value: destination #GValue of correct type for @pspec
|
* @dest_value: destination #GValue of correct type for @pspec
|
||||||
* @strict_validation: %TRUE requires @dest_value to conform to @pspec without modifications
|
* @strict_validation: %TRUE requires @dest_value to conform to @pspec
|
||||||
|
* without modifications
|
||||||
*
|
*
|
||||||
* Transforms @src_value into @dest_value if possible, and then validates
|
* Transforms @src_value into @dest_value if possible, and then
|
||||||
* @dest_value, in order for it to conform to @pspec.
|
* validates @dest_value, in order for it to conform to @pspec. If
|
||||||
* If @strict_validation is %TRUE this function will only succeed if
|
* @strict_validation is %TRUE this function will only succeed if the
|
||||||
* the transformed @dest_value complied to @pspec without modifications.
|
* transformed @dest_value complied to @pspec without modifications.
|
||||||
*
|
*
|
||||||
* See also g_value_type_transformable(), g_value_transform() and
|
* See also g_value_type_transformable(), g_value_transform() and
|
||||||
* g_param_value_validate().
|
* g_param_value_validate().
|
||||||
@ -876,9 +882,9 @@ param_spec_pool_equals (gconstpointer key_spec_1,
|
|||||||
* Creates a new #GParamSpecPool.
|
* Creates a new #GParamSpecPool.
|
||||||
*
|
*
|
||||||
* If @type_prefixing is %TRUE, lookups in the newly created pool will
|
* If @type_prefixing is %TRUE, lookups in the newly created pool will
|
||||||
* allow to specify the owner as a colon-separated prefix of the property name,
|
* allow to specify the owner as a colon-separated prefix of the
|
||||||
* like "GtkContainer:border-width". This feature is deprecated, so you should
|
* property name, like "GtkContainer:border-width". This feature is
|
||||||
* always set @type_prefixing to %FALSE.
|
* deprecated, so you should always set @type_prefixing to %FALSE.
|
||||||
*
|
*
|
||||||
* Returns: a newly allocated #GParamSpecPool.
|
* Returns: a newly allocated #GParamSpecPool.
|
||||||
*/
|
*/
|
||||||
@ -902,7 +908,8 @@ g_param_spec_pool_new (gboolean type_prefixing)
|
|||||||
* @owner_type: a #GType identifying the owner of @pspec
|
* @owner_type: a #GType identifying the owner of @pspec
|
||||||
*
|
*
|
||||||
* Inserts a #GParamSpec in the pool.
|
* Inserts a #GParamSpec in the pool.
|
||||||
*/void
|
*/
|
||||||
|
void
|
||||||
g_param_spec_pool_insert (GParamSpecPool *pool,
|
g_param_spec_pool_insert (GParamSpecPool *pool,
|
||||||
GParamSpec *pspec,
|
GParamSpec *pspec,
|
||||||
GType owner_type)
|
GType owner_type)
|
||||||
@ -1106,10 +1113,11 @@ pool_list (gpointer key,
|
|||||||
* @pool: a #GParamSpecPool
|
* @pool: a #GParamSpecPool
|
||||||
* @owner_type: the owner to look for
|
* @owner_type: the owner to look for
|
||||||
*
|
*
|
||||||
* Gets an #GList of all #GParamSpec<!-- -->s owned by @owner_type in the pool.
|
* Gets an #GList of all #GParamSpec<!-- -->s owned by @owner_type in
|
||||||
|
* the pool.
|
||||||
*
|
*
|
||||||
* Returns: a #GList of all #GParamSpec<!-- -->s owned by @owner_type in
|
* Returns: a #GList of all #GParamSpec<!-- -->s owned by @owner_type
|
||||||
* the pool#GParamSpec<!-- -->s.
|
* in the pool#GParamSpec<!-- -->s.
|
||||||
*/
|
*/
|
||||||
GList*
|
GList*
|
||||||
g_param_spec_pool_list_owned (GParamSpecPool *pool,
|
g_param_spec_pool_list_owned (GParamSpecPool *pool,
|
||||||
@ -1240,10 +1248,11 @@ pool_depth_list_for_interface (gpointer key,
|
|||||||
* @owner_type: the owner to look for
|
* @owner_type: the owner to look for
|
||||||
* @n_pspecs_p: return location for the length of the returned array
|
* @n_pspecs_p: return location for the length of the returned array
|
||||||
*
|
*
|
||||||
* Gets an array of all #GParamSpec<!-- -->s owned by @owner_type in the pool.
|
* Gets an array of all #GParamSpec<!-- -->s owned by @owner_type in
|
||||||
|
* the pool.
|
||||||
*
|
*
|
||||||
* Returns: a newly allocated array containing pointers to all
|
* Returns: a newly allocated array containing pointers to all
|
||||||
* #GParamSpec<!-- -->s owned by @owner_type in the pool
|
* #GParamSpec<!-- -->s owned by @owner_type in the pool
|
||||||
*/
|
*/
|
||||||
GParamSpec**
|
GParamSpec**
|
||||||
g_param_spec_pool_list (GParamSpecPool *pool,
|
g_param_spec_pool_list (GParamSpecPool *pool,
|
||||||
@ -1344,9 +1353,9 @@ default_values_cmp (GParamSpec *pspec,
|
|||||||
* @pspec_info: The #GParamSpecTypeInfo for this #GParamSpec type.
|
* @pspec_info: The #GParamSpecTypeInfo for this #GParamSpec type.
|
||||||
*
|
*
|
||||||
* Registers @name as the name of a new static type derived from
|
* Registers @name as the name of a new static type derived from
|
||||||
* #G_TYPE_PARAM. The type system uses the information contained in the
|
* #G_TYPE_PARAM. The type system uses the information contained in
|
||||||
* #GParamSpecTypeInfo structure pointed to by @info to manage the #GParamSpec
|
* the #GParamSpecTypeInfo structure pointed to by @info to manage the
|
||||||
* type and its instances.
|
* #GParamSpec type and its instances.
|
||||||
*
|
*
|
||||||
* Returns: The new type identifier.
|
* Returns: The new type identifier.
|
||||||
*/
|
*/
|
||||||
@ -1433,9 +1442,9 @@ g_value_set_param_take_ownership (GValue *value,
|
|||||||
* @value: a valid #GValue of type %G_TYPE_PARAM
|
* @value: a valid #GValue of type %G_TYPE_PARAM
|
||||||
* @param: the #GParamSpec to be set
|
* @param: the #GParamSpec to be set
|
||||||
*
|
*
|
||||||
* Sets the contents of a %G_TYPE_PARAM #GValue to @param and
|
* Sets the contents of a %G_TYPE_PARAM #GValue to @param and takes
|
||||||
* takes over the ownership of the callers reference to @param;
|
* over the ownership of the callers reference to @param; the caller
|
||||||
* the caller doesn't have to unref it any more.
|
* doesn't have to unref it any more.
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
*/
|
*/
|
||||||
@ -1472,9 +1481,11 @@ g_value_get_param (const GValue *value)
|
|||||||
* g_value_dup_param:
|
* g_value_dup_param:
|
||||||
* @value: a valid #GValue whose type is derived from %G_TYPE_PARAM
|
* @value: a valid #GValue whose type is derived from %G_TYPE_PARAM
|
||||||
*
|
*
|
||||||
* Get the contents of a %G_TYPE_PARAM #GValue, increasing its reference count.
|
* Get the contents of a %G_TYPE_PARAM #GValue, increasing its
|
||||||
|
* reference count.
|
||||||
*
|
*
|
||||||
* Returns: #GParamSpec content of @value, should be unreferenced when no longer needed.
|
* Returns: #GParamSpec content of @value, should be unreferenced when
|
||||||
|
* no longer needed.
|
||||||
*/
|
*/
|
||||||
GParamSpec*
|
GParamSpec*
|
||||||
g_value_dup_param (const GValue *value)
|
g_value_dup_param (const GValue *value)
|
||||||
|
@ -33,15 +33,19 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:param_value_types
|
* SECTION:param_value_types
|
||||||
|
*
|
||||||
* @Short_description: Standard Parameter and Value Types
|
* @Short_description: Standard Parameter and Value Types
|
||||||
* @See_also:#GParamSpec, #GValue, g_object_class_install_property().
|
*
|
||||||
|
* @See_also: #GParamSpec, #GValue, g_object_class_install_property().
|
||||||
|
*
|
||||||
* @Title: Parameters and Values
|
* @Title: Parameters and Values
|
||||||
*
|
*
|
||||||
* #GValue provides an abstract container structure which can be copied,
|
* #GValue provides an abstract container structure which can be
|
||||||
* transformed and compared while holding a value of any (derived) type, which
|
* copied, transformed and compared while holding a value of any
|
||||||
* is registered as a #GType with a #GTypeValueTable in its #GTypeInfo structure.
|
* (derived) type, which is registered as a #GType with a
|
||||||
* Parameter specifications for most value types can be created as
|
* #GTypeValueTable in its #GTypeInfo structure. Parameter
|
||||||
* #GParamSpec derived instances, to implement e.g. #GObject properties which
|
* specifications for most value types can be created as #GParamSpec
|
||||||
|
* derived instances, to implement e.g. #GObject properties which
|
||||||
* operate on #GValue containers.
|
* operate on #GValue containers.
|
||||||
*
|
*
|
||||||
* Parameter names need to start with a letter (a-z or A-Z). Subsequent
|
* Parameter names need to start with a letter (a-z or A-Z). Subsequent
|
||||||
@ -1766,7 +1770,8 @@ g_param_spec_long (const gchar *name,
|
|||||||
* @default_value: default value for the property specified
|
* @default_value: default value for the property specified
|
||||||
* @flags: flags for the property specified
|
* @flags: flags for the property specified
|
||||||
*
|
*
|
||||||
* Creates a new #GParamSpecULong instance specifying a %G_TYPE_ULONG property.
|
* Creates a new #GParamSpecULong instance specifying a %G_TYPE_ULONG
|
||||||
|
* property.
|
||||||
*
|
*
|
||||||
* See g_param_spec_internal() for details on property names.
|
* See g_param_spec_internal() for details on property names.
|
||||||
*
|
*
|
||||||
@ -2245,6 +2250,7 @@ g_param_spec_pointer (const gchar *name,
|
|||||||
* See g_param_spec_internal() for details on property names.
|
* See g_param_spec_internal() for details on property names.
|
||||||
*
|
*
|
||||||
* Since: 2.10
|
* Since: 2.10
|
||||||
|
*
|
||||||
* Returns: a newly created parameter specification
|
* Returns: a newly created parameter specification
|
||||||
*/
|
*/
|
||||||
GParamSpec*
|
GParamSpec*
|
||||||
@ -2277,9 +2283,9 @@ g_param_spec_gtype (const gchar *name,
|
|||||||
* @flags: flags for the property specified
|
* @flags: flags for the property specified
|
||||||
*
|
*
|
||||||
* Creates a new #GParamSpecValueArray instance specifying a
|
* Creates a new #GParamSpecValueArray instance specifying a
|
||||||
* %G_TYPE_VALUE_ARRAY property. %G_TYPE_VALUE_ARRAY is a %G_TYPE_BOXED
|
* %G_TYPE_VALUE_ARRAY property. %G_TYPE_VALUE_ARRAY is a
|
||||||
* type, as such, #GValue structures for this property can be accessed
|
* %G_TYPE_BOXED type, as such, #GValue structures for this property
|
||||||
* with g_value_set_boxed() and g_value_get_boxed().
|
* can be accessed with g_value_set_boxed() and g_value_get_boxed().
|
||||||
*
|
*
|
||||||
* See g_param_spec_internal() for details on property names.
|
* See g_param_spec_internal() for details on property names.
|
||||||
*
|
*
|
||||||
@ -2357,6 +2363,7 @@ g_param_spec_object (const gchar *name,
|
|||||||
* useful unless you are implementing a new base type similar to GObject.
|
* useful unless you are implementing a new base type similar to GObject.
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
|
*
|
||||||
* Returns: the newly created #GParamSpec
|
* Returns: the newly created #GParamSpec
|
||||||
*/
|
*/
|
||||||
GParamSpec*
|
GParamSpec*
|
||||||
|
@ -41,7 +41,10 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:signals
|
* SECTION:signals
|
||||||
* @Short_description: A means for customization of object behaviour and a general purpose notification mechanism
|
*
|
||||||
|
* @Short_description: A means for customization of object behaviour
|
||||||
|
* and a general purpose notification mechanism
|
||||||
|
*
|
||||||
* @Title: Signals
|
* @Title: Signals
|
||||||
*
|
*
|
||||||
* The basic concept of the signal system is that of the
|
* The basic concept of the signal system is that of the
|
||||||
@ -1998,9 +2001,9 @@ g_signal_connect_data (gpointer instance,
|
|||||||
* @instance: The instance to block the signal handler of.
|
* @instance: The instance to block the signal handler of.
|
||||||
* @handler_id: Handler id of the handler to be blocked.
|
* @handler_id: Handler id of the handler to be blocked.
|
||||||
*
|
*
|
||||||
* Blocks a handler of an instance so it will not be called during
|
* Blocks a handler of an instance so it will not be called during any
|
||||||
* any signal emissions unless it is unblocked again. Thus "blocking"
|
* signal emissions unless it is unblocked again. Thus "blocking" a
|
||||||
* a signal handler means to temporarily deactive it, a signal handler
|
* signal handler means to temporarily deactive it, a signal handler
|
||||||
* has to be unblocked exactly the same amount of times it has been
|
* has to be unblocked exactly the same amount of times it has been
|
||||||
* blocked before to become active again.
|
* blocked before to become active again.
|
||||||
*
|
*
|
||||||
@ -2036,16 +2039,16 @@ g_signal_handler_block (gpointer instance,
|
|||||||
* @instance: The instance to unblock the signal handler of.
|
* @instance: The instance to unblock the signal handler of.
|
||||||
* @handler_id: Handler id of the handler to be unblocked.
|
* @handler_id: Handler id of the handler to be unblocked.
|
||||||
*
|
*
|
||||||
* Undoes the effect of a previous g_signal_handler_block() call.
|
* Undoes the effect of a previous g_signal_handler_block() call. A
|
||||||
* A blocked handler is skipped during signal emissions and will not be
|
* blocked handler is skipped during signal emissions and will not be
|
||||||
* invoked, unblocking it (for exactly the amount of times it has been
|
* invoked, unblocking it (for exactly the amount of times it has been
|
||||||
* blocked before) reverts its "blocked" state, so the handler will be
|
* blocked before) reverts its "blocked" state, so the handler will be
|
||||||
* recognized by the signal system and is called upon future or currently
|
* recognized by the signal system and is called upon future or
|
||||||
* ongoing signal emissions (since the order in which handlers are
|
* currently ongoing signal emissions (since the order in which
|
||||||
* called during signal emissions is deterministic, whether the
|
* handlers are called during signal emissions is deterministic,
|
||||||
* unblocked handler in question is called as part of a currently
|
* whether the unblocked handler in question is called as part of a
|
||||||
* ongoing emission depends on how far that emission has proceeded
|
* currently ongoing emission depends on how far that emission has
|
||||||
* yet).
|
* proceeded yet).
|
||||||
*
|
*
|
||||||
* The @handler_id has to be a valid id of a signal handler that is
|
* The @handler_id has to be a valid id of a signal handler that is
|
||||||
* connected to a signal of @instance and is currently blocked.
|
* connected to a signal of @instance and is currently blocked.
|
||||||
@ -2362,13 +2365,14 @@ g_signal_handlers_unblock_matched (gpointer instance,
|
|||||||
* @func: The C closure callback of the handlers (useless for non-C closures).
|
* @func: The C closure callback of the handlers (useless for non-C closures).
|
||||||
* @data: The closure data of the handlers' closures.
|
* @data: The closure data of the handlers' closures.
|
||||||
*
|
*
|
||||||
* Disconnects all handlers on an instance that match a certain selection
|
* Disconnects all handlers on an instance that match a certain
|
||||||
* criteria. The criteria mask is passed as an OR-ed combination of
|
* selection criteria. The criteria mask is passed as an OR-ed
|
||||||
* #GSignalMatchType flags, and the criteria values are passed as arguments.
|
* combination of #GSignalMatchType flags, and the criteria values are
|
||||||
* Passing at least one of the %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC
|
* passed as arguments. Passing at least one of the
|
||||||
* or %G_SIGNAL_MATCH_DATA match flags is required for successful matches.
|
* %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC or
|
||||||
* If no handlers were found, 0 is returned, the number of disconnected
|
* %G_SIGNAL_MATCH_DATA match flags is required for successful
|
||||||
* handlers otherwise.
|
* matches. If no handlers were found, 0 is returned, the number of
|
||||||
|
* disconnected handlers otherwise.
|
||||||
*
|
*
|
||||||
* Returns: The number of handlers that matched.
|
* Returns: The number of handlers that matched.
|
||||||
*/
|
*/
|
||||||
@ -2409,12 +2413,12 @@ g_signal_handlers_disconnect_matched (gpointer instance,
|
|||||||
* given signal id and detail.
|
* given signal id and detail.
|
||||||
*
|
*
|
||||||
* One example of when you might use this is when the arguments to the
|
* One example of when you might use this is when the arguments to the
|
||||||
* signal are difficult to compute. A class implementor may opt to not emit
|
* signal are difficult to compute. A class implementor may opt to not
|
||||||
* the signal if no one is attached anyway, thus saving the cost of building
|
* emit the signal if no one is attached anyway, thus saving the cost
|
||||||
* the arguments.
|
* of building the arguments.
|
||||||
*
|
*
|
||||||
* Returns: %TRUE if a handler is connected to the signal,
|
* Returns: %TRUE if a handler is connected to the signal, %FALSE
|
||||||
* %FALSE otherwise.
|
* otherwise.
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
g_signal_has_handler_pending (gpointer instance,
|
g_signal_has_handler_pending (gpointer instance,
|
||||||
@ -3138,6 +3142,7 @@ type_debug_name (GType type)
|
|||||||
* and no further handling is needed.
|
* and no further handling is needed.
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
|
*
|
||||||
* Returns: standard #GSignalAccumulator result
|
* Returns: standard #GSignalAccumulator result
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
|
190
gobject/gtype.c
190
gobject/gtype.c
@ -34,7 +34,10 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:gtype
|
* SECTION:gtype
|
||||||
* @Short_description: The GLib Runtime type identification and management system
|
*
|
||||||
|
* @Short_description: The GLib Runtime type identification and
|
||||||
|
* management system
|
||||||
|
*
|
||||||
* @Title:Type Information
|
* @Title:Type Information
|
||||||
*
|
*
|
||||||
* The GType API is the foundation of the GObject system. It provides the
|
* The GType API is the foundation of the GObject system. It provides the
|
||||||
@ -238,6 +241,7 @@ struct _TypeNode
|
|||||||
} _prot;
|
} _prot;
|
||||||
GType supers[1]; /* flexible array */
|
GType supers[1]; /* flexible array */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SIZEOF_BASE_TYPE_NODE() (G_STRUCT_OFFSET (TypeNode, supers))
|
#define SIZEOF_BASE_TYPE_NODE() (G_STRUCT_OFFSET (TypeNode, supers))
|
||||||
#define MAX_N_SUPERS (255)
|
#define MAX_N_SUPERS (255)
|
||||||
#define MAX_N_CHILDREN (4095)
|
#define MAX_N_CHILDREN (4095)
|
||||||
@ -270,17 +274,20 @@ struct _IFaceHolder
|
|||||||
GTypePlugin *plugin;
|
GTypePlugin *plugin;
|
||||||
IFaceHolder *next;
|
IFaceHolder *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _IFaceEntry
|
struct _IFaceEntry
|
||||||
{
|
{
|
||||||
GType iface_type;
|
GType iface_type;
|
||||||
GTypeInterface *vtable;
|
GTypeInterface *vtable;
|
||||||
InitState init_state;
|
InitState init_state;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _CommonData
|
struct _CommonData
|
||||||
{
|
{
|
||||||
guint ref_count;
|
guint ref_count;
|
||||||
GTypeValueTable *value_table;
|
GTypeValueTable *value_table;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _IFaceData
|
struct _IFaceData
|
||||||
{
|
{
|
||||||
CommonData common;
|
CommonData common;
|
||||||
@ -292,6 +299,7 @@ struct _IFaceData
|
|||||||
gconstpointer dflt_data;
|
gconstpointer dflt_data;
|
||||||
gpointer dflt_vtable;
|
gpointer dflt_vtable;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _ClassData
|
struct _ClassData
|
||||||
{
|
{
|
||||||
CommonData common;
|
CommonData common;
|
||||||
@ -304,6 +312,7 @@ struct _ClassData
|
|||||||
gconstpointer class_data;
|
gconstpointer class_data;
|
||||||
gpointer class;
|
gpointer class;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _InstanceData
|
struct _InstanceData
|
||||||
{
|
{
|
||||||
CommonData common;
|
CommonData common;
|
||||||
@ -320,6 +329,7 @@ struct _InstanceData
|
|||||||
guint16 n_preallocs;
|
guint16 n_preallocs;
|
||||||
GInstanceInitFunc instance_init;
|
GInstanceInitFunc instance_init;
|
||||||
};
|
};
|
||||||
|
|
||||||
union _TypeData
|
union _TypeData
|
||||||
{
|
{
|
||||||
CommonData common;
|
CommonData common;
|
||||||
@ -327,10 +337,12 @@ union _TypeData
|
|||||||
ClassData class;
|
ClassData class;
|
||||||
InstanceData instance;
|
InstanceData instance;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
gpointer cache_data;
|
gpointer cache_data;
|
||||||
GTypeClassCacheFunc cache_func;
|
GTypeClassCacheFunc cache_func;
|
||||||
} ClassCacheFunc;
|
} ClassCacheFunc;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
gpointer check_data;
|
gpointer check_data;
|
||||||
GTypeInterfaceCheckFunc check_func;
|
GTypeInterfaceCheckFunc check_func;
|
||||||
@ -1389,6 +1401,7 @@ g_type_interface_add_prerequisite (GType interface_type,
|
|||||||
* Returns the prerequisites of an interfaces type.
|
* Returns the prerequisites of an interfaces type.
|
||||||
*
|
*
|
||||||
* Since: 2.2
|
* Since: 2.2
|
||||||
|
*
|
||||||
* Returns: a newly-allocated zero-terminated array of #GType containing
|
* Returns: a newly-allocated zero-terminated array of #GType containing
|
||||||
* the prerequisites of @interface_type
|
* the prerequisites of @interface_type
|
||||||
*/
|
*/
|
||||||
@ -1528,6 +1541,7 @@ typedef struct {
|
|||||||
gpointer instance;
|
gpointer instance;
|
||||||
gpointer class;
|
gpointer class;
|
||||||
} InstanceRealClass;
|
} InstanceRealClass;
|
||||||
|
|
||||||
static gint
|
static gint
|
||||||
instance_real_class_cmp (gconstpointer p1,
|
instance_real_class_cmp (gconstpointer p1,
|
||||||
gconstpointer p2)
|
gconstpointer p2)
|
||||||
@ -1538,6 +1552,7 @@ instance_real_class_cmp (gconstpointer p1,
|
|||||||
guint8 *i2 = irc2->instance;
|
guint8 *i2 = irc2->instance;
|
||||||
return G_BSEARCH_ARRAY_CMP (i1, i2);
|
return G_BSEARCH_ARRAY_CMP (i1, i2);
|
||||||
}
|
}
|
||||||
|
|
||||||
G_LOCK_DEFINE_STATIC (instance_real_class);
|
G_LOCK_DEFINE_STATIC (instance_real_class);
|
||||||
static GBSearchArray *instance_real_class_bsa = NULL;
|
static GBSearchArray *instance_real_class_bsa = NULL;
|
||||||
static GBSearchConfig instance_real_class_bconfig = {
|
static GBSearchConfig instance_real_class_bconfig = {
|
||||||
@ -1545,6 +1560,7 @@ static GBSearchConfig instance_real_class_bconfig = {
|
|||||||
instance_real_class_cmp,
|
instance_real_class_cmp,
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
instance_real_class_set (gpointer instance,
|
instance_real_class_set (gpointer instance,
|
||||||
GTypeClass *class)
|
GTypeClass *class)
|
||||||
@ -1558,6 +1574,7 @@ instance_real_class_set (gpointer instance,
|
|||||||
instance_real_class_bsa = g_bsearch_array_replace (instance_real_class_bsa, &instance_real_class_bconfig, &key);
|
instance_real_class_bsa = g_bsearch_array_replace (instance_real_class_bsa, &instance_real_class_bconfig, &key);
|
||||||
G_UNLOCK (instance_real_class);
|
G_UNLOCK (instance_real_class);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
instance_real_class_remove (gpointer instance)
|
instance_real_class_remove (gpointer instance)
|
||||||
{
|
{
|
||||||
@ -1575,6 +1592,7 @@ instance_real_class_remove (gpointer instance)
|
|||||||
}
|
}
|
||||||
G_UNLOCK (instance_real_class);
|
G_UNLOCK (instance_real_class);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline GTypeClass*
|
static inline GTypeClass*
|
||||||
instance_real_class_get (gpointer instance)
|
instance_real_class_get (gpointer instance)
|
||||||
{
|
{
|
||||||
@ -1592,18 +1610,19 @@ instance_real_class_get (gpointer instance)
|
|||||||
* g_type_create_instance:
|
* g_type_create_instance:
|
||||||
* @type: An instantiatable type to create an instance for.
|
* @type: An instantiatable type to create an instance for.
|
||||||
*
|
*
|
||||||
* Creates and initializes an instance of @type if @type is valid and can
|
* Creates and initializes an instance of @type if @type is valid and
|
||||||
* be instantiated. The type system only performs basic allocation and
|
* can be instantiated. The type system only performs basic allocation
|
||||||
* structure setups for instances: actual instance creation should happen
|
* and structure setups for instances: actual instance creation should
|
||||||
* through functions supplied by the type's fundamental type implementation.
|
* happen through functions supplied by the type's fundamental type
|
||||||
* So use of g_type_create_instance() is reserved for implementators of
|
* implementation. So use of g_type_create_instance() is reserved for
|
||||||
* fundamental types only. E.g. instances of the #GObject hierarchy
|
* implementators of fundamental types only. E.g. instances of the
|
||||||
* should be created via g_object_new() and <emphasis>never</emphasis>
|
* #GObject hierarchy should be created via g_object_new() and
|
||||||
* directly through g_type_create_instance() which doesn't handle
|
* <emphasis>never</emphasis> directly through
|
||||||
* things like singleton objects or object construction.
|
* g_type_create_instance() which doesn't handle things like singleton
|
||||||
* Note: Do <emphasis>not</emphasis> use this function, unless you're
|
* objects or object construction. Note: Do <emphasis>not</emphasis>
|
||||||
* implementing a fundamental type. Also language bindings should <emphasis>not</emphasis>
|
* use this function, unless you're implementing a fundamental
|
||||||
* use this function but g_object_new() instead.
|
* type. Also language bindings should <emphasis>not</emphasis> use
|
||||||
|
* this function but g_object_new() instead.
|
||||||
*
|
*
|
||||||
* Returns: An allocated and initialized instance, subject to further
|
* Returns: An allocated and initialized instance, subject to further
|
||||||
* treatment by the fundamental type implementation.
|
* treatment by the fundamental type implementation.
|
||||||
@ -1663,11 +1682,11 @@ g_type_create_instance (GType type)
|
|||||||
* g_type_free_instance:
|
* g_type_free_instance:
|
||||||
* @instance: an instance of a type.
|
* @instance: an instance of a type.
|
||||||
*
|
*
|
||||||
* Frees an instance of a type, returning it to the instance pool for the type,
|
* Frees an instance of a type, returning it to the instance pool for
|
||||||
* if there is one.
|
* the type, if there is one.
|
||||||
*
|
*
|
||||||
* Like g_type_create_instance(), this function is reserved for implementors of
|
* Like g_type_create_instance(), this function is reserved for
|
||||||
* fundamental types.
|
* implementors of fundamental types.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
g_type_free_instance (GTypeInstance *instance)
|
g_type_free_instance (GTypeInstance *instance)
|
||||||
@ -2193,9 +2212,9 @@ g_type_add_class_cache_func (gpointer cache_data,
|
|||||||
* @cache_data: data that was given when adding @cache_func
|
* @cache_data: data that was given when adding @cache_func
|
||||||
* @cache_func: a #GTypeClassCacheFunc
|
* @cache_func: a #GTypeClassCacheFunc
|
||||||
*
|
*
|
||||||
* Removes a previously installed #GTypeClassCacheFunc. The cache maintained
|
* Removes a previously installed #GTypeClassCacheFunc. The cache
|
||||||
* by @cache_func has to be empty when calling g_type_remove_class_cache_func()
|
* maintained by @cache_func has to be empty when calling
|
||||||
* to avoid leaks.
|
* g_type_remove_class_cache_func() to avoid leaks.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
g_type_remove_class_cache_func (gpointer cache_data,
|
g_type_remove_class_cache_func (gpointer cache_data,
|
||||||
@ -2231,17 +2250,17 @@ g_type_remove_class_cache_func (gpointer cache_data,
|
|||||||
* g_type_add_interface_check:
|
* g_type_add_interface_check:
|
||||||
* @check_data: data to pass to @check_func
|
* @check_data: data to pass to @check_func
|
||||||
* @check_func: function to be called after each interface
|
* @check_func: function to be called after each interface
|
||||||
* is initialized.
|
* is initialized.
|
||||||
*
|
*
|
||||||
* Adds a function to be called after an interface vtable is
|
* Adds a function to be called after an interface vtable is
|
||||||
* initialized for any class (i.e. after the @interface_init
|
* initialized for any class (i.e. after the @interface_init member of
|
||||||
* member of #GInterfaceInfo has been called).
|
* #GInterfaceInfo has been called).
|
||||||
*
|
*
|
||||||
* This function is useful when you want to check an invariant
|
* This function is useful when you want to check an invariant that
|
||||||
* that depends on the interfaces of a class. For instance,
|
* depends on the interfaces of a class. For instance, the
|
||||||
* the implementation of #GObject uses this facility to check
|
* implementation of #GObject uses this facility to check that an
|
||||||
* that an object implements all of the properties that are
|
* object implements all of the properties that are defined on its
|
||||||
* defined on its interfaces.
|
* interfaces.
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
*/
|
*/
|
||||||
@ -2385,7 +2404,8 @@ g_type_register_fundamental (GType type_id,
|
|||||||
* abstract or not) of the type. It works by filling a #GTypeInfo
|
* abstract or not) of the type. It works by filling a #GTypeInfo
|
||||||
* struct and calling g_type_register_static().
|
* struct and calling g_type_register_static().
|
||||||
*
|
*
|
||||||
* Since: 2.12
|
* Since: 2.12
|
||||||
|
*
|
||||||
* Returns: The new type identifier.
|
* Returns: The new type identifier.
|
||||||
*/
|
*/
|
||||||
GType
|
GType
|
||||||
@ -2517,7 +2537,7 @@ g_type_register_dynamic (GType parent_type,
|
|||||||
* @instance_type: #GType value of an instantiable type.
|
* @instance_type: #GType value of an instantiable type.
|
||||||
* @interface_type: #GType value of an interface type.
|
* @interface_type: #GType value of an interface type.
|
||||||
* @info: The #GInterfaceInfo structure for this
|
* @info: The #GInterfaceInfo structure for this
|
||||||
* (@instance_type, @interface_type) combination.
|
* (@instance_type, @interface_type) combination.
|
||||||
*
|
*
|
||||||
* Adds the static @interface_type to @instantiable_type. The information
|
* Adds the static @interface_type to @instantiable_type. The information
|
||||||
* contained in the #GTypeInterfaceInfo structure pointed to by @info
|
* contained in the #GTypeInterfaceInfo structure pointed to by @info
|
||||||
@ -2767,11 +2787,11 @@ g_type_class_peek_static (GType type)
|
|||||||
* @g_class: The #GTypeClass structure to retrieve the parent class for.
|
* @g_class: The #GTypeClass structure to retrieve the parent class for.
|
||||||
*
|
*
|
||||||
* This is a convenience function often needed in class initializers.
|
* This is a convenience function often needed in class initializers.
|
||||||
* It returns the class structure of the immediate parent type of the class passed in.
|
* It returns the class structure of the immediate parent type of the
|
||||||
* Since derived classes hold
|
* class passed in. Since derived classes hold a reference count on
|
||||||
* a reference count on their parent classes as long as they are instantiated,
|
* their parent classes as long as they are instantiated, the returned
|
||||||
* the returned class will always exist. This function is essentially
|
* class will always exist. This function is essentially equivalent
|
||||||
* equivalent to:
|
* to:
|
||||||
*
|
*
|
||||||
* <programlisting>
|
* <programlisting>
|
||||||
* g_type_class_peek (g_type_parent (G_TYPE_FROM_CLASS (g_class)));
|
* g_type_class_peek (g_type_parent (G_TYPE_FROM_CLASS (g_class)));
|
||||||
@ -2808,11 +2828,11 @@ g_type_class_peek_parent (gpointer g_class)
|
|||||||
* @instance_class: A #GTypeClass structure.
|
* @instance_class: A #GTypeClass structure.
|
||||||
* @iface_type: An interface ID which this class conforms to.
|
* @iface_type: An interface ID which this class conforms to.
|
||||||
*
|
*
|
||||||
* Returns the #GTypeInterface structure of an interface to which the passed in
|
* Returns the #GTypeInterface structure of an interface to which the
|
||||||
* class conforms.
|
* passed in class conforms.
|
||||||
*
|
*
|
||||||
* Returns: The GTypeInterface structure of iface_type if implemented
|
* Returns: The GTypeInterface structure of iface_type if implemented
|
||||||
* by @instance_class, %NULL otherwise
|
* by @instance_class, %NULL otherwise
|
||||||
*/
|
*/
|
||||||
gpointer
|
gpointer
|
||||||
g_type_interface_peek (gpointer instance_class,
|
g_type_interface_peek (gpointer instance_class,
|
||||||
@ -2854,9 +2874,9 @@ g_type_interface_peek (gpointer instance_class,
|
|||||||
* deriving the implementation of an interface from the parent type and
|
* deriving the implementation of an interface from the parent type and
|
||||||
* then possibly overriding some methods.
|
* then possibly overriding some methods.
|
||||||
*
|
*
|
||||||
* Returns: The corresponding #GTypeInterface structure of the parent type
|
* Returns: The corresponding #GTypeInterface structure of the parent
|
||||||
* of the instance type to which @g_iface belongs, or %NULL if the parent type
|
* type of the instance type to which @g_iface belongs, or
|
||||||
* doesn't conform to the interface.
|
* %NULL if the parent type doesn't conform to the interface.
|
||||||
*/
|
*/
|
||||||
gpointer
|
gpointer
|
||||||
g_type_interface_peek_parent (gpointer g_iface)
|
g_type_interface_peek_parent (gpointer g_iface)
|
||||||
@ -2907,9 +2927,10 @@ g_type_interface_peek_parent (gpointer g_iface)
|
|||||||
* have been installed.
|
* have been installed.
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
|
*
|
||||||
* Returns: the default vtable for the interface; call
|
* Returns: the default vtable for the interface; call
|
||||||
* g_type_default_interface_unref() when you are done using
|
* g_type_default_interface_unref() when you are done using
|
||||||
* the interface.
|
* the interface.
|
||||||
*/
|
*/
|
||||||
gpointer
|
gpointer
|
||||||
g_type_default_interface_ref (GType g_type)
|
g_type_default_interface_ref (GType g_type)
|
||||||
@ -2952,12 +2973,13 @@ g_type_default_interface_ref (GType g_type)
|
|||||||
* g_type_default_interface_peek:
|
* g_type_default_interface_peek:
|
||||||
* @g_type: an interface type
|
* @g_type: an interface type
|
||||||
*
|
*
|
||||||
* If the interface type @g_type is currently in use, returns
|
* If the interface type @g_type is currently in use, returns its
|
||||||
* its default interface vtable.
|
* default interface vtable.
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
|
*
|
||||||
* Returns: the default vtable for the interface, or %NULL
|
* Returns: the default vtable for the interface, or %NULL
|
||||||
* if the type is not currently in use.
|
* if the type is not currently in use.
|
||||||
*/
|
*/
|
||||||
gpointer
|
gpointer
|
||||||
g_type_default_interface_peek (GType g_type)
|
g_type_default_interface_peek (GType g_type)
|
||||||
@ -2979,7 +3001,7 @@ g_type_default_interface_peek (GType g_type)
|
|||||||
/**
|
/**
|
||||||
* g_type_default_interface_unref:
|
* g_type_default_interface_unref:
|
||||||
* @g_iface: the default vtable structure for a interface, as
|
* @g_iface: the default vtable structure for a interface, as
|
||||||
* returned by g_type_default_interface_ref()
|
* returned by g_type_default_interface_ref()
|
||||||
*
|
*
|
||||||
* Decrements the reference count for the type corresponding to the
|
* Decrements the reference count for the type corresponding to the
|
||||||
* interface default vtable @g_iface. If the type is dynamic, then
|
* interface default vtable @g_iface. If the type is dynamic, then
|
||||||
@ -3014,11 +3036,11 @@ g_type_default_interface_unref (gpointer g_iface)
|
|||||||
* g_type_name:
|
* g_type_name:
|
||||||
* @type: Type to return name for.
|
* @type: Type to return name for.
|
||||||
*
|
*
|
||||||
* Get the unique name that is assigned to a type ID.
|
* Get the unique name that is assigned to a type ID. Note that this
|
||||||
* Note that this function (like all other GType API) cannot cope with invalid
|
* function (like all other GType API) cannot cope with invalid type
|
||||||
* type IDs. %G_TYPE_INVALID may be passed to this function, as may be any other
|
* IDs. %G_TYPE_INVALID may be passed to this function, as may be any
|
||||||
* validly registered type ID, but randomized type IDs should not be passed in and
|
* other validly registered type ID, but randomized type IDs should
|
||||||
* will most likely lead to a crash.
|
* not be passed in and will most likely lead to a crash.
|
||||||
*
|
*
|
||||||
* Returns: Static type name or %NULL.
|
* Returns: Static type name or %NULL.
|
||||||
*/
|
*/
|
||||||
@ -3056,8 +3078,10 @@ g_type_qname (GType type)
|
|||||||
* g_type_from_name:
|
* g_type_from_name:
|
||||||
* @name: Type name to lookup.
|
* @name: Type name to lookup.
|
||||||
*
|
*
|
||||||
* Lookup the type ID from a given type name, returning 0 if no type has been registered under this name
|
* Lookup the type ID from a given type name, returning 0 if no type
|
||||||
* (this is the preferred method to find out by name whether a specific type has been registered yet).
|
* has been registered under this name (this is the preferred method
|
||||||
|
* to find out by name whether a specific type has been registered
|
||||||
|
* yet).
|
||||||
*
|
*
|
||||||
* Returns: Corresponding type ID or 0.
|
* Returns: Corresponding type ID or 0.
|
||||||
*/
|
*/
|
||||||
@ -3084,8 +3108,8 @@ g_type_from_name (const gchar *name)
|
|||||||
* g_type_parent:
|
* g_type_parent:
|
||||||
* @type: The derived type.
|
* @type: The derived type.
|
||||||
*
|
*
|
||||||
* Return the direct parent type of the passed in type.
|
* Return the direct parent type of the passed in type. If the passed
|
||||||
* If the passed in type has no parent, i.e. is a fundamental type, 0 is returned.
|
* in type has no parent, i.e. is a fundamental type, 0 is returned.
|
||||||
*
|
*
|
||||||
* Returns: The parent type.
|
* Returns: The parent type.
|
||||||
*/
|
*/
|
||||||
@ -3103,8 +3127,8 @@ g_type_parent (GType type)
|
|||||||
* g_type_depth:
|
* g_type_depth:
|
||||||
* @type: A #GType value.
|
* @type: A #GType value.
|
||||||
*
|
*
|
||||||
* Returns the length of the ancestry of the passed in type. This includes the
|
* Returns the length of the ancestry of the passed in type. This
|
||||||
* type itself, so that e.g. a fundamental type has depth 1.
|
* includes the type itself, so that e.g. a fundamental type has depth 1.
|
||||||
*
|
*
|
||||||
* Returns: The depth of @type.
|
* Returns: The depth of @type.
|
||||||
*/
|
*/
|
||||||
@ -3123,12 +3147,13 @@ g_type_depth (GType type)
|
|||||||
* @leaf_type: Descendant of @root_type and the type to be returned.
|
* @leaf_type: Descendant of @root_type and the type to be returned.
|
||||||
* @root_type: Immediate parent of the returned type.
|
* @root_type: Immediate parent of the returned type.
|
||||||
*
|
*
|
||||||
* Given a @leaf_type and a @root_type which is contained in its anchestry, return
|
* Given a @leaf_type and a @root_type which is contained in its
|
||||||
* the type that @root_type is the immediate parent of.
|
* anchestry, return the type that @root_type is the immediate parent
|
||||||
* In other words, this function determines the type that is derived directly from
|
* of. In other words, this function determines the type that is
|
||||||
* @root_type which is also a base class of @leaf_type. Given a root type and a
|
* derived directly from @root_type which is also a base class of
|
||||||
* leaf type, this function can be used to determine the types and order in which
|
* @leaf_type. Given a root type and a leaf type, this function can
|
||||||
* the leaf type is descended from the root type.
|
* be used to determine the types and order in which the leaf type is
|
||||||
|
* descended from the root type.
|
||||||
*
|
*
|
||||||
* Returns: Immediate child of @root_type and anchestor of @leaf_type.
|
* Returns: Immediate child of @root_type and anchestor of @leaf_type.
|
||||||
*/
|
*/
|
||||||
@ -3208,8 +3233,9 @@ type_node_conforms_to_U (TypeNode *node,
|
|||||||
* @type: Type to check anchestry for.
|
* @type: Type to check anchestry for.
|
||||||
* @is_a_type: Possible anchestor of @type or interface @type could conform to.
|
* @is_a_type: Possible anchestor of @type or interface @type could conform to.
|
||||||
*
|
*
|
||||||
* If @is_a_type is a derivable type, check whether @type is a descendant of @is_a_type.
|
* If @is_a_type is a derivable type, check whether @type is a
|
||||||
* If @is_a_type is an interface, check whether @type conforms to it.
|
* descendant of @is_a_type. If @is_a_type is an interface, check
|
||||||
|
* whether @type conforms to it.
|
||||||
*
|
*
|
||||||
* Returns: %TRUE if @type is_a @is_a_type holds true.
|
* Returns: %TRUE if @type is_a @is_a_type holds true.
|
||||||
*/
|
*/
|
||||||
@ -3271,7 +3297,8 @@ g_type_children (GType type,
|
|||||||
/**
|
/**
|
||||||
* g_type_interfaces:
|
* g_type_interfaces:
|
||||||
* @type: The type to list interface types for.
|
* @type: The type to list interface types for.
|
||||||
* @n_interfaces: Optional #guint pointer to contain the number of interface types.
|
* @n_interfaces: Optional #guint pointer to contain the number of
|
||||||
|
* interface types.
|
||||||
*
|
*
|
||||||
* Return a newly allocated and 0-terminated array of type IDs, listing the
|
* Return a newly allocated and 0-terminated array of type IDs, listing the
|
||||||
* interface types that @type conforms to. The return value has to be
|
* interface types that @type conforms to. The return value has to be
|
||||||
@ -3475,10 +3502,11 @@ type_add_flags_W (TypeNode *node,
|
|||||||
* upon success.
|
* upon success.
|
||||||
*
|
*
|
||||||
* Queries the type system for information about a specific type.
|
* Queries the type system for information about a specific type.
|
||||||
* This function will fill in a user-provided structure to hold type-specific
|
* This function will fill in a user-provided structure to hold
|
||||||
* information. If an invalid #GType is passed in, the @type member of the
|
* type-specific information. If an invalid #GType is passed in, the
|
||||||
* #GTypeQuery is 0. All members filled into the #GTypeQuery structure should
|
* @type member of the #GTypeQuery is 0. All members filled into the
|
||||||
* be considered constant and have to be left untouched.
|
* #GTypeQuery structure should be considered constant and have to be
|
||||||
|
* left untouched.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
g_type_query (GType type,
|
g_type_query (GType type,
|
||||||
@ -3571,9 +3599,9 @@ g_type_get_plugin (GType type)
|
|||||||
* @interface_type: the #GType value of an interface type.
|
* @interface_type: the #GType value of an interface type.
|
||||||
*
|
*
|
||||||
* Returns the #GTypePlugin structure for the dynamic interface
|
* Returns the #GTypePlugin structure for the dynamic interface
|
||||||
* @interface_type which has been added to @instance_type, or
|
* @interface_type which has been added to @instance_type, or %NULL if
|
||||||
* %NULL if @interface_type has not been added to @instance_type or does
|
* @interface_type has not been added to @instance_type or does not
|
||||||
* not have a #GTypePlugin structure. See g_type_add_interface_dynamic().
|
* have a #GTypePlugin structure. See g_type_add_interface_dynamic().
|
||||||
*
|
*
|
||||||
* Returns: the #GTypePlugin for the dynamic interface @interface_type
|
* Returns: the #GTypePlugin for the dynamic interface @interface_type
|
||||||
* of @instance_type.
|
* of @instance_type.
|
||||||
@ -3623,7 +3651,7 @@ g_type_interface_get_plugin (GType instance_type,
|
|||||||
* fundamental type identifier.
|
* fundamental type identifier.
|
||||||
*
|
*
|
||||||
* Returns: The nextmost fundamental type ID to be registered,
|
* Returns: The nextmost fundamental type ID to be registered,
|
||||||
* or 0 if the type system ran out of fundamental type IDs.
|
* or 0 if the type system ran out of fundamental type IDs.
|
||||||
*/
|
*/
|
||||||
GType
|
GType
|
||||||
g_type_fundamental_next (void)
|
g_type_fundamental_next (void)
|
||||||
@ -3754,7 +3782,7 @@ g_type_check_class_cast (GTypeClass *type_class,
|
|||||||
return type_class;
|
return type_class;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* g_type_check_instance:
|
* g_type_check_instance:
|
||||||
* @instance: A valid #GTypeInstance structure.
|
* @instance: A valid #GTypeInstance structure.
|
||||||
*
|
*
|
||||||
@ -3941,7 +3969,8 @@ g_type_name_from_class (GTypeClass *g_class)
|
|||||||
/* --- initialization --- */
|
/* --- initialization --- */
|
||||||
/**
|
/**
|
||||||
* g_type_init_with_debug_flags:
|
* g_type_init_with_debug_flags:
|
||||||
* @debug_flags: Bitwise combination of #GTypeDebugFlags values for debugging purposes.
|
* @debug_flags: Bitwise combination of #GTypeDebugFlags values for
|
||||||
|
* debugging purposes.
|
||||||
*
|
*
|
||||||
* Similar to g_type_init(), but additionally sets debug flags.
|
* Similar to g_type_init(), but additionally sets debug flags.
|
||||||
*/
|
*/
|
||||||
@ -4053,9 +4082,10 @@ g_type_init_with_debug_flags (GTypeDebugFlags debug_flags)
|
|||||||
/**
|
/**
|
||||||
* g_type_init:
|
* g_type_init:
|
||||||
*
|
*
|
||||||
* Prior to any use of the type system, g_type_init() has to be called to initialize
|
* Prior to any use of the type system, g_type_init() has to be called
|
||||||
* the type system and assorted other code portions (such as the various fundamental
|
* to initialize the type system and assorted other code portions
|
||||||
* type implementations or the signal system).
|
* (such as the various fundamental type implementations or the signal
|
||||||
|
* system).
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
g_type_init (void)
|
g_type_init (void)
|
||||||
|
@ -28,7 +28,9 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:gtypemodule
|
* SECTION:gtypemodule
|
||||||
|
*
|
||||||
* @Short_description: Type loading modules
|
* @Short_description: Type loading modules
|
||||||
|
*
|
||||||
* @See_also:<variablelist>
|
* @See_also:<variablelist>
|
||||||
* <varlistentry>
|
* <varlistentry>
|
||||||
* <term>#GTypePlugin</term>
|
* <term>#GTypePlugin</term>
|
||||||
@ -39,6 +41,7 @@
|
|||||||
* <listitem><para>Portable mechanism for dynamically loaded modules.</para></listitem>
|
* <listitem><para>Portable mechanism for dynamically loaded modules.</para></listitem>
|
||||||
* </varlistentry>
|
* </varlistentry>
|
||||||
* </variablelist>
|
* </variablelist>
|
||||||
|
*
|
||||||
* @Title: GTypeModule
|
* @Title: GTypeModule
|
||||||
*
|
*
|
||||||
* #GTypeModule provides a simple implementation of the #GTypePlugin
|
* #GTypeModule provides a simple implementation of the #GTypePlugin
|
||||||
@ -444,8 +447,8 @@ g_type_module_register_type (GTypeModule *module,
|
|||||||
* @interface_type: interface type to add
|
* @interface_type: interface type to add
|
||||||
* @interface_info: type information structure
|
* @interface_info: type information structure
|
||||||
*
|
*
|
||||||
* Registers an additional interface for a type, whose interface
|
* Registers an additional interface for a type, whose interface lives
|
||||||
* lives in the given type plugin. If the interface was already registered
|
* in the given type plugin. If the interface was already registered
|
||||||
* for the type in this plugin, nothing will be done.
|
* for the type in this plugin, nothing will be done.
|
||||||
*
|
*
|
||||||
* As long as any instances of the type exist, the type plugin will
|
* As long as any instances of the type exist, the type plugin will
|
||||||
@ -504,9 +507,10 @@ g_type_module_add_interface (GTypeModule *module,
|
|||||||
* g_type_module_register_enum:
|
* g_type_module_register_enum:
|
||||||
* @module: a #GTypeModule
|
* @module: a #GTypeModule
|
||||||
* @name: name for the type
|
* @name: name for the type
|
||||||
* @const_static_values: an array of #GEnumValue structs for the possible
|
* @const_static_values: an array of #GEnumValue structs for the
|
||||||
* enumeration values. The array is terminated by a struct with all
|
* possible enumeration values. The array is
|
||||||
* members being 0.
|
* terminated by a struct with all members being
|
||||||
|
* 0.
|
||||||
*
|
*
|
||||||
* Looks up or registers an enumeration that is implemented with a particular
|
* Looks up or registers an enumeration that is implemented with a particular
|
||||||
* type plugin. If a type with name @type_name was previously registered,
|
* type plugin. If a type with name @type_name was previously registered,
|
||||||
@ -517,6 +521,7 @@ g_type_module_add_interface (GTypeModule *module,
|
|||||||
* not be unloaded.
|
* not be unloaded.
|
||||||
*
|
*
|
||||||
* Since: 2.6
|
* Since: 2.6
|
||||||
|
*
|
||||||
* Returns: the new or existing type ID
|
* Returns: the new or existing type ID
|
||||||
*/
|
*/
|
||||||
GType
|
GType
|
||||||
@ -541,9 +546,10 @@ g_type_module_register_enum (GTypeModule *module,
|
|||||||
* g_type_module_register_flags:
|
* g_type_module_register_flags:
|
||||||
* @module: a #GTypeModule
|
* @module: a #GTypeModule
|
||||||
* @name: name for the type
|
* @name: name for the type
|
||||||
* @const_static_values: an array of #GFlagsValue structs for the possible
|
* @const_static_values: an array of #GFlagsValue structs for the
|
||||||
* flags values. The array is terminated by a struct with all
|
* possible flags values. The array is
|
||||||
* members being 0.
|
* terminated by a struct with all members being
|
||||||
|
* 0.
|
||||||
*
|
*
|
||||||
* Looks up or registers a flags type that is implemented with a particular
|
* Looks up or registers a flags type that is implemented with a particular
|
||||||
* type plugin. If a type with name @type_name was previously registered,
|
* type plugin. If a type with name @type_name was previously registered,
|
||||||
@ -554,6 +560,7 @@ g_type_module_register_enum (GTypeModule *module,
|
|||||||
* not be unloaded.
|
* not be unloaded.
|
||||||
*
|
*
|
||||||
* Since: 2.6
|
* Since: 2.6
|
||||||
|
*
|
||||||
* Returns: the new or existing type ID
|
* Returns: the new or existing type ID
|
||||||
*/
|
*/
|
||||||
GType
|
GType
|
||||||
|
@ -25,8 +25,11 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:gtypeplugin
|
* SECTION:gtypeplugin
|
||||||
|
*
|
||||||
* @Short_description: An interface for dynamically loadable types
|
* @Short_description: An interface for dynamically loadable types
|
||||||
|
*
|
||||||
* @See_also:#GTypeModule and g_type_register_dynamic().
|
* @See_also:#GTypeModule and g_type_register_dynamic().
|
||||||
|
*
|
||||||
* @Titile: GTypePlugin
|
* @Titile: GTypePlugin
|
||||||
*
|
*
|
||||||
* The GObject type system supports dynamic loading of types. The
|
* The GObject type system supports dynamic loading of types. The
|
||||||
@ -112,9 +115,9 @@ g_type_plugin_get_type (void)
|
|||||||
* g_type_plugin_use:
|
* g_type_plugin_use:
|
||||||
* @plugin: a #GTypePlugin
|
* @plugin: a #GTypePlugin
|
||||||
*
|
*
|
||||||
* Calls the @use_plugin function from the #GTypePluginClass of @plugin.
|
* Calls the @use_plugin function from the #GTypePluginClass of
|
||||||
* There should be no need to use this function outside of the GObject
|
* @plugin. There should be no need to use this function outside of
|
||||||
* type system itself.
|
* the GObject type system itself.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
g_type_plugin_use (GTypePlugin *plugin)
|
g_type_plugin_use (GTypePlugin *plugin)
|
||||||
@ -131,9 +134,9 @@ g_type_plugin_use (GTypePlugin *plugin)
|
|||||||
* g_type_plugin_unuse:
|
* g_type_plugin_unuse:
|
||||||
* @plugin: a #GTypePlugin
|
* @plugin: a #GTypePlugin
|
||||||
*
|
*
|
||||||
* Calls the @unuse_plugin function from the #GTypePluginClass of @plugin.
|
* Calls the @unuse_plugin function from the #GTypePluginClass of
|
||||||
* There should be no need to use this function outside of the GObject
|
* @plugin. There should be no need to use this function outside of
|
||||||
* type system itself.
|
* the GObject type system itself.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
g_type_plugin_unuse (GTypePlugin *plugin)
|
g_type_plugin_unuse (GTypePlugin *plugin)
|
||||||
@ -184,9 +187,9 @@ g_type_plugin_complete_type_info (GTypePlugin *plugin,
|
|||||||
* @interface_type: the #GType of the interface whose info is completed
|
* @interface_type: the #GType of the interface whose info is completed
|
||||||
* @info: the #GInterfaceInfo to fill in
|
* @info: the #GInterfaceInfo to fill in
|
||||||
*
|
*
|
||||||
* Calls the @complete_interface_info function from the #GTypePluginClass
|
* Calls the @complete_interface_info function from the
|
||||||
* of @plugin. There should be no need to use this function outside of the
|
* #GTypePluginClass of @plugin. There should be no need to use this
|
||||||
* GObject type system itself.
|
* function outside of the GObject type system itself.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
g_type_plugin_complete_interface_info (GTypePlugin *plugin,
|
g_type_plugin_complete_interface_info (GTypePlugin *plugin,
|
||||||
|
@ -16,14 +16,33 @@
|
|||||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* FIXME: MT-safety
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "gvalue.h"
|
||||||
|
#include "gvaluecollector.h"
|
||||||
|
#include "gbsearcharray.h"
|
||||||
|
#include "gobjectalias.h"
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:generic_values
|
* SECTION:generic_values
|
||||||
* @Short_description: A polymorphic type that can hold values of any other type
|
*
|
||||||
* @See_also: The fundamental types which all support #GValue operations and
|
* @Short_description: A polymorphic type that can hold values of any
|
||||||
* thus can be used as a type initializer for g_value_init() are defined by
|
* other type
|
||||||
* a separate interface. See the <link
|
*
|
||||||
* linkend="gobject-Standard-Parameter-and-Value-Types">Standard Values
|
* @See_also: The fundamental types which all support #GValue
|
||||||
* API</link> for details.
|
* operations and thus can be used as a type initializer for
|
||||||
|
* g_value_init() are defined by a separate interface. See the <link
|
||||||
|
* linkend="gobject-Standard-Parameter-and-Value-Types">Standard
|
||||||
|
* Values API</link> for details.
|
||||||
|
*
|
||||||
* @Title: Generic values
|
* @Title: Generic values
|
||||||
*
|
*
|
||||||
* The #GValue structure is basically a variable container that consists
|
* The #GValue structure is basically a variable container that consists
|
||||||
@ -39,17 +58,6 @@
|
|||||||
* provided by this interface.
|
* provided by this interface.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
|
||||||
* FIXME: MT-safety
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "gvalue.h"
|
|
||||||
#include "gvaluecollector.h"
|
|
||||||
#include "gbsearcharray.h"
|
|
||||||
#include "gobjectalias.h"
|
|
||||||
|
|
||||||
|
|
||||||
/* --- typedefs & structures --- */
|
/* --- typedefs & structures --- */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -27,14 +27,17 @@
|
|||||||
#include <stdlib.h> /* qsort() */
|
#include <stdlib.h> /* qsort() */
|
||||||
|
|
||||||
#include "gvaluearray.h"
|
#include "gvaluearray.h"
|
||||||
|
|
||||||
#include "gobjectalias.h"
|
#include "gobjectalias.h"
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:value_arrays
|
* SECTION:value_arrays
|
||||||
* @Short_description: A container structure to maintain an array of generic values
|
*
|
||||||
|
* @Short_description: A container structure to maintain an array of
|
||||||
|
* generic values
|
||||||
|
*
|
||||||
* @See_also:#GValue, #GParamSpecValueArray, g_param_spec_value_array()
|
* @See_also:#GValue, #GParamSpecValueArray, g_param_spec_value_array()
|
||||||
|
*
|
||||||
* @Title: Value arrays
|
* @Title: Value arrays
|
||||||
*
|
*
|
||||||
* The prime purpose of a #GValueArray is for it to be used as an
|
* The prime purpose of a #GValueArray is for it to be used as an
|
||||||
@ -321,7 +324,6 @@ g_value_array_sort (GValueArray *value_array,
|
|||||||
* Sort @value_array using @compare_func to compare the elements accoring
|
* Sort @value_array using @compare_func to compare the elements accoring
|
||||||
* to the semantics of #GCompareDataFunc.
|
* to the semantics of #GCompareDataFunc.
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* The current implementation uses Quick-Sort as sorting algorithm.
|
* The current implementation uses Quick-Sort as sorting algorithm.
|
||||||
*
|
*
|
||||||
* Returns: the #GValueArray passed in as @value_array
|
* Returns: the #GValueArray passed in as @value_array
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
#include "gvalue.h"
|
#include "gvalue.h"
|
||||||
#include "genums.h"
|
#include "genums.h"
|
||||||
|
|
||||||
#include "gobjectalias.h"
|
#include "gobjectalias.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
#include "gparam.h"
|
#include "gparam.h"
|
||||||
#include "gboxed.h"
|
#include "gboxed.h"
|
||||||
#include "genums.h"
|
#include "genums.h"
|
||||||
|
|
||||||
#include "gobjectalias.h"
|
#include "gobjectalias.h"
|
||||||
|
|
||||||
|
|
||||||
@ -1091,6 +1090,7 @@ g_value_set_gtype (GValue *value,
|
|||||||
* Get the contents of a %G_TYPE_GTYPE #GValue.
|
* Get the contents of a %G_TYPE_GTYPE #GValue.
|
||||||
*
|
*
|
||||||
* Since: 2.12
|
* Since: 2.12
|
||||||
|
*
|
||||||
* Returns: the #GType stored in @value
|
* Returns: the #GType stored in @value
|
||||||
*/
|
*/
|
||||||
GType
|
GType
|
||||||
@ -1105,10 +1105,10 @@ g_value_get_gtype (const GValue *value)
|
|||||||
* g_strdup_value_contents:
|
* g_strdup_value_contents:
|
||||||
* @value: #GValue which contents are to be described.
|
* @value: #GValue which contents are to be described.
|
||||||
*
|
*
|
||||||
* Return a newly allocated string, which describes the contents of a #GValue.
|
* Return a newly allocated string, which describes the contents of a
|
||||||
* The main purpose of this function is to describe #GValue contents for
|
* #GValue. The main purpose of this function is to describe #GValue
|
||||||
* debugging output, the way in which the contents are described may change
|
* contents for debugging output, the way in which the contents are
|
||||||
* between different GLib versions.
|
* described may change between different GLib versions.
|
||||||
*
|
*
|
||||||
* Returns: Newly allocated string.
|
* Returns: Newly allocated string.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user