mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01:00
fix some typos.
2001-06-03 Matthias Clasen <matthiasc@poet.de> * glib/tmpl/caches.sgml, glib/tmpl/main.sgml, gobject/gobject-docs.sgml, gobject/tmpl/generic_values.sgml, gobject/tmpl/gtypemodule.sgml, gobject/tmpl/signals.sgml, gobject/tmpl/types.sgml: fix some typos.
This commit is contained in:
parent
f37c13dbde
commit
f9a6307e06
@ -1,3 +1,10 @@
|
|||||||
|
2001-06-03 Matthias Clasen <matthiasc@poet.de>
|
||||||
|
|
||||||
|
* glib/tmpl/caches.sgml, glib/tmpl/main.sgml,
|
||||||
|
gobject/gobject-docs.sgml, gobject/tmpl/generic_values.sgml,
|
||||||
|
gobject/tmpl/gtypemodule.sgml, gobject/tmpl/signals.sgml,
|
||||||
|
gobject/tmpl/types.sgml: fix some typos.
|
||||||
|
|
||||||
Thu Jun 28 17:43:29 2001 Owen Taylor <otaylor@redhat.com>
|
Thu Jun 28 17:43:29 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib/tmpl/memory.sgml glib/tmpl/macros_misc.sgml: Add
|
* glib/tmpl/memory.sgml glib/tmpl/macros_misc.sgml: Add
|
||||||
|
@ -11,7 +11,7 @@ system resources.
|
|||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
GTK uses a #GCache for both GtkStyles and GdkGCs. These consume a lot of
|
GTK uses a #GCache for both GtkStyles and GdkGCs. These consume a lot of
|
||||||
resouces, so a #GCache is used to see if a GtkStyle or GdkGC with the
|
resources, so a #GCache is used to see if a GtkStyle or GdkGC with the
|
||||||
required properties already exists. If it does, then the existing
|
required properties already exists. If it does, then the existing
|
||||||
GtkStyle or GdkGC is used instead of creating a new one.
|
GtkStyle or GdkGC is used instead of creating a new one.
|
||||||
</para>
|
</para>
|
||||||
|
@ -59,7 +59,7 @@ manages all available sources of events.
|
|||||||
type is used for handling GDK events. A new source type is
|
type is used for handling GDK events. A new source type is
|
||||||
created by <firstterm>deriving</firstterm> from the #GSource
|
created by <firstterm>deriving</firstterm> from the #GSource
|
||||||
structure. The derived type of source is represented by a
|
structure. The derived type of source is represented by a
|
||||||
structure that has the #GSource structure as a first elemeent,
|
structure that has the #GSource structure as a first element,
|
||||||
and other elements specific to the new source type. To create
|
and other elements specific to the new source type. To create
|
||||||
an instance of the new source type, call g_source_new() passing
|
an instance of the new source type, call g_source_new() passing
|
||||||
in the size of the derived structure and a table of functions.
|
in the size of the derived structure and a table of functions.
|
||||||
|
@ -45,12 +45,12 @@
|
|||||||
doubles, enums and structured types, to name a few.
|
doubles, enums and structured types, to name a few.
|
||||||
</para></listitem></varlistentry>
|
</para></listitem></varlistentry>
|
||||||
<varlistentry><term></term><listitem><para>
|
<varlistentry><term></term><listitem><para>
|
||||||
* A sample fundamental type implementation to base object hirachies
|
* A sample fundamental type implementation to base object hierarchies
|
||||||
upon - the GObject fundamental type.
|
upon - the GObject fundamental type.
|
||||||
</para></listitem></varlistentry>
|
</para></listitem></varlistentry>
|
||||||
<varlistentry><term></term><listitem><para>
|
<varlistentry><term></term><listitem><para>
|
||||||
* A signal system that allowes very flexible user customization of
|
* A signal system that allows very flexible user customization of
|
||||||
virtual/overridable object methods and can serve as a powerfull
|
virtual/overridable object methods and can serve as a powerful
|
||||||
notification mechanism.
|
notification mechanism.
|
||||||
</para></listitem></varlistentry>
|
</para></listitem></varlistentry>
|
||||||
<varlistentry><term></term><listitem><para>
|
<varlistentry><term></term><listitem><para>
|
||||||
|
@ -11,7 +11,7 @@ of a type identifier and a specific value of that type.
|
|||||||
The type identifier within a #GValue structure always determines the
|
The type identifier within a #GValue structure always determines the
|
||||||
type of the associated value.
|
type of the associated value.
|
||||||
To create a undefined #GValue structure, simply create a zero-filled
|
To create a undefined #GValue structure, simply create a zero-filled
|
||||||
#GValue structure. To intialize the #GValue, use the g_value_init()
|
#GValue structure. To initialize the #GValue, use the g_value_init()
|
||||||
function. A #GValue cannot be used until it is initialized.
|
function. A #GValue cannot be used until it is initialized.
|
||||||
The basic type operations (such as freeing and copying) are determined
|
The basic type operations (such as freeing and copying) are determined
|
||||||
by the #GTypeValueTable associated with the type ID stored in the #GValue.
|
by the #GTypeValueTable associated with the type ID stored in the #GValue.
|
||||||
@ -229,7 +229,7 @@ to serve as a container for values of a type.
|
|||||||
does not allow NULL pointers, it needs to either spew an error,
|
does not allow NULL pointers, it needs to either spew an error,
|
||||||
or do an implicit conversion by storing an empty string.
|
or do an implicit conversion by storing an empty string.
|
||||||
The @value passed in to this function has a zero-filled data
|
The @value passed in to this function has a zero-filled data
|
||||||
array, so just like for @value_init it is guarranteed to not
|
array, so just like for @value_init it is guaranteed to not
|
||||||
contain any old contents that might need freeing.
|
contain any old contents that might need freeing.
|
||||||
@n_collect_values is exactly the string length of @collect_format,
|
@n_collect_values is exactly the string length of @collect_format,
|
||||||
and @collect_values is an array of unions #GTypeCValue with
|
and @collect_values is an array of unions #GTypeCValue with
|
||||||
@ -283,7 +283,7 @@ to serve as a container for values of a type.
|
|||||||
regardless of @collect_flags. For invalid objects, the example
|
regardless of @collect_flags. For invalid objects, the example
|
||||||
returns a newly allocated string without altering @value.
|
returns a newly allocated string without altering @value.
|
||||||
Upon success, collect_value() needs to return NULL, if however
|
Upon success, collect_value() needs to return NULL, if however
|
||||||
a malicious condition occoured, collect_value() may spew an
|
a malicious condition occurred, collect_value() may spew an
|
||||||
error by returning a newly allocated non-NULL string, giving
|
error by returning a newly allocated non-NULL string, giving
|
||||||
a suitable description of the error condition.
|
a suitable description of the error condition.
|
||||||
The calling code makes no assumptions about the @value
|
The calling code makes no assumptions about the @value
|
||||||
@ -295,7 +295,7 @@ to serve as a container for values of a type.
|
|||||||
any non-NULL return is considered a fatal condition so further
|
any non-NULL return is considered a fatal condition so further
|
||||||
program behaviour is undefined.
|
program behaviour is undefined.
|
||||||
@lcopy_format: Format description of the arguments to collect for @lcopy_value,
|
@lcopy_format: Format description of the arguments to collect for @lcopy_value,
|
||||||
analogous to @collect_format. Usually, @lcopy_format string consist
|
analogous to @collect_format. Usually, @lcopy_format string consists
|
||||||
only of 'p's to provide lcopy_value() with pointers to storage locations.
|
only of 'p's to provide lcopy_value() with pointers to storage locations.
|
||||||
@lcopy_value: This function is responsible for storing the @value contents into
|
@lcopy_value: This function is responsible for storing the @value contents into
|
||||||
arguments passed through a variable argument list which got
|
arguments passed through a variable argument list which got
|
||||||
|
@ -9,7 +9,7 @@ Type Loading Modules
|
|||||||
#GTypeModule provides a simple implementation of the #GTypePlugin
|
#GTypeModule provides a simple implementation of the #GTypePlugin
|
||||||
interface. The model of #GTypeModule is a dynamically loaded module
|
interface. The model of #GTypeModule is a dynamically loaded module
|
||||||
which implements some number of types and interface
|
which implements some number of types and interface
|
||||||
implementations. When the module is loaded, it registerse its types
|
implementations. When the module is loaded, it registers its types
|
||||||
and interfaces using g_type_module_register_type() and
|
and interfaces using g_type_module_register_type() and
|
||||||
g_type_module_add_interface(). As long as any instances of these
|
g_type_module_add_interface(). As long as any instances of these
|
||||||
types and interface implementations are in use, the module is kept
|
types and interface implementations are in use, the module is kept
|
||||||
@ -21,7 +21,7 @@ will be reloaded.
|
|||||||
Keeping track of whether the module should be loaded or not is done by
|
Keeping track of whether the module should be loaded or not is done by
|
||||||
using a use count - it starts at zero, and whenever it is greater than
|
using a use count - it starts at zero, and whenever it is greater than
|
||||||
zero, the module is loaded. The use count is maintained internally by
|
zero, the module is loaded. The use count is maintained internally by
|
||||||
the type system, but also can be explicitely controlled by
|
the type system, but also can be explicitly controlled by
|
||||||
g_type_module_use() and g_type_module_unuse(). Typically, when loading
|
g_type_module_use() and g_type_module_unuse(). Typically, when loading
|
||||||
a module for the first type, g_type_module_use() will be used to load
|
a module for the first type, g_type_module_use() will be used to load
|
||||||
it so that it can initialize its types. At some later point, when the
|
it so that it can initialize its types. At some later point, when the
|
||||||
|
@ -10,7 +10,7 @@ as general purpose notification mechanism.
|
|||||||
The basic concept of the signal system is that of the <emphasis>emission</emphasis>
|
The basic concept of the signal system is that of the <emphasis>emission</emphasis>
|
||||||
of a signal.
|
of a signal.
|
||||||
Signals are introduced per-type and are identified through strings.
|
Signals are introduced per-type and are identified through strings.
|
||||||
Signals introduced for a parent type are availale in derived types as well,
|
Signals introduced for a parent type are available in derived types as well,
|
||||||
so basically they are a per-type facility that is inherited.
|
so basically they are a per-type facility that is inherited.
|
||||||
A signal emission mainly involves invocation of a certain set of callbacks in
|
A signal emission mainly involves invocation of a certain set of callbacks in
|
||||||
precisely defined manner. There are two main categories of such callbacks,
|
precisely defined manner. There are two main categories of such callbacks,
|
||||||
@ -89,11 +89,11 @@ The signal accumulator is a special callback function that can be used
|
|||||||
to collect return values of the various callbacks that are called
|
to collect return values of the various callbacks that are called
|
||||||
during a signal emission. The signal accumulator is specified at signal
|
during a signal emission. The signal accumulator is specified at signal
|
||||||
creation time, if it is left NULL, no accumulation of callback return
|
creation time, if it is left NULL, no accumulation of callback return
|
||||||
values is perfomed. The return value of signal emissions is then the
|
values is performed. The return value of signal emissions is then the
|
||||||
value returned by the last callback.
|
value returned by the last callback.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@ihint: Signal invokation hint, see #GSignalInvocationHint.
|
@ihint: Signal invocation hint, see #GSignalInvocationHint.
|
||||||
@return_accu: Accumulator to collect callback return values in, this
|
@return_accu: Accumulator to collect callback return values in, this
|
||||||
is the return value of the current signal emission.
|
is the return value of the current signal emission.
|
||||||
@handler_return:
|
@handler_return:
|
||||||
@ -110,7 +110,7 @@ value returned by the last callback.
|
|||||||
This is the signature of marshaller functions, required to marshall
|
This is the signature of marshaller functions, required to marshall
|
||||||
arrays of parameter values to signal emissions into C language callback
|
arrays of parameter values to signal emissions into C language callback
|
||||||
invocations. It is merely an alias to #GClosureMarshal since the #GClosure
|
invocations. It is merely an alias to #GClosureMarshal since the #GClosure
|
||||||
mechanism takes over responsibility of actuall function invocation for the
|
mechanism takes over responsibility of actual function invocation for the
|
||||||
signal system.
|
signal system.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@ -133,8 +133,8 @@ signal system.
|
|||||||
|
|
||||||
<!-- ##### ENUM GSignalFlags ##### -->
|
<!-- ##### ENUM GSignalFlags ##### -->
|
||||||
<para>
|
<para>
|
||||||
The signal flags are used to specify a signal's behaviour, the overrall
|
The signal flags are used to specify a signal's behaviour, the overall
|
||||||
signal description outlines how especially the RUN flags controll the
|
signal description outlines how especially the RUN flags control the
|
||||||
stages of a signal emission.
|
stages of a signal emission.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@ -145,12 +145,12 @@ stages of a signal emission.
|
|||||||
emission for this very object will not be emitted recursively,
|
emission for this very object will not be emitted recursively,
|
||||||
but instead cause the first emission to be restarted.
|
but instead cause the first emission to be restarted.
|
||||||
@G_SIGNAL_DETAILED: This signal supports "::detail" appendixes to the signal name
|
@G_SIGNAL_DETAILED: This signal supports "::detail" appendixes to the signal name
|
||||||
upon hanlder connections and emissions.
|
upon handler connections and emissions.
|
||||||
@G_SIGNAL_ACTION: Action signals are signals that may freely be emitted on alive
|
@G_SIGNAL_ACTION: Action signals are signals that may freely be emitted on alive
|
||||||
objects from user code via g_signal_emit() and friends, without
|
objects from user code via g_signal_emit() and friends, without
|
||||||
the need of being embedded into extra code that performs pre or
|
the need of being embedded into extra code that performs pre or
|
||||||
post emission adjustments on the object. They can also be thought
|
post emission adjustments on the object. They can also be thought
|
||||||
of as by third-party code generically callable obejct methods.
|
of as by third-party code generically callable object methods.
|
||||||
@G_SIGNAL_NO_HOOKS: No emissions hooks are supported for this signal.
|
@G_SIGNAL_NO_HOOKS: No emissions hooks are supported for this signal.
|
||||||
|
|
||||||
<!-- ##### ENUM GSignalMatchType ##### -->
|
<!-- ##### ENUM GSignalMatchType ##### -->
|
||||||
@ -171,8 +171,8 @@ A structure holding in-depth information for a specific signal. It is
|
|||||||
filled in by the g_signal_query() function.
|
filled in by the g_signal_query() function.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@signal_id: The signal id of the signal being querried, or 0 if the
|
@signal_id: The signal id of the signal being queried, or 0 if the
|
||||||
signal to be querried was unknown.
|
signal to be queried was unknown.
|
||||||
@signal_name: The signal name.
|
@signal_name: The signal name.
|
||||||
@itype: The interface/instance type that this signal can be emitted for.
|
@itype: The interface/instance type that this signal can be emitted for.
|
||||||
@signal_flags: The signal flags as passed in to g_signal_new().
|
@signal_flags: The signal flags as passed in to g_signal_new().
|
||||||
@ -248,7 +248,7 @@ filled in by the g_signal_query() function.
|
|||||||
Query the signal system for in-depth information about a
|
Query the signal system for in-depth information about a
|
||||||
specific signal. This function will fill in a user-provided
|
specific signal. This function will fill in a user-provided
|
||||||
structure to hold signal-specific information. If an invalid
|
structure to hold signal-specific information. If an invalid
|
||||||
dignal id is passed in, the @signal_id member of the #GSignalQuery
|
signal id is passed in, the @signal_id member of the #GSignalQuery
|
||||||
is 0. All members filled into the #GSignalQuery structure should
|
is 0. All members filled into the #GSignalQuery structure should
|
||||||
be considered constant and have to be left untouched.
|
be considered constant and have to be left untouched.
|
||||||
</para>
|
</para>
|
||||||
@ -280,7 +280,7 @@ be considered constant and have to be left untouched.
|
|||||||
<!-- ##### FUNCTION g_signal_list_ids ##### -->
|
<!-- ##### FUNCTION g_signal_list_ids ##### -->
|
||||||
<para>
|
<para>
|
||||||
List the signals by id, that a certain instance or interface type
|
List the signals by id, that a certain instance or interface type
|
||||||
created. Further information about the signals can be aquired through
|
created. Further information about the signals can be acquired through
|
||||||
g_signal_query().
|
g_signal_query().
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@ -452,7 +452,7 @@ to be a valid signal handler id, connected to a signal of
|
|||||||
Find the first signal handler that matches certain selection criteria.
|
Find the first signal handler that matches certain selection criteria.
|
||||||
The criteria mask is passed as an OR-ed combination of #GSignalMatchType
|
The criteria mask is passed as an OR-ed combination of #GSignalMatchType
|
||||||
flags, and the criteria values are passed as arguments.
|
flags, and the criteria values are passed as arguments.
|
||||||
The match @mask has to be non-0 for successfull matches.
|
The match @mask has to be non-0 for successful matches.
|
||||||
If no handler was found, 0 is returned.
|
If no handler was found, 0 is returned.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@ -464,7 +464,7 @@ If no handler was found, 0 is returned.
|
|||||||
@closure: The closure the handler will invoke.
|
@closure: The closure the handler will invoke.
|
||||||
@func: The C closure callback of the handler (useless for non-C closures).
|
@func: The C closure callback of the handler (useless for non-C closures).
|
||||||
@data: The closure data of the handler's closure.
|
@data: The closure data of the handler's closure.
|
||||||
@Returns: A valid non-0 signal handler id for a successfull match.
|
@Returns: A valid non-0 signal handler id for a successful match.
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### FUNCTION g_signal_handlers_block_matched ##### -->
|
<!-- ##### FUNCTION g_signal_handlers_block_matched ##### -->
|
||||||
@ -473,7 +473,7 @@ This function blocks all handlers on an instance that match a certain
|
|||||||
selection criteria. The criteria mask is passed as an OR-ed combination of
|
selection criteria. The criteria mask is passed as an OR-ed combination of
|
||||||
#GSignalMatchType flags, and the criteria values are passed as arguments.
|
#GSignalMatchType flags, and the criteria values are passed as arguments.
|
||||||
Passing at least one of the %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC
|
Passing at least one of the %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC
|
||||||
or %G_SIGNAL_MATCH_DATA match flags is required for successfull matches.
|
or %G_SIGNAL_MATCH_DATA match flags is required for successful matches.
|
||||||
If no handlers were found, 0 is returned, the number of blocked handlers
|
If no handlers were found, 0 is returned, the number of blocked handlers
|
||||||
otherwise.
|
otherwise.
|
||||||
</para>
|
</para>
|
||||||
@ -495,7 +495,7 @@ This function unblocks all handlers on an instance that match a certain
|
|||||||
selection criteria. The criteria mask is passed as an OR-ed combination of
|
selection criteria. The criteria mask is passed as an OR-ed combination of
|
||||||
#GSignalMatchType flags, and the criteria values are passed as arguments.
|
#GSignalMatchType flags, and the criteria values are passed as arguments.
|
||||||
Passing at least one of the %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC
|
Passing at least one of the %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC
|
||||||
or %G_SIGNAL_MATCH_DATA match flags is required for successfull matches.
|
or %G_SIGNAL_MATCH_DATA match flags is required for successful matches.
|
||||||
If no handlers were found, 0 is returned, the number of unblocked handlers
|
If no handlers were found, 0 is returned, the number of unblocked handlers
|
||||||
otherwise. The match criteria should not apply to any handlers that are
|
otherwise. The match criteria should not apply to any handlers that are
|
||||||
not currently blocked.
|
not currently blocked.
|
||||||
@ -518,7 +518,7 @@ This function disconnects all handlers on an instance that match a certain
|
|||||||
selection criteria. The criteria mask is passed as an OR-ed combination of
|
selection criteria. The criteria mask is passed as an OR-ed combination of
|
||||||
#GSignalMatchType flags, and the criteria values are passed as arguments.
|
#GSignalMatchType flags, and the criteria values are passed as arguments.
|
||||||
Passing at least one of the %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC
|
Passing at least one of the %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC
|
||||||
or %G_SIGNAL_MATCH_DATA match flags is required for successfull matches.
|
or %G_SIGNAL_MATCH_DATA match flags is required for successful matches.
|
||||||
If no handlers were found, 0 is returned, the number of disconnected handlers
|
If no handlers were found, 0 is returned, the number of disconnected handlers
|
||||||
otherwise.
|
otherwise.
|
||||||
</para>
|
</para>
|
||||||
|
@ -49,7 +49,7 @@ type.
|
|||||||
<para>
|
<para>
|
||||||
Returns #TRUE if @type is a fundamental data type such as #G_TYPE_INT or
|
Returns #TRUE if @type is a fundamental data type such as #G_TYPE_INT or
|
||||||
#G_TYPE_POINTER. Fundamental types are types that serve as fundaments for
|
#G_TYPE_POINTER. Fundamental types are types that serve as fundaments for
|
||||||
the derived types, thus they are the roots of distinct inheritance heirachies.
|
the derived types, thus they are the roots of distinct inheritance hierarchies.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@type: A #GType value.
|
@type: A #GType value.
|
||||||
@ -102,7 +102,7 @@ derived classes.
|
|||||||
|
|
||||||
<!-- ##### MACRO G_TYPE_IS_DERIVED ##### -->
|
<!-- ##### MACRO G_TYPE_IS_DERIVED ##### -->
|
||||||
<para>
|
<para>
|
||||||
Returns #TRUE if @type is derived (or in object-oriented terminolgy:
|
Returns #TRUE if @type is derived (or in object-oriented terminology:
|
||||||
inherited) from another type (this holds true for all non-fundamental
|
inherited) from another type (this holds true for all non-fundamental
|
||||||
types).
|
types).
|
||||||
</para>
|
</para>
|
||||||
@ -258,7 +258,7 @@ across invocation of g_type_register_static().
|
|||||||
@n_preallocs: Number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching).
|
@n_preallocs: Number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching).
|
||||||
@instance_init: Location of the instance initialization function (optional, for instantiatable types only).
|
@instance_init: Location of the instance initialization function (optional, for instantiatable types only).
|
||||||
@value_table: A #GTypeValueTable function table for generic handling of GValues of this type (usualy only
|
@value_table: A #GTypeValueTable function table for generic handling of GValues of this type (usualy only
|
||||||
usefull for fundamental types).
|
useful for fundamental types).
|
||||||
|
|
||||||
<!-- ##### STRUCT GTypeFundamentalInfo ##### -->
|
<!-- ##### STRUCT GTypeFundamentalInfo ##### -->
|
||||||
<para>
|
<para>
|
||||||
@ -528,7 +528,7 @@ g_type_class_peek (g_type_parent (G_TYPE_FROM_CLASS (g_class)));
|
|||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@g_class: The #GTypeClass structure to retrive the parent class for.
|
@g_class: The #GTypeClass structure to retrieve the parent class for.
|
||||||
@Returns: The parent class of @g_class.
|
@Returns: The parent class of @g_class.
|
||||||
|
|
||||||
|
|
||||||
@ -645,7 +645,7 @@ class members, while dynamic class members (such as allocated strings
|
|||||||
or reference counted resources) are better handled by a GBaseInitFunc()
|
or reference counted resources) are better handled by a GBaseInitFunc()
|
||||||
for this type, so proper initialization of the dynamic class members
|
for this type, so proper initialization of the dynamic class members
|
||||||
are performed for class intialization of derived types as well.
|
are performed for class intialization of derived types as well.
|
||||||
An example may help to corrsepond the intend of the different class
|
An example may help to correspond the intend of the different class
|
||||||
initializers:
|
initializers:
|
||||||
|
|
||||||
<msgtext><programlisting>
|
<msgtext><programlisting>
|
||||||
@ -694,13 +694,13 @@ type_b_class_init (TypeBClass *class)
|
|||||||
Initialization of TypeBClass will first cause initialization of
|
Initialization of TypeBClass will first cause initialization of
|
||||||
TypeAClass (derived classes reference their parent classes, see
|
TypeAClass (derived classes reference their parent classes, see
|
||||||
g_type_class_ref() on this).
|
g_type_class_ref() on this).
|
||||||
Initialization of TypeAClass roughly involves zero-intializing its fields,
|
Initialization of TypeAClass roughly involves zero-initializing its fields,
|
||||||
then calling its GBaseInitFunc() type_a_base_class_init() that allocates
|
then calling its GBaseInitFunc() type_a_base_class_init() that allocates
|
||||||
its dynamic members (dynamic_string) and finally calling its GClassInitFunc()
|
its dynamic members (dynamic_string) and finally calling its GClassInitFunc()
|
||||||
type_a_class_init() to initialize its static members (static_integer).
|
type_a_class_init() to initialize its static members (static_integer).
|
||||||
The first step in the initialization process of TypeBClass is then
|
The first step in the initialization process of TypeBClass is then
|
||||||
a plain memory copy of the contents of TypeAClass into TypeBClass and
|
a plain memory copy of the contents of TypeAClass into TypeBClass and
|
||||||
zero intialization of the remaining fields in TypeBClass.
|
zero-initialization of the remaining fields in TypeBClass.
|
||||||
The dynamic members of TypeAClass within TypeBClass now need
|
The dynamic members of TypeAClass within TypeBClass now need
|
||||||
reinitialization which is performed by calling type_a_base_class_init()
|
reinitialization which is performed by calling type_a_base_class_init()
|
||||||
with an argument of TypeBClass.
|
with an argument of TypeBClass.
|
||||||
@ -737,7 +737,7 @@ reference count drops to zero).
|
|||||||
<para>
|
<para>
|
||||||
A callback function used by the type system to initialize a new
|
A callback function used by the type system to initialize a new
|
||||||
instance of a type. This function initializes all instance members and
|
instance of a type. This function initializes all instance members and
|
||||||
allocates any resources require by it.
|
allocates any resources required by it.
|
||||||
Initialization of a derived instance involves calling all its parent
|
Initialization of a derived instance involves calling all its parent
|
||||||
types instance initializers, therefore the class member of the instance
|
types instance initializers, therefore the class member of the instance
|
||||||
is altered during its initialization to always point to the class that
|
is altered during its initialization to always point to the class that
|
||||||
@ -841,7 +841,7 @@ name of a fundamental type. The type system uses the information
|
|||||||
contained in the #GTypeInfo structure pointed to by @info and the
|
contained in the #GTypeInfo structure pointed to by @info and the
|
||||||
#GTypeFundamentalInfo structure pointed to by @finfo to manage the
|
#GTypeFundamentalInfo structure pointed to by @finfo to manage the
|
||||||
type and its instances. The value of @flags determines additional
|
type and its instances. The value of @flags determines additional
|
||||||
characteristics of the funamental type.
|
characteristics of the fundamental type.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@type_id: A predefined #GTypeFundamentals value.
|
@type_id: A predefined #GTypeFundamentals value.
|
||||||
@ -918,10 +918,10 @@ are set for @type.
|
|||||||
<para>
|
<para>
|
||||||
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 can
|
||||||
be instantiated. The type system only performs basic allocation and
|
be instantiated. The type system only performs basic allocation and
|
||||||
structure setups for instances, actuall instance creation should happen
|
structure setups for instances, actual instance creation should happen
|
||||||
through functions supplied by the types fundamental type implementation.
|
through functions supplied by the types fundamental type implementation.
|
||||||
So use of g_type_create_instance() is reserved for implementators of
|
So use of g_type_create_instance() is reserved for implementators of
|
||||||
fundamental types only. E.g. instances of the #GObject heirachy
|
fundamental types only. E.g. instances of the #GObject hierarchy
|
||||||
should be created via g_object_new() and <emphasis>never</emphasis>
|
should be created via g_object_new() and <emphasis>never</emphasis>
|
||||||
directly through g_type_create_instance() which doesn't handle
|
directly through g_type_create_instance() which doesn't handle
|
||||||
things like singleton objects or object construction.
|
things like singleton objects or object construction.
|
||||||
@ -986,9 +986,9 @@ macro.
|
|||||||
|
|
||||||
<!-- ##### FUNCTION g_type_instance_is_a ##### -->
|
<!-- ##### FUNCTION g_type_instance_is_a ##### -->
|
||||||
<para>
|
<para>
|
||||||
Determines if @instance adhears to the interface exported
|
Determines if @instance adheres to the interface exported
|
||||||
by @iface_type. @iface_type is eitehr a type that @instance
|
by @iface_type. @iface_type is either a type that @instance
|
||||||
is derived from, or an interface type that is suppoted by
|
is derived from, or an interface type that is supported by
|
||||||
the anchestry of @instance.
|
the anchestry of @instance.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user