added newly added gobject/ headers.
Tue Oct 24 22:09:14 2000 Tim Janik <timj@gtk.org>
* glib-object.h: added newly added gobject/ headers.
* gmesage.c: print g_message() output to stderr instead of stdout.
Wed Oct 25 20:27:02 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_free_instance): for the moment, freeing object
structures will fill their memory portion with 0xAA. there's a
FIXME there, remove this line at a later point.
Tue Oct 24 23:10:26 2000 Tim Janik <timj@gtk.org>
* glib-genmarshal.1:
* glib-genmarshal.c: added publically installed marshaller generator.
* gtype.h: added G_TYPE_INSTANCE_GET_INTERFACE() to retrive a certain
interface VTable from instances.
Mon Oct 23 08:28:15 2000 Tim Janik <timj@gtk.org>
* gobject.[hc]: new functions for closure maintenance:
(g_object_watch_closure): maintain validity of the object and
the closure for objects that are used as data part of a closure.
(g_cclosure_new_object): convenience function to create C closures
that have an object as data argument.
(g_closure_new_object): convenience function to create closures
that have an object as data argument.
* gclosure.[hc]: implementation of GClosure mechanism.
a closure is basically an encapsulation of a callback function
and its environment. ideally, most places supporting callback
functions will simply take a GClosure* pointer and thus unify
callback environments wrg destroy notification etc.
GClosure provides destroy notifiers for arbitrary data pointers,
reference counting, invalidation notification (it can be invalidated
which is merely a deactivate state) and a marshallinbg abstraction.
GCClosure is also provided in these files, they present a specialized
GClosure implementation for C language callbacks.
* genum.c: macro cleanups.
* gboxed.[hc]: new files, for boxed type abstraction.
(g_boxed_copy): copy a boxed structure
(g_boxed_free): free a boxed structure
(g_value_set_boxed):
(g_value_get_boxed): standard GValue functions for boxed types
(g_boxed_type_register_static): convenience function for easy
introduction of new G_TYPE_BOXED derivatives.
* gparam.[hc]: introduced g_param_type_register_static(), a short hand
for creation of new GParamSpec derived types.
* gtype.[hc]: many fixes, introduced ability to flag individual
type nodes as ABSTRACT upon registration, added value_peek_pointer()
to the value table to peek at GValue contents as a pointer for types
that support this. fixed up GValue checks.
* gvalue.[hc]: added g_value_fits_pointer() and g_value_get_as_pointer()
to peek at the value contents as pointer.
* *.[hc]: adaptions to type macro fixes and changes in the type
registration API.
* many const corrections over the place.
Sat Oct 21 02:49:56 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_conforms_to): this function basically behaves like
and is_a check, except that it _additionally_ features interfaces
for instantiatable types. enforce this in the second branch as well
(`type' conforms_to `type') even if `type' is not an interface type.
Fri Oct 20 15:31:04 2000 Tim Janik <timj@gtk.org>
* gvaluetypes.[hc]: added G_TYPE_POINTER implementation from jrb.
* gtype.[hc]:
* gobject.c:
* gvaluetypes.c: added GTypeValueTable.value_peek_pointer and
suitable implementations of this for G_TYPE_STRING, G_TYPE_OBJECT
and G_TYPE_POINTER.
Mon Aug 21 04:13:37 2000 Tim Janik <timj@gtk.org>
* gbsearcharray.[hc]: long standing needed generic implementation
of a binary searchable, sorted and dynamically sized array.
2000-10-25 22:36:35 +02:00
|
|
|
/* GObject - GLib Type, Object, Parameter and Signal Library
|
changed prototype of g_boxed_type_register_static() to contain an optional
Wed Mar 7 09:36:33 2001 Tim Janik <timj@gtk.org>
* gboxed.[hc]: changed prototype of g_boxed_type_register_static()
to contain an optional init function and a hint at whether the
boxed structure uses ref counting internally.
added g_value_set_boxed_take_ownership().
made G_TYPE_BOXED an abstract value type.
* genums.[hc]: made G_TYPE_ENUM and G_TYPE_FLAGS abstract value
types.
* glib-genmarshal.c: argument type changes, preparation for third-party
arg specification.
* gobject.[hc]: cleaned up get/set property code.
added g_strdup_value_contents() to improve warnings.
* gparam.[hc]: added g_param_value_convert(), taking over responsibility
of the old g_value_convert(). added G_PARAM_LAX_VALIDATION flag so
validation alterations may be valid a part of the property setting
process.
* gparamspecs.[hc]: made value comparisons stable (for sort applications).
added GParamSpecValueArray, a param spec for value arrays and
GParamSpecClosure. nuked the value exchange functions and
GParamSpecCCallback.
* gtype.[hc]: catch unintialized usages of the type system with
g_return_val_if_uninitialized(). introduced G_TYPE_FLAG_VALUE_ABSTRACT
to flag types that introduce a value table, but can't be used for
g_value_init(). cleaned up reserved type ids.
* gvalue.[hc]: code cleanups and saner checking.
nuked the value exchange API. implemented value transformations, we
can't really "convert" values, rather transforms are an anylogy to
C casts, real conversions need a param spec for validation, which is
why g_param_value_convert() does real conversions now.
* gvaluearray.[hc]: new files that implement a GValueArray, a struct
that can hold inhomogeneous arrays of value (to that extend that it
also allowes undefined values, i.e. G_VALUE_TYPE(value)==0).
this is exposed to the type system as a boxed type.
* gvaluetransform.c: new file implementing most of the former value
exchange functions as single-sided transformations.
* gvaluetypes.[hc]: nuked G_TYPE_CCALLBACK, added
g_value_set_string_take_ownership().
* *.h: s/G_IS_VALUE_/G_VALUE_HOLDS_/.
* *.[hc]: many fixes and cleanups.
* many warning improvements.
Tue Feb 27 18:35:15 2001 Tim Janik <timj@gtk.org>
* gobject.c (g_object_get_valist): urg, pass G_VALUE_NOCOPY_CONTENTS
into G_VALUE_LCOPY(), this needs proper documenting.
* gparam.c: fixed G_PARAM_USER_MASK.
* gtype.c (type_data_make_W):
(type_data_last_unref_Wm): fixed invalid memory freeing.
* gobject.c (g_object_last_unref): destroy signal handlers associated
with object, right before finalization.
* gsignal.c (g_signal_parse_name): catch destroyed nodes or signals
that don't actually support details.
* gobject.[hc]: got rid of property trailers. nuked GObject
properties "data" and the "signal" variants.
(g_object_connect): new convenience function to do multiple
signal connections at once.
(g_object_disconnect): likewise, for disconnections.
* gparam.[hc] (g_param_spec_pool_lookup): took out trailer support.
* gvalue.[hc]: marked g_value_fits_pointer() and g_value_peek_pointer()
as private (the latter got renamed from g_value_get_as_pointer()).
Wed Mar 7 09:32:06 2001 Tim Janik <timj@gtk.org>
* glib-object.h: add gvaluearray.h.
* gstring.[hc]: fixup naming of g_string_sprint*.
* gtypes.h: fixed GCompareDataFunc naming.
Wed Mar 7 09:33:27 2001 Tim Janik <timj@gtk.org>
* gobject/Makefile.am: shuffled rules to avoid excessive
rebuilds.
* gobject/gobject-sections.txt: updates.
* gobject/tmpl/*: bunch of updates, added another patch
from Eric Lemings <eric.b.lemings@lmco.com>.
2001-03-07 15:46:45 +01:00
|
|
|
* Copyright (C) 2000-2001 Red Hat, Inc.
|
added newly added gobject/ headers.
Tue Oct 24 22:09:14 2000 Tim Janik <timj@gtk.org>
* glib-object.h: added newly added gobject/ headers.
* gmesage.c: print g_message() output to stderr instead of stdout.
Wed Oct 25 20:27:02 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_free_instance): for the moment, freeing object
structures will fill their memory portion with 0xAA. there's a
FIXME there, remove this line at a later point.
Tue Oct 24 23:10:26 2000 Tim Janik <timj@gtk.org>
* glib-genmarshal.1:
* glib-genmarshal.c: added publically installed marshaller generator.
* gtype.h: added G_TYPE_INSTANCE_GET_INTERFACE() to retrive a certain
interface VTable from instances.
Mon Oct 23 08:28:15 2000 Tim Janik <timj@gtk.org>
* gobject.[hc]: new functions for closure maintenance:
(g_object_watch_closure): maintain validity of the object and
the closure for objects that are used as data part of a closure.
(g_cclosure_new_object): convenience function to create C closures
that have an object as data argument.
(g_closure_new_object): convenience function to create closures
that have an object as data argument.
* gclosure.[hc]: implementation of GClosure mechanism.
a closure is basically an encapsulation of a callback function
and its environment. ideally, most places supporting callback
functions will simply take a GClosure* pointer and thus unify
callback environments wrg destroy notification etc.
GClosure provides destroy notifiers for arbitrary data pointers,
reference counting, invalidation notification (it can be invalidated
which is merely a deactivate state) and a marshallinbg abstraction.
GCClosure is also provided in these files, they present a specialized
GClosure implementation for C language callbacks.
* genum.c: macro cleanups.
* gboxed.[hc]: new files, for boxed type abstraction.
(g_boxed_copy): copy a boxed structure
(g_boxed_free): free a boxed structure
(g_value_set_boxed):
(g_value_get_boxed): standard GValue functions for boxed types
(g_boxed_type_register_static): convenience function for easy
introduction of new G_TYPE_BOXED derivatives.
* gparam.[hc]: introduced g_param_type_register_static(), a short hand
for creation of new GParamSpec derived types.
* gtype.[hc]: many fixes, introduced ability to flag individual
type nodes as ABSTRACT upon registration, added value_peek_pointer()
to the value table to peek at GValue contents as a pointer for types
that support this. fixed up GValue checks.
* gvalue.[hc]: added g_value_fits_pointer() and g_value_get_as_pointer()
to peek at the value contents as pointer.
* *.[hc]: adaptions to type macro fixes and changes in the type
registration API.
* many const corrections over the place.
Sat Oct 21 02:49:56 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_conforms_to): this function basically behaves like
and is_a check, except that it _additionally_ features interfaces
for instantiatable types. enforce this in the second branch as well
(`type' conforms_to `type') even if `type' is not an interface type.
Fri Oct 20 15:31:04 2000 Tim Janik <timj@gtk.org>
* gvaluetypes.[hc]: added G_TYPE_POINTER implementation from jrb.
* gtype.[hc]:
* gobject.c:
* gvaluetypes.c: added GTypeValueTable.value_peek_pointer and
suitable implementations of this for G_TYPE_STRING, G_TYPE_OBJECT
and G_TYPE_POINTER.
Mon Aug 21 04:13:37 2000 Tim Janik <timj@gtk.org>
* gbsearcharray.[hc]: long standing needed generic implementation
of a binary searchable, sorted and dynamically sized array.
2000-10-25 22:36:35 +02:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
2017-01-05 14:09:06 +01:00
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
added newly added gobject/ headers.
Tue Oct 24 22:09:14 2000 Tim Janik <timj@gtk.org>
* glib-object.h: added newly added gobject/ headers.
* gmesage.c: print g_message() output to stderr instead of stdout.
Wed Oct 25 20:27:02 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_free_instance): for the moment, freeing object
structures will fill their memory portion with 0xAA. there's a
FIXME there, remove this line at a later point.
Tue Oct 24 23:10:26 2000 Tim Janik <timj@gtk.org>
* glib-genmarshal.1:
* glib-genmarshal.c: added publically installed marshaller generator.
* gtype.h: added G_TYPE_INSTANCE_GET_INTERFACE() to retrive a certain
interface VTable from instances.
Mon Oct 23 08:28:15 2000 Tim Janik <timj@gtk.org>
* gobject.[hc]: new functions for closure maintenance:
(g_object_watch_closure): maintain validity of the object and
the closure for objects that are used as data part of a closure.
(g_cclosure_new_object): convenience function to create C closures
that have an object as data argument.
(g_closure_new_object): convenience function to create closures
that have an object as data argument.
* gclosure.[hc]: implementation of GClosure mechanism.
a closure is basically an encapsulation of a callback function
and its environment. ideally, most places supporting callback
functions will simply take a GClosure* pointer and thus unify
callback environments wrg destroy notification etc.
GClosure provides destroy notifiers for arbitrary data pointers,
reference counting, invalidation notification (it can be invalidated
which is merely a deactivate state) and a marshallinbg abstraction.
GCClosure is also provided in these files, they present a specialized
GClosure implementation for C language callbacks.
* genum.c: macro cleanups.
* gboxed.[hc]: new files, for boxed type abstraction.
(g_boxed_copy): copy a boxed structure
(g_boxed_free): free a boxed structure
(g_value_set_boxed):
(g_value_get_boxed): standard GValue functions for boxed types
(g_boxed_type_register_static): convenience function for easy
introduction of new G_TYPE_BOXED derivatives.
* gparam.[hc]: introduced g_param_type_register_static(), a short hand
for creation of new GParamSpec derived types.
* gtype.[hc]: many fixes, introduced ability to flag individual
type nodes as ABSTRACT upon registration, added value_peek_pointer()
to the value table to peek at GValue contents as a pointer for types
that support this. fixed up GValue checks.
* gvalue.[hc]: added g_value_fits_pointer() and g_value_get_as_pointer()
to peek at the value contents as pointer.
* *.[hc]: adaptions to type macro fixes and changes in the type
registration API.
* many const corrections over the place.
Sat Oct 21 02:49:56 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_conforms_to): this function basically behaves like
and is_a check, except that it _additionally_ features interfaces
for instantiatable types. enforce this in the second branch as well
(`type' conforms_to `type') even if `type' is not an interface type.
Fri Oct 20 15:31:04 2000 Tim Janik <timj@gtk.org>
* gvaluetypes.[hc]: added G_TYPE_POINTER implementation from jrb.
* gtype.[hc]:
* gobject.c:
* gvaluetypes.c: added GTypeValueTable.value_peek_pointer and
suitable implementations of this for G_TYPE_STRING, G_TYPE_OBJECT
and G_TYPE_POINTER.
Mon Aug 21 04:13:37 2000 Tim Janik <timj@gtk.org>
* gbsearcharray.[hc]: long standing needed generic implementation
of a binary searchable, sorted and dynamically sized array.
2000-10-25 22:36:35 +02:00
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2000-11-01 04:03:04 +01:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
added newly added gobject/ headers.
Tue Oct 24 22:09:14 2000 Tim Janik <timj@gtk.org>
* glib-object.h: added newly added gobject/ headers.
* gmesage.c: print g_message() output to stderr instead of stdout.
Wed Oct 25 20:27:02 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_free_instance): for the moment, freeing object
structures will fill their memory portion with 0xAA. there's a
FIXME there, remove this line at a later point.
Tue Oct 24 23:10:26 2000 Tim Janik <timj@gtk.org>
* glib-genmarshal.1:
* glib-genmarshal.c: added publically installed marshaller generator.
* gtype.h: added G_TYPE_INSTANCE_GET_INTERFACE() to retrive a certain
interface VTable from instances.
Mon Oct 23 08:28:15 2000 Tim Janik <timj@gtk.org>
* gobject.[hc]: new functions for closure maintenance:
(g_object_watch_closure): maintain validity of the object and
the closure for objects that are used as data part of a closure.
(g_cclosure_new_object): convenience function to create C closures
that have an object as data argument.
(g_closure_new_object): convenience function to create closures
that have an object as data argument.
* gclosure.[hc]: implementation of GClosure mechanism.
a closure is basically an encapsulation of a callback function
and its environment. ideally, most places supporting callback
functions will simply take a GClosure* pointer and thus unify
callback environments wrg destroy notification etc.
GClosure provides destroy notifiers for arbitrary data pointers,
reference counting, invalidation notification (it can be invalidated
which is merely a deactivate state) and a marshallinbg abstraction.
GCClosure is also provided in these files, they present a specialized
GClosure implementation for C language callbacks.
* genum.c: macro cleanups.
* gboxed.[hc]: new files, for boxed type abstraction.
(g_boxed_copy): copy a boxed structure
(g_boxed_free): free a boxed structure
(g_value_set_boxed):
(g_value_get_boxed): standard GValue functions for boxed types
(g_boxed_type_register_static): convenience function for easy
introduction of new G_TYPE_BOXED derivatives.
* gparam.[hc]: introduced g_param_type_register_static(), a short hand
for creation of new GParamSpec derived types.
* gtype.[hc]: many fixes, introduced ability to flag individual
type nodes as ABSTRACT upon registration, added value_peek_pointer()
to the value table to peek at GValue contents as a pointer for types
that support this. fixed up GValue checks.
* gvalue.[hc]: added g_value_fits_pointer() and g_value_get_as_pointer()
to peek at the value contents as pointer.
* *.[hc]: adaptions to type macro fixes and changes in the type
registration API.
* many const corrections over the place.
Sat Oct 21 02:49:56 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_conforms_to): this function basically behaves like
and is_a check, except that it _additionally_ features interfaces
for instantiatable types. enforce this in the second branch as well
(`type' conforms_to `type') even if `type' is not an interface type.
Fri Oct 20 15:31:04 2000 Tim Janik <timj@gtk.org>
* gvaluetypes.[hc]: added G_TYPE_POINTER implementation from jrb.
* gtype.[hc]:
* gobject.c:
* gvaluetypes.c: added GTypeValueTable.value_peek_pointer and
suitable implementations of this for G_TYPE_STRING, G_TYPE_OBJECT
and G_TYPE_POINTER.
Mon Aug 21 04:13:37 2000 Tim Janik <timj@gtk.org>
* gbsearcharray.[hc]: long standing needed generic implementation
of a binary searchable, sorted and dynamically sized array.
2000-10-25 22:36:35 +02:00
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General
|
2014-01-23 12:58:29 +01:00
|
|
|
* Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
added newly added gobject/ headers.
Tue Oct 24 22:09:14 2000 Tim Janik <timj@gtk.org>
* glib-object.h: added newly added gobject/ headers.
* gmesage.c: print g_message() output to stderr instead of stdout.
Wed Oct 25 20:27:02 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_free_instance): for the moment, freeing object
structures will fill their memory portion with 0xAA. there's a
FIXME there, remove this line at a later point.
Tue Oct 24 23:10:26 2000 Tim Janik <timj@gtk.org>
* glib-genmarshal.1:
* glib-genmarshal.c: added publically installed marshaller generator.
* gtype.h: added G_TYPE_INSTANCE_GET_INTERFACE() to retrive a certain
interface VTable from instances.
Mon Oct 23 08:28:15 2000 Tim Janik <timj@gtk.org>
* gobject.[hc]: new functions for closure maintenance:
(g_object_watch_closure): maintain validity of the object and
the closure for objects that are used as data part of a closure.
(g_cclosure_new_object): convenience function to create C closures
that have an object as data argument.
(g_closure_new_object): convenience function to create closures
that have an object as data argument.
* gclosure.[hc]: implementation of GClosure mechanism.
a closure is basically an encapsulation of a callback function
and its environment. ideally, most places supporting callback
functions will simply take a GClosure* pointer and thus unify
callback environments wrg destroy notification etc.
GClosure provides destroy notifiers for arbitrary data pointers,
reference counting, invalidation notification (it can be invalidated
which is merely a deactivate state) and a marshallinbg abstraction.
GCClosure is also provided in these files, they present a specialized
GClosure implementation for C language callbacks.
* genum.c: macro cleanups.
* gboxed.[hc]: new files, for boxed type abstraction.
(g_boxed_copy): copy a boxed structure
(g_boxed_free): free a boxed structure
(g_value_set_boxed):
(g_value_get_boxed): standard GValue functions for boxed types
(g_boxed_type_register_static): convenience function for easy
introduction of new G_TYPE_BOXED derivatives.
* gparam.[hc]: introduced g_param_type_register_static(), a short hand
for creation of new GParamSpec derived types.
* gtype.[hc]: many fixes, introduced ability to flag individual
type nodes as ABSTRACT upon registration, added value_peek_pointer()
to the value table to peek at GValue contents as a pointer for types
that support this. fixed up GValue checks.
* gvalue.[hc]: added g_value_fits_pointer() and g_value_get_as_pointer()
to peek at the value contents as pointer.
* *.[hc]: adaptions to type macro fixes and changes in the type
registration API.
* many const corrections over the place.
Sat Oct 21 02:49:56 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_conforms_to): this function basically behaves like
and is_a check, except that it _additionally_ features interfaces
for instantiatable types. enforce this in the second branch as well
(`type' conforms_to `type') even if `type' is not an interface type.
Fri Oct 20 15:31:04 2000 Tim Janik <timj@gtk.org>
* gvaluetypes.[hc]: added G_TYPE_POINTER implementation from jrb.
* gtype.[hc]:
* gobject.c:
* gvaluetypes.c: added GTypeValueTable.value_peek_pointer and
suitable implementations of this for G_TYPE_STRING, G_TYPE_OBJECT
and G_TYPE_POINTER.
Mon Aug 21 04:13:37 2000 Tim Janik <timj@gtk.org>
* gbsearcharray.[hc]: long standing needed generic implementation
of a binary searchable, sorted and dynamically sized array.
2000-10-25 22:36:35 +02:00
|
|
|
*/
|
2012-12-28 05:43:14 +01:00
|
|
|
#ifndef __G_SIGNAL_H__
|
|
|
|
#define __G_SIGNAL_H__
|
|
|
|
|
2001-11-18 01:38:48 +01:00
|
|
|
#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
|
|
|
|
#error "Only <glib-object.h> can be included directly."
|
|
|
|
#endif
|
added newly added gobject/ headers.
Tue Oct 24 22:09:14 2000 Tim Janik <timj@gtk.org>
* glib-object.h: added newly added gobject/ headers.
* gmesage.c: print g_message() output to stderr instead of stdout.
Wed Oct 25 20:27:02 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_free_instance): for the moment, freeing object
structures will fill their memory portion with 0xAA. there's a
FIXME there, remove this line at a later point.
Tue Oct 24 23:10:26 2000 Tim Janik <timj@gtk.org>
* glib-genmarshal.1:
* glib-genmarshal.c: added publically installed marshaller generator.
* gtype.h: added G_TYPE_INSTANCE_GET_INTERFACE() to retrive a certain
interface VTable from instances.
Mon Oct 23 08:28:15 2000 Tim Janik <timj@gtk.org>
* gobject.[hc]: new functions for closure maintenance:
(g_object_watch_closure): maintain validity of the object and
the closure for objects that are used as data part of a closure.
(g_cclosure_new_object): convenience function to create C closures
that have an object as data argument.
(g_closure_new_object): convenience function to create closures
that have an object as data argument.
* gclosure.[hc]: implementation of GClosure mechanism.
a closure is basically an encapsulation of a callback function
and its environment. ideally, most places supporting callback
functions will simply take a GClosure* pointer and thus unify
callback environments wrg destroy notification etc.
GClosure provides destroy notifiers for arbitrary data pointers,
reference counting, invalidation notification (it can be invalidated
which is merely a deactivate state) and a marshallinbg abstraction.
GCClosure is also provided in these files, they present a specialized
GClosure implementation for C language callbacks.
* genum.c: macro cleanups.
* gboxed.[hc]: new files, for boxed type abstraction.
(g_boxed_copy): copy a boxed structure
(g_boxed_free): free a boxed structure
(g_value_set_boxed):
(g_value_get_boxed): standard GValue functions for boxed types
(g_boxed_type_register_static): convenience function for easy
introduction of new G_TYPE_BOXED derivatives.
* gparam.[hc]: introduced g_param_type_register_static(), a short hand
for creation of new GParamSpec derived types.
* gtype.[hc]: many fixes, introduced ability to flag individual
type nodes as ABSTRACT upon registration, added value_peek_pointer()
to the value table to peek at GValue contents as a pointer for types
that support this. fixed up GValue checks.
* gvalue.[hc]: added g_value_fits_pointer() and g_value_get_as_pointer()
to peek at the value contents as pointer.
* *.[hc]: adaptions to type macro fixes and changes in the type
registration API.
* many const corrections over the place.
Sat Oct 21 02:49:56 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_conforms_to): this function basically behaves like
and is_a check, except that it _additionally_ features interfaces
for instantiatable types. enforce this in the second branch as well
(`type' conforms_to `type') even if `type' is not an interface type.
Fri Oct 20 15:31:04 2000 Tim Janik <timj@gtk.org>
* gvaluetypes.[hc]: added G_TYPE_POINTER implementation from jrb.
* gtype.[hc]:
* gobject.c:
* gvaluetypes.c: added GTypeValueTable.value_peek_pointer and
suitable implementations of this for G_TYPE_STRING, G_TYPE_OBJECT
and G_TYPE_POINTER.
Mon Aug 21 04:13:37 2000 Tim Janik <timj@gtk.org>
* gbsearcharray.[hc]: long standing needed generic implementation
of a binary searchable, sorted and dynamically sized array.
2000-10-25 22:36:35 +02:00
|
|
|
|
|
|
|
#include <gobject/gclosure.h>
|
|
|
|
#include <gobject/gvalue.h>
|
|
|
|
#include <gobject/gparam.h>
|
fixed dealing with collection/lcopy of NULL values.
Mon Dec 11 04:44:11 2000 Tim Janik <timj@gtk.org>
* gboxed.c: fixed dealing with collection/lcopy of NULL values.
* gclosure.h: removed insane ramblings, added G_CALLBACK() a casting
convenience macro.
* Makefile.am: cleanups, marshaller generation rules.
* gmarshal.[hc]: new files with GRuntime standard marshallers.
* glib-genmarshal.c: fix log domain, support gruntime standard
marshallers, suport G_TYPE_PARAM, come with extern "C" and
#include gmarshal.h.
* glib-genmarshal.1: reflect glib-genmarshal.c updates.
* gobject.[hc]: implement object constructor. rework parameter
changed notification queueing, we support queue freezes now and
don't dispatch from an idle handler anymore.
parameter->property rename hassle.
implemented ::properties_changed and ::notify::* signals for
property change notification (the later supports property names
as details). added signal connection and named data properties.
(g_signal_connect_object): new function to setup while_alive
connections.
(g_object_class_install_property): sink properties now, since they
are initially floating.
(g_object_steal_data):
(g_object_set_data_full):
(g_object_set_data):
(g_object_get_data): set/get data by using g_datalist_*() functions
directly.
(g_object_queue_param_changed): nuked.
(g_object_freeze_notify): start queueing of property changes (freeze/
thaw calls stack).
(g_object_notify): announce changes of a certain property directly.
(g_object_thaw_notify): process queue of property changes, therefore
emitting GObject::notify::detail with detail being the changed
properties names.
(G_OBJECT_WARN_INVALID_PROPERTY_ID): saner macro variant of former
G_WARN_INVALID_PARAM_ID().
* gparam.[hc]: param specs are now initially floating and need to be
sunken with g_param_spec_sink(), support G_TYPE_PARAM values.
added G_PARAM_CONSTRUCT and G_PARAM_CONSTRUCT_ONLY parameter flags,
required by GObjectClass.constructor().
* gparamspecs.[hc]: added GParamSpecParam, GParamSpecPointer and
GParamSpecCCallback, param specs for G_TYPE_PARAM, G_TYPE_POINTER
and G_TYPE_CCALLBACK respectively.
* gsignal.[hc]: cleanups.
(signal_id_lookup): after walking the anchestry, try interfaces as well.
(g_signal_new): new function to create signals from varargs type list.
(g_signal_connect_closure): closure connection variant that works from
signal name+detail.
(g_signal_connect_data): c handler connection variant that works from
signal name+detail.
(g_signal_emit_valist): emit signal for an instance with paraneters
collected from a va_list.
(g_signal_emit): emit signal, taking parameters from varargs list.
(g_signal_emit_by_name): same as g_signal_emit, working from
signal name+detail.
(signal_emit_R): return whether return_value needs to be altered.
* gtype.[hc]: set log-domain to GRuntime, i'm slowly getting to all
the points that need to reflect the upcoming rename.
melt g_type_conforms_to() functionality into g_type_is_a(), as that
is what we really want (liskov substitution principle).
assorted changes to other files due to conforms_to->is_a.
* gvalue.[hc]: implemented g_value_set_instance() that sets a value
from an instantiatable type via the value_table's collect_value()
function (based on an idea from James Henstridge <james@daa.com.au>).
cleanups/fixes.
* gvaluetypes.[hc]: implement G_TYPE_CCALLBACK and G_TYPE_PARAM.
2000-12-12 08:32:00 +01:00
|
|
|
#include <gobject/gmarshal.h>
|
added newly added gobject/ headers.
Tue Oct 24 22:09:14 2000 Tim Janik <timj@gtk.org>
* glib-object.h: added newly added gobject/ headers.
* gmesage.c: print g_message() output to stderr instead of stdout.
Wed Oct 25 20:27:02 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_free_instance): for the moment, freeing object
structures will fill their memory portion with 0xAA. there's a
FIXME there, remove this line at a later point.
Tue Oct 24 23:10:26 2000 Tim Janik <timj@gtk.org>
* glib-genmarshal.1:
* glib-genmarshal.c: added publically installed marshaller generator.
* gtype.h: added G_TYPE_INSTANCE_GET_INTERFACE() to retrive a certain
interface VTable from instances.
Mon Oct 23 08:28:15 2000 Tim Janik <timj@gtk.org>
* gobject.[hc]: new functions for closure maintenance:
(g_object_watch_closure): maintain validity of the object and
the closure for objects that are used as data part of a closure.
(g_cclosure_new_object): convenience function to create C closures
that have an object as data argument.
(g_closure_new_object): convenience function to create closures
that have an object as data argument.
* gclosure.[hc]: implementation of GClosure mechanism.
a closure is basically an encapsulation of a callback function
and its environment. ideally, most places supporting callback
functions will simply take a GClosure* pointer and thus unify
callback environments wrg destroy notification etc.
GClosure provides destroy notifiers for arbitrary data pointers,
reference counting, invalidation notification (it can be invalidated
which is merely a deactivate state) and a marshallinbg abstraction.
GCClosure is also provided in these files, they present a specialized
GClosure implementation for C language callbacks.
* genum.c: macro cleanups.
* gboxed.[hc]: new files, for boxed type abstraction.
(g_boxed_copy): copy a boxed structure
(g_boxed_free): free a boxed structure
(g_value_set_boxed):
(g_value_get_boxed): standard GValue functions for boxed types
(g_boxed_type_register_static): convenience function for easy
introduction of new G_TYPE_BOXED derivatives.
* gparam.[hc]: introduced g_param_type_register_static(), a short hand
for creation of new GParamSpec derived types.
* gtype.[hc]: many fixes, introduced ability to flag individual
type nodes as ABSTRACT upon registration, added value_peek_pointer()
to the value table to peek at GValue contents as a pointer for types
that support this. fixed up GValue checks.
* gvalue.[hc]: added g_value_fits_pointer() and g_value_get_as_pointer()
to peek at the value contents as pointer.
* *.[hc]: adaptions to type macro fixes and changes in the type
registration API.
* many const corrections over the place.
Sat Oct 21 02:49:56 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_conforms_to): this function basically behaves like
and is_a check, except that it _additionally_ features interfaces
for instantiatable types. enforce this in the second branch as well
(`type' conforms_to `type') even if `type' is not an interface type.
Fri Oct 20 15:31:04 2000 Tim Janik <timj@gtk.org>
* gvaluetypes.[hc]: added G_TYPE_POINTER implementation from jrb.
* gtype.[hc]:
* gobject.c:
* gvaluetypes.c: added GTypeValueTable.value_peek_pointer and
suitable implementations of this for G_TYPE_STRING, G_TYPE_OBJECT
and G_TYPE_POINTER.
Mon Aug 21 04:13:37 2000 Tim Janik <timj@gtk.org>
* gbsearcharray.[hc]: long standing needed generic implementation
of a binary searchable, sorted and dynamically sized array.
2000-10-25 22:36:35 +02:00
|
|
|
|
2001-03-09 22:39:51 +01:00
|
|
|
G_BEGIN_DECLS
|
added newly added gobject/ headers.
Tue Oct 24 22:09:14 2000 Tim Janik <timj@gtk.org>
* glib-object.h: added newly added gobject/ headers.
* gmesage.c: print g_message() output to stderr instead of stdout.
Wed Oct 25 20:27:02 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_free_instance): for the moment, freeing object
structures will fill their memory portion with 0xAA. there's a
FIXME there, remove this line at a later point.
Tue Oct 24 23:10:26 2000 Tim Janik <timj@gtk.org>
* glib-genmarshal.1:
* glib-genmarshal.c: added publically installed marshaller generator.
* gtype.h: added G_TYPE_INSTANCE_GET_INTERFACE() to retrive a certain
interface VTable from instances.
Mon Oct 23 08:28:15 2000 Tim Janik <timj@gtk.org>
* gobject.[hc]: new functions for closure maintenance:
(g_object_watch_closure): maintain validity of the object and
the closure for objects that are used as data part of a closure.
(g_cclosure_new_object): convenience function to create C closures
that have an object as data argument.
(g_closure_new_object): convenience function to create closures
that have an object as data argument.
* gclosure.[hc]: implementation of GClosure mechanism.
a closure is basically an encapsulation of a callback function
and its environment. ideally, most places supporting callback
functions will simply take a GClosure* pointer and thus unify
callback environments wrg destroy notification etc.
GClosure provides destroy notifiers for arbitrary data pointers,
reference counting, invalidation notification (it can be invalidated
which is merely a deactivate state) and a marshallinbg abstraction.
GCClosure is also provided in these files, they present a specialized
GClosure implementation for C language callbacks.
* genum.c: macro cleanups.
* gboxed.[hc]: new files, for boxed type abstraction.
(g_boxed_copy): copy a boxed structure
(g_boxed_free): free a boxed structure
(g_value_set_boxed):
(g_value_get_boxed): standard GValue functions for boxed types
(g_boxed_type_register_static): convenience function for easy
introduction of new G_TYPE_BOXED derivatives.
* gparam.[hc]: introduced g_param_type_register_static(), a short hand
for creation of new GParamSpec derived types.
* gtype.[hc]: many fixes, introduced ability to flag individual
type nodes as ABSTRACT upon registration, added value_peek_pointer()
to the value table to peek at GValue contents as a pointer for types
that support this. fixed up GValue checks.
* gvalue.[hc]: added g_value_fits_pointer() and g_value_get_as_pointer()
to peek at the value contents as pointer.
* *.[hc]: adaptions to type macro fixes and changes in the type
registration API.
* many const corrections over the place.
Sat Oct 21 02:49:56 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_conforms_to): this function basically behaves like
and is_a check, except that it _additionally_ features interfaces
for instantiatable types. enforce this in the second branch as well
(`type' conforms_to `type') even if `type' is not an interface type.
Fri Oct 20 15:31:04 2000 Tim Janik <timj@gtk.org>
* gvaluetypes.[hc]: added G_TYPE_POINTER implementation from jrb.
* gtype.[hc]:
* gobject.c:
* gvaluetypes.c: added GTypeValueTable.value_peek_pointer and
suitable implementations of this for G_TYPE_STRING, G_TYPE_OBJECT
and G_TYPE_POINTER.
Mon Aug 21 04:13:37 2000 Tim Janik <timj@gtk.org>
* gbsearcharray.[hc]: long standing needed generic implementation
of a binary searchable, sorted and dynamically sized array.
2000-10-25 22:36:35 +02:00
|
|
|
|
2000-10-27 18:48:11 +02:00
|
|
|
/* --- typedefs --- */
|
2000-11-01 04:03:04 +01:00
|
|
|
typedef struct _GSignalQuery GSignalQuery;
|
|
|
|
typedef struct _GSignalInvocationHint GSignalInvocationHint;
|
2008-06-22 11:29:52 +02:00
|
|
|
/**
|
|
|
|
* GSignalCMarshaller:
|
|
|
|
*
|
|
|
|
* This is the signature of marshaller functions, required to marshall
|
|
|
|
* arrays of parameter values to signal emissions into C language callback
|
2021-07-31 23:47:26 +02:00
|
|
|
* invocations.
|
|
|
|
*
|
|
|
|
* It is merely an alias to #GClosureMarshal since the #GClosure mechanism
|
|
|
|
* takes over responsibility of actual function invocation for the signal
|
|
|
|
* system.
|
2008-06-22 11:29:52 +02:00
|
|
|
*/
|
2000-11-01 04:03:04 +01:00
|
|
|
typedef GClosureMarshal GSignalCMarshaller;
|
2012-02-22 19:34:05 +01:00
|
|
|
/**
|
|
|
|
* GSignalCVaMarshaller:
|
|
|
|
*
|
|
|
|
* This is the signature of va_list marshaller functions, an optional
|
|
|
|
* marshaller that can be used in some situations to avoid
|
|
|
|
* marshalling the signal argument into GValues.
|
|
|
|
*/
|
|
|
|
typedef GVaClosureMarshal GSignalCVaMarshaller;
|
2008-06-22 11:29:52 +02:00
|
|
|
/**
|
|
|
|
* GSignalEmissionHook:
|
|
|
|
* @ihint: Signal invocation hint, see #GSignalInvocationHint.
|
|
|
|
* @n_param_values: the number of parameters to the function, including
|
|
|
|
* the instance on which the signal was emitted.
|
2011-08-21 17:15:52 +02:00
|
|
|
* @param_values: (array length=n_param_values): the instance on which
|
|
|
|
* the signal was emitted, followed by the parameters of the emission.
|
2022-05-21 23:16:24 +02:00
|
|
|
* @user_data: user data associated with the hook.
|
2008-06-22 11:29:52 +02:00
|
|
|
*
|
2021-07-31 23:47:26 +02:00
|
|
|
* A simple function pointer to get invoked when the signal is emitted.
|
|
|
|
*
|
|
|
|
* Emission hooks allow you to tie a hook to the signal type, so that it will
|
|
|
|
* trap all emissions of that signal, from any object.
|
2008-06-22 11:29:52 +02:00
|
|
|
*
|
2022-03-04 17:21:55 +01:00
|
|
|
* You may not attach these to signals created with the %G_SIGNAL_NO_HOOKS flag.
|
2008-06-22 11:29:52 +02:00
|
|
|
*
|
|
|
|
* Returns: whether it wants to stay connected. If it returns %FALSE, the signal
|
|
|
|
* hook is disconnected (and destroyed).
|
|
|
|
*/
|
2000-10-27 18:48:11 +02:00
|
|
|
typedef gboolean (*GSignalEmissionHook) (GSignalInvocationHint *ihint,
|
|
|
|
guint n_param_values,
|
destruction cleanup. there's one ->finalize_hook member in the hooklist
Thu Mar 8 16:23:34 2001 Tim Janik <timj@gtk.org>
* ghook.[hc]: destruction cleanup. there's one
->finalize_hook member in the hooklist now that gets
called when a hook should be destroyed, that's it.
that function is guarranteed to be called only when
all ref_counts to the hook vanished, thus also when
the hook is not in call.
Thu Mar 8 16:35:48 2001 Tim Janik <timj@gtk.org>
* gparamspecs.[hc]: s/g_param_spec_string_c/g_param_spec_stringc/.
* gsignal.[hc]: fixed accumulator invocation, implemented emission
hooks. and no, neither of these callbacks are called via a closure,
language bindings can wrap the accumulator and emission hook
interface, they already get parameters marshalled into a GValue array.
(g_signal_connect): removed this function as its C specific, doesn't
cover the swapped argument, is too close to its broken original
gtk_signal_connect() and creates demand for _swapped, _after and
_swapped_after variants <brrr>.
(g_signal_connectc): convenience macro to connect a C handler
func with data, like the old g_signal_connect() plus swapped
argument.
* gtype.h:
* gboxed.c: added G_TYPE_VALUE boxed type.
2001-03-08 17:34:59 +01:00
|
|
|
const GValue *param_values,
|
2022-05-21 23:16:24 +02:00
|
|
|
gpointer user_data);
|
2008-06-22 11:29:52 +02:00
|
|
|
/**
|
|
|
|
* GSignalAccumulator:
|
|
|
|
* @ihint: Signal invocation hint, see #GSignalInvocationHint.
|
|
|
|
* @return_accu: Accumulator to collect callback return values in, this
|
|
|
|
* is the return value of the current signal emission.
|
|
|
|
* @handler_return: A #GValue holding the return value of the signal handler.
|
2022-05-21 23:16:24 +02:00
|
|
|
* @user_data: Callback data that was specified when creating the signal.
|
2008-06-22 11:29:52 +02:00
|
|
|
*
|
|
|
|
* The signal accumulator is a special callback function that can be used
|
|
|
|
* to collect return values of the various callbacks that are called
|
2021-07-31 23:47:26 +02:00
|
|
|
* during a signal emission.
|
|
|
|
*
|
|
|
|
* The signal accumulator is specified at signal creation time, if it is
|
|
|
|
* left %NULL, no accumulation of callback return values is performed.
|
|
|
|
* The return value of signal emissions is then the value returned by the
|
|
|
|
* last callback.
|
2008-06-22 11:29:52 +02:00
|
|
|
*
|
|
|
|
* Returns: The accumulator function returns whether the signal emission
|
2021-04-21 14:13:41 +02:00
|
|
|
* should be aborted. Returning %TRUE will continue with
|
|
|
|
* the signal emission. Returning %FALSE will abort the current emission.
|
|
|
|
* Since 2.62, returning %FALSE will skip to the CLEANUP stage. In this case,
|
|
|
|
* emission will occur as normal in the CLEANUP stage and the handler's
|
|
|
|
* return value will be accumulated.
|
2008-06-22 11:29:52 +02:00
|
|
|
*/
|
2000-10-27 18:48:11 +02:00
|
|
|
typedef gboolean (*GSignalAccumulator) (GSignalInvocationHint *ihint,
|
|
|
|
GValue *return_accu,
|
destruction cleanup. there's one ->finalize_hook member in the hooklist
Thu Mar 8 16:23:34 2001 Tim Janik <timj@gtk.org>
* ghook.[hc]: destruction cleanup. there's one
->finalize_hook member in the hooklist now that gets
called when a hook should be destroyed, that's it.
that function is guarranteed to be called only when
all ref_counts to the hook vanished, thus also when
the hook is not in call.
Thu Mar 8 16:35:48 2001 Tim Janik <timj@gtk.org>
* gparamspecs.[hc]: s/g_param_spec_string_c/g_param_spec_stringc/.
* gsignal.[hc]: fixed accumulator invocation, implemented emission
hooks. and no, neither of these callbacks are called via a closure,
language bindings can wrap the accumulator and emission hook
interface, they already get parameters marshalled into a GValue array.
(g_signal_connect): removed this function as its C specific, doesn't
cover the swapped argument, is too close to its broken original
gtk_signal_connect() and creates demand for _swapped, _after and
_swapped_after variants <brrr>.
(g_signal_connectc): convenience macro to connect a C handler
func with data, like the old g_signal_connect() plus swapped
argument.
* gtype.h:
* gboxed.c: added G_TYPE_VALUE boxed type.
2001-03-08 17:34:59 +01:00
|
|
|
const GValue *handler_return,
|
2022-05-21 23:16:24 +02:00
|
|
|
gpointer user_data);
|
added newly added gobject/ headers.
Tue Oct 24 22:09:14 2000 Tim Janik <timj@gtk.org>
* glib-object.h: added newly added gobject/ headers.
* gmesage.c: print g_message() output to stderr instead of stdout.
Wed Oct 25 20:27:02 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_free_instance): for the moment, freeing object
structures will fill their memory portion with 0xAA. there's a
FIXME there, remove this line at a later point.
Tue Oct 24 23:10:26 2000 Tim Janik <timj@gtk.org>
* glib-genmarshal.1:
* glib-genmarshal.c: added publically installed marshaller generator.
* gtype.h: added G_TYPE_INSTANCE_GET_INTERFACE() to retrive a certain
interface VTable from instances.
Mon Oct 23 08:28:15 2000 Tim Janik <timj@gtk.org>
* gobject.[hc]: new functions for closure maintenance:
(g_object_watch_closure): maintain validity of the object and
the closure for objects that are used as data part of a closure.
(g_cclosure_new_object): convenience function to create C closures
that have an object as data argument.
(g_closure_new_object): convenience function to create closures
that have an object as data argument.
* gclosure.[hc]: implementation of GClosure mechanism.
a closure is basically an encapsulation of a callback function
and its environment. ideally, most places supporting callback
functions will simply take a GClosure* pointer and thus unify
callback environments wrg destroy notification etc.
GClosure provides destroy notifiers for arbitrary data pointers,
reference counting, invalidation notification (it can be invalidated
which is merely a deactivate state) and a marshallinbg abstraction.
GCClosure is also provided in these files, they present a specialized
GClosure implementation for C language callbacks.
* genum.c: macro cleanups.
* gboxed.[hc]: new files, for boxed type abstraction.
(g_boxed_copy): copy a boxed structure
(g_boxed_free): free a boxed structure
(g_value_set_boxed):
(g_value_get_boxed): standard GValue functions for boxed types
(g_boxed_type_register_static): convenience function for easy
introduction of new G_TYPE_BOXED derivatives.
* gparam.[hc]: introduced g_param_type_register_static(), a short hand
for creation of new GParamSpec derived types.
* gtype.[hc]: many fixes, introduced ability to flag individual
type nodes as ABSTRACT upon registration, added value_peek_pointer()
to the value table to peek at GValue contents as a pointer for types
that support this. fixed up GValue checks.
* gvalue.[hc]: added g_value_fits_pointer() and g_value_get_as_pointer()
to peek at the value contents as pointer.
* *.[hc]: adaptions to type macro fixes and changes in the type
registration API.
* many const corrections over the place.
Sat Oct 21 02:49:56 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_conforms_to): this function basically behaves like
and is_a check, except that it _additionally_ features interfaces
for instantiatable types. enforce this in the second branch as well
(`type' conforms_to `type') even if `type' is not an interface type.
Fri Oct 20 15:31:04 2000 Tim Janik <timj@gtk.org>
* gvaluetypes.[hc]: added G_TYPE_POINTER implementation from jrb.
* gtype.[hc]:
* gobject.c:
* gvaluetypes.c: added GTypeValueTable.value_peek_pointer and
suitable implementations of this for G_TYPE_STRING, G_TYPE_OBJECT
and G_TYPE_POINTER.
Mon Aug 21 04:13:37 2000 Tim Janik <timj@gtk.org>
* gbsearcharray.[hc]: long standing needed generic implementation
of a binary searchable, sorted and dynamically sized array.
2000-10-25 22:36:35 +02:00
|
|
|
|
|
|
|
|
2001-06-28 19:05:12 +02:00
|
|
|
/* --- run, match and connect types --- */
|
2008-06-22 11:29:52 +02:00
|
|
|
/**
|
|
|
|
* GSignalFlags:
|
|
|
|
* @G_SIGNAL_RUN_FIRST: Invoke the object method handler in the first emission stage.
|
|
|
|
* @G_SIGNAL_RUN_LAST: Invoke the object method handler in the third emission stage.
|
|
|
|
* @G_SIGNAL_RUN_CLEANUP: Invoke the object method handler in the last emission stage.
|
|
|
|
* @G_SIGNAL_NO_RECURSE: Signals being emitted for an object while currently being in
|
|
|
|
* emission for this very object will not be emitted recursively,
|
|
|
|
* but instead cause the first emission to be restarted.
|
|
|
|
* @G_SIGNAL_DETAILED: This signal supports "::detail" appendices to the signal name
|
|
|
|
* upon handler connections and emissions.
|
|
|
|
* @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
|
|
|
|
* the need of being embedded into extra code that performs pre or
|
|
|
|
* post emission adjustments on the object. They can also be thought
|
|
|
|
* of as object methods which can be called generically by
|
|
|
|
* third-party code.
|
|
|
|
* @G_SIGNAL_NO_HOOKS: No emissions hooks are supported for this signal.
|
2011-03-02 15:48:40 +01:00
|
|
|
* @G_SIGNAL_MUST_COLLECT: Varargs signal emission will always collect the
|
|
|
|
* arguments, even if there are no signal handlers connected. Since 2.30.
|
2011-11-07 20:04:15 +01:00
|
|
|
* @G_SIGNAL_DEPRECATED: The signal is deprecated and will be removed
|
|
|
|
* in a future version. A warning will be generated if it is connected while
|
|
|
|
* running with G_ENABLE_DIAGNOSTIC=1. Since 2.32.
|
2012-02-16 10:09:27 +01:00
|
|
|
* @G_SIGNAL_ACCUMULATOR_FIRST_RUN: Only used in #GSignalAccumulator accumulator
|
|
|
|
* functions for the #GSignalInvocationHint::run_type field to mark the first
|
|
|
|
* call to the accumulator function for a signal emission. Since 2.68.
|
|
|
|
*
|
2021-07-31 23:47:26 +02:00
|
|
|
* The signal flags are used to specify a signal's behaviour.
|
2008-06-22 11:29:52 +02:00
|
|
|
*/
|
added newly added gobject/ headers.
Tue Oct 24 22:09:14 2000 Tim Janik <timj@gtk.org>
* glib-object.h: added newly added gobject/ headers.
* gmesage.c: print g_message() output to stderr instead of stdout.
Wed Oct 25 20:27:02 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_free_instance): for the moment, freeing object
structures will fill their memory portion with 0xAA. there's a
FIXME there, remove this line at a later point.
Tue Oct 24 23:10:26 2000 Tim Janik <timj@gtk.org>
* glib-genmarshal.1:
* glib-genmarshal.c: added publically installed marshaller generator.
* gtype.h: added G_TYPE_INSTANCE_GET_INTERFACE() to retrive a certain
interface VTable from instances.
Mon Oct 23 08:28:15 2000 Tim Janik <timj@gtk.org>
* gobject.[hc]: new functions for closure maintenance:
(g_object_watch_closure): maintain validity of the object and
the closure for objects that are used as data part of a closure.
(g_cclosure_new_object): convenience function to create C closures
that have an object as data argument.
(g_closure_new_object): convenience function to create closures
that have an object as data argument.
* gclosure.[hc]: implementation of GClosure mechanism.
a closure is basically an encapsulation of a callback function
and its environment. ideally, most places supporting callback
functions will simply take a GClosure* pointer and thus unify
callback environments wrg destroy notification etc.
GClosure provides destroy notifiers for arbitrary data pointers,
reference counting, invalidation notification (it can be invalidated
which is merely a deactivate state) and a marshallinbg abstraction.
GCClosure is also provided in these files, they present a specialized
GClosure implementation for C language callbacks.
* genum.c: macro cleanups.
* gboxed.[hc]: new files, for boxed type abstraction.
(g_boxed_copy): copy a boxed structure
(g_boxed_free): free a boxed structure
(g_value_set_boxed):
(g_value_get_boxed): standard GValue functions for boxed types
(g_boxed_type_register_static): convenience function for easy
introduction of new G_TYPE_BOXED derivatives.
* gparam.[hc]: introduced g_param_type_register_static(), a short hand
for creation of new GParamSpec derived types.
* gtype.[hc]: many fixes, introduced ability to flag individual
type nodes as ABSTRACT upon registration, added value_peek_pointer()
to the value table to peek at GValue contents as a pointer for types
that support this. fixed up GValue checks.
* gvalue.[hc]: added g_value_fits_pointer() and g_value_get_as_pointer()
to peek at the value contents as pointer.
* *.[hc]: adaptions to type macro fixes and changes in the type
registration API.
* many const corrections over the place.
Sat Oct 21 02:49:56 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_conforms_to): this function basically behaves like
and is_a check, except that it _additionally_ features interfaces
for instantiatable types. enforce this in the second branch as well
(`type' conforms_to `type') even if `type' is not an interface type.
Fri Oct 20 15:31:04 2000 Tim Janik <timj@gtk.org>
* gvaluetypes.[hc]: added G_TYPE_POINTER implementation from jrb.
* gtype.[hc]:
* gobject.c:
* gvaluetypes.c: added GTypeValueTable.value_peek_pointer and
suitable implementations of this for G_TYPE_STRING, G_TYPE_OBJECT
and G_TYPE_POINTER.
Mon Aug 21 04:13:37 2000 Tim Janik <timj@gtk.org>
* gbsearcharray.[hc]: long standing needed generic implementation
of a binary searchable, sorted and dynamically sized array.
2000-10-25 22:36:35 +02:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
G_SIGNAL_RUN_FIRST = 1 << 0,
|
|
|
|
G_SIGNAL_RUN_LAST = 1 << 1,
|
|
|
|
G_SIGNAL_RUN_CLEANUP = 1 << 2,
|
|
|
|
G_SIGNAL_NO_RECURSE = 1 << 3,
|
2000-10-27 18:48:11 +02:00
|
|
|
G_SIGNAL_DETAILED = 1 << 4,
|
|
|
|
G_SIGNAL_ACTION = 1 << 5,
|
2011-03-02 15:48:40 +01:00
|
|
|
G_SIGNAL_NO_HOOKS = 1 << 6,
|
2011-11-07 20:04:15 +01:00
|
|
|
G_SIGNAL_MUST_COLLECT = 1 << 7,
|
2012-02-16 10:09:27 +01:00
|
|
|
G_SIGNAL_DEPRECATED = 1 << 8,
|
|
|
|
/* normal signal flags until 1 << 16 */
|
|
|
|
G_SIGNAL_ACCUMULATOR_FIRST_RUN = 1 << 17,
|
2000-10-27 18:48:11 +02:00
|
|
|
} GSignalFlags;
|
2008-06-22 11:29:52 +02:00
|
|
|
/**
|
|
|
|
* G_SIGNAL_FLAGS_MASK:
|
|
|
|
*
|
|
|
|
* A mask for all #GSignalFlags bits.
|
|
|
|
*/
|
2011-11-07 20:04:15 +01:00
|
|
|
#define G_SIGNAL_FLAGS_MASK 0x1ff
|
2008-06-22 11:29:52 +02:00
|
|
|
/**
|
|
|
|
* GConnectFlags:
|
2022-06-23 10:41:21 +02:00
|
|
|
* @G_CONNECT_DEFAULT: Default behaviour (no special flags). Since: 2.74
|
|
|
|
* @G_CONNECT_AFTER: If set, the handler should be called after the
|
|
|
|
* default handler of the signal. Normally, the handler is called before
|
|
|
|
* the default handler.
|
|
|
|
* @G_CONNECT_SWAPPED: If set, the instance and data should be swapped when
|
2014-06-23 01:59:39 +02:00
|
|
|
* calling the handler; see g_signal_connect_swapped() for an example.
|
2008-06-22 11:29:52 +02:00
|
|
|
*
|
|
|
|
* The connection flags are used to specify the behaviour of a signal's
|
|
|
|
* connection.
|
|
|
|
*/
|
added newly added gobject/ headers.
Tue Oct 24 22:09:14 2000 Tim Janik <timj@gtk.org>
* glib-object.h: added newly added gobject/ headers.
* gmesage.c: print g_message() output to stderr instead of stdout.
Wed Oct 25 20:27:02 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_free_instance): for the moment, freeing object
structures will fill their memory portion with 0xAA. there's a
FIXME there, remove this line at a later point.
Tue Oct 24 23:10:26 2000 Tim Janik <timj@gtk.org>
* glib-genmarshal.1:
* glib-genmarshal.c: added publically installed marshaller generator.
* gtype.h: added G_TYPE_INSTANCE_GET_INTERFACE() to retrive a certain
interface VTable from instances.
Mon Oct 23 08:28:15 2000 Tim Janik <timj@gtk.org>
* gobject.[hc]: new functions for closure maintenance:
(g_object_watch_closure): maintain validity of the object and
the closure for objects that are used as data part of a closure.
(g_cclosure_new_object): convenience function to create C closures
that have an object as data argument.
(g_closure_new_object): convenience function to create closures
that have an object as data argument.
* gclosure.[hc]: implementation of GClosure mechanism.
a closure is basically an encapsulation of a callback function
and its environment. ideally, most places supporting callback
functions will simply take a GClosure* pointer and thus unify
callback environments wrg destroy notification etc.
GClosure provides destroy notifiers for arbitrary data pointers,
reference counting, invalidation notification (it can be invalidated
which is merely a deactivate state) and a marshallinbg abstraction.
GCClosure is also provided in these files, they present a specialized
GClosure implementation for C language callbacks.
* genum.c: macro cleanups.
* gboxed.[hc]: new files, for boxed type abstraction.
(g_boxed_copy): copy a boxed structure
(g_boxed_free): free a boxed structure
(g_value_set_boxed):
(g_value_get_boxed): standard GValue functions for boxed types
(g_boxed_type_register_static): convenience function for easy
introduction of new G_TYPE_BOXED derivatives.
* gparam.[hc]: introduced g_param_type_register_static(), a short hand
for creation of new GParamSpec derived types.
* gtype.[hc]: many fixes, introduced ability to flag individual
type nodes as ABSTRACT upon registration, added value_peek_pointer()
to the value table to peek at GValue contents as a pointer for types
that support this. fixed up GValue checks.
* gvalue.[hc]: added g_value_fits_pointer() and g_value_get_as_pointer()
to peek at the value contents as pointer.
* *.[hc]: adaptions to type macro fixes and changes in the type
registration API.
* many const corrections over the place.
Sat Oct 21 02:49:56 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_conforms_to): this function basically behaves like
and is_a check, except that it _additionally_ features interfaces
for instantiatable types. enforce this in the second branch as well
(`type' conforms_to `type') even if `type' is not an interface type.
Fri Oct 20 15:31:04 2000 Tim Janik <timj@gtk.org>
* gvaluetypes.[hc]: added G_TYPE_POINTER implementation from jrb.
* gtype.[hc]:
* gobject.c:
* gvaluetypes.c: added GTypeValueTable.value_peek_pointer and
suitable implementations of this for G_TYPE_STRING, G_TYPE_OBJECT
and G_TYPE_POINTER.
Mon Aug 21 04:13:37 2000 Tim Janik <timj@gtk.org>
* gbsearcharray.[hc]: long standing needed generic implementation
of a binary searchable, sorted and dynamically sized array.
2000-10-25 22:36:35 +02:00
|
|
|
typedef enum
|
2001-06-28 19:05:12 +02:00
|
|
|
{
|
2022-06-23 10:41:21 +02:00
|
|
|
G_CONNECT_DEFAULT GLIB_AVAILABLE_ENUMERATOR_IN_2_74 = 0,
|
2001-06-28 19:05:12 +02:00
|
|
|
G_CONNECT_AFTER = 1 << 0,
|
|
|
|
G_CONNECT_SWAPPED = 1 << 1
|
|
|
|
} GConnectFlags;
|
2008-06-22 11:29:52 +02:00
|
|
|
/**
|
|
|
|
* GSignalMatchType:
|
|
|
|
* @G_SIGNAL_MATCH_ID: The signal id must be equal.
|
2019-11-12 22:00:14 +01:00
|
|
|
* @G_SIGNAL_MATCH_DETAIL: The signal detail must be equal.
|
2008-06-22 11:29:52 +02:00
|
|
|
* @G_SIGNAL_MATCH_CLOSURE: The closure must be the same.
|
|
|
|
* @G_SIGNAL_MATCH_FUNC: The C closure callback must be the same.
|
|
|
|
* @G_SIGNAL_MATCH_DATA: The closure data must be the same.
|
2019-11-12 22:00:14 +01:00
|
|
|
* @G_SIGNAL_MATCH_UNBLOCKED: Only unblocked signals may be matched.
|
2008-06-22 11:29:52 +02:00
|
|
|
*
|
|
|
|
* The match types specify what g_signal_handlers_block_matched(),
|
|
|
|
* g_signal_handlers_unblock_matched() and g_signal_handlers_disconnect_matched()
|
|
|
|
* match signals by.
|
|
|
|
*/
|
2001-06-28 19:05:12 +02:00
|
|
|
typedef enum
|
added newly added gobject/ headers.
Tue Oct 24 22:09:14 2000 Tim Janik <timj@gtk.org>
* glib-object.h: added newly added gobject/ headers.
* gmesage.c: print g_message() output to stderr instead of stdout.
Wed Oct 25 20:27:02 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_free_instance): for the moment, freeing object
structures will fill their memory portion with 0xAA. there's a
FIXME there, remove this line at a later point.
Tue Oct 24 23:10:26 2000 Tim Janik <timj@gtk.org>
* glib-genmarshal.1:
* glib-genmarshal.c: added publically installed marshaller generator.
* gtype.h: added G_TYPE_INSTANCE_GET_INTERFACE() to retrive a certain
interface VTable from instances.
Mon Oct 23 08:28:15 2000 Tim Janik <timj@gtk.org>
* gobject.[hc]: new functions for closure maintenance:
(g_object_watch_closure): maintain validity of the object and
the closure for objects that are used as data part of a closure.
(g_cclosure_new_object): convenience function to create C closures
that have an object as data argument.
(g_closure_new_object): convenience function to create closures
that have an object as data argument.
* gclosure.[hc]: implementation of GClosure mechanism.
a closure is basically an encapsulation of a callback function
and its environment. ideally, most places supporting callback
functions will simply take a GClosure* pointer and thus unify
callback environments wrg destroy notification etc.
GClosure provides destroy notifiers for arbitrary data pointers,
reference counting, invalidation notification (it can be invalidated
which is merely a deactivate state) and a marshallinbg abstraction.
GCClosure is also provided in these files, they present a specialized
GClosure implementation for C language callbacks.
* genum.c: macro cleanups.
* gboxed.[hc]: new files, for boxed type abstraction.
(g_boxed_copy): copy a boxed structure
(g_boxed_free): free a boxed structure
(g_value_set_boxed):
(g_value_get_boxed): standard GValue functions for boxed types
(g_boxed_type_register_static): convenience function for easy
introduction of new G_TYPE_BOXED derivatives.
* gparam.[hc]: introduced g_param_type_register_static(), a short hand
for creation of new GParamSpec derived types.
* gtype.[hc]: many fixes, introduced ability to flag individual
type nodes as ABSTRACT upon registration, added value_peek_pointer()
to the value table to peek at GValue contents as a pointer for types
that support this. fixed up GValue checks.
* gvalue.[hc]: added g_value_fits_pointer() and g_value_get_as_pointer()
to peek at the value contents as pointer.
* *.[hc]: adaptions to type macro fixes and changes in the type
registration API.
* many const corrections over the place.
Sat Oct 21 02:49:56 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_conforms_to): this function basically behaves like
and is_a check, except that it _additionally_ features interfaces
for instantiatable types. enforce this in the second branch as well
(`type' conforms_to `type') even if `type' is not an interface type.
Fri Oct 20 15:31:04 2000 Tim Janik <timj@gtk.org>
* gvaluetypes.[hc]: added G_TYPE_POINTER implementation from jrb.
* gtype.[hc]:
* gobject.c:
* gvaluetypes.c: added GTypeValueTable.value_peek_pointer and
suitable implementations of this for G_TYPE_STRING, G_TYPE_OBJECT
and G_TYPE_POINTER.
Mon Aug 21 04:13:37 2000 Tim Janik <timj@gtk.org>
* gbsearcharray.[hc]: long standing needed generic implementation
of a binary searchable, sorted and dynamically sized array.
2000-10-25 22:36:35 +02:00
|
|
|
{
|
|
|
|
G_SIGNAL_MATCH_ID = 1 << 0,
|
2000-10-27 18:48:11 +02:00
|
|
|
G_SIGNAL_MATCH_DETAIL = 1 << 1,
|
|
|
|
G_SIGNAL_MATCH_CLOSURE = 1 << 2,
|
|
|
|
G_SIGNAL_MATCH_FUNC = 1 << 3,
|
|
|
|
G_SIGNAL_MATCH_DATA = 1 << 4,
|
|
|
|
G_SIGNAL_MATCH_UNBLOCKED = 1 << 5
|
added newly added gobject/ headers.
Tue Oct 24 22:09:14 2000 Tim Janik <timj@gtk.org>
* glib-object.h: added newly added gobject/ headers.
* gmesage.c: print g_message() output to stderr instead of stdout.
Wed Oct 25 20:27:02 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_free_instance): for the moment, freeing object
structures will fill their memory portion with 0xAA. there's a
FIXME there, remove this line at a later point.
Tue Oct 24 23:10:26 2000 Tim Janik <timj@gtk.org>
* glib-genmarshal.1:
* glib-genmarshal.c: added publically installed marshaller generator.
* gtype.h: added G_TYPE_INSTANCE_GET_INTERFACE() to retrive a certain
interface VTable from instances.
Mon Oct 23 08:28:15 2000 Tim Janik <timj@gtk.org>
* gobject.[hc]: new functions for closure maintenance:
(g_object_watch_closure): maintain validity of the object and
the closure for objects that are used as data part of a closure.
(g_cclosure_new_object): convenience function to create C closures
that have an object as data argument.
(g_closure_new_object): convenience function to create closures
that have an object as data argument.
* gclosure.[hc]: implementation of GClosure mechanism.
a closure is basically an encapsulation of a callback function
and its environment. ideally, most places supporting callback
functions will simply take a GClosure* pointer and thus unify
callback environments wrg destroy notification etc.
GClosure provides destroy notifiers for arbitrary data pointers,
reference counting, invalidation notification (it can be invalidated
which is merely a deactivate state) and a marshallinbg abstraction.
GCClosure is also provided in these files, they present a specialized
GClosure implementation for C language callbacks.
* genum.c: macro cleanups.
* gboxed.[hc]: new files, for boxed type abstraction.
(g_boxed_copy): copy a boxed structure
(g_boxed_free): free a boxed structure
(g_value_set_boxed):
(g_value_get_boxed): standard GValue functions for boxed types
(g_boxed_type_register_static): convenience function for easy
introduction of new G_TYPE_BOXED derivatives.
* gparam.[hc]: introduced g_param_type_register_static(), a short hand
for creation of new GParamSpec derived types.
* gtype.[hc]: many fixes, introduced ability to flag individual
type nodes as ABSTRACT upon registration, added value_peek_pointer()
to the value table to peek at GValue contents as a pointer for types
that support this. fixed up GValue checks.
* gvalue.[hc]: added g_value_fits_pointer() and g_value_get_as_pointer()
to peek at the value contents as pointer.
* *.[hc]: adaptions to type macro fixes and changes in the type
registration API.
* many const corrections over the place.
Sat Oct 21 02:49:56 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_conforms_to): this function basically behaves like
and is_a check, except that it _additionally_ features interfaces
for instantiatable types. enforce this in the second branch as well
(`type' conforms_to `type') even if `type' is not an interface type.
Fri Oct 20 15:31:04 2000 Tim Janik <timj@gtk.org>
* gvaluetypes.[hc]: added G_TYPE_POINTER implementation from jrb.
* gtype.[hc]:
* gobject.c:
* gvaluetypes.c: added GTypeValueTable.value_peek_pointer and
suitable implementations of this for G_TYPE_STRING, G_TYPE_OBJECT
and G_TYPE_POINTER.
Mon Aug 21 04:13:37 2000 Tim Janik <timj@gtk.org>
* gbsearcharray.[hc]: long standing needed generic implementation
of a binary searchable, sorted and dynamically sized array.
2000-10-25 22:36:35 +02:00
|
|
|
} GSignalMatchType;
|
2008-06-22 11:29:52 +02:00
|
|
|
/**
|
|
|
|
* G_SIGNAL_MATCH_MASK:
|
|
|
|
*
|
|
|
|
* A mask for all #GSignalMatchType bits.
|
|
|
|
*/
|
2001-02-17 06:32:00 +01:00
|
|
|
#define G_SIGNAL_MATCH_MASK 0x3f
|
2008-06-22 11:29:52 +02:00
|
|
|
/**
|
|
|
|
* G_SIGNAL_TYPE_STATIC_SCOPE:
|
|
|
|
*
|
|
|
|
* This macro flags signal argument types for which the signal system may
|
|
|
|
* assume that instances thereof remain persistent across all signal emissions
|
|
|
|
* they are used in. This is only useful for non ref-counted, value-copy types.
|
|
|
|
*
|
2014-03-03 00:20:37 +01:00
|
|
|
* To flag a signal argument in this way, add `| G_SIGNAL_TYPE_STATIC_SCOPE`
|
|
|
|
* to the corresponding argument of g_signal_new().
|
2008-06-22 11:29:52 +02:00
|
|
|
* |[
|
|
|
|
* g_signal_new ("size_request",
|
|
|
|
* G_TYPE_FROM_CLASS (gobject_class),
|
|
|
|
* G_SIGNAL_RUN_FIRST,
|
|
|
|
* G_STRUCT_OFFSET (GtkWidgetClass, size_request),
|
|
|
|
* NULL, NULL,
|
|
|
|
* _gtk_marshal_VOID__BOXED,
|
|
|
|
* G_TYPE_NONE, 1,
|
|
|
|
* GTK_TYPE_REQUISITION | G_SIGNAL_TYPE_STATIC_SCOPE);
|
|
|
|
* ]|
|
|
|
|
*/
|
2001-02-17 06:32:00 +01:00
|
|
|
#define G_SIGNAL_TYPE_STATIC_SCOPE (G_TYPE_FLAG_RESERVED_ID_BIT)
|
added newly added gobject/ headers.
Tue Oct 24 22:09:14 2000 Tim Janik <timj@gtk.org>
* glib-object.h: added newly added gobject/ headers.
* gmesage.c: print g_message() output to stderr instead of stdout.
Wed Oct 25 20:27:02 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_free_instance): for the moment, freeing object
structures will fill their memory portion with 0xAA. there's a
FIXME there, remove this line at a later point.
Tue Oct 24 23:10:26 2000 Tim Janik <timj@gtk.org>
* glib-genmarshal.1:
* glib-genmarshal.c: added publically installed marshaller generator.
* gtype.h: added G_TYPE_INSTANCE_GET_INTERFACE() to retrive a certain
interface VTable from instances.
Mon Oct 23 08:28:15 2000 Tim Janik <timj@gtk.org>
* gobject.[hc]: new functions for closure maintenance:
(g_object_watch_closure): maintain validity of the object and
the closure for objects that are used as data part of a closure.
(g_cclosure_new_object): convenience function to create C closures
that have an object as data argument.
(g_closure_new_object): convenience function to create closures
that have an object as data argument.
* gclosure.[hc]: implementation of GClosure mechanism.
a closure is basically an encapsulation of a callback function
and its environment. ideally, most places supporting callback
functions will simply take a GClosure* pointer and thus unify
callback environments wrg destroy notification etc.
GClosure provides destroy notifiers for arbitrary data pointers,
reference counting, invalidation notification (it can be invalidated
which is merely a deactivate state) and a marshallinbg abstraction.
GCClosure is also provided in these files, they present a specialized
GClosure implementation for C language callbacks.
* genum.c: macro cleanups.
* gboxed.[hc]: new files, for boxed type abstraction.
(g_boxed_copy): copy a boxed structure
(g_boxed_free): free a boxed structure
(g_value_set_boxed):
(g_value_get_boxed): standard GValue functions for boxed types
(g_boxed_type_register_static): convenience function for easy
introduction of new G_TYPE_BOXED derivatives.
* gparam.[hc]: introduced g_param_type_register_static(), a short hand
for creation of new GParamSpec derived types.
* gtype.[hc]: many fixes, introduced ability to flag individual
type nodes as ABSTRACT upon registration, added value_peek_pointer()
to the value table to peek at GValue contents as a pointer for types
that support this. fixed up GValue checks.
* gvalue.[hc]: added g_value_fits_pointer() and g_value_get_as_pointer()
to peek at the value contents as pointer.
* *.[hc]: adaptions to type macro fixes and changes in the type
registration API.
* many const corrections over the place.
Sat Oct 21 02:49:56 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_conforms_to): this function basically behaves like
and is_a check, except that it _additionally_ features interfaces
for instantiatable types. enforce this in the second branch as well
(`type' conforms_to `type') even if `type' is not an interface type.
Fri Oct 20 15:31:04 2000 Tim Janik <timj@gtk.org>
* gvaluetypes.[hc]: added G_TYPE_POINTER implementation from jrb.
* gtype.[hc]:
* gobject.c:
* gvaluetypes.c: added GTypeValueTable.value_peek_pointer and
suitable implementations of this for G_TYPE_STRING, G_TYPE_OBJECT
and G_TYPE_POINTER.
Mon Aug 21 04:13:37 2000 Tim Janik <timj@gtk.org>
* gbsearcharray.[hc]: long standing needed generic implementation
of a binary searchable, sorted and dynamically sized array.
2000-10-25 22:36:35 +02:00
|
|
|
|
|
|
|
|
2000-10-27 18:48:11 +02:00
|
|
|
/* --- signal information --- */
|
2008-06-22 11:29:52 +02:00
|
|
|
/**
|
|
|
|
* GSignalInvocationHint:
|
|
|
|
* @signal_id: The signal id of the signal invoking the callback
|
|
|
|
* @detail: The detail passed on for this emission
|
|
|
|
* @run_type: The stage the signal emission is currently in, this
|
|
|
|
* field will contain one of %G_SIGNAL_RUN_FIRST,
|
2012-02-16 10:09:27 +01:00
|
|
|
* %G_SIGNAL_RUN_LAST or %G_SIGNAL_RUN_CLEANUP and %G_SIGNAL_ACCUMULATOR_FIRST_RUN.
|
|
|
|
* %G_SIGNAL_ACCUMULATOR_FIRST_RUN is only set for the first run of the accumulator
|
|
|
|
* function for a signal emission.
|
2008-06-22 11:29:52 +02:00
|
|
|
*
|
|
|
|
* The #GSignalInvocationHint structure is used to pass on additional information
|
|
|
|
* to callbacks during a signal emission.
|
|
|
|
*/
|
2000-10-27 18:48:11 +02:00
|
|
|
struct _GSignalInvocationHint
|
|
|
|
{
|
|
|
|
guint signal_id;
|
|
|
|
GQuark detail;
|
|
|
|
GSignalFlags run_type;
|
|
|
|
};
|
2008-06-22 11:29:52 +02:00
|
|
|
/**
|
|
|
|
* GSignalQuery:
|
|
|
|
* @signal_id: The signal id of the signal being queried, or 0 if the
|
|
|
|
* signal to be queried was unknown.
|
|
|
|
* @signal_name: The signal name.
|
|
|
|
* @itype: The interface/instance type that this signal can be emitted for.
|
|
|
|
* @signal_flags: The signal flags as passed in to g_signal_new().
|
|
|
|
* @return_type: The return type for user callbacks.
|
|
|
|
* @n_params: The number of parameters that user callbacks take.
|
2012-11-04 02:59:25 +01:00
|
|
|
* @param_types: (array length=n_params): The individual parameter types for
|
|
|
|
* user callbacks, note that the effective callback signature is:
|
2014-05-08 05:08:50 +02:00
|
|
|
* |[<!-- language="C" -->
|
2008-06-22 11:29:52 +02:00
|
|
|
* @return_type callback (#gpointer data1,
|
2011-09-06 00:46:59 +02:00
|
|
|
* [param_types param_names,]
|
|
|
|
* gpointer data2);
|
2014-05-08 05:08:50 +02:00
|
|
|
* ]|
|
2008-06-22 11:29:52 +02:00
|
|
|
*
|
2021-07-31 23:47:26 +02:00
|
|
|
* A structure holding in-depth information for a specific signal.
|
|
|
|
*
|
|
|
|
* See also: g_signal_query()
|
2008-06-22 11:29:52 +02:00
|
|
|
*/
|
2000-10-27 18:48:11 +02:00
|
|
|
struct _GSignalQuery
|
added newly added gobject/ headers.
Tue Oct 24 22:09:14 2000 Tim Janik <timj@gtk.org>
* glib-object.h: added newly added gobject/ headers.
* gmesage.c: print g_message() output to stderr instead of stdout.
Wed Oct 25 20:27:02 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_free_instance): for the moment, freeing object
structures will fill their memory portion with 0xAA. there's a
FIXME there, remove this line at a later point.
Tue Oct 24 23:10:26 2000 Tim Janik <timj@gtk.org>
* glib-genmarshal.1:
* glib-genmarshal.c: added publically installed marshaller generator.
* gtype.h: added G_TYPE_INSTANCE_GET_INTERFACE() to retrive a certain
interface VTable from instances.
Mon Oct 23 08:28:15 2000 Tim Janik <timj@gtk.org>
* gobject.[hc]: new functions for closure maintenance:
(g_object_watch_closure): maintain validity of the object and
the closure for objects that are used as data part of a closure.
(g_cclosure_new_object): convenience function to create C closures
that have an object as data argument.
(g_closure_new_object): convenience function to create closures
that have an object as data argument.
* gclosure.[hc]: implementation of GClosure mechanism.
a closure is basically an encapsulation of a callback function
and its environment. ideally, most places supporting callback
functions will simply take a GClosure* pointer and thus unify
callback environments wrg destroy notification etc.
GClosure provides destroy notifiers for arbitrary data pointers,
reference counting, invalidation notification (it can be invalidated
which is merely a deactivate state) and a marshallinbg abstraction.
GCClosure is also provided in these files, they present a specialized
GClosure implementation for C language callbacks.
* genum.c: macro cleanups.
* gboxed.[hc]: new files, for boxed type abstraction.
(g_boxed_copy): copy a boxed structure
(g_boxed_free): free a boxed structure
(g_value_set_boxed):
(g_value_get_boxed): standard GValue functions for boxed types
(g_boxed_type_register_static): convenience function for easy
introduction of new G_TYPE_BOXED derivatives.
* gparam.[hc]: introduced g_param_type_register_static(), a short hand
for creation of new GParamSpec derived types.
* gtype.[hc]: many fixes, introduced ability to flag individual
type nodes as ABSTRACT upon registration, added value_peek_pointer()
to the value table to peek at GValue contents as a pointer for types
that support this. fixed up GValue checks.
* gvalue.[hc]: added g_value_fits_pointer() and g_value_get_as_pointer()
to peek at the value contents as pointer.
* *.[hc]: adaptions to type macro fixes and changes in the type
registration API.
* many const corrections over the place.
Sat Oct 21 02:49:56 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_conforms_to): this function basically behaves like
and is_a check, except that it _additionally_ features interfaces
for instantiatable types. enforce this in the second branch as well
(`type' conforms_to `type') even if `type' is not an interface type.
Fri Oct 20 15:31:04 2000 Tim Janik <timj@gtk.org>
* gvaluetypes.[hc]: added G_TYPE_POINTER implementation from jrb.
* gtype.[hc]:
* gobject.c:
* gvaluetypes.c: added GTypeValueTable.value_peek_pointer and
suitable implementations of this for G_TYPE_STRING, G_TYPE_OBJECT
and G_TYPE_POINTER.
Mon Aug 21 04:13:37 2000 Tim Janik <timj@gtk.org>
* gbsearcharray.[hc]: long standing needed generic implementation
of a binary searchable, sorted and dynamically sized array.
2000-10-25 22:36:35 +02:00
|
|
|
{
|
|
|
|
guint signal_id;
|
|
|
|
const gchar *signal_name;
|
2001-07-11 00:37:08 +02:00
|
|
|
GType itype;
|
2000-10-27 18:48:11 +02:00
|
|
|
GSignalFlags signal_flags;
|
2005-09-22 12:48:04 +02:00
|
|
|
GType return_type; /* mangled with G_SIGNAL_TYPE_STATIC_SCOPE flag */
|
added newly added gobject/ headers.
Tue Oct 24 22:09:14 2000 Tim Janik <timj@gtk.org>
* glib-object.h: added newly added gobject/ headers.
* gmesage.c: print g_message() output to stderr instead of stdout.
Wed Oct 25 20:27:02 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_free_instance): for the moment, freeing object
structures will fill their memory portion with 0xAA. there's a
FIXME there, remove this line at a later point.
Tue Oct 24 23:10:26 2000 Tim Janik <timj@gtk.org>
* glib-genmarshal.1:
* glib-genmarshal.c: added publically installed marshaller generator.
* gtype.h: added G_TYPE_INSTANCE_GET_INTERFACE() to retrive a certain
interface VTable from instances.
Mon Oct 23 08:28:15 2000 Tim Janik <timj@gtk.org>
* gobject.[hc]: new functions for closure maintenance:
(g_object_watch_closure): maintain validity of the object and
the closure for objects that are used as data part of a closure.
(g_cclosure_new_object): convenience function to create C closures
that have an object as data argument.
(g_closure_new_object): convenience function to create closures
that have an object as data argument.
* gclosure.[hc]: implementation of GClosure mechanism.
a closure is basically an encapsulation of a callback function
and its environment. ideally, most places supporting callback
functions will simply take a GClosure* pointer and thus unify
callback environments wrg destroy notification etc.
GClosure provides destroy notifiers for arbitrary data pointers,
reference counting, invalidation notification (it can be invalidated
which is merely a deactivate state) and a marshallinbg abstraction.
GCClosure is also provided in these files, they present a specialized
GClosure implementation for C language callbacks.
* genum.c: macro cleanups.
* gboxed.[hc]: new files, for boxed type abstraction.
(g_boxed_copy): copy a boxed structure
(g_boxed_free): free a boxed structure
(g_value_set_boxed):
(g_value_get_boxed): standard GValue functions for boxed types
(g_boxed_type_register_static): convenience function for easy
introduction of new G_TYPE_BOXED derivatives.
* gparam.[hc]: introduced g_param_type_register_static(), a short hand
for creation of new GParamSpec derived types.
* gtype.[hc]: many fixes, introduced ability to flag individual
type nodes as ABSTRACT upon registration, added value_peek_pointer()
to the value table to peek at GValue contents as a pointer for types
that support this. fixed up GValue checks.
* gvalue.[hc]: added g_value_fits_pointer() and g_value_get_as_pointer()
to peek at the value contents as pointer.
* *.[hc]: adaptions to type macro fixes and changes in the type
registration API.
* many const corrections over the place.
Sat Oct 21 02:49:56 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_conforms_to): this function basically behaves like
and is_a check, except that it _additionally_ features interfaces
for instantiatable types. enforce this in the second branch as well
(`type' conforms_to `type') even if `type' is not an interface type.
Fri Oct 20 15:31:04 2000 Tim Janik <timj@gtk.org>
* gvaluetypes.[hc]: added G_TYPE_POINTER implementation from jrb.
* gtype.[hc]:
* gobject.c:
* gvaluetypes.c: added GTypeValueTable.value_peek_pointer and
suitable implementations of this for G_TYPE_STRING, G_TYPE_OBJECT
and G_TYPE_POINTER.
Mon Aug 21 04:13:37 2000 Tim Janik <timj@gtk.org>
* gbsearcharray.[hc]: long standing needed generic implementation
of a binary searchable, sorted and dynamically sized array.
2000-10-25 22:36:35 +02:00
|
|
|
guint n_params;
|
2001-07-11 00:37:08 +02:00
|
|
|
const GType *param_types; /* mangled with G_SIGNAL_TYPE_STATIC_SCOPE flag */
|
added newly added gobject/ headers.
Tue Oct 24 22:09:14 2000 Tim Janik <timj@gtk.org>
* glib-object.h: added newly added gobject/ headers.
* gmesage.c: print g_message() output to stderr instead of stdout.
Wed Oct 25 20:27:02 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_free_instance): for the moment, freeing object
structures will fill their memory portion with 0xAA. there's a
FIXME there, remove this line at a later point.
Tue Oct 24 23:10:26 2000 Tim Janik <timj@gtk.org>
* glib-genmarshal.1:
* glib-genmarshal.c: added publically installed marshaller generator.
* gtype.h: added G_TYPE_INSTANCE_GET_INTERFACE() to retrive a certain
interface VTable from instances.
Mon Oct 23 08:28:15 2000 Tim Janik <timj@gtk.org>
* gobject.[hc]: new functions for closure maintenance:
(g_object_watch_closure): maintain validity of the object and
the closure for objects that are used as data part of a closure.
(g_cclosure_new_object): convenience function to create C closures
that have an object as data argument.
(g_closure_new_object): convenience function to create closures
that have an object as data argument.
* gclosure.[hc]: implementation of GClosure mechanism.
a closure is basically an encapsulation of a callback function
and its environment. ideally, most places supporting callback
functions will simply take a GClosure* pointer and thus unify
callback environments wrg destroy notification etc.
GClosure provides destroy notifiers for arbitrary data pointers,
reference counting, invalidation notification (it can be invalidated
which is merely a deactivate state) and a marshallinbg abstraction.
GCClosure is also provided in these files, they present a specialized
GClosure implementation for C language callbacks.
* genum.c: macro cleanups.
* gboxed.[hc]: new files, for boxed type abstraction.
(g_boxed_copy): copy a boxed structure
(g_boxed_free): free a boxed structure
(g_value_set_boxed):
(g_value_get_boxed): standard GValue functions for boxed types
(g_boxed_type_register_static): convenience function for easy
introduction of new G_TYPE_BOXED derivatives.
* gparam.[hc]: introduced g_param_type_register_static(), a short hand
for creation of new GParamSpec derived types.
* gtype.[hc]: many fixes, introduced ability to flag individual
type nodes as ABSTRACT upon registration, added value_peek_pointer()
to the value table to peek at GValue contents as a pointer for types
that support this. fixed up GValue checks.
* gvalue.[hc]: added g_value_fits_pointer() and g_value_get_as_pointer()
to peek at the value contents as pointer.
* *.[hc]: adaptions to type macro fixes and changes in the type
registration API.
* many const corrections over the place.
Sat Oct 21 02:49:56 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_conforms_to): this function basically behaves like
and is_a check, except that it _additionally_ features interfaces
for instantiatable types. enforce this in the second branch as well
(`type' conforms_to `type') even if `type' is not an interface type.
Fri Oct 20 15:31:04 2000 Tim Janik <timj@gtk.org>
* gvaluetypes.[hc]: added G_TYPE_POINTER implementation from jrb.
* gtype.[hc]:
* gobject.c:
* gvaluetypes.c: added GTypeValueTable.value_peek_pointer and
suitable implementations of this for G_TYPE_STRING, G_TYPE_OBJECT
and G_TYPE_POINTER.
Mon Aug 21 04:13:37 2000 Tim Janik <timj@gtk.org>
* gbsearcharray.[hc]: long standing needed generic implementation
of a binary searchable, sorted and dynamically sized array.
2000-10-25 22:36:35 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/* --- signals --- */
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2001-02-18 00:30:48 +01:00
|
|
|
guint g_signal_newv (const gchar *signal_name,
|
|
|
|
GType itype,
|
|
|
|
GSignalFlags signal_flags,
|
|
|
|
GClosure *class_closure,
|
destruction cleanup. there's one ->finalize_hook member in the hooklist
Thu Mar 8 16:23:34 2001 Tim Janik <timj@gtk.org>
* ghook.[hc]: destruction cleanup. there's one
->finalize_hook member in the hooklist now that gets
called when a hook should be destroyed, that's it.
that function is guarranteed to be called only when
all ref_counts to the hook vanished, thus also when
the hook is not in call.
Thu Mar 8 16:35:48 2001 Tim Janik <timj@gtk.org>
* gparamspecs.[hc]: s/g_param_spec_string_c/g_param_spec_stringc/.
* gsignal.[hc]: fixed accumulator invocation, implemented emission
hooks. and no, neither of these callbacks are called via a closure,
language bindings can wrap the accumulator and emission hook
interface, they already get parameters marshalled into a GValue array.
(g_signal_connect): removed this function as its C specific, doesn't
cover the swapped argument, is too close to its broken original
gtk_signal_connect() and creates demand for _swapped, _after and
_swapped_after variants <brrr>.
(g_signal_connectc): convenience macro to connect a C handler
func with data, like the old g_signal_connect() plus swapped
argument.
* gtype.h:
* gboxed.c: added G_TYPE_VALUE boxed type.
2001-03-08 17:34:59 +01:00
|
|
|
GSignalAccumulator accumulator,
|
|
|
|
gpointer accu_data,
|
2001-02-18 00:30:48 +01:00
|
|
|
GSignalCMarshaller c_marshaller,
|
|
|
|
GType return_type,
|
|
|
|
guint n_params,
|
|
|
|
GType *param_types);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2001-02-18 00:30:48 +01:00
|
|
|
guint g_signal_new_valist (const gchar *signal_name,
|
|
|
|
GType itype,
|
|
|
|
GSignalFlags signal_flags,
|
|
|
|
GClosure *class_closure,
|
destruction cleanup. there's one ->finalize_hook member in the hooklist
Thu Mar 8 16:23:34 2001 Tim Janik <timj@gtk.org>
* ghook.[hc]: destruction cleanup. there's one
->finalize_hook member in the hooklist now that gets
called when a hook should be destroyed, that's it.
that function is guarranteed to be called only when
all ref_counts to the hook vanished, thus also when
the hook is not in call.
Thu Mar 8 16:35:48 2001 Tim Janik <timj@gtk.org>
* gparamspecs.[hc]: s/g_param_spec_string_c/g_param_spec_stringc/.
* gsignal.[hc]: fixed accumulator invocation, implemented emission
hooks. and no, neither of these callbacks are called via a closure,
language bindings can wrap the accumulator and emission hook
interface, they already get parameters marshalled into a GValue array.
(g_signal_connect): removed this function as its C specific, doesn't
cover the swapped argument, is too close to its broken original
gtk_signal_connect() and creates demand for _swapped, _after and
_swapped_after variants <brrr>.
(g_signal_connectc): convenience macro to connect a C handler
func with data, like the old g_signal_connect() plus swapped
argument.
* gtype.h:
* gboxed.c: added G_TYPE_VALUE boxed type.
2001-03-08 17:34:59 +01:00
|
|
|
GSignalAccumulator accumulator,
|
|
|
|
gpointer accu_data,
|
2001-02-18 00:30:48 +01:00
|
|
|
GSignalCMarshaller c_marshaller,
|
|
|
|
GType return_type,
|
|
|
|
guint n_params,
|
|
|
|
va_list args);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2001-06-28 19:05:12 +02:00
|
|
|
guint g_signal_new (const gchar *signal_name,
|
2001-02-18 00:30:48 +01:00
|
|
|
GType itype,
|
|
|
|
GSignalFlags signal_flags,
|
|
|
|
guint class_offset,
|
destruction cleanup. there's one ->finalize_hook member in the hooklist
Thu Mar 8 16:23:34 2001 Tim Janik <timj@gtk.org>
* ghook.[hc]: destruction cleanup. there's one
->finalize_hook member in the hooklist now that gets
called when a hook should be destroyed, that's it.
that function is guarranteed to be called only when
all ref_counts to the hook vanished, thus also when
the hook is not in call.
Thu Mar 8 16:35:48 2001 Tim Janik <timj@gtk.org>
* gparamspecs.[hc]: s/g_param_spec_string_c/g_param_spec_stringc/.
* gsignal.[hc]: fixed accumulator invocation, implemented emission
hooks. and no, neither of these callbacks are called via a closure,
language bindings can wrap the accumulator and emission hook
interface, they already get parameters marshalled into a GValue array.
(g_signal_connect): removed this function as its C specific, doesn't
cover the swapped argument, is too close to its broken original
gtk_signal_connect() and creates demand for _swapped, _after and
_swapped_after variants <brrr>.
(g_signal_connectc): convenience macro to connect a C handler
func with data, like the old g_signal_connect() plus swapped
argument.
* gtype.h:
* gboxed.c: added G_TYPE_VALUE boxed type.
2001-03-08 17:34:59 +01:00
|
|
|
GSignalAccumulator accumulator,
|
|
|
|
gpointer accu_data,
|
2001-02-18 00:30:48 +01:00
|
|
|
GSignalCMarshaller c_marshaller,
|
|
|
|
GType return_type,
|
|
|
|
guint n_params,
|
|
|
|
...);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2008-07-04 13:10:17 +02:00
|
|
|
guint g_signal_new_class_handler (const gchar *signal_name,
|
|
|
|
GType itype,
|
|
|
|
GSignalFlags signal_flags,
|
|
|
|
GCallback class_handler,
|
|
|
|
GSignalAccumulator accumulator,
|
|
|
|
gpointer accu_data,
|
|
|
|
GSignalCMarshaller c_marshaller,
|
|
|
|
GType return_type,
|
|
|
|
guint n_params,
|
|
|
|
...);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2012-02-22 19:34:05 +01:00
|
|
|
void g_signal_set_va_marshaller (guint signal_id,
|
|
|
|
GType instance_type,
|
|
|
|
GSignalCVaMarshaller va_marshaller);
|
2008-07-04 13:10:17 +02:00
|
|
|
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2001-02-18 00:30:48 +01:00
|
|
|
void g_signal_emitv (const GValue *instance_and_params,
|
|
|
|
guint signal_id,
|
|
|
|
GQuark detail,
|
|
|
|
GValue *return_value);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2001-02-18 00:30:48 +01:00
|
|
|
void g_signal_emit_valist (gpointer instance,
|
|
|
|
guint signal_id,
|
|
|
|
GQuark detail,
|
|
|
|
va_list var_args);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2001-02-18 00:30:48 +01:00
|
|
|
void g_signal_emit (gpointer instance,
|
|
|
|
guint signal_id,
|
|
|
|
GQuark detail,
|
|
|
|
...);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2001-02-18 00:30:48 +01:00
|
|
|
void g_signal_emit_by_name (gpointer instance,
|
|
|
|
const gchar *detailed_signal,
|
|
|
|
...);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2001-02-18 00:30:48 +01:00
|
|
|
guint g_signal_lookup (const gchar *name,
|
|
|
|
GType itype);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2011-03-13 03:50:45 +01:00
|
|
|
const gchar * g_signal_name (guint signal_id);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2001-02-18 00:30:48 +01:00
|
|
|
void g_signal_query (guint signal_id,
|
|
|
|
GSignalQuery *query);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2001-02-18 00:30:48 +01:00
|
|
|
guint* g_signal_list_ids (GType itype,
|
|
|
|
guint *n_ids);
|
2019-12-23 18:36:21 +01:00
|
|
|
GLIB_AVAILABLE_IN_2_66
|
|
|
|
gboolean g_signal_is_valid_name (const gchar *name);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
destruction cleanup. there's one ->finalize_hook member in the hooklist
Thu Mar 8 16:23:34 2001 Tim Janik <timj@gtk.org>
* ghook.[hc]: destruction cleanup. there's one
->finalize_hook member in the hooklist now that gets
called when a hook should be destroyed, that's it.
that function is guarranteed to be called only when
all ref_counts to the hook vanished, thus also when
the hook is not in call.
Thu Mar 8 16:35:48 2001 Tim Janik <timj@gtk.org>
* gparamspecs.[hc]: s/g_param_spec_string_c/g_param_spec_stringc/.
* gsignal.[hc]: fixed accumulator invocation, implemented emission
hooks. and no, neither of these callbacks are called via a closure,
language bindings can wrap the accumulator and emission hook
interface, they already get parameters marshalled into a GValue array.
(g_signal_connect): removed this function as its C specific, doesn't
cover the swapped argument, is too close to its broken original
gtk_signal_connect() and creates demand for _swapped, _after and
_swapped_after variants <brrr>.
(g_signal_connectc): convenience macro to connect a C handler
func with data, like the old g_signal_connect() plus swapped
argument.
* gtype.h:
* gboxed.c: added G_TYPE_VALUE boxed type.
2001-03-08 17:34:59 +01:00
|
|
|
gboolean g_signal_parse_name (const gchar *detailed_signal,
|
|
|
|
GType itype,
|
|
|
|
guint *signal_id_p,
|
|
|
|
GQuark *detail_p,
|
|
|
|
gboolean force_detail_quark);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2001-12-18 21:38:58 +01:00
|
|
|
GSignalInvocationHint* g_signal_get_invocation_hint (gpointer instance);
|
2001-02-18 00:30:48 +01:00
|
|
|
|
added newly added gobject/ headers.
Tue Oct 24 22:09:14 2000 Tim Janik <timj@gtk.org>
* glib-object.h: added newly added gobject/ headers.
* gmesage.c: print g_message() output to stderr instead of stdout.
Wed Oct 25 20:27:02 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_free_instance): for the moment, freeing object
structures will fill their memory portion with 0xAA. there's a
FIXME there, remove this line at a later point.
Tue Oct 24 23:10:26 2000 Tim Janik <timj@gtk.org>
* glib-genmarshal.1:
* glib-genmarshal.c: added publically installed marshaller generator.
* gtype.h: added G_TYPE_INSTANCE_GET_INTERFACE() to retrive a certain
interface VTable from instances.
Mon Oct 23 08:28:15 2000 Tim Janik <timj@gtk.org>
* gobject.[hc]: new functions for closure maintenance:
(g_object_watch_closure): maintain validity of the object and
the closure for objects that are used as data part of a closure.
(g_cclosure_new_object): convenience function to create C closures
that have an object as data argument.
(g_closure_new_object): convenience function to create closures
that have an object as data argument.
* gclosure.[hc]: implementation of GClosure mechanism.
a closure is basically an encapsulation of a callback function
and its environment. ideally, most places supporting callback
functions will simply take a GClosure* pointer and thus unify
callback environments wrg destroy notification etc.
GClosure provides destroy notifiers for arbitrary data pointers,
reference counting, invalidation notification (it can be invalidated
which is merely a deactivate state) and a marshallinbg abstraction.
GCClosure is also provided in these files, they present a specialized
GClosure implementation for C language callbacks.
* genum.c: macro cleanups.
* gboxed.[hc]: new files, for boxed type abstraction.
(g_boxed_copy): copy a boxed structure
(g_boxed_free): free a boxed structure
(g_value_set_boxed):
(g_value_get_boxed): standard GValue functions for boxed types
(g_boxed_type_register_static): convenience function for easy
introduction of new G_TYPE_BOXED derivatives.
* gparam.[hc]: introduced g_param_type_register_static(), a short hand
for creation of new GParamSpec derived types.
* gtype.[hc]: many fixes, introduced ability to flag individual
type nodes as ABSTRACT upon registration, added value_peek_pointer()
to the value table to peek at GValue contents as a pointer for types
that support this. fixed up GValue checks.
* gvalue.[hc]: added g_value_fits_pointer() and g_value_get_as_pointer()
to peek at the value contents as pointer.
* *.[hc]: adaptions to type macro fixes and changes in the type
registration API.
* many const corrections over the place.
Sat Oct 21 02:49:56 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_conforms_to): this function basically behaves like
and is_a check, except that it _additionally_ features interfaces
for instantiatable types. enforce this in the second branch as well
(`type' conforms_to `type') even if `type' is not an interface type.
Fri Oct 20 15:31:04 2000 Tim Janik <timj@gtk.org>
* gvaluetypes.[hc]: added G_TYPE_POINTER implementation from jrb.
* gtype.[hc]:
* gobject.c:
* gvaluetypes.c: added GTypeValueTable.value_peek_pointer and
suitable implementations of this for G_TYPE_STRING, G_TYPE_OBJECT
and G_TYPE_POINTER.
Mon Aug 21 04:13:37 2000 Tim Janik <timj@gtk.org>
* gbsearcharray.[hc]: long standing needed generic implementation
of a binary searchable, sorted and dynamically sized array.
2000-10-25 22:36:35 +02:00
|
|
|
|
2000-11-01 04:03:04 +01:00
|
|
|
/* --- signal emissions --- */
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
destruction cleanup. there's one ->finalize_hook member in the hooklist
Thu Mar 8 16:23:34 2001 Tim Janik <timj@gtk.org>
* ghook.[hc]: destruction cleanup. there's one
->finalize_hook member in the hooklist now that gets
called when a hook should be destroyed, that's it.
that function is guarranteed to be called only when
all ref_counts to the hook vanished, thus also when
the hook is not in call.
Thu Mar 8 16:35:48 2001 Tim Janik <timj@gtk.org>
* gparamspecs.[hc]: s/g_param_spec_string_c/g_param_spec_stringc/.
* gsignal.[hc]: fixed accumulator invocation, implemented emission
hooks. and no, neither of these callbacks are called via a closure,
language bindings can wrap the accumulator and emission hook
interface, they already get parameters marshalled into a GValue array.
(g_signal_connect): removed this function as its C specific, doesn't
cover the swapped argument, is too close to its broken original
gtk_signal_connect() and creates demand for _swapped, _after and
_swapped_after variants <brrr>.
(g_signal_connectc): convenience macro to connect a C handler
func with data, like the old g_signal_connect() plus swapped
argument.
* gtype.h:
* gboxed.c: added G_TYPE_VALUE boxed type.
2001-03-08 17:34:59 +01:00
|
|
|
void g_signal_stop_emission (gpointer instance,
|
|
|
|
guint signal_id,
|
|
|
|
GQuark detail);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2001-05-27 20:28:58 +02:00
|
|
|
void g_signal_stop_emission_by_name (gpointer instance,
|
|
|
|
const gchar *detailed_signal);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2001-04-29 05:04:27 +02:00
|
|
|
gulong g_signal_add_emission_hook (guint signal_id,
|
2002-12-04 00:54:55 +01:00
|
|
|
GQuark detail,
|
destruction cleanup. there's one ->finalize_hook member in the hooklist
Thu Mar 8 16:23:34 2001 Tim Janik <timj@gtk.org>
* ghook.[hc]: destruction cleanup. there's one
->finalize_hook member in the hooklist now that gets
called when a hook should be destroyed, that's it.
that function is guarranteed to be called only when
all ref_counts to the hook vanished, thus also when
the hook is not in call.
Thu Mar 8 16:35:48 2001 Tim Janik <timj@gtk.org>
* gparamspecs.[hc]: s/g_param_spec_string_c/g_param_spec_stringc/.
* gsignal.[hc]: fixed accumulator invocation, implemented emission
hooks. and no, neither of these callbacks are called via a closure,
language bindings can wrap the accumulator and emission hook
interface, they already get parameters marshalled into a GValue array.
(g_signal_connect): removed this function as its C specific, doesn't
cover the swapped argument, is too close to its broken original
gtk_signal_connect() and creates demand for _swapped, _after and
_swapped_after variants <brrr>.
(g_signal_connectc): convenience macro to connect a C handler
func with data, like the old g_signal_connect() plus swapped
argument.
* gtype.h:
* gboxed.c: added G_TYPE_VALUE boxed type.
2001-03-08 17:34:59 +01:00
|
|
|
GSignalEmissionHook hook_func,
|
|
|
|
gpointer hook_data,
|
|
|
|
GDestroyNotify data_destroy);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
destruction cleanup. there's one ->finalize_hook member in the hooklist
Thu Mar 8 16:23:34 2001 Tim Janik <timj@gtk.org>
* ghook.[hc]: destruction cleanup. there's one
->finalize_hook member in the hooklist now that gets
called when a hook should be destroyed, that's it.
that function is guarranteed to be called only when
all ref_counts to the hook vanished, thus also when
the hook is not in call.
Thu Mar 8 16:35:48 2001 Tim Janik <timj@gtk.org>
* gparamspecs.[hc]: s/g_param_spec_string_c/g_param_spec_stringc/.
* gsignal.[hc]: fixed accumulator invocation, implemented emission
hooks. and no, neither of these callbacks are called via a closure,
language bindings can wrap the accumulator and emission hook
interface, they already get parameters marshalled into a GValue array.
(g_signal_connect): removed this function as its C specific, doesn't
cover the swapped argument, is too close to its broken original
gtk_signal_connect() and creates demand for _swapped, _after and
_swapped_after variants <brrr>.
(g_signal_connectc): convenience macro to connect a C handler
func with data, like the old g_signal_connect() plus swapped
argument.
* gtype.h:
* gboxed.c: added G_TYPE_VALUE boxed type.
2001-03-08 17:34:59 +01:00
|
|
|
void g_signal_remove_emission_hook (guint signal_id,
|
2001-04-29 05:04:27 +02:00
|
|
|
gulong hook_id);
|
added newly added gobject/ headers.
Tue Oct 24 22:09:14 2000 Tim Janik <timj@gtk.org>
* glib-object.h: added newly added gobject/ headers.
* gmesage.c: print g_message() output to stderr instead of stdout.
Wed Oct 25 20:27:02 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_free_instance): for the moment, freeing object
structures will fill their memory portion with 0xAA. there's a
FIXME there, remove this line at a later point.
Tue Oct 24 23:10:26 2000 Tim Janik <timj@gtk.org>
* glib-genmarshal.1:
* glib-genmarshal.c: added publically installed marshaller generator.
* gtype.h: added G_TYPE_INSTANCE_GET_INTERFACE() to retrive a certain
interface VTable from instances.
Mon Oct 23 08:28:15 2000 Tim Janik <timj@gtk.org>
* gobject.[hc]: new functions for closure maintenance:
(g_object_watch_closure): maintain validity of the object and
the closure for objects that are used as data part of a closure.
(g_cclosure_new_object): convenience function to create C closures
that have an object as data argument.
(g_closure_new_object): convenience function to create closures
that have an object as data argument.
* gclosure.[hc]: implementation of GClosure mechanism.
a closure is basically an encapsulation of a callback function
and its environment. ideally, most places supporting callback
functions will simply take a GClosure* pointer and thus unify
callback environments wrg destroy notification etc.
GClosure provides destroy notifiers for arbitrary data pointers,
reference counting, invalidation notification (it can be invalidated
which is merely a deactivate state) and a marshallinbg abstraction.
GCClosure is also provided in these files, they present a specialized
GClosure implementation for C language callbacks.
* genum.c: macro cleanups.
* gboxed.[hc]: new files, for boxed type abstraction.
(g_boxed_copy): copy a boxed structure
(g_boxed_free): free a boxed structure
(g_value_set_boxed):
(g_value_get_boxed): standard GValue functions for boxed types
(g_boxed_type_register_static): convenience function for easy
introduction of new G_TYPE_BOXED derivatives.
* gparam.[hc]: introduced g_param_type_register_static(), a short hand
for creation of new GParamSpec derived types.
* gtype.[hc]: many fixes, introduced ability to flag individual
type nodes as ABSTRACT upon registration, added value_peek_pointer()
to the value table to peek at GValue contents as a pointer for types
that support this. fixed up GValue checks.
* gvalue.[hc]: added g_value_fits_pointer() and g_value_get_as_pointer()
to peek at the value contents as pointer.
* *.[hc]: adaptions to type macro fixes and changes in the type
registration API.
* many const corrections over the place.
Sat Oct 21 02:49:56 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_conforms_to): this function basically behaves like
and is_a check, except that it _additionally_ features interfaces
for instantiatable types. enforce this in the second branch as well
(`type' conforms_to `type') even if `type' is not an interface type.
Fri Oct 20 15:31:04 2000 Tim Janik <timj@gtk.org>
* gvaluetypes.[hc]: added G_TYPE_POINTER implementation from jrb.
* gtype.[hc]:
* gobject.c:
* gvaluetypes.c: added GTypeValueTable.value_peek_pointer and
suitable implementations of this for G_TYPE_STRING, G_TYPE_OBJECT
and G_TYPE_POINTER.
Mon Aug 21 04:13:37 2000 Tim Janik <timj@gtk.org>
* gbsearcharray.[hc]: long standing needed generic implementation
of a binary searchable, sorted and dynamically sized array.
2000-10-25 22:36:35 +02:00
|
|
|
|
|
|
|
|
2000-11-01 04:03:04 +01:00
|
|
|
/* --- signal handlers --- */
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2000-11-01 04:03:04 +01:00
|
|
|
gboolean g_signal_has_handler_pending (gpointer instance,
|
|
|
|
guint signal_id,
|
|
|
|
GQuark detail,
|
|
|
|
gboolean may_be_blocked);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2001-04-29 05:04:27 +02:00
|
|
|
gulong g_signal_connect_closure_by_id (gpointer instance,
|
2000-11-01 04:03:04 +01:00
|
|
|
guint signal_id,
|
|
|
|
GQuark detail,
|
|
|
|
GClosure *closure,
|
|
|
|
gboolean after);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2001-04-29 05:04:27 +02:00
|
|
|
gulong g_signal_connect_closure (gpointer instance,
|
fixed dealing with collection/lcopy of NULL values.
Mon Dec 11 04:44:11 2000 Tim Janik <timj@gtk.org>
* gboxed.c: fixed dealing with collection/lcopy of NULL values.
* gclosure.h: removed insane ramblings, added G_CALLBACK() a casting
convenience macro.
* Makefile.am: cleanups, marshaller generation rules.
* gmarshal.[hc]: new files with GRuntime standard marshallers.
* glib-genmarshal.c: fix log domain, support gruntime standard
marshallers, suport G_TYPE_PARAM, come with extern "C" and
#include gmarshal.h.
* glib-genmarshal.1: reflect glib-genmarshal.c updates.
* gobject.[hc]: implement object constructor. rework parameter
changed notification queueing, we support queue freezes now and
don't dispatch from an idle handler anymore.
parameter->property rename hassle.
implemented ::properties_changed and ::notify::* signals for
property change notification (the later supports property names
as details). added signal connection and named data properties.
(g_signal_connect_object): new function to setup while_alive
connections.
(g_object_class_install_property): sink properties now, since they
are initially floating.
(g_object_steal_data):
(g_object_set_data_full):
(g_object_set_data):
(g_object_get_data): set/get data by using g_datalist_*() functions
directly.
(g_object_queue_param_changed): nuked.
(g_object_freeze_notify): start queueing of property changes (freeze/
thaw calls stack).
(g_object_notify): announce changes of a certain property directly.
(g_object_thaw_notify): process queue of property changes, therefore
emitting GObject::notify::detail with detail being the changed
properties names.
(G_OBJECT_WARN_INVALID_PROPERTY_ID): saner macro variant of former
G_WARN_INVALID_PARAM_ID().
* gparam.[hc]: param specs are now initially floating and need to be
sunken with g_param_spec_sink(), support G_TYPE_PARAM values.
added G_PARAM_CONSTRUCT and G_PARAM_CONSTRUCT_ONLY parameter flags,
required by GObjectClass.constructor().
* gparamspecs.[hc]: added GParamSpecParam, GParamSpecPointer and
GParamSpecCCallback, param specs for G_TYPE_PARAM, G_TYPE_POINTER
and G_TYPE_CCALLBACK respectively.
* gsignal.[hc]: cleanups.
(signal_id_lookup): after walking the anchestry, try interfaces as well.
(g_signal_new): new function to create signals from varargs type list.
(g_signal_connect_closure): closure connection variant that works from
signal name+detail.
(g_signal_connect_data): c handler connection variant that works from
signal name+detail.
(g_signal_emit_valist): emit signal for an instance with paraneters
collected from a va_list.
(g_signal_emit): emit signal, taking parameters from varargs list.
(g_signal_emit_by_name): same as g_signal_emit, working from
signal name+detail.
(signal_emit_R): return whether return_value needs to be altered.
* gtype.[hc]: set log-domain to GRuntime, i'm slowly getting to all
the points that need to reflect the upcoming rename.
melt g_type_conforms_to() functionality into g_type_is_a(), as that
is what we really want (liskov substitution principle).
assorted changes to other files due to conforms_to->is_a.
* gvalue.[hc]: implemented g_value_set_instance() that sets a value
from an instantiatable type via the value_table's collect_value()
function (based on an idea from James Henstridge <james@daa.com.au>).
cleanups/fixes.
* gvaluetypes.[hc]: implement G_TYPE_CCALLBACK and G_TYPE_PARAM.
2000-12-12 08:32:00 +01:00
|
|
|
const gchar *detailed_signal,
|
|
|
|
GClosure *closure,
|
|
|
|
gboolean after);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2001-04-29 05:04:27 +02:00
|
|
|
gulong g_signal_connect_data (gpointer instance,
|
fixed dealing with collection/lcopy of NULL values.
Mon Dec 11 04:44:11 2000 Tim Janik <timj@gtk.org>
* gboxed.c: fixed dealing with collection/lcopy of NULL values.
* gclosure.h: removed insane ramblings, added G_CALLBACK() a casting
convenience macro.
* Makefile.am: cleanups, marshaller generation rules.
* gmarshal.[hc]: new files with GRuntime standard marshallers.
* glib-genmarshal.c: fix log domain, support gruntime standard
marshallers, suport G_TYPE_PARAM, come with extern "C" and
#include gmarshal.h.
* glib-genmarshal.1: reflect glib-genmarshal.c updates.
* gobject.[hc]: implement object constructor. rework parameter
changed notification queueing, we support queue freezes now and
don't dispatch from an idle handler anymore.
parameter->property rename hassle.
implemented ::properties_changed and ::notify::* signals for
property change notification (the later supports property names
as details). added signal connection and named data properties.
(g_signal_connect_object): new function to setup while_alive
connections.
(g_object_class_install_property): sink properties now, since they
are initially floating.
(g_object_steal_data):
(g_object_set_data_full):
(g_object_set_data):
(g_object_get_data): set/get data by using g_datalist_*() functions
directly.
(g_object_queue_param_changed): nuked.
(g_object_freeze_notify): start queueing of property changes (freeze/
thaw calls stack).
(g_object_notify): announce changes of a certain property directly.
(g_object_thaw_notify): process queue of property changes, therefore
emitting GObject::notify::detail with detail being the changed
properties names.
(G_OBJECT_WARN_INVALID_PROPERTY_ID): saner macro variant of former
G_WARN_INVALID_PARAM_ID().
* gparam.[hc]: param specs are now initially floating and need to be
sunken with g_param_spec_sink(), support G_TYPE_PARAM values.
added G_PARAM_CONSTRUCT and G_PARAM_CONSTRUCT_ONLY parameter flags,
required by GObjectClass.constructor().
* gparamspecs.[hc]: added GParamSpecParam, GParamSpecPointer and
GParamSpecCCallback, param specs for G_TYPE_PARAM, G_TYPE_POINTER
and G_TYPE_CCALLBACK respectively.
* gsignal.[hc]: cleanups.
(signal_id_lookup): after walking the anchestry, try interfaces as well.
(g_signal_new): new function to create signals from varargs type list.
(g_signal_connect_closure): closure connection variant that works from
signal name+detail.
(g_signal_connect_data): c handler connection variant that works from
signal name+detail.
(g_signal_emit_valist): emit signal for an instance with paraneters
collected from a va_list.
(g_signal_emit): emit signal, taking parameters from varargs list.
(g_signal_emit_by_name): same as g_signal_emit, working from
signal name+detail.
(signal_emit_R): return whether return_value needs to be altered.
* gtype.[hc]: set log-domain to GRuntime, i'm slowly getting to all
the points that need to reflect the upcoming rename.
melt g_type_conforms_to() functionality into g_type_is_a(), as that
is what we really want (liskov substitution principle).
assorted changes to other files due to conforms_to->is_a.
* gvalue.[hc]: implemented g_value_set_instance() that sets a value
from an instantiatable type via the value_table's collect_value()
function (based on an idea from James Henstridge <james@daa.com.au>).
cleanups/fixes.
* gvaluetypes.[hc]: implement G_TYPE_CCALLBACK and G_TYPE_PARAM.
2000-12-12 08:32:00 +01:00
|
|
|
const gchar *detailed_signal,
|
|
|
|
GCallback c_handler,
|
|
|
|
gpointer data,
|
|
|
|
GClosureNotify destroy_data,
|
2001-06-28 19:05:12 +02:00
|
|
|
GConnectFlags connect_flags);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2000-11-01 04:03:04 +01:00
|
|
|
void g_signal_handler_block (gpointer instance,
|
2001-04-29 05:04:27 +02:00
|
|
|
gulong handler_id);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2000-11-01 04:03:04 +01:00
|
|
|
void g_signal_handler_unblock (gpointer instance,
|
2001-04-29 05:04:27 +02:00
|
|
|
gulong handler_id);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2000-11-01 04:03:04 +01:00
|
|
|
void g_signal_handler_disconnect (gpointer instance,
|
2001-05-14 15:55:51 +02:00
|
|
|
gulong handler_id);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2001-05-14 15:55:51 +02:00
|
|
|
gboolean g_signal_handler_is_connected (gpointer instance,
|
2001-04-29 05:04:27 +02:00
|
|
|
gulong handler_id);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2001-04-29 05:04:27 +02:00
|
|
|
gulong g_signal_handler_find (gpointer instance,
|
2000-11-01 04:03:04 +01:00
|
|
|
GSignalMatchType mask,
|
|
|
|
guint signal_id,
|
|
|
|
GQuark detail,
|
|
|
|
GClosure *closure,
|
|
|
|
gpointer func,
|
|
|
|
gpointer data);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2000-11-01 04:03:04 +01:00
|
|
|
guint g_signal_handlers_block_matched (gpointer instance,
|
|
|
|
GSignalMatchType mask,
|
|
|
|
guint signal_id,
|
|
|
|
GQuark detail,
|
|
|
|
GClosure *closure,
|
|
|
|
gpointer func,
|
|
|
|
gpointer data);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2000-11-01 04:03:04 +01:00
|
|
|
guint g_signal_handlers_unblock_matched (gpointer instance,
|
|
|
|
GSignalMatchType mask,
|
|
|
|
guint signal_id,
|
|
|
|
GQuark detail,
|
|
|
|
GClosure *closure,
|
|
|
|
gpointer func,
|
|
|
|
gpointer data);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2000-11-01 04:03:04 +01:00
|
|
|
guint g_signal_handlers_disconnect_matched (gpointer instance,
|
|
|
|
GSignalMatchType mask,
|
|
|
|
guint signal_id,
|
|
|
|
GQuark detail,
|
|
|
|
GClosure *closure,
|
|
|
|
gpointer func,
|
|
|
|
gpointer data);
|
2000-12-15 06:51:08 +01:00
|
|
|
|
2019-05-08 05:39:14 +02:00
|
|
|
GLIB_AVAILABLE_IN_2_62
|
|
|
|
void g_clear_signal_handler (gulong *handler_id_ptr,
|
|
|
|
gpointer instance);
|
|
|
|
|
|
|
|
#define g_clear_signal_handler(handler_id_ptr, instance) \
|
|
|
|
G_STMT_START { \
|
2021-01-26 14:09:02 +01:00
|
|
|
gpointer const _instance = (instance); \
|
|
|
|
gulong *const _handler_id_ptr = (handler_id_ptr); \
|
|
|
|
const gulong _handler_id = *_handler_id_ptr; \
|
2019-05-08 05:39:14 +02:00
|
|
|
\
|
|
|
|
if (_handler_id > 0) \
|
|
|
|
{ \
|
2021-01-26 14:09:02 +01:00
|
|
|
*_handler_id_ptr = 0; \
|
|
|
|
g_signal_handler_disconnect (_instance, _handler_id); \
|
2019-05-08 05:39:14 +02:00
|
|
|
} \
|
2019-08-26 17:50:16 +02:00
|
|
|
} G_STMT_END \
|
|
|
|
GLIB_AVAILABLE_MACRO_IN_2_62
|
2000-12-15 06:51:08 +01:00
|
|
|
|
2008-07-04 13:10:17 +02:00
|
|
|
/* --- overriding and chaining --- */
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2008-07-04 13:10:17 +02:00
|
|
|
void g_signal_override_class_closure (guint signal_id,
|
|
|
|
GType instance_type,
|
|
|
|
GClosure *class_closure);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2008-07-04 13:10:17 +02:00
|
|
|
void g_signal_override_class_handler (const gchar *signal_name,
|
|
|
|
GType instance_type,
|
|
|
|
GCallback class_handler);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2008-07-04 13:10:17 +02:00
|
|
|
void g_signal_chain_from_overridden (const GValue *instance_and_params,
|
|
|
|
GValue *return_value);
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2008-07-04 13:10:17 +02:00
|
|
|
void g_signal_chain_from_overridden_handler (gpointer instance,
|
|
|
|
...);
|
2001-11-14 04:02:22 +01:00
|
|
|
|
|
|
|
|
destruction cleanup. there's one ->finalize_hook member in the hooklist
Thu Mar 8 16:23:34 2001 Tim Janik <timj@gtk.org>
* ghook.[hc]: destruction cleanup. there's one
->finalize_hook member in the hooklist now that gets
called when a hook should be destroyed, that's it.
that function is guarranteed to be called only when
all ref_counts to the hook vanished, thus also when
the hook is not in call.
Thu Mar 8 16:35:48 2001 Tim Janik <timj@gtk.org>
* gparamspecs.[hc]: s/g_param_spec_string_c/g_param_spec_stringc/.
* gsignal.[hc]: fixed accumulator invocation, implemented emission
hooks. and no, neither of these callbacks are called via a closure,
language bindings can wrap the accumulator and emission hook
interface, they already get parameters marshalled into a GValue array.
(g_signal_connect): removed this function as its C specific, doesn't
cover the swapped argument, is too close to its broken original
gtk_signal_connect() and creates demand for _swapped, _after and
_swapped_after variants <brrr>.
(g_signal_connectc): convenience macro to connect a C handler
func with data, like the old g_signal_connect() plus swapped
argument.
* gtype.h:
* gboxed.c: added G_TYPE_VALUE boxed type.
2001-03-08 17:34:59 +01:00
|
|
|
/* --- convenience --- */
|
2008-06-22 11:29:52 +02:00
|
|
|
/**
|
|
|
|
* g_signal_connect:
|
|
|
|
* @instance: the instance to connect to.
|
|
|
|
* @detailed_signal: a string of the form "signal-name::detail".
|
|
|
|
* @c_handler: the #GCallback to connect.
|
|
|
|
* @data: data to pass to @c_handler calls.
|
|
|
|
*
|
|
|
|
* Connects a #GCallback function to a signal for a particular object.
|
|
|
|
*
|
2022-01-18 09:53:20 +01:00
|
|
|
* The handler will be called synchronously, before the default handler of the signal. g_signal_emit() will not return control until all handlers are called.
|
2014-12-19 16:21:09 +01:00
|
|
|
*
|
|
|
|
* See [memory management of signal handlers][signal-memory-management] for
|
|
|
|
* details on how to handle the return value and memory management of @data.
|
2008-06-22 11:29:52 +02:00
|
|
|
*
|
2016-11-10 17:12:41 +01:00
|
|
|
* Returns: the handler ID, of type #gulong (always greater than 0 for successful connections)
|
2008-06-22 11:29:52 +02:00
|
|
|
*/
|
2022-06-23 10:41:21 +02:00
|
|
|
/* Intentionally not using G_CONNECT_DEFAULT here to avoid deprecation
|
|
|
|
* warnings with older GLIB_VERSION_MAX_ALLOWED */
|
2001-06-19 14:13:22 +02:00
|
|
|
#define g_signal_connect(instance, detailed_signal, c_handler, data) \
|
2001-12-13 08:04:41 +01:00
|
|
|
g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), NULL, (GConnectFlags) 0)
|
2008-06-22 11:29:52 +02:00
|
|
|
/**
|
|
|
|
* g_signal_connect_after:
|
|
|
|
* @instance: the instance to connect to.
|
|
|
|
* @detailed_signal: a string of the form "signal-name::detail".
|
|
|
|
* @c_handler: the #GCallback to connect.
|
|
|
|
* @data: data to pass to @c_handler calls.
|
|
|
|
*
|
|
|
|
* Connects a #GCallback function to a signal for a particular object.
|
|
|
|
*
|
2022-01-18 09:53:20 +01:00
|
|
|
* The handler will be called synchronously, after the default handler of the signal.
|
2008-06-22 11:29:52 +02:00
|
|
|
*
|
2016-11-10 17:12:41 +01:00
|
|
|
* Returns: the handler ID, of type #gulong (always greater than 0 for successful connections)
|
2008-06-22 11:29:52 +02:00
|
|
|
*/
|
2001-08-01 14:14:12 +02:00
|
|
|
#define g_signal_connect_after(instance, detailed_signal, c_handler, data) \
|
|
|
|
g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), NULL, G_CONNECT_AFTER)
|
2008-06-22 11:29:52 +02:00
|
|
|
/**
|
|
|
|
* g_signal_connect_swapped:
|
|
|
|
* @instance: the instance to connect to.
|
|
|
|
* @detailed_signal: a string of the form "signal-name::detail".
|
|
|
|
* @c_handler: the #GCallback to connect.
|
|
|
|
* @data: data to pass to @c_handler calls.
|
|
|
|
*
|
|
|
|
* Connects a #GCallback function to a signal for a particular object.
|
|
|
|
*
|
|
|
|
* The instance on which the signal is emitted and @data will be swapped when
|
2014-06-23 01:59:39 +02:00
|
|
|
* calling the handler. This is useful when calling pre-existing functions to
|
|
|
|
* operate purely on the @data, rather than the @instance: swapping the
|
|
|
|
* parameters avoids the need to write a wrapper function.
|
|
|
|
*
|
|
|
|
* For example, this allows the shorter code:
|
|
|
|
* |[<!-- language="C" -->
|
|
|
|
* g_signal_connect_swapped (button, "clicked",
|
|
|
|
* (GCallback) gtk_widget_hide, other_widget);
|
|
|
|
* ]|
|
|
|
|
*
|
|
|
|
* Rather than the cumbersome:
|
|
|
|
* |[<!-- language="C" -->
|
|
|
|
* static void
|
|
|
|
* button_clicked_cb (GtkButton *button, GtkWidget *other_widget)
|
|
|
|
* {
|
|
|
|
* gtk_widget_hide (other_widget);
|
|
|
|
* }
|
|
|
|
*
|
2016-06-03 21:56:14 +02:00
|
|
|
* ...
|
2014-06-23 01:59:39 +02:00
|
|
|
*
|
|
|
|
* g_signal_connect (button, "clicked",
|
|
|
|
* (GCallback) button_clicked_cb, other_widget);
|
|
|
|
* ]|
|
2008-06-22 11:29:52 +02:00
|
|
|
*
|
2016-11-10 17:12:41 +01:00
|
|
|
* Returns: the handler ID, of type #gulong (always greater than 0 for successful connections)
|
2008-06-22 11:29:52 +02:00
|
|
|
*/
|
2001-06-19 14:13:22 +02:00
|
|
|
#define g_signal_connect_swapped(instance, detailed_signal, c_handler, data) \
|
2001-06-28 19:05:12 +02:00
|
|
|
g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), NULL, G_CONNECT_SWAPPED)
|
2008-06-22 11:29:52 +02:00
|
|
|
/**
|
|
|
|
* g_signal_handlers_disconnect_by_func:
|
|
|
|
* @instance: The instance to remove handlers from.
|
|
|
|
* @func: The C closure callback of the handlers (useless for non-C closures).
|
|
|
|
* @data: The closure data of the handlers' closures.
|
|
|
|
*
|
|
|
|
* Disconnects all handlers on an instance that match @func and @data.
|
|
|
|
*
|
|
|
|
* Returns: The number of handlers that matched.
|
|
|
|
*/
|
2002-03-26 21:32:30 +01:00
|
|
|
#define g_signal_handlers_disconnect_by_func(instance, func, data) \
|
|
|
|
g_signal_handlers_disconnect_matched ((instance), \
|
|
|
|
(GSignalMatchType) (G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA), \
|
2001-05-10 15:58:40 +02:00
|
|
|
0, 0, NULL, (func), (data))
|
2012-01-19 15:01:08 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* g_signal_handlers_disconnect_by_data:
|
|
|
|
* @instance: The instance to remove handlers from
|
|
|
|
* @data: the closure data of the handlers' closures
|
|
|
|
*
|
|
|
|
* Disconnects all handlers on an instance that match @data.
|
|
|
|
*
|
|
|
|
* Returns: The number of handlers that matched.
|
|
|
|
*
|
|
|
|
* Since: 2.32
|
|
|
|
*/
|
|
|
|
#define g_signal_handlers_disconnect_by_data(instance, data) \
|
|
|
|
g_signal_handlers_disconnect_matched ((instance), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, (data))
|
|
|
|
|
2008-06-22 11:29:52 +02:00
|
|
|
/**
|
|
|
|
* g_signal_handlers_block_by_func:
|
|
|
|
* @instance: The instance to block handlers from.
|
|
|
|
* @func: The C closure callback of the handlers (useless for non-C closures).
|
|
|
|
* @data: The closure data of the handlers' closures.
|
|
|
|
*
|
|
|
|
* Blocks all handlers on an instance that match @func and @data.
|
|
|
|
*
|
|
|
|
* Returns: The number of handlers that matched.
|
|
|
|
*/
|
2002-03-26 21:32:30 +01:00
|
|
|
#define g_signal_handlers_block_by_func(instance, func, data) \
|
|
|
|
g_signal_handlers_block_matched ((instance), \
|
|
|
|
(GSignalMatchType) (G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA), \
|
|
|
|
0, 0, NULL, (func), (data))
|
2008-06-22 11:29:52 +02:00
|
|
|
/**
|
|
|
|
* g_signal_handlers_unblock_by_func:
|
|
|
|
* @instance: The instance to unblock handlers from.
|
|
|
|
* @func: The C closure callback of the handlers (useless for non-C closures).
|
|
|
|
* @data: The closure data of the handlers' closures.
|
|
|
|
*
|
|
|
|
* Unblocks all handlers on an instance that match @func and @data.
|
|
|
|
*
|
|
|
|
* Returns: The number of handlers that matched.
|
|
|
|
*/
|
2002-03-26 21:32:30 +01:00
|
|
|
#define g_signal_handlers_unblock_by_func(instance, func, data) \
|
|
|
|
g_signal_handlers_unblock_matched ((instance), \
|
|
|
|
(GSignalMatchType) (G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA), \
|
|
|
|
0, 0, NULL, (func), (data))
|
2001-06-28 19:05:12 +02:00
|
|
|
|
|
|
|
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2003-09-12 22:33:31 +02:00
|
|
|
gboolean g_signal_accumulator_true_handled (GSignalInvocationHint *ihint,
|
|
|
|
GValue *return_accu,
|
|
|
|
const GValue *handler_return,
|
|
|
|
gpointer dummy);
|
|
|
|
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2010-10-13 02:58:43 +02:00
|
|
|
gboolean g_signal_accumulator_first_wins (GSignalInvocationHint *ihint,
|
|
|
|
GValue *return_accu,
|
|
|
|
const GValue *handler_return,
|
|
|
|
gpointer dummy);
|
|
|
|
|
2000-12-15 06:51:08 +01:00
|
|
|
/*< private >*/
|
2012-12-06 20:04:59 +01:00
|
|
|
GLIB_AVAILABLE_IN_ALL
|
2000-11-05 06:07:26 +01:00
|
|
|
void g_signal_handlers_destroy (gpointer instance);
|
2000-11-03 09:18:09 +01:00
|
|
|
void _g_signals_destroy (GType itype);
|
added newly added gobject/ headers.
Tue Oct 24 22:09:14 2000 Tim Janik <timj@gtk.org>
* glib-object.h: added newly added gobject/ headers.
* gmesage.c: print g_message() output to stderr instead of stdout.
Wed Oct 25 20:27:02 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_free_instance): for the moment, freeing object
structures will fill their memory portion with 0xAA. there's a
FIXME there, remove this line at a later point.
Tue Oct 24 23:10:26 2000 Tim Janik <timj@gtk.org>
* glib-genmarshal.1:
* glib-genmarshal.c: added publically installed marshaller generator.
* gtype.h: added G_TYPE_INSTANCE_GET_INTERFACE() to retrive a certain
interface VTable from instances.
Mon Oct 23 08:28:15 2000 Tim Janik <timj@gtk.org>
* gobject.[hc]: new functions for closure maintenance:
(g_object_watch_closure): maintain validity of the object and
the closure for objects that are used as data part of a closure.
(g_cclosure_new_object): convenience function to create C closures
that have an object as data argument.
(g_closure_new_object): convenience function to create closures
that have an object as data argument.
* gclosure.[hc]: implementation of GClosure mechanism.
a closure is basically an encapsulation of a callback function
and its environment. ideally, most places supporting callback
functions will simply take a GClosure* pointer and thus unify
callback environments wrg destroy notification etc.
GClosure provides destroy notifiers for arbitrary data pointers,
reference counting, invalidation notification (it can be invalidated
which is merely a deactivate state) and a marshallinbg abstraction.
GCClosure is also provided in these files, they present a specialized
GClosure implementation for C language callbacks.
* genum.c: macro cleanups.
* gboxed.[hc]: new files, for boxed type abstraction.
(g_boxed_copy): copy a boxed structure
(g_boxed_free): free a boxed structure
(g_value_set_boxed):
(g_value_get_boxed): standard GValue functions for boxed types
(g_boxed_type_register_static): convenience function for easy
introduction of new G_TYPE_BOXED derivatives.
* gparam.[hc]: introduced g_param_type_register_static(), a short hand
for creation of new GParamSpec derived types.
* gtype.[hc]: many fixes, introduced ability to flag individual
type nodes as ABSTRACT upon registration, added value_peek_pointer()
to the value table to peek at GValue contents as a pointer for types
that support this. fixed up GValue checks.
* gvalue.[hc]: added g_value_fits_pointer() and g_value_get_as_pointer()
to peek at the value contents as pointer.
* *.[hc]: adaptions to type macro fixes and changes in the type
registration API.
* many const corrections over the place.
Sat Oct 21 02:49:56 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_conforms_to): this function basically behaves like
and is_a check, except that it _additionally_ features interfaces
for instantiatable types. enforce this in the second branch as well
(`type' conforms_to `type') even if `type' is not an interface type.
Fri Oct 20 15:31:04 2000 Tim Janik <timj@gtk.org>
* gvaluetypes.[hc]: added G_TYPE_POINTER implementation from jrb.
* gtype.[hc]:
* gobject.c:
* gvaluetypes.c: added GTypeValueTable.value_peek_pointer and
suitable implementations of this for G_TYPE_STRING, G_TYPE_OBJECT
and G_TYPE_POINTER.
Mon Aug 21 04:13:37 2000 Tim Janik <timj@gtk.org>
* gbsearcharray.[hc]: long standing needed generic implementation
of a binary searchable, sorted and dynamically sized array.
2000-10-25 22:36:35 +02:00
|
|
|
|
2001-03-09 22:39:51 +01:00
|
|
|
G_END_DECLS
|
added newly added gobject/ headers.
Tue Oct 24 22:09:14 2000 Tim Janik <timj@gtk.org>
* glib-object.h: added newly added gobject/ headers.
* gmesage.c: print g_message() output to stderr instead of stdout.
Wed Oct 25 20:27:02 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_free_instance): for the moment, freeing object
structures will fill their memory portion with 0xAA. there's a
FIXME there, remove this line at a later point.
Tue Oct 24 23:10:26 2000 Tim Janik <timj@gtk.org>
* glib-genmarshal.1:
* glib-genmarshal.c: added publically installed marshaller generator.
* gtype.h: added G_TYPE_INSTANCE_GET_INTERFACE() to retrive a certain
interface VTable from instances.
Mon Oct 23 08:28:15 2000 Tim Janik <timj@gtk.org>
* gobject.[hc]: new functions for closure maintenance:
(g_object_watch_closure): maintain validity of the object and
the closure for objects that are used as data part of a closure.
(g_cclosure_new_object): convenience function to create C closures
that have an object as data argument.
(g_closure_new_object): convenience function to create closures
that have an object as data argument.
* gclosure.[hc]: implementation of GClosure mechanism.
a closure is basically an encapsulation of a callback function
and its environment. ideally, most places supporting callback
functions will simply take a GClosure* pointer and thus unify
callback environments wrg destroy notification etc.
GClosure provides destroy notifiers for arbitrary data pointers,
reference counting, invalidation notification (it can be invalidated
which is merely a deactivate state) and a marshallinbg abstraction.
GCClosure is also provided in these files, they present a specialized
GClosure implementation for C language callbacks.
* genum.c: macro cleanups.
* gboxed.[hc]: new files, for boxed type abstraction.
(g_boxed_copy): copy a boxed structure
(g_boxed_free): free a boxed structure
(g_value_set_boxed):
(g_value_get_boxed): standard GValue functions for boxed types
(g_boxed_type_register_static): convenience function for easy
introduction of new G_TYPE_BOXED derivatives.
* gparam.[hc]: introduced g_param_type_register_static(), a short hand
for creation of new GParamSpec derived types.
* gtype.[hc]: many fixes, introduced ability to flag individual
type nodes as ABSTRACT upon registration, added value_peek_pointer()
to the value table to peek at GValue contents as a pointer for types
that support this. fixed up GValue checks.
* gvalue.[hc]: added g_value_fits_pointer() and g_value_get_as_pointer()
to peek at the value contents as pointer.
* *.[hc]: adaptions to type macro fixes and changes in the type
registration API.
* many const corrections over the place.
Sat Oct 21 02:49:56 2000 Tim Janik <timj@gtk.org>
* gtype.c (g_type_conforms_to): this function basically behaves like
and is_a check, except that it _additionally_ features interfaces
for instantiatable types. enforce this in the second branch as well
(`type' conforms_to `type') even if `type' is not an interface type.
Fri Oct 20 15:31:04 2000 Tim Janik <timj@gtk.org>
* gvaluetypes.[hc]: added G_TYPE_POINTER implementation from jrb.
* gtype.[hc]:
* gobject.c:
* gvaluetypes.c: added GTypeValueTable.value_peek_pointer and
suitable implementations of this for G_TYPE_STRING, G_TYPE_OBJECT
and G_TYPE_POINTER.
Mon Aug 21 04:13:37 2000 Tim Janik <timj@gtk.org>
* gbsearcharray.[hc]: long standing needed generic implementation
of a binary searchable, sorted and dynamically sized array.
2000-10-25 22:36:35 +02:00
|
|
|
|
|
|
|
#endif /* __G_SIGNAL_H__ */
|