1.1 --- a/epoc32/include/stdapis/glib-2.0/gobject/gobject.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/stdapis/glib-2.0/gobject/gobject.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,286 @@
1.4 -gobject.h
1.5 +/* GObject - GLib Type, Object, Parameter and Signal Library
1.6 + * Copyright (C) 1998-1999, 2000-2001 Tim Janik and Red Hat, Inc.
1.7 + * Portions copyright (c) 2006 Nokia Corporation. All rights reserved.
1.8 + *
1.9 + * This library is free software; you can redistribute it and/or
1.10 + * modify it under the terms of the GNU Lesser General Public
1.11 + * License as published by the Free Software Foundation; either
1.12 + * version 2 of the License, or (at your option) any later version.
1.13 + *
1.14 + * This library is distributed in the hope that it will be useful,
1.15 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1.16 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1.17 + * Lesser General Public License for more details.
1.18 + *
1.19 + * You should have received a copy of the GNU Lesser General
1.20 + * Public License along with this library; if not, write to the
1.21 + * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
1.22 + * Boston, MA 02111-1307, USA.
1.23 + */
1.24 +#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
1.25 +#error "Only <glib-object.h> can be included directly."
1.26 +#endif
1.27 +
1.28 +#ifndef __G_OBJECT_H__
1.29 +#define __G_OBJECT_H__
1.30 +
1.31 +#include <_ansi.h>
1.32 +#include <gobject/gtype.h>
1.33 +#include <gobject/gvalue.h>
1.34 +#include <gobject/gparam.h>
1.35 +#include <gobject/gclosure.h>
1.36 +#include <gobject/gsignal.h>
1.37 +
1.38 +G_BEGIN_DECLS
1.39 +
1.40 +/* --- type macros --- */
1.41 +#define G_TYPE_IS_OBJECT(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_OBJECT)
1.42 +#define G_OBJECT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), G_TYPE_OBJECT, GObject))
1.43 +#define G_OBJECT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_OBJECT, GObjectClass))
1.44 +#define G_IS_OBJECT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), G_TYPE_OBJECT))
1.45 +#define G_IS_OBJECT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_OBJECT))
1.46 +#define G_OBJECT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), G_TYPE_OBJECT, GObjectClass))
1.47 +#define G_OBJECT_TYPE(object) (G_TYPE_FROM_INSTANCE (object))
1.48 +#define G_OBJECT_TYPE_NAME(object) (g_type_name (G_OBJECT_TYPE (object)))
1.49 +#define G_OBJECT_CLASS_TYPE(class) (G_TYPE_FROM_CLASS (class))
1.50 +#define G_OBJECT_CLASS_NAME(class) (g_type_name (G_OBJECT_CLASS_TYPE (class)))
1.51 +#define G_VALUE_HOLDS_OBJECT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_OBJECT))
1.52 +
1.53 +/* --- type macros --- */
1.54 +#define G_TYPE_INITIALLY_UNOWNED (g_initially_unowned_get_type())
1.55 +#define G_INITIALLY_UNOWNED(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), G_TYPE_INITIALLY_UNOWNED, GInitiallyUnowned))
1.56 +#define G_INITIALLY_UNOWNED_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_INITIALLY_UNOWNED, GInitiallyUnownedClass))
1.57 +#define G_IS_INITIALLY_UNOWNED(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), G_TYPE_INITIALLY_UNOWNED))
1.58 +#define G_IS_INITIALLY_UNOWNED_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_INITIALLY_UNOWNED))
1.59 +#define G_INITIALLY_UNOWNED_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), G_TYPE_INITIALLY_UNOWNED, GInitiallyUnownedClass))
1.60 +/* GInitiallyUnowned ia a GObject with initially floating reference count */
1.61 +
1.62 +
1.63 +/* --- typedefs & structures --- */
1.64 +typedef struct _GObject GObject;
1.65 +typedef struct _GObjectClass GObjectClass;
1.66 +typedef struct _GObject GInitiallyUnowned;
1.67 +typedef struct _GObjectClass GInitiallyUnownedClass;
1.68 +typedef struct _GObjectConstructParam GObjectConstructParam;
1.69 +typedef void (*GObjectGetPropertyFunc) (GObject *object,
1.70 + guint property_id,
1.71 + GValue *value,
1.72 + GParamSpec *pspec);
1.73 +typedef void (*GObjectSetPropertyFunc) (GObject *object,
1.74 + guint property_id,
1.75 + const GValue *value,
1.76 + GParamSpec *pspec);
1.77 +typedef void (*GObjectFinalizeFunc) (GObject *object);
1.78 +typedef void (*GWeakNotify) (gpointer data,
1.79 + GObject *where_the_object_was);
1.80 +struct _GObject
1.81 +{
1.82 + GTypeInstance g_type_instance;
1.83 +
1.84 + /*< private >*/
1.85 + volatile guint ref_count;
1.86 + GData *qdata;
1.87 +};
1.88 +struct _GObjectClass
1.89 +{
1.90 + GTypeClass g_type_class;
1.91 +
1.92 + /*< private >*/
1.93 + GSList *construct_properties;
1.94 +
1.95 + /*< public >*/
1.96 + /* overridable methods */
1.97 + GObject* (*constructor) (GType type,
1.98 + guint n_construct_properties,
1.99 + GObjectConstructParam *construct_properties);
1.100 + void (*set_property) (GObject *object,
1.101 + guint property_id,
1.102 + const GValue *value,
1.103 + GParamSpec *pspec);
1.104 + void (*get_property) (GObject *object,
1.105 + guint property_id,
1.106 + GValue *value,
1.107 + GParamSpec *pspec);
1.108 + void (*dispose) (GObject *object);
1.109 + void (*finalize) (GObject *object);
1.110 +
1.111 + /* seldomly overidden */
1.112 + void (*dispatch_properties_changed) (GObject *object,
1.113 + guint n_pspecs,
1.114 + GParamSpec **pspecs);
1.115 +
1.116 + /* signals */
1.117 + void (*notify) (GObject *object,
1.118 + GParamSpec *pspec);
1.119 + /*< private >*/
1.120 + /* padding */
1.121 + gpointer pdummy[8];
1.122 +};
1.123 +struct _GObjectConstructParam
1.124 +{
1.125 + GParamSpec *pspec;
1.126 + GValue *value;
1.127 +};
1.128 +
1.129 +
1.130 +/* --- prototypes --- */
1.131 +IMPORT_C GType g_initially_unowned_get_type (void);
1.132 +IMPORT_C void g_object_class_install_property (GObjectClass *oclass,
1.133 + guint property_id,
1.134 + GParamSpec *pspec);
1.135 +IMPORT_C GParamSpec* g_object_class_find_property (GObjectClass *oclass,
1.136 + const gchar *property_name);
1.137 +IMPORT_C GParamSpec**g_object_class_list_properties (GObjectClass *oclass,
1.138 + guint *n_properties);
1.139 +IMPORT_C void g_object_class_override_property (GObjectClass *oclass,
1.140 + guint property_id,
1.141 + const gchar *name);
1.142 +
1.143 +IMPORT_C void g_object_interface_install_property (gpointer g_iface,
1.144 + GParamSpec *pspec);
1.145 +IMPORT_C GParamSpec* g_object_interface_find_property (gpointer g_iface,
1.146 + const gchar *property_name);
1.147 +IMPORT_C GParamSpec**g_object_interface_list_properties (gpointer g_iface,
1.148 + guint *n_properties_p);
1.149 +
1.150 +IMPORT_C gpointer g_object_new (GType object_type,
1.151 + const gchar *first_property_name,
1.152 + ...);
1.153 +IMPORT_C gpointer g_object_newv (GType object_type,
1.154 + guint n_parameters,
1.155 + GParameter *parameters);
1.156 +IMPORT_C GObject* g_object_new_valist (GType object_type,
1.157 + const gchar *first_property_name,
1.158 + va_list var_args);
1.159 +IMPORT_C void g_object_set (gpointer object,
1.160 + const gchar *first_property_name,
1.161 + ...) G_GNUC_NULL_TERMINATED;
1.162 +IMPORT_C void g_object_get (gpointer object,
1.163 + const gchar *first_property_name,
1.164 + ...) G_GNUC_NULL_TERMINATED;
1.165 +IMPORT_C gpointer g_object_connect (gpointer object,
1.166 + const gchar *signal_spec,
1.167 + ...) G_GNUC_NULL_TERMINATED;
1.168 +IMPORT_C void g_object_disconnect (gpointer object,
1.169 + const gchar *signal_spec,
1.170 + ...) G_GNUC_NULL_TERMINATED;
1.171 +IMPORT_C void g_object_set_valist (GObject *object,
1.172 + const gchar *first_property_name,
1.173 + va_list var_args);
1.174 +IMPORT_C void g_object_get_valist (GObject *object,
1.175 + const gchar *first_property_name,
1.176 + va_list var_args);
1.177 +IMPORT_C void g_object_set_property (GObject *object,
1.178 + const gchar *property_name,
1.179 + const GValue *value);
1.180 +IMPORT_C void g_object_get_property (GObject *object,
1.181 + const gchar *property_name,
1.182 + GValue *value);
1.183 +IMPORT_C void g_object_freeze_notify (GObject *object);
1.184 +IMPORT_C void g_object_notify (GObject *object,
1.185 + const gchar *property_name);
1.186 +IMPORT_C void g_object_thaw_notify (GObject *object);
1.187 +IMPORT_C gboolean g_object_is_floating (gpointer object);
1.188 +IMPORT_C gpointer g_object_ref_sink (gpointer object);
1.189 +IMPORT_C gpointer g_object_ref (gpointer object);
1.190 +IMPORT_C void g_object_unref (gpointer object);
1.191 +IMPORT_C void g_object_weak_ref (GObject *object,
1.192 + GWeakNotify notify,
1.193 + gpointer data);
1.194 +IMPORT_C void g_object_weak_unref (GObject *object,
1.195 + GWeakNotify notify,
1.196 + gpointer data);
1.197 +IMPORT_C void g_object_add_weak_pointer (GObject *object,
1.198 + gpointer *weak_pointer_location);
1.199 +IMPORT_C void g_object_remove_weak_pointer (GObject *object,
1.200 + gpointer *weak_pointer_location);
1.201 +
1.202 +typedef void (*GToggleNotify) (gpointer data,
1.203 + GObject *object,
1.204 + gboolean is_last_ref);
1.205 +
1.206 +IMPORT_C void g_object_add_toggle_ref (GObject *object,
1.207 + GToggleNotify notify,
1.208 + gpointer data);
1.209 +IMPORT_C void g_object_remove_toggle_ref (GObject *object,
1.210 + GToggleNotify notify,
1.211 + gpointer data);
1.212 +
1.213 +IMPORT_C gpointer g_object_get_qdata (GObject *object,
1.214 + GQuark quark);
1.215 +IMPORT_C void g_object_set_qdata (GObject *object,
1.216 + GQuark quark,
1.217 + gpointer data);
1.218 +IMPORT_C void g_object_set_qdata_full (GObject *object,
1.219 + GQuark quark,
1.220 + gpointer data,
1.221 + GDestroyNotify destroy);
1.222 +IMPORT_C gpointer g_object_steal_qdata (GObject *object,
1.223 + GQuark quark);
1.224 +IMPORT_C gpointer g_object_get_data (GObject *object,
1.225 + const gchar *key);
1.226 +IMPORT_C void g_object_set_data (GObject *object,
1.227 + const gchar *key,
1.228 + gpointer data);
1.229 +IMPORT_C void g_object_set_data_full (GObject *object,
1.230 + const gchar *key,
1.231 + gpointer data,
1.232 + GDestroyNotify destroy);
1.233 +IMPORT_C gpointer g_object_steal_data (GObject *object,
1.234 + const gchar *key);
1.235 +IMPORT_C void g_object_watch_closure (GObject *object,
1.236 + GClosure *closure);
1.237 +IMPORT_C GClosure* g_cclosure_new_object (GCallback callback_func,
1.238 + GObject *object);
1.239 +IMPORT_C GClosure* g_cclosure_new_object_swap (GCallback callback_func,
1.240 + GObject *object);
1.241 +IMPORT_C GClosure* g_closure_new_object (guint sizeof_closure,
1.242 + GObject *object);
1.243 +IMPORT_C void g_value_set_object (GValue *value,
1.244 + gpointer v_object);
1.245 +IMPORT_C gpointer g_value_get_object (const GValue *value);
1.246 +IMPORT_C GObject* g_value_dup_object (const GValue *value);
1.247 +IMPORT_C gulong g_signal_connect_object (gpointer instance,
1.248 + const gchar *detailed_signal,
1.249 + GCallback c_handler,
1.250 + gpointer gobject,
1.251 + GConnectFlags connect_flags);
1.252 +
1.253 +
1.254 +/*< protected >*/
1.255 +IMPORT_C void g_object_force_floating (GObject *object);
1.256 +IMPORT_C void g_object_run_dispose (GObject *object);
1.257 +
1.258 +
1.259 +IMPORT_C void g_value_take_object (GValue *value,
1.260 + gpointer v_object);
1.261 +#ifndef G_DISABLE_DEPRECATED
1.262 +IMPORT_C void g_value_set_object_take_ownership (GValue *value,
1.263 + gpointer v_object);
1.264 +#endif
1.265 +
1.266 +#if !defined(G_DISABLE_DEPRECATED) || defined(GTK_COMPILATION)
1.267 +gsize g_object_compat_control (gsize what,
1.268 + gpointer data);
1.269 +#endif
1.270 +
1.271 +/* --- implementation macros --- */
1.272 +#define G_OBJECT_WARN_INVALID_PSPEC(object, pname, property_id, pspec) \
1.273 +G_STMT_START { \
1.274 + GObject *_object = (GObject*) (object); \
1.275 + GParamSpec *_pspec = (GParamSpec*) (pspec); \
1.276 + guint _property_id = (property_id); \
1.277 + g_warning ("%s: invalid %s id %u for \"%s\" of type `%s' in `%s'", \
1.278 + G_STRLOC, \
1.279 + (pname), \
1.280 + _property_id, \
1.281 + _pspec->name, \
1.282 + g_type_name (G_PARAM_SPEC_TYPE (_pspec)), \
1.283 + G_OBJECT_TYPE_NAME (_object)); \
1.284 +} G_STMT_END
1.285 +#define G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec) \
1.286 + G_OBJECT_WARN_INVALID_PSPEC ((object), "property", (property_id), (pspec))
1.287 +
1.288 +G_END_DECLS
1.289 +
1.290 +#endif /* __G_OBJECT_H__ */