Imported existing code
This commit is contained in:
87
libraries/i686-linux/include/glib-2.0/gobject/gboxed.h
Normal file
87
libraries/i686-linux/include/glib-2.0/gobject/gboxed.h
Normal file
@@ -0,0 +1,87 @@
|
||||
/* GObject - GLib Type, Object, Parameter and Signal Library
|
||||
* Copyright (C) 2000-2001 Red Hat, Inc.
|
||||
*
|
||||
* 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
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
|
||||
#error "Only <glib-object.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_BOXED_H__
|
||||
#define __G_BOXED_H__
|
||||
|
||||
#include <gobject/gtype.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* --- type macros --- */
|
||||
#define G_TYPE_IS_BOXED(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_BOXED)
|
||||
#define G_VALUE_HOLDS_BOXED(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_BOXED))
|
||||
|
||||
|
||||
/* --- typedefs --- */
|
||||
typedef gpointer (*GBoxedCopyFunc) (gpointer boxed);
|
||||
typedef void (*GBoxedFreeFunc) (gpointer boxed);
|
||||
|
||||
|
||||
/* --- prototypes --- */
|
||||
gpointer g_boxed_copy (GType boxed_type,
|
||||
gconstpointer src_boxed);
|
||||
void g_boxed_free (GType boxed_type,
|
||||
gpointer boxed);
|
||||
void g_value_set_boxed (GValue *value,
|
||||
gconstpointer v_boxed);
|
||||
void g_value_set_static_boxed (GValue *value,
|
||||
gconstpointer v_boxed);
|
||||
gpointer g_value_get_boxed (const GValue *value);
|
||||
gpointer g_value_dup_boxed (const GValue *value);
|
||||
|
||||
|
||||
/* --- convenience --- */
|
||||
GType g_boxed_type_register_static (const gchar *name,
|
||||
GBoxedCopyFunc boxed_copy,
|
||||
GBoxedFreeFunc boxed_free);
|
||||
|
||||
|
||||
/* --- GLib boxed types --- */
|
||||
#define G_TYPE_CLOSURE (g_closure_get_type ())
|
||||
#define G_TYPE_VALUE (g_value_get_type ())
|
||||
#define G_TYPE_VALUE_ARRAY (g_value_array_get_type ())
|
||||
#define G_TYPE_DATE (g_date_get_type ())
|
||||
#define G_TYPE_STRV (g_strv_get_type ())
|
||||
#define G_TYPE_GSTRING (g_gstring_get_type ())
|
||||
#define G_TYPE_HASH_TABLE (g_hash_table_get_type ())
|
||||
|
||||
|
||||
void g_value_take_boxed (GValue *value,
|
||||
gconstpointer v_boxed);
|
||||
#ifndef G_DISABLE_DEPRECATED
|
||||
void g_value_set_boxed_take_ownership (GValue *value,
|
||||
gconstpointer v_boxed);
|
||||
#endif
|
||||
GType g_closure_get_type (void) G_GNUC_CONST;
|
||||
GType g_value_get_type (void) G_GNUC_CONST;
|
||||
GType g_value_array_get_type (void) G_GNUC_CONST;
|
||||
GType g_date_get_type (void) G_GNUC_CONST;
|
||||
GType g_strv_get_type (void) G_GNUC_CONST;
|
||||
GType g_gstring_get_type (void) G_GNUC_CONST;
|
||||
GType g_hash_table_get_type (void) G_GNUC_CONST;
|
||||
|
||||
typedef gchar** GStrv;
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_BOXED_H__ */
|
||||
166
libraries/i686-linux/include/glib-2.0/gobject/gclosure.h
Normal file
166
libraries/i686-linux/include/glib-2.0/gobject/gclosure.h
Normal file
@@ -0,0 +1,166 @@
|
||||
/* GObject - GLib Type, Object, Parameter and Signal Library
|
||||
* Copyright (C) 2000-2001 Red Hat, Inc.
|
||||
* Copyright (C) 2005 Imendio AB
|
||||
*
|
||||
* 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
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
|
||||
#error "Only <glib-object.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_CLOSURE_H__
|
||||
#define __G_CLOSURE_H__
|
||||
|
||||
#include <gobject/gtype.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* --- defines --- */
|
||||
#define G_CLOSURE_NEEDS_MARSHAL(closure) (((GClosure*) (closure))->marshal == NULL)
|
||||
#define G_CLOSURE_N_NOTIFIERS(cl) ((cl)->meta_marshal + ((cl)->n_guards << 1L) + \
|
||||
(cl)->n_fnotifiers + (cl)->n_inotifiers)
|
||||
#define G_CCLOSURE_SWAP_DATA(cclosure) (((GClosure*) (closure))->derivative_flag)
|
||||
#define G_CALLBACK(f) ((GCallback) (f))
|
||||
|
||||
|
||||
/* -- typedefs --- */
|
||||
typedef struct _GClosure GClosure;
|
||||
typedef struct _GClosureNotifyData GClosureNotifyData;
|
||||
typedef void (*GCallback) (void);
|
||||
typedef void (*GClosureNotify) (gpointer data,
|
||||
GClosure *closure);
|
||||
typedef void (*GClosureMarshal) (GClosure *closure,
|
||||
GValue *return_value,
|
||||
guint n_param_values,
|
||||
const GValue *param_values,
|
||||
gpointer invocation_hint,
|
||||
gpointer marshal_data);
|
||||
typedef struct _GCClosure GCClosure;
|
||||
|
||||
|
||||
/* --- structures --- */
|
||||
struct _GClosureNotifyData
|
||||
{
|
||||
gpointer data;
|
||||
GClosureNotify notify;
|
||||
};
|
||||
struct _GClosure
|
||||
{
|
||||
/*< private >*/
|
||||
volatile guint ref_count : 15;
|
||||
volatile guint meta_marshal : 1;
|
||||
volatile guint n_guards : 1;
|
||||
volatile guint n_fnotifiers : 2; /* finalization notifiers */
|
||||
volatile guint n_inotifiers : 8; /* invalidation notifiers */
|
||||
volatile guint in_inotify : 1;
|
||||
volatile guint floating : 1;
|
||||
/*< protected >*/
|
||||
volatile guint derivative_flag : 1;
|
||||
/*< public >*/
|
||||
volatile guint in_marshal : 1;
|
||||
volatile guint is_invalid : 1;
|
||||
|
||||
/*< private >*/ void (*marshal) (GClosure *closure,
|
||||
GValue /*out*/ *return_value,
|
||||
guint n_param_values,
|
||||
const GValue *param_values,
|
||||
gpointer invocation_hint,
|
||||
gpointer marshal_data);
|
||||
/*< protected >*/ gpointer data;
|
||||
|
||||
/*< private >*/ GClosureNotifyData *notifiers;
|
||||
|
||||
/* invariants/constrains:
|
||||
* - ->marshal and ->data are _invalid_ as soon as ->is_invalid==TRUE
|
||||
* - invocation of all inotifiers occours prior to fnotifiers
|
||||
* - order of inotifiers is random
|
||||
* inotifiers may _not_ free/invalidate parameter values (e.g. ->data)
|
||||
* - order of fnotifiers is random
|
||||
* - each notifier may only be removed before or during its invocation
|
||||
* - reference counting may only happen prior to fnotify invocation
|
||||
* (in that sense, fnotifiers are really finalization handlers)
|
||||
*/
|
||||
};
|
||||
/* closure for C function calls, callback() is the user function
|
||||
*/
|
||||
struct _GCClosure
|
||||
{
|
||||
GClosure closure;
|
||||
gpointer callback;
|
||||
};
|
||||
|
||||
|
||||
/* --- prototypes --- */
|
||||
GClosure* g_cclosure_new (GCallback callback_func,
|
||||
gpointer user_data,
|
||||
GClosureNotify destroy_data);
|
||||
GClosure* g_cclosure_new_swap (GCallback callback_func,
|
||||
gpointer user_data,
|
||||
GClosureNotify destroy_data);
|
||||
GClosure* g_signal_type_cclosure_new (GType itype,
|
||||
guint struct_offset);
|
||||
|
||||
|
||||
/* --- prototypes --- */
|
||||
GClosure* g_closure_ref (GClosure *closure);
|
||||
void g_closure_sink (GClosure *closure);
|
||||
void g_closure_unref (GClosure *closure);
|
||||
/* intimidating */
|
||||
GClosure* g_closure_new_simple (guint sizeof_closure,
|
||||
gpointer data);
|
||||
void g_closure_add_finalize_notifier (GClosure *closure,
|
||||
gpointer notify_data,
|
||||
GClosureNotify notify_func);
|
||||
void g_closure_remove_finalize_notifier (GClosure *closure,
|
||||
gpointer notify_data,
|
||||
GClosureNotify notify_func);
|
||||
void g_closure_add_invalidate_notifier (GClosure *closure,
|
||||
gpointer notify_data,
|
||||
GClosureNotify notify_func);
|
||||
void g_closure_remove_invalidate_notifier (GClosure *closure,
|
||||
gpointer notify_data,
|
||||
GClosureNotify notify_func);
|
||||
void g_closure_add_marshal_guards (GClosure *closure,
|
||||
gpointer pre_marshal_data,
|
||||
GClosureNotify pre_marshal_notify,
|
||||
gpointer post_marshal_data,
|
||||
GClosureNotify post_marshal_notify);
|
||||
void g_closure_set_marshal (GClosure *closure,
|
||||
GClosureMarshal marshal);
|
||||
void g_closure_set_meta_marshal (GClosure *closure,
|
||||
gpointer marshal_data,
|
||||
GClosureMarshal meta_marshal);
|
||||
void g_closure_invalidate (GClosure *closure);
|
||||
void g_closure_invoke (GClosure *closure,
|
||||
GValue /*out*/ *return_value,
|
||||
guint n_param_values,
|
||||
const GValue *param_values,
|
||||
gpointer invocation_hint);
|
||||
|
||||
/* FIXME:
|
||||
OK: data_object::destroy -> closure_invalidate();
|
||||
MIS: closure_invalidate() -> disconnect(closure);
|
||||
MIS: disconnect(closure) -> (unlink) closure_unref();
|
||||
OK: closure_finalize() -> g_free (data_string);
|
||||
|
||||
random remarks:
|
||||
- need marshaller repo with decent aliasing to base types
|
||||
- provide marshaller collection, virtually covering anything out there
|
||||
*/
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_CLOSURE_H__ */
|
||||
125
libraries/i686-linux/include/glib-2.0/gobject/genums.h
Normal file
125
libraries/i686-linux/include/glib-2.0/gobject/genums.h
Normal file
@@ -0,0 +1,125 @@
|
||||
/* GObject - GLib Type, Object, Parameter and Signal Library
|
||||
* Copyright (C) 1998-1999, 2000-2001 Tim Janik and Red Hat, Inc.
|
||||
*
|
||||
* 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
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
|
||||
#error "Only <glib-object.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_ENUMS_H__
|
||||
#define __G_ENUMS_H__
|
||||
|
||||
#include <gobject/gtype.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* --- type macros --- */
|
||||
#define G_TYPE_IS_ENUM(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_ENUM)
|
||||
#define G_ENUM_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_ENUM, GEnumClass))
|
||||
#define G_IS_ENUM_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_ENUM))
|
||||
#define G_ENUM_CLASS_TYPE(class) (G_TYPE_FROM_CLASS (class))
|
||||
#define G_ENUM_CLASS_TYPE_NAME(class) (g_type_name (G_ENUM_CLASS_TYPE (class)))
|
||||
#define G_TYPE_IS_FLAGS(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_FLAGS)
|
||||
#define G_FLAGS_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_FLAGS, GFlagsClass))
|
||||
#define G_IS_FLAGS_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_FLAGS))
|
||||
#define G_FLAGS_CLASS_TYPE(class) (G_TYPE_FROM_CLASS (class))
|
||||
#define G_FLAGS_CLASS_TYPE_NAME(class) (g_type_name (G_FLAGS_CLASS_TYPE (class)))
|
||||
#define G_VALUE_HOLDS_ENUM(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_ENUM))
|
||||
#define G_VALUE_HOLDS_FLAGS(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_FLAGS))
|
||||
|
||||
|
||||
/* --- enum/flag values & classes --- */
|
||||
typedef struct _GEnumClass GEnumClass;
|
||||
typedef struct _GFlagsClass GFlagsClass;
|
||||
typedef struct _GEnumValue GEnumValue;
|
||||
typedef struct _GFlagsValue GFlagsValue;
|
||||
struct _GEnumClass
|
||||
{
|
||||
GTypeClass g_type_class;
|
||||
|
||||
/*< public >*/
|
||||
gint minimum;
|
||||
gint maximum;
|
||||
guint n_values;
|
||||
GEnumValue *values;
|
||||
};
|
||||
struct _GFlagsClass
|
||||
{
|
||||
GTypeClass g_type_class;
|
||||
|
||||
/*< public >*/
|
||||
guint mask;
|
||||
guint n_values;
|
||||
GFlagsValue *values;
|
||||
};
|
||||
struct _GEnumValue
|
||||
{
|
||||
gint value;
|
||||
const gchar *value_name;
|
||||
const gchar *value_nick;
|
||||
};
|
||||
struct _GFlagsValue
|
||||
{
|
||||
guint value;
|
||||
const gchar *value_name;
|
||||
const gchar *value_nick;
|
||||
};
|
||||
|
||||
|
||||
/* --- prototypes --- */
|
||||
GEnumValue* g_enum_get_value (GEnumClass *enum_class,
|
||||
gint value);
|
||||
GEnumValue* g_enum_get_value_by_name (GEnumClass *enum_class,
|
||||
const gchar *name);
|
||||
GEnumValue* g_enum_get_value_by_nick (GEnumClass *enum_class,
|
||||
const gchar *nick);
|
||||
GFlagsValue* g_flags_get_first_value (GFlagsClass *flags_class,
|
||||
guint value);
|
||||
GFlagsValue* g_flags_get_value_by_name (GFlagsClass *flags_class,
|
||||
const gchar *name);
|
||||
GFlagsValue* g_flags_get_value_by_nick (GFlagsClass *flags_class,
|
||||
const gchar *nick);
|
||||
void g_value_set_enum (GValue *value,
|
||||
gint v_enum);
|
||||
gint g_value_get_enum (const GValue *value);
|
||||
void g_value_set_flags (GValue *value,
|
||||
guint v_flags);
|
||||
guint g_value_get_flags (const GValue *value);
|
||||
|
||||
|
||||
|
||||
/* --- registration functions --- */
|
||||
/* const_static_values is a NULL terminated array of enum/flags
|
||||
* values that is taken over!
|
||||
*/
|
||||
GType g_enum_register_static (const gchar *name,
|
||||
const GEnumValue *const_static_values);
|
||||
GType g_flags_register_static (const gchar *name,
|
||||
const GFlagsValue *const_static_values);
|
||||
/* functions to complete the type information
|
||||
* for enums/flags implemented by plugins
|
||||
*/
|
||||
void g_enum_complete_type_info (GType g_enum_type,
|
||||
GTypeInfo *info,
|
||||
const GEnumValue *const_values);
|
||||
void g_flags_complete_type_info (GType g_flags_type,
|
||||
GTypeInfo *info,
|
||||
const GFlagsValue *const_values);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_ENUMS_H__ */
|
||||
169
libraries/i686-linux/include/glib-2.0/gobject/gmarshal.h
Normal file
169
libraries/i686-linux/include/glib-2.0/gobject/gmarshal.h
Normal file
@@ -0,0 +1,169 @@
|
||||
#ifndef __G_MARSHAL_H__
|
||||
#define __G_MARSHAL_H__
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* VOID:VOID (./gmarshal.list:26) */
|
||||
extern void g_cclosure_marshal_VOID__VOID (GClosure *closure,
|
||||
GValue *return_value,
|
||||
guint n_param_values,
|
||||
const GValue *param_values,
|
||||
gpointer invocation_hint,
|
||||
gpointer marshal_data);
|
||||
|
||||
/* VOID:BOOLEAN (./gmarshal.list:27) */
|
||||
extern void g_cclosure_marshal_VOID__BOOLEAN (GClosure *closure,
|
||||
GValue *return_value,
|
||||
guint n_param_values,
|
||||
const GValue *param_values,
|
||||
gpointer invocation_hint,
|
||||
gpointer marshal_data);
|
||||
|
||||
/* VOID:CHAR (./gmarshal.list:28) */
|
||||
extern void g_cclosure_marshal_VOID__CHAR (GClosure *closure,
|
||||
GValue *return_value,
|
||||
guint n_param_values,
|
||||
const GValue *param_values,
|
||||
gpointer invocation_hint,
|
||||
gpointer marshal_data);
|
||||
|
||||
/* VOID:UCHAR (./gmarshal.list:29) */
|
||||
extern void g_cclosure_marshal_VOID__UCHAR (GClosure *closure,
|
||||
GValue *return_value,
|
||||
guint n_param_values,
|
||||
const GValue *param_values,
|
||||
gpointer invocation_hint,
|
||||
gpointer marshal_data);
|
||||
|
||||
/* VOID:INT (./gmarshal.list:30) */
|
||||
extern void g_cclosure_marshal_VOID__INT (GClosure *closure,
|
||||
GValue *return_value,
|
||||
guint n_param_values,
|
||||
const GValue *param_values,
|
||||
gpointer invocation_hint,
|
||||
gpointer marshal_data);
|
||||
|
||||
/* VOID:UINT (./gmarshal.list:31) */
|
||||
extern void g_cclosure_marshal_VOID__UINT (GClosure *closure,
|
||||
GValue *return_value,
|
||||
guint n_param_values,
|
||||
const GValue *param_values,
|
||||
gpointer invocation_hint,
|
||||
gpointer marshal_data);
|
||||
|
||||
/* VOID:LONG (./gmarshal.list:32) */
|
||||
extern void g_cclosure_marshal_VOID__LONG (GClosure *closure,
|
||||
GValue *return_value,
|
||||
guint n_param_values,
|
||||
const GValue *param_values,
|
||||
gpointer invocation_hint,
|
||||
gpointer marshal_data);
|
||||
|
||||
/* VOID:ULONG (./gmarshal.list:33) */
|
||||
extern void g_cclosure_marshal_VOID__ULONG (GClosure *closure,
|
||||
GValue *return_value,
|
||||
guint n_param_values,
|
||||
const GValue *param_values,
|
||||
gpointer invocation_hint,
|
||||
gpointer marshal_data);
|
||||
|
||||
/* VOID:ENUM (./gmarshal.list:34) */
|
||||
extern void g_cclosure_marshal_VOID__ENUM (GClosure *closure,
|
||||
GValue *return_value,
|
||||
guint n_param_values,
|
||||
const GValue *param_values,
|
||||
gpointer invocation_hint,
|
||||
gpointer marshal_data);
|
||||
|
||||
/* VOID:FLAGS (./gmarshal.list:35) */
|
||||
extern void g_cclosure_marshal_VOID__FLAGS (GClosure *closure,
|
||||
GValue *return_value,
|
||||
guint n_param_values,
|
||||
const GValue *param_values,
|
||||
gpointer invocation_hint,
|
||||
gpointer marshal_data);
|
||||
|
||||
/* VOID:FLOAT (./gmarshal.list:36) */
|
||||
extern void g_cclosure_marshal_VOID__FLOAT (GClosure *closure,
|
||||
GValue *return_value,
|
||||
guint n_param_values,
|
||||
const GValue *param_values,
|
||||
gpointer invocation_hint,
|
||||
gpointer marshal_data);
|
||||
|
||||
/* VOID:DOUBLE (./gmarshal.list:37) */
|
||||
extern void g_cclosure_marshal_VOID__DOUBLE (GClosure *closure,
|
||||
GValue *return_value,
|
||||
guint n_param_values,
|
||||
const GValue *param_values,
|
||||
gpointer invocation_hint,
|
||||
gpointer marshal_data);
|
||||
|
||||
/* VOID:STRING (./gmarshal.list:38) */
|
||||
extern void g_cclosure_marshal_VOID__STRING (GClosure *closure,
|
||||
GValue *return_value,
|
||||
guint n_param_values,
|
||||
const GValue *param_values,
|
||||
gpointer invocation_hint,
|
||||
gpointer marshal_data);
|
||||
|
||||
/* VOID:PARAM (./gmarshal.list:39) */
|
||||
extern void g_cclosure_marshal_VOID__PARAM (GClosure *closure,
|
||||
GValue *return_value,
|
||||
guint n_param_values,
|
||||
const GValue *param_values,
|
||||
gpointer invocation_hint,
|
||||
gpointer marshal_data);
|
||||
|
||||
/* VOID:BOXED (./gmarshal.list:40) */
|
||||
extern void g_cclosure_marshal_VOID__BOXED (GClosure *closure,
|
||||
GValue *return_value,
|
||||
guint n_param_values,
|
||||
const GValue *param_values,
|
||||
gpointer invocation_hint,
|
||||
gpointer marshal_data);
|
||||
|
||||
/* VOID:POINTER (./gmarshal.list:41) */
|
||||
extern void g_cclosure_marshal_VOID__POINTER (GClosure *closure,
|
||||
GValue *return_value,
|
||||
guint n_param_values,
|
||||
const GValue *param_values,
|
||||
gpointer invocation_hint,
|
||||
gpointer marshal_data);
|
||||
|
||||
/* VOID:OBJECT (./gmarshal.list:42) */
|
||||
extern void g_cclosure_marshal_VOID__OBJECT (GClosure *closure,
|
||||
GValue *return_value,
|
||||
guint n_param_values,
|
||||
const GValue *param_values,
|
||||
gpointer invocation_hint,
|
||||
gpointer marshal_data);
|
||||
|
||||
/* VOID:UINT,POINTER (./gmarshal.list:45) */
|
||||
extern void g_cclosure_marshal_VOID__UINT_POINTER (GClosure *closure,
|
||||
GValue *return_value,
|
||||
guint n_param_values,
|
||||
const GValue *param_values,
|
||||
gpointer invocation_hint,
|
||||
gpointer marshal_data);
|
||||
|
||||
/* BOOL:FLAGS (./gmarshal.list:46) */
|
||||
extern void g_cclosure_marshal_BOOLEAN__FLAGS (GClosure *closure,
|
||||
GValue *return_value,
|
||||
guint n_param_values,
|
||||
const GValue *param_values,
|
||||
gpointer invocation_hint,
|
||||
gpointer marshal_data);
|
||||
#define g_cclosure_marshal_BOOL__FLAGS g_cclosure_marshal_BOOLEAN__FLAGS
|
||||
|
||||
/* STRING:OBJECT,POINTER (./gmarshal.list:47) */
|
||||
extern void g_cclosure_marshal_STRING__OBJECT_POINTER (GClosure *closure,
|
||||
GValue *return_value,
|
||||
guint n_param_values,
|
||||
const GValue *param_values,
|
||||
gpointer invocation_hint,
|
||||
gpointer marshal_data);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_MARSHAL_H__ */
|
||||
283
libraries/i686-linux/include/glib-2.0/gobject/gobject.h
Normal file
283
libraries/i686-linux/include/glib-2.0/gobject/gobject.h
Normal file
@@ -0,0 +1,283 @@
|
||||
/* GObject - GLib Type, Object, Parameter and Signal Library
|
||||
* Copyright (C) 1998-1999, 2000-2001 Tim Janik and Red Hat, Inc.
|
||||
*
|
||||
* 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
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
|
||||
#error "Only <glib-object.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_OBJECT_H__
|
||||
#define __G_OBJECT_H__
|
||||
|
||||
#include <gobject/gtype.h>
|
||||
#include <gobject/gvalue.h>
|
||||
#include <gobject/gparam.h>
|
||||
#include <gobject/gclosure.h>
|
||||
#include <gobject/gsignal.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* --- type macros --- */
|
||||
#define G_TYPE_IS_OBJECT(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_OBJECT)
|
||||
#define G_OBJECT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), G_TYPE_OBJECT, GObject))
|
||||
#define G_OBJECT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_OBJECT, GObjectClass))
|
||||
#define G_IS_OBJECT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), G_TYPE_OBJECT))
|
||||
#define G_IS_OBJECT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_OBJECT))
|
||||
#define G_OBJECT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), G_TYPE_OBJECT, GObjectClass))
|
||||
#define G_OBJECT_TYPE(object) (G_TYPE_FROM_INSTANCE (object))
|
||||
#define G_OBJECT_TYPE_NAME(object) (g_type_name (G_OBJECT_TYPE (object)))
|
||||
#define G_OBJECT_CLASS_TYPE(class) (G_TYPE_FROM_CLASS (class))
|
||||
#define G_OBJECT_CLASS_NAME(class) (g_type_name (G_OBJECT_CLASS_TYPE (class)))
|
||||
#define G_VALUE_HOLDS_OBJECT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_OBJECT))
|
||||
|
||||
/* --- type macros --- */
|
||||
#define G_TYPE_INITIALLY_UNOWNED (g_initially_unowned_get_type())
|
||||
#define G_INITIALLY_UNOWNED(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), G_TYPE_INITIALLY_UNOWNED, GInitiallyUnowned))
|
||||
#define G_INITIALLY_UNOWNED_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_INITIALLY_UNOWNED, GInitiallyUnownedClass))
|
||||
#define G_IS_INITIALLY_UNOWNED(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), G_TYPE_INITIALLY_UNOWNED))
|
||||
#define G_IS_INITIALLY_UNOWNED_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_INITIALLY_UNOWNED))
|
||||
#define G_INITIALLY_UNOWNED_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), G_TYPE_INITIALLY_UNOWNED, GInitiallyUnownedClass))
|
||||
/* GInitiallyUnowned ia a GObject with initially floating reference count */
|
||||
|
||||
|
||||
/* --- typedefs & structures --- */
|
||||
typedef struct _GObject GObject;
|
||||
typedef struct _GObjectClass GObjectClass;
|
||||
typedef struct _GObject GInitiallyUnowned;
|
||||
typedef struct _GObjectClass GInitiallyUnownedClass;
|
||||
typedef struct _GObjectConstructParam GObjectConstructParam;
|
||||
typedef void (*GObjectGetPropertyFunc) (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
typedef void (*GObjectSetPropertyFunc) (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
typedef void (*GObjectFinalizeFunc) (GObject *object);
|
||||
typedef void (*GWeakNotify) (gpointer data,
|
||||
GObject *where_the_object_was);
|
||||
struct _GObject
|
||||
{
|
||||
GTypeInstance g_type_instance;
|
||||
|
||||
/*< private >*/
|
||||
volatile guint ref_count;
|
||||
GData *qdata;
|
||||
};
|
||||
struct _GObjectClass
|
||||
{
|
||||
GTypeClass g_type_class;
|
||||
|
||||
/*< private >*/
|
||||
GSList *construct_properties;
|
||||
|
||||
/*< public >*/
|
||||
/* overridable methods */
|
||||
GObject* (*constructor) (GType type,
|
||||
guint n_construct_properties,
|
||||
GObjectConstructParam *construct_properties);
|
||||
void (*set_property) (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
void (*get_property) (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
void (*dispose) (GObject *object);
|
||||
void (*finalize) (GObject *object);
|
||||
|
||||
/* seldomly overidden */
|
||||
void (*dispatch_properties_changed) (GObject *object,
|
||||
guint n_pspecs,
|
||||
GParamSpec **pspecs);
|
||||
|
||||
/* signals */
|
||||
void (*notify) (GObject *object,
|
||||
GParamSpec *pspec);
|
||||
/*< private >*/
|
||||
/* padding */
|
||||
gpointer pdummy[8];
|
||||
};
|
||||
struct _GObjectConstructParam
|
||||
{
|
||||
GParamSpec *pspec;
|
||||
GValue *value;
|
||||
};
|
||||
|
||||
|
||||
/* --- prototypes --- */
|
||||
GType g_initially_unowned_get_type (void);
|
||||
void g_object_class_install_property (GObjectClass *oclass,
|
||||
guint property_id,
|
||||
GParamSpec *pspec);
|
||||
GParamSpec* g_object_class_find_property (GObjectClass *oclass,
|
||||
const gchar *property_name);
|
||||
GParamSpec**g_object_class_list_properties (GObjectClass *oclass,
|
||||
guint *n_properties);
|
||||
void g_object_class_override_property (GObjectClass *oclass,
|
||||
guint property_id,
|
||||
const gchar *name);
|
||||
|
||||
void g_object_interface_install_property (gpointer g_iface,
|
||||
GParamSpec *pspec);
|
||||
GParamSpec* g_object_interface_find_property (gpointer g_iface,
|
||||
const gchar *property_name);
|
||||
GParamSpec**g_object_interface_list_properties (gpointer g_iface,
|
||||
guint *n_properties_p);
|
||||
|
||||
gpointer g_object_new (GType object_type,
|
||||
const gchar *first_property_name,
|
||||
...);
|
||||
gpointer g_object_newv (GType object_type,
|
||||
guint n_parameters,
|
||||
GParameter *parameters);
|
||||
GObject* g_object_new_valist (GType object_type,
|
||||
const gchar *first_property_name,
|
||||
va_list var_args);
|
||||
void g_object_set (gpointer object,
|
||||
const gchar *first_property_name,
|
||||
...) G_GNUC_NULL_TERMINATED;
|
||||
void g_object_get (gpointer object,
|
||||
const gchar *first_property_name,
|
||||
...) G_GNUC_NULL_TERMINATED;
|
||||
gpointer g_object_connect (gpointer object,
|
||||
const gchar *signal_spec,
|
||||
...) G_GNUC_NULL_TERMINATED;
|
||||
void g_object_disconnect (gpointer object,
|
||||
const gchar *signal_spec,
|
||||
...) G_GNUC_NULL_TERMINATED;
|
||||
void g_object_set_valist (GObject *object,
|
||||
const gchar *first_property_name,
|
||||
va_list var_args);
|
||||
void g_object_get_valist (GObject *object,
|
||||
const gchar *first_property_name,
|
||||
va_list var_args);
|
||||
void g_object_set_property (GObject *object,
|
||||
const gchar *property_name,
|
||||
const GValue *value);
|
||||
void g_object_get_property (GObject *object,
|
||||
const gchar *property_name,
|
||||
GValue *value);
|
||||
void g_object_freeze_notify (GObject *object);
|
||||
void g_object_notify (GObject *object,
|
||||
const gchar *property_name);
|
||||
void g_object_thaw_notify (GObject *object);
|
||||
gboolean g_object_is_floating (gpointer object);
|
||||
gpointer g_object_ref_sink (gpointer object);
|
||||
gpointer g_object_ref (gpointer object);
|
||||
void g_object_unref (gpointer object);
|
||||
void g_object_weak_ref (GObject *object,
|
||||
GWeakNotify notify,
|
||||
gpointer data);
|
||||
void g_object_weak_unref (GObject *object,
|
||||
GWeakNotify notify,
|
||||
gpointer data);
|
||||
void g_object_add_weak_pointer (GObject *object,
|
||||
gpointer *weak_pointer_location);
|
||||
void g_object_remove_weak_pointer (GObject *object,
|
||||
gpointer *weak_pointer_location);
|
||||
|
||||
typedef void (*GToggleNotify) (gpointer data,
|
||||
GObject *object,
|
||||
gboolean is_last_ref);
|
||||
|
||||
void g_object_add_toggle_ref (GObject *object,
|
||||
GToggleNotify notify,
|
||||
gpointer data);
|
||||
void g_object_remove_toggle_ref (GObject *object,
|
||||
GToggleNotify notify,
|
||||
gpointer data);
|
||||
|
||||
gpointer g_object_get_qdata (GObject *object,
|
||||
GQuark quark);
|
||||
void g_object_set_qdata (GObject *object,
|
||||
GQuark quark,
|
||||
gpointer data);
|
||||
void g_object_set_qdata_full (GObject *object,
|
||||
GQuark quark,
|
||||
gpointer data,
|
||||
GDestroyNotify destroy);
|
||||
gpointer g_object_steal_qdata (GObject *object,
|
||||
GQuark quark);
|
||||
gpointer g_object_get_data (GObject *object,
|
||||
const gchar *key);
|
||||
void g_object_set_data (GObject *object,
|
||||
const gchar *key,
|
||||
gpointer data);
|
||||
void g_object_set_data_full (GObject *object,
|
||||
const gchar *key,
|
||||
gpointer data,
|
||||
GDestroyNotify destroy);
|
||||
gpointer g_object_steal_data (GObject *object,
|
||||
const gchar *key);
|
||||
void g_object_watch_closure (GObject *object,
|
||||
GClosure *closure);
|
||||
GClosure* g_cclosure_new_object (GCallback callback_func,
|
||||
GObject *object);
|
||||
GClosure* g_cclosure_new_object_swap (GCallback callback_func,
|
||||
GObject *object);
|
||||
GClosure* g_closure_new_object (guint sizeof_closure,
|
||||
GObject *object);
|
||||
void g_value_set_object (GValue *value,
|
||||
gpointer v_object);
|
||||
gpointer g_value_get_object (const GValue *value);
|
||||
GObject* g_value_dup_object (const GValue *value);
|
||||
gulong g_signal_connect_object (gpointer instance,
|
||||
const gchar *detailed_signal,
|
||||
GCallback c_handler,
|
||||
gpointer gobject,
|
||||
GConnectFlags connect_flags);
|
||||
|
||||
/*< protected >*/
|
||||
void g_object_force_floating (GObject *object);
|
||||
void g_object_run_dispose (GObject *object);
|
||||
|
||||
|
||||
void g_value_take_object (GValue *value,
|
||||
gpointer v_object);
|
||||
#ifndef G_DISABLE_DEPRECATED
|
||||
void g_value_set_object_take_ownership (GValue *value,
|
||||
gpointer v_object);
|
||||
#endif
|
||||
|
||||
#if !defined(G_DISABLE_DEPRECATED) || defined(GTK_COMPILATION)
|
||||
gsize g_object_compat_control (gsize what,
|
||||
gpointer data);
|
||||
#endif
|
||||
|
||||
/* --- implementation macros --- */
|
||||
#define G_OBJECT_WARN_INVALID_PSPEC(object, pname, property_id, pspec) \
|
||||
G_STMT_START { \
|
||||
GObject *_object = (GObject*) (object); \
|
||||
GParamSpec *_pspec = (GParamSpec*) (pspec); \
|
||||
guint _property_id = (property_id); \
|
||||
g_warning ("%s: invalid %s id %u for \"%s\" of type `%s' in `%s'", \
|
||||
G_STRLOC, \
|
||||
(pname), \
|
||||
_property_id, \
|
||||
_pspec->name, \
|
||||
g_type_name (G_PARAM_SPEC_TYPE (_pspec)), \
|
||||
G_OBJECT_TYPE_NAME (_object)); \
|
||||
} G_STMT_END
|
||||
#define G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec) \
|
||||
G_OBJECT_WARN_INVALID_PSPEC ((object), "property", (property_id), (pspec))
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_OBJECT_H__ */
|
||||
@@ -0,0 +1,169 @@
|
||||
/* GObject - GLib Type, Object, Parameter and Signal Library
|
||||
* Copyright (C) 1998-1999, 2000-2001 Tim Janik and Red Hat, Inc.
|
||||
*
|
||||
* 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
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#ifndef __G_NOTIFY_H__
|
||||
#define __G_NOTIFY_H__
|
||||
|
||||
#include <string.h> /* memset */
|
||||
#include <glib-object.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
||||
/* --- typedefs --- */
|
||||
typedef struct _GObjectNotifyContext GObjectNotifyContext;
|
||||
typedef struct _GObjectNotifyQueue GObjectNotifyQueue;
|
||||
typedef void (*GObjectNotifyQueueDispatcher) (GObject *object,
|
||||
guint n_pspecs,
|
||||
GParamSpec **pspecs);
|
||||
|
||||
|
||||
/* --- structures --- */
|
||||
struct _GObjectNotifyContext
|
||||
{
|
||||
GQuark quark_notify_queue;
|
||||
GObjectNotifyQueueDispatcher dispatcher;
|
||||
GTrashStack *_nqueue_trash; /* unused */
|
||||
};
|
||||
struct _GObjectNotifyQueue
|
||||
{
|
||||
GObjectNotifyContext *context;
|
||||
GSList *pspecs;
|
||||
guint16 n_pspecs;
|
||||
guint16 freeze_count;
|
||||
/* currently, this structure abuses the GList allocation chain and thus
|
||||
* must be <= sizeof (GList)
|
||||
*/
|
||||
};
|
||||
|
||||
|
||||
/* --- functions --- */
|
||||
static void
|
||||
g_object_notify_queue_free (gpointer data)
|
||||
{
|
||||
GObjectNotifyQueue *nqueue = data;
|
||||
|
||||
g_slist_free (nqueue->pspecs);
|
||||
g_list_free_1 ((void*) nqueue);
|
||||
}
|
||||
|
||||
static inline GObjectNotifyQueue*
|
||||
g_object_notify_queue_freeze (GObject *object,
|
||||
GObjectNotifyContext *context)
|
||||
{
|
||||
GObjectNotifyQueue *nqueue;
|
||||
|
||||
nqueue = g_datalist_id_get_data (&object->qdata, context->quark_notify_queue);
|
||||
if (!nqueue)
|
||||
{
|
||||
nqueue = (void*) g_list_alloc ();
|
||||
memset (nqueue, 0, sizeof (*nqueue));
|
||||
nqueue->context = context;
|
||||
g_datalist_id_set_data_full (&object->qdata, context->quark_notify_queue,
|
||||
nqueue, g_object_notify_queue_free);
|
||||
}
|
||||
|
||||
g_return_val_if_fail (nqueue->freeze_count < 65535, nqueue);
|
||||
nqueue->freeze_count++;
|
||||
|
||||
return nqueue;
|
||||
}
|
||||
|
||||
static inline void
|
||||
g_object_notify_queue_thaw (GObject *object,
|
||||
GObjectNotifyQueue *nqueue)
|
||||
{
|
||||
GObjectNotifyContext *context = nqueue->context;
|
||||
GParamSpec *pspecs_mem[16], **pspecs, **free_me = NULL;
|
||||
GSList *slist;
|
||||
guint n_pspecs = 0;
|
||||
|
||||
g_return_if_fail (nqueue->freeze_count > 0);
|
||||
|
||||
nqueue->freeze_count--;
|
||||
if (nqueue->freeze_count)
|
||||
return;
|
||||
g_return_if_fail (object->ref_count > 0);
|
||||
|
||||
pspecs = nqueue->n_pspecs > 16 ? free_me = g_new (GParamSpec*, nqueue->n_pspecs) : pspecs_mem;
|
||||
/* set first entry to NULL since it's checked unconditionally */
|
||||
pspecs[0] = NULL;
|
||||
for (slist = nqueue->pspecs; slist; slist = slist->next)
|
||||
{
|
||||
GParamSpec *pspec = slist->data;
|
||||
guint i = 0;
|
||||
|
||||
/* dedup, make pspecs in the list unique */
|
||||
redo_dedup_check:
|
||||
if (pspecs[i] == pspec)
|
||||
continue;
|
||||
if (++i < n_pspecs)
|
||||
goto redo_dedup_check;
|
||||
|
||||
pspecs[n_pspecs++] = pspec;
|
||||
}
|
||||
g_datalist_id_set_data (&object->qdata, context->quark_notify_queue, NULL);
|
||||
|
||||
if (n_pspecs)
|
||||
context->dispatcher (object, n_pspecs, pspecs);
|
||||
g_free (free_me);
|
||||
}
|
||||
|
||||
static inline void
|
||||
g_object_notify_queue_clear (GObject *object,
|
||||
GObjectNotifyQueue *nqueue)
|
||||
{
|
||||
g_return_if_fail (nqueue->freeze_count > 0);
|
||||
|
||||
g_slist_free (nqueue->pspecs);
|
||||
nqueue->pspecs = NULL;
|
||||
nqueue->n_pspecs = 0;
|
||||
}
|
||||
|
||||
static inline void
|
||||
g_object_notify_queue_add (GObject *object,
|
||||
GObjectNotifyQueue *nqueue,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
if (pspec->flags & G_PARAM_READABLE)
|
||||
{
|
||||
GParamSpec *redirect;
|
||||
|
||||
g_return_if_fail (nqueue->n_pspecs < 65535);
|
||||
|
||||
redirect = g_param_spec_get_redirect_target (pspec);
|
||||
if (redirect)
|
||||
pspec = redirect;
|
||||
|
||||
/* we do the deduping in _thaw */
|
||||
nqueue->pspecs = g_slist_prepend (nqueue->pspecs, pspec);
|
||||
nqueue->n_pspecs++;
|
||||
}
|
||||
}
|
||||
|
||||
static inline GObjectNotifyQueue*
|
||||
g_object_notify_queue_from_object (GObject *object,
|
||||
GObjectNotifyContext *context)
|
||||
{
|
||||
return g_datalist_id_get_data (&object->qdata, context->quark_notify_queue);
|
||||
}
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_NOTIFY_H__ */
|
||||
234
libraries/i686-linux/include/glib-2.0/gobject/gparam.h
Normal file
234
libraries/i686-linux/include/glib-2.0/gobject/gparam.h
Normal file
@@ -0,0 +1,234 @@
|
||||
/* GObject - GLib Type, Object, Parameter and Signal Library
|
||||
* Copyright (C) 1997-1999, 2000-2001 Tim Janik and Red Hat, Inc.
|
||||
*
|
||||
* 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
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* gparam.h: GParamSpec base class implementation
|
||||
*/
|
||||
#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
|
||||
#error "Only <glib-object.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_PARAM_H__
|
||||
#define __G_PARAM_H__
|
||||
|
||||
#include <gobject/gvalue.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* --- standard type macros --- */
|
||||
#define G_TYPE_IS_PARAM(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_PARAM)
|
||||
#define G_PARAM_SPEC(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM, GParamSpec))
|
||||
#define G_IS_PARAM_SPEC(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM))
|
||||
#define G_PARAM_SPEC_CLASS(pclass) (G_TYPE_CHECK_CLASS_CAST ((pclass), G_TYPE_PARAM, GParamSpecClass))
|
||||
#define G_IS_PARAM_SPEC_CLASS(pclass) (G_TYPE_CHECK_CLASS_TYPE ((pclass), G_TYPE_PARAM))
|
||||
#define G_PARAM_SPEC_GET_CLASS(pspec) (G_TYPE_INSTANCE_GET_CLASS ((pspec), G_TYPE_PARAM, GParamSpecClass))
|
||||
|
||||
|
||||
/* --- convenience macros --- */
|
||||
#define G_PARAM_SPEC_TYPE(pspec) (G_TYPE_FROM_INSTANCE (pspec))
|
||||
#define G_PARAM_SPEC_TYPE_NAME(pspec) (g_type_name (G_PARAM_SPEC_TYPE (pspec)))
|
||||
#define G_PARAM_SPEC_VALUE_TYPE(pspec) (G_PARAM_SPEC (pspec)->value_type)
|
||||
#define G_VALUE_HOLDS_PARAM(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_PARAM))
|
||||
|
||||
|
||||
/* --- flags --- */
|
||||
typedef enum
|
||||
{
|
||||
G_PARAM_READABLE = 1 << 0,
|
||||
G_PARAM_WRITABLE = 1 << 1,
|
||||
G_PARAM_CONSTRUCT = 1 << 2,
|
||||
G_PARAM_CONSTRUCT_ONLY = 1 << 3,
|
||||
G_PARAM_LAX_VALIDATION = 1 << 4,
|
||||
G_PARAM_STATIC_NAME = 1 << 5,
|
||||
#ifndef G_DISABLE_DEPRECATED
|
||||
G_PARAM_PRIVATE = G_PARAM_STATIC_NAME,
|
||||
#endif
|
||||
G_PARAM_STATIC_NICK = 1 << 6,
|
||||
G_PARAM_STATIC_BLURB = 1 << 7
|
||||
} GParamFlags;
|
||||
#define G_PARAM_READWRITE (G_PARAM_READABLE | G_PARAM_WRITABLE)
|
||||
#define G_PARAM_MASK (0x000000ff)
|
||||
/* bits in the range 0xffffff00 are reserved for 3rd party usage */
|
||||
#define G_PARAM_USER_SHIFT (8)
|
||||
|
||||
|
||||
/* --- typedefs & structures --- */
|
||||
typedef struct _GParamSpec GParamSpec;
|
||||
typedef struct _GParamSpecClass GParamSpecClass;
|
||||
typedef struct _GParameter GParameter;
|
||||
typedef struct _GParamSpecPool GParamSpecPool;
|
||||
struct _GParamSpec
|
||||
{
|
||||
GTypeInstance g_type_instance;
|
||||
|
||||
gchar *name;
|
||||
GParamFlags flags;
|
||||
GType value_type;
|
||||
GType owner_type; /* class or interface using this property */
|
||||
|
||||
/*< private >*/
|
||||
gchar *_nick;
|
||||
gchar *_blurb;
|
||||
GData *qdata;
|
||||
guint ref_count;
|
||||
guint param_id; /* sort-criteria */
|
||||
};
|
||||
struct _GParamSpecClass
|
||||
{
|
||||
GTypeClass g_type_class;
|
||||
|
||||
GType value_type;
|
||||
|
||||
void (*finalize) (GParamSpec *pspec);
|
||||
|
||||
/* GParam methods */
|
||||
void (*value_set_default) (GParamSpec *pspec,
|
||||
GValue *value);
|
||||
gboolean (*value_validate) (GParamSpec *pspec,
|
||||
GValue *value);
|
||||
gint (*values_cmp) (GParamSpec *pspec,
|
||||
const GValue *value1,
|
||||
const GValue *value2);
|
||||
/*< private >*/
|
||||
gpointer dummy[4];
|
||||
};
|
||||
struct _GParameter /* auxillary structure for _setv() variants */
|
||||
{
|
||||
const gchar *name;
|
||||
GValue value;
|
||||
};
|
||||
|
||||
|
||||
/* --- prototypes --- */
|
||||
GParamSpec* g_param_spec_ref (GParamSpec *pspec);
|
||||
void g_param_spec_unref (GParamSpec *pspec);
|
||||
void g_param_spec_sink (GParamSpec *pspec);
|
||||
GParamSpec* g_param_spec_ref_sink (GParamSpec *pspec);
|
||||
gpointer g_param_spec_get_qdata (GParamSpec *pspec,
|
||||
GQuark quark);
|
||||
void g_param_spec_set_qdata (GParamSpec *pspec,
|
||||
GQuark quark,
|
||||
gpointer data);
|
||||
void g_param_spec_set_qdata_full (GParamSpec *pspec,
|
||||
GQuark quark,
|
||||
gpointer data,
|
||||
GDestroyNotify destroy);
|
||||
gpointer g_param_spec_steal_qdata (GParamSpec *pspec,
|
||||
GQuark quark);
|
||||
GParamSpec* g_param_spec_get_redirect_target (GParamSpec *pspec);
|
||||
|
||||
void g_param_value_set_default (GParamSpec *pspec,
|
||||
GValue *value);
|
||||
gboolean g_param_value_defaults (GParamSpec *pspec,
|
||||
GValue *value);
|
||||
gboolean g_param_value_validate (GParamSpec *pspec,
|
||||
GValue *value);
|
||||
gboolean g_param_value_convert (GParamSpec *pspec,
|
||||
const GValue *src_value,
|
||||
GValue *dest_value,
|
||||
gboolean strict_validation);
|
||||
gint g_param_values_cmp (GParamSpec *pspec,
|
||||
const GValue *value1,
|
||||
const GValue *value2);
|
||||
G_CONST_RETURN gchar* g_param_spec_get_name (GParamSpec *pspec);
|
||||
G_CONST_RETURN gchar* g_param_spec_get_nick (GParamSpec *pspec);
|
||||
G_CONST_RETURN gchar* g_param_spec_get_blurb (GParamSpec *pspec);
|
||||
void g_value_set_param (GValue *value,
|
||||
GParamSpec *param);
|
||||
GParamSpec* g_value_get_param (const GValue *value);
|
||||
GParamSpec* g_value_dup_param (const GValue *value);
|
||||
|
||||
|
||||
void g_value_take_param (GValue *value,
|
||||
GParamSpec *param);
|
||||
#ifndef G_DISABLE_DEPRECATED
|
||||
void g_value_set_param_take_ownership (GValue *value,
|
||||
GParamSpec *param);
|
||||
#endif
|
||||
|
||||
/* --- convenience functions --- */
|
||||
typedef struct _GParamSpecTypeInfo GParamSpecTypeInfo;
|
||||
struct _GParamSpecTypeInfo
|
||||
{
|
||||
/* type system portion */
|
||||
guint16 instance_size; /* obligatory */
|
||||
guint16 n_preallocs; /* optional */
|
||||
void (*instance_init) (GParamSpec *pspec); /* optional */
|
||||
|
||||
/* class portion */
|
||||
GType value_type; /* obligatory */
|
||||
void (*finalize) (GParamSpec *pspec); /* optional */
|
||||
void (*value_set_default) (GParamSpec *pspec, /* recommended */
|
||||
GValue *value);
|
||||
gboolean (*value_validate) (GParamSpec *pspec, /* optional */
|
||||
GValue *value);
|
||||
gint (*values_cmp) (GParamSpec *pspec, /* recommended */
|
||||
const GValue *value1,
|
||||
const GValue *value2);
|
||||
};
|
||||
GType g_param_type_register_static (const gchar *name,
|
||||
const GParamSpecTypeInfo *pspec_info);
|
||||
|
||||
/* For registering builting types */
|
||||
GType _g_param_type_register_static_constant (const gchar *name,
|
||||
const GParamSpecTypeInfo *pspec_info,
|
||||
GType opt_type);
|
||||
|
||||
|
||||
/* --- protected --- */
|
||||
gpointer g_param_spec_internal (GType param_type,
|
||||
const gchar *name,
|
||||
const gchar *nick,
|
||||
const gchar *blurb,
|
||||
GParamFlags flags);
|
||||
GParamSpecPool* g_param_spec_pool_new (gboolean type_prefixing);
|
||||
void g_param_spec_pool_insert (GParamSpecPool *pool,
|
||||
GParamSpec *pspec,
|
||||
GType owner_type);
|
||||
void g_param_spec_pool_remove (GParamSpecPool *pool,
|
||||
GParamSpec *pspec);
|
||||
GParamSpec* g_param_spec_pool_lookup (GParamSpecPool *pool,
|
||||
const gchar *param_name,
|
||||
GType owner_type,
|
||||
gboolean walk_ancestors);
|
||||
GList* g_param_spec_pool_list_owned (GParamSpecPool *pool,
|
||||
GType owner_type);
|
||||
GParamSpec** g_param_spec_pool_list (GParamSpecPool *pool,
|
||||
GType owner_type,
|
||||
guint *n_pspecs_p);
|
||||
|
||||
|
||||
|
||||
/* contracts:
|
||||
*
|
||||
* gboolean value_validate (GParamSpec *pspec,
|
||||
* GValue *value):
|
||||
* modify value contents in the least destructive way, so
|
||||
* that it complies with pspec's requirements (i.e.
|
||||
* according to minimum/maximum ranges etc...). return
|
||||
* whether modification was necessary.
|
||||
*
|
||||
* gint values_cmp (GParamSpec *pspec,
|
||||
* const GValue *value1,
|
||||
* const GValue *value2):
|
||||
* return value1 - value2, i.e. (-1) if value1 < value2,
|
||||
* (+1) if value1 > value2, and (0) otherwise (equality)
|
||||
*/
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_PARAM_H__ */
|
||||
439
libraries/i686-linux/include/glib-2.0/gobject/gparamspecs.h
Normal file
439
libraries/i686-linux/include/glib-2.0/gobject/gparamspecs.h
Normal file
@@ -0,0 +1,439 @@
|
||||
/* GObject - GLib Type, Object, Parameter and Signal Library
|
||||
* Copyright (C) 1997-1999, 2000-2001 Tim Janik and Red Hat, Inc.
|
||||
*
|
||||
* 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
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* gparamspecs.h: GLib default param specs
|
||||
*/
|
||||
#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
|
||||
#error "Only <glib-object.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_PARAMSPECS_H__
|
||||
#define __G_PARAMSPECS_H__
|
||||
|
||||
#include <gobject/gvalue.h>
|
||||
#include <gobject/genums.h>
|
||||
#include <gobject/gboxed.h>
|
||||
#include <gobject/gobject.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* --- type macros --- */
|
||||
#define G_TYPE_PARAM_CHAR (g_param_spec_types[0])
|
||||
#define G_IS_PARAM_SPEC_CHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_CHAR))
|
||||
#define G_PARAM_SPEC_CHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_CHAR, GParamSpecChar))
|
||||
#define G_TYPE_PARAM_UCHAR (g_param_spec_types[1])
|
||||
#define G_IS_PARAM_SPEC_UCHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UCHAR))
|
||||
#define G_PARAM_SPEC_UCHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UCHAR, GParamSpecUChar))
|
||||
#define G_TYPE_PARAM_BOOLEAN (g_param_spec_types[2])
|
||||
#define G_IS_PARAM_SPEC_BOOLEAN(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_BOOLEAN))
|
||||
#define G_PARAM_SPEC_BOOLEAN(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_BOOLEAN, GParamSpecBoolean))
|
||||
#define G_TYPE_PARAM_INT (g_param_spec_types[3])
|
||||
#define G_IS_PARAM_SPEC_INT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_INT))
|
||||
#define G_PARAM_SPEC_INT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_INT, GParamSpecInt))
|
||||
#define G_TYPE_PARAM_UINT (g_param_spec_types[4])
|
||||
#define G_IS_PARAM_SPEC_UINT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UINT))
|
||||
#define G_PARAM_SPEC_UINT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UINT, GParamSpecUInt))
|
||||
#define G_TYPE_PARAM_LONG (g_param_spec_types[5])
|
||||
#define G_IS_PARAM_SPEC_LONG(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_LONG))
|
||||
#define G_PARAM_SPEC_LONG(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_LONG, GParamSpecLong))
|
||||
#define G_TYPE_PARAM_ULONG (g_param_spec_types[6])
|
||||
#define G_IS_PARAM_SPEC_ULONG(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_ULONG))
|
||||
#define G_PARAM_SPEC_ULONG(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_ULONG, GParamSpecULong))
|
||||
#define G_TYPE_PARAM_INT64 (g_param_spec_types[7])
|
||||
#define G_IS_PARAM_SPEC_INT64(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_INT64))
|
||||
#define G_PARAM_SPEC_INT64(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_INT64, GParamSpecInt64))
|
||||
#define G_TYPE_PARAM_UINT64 (g_param_spec_types[8])
|
||||
#define G_IS_PARAM_SPEC_UINT64(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UINT64))
|
||||
#define G_PARAM_SPEC_UINT64(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UINT64, GParamSpecUInt64))
|
||||
#define G_TYPE_PARAM_UNICHAR (g_param_spec_types[9])
|
||||
#define G_PARAM_SPEC_UNICHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UNICHAR, GParamSpecUnichar))
|
||||
#define G_IS_PARAM_SPEC_UNICHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UNICHAR))
|
||||
#define G_TYPE_PARAM_ENUM (g_param_spec_types[10])
|
||||
#define G_IS_PARAM_SPEC_ENUM(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_ENUM))
|
||||
#define G_PARAM_SPEC_ENUM(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_ENUM, GParamSpecEnum))
|
||||
#define G_TYPE_PARAM_FLAGS (g_param_spec_types[11])
|
||||
#define G_IS_PARAM_SPEC_FLAGS(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_FLAGS))
|
||||
#define G_PARAM_SPEC_FLAGS(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_FLAGS, GParamSpecFlags))
|
||||
#define G_TYPE_PARAM_FLOAT (g_param_spec_types[12])
|
||||
#define G_IS_PARAM_SPEC_FLOAT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_FLOAT))
|
||||
#define G_PARAM_SPEC_FLOAT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_FLOAT, GParamSpecFloat))
|
||||
#define G_TYPE_PARAM_DOUBLE (g_param_spec_types[13])
|
||||
#define G_IS_PARAM_SPEC_DOUBLE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_DOUBLE))
|
||||
#define G_PARAM_SPEC_DOUBLE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_DOUBLE, GParamSpecDouble))
|
||||
#define G_TYPE_PARAM_STRING (g_param_spec_types[14])
|
||||
#define G_IS_PARAM_SPEC_STRING(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_STRING))
|
||||
#define G_PARAM_SPEC_STRING(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_STRING, GParamSpecString))
|
||||
#define G_TYPE_PARAM_PARAM (g_param_spec_types[15])
|
||||
#define G_IS_PARAM_SPEC_PARAM(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_PARAM))
|
||||
#define G_PARAM_SPEC_PARAM(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_PARAM, GParamSpecParam))
|
||||
#define G_TYPE_PARAM_BOXED (g_param_spec_types[16])
|
||||
#define G_IS_PARAM_SPEC_BOXED(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_BOXED))
|
||||
#define G_PARAM_SPEC_BOXED(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_BOXED, GParamSpecBoxed))
|
||||
#define G_TYPE_PARAM_POINTER (g_param_spec_types[17])
|
||||
#define G_IS_PARAM_SPEC_POINTER(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_POINTER))
|
||||
#define G_PARAM_SPEC_POINTER(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_POINTER, GParamSpecPointer))
|
||||
#define G_TYPE_PARAM_VALUE_ARRAY (g_param_spec_types[18])
|
||||
#define G_IS_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_VALUE_ARRAY))
|
||||
#define G_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_VALUE_ARRAY, GParamSpecValueArray))
|
||||
#define G_TYPE_PARAM_OBJECT (g_param_spec_types[19])
|
||||
#define G_IS_PARAM_SPEC_OBJECT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_OBJECT))
|
||||
#define G_PARAM_SPEC_OBJECT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_OBJECT, GParamSpecObject))
|
||||
#define G_TYPE_PARAM_OVERRIDE (g_param_spec_types[20])
|
||||
#define G_IS_PARAM_SPEC_OVERRIDE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_OVERRIDE))
|
||||
#define G_PARAM_SPEC_OVERRIDE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_OVERRIDE, GParamSpecOverride))
|
||||
#define G_TYPE_PARAM_GTYPE (g_param_spec_types[21])
|
||||
#define G_IS_PARAM_SPEC_GTYPE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_GTYPE))
|
||||
#define G_PARAM_SPEC_GTYPE(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_GTYPE, GParamSpecGType))
|
||||
|
||||
|
||||
/* --- typedefs & structures --- */
|
||||
typedef struct _GParamSpecChar GParamSpecChar;
|
||||
typedef struct _GParamSpecUChar GParamSpecUChar;
|
||||
typedef struct _GParamSpecBoolean GParamSpecBoolean;
|
||||
typedef struct _GParamSpecInt GParamSpecInt;
|
||||
typedef struct _GParamSpecUInt GParamSpecUInt;
|
||||
typedef struct _GParamSpecLong GParamSpecLong;
|
||||
typedef struct _GParamSpecULong GParamSpecULong;
|
||||
typedef struct _GParamSpecInt64 GParamSpecInt64;
|
||||
typedef struct _GParamSpecUInt64 GParamSpecUInt64;
|
||||
typedef struct _GParamSpecUnichar GParamSpecUnichar;
|
||||
typedef struct _GParamSpecEnum GParamSpecEnum;
|
||||
typedef struct _GParamSpecFlags GParamSpecFlags;
|
||||
typedef struct _GParamSpecFloat GParamSpecFloat;
|
||||
typedef struct _GParamSpecDouble GParamSpecDouble;
|
||||
typedef struct _GParamSpecString GParamSpecString;
|
||||
typedef struct _GParamSpecParam GParamSpecParam;
|
||||
typedef struct _GParamSpecBoxed GParamSpecBoxed;
|
||||
typedef struct _GParamSpecPointer GParamSpecPointer;
|
||||
typedef struct _GParamSpecValueArray GParamSpecValueArray;
|
||||
typedef struct _GParamSpecObject GParamSpecObject;
|
||||
typedef struct _GParamSpecOverride GParamSpecOverride;
|
||||
typedef struct _GParamSpecGType GParamSpecGType;
|
||||
|
||||
struct _GParamSpecChar
|
||||
{
|
||||
GParamSpec parent_instance;
|
||||
|
||||
gint8 minimum;
|
||||
gint8 maximum;
|
||||
gint8 default_value;
|
||||
};
|
||||
struct _GParamSpecUChar
|
||||
{
|
||||
GParamSpec parent_instance;
|
||||
|
||||
guint8 minimum;
|
||||
guint8 maximum;
|
||||
guint8 default_value;
|
||||
};
|
||||
struct _GParamSpecBoolean
|
||||
{
|
||||
GParamSpec parent_instance;
|
||||
|
||||
gboolean default_value;
|
||||
};
|
||||
struct _GParamSpecInt
|
||||
{
|
||||
GParamSpec parent_instance;
|
||||
|
||||
gint minimum;
|
||||
gint maximum;
|
||||
gint default_value;
|
||||
};
|
||||
struct _GParamSpecUInt
|
||||
{
|
||||
GParamSpec parent_instance;
|
||||
|
||||
guint minimum;
|
||||
guint maximum;
|
||||
guint default_value;
|
||||
};
|
||||
struct _GParamSpecLong
|
||||
{
|
||||
GParamSpec parent_instance;
|
||||
|
||||
glong minimum;
|
||||
glong maximum;
|
||||
glong default_value;
|
||||
};
|
||||
struct _GParamSpecULong
|
||||
{
|
||||
GParamSpec parent_instance;
|
||||
|
||||
gulong minimum;
|
||||
gulong maximum;
|
||||
gulong default_value;
|
||||
};
|
||||
struct _GParamSpecInt64
|
||||
{
|
||||
GParamSpec parent_instance;
|
||||
|
||||
gint64 minimum;
|
||||
gint64 maximum;
|
||||
gint64 default_value;
|
||||
};
|
||||
struct _GParamSpecUInt64
|
||||
{
|
||||
GParamSpec parent_instance;
|
||||
|
||||
guint64 minimum;
|
||||
guint64 maximum;
|
||||
guint64 default_value;
|
||||
};
|
||||
struct _GParamSpecUnichar
|
||||
{
|
||||
GParamSpec parent_instance;
|
||||
|
||||
gunichar default_value;
|
||||
};
|
||||
struct _GParamSpecEnum
|
||||
{
|
||||
GParamSpec parent_instance;
|
||||
|
||||
GEnumClass *enum_class;
|
||||
gint default_value;
|
||||
};
|
||||
struct _GParamSpecFlags
|
||||
{
|
||||
GParamSpec parent_instance;
|
||||
|
||||
GFlagsClass *flags_class;
|
||||
guint default_value;
|
||||
};
|
||||
struct _GParamSpecFloat
|
||||
{
|
||||
GParamSpec parent_instance;
|
||||
|
||||
gfloat minimum;
|
||||
gfloat maximum;
|
||||
gfloat default_value;
|
||||
gfloat epsilon;
|
||||
};
|
||||
struct _GParamSpecDouble
|
||||
{
|
||||
GParamSpec parent_instance;
|
||||
|
||||
gdouble minimum;
|
||||
gdouble maximum;
|
||||
gdouble default_value;
|
||||
gdouble epsilon;
|
||||
};
|
||||
struct _GParamSpecString
|
||||
{
|
||||
GParamSpec parent_instance;
|
||||
|
||||
gchar *default_value;
|
||||
gchar *cset_first;
|
||||
gchar *cset_nth;
|
||||
gchar substitutor;
|
||||
guint null_fold_if_empty : 1;
|
||||
guint ensure_non_null : 1;
|
||||
};
|
||||
struct _GParamSpecParam
|
||||
{
|
||||
GParamSpec parent_instance;
|
||||
};
|
||||
struct _GParamSpecBoxed
|
||||
{
|
||||
GParamSpec parent_instance;
|
||||
};
|
||||
struct _GParamSpecPointer
|
||||
{
|
||||
GParamSpec parent_instance;
|
||||
};
|
||||
struct _GParamSpecValueArray
|
||||
{
|
||||
GParamSpec parent_instance;
|
||||
GParamSpec *element_spec;
|
||||
guint fixed_n_elements;
|
||||
};
|
||||
struct _GParamSpecObject
|
||||
{
|
||||
GParamSpec parent_instance;
|
||||
};
|
||||
struct _GParamSpecOverride
|
||||
{
|
||||
/*< private >*/
|
||||
GParamSpec parent_instance;
|
||||
GParamSpec *overridden;
|
||||
};
|
||||
struct _GParamSpecGType
|
||||
{
|
||||
GParamSpec parent_instance;
|
||||
GType is_a_type;
|
||||
};
|
||||
|
||||
/* --- GParamSpec prototypes --- */
|
||||
GParamSpec* g_param_spec_char (const gchar *name,
|
||||
const gchar *nick,
|
||||
const gchar *blurb,
|
||||
gint8 minimum,
|
||||
gint8 maximum,
|
||||
gint8 default_value,
|
||||
GParamFlags flags);
|
||||
GParamSpec* g_param_spec_uchar (const gchar *name,
|
||||
const gchar *nick,
|
||||
const gchar *blurb,
|
||||
guint8 minimum,
|
||||
guint8 maximum,
|
||||
guint8 default_value,
|
||||
GParamFlags flags);
|
||||
GParamSpec* g_param_spec_boolean (const gchar *name,
|
||||
const gchar *nick,
|
||||
const gchar *blurb,
|
||||
gboolean default_value,
|
||||
GParamFlags flags);
|
||||
GParamSpec* g_param_spec_int (const gchar *name,
|
||||
const gchar *nick,
|
||||
const gchar *blurb,
|
||||
gint minimum,
|
||||
gint maximum,
|
||||
gint default_value,
|
||||
GParamFlags flags);
|
||||
GParamSpec* g_param_spec_uint (const gchar *name,
|
||||
const gchar *nick,
|
||||
const gchar *blurb,
|
||||
guint minimum,
|
||||
guint maximum,
|
||||
guint default_value,
|
||||
GParamFlags flags);
|
||||
GParamSpec* g_param_spec_long (const gchar *name,
|
||||
const gchar *nick,
|
||||
const gchar *blurb,
|
||||
glong minimum,
|
||||
glong maximum,
|
||||
glong default_value,
|
||||
GParamFlags flags);
|
||||
GParamSpec* g_param_spec_ulong (const gchar *name,
|
||||
const gchar *nick,
|
||||
const gchar *blurb,
|
||||
gulong minimum,
|
||||
gulong maximum,
|
||||
gulong default_value,
|
||||
GParamFlags flags);
|
||||
GParamSpec* g_param_spec_int64 (const gchar *name,
|
||||
const gchar *nick,
|
||||
const gchar *blurb,
|
||||
gint64 minimum,
|
||||
gint64 maximum,
|
||||
gint64 default_value,
|
||||
GParamFlags flags);
|
||||
GParamSpec* g_param_spec_uint64 (const gchar *name,
|
||||
const gchar *nick,
|
||||
const gchar *blurb,
|
||||
guint64 minimum,
|
||||
guint64 maximum,
|
||||
guint64 default_value,
|
||||
GParamFlags flags);
|
||||
GParamSpec* g_param_spec_unichar (const gchar *name,
|
||||
const gchar *nick,
|
||||
const gchar *blurb,
|
||||
gunichar default_value,
|
||||
GParamFlags flags);
|
||||
GParamSpec* g_param_spec_enum (const gchar *name,
|
||||
const gchar *nick,
|
||||
const gchar *blurb,
|
||||
GType enum_type,
|
||||
gint default_value,
|
||||
GParamFlags flags);
|
||||
GParamSpec* g_param_spec_flags (const gchar *name,
|
||||
const gchar *nick,
|
||||
const gchar *blurb,
|
||||
GType flags_type,
|
||||
guint default_value,
|
||||
GParamFlags flags);
|
||||
GParamSpec* g_param_spec_float (const gchar *name,
|
||||
const gchar *nick,
|
||||
const gchar *blurb,
|
||||
gfloat minimum,
|
||||
gfloat maximum,
|
||||
gfloat default_value,
|
||||
GParamFlags flags);
|
||||
GParamSpec* g_param_spec_double (const gchar *name,
|
||||
const gchar *nick,
|
||||
const gchar *blurb,
|
||||
gdouble minimum,
|
||||
gdouble maximum,
|
||||
gdouble default_value,
|
||||
GParamFlags flags);
|
||||
GParamSpec* g_param_spec_string (const gchar *name,
|
||||
const gchar *nick,
|
||||
const gchar *blurb,
|
||||
const gchar *default_value,
|
||||
GParamFlags flags);
|
||||
GParamSpec* g_param_spec_param (const gchar *name,
|
||||
const gchar *nick,
|
||||
const gchar *blurb,
|
||||
GType param_type,
|
||||
GParamFlags flags);
|
||||
GParamSpec* g_param_spec_boxed (const gchar *name,
|
||||
const gchar *nick,
|
||||
const gchar *blurb,
|
||||
GType boxed_type,
|
||||
GParamFlags flags);
|
||||
GParamSpec* g_param_spec_pointer (const gchar *name,
|
||||
const gchar *nick,
|
||||
const gchar *blurb,
|
||||
GParamFlags flags);
|
||||
GParamSpec* g_param_spec_value_array (const gchar *name,
|
||||
const gchar *nick,
|
||||
const gchar *blurb,
|
||||
GParamSpec *element_spec,
|
||||
GParamFlags flags);
|
||||
GParamSpec* g_param_spec_object (const gchar *name,
|
||||
const gchar *nick,
|
||||
const gchar *blurb,
|
||||
GType object_type,
|
||||
GParamFlags flags);
|
||||
GParamSpec* g_param_spec_override (const gchar *name,
|
||||
GParamSpec *overridden);
|
||||
GParamSpec* g_param_spec_gtype (const gchar *name,
|
||||
const gchar *nick,
|
||||
const gchar *blurb,
|
||||
GType is_a_type,
|
||||
GParamFlags flags);
|
||||
|
||||
/* --- internal --- */
|
||||
/* We prefix variable declarations so they can
|
||||
* properly get exported in windows dlls.
|
||||
*/
|
||||
#ifndef GOBJECT_VAR
|
||||
# ifdef G_PLATFORM_WIN32
|
||||
# ifdef GOBJECT_STATIC_COMPILATION
|
||||
# define GOBJECT_VAR extern
|
||||
# else /* !GOBJECT_STATIC_COMPILATION */
|
||||
# ifdef GOBJECT_COMPILATION
|
||||
# ifdef DLL_EXPORT
|
||||
# define GOBJECT_VAR __declspec(dllexport)
|
||||
# else /* !DLL_EXPORT */
|
||||
# define GOBJECT_VAR extern
|
||||
# endif /* !DLL_EXPORT */
|
||||
# else /* !GOBJECT_COMPILATION */
|
||||
# define GOBJECT_VAR extern __declspec(dllimport)
|
||||
# endif /* !GOBJECT_COMPILATION */
|
||||
# endif /* !GOBJECT_STATIC_COMPILATION */
|
||||
# else /* !G_PLATFORM_WIN32 */
|
||||
# define GOBJECT_VAR extern
|
||||
# endif /* !G_PLATFORM_WIN32 */
|
||||
#endif /* GOBJECT_VAR */
|
||||
|
||||
GOBJECT_VAR GType *g_param_spec_types;
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_PARAMSPECS_H__ */
|
||||
270
libraries/i686-linux/include/glib-2.0/gobject/gsignal.h
Normal file
270
libraries/i686-linux/include/glib-2.0/gobject/gsignal.h
Normal file
@@ -0,0 +1,270 @@
|
||||
/* GObject - GLib Type, Object, Parameter and Signal Library
|
||||
* Copyright (C) 2000-2001 Red Hat, Inc.
|
||||
*
|
||||
* 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
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
|
||||
#error "Only <glib-object.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_SIGNAL_H__
|
||||
#define __G_SIGNAL_H__
|
||||
|
||||
#include <gobject/gclosure.h>
|
||||
#include <gobject/gvalue.h>
|
||||
#include <gobject/gparam.h>
|
||||
#include <gobject/gmarshal.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* --- typedefs --- */
|
||||
typedef struct _GSignalQuery GSignalQuery;
|
||||
typedef struct _GSignalInvocationHint GSignalInvocationHint;
|
||||
typedef GClosureMarshal GSignalCMarshaller;
|
||||
typedef gboolean (*GSignalEmissionHook) (GSignalInvocationHint *ihint,
|
||||
guint n_param_values,
|
||||
const GValue *param_values,
|
||||
gpointer data);
|
||||
typedef gboolean (*GSignalAccumulator) (GSignalInvocationHint *ihint,
|
||||
GValue *return_accu,
|
||||
const GValue *handler_return,
|
||||
gpointer data);
|
||||
|
||||
|
||||
/* --- run, match and connect types --- */
|
||||
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,
|
||||
G_SIGNAL_DETAILED = 1 << 4,
|
||||
G_SIGNAL_ACTION = 1 << 5,
|
||||
G_SIGNAL_NO_HOOKS = 1 << 6
|
||||
} GSignalFlags;
|
||||
#define G_SIGNAL_FLAGS_MASK 0x7f
|
||||
typedef enum
|
||||
{
|
||||
G_CONNECT_AFTER = 1 << 0,
|
||||
G_CONNECT_SWAPPED = 1 << 1
|
||||
} GConnectFlags;
|
||||
typedef enum
|
||||
{
|
||||
G_SIGNAL_MATCH_ID = 1 << 0,
|
||||
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
|
||||
} GSignalMatchType;
|
||||
#define G_SIGNAL_MATCH_MASK 0x3f
|
||||
#define G_SIGNAL_TYPE_STATIC_SCOPE (G_TYPE_FLAG_RESERVED_ID_BIT)
|
||||
|
||||
|
||||
/* --- signal information --- */
|
||||
struct _GSignalInvocationHint
|
||||
{
|
||||
guint signal_id;
|
||||
GQuark detail;
|
||||
GSignalFlags run_type;
|
||||
};
|
||||
struct _GSignalQuery
|
||||
{
|
||||
guint signal_id;
|
||||
const gchar *signal_name;
|
||||
GType itype;
|
||||
GSignalFlags signal_flags;
|
||||
GType return_type; /* mangled with G_SIGNAL_TYPE_STATIC_SCOPE flag */
|
||||
guint n_params;
|
||||
const GType *param_types; /* mangled with G_SIGNAL_TYPE_STATIC_SCOPE flag */
|
||||
};
|
||||
|
||||
|
||||
/* --- signals --- */
|
||||
guint g_signal_newv (const gchar *signal_name,
|
||||
GType itype,
|
||||
GSignalFlags signal_flags,
|
||||
GClosure *class_closure,
|
||||
GSignalAccumulator accumulator,
|
||||
gpointer accu_data,
|
||||
GSignalCMarshaller c_marshaller,
|
||||
GType return_type,
|
||||
guint n_params,
|
||||
GType *param_types);
|
||||
guint g_signal_new_valist (const gchar *signal_name,
|
||||
GType itype,
|
||||
GSignalFlags signal_flags,
|
||||
GClosure *class_closure,
|
||||
GSignalAccumulator accumulator,
|
||||
gpointer accu_data,
|
||||
GSignalCMarshaller c_marshaller,
|
||||
GType return_type,
|
||||
guint n_params,
|
||||
va_list args);
|
||||
guint g_signal_new (const gchar *signal_name,
|
||||
GType itype,
|
||||
GSignalFlags signal_flags,
|
||||
guint class_offset,
|
||||
GSignalAccumulator accumulator,
|
||||
gpointer accu_data,
|
||||
GSignalCMarshaller c_marshaller,
|
||||
GType return_type,
|
||||
guint n_params,
|
||||
...);
|
||||
void g_signal_emitv (const GValue *instance_and_params,
|
||||
guint signal_id,
|
||||
GQuark detail,
|
||||
GValue *return_value);
|
||||
void g_signal_emit_valist (gpointer instance,
|
||||
guint signal_id,
|
||||
GQuark detail,
|
||||
va_list var_args);
|
||||
void g_signal_emit (gpointer instance,
|
||||
guint signal_id,
|
||||
GQuark detail,
|
||||
...);
|
||||
void g_signal_emit_by_name (gpointer instance,
|
||||
const gchar *detailed_signal,
|
||||
...);
|
||||
guint g_signal_lookup (const gchar *name,
|
||||
GType itype);
|
||||
G_CONST_RETURN gchar* g_signal_name (guint signal_id);
|
||||
void g_signal_query (guint signal_id,
|
||||
GSignalQuery *query);
|
||||
guint* g_signal_list_ids (GType itype,
|
||||
guint *n_ids);
|
||||
gboolean g_signal_parse_name (const gchar *detailed_signal,
|
||||
GType itype,
|
||||
guint *signal_id_p,
|
||||
GQuark *detail_p,
|
||||
gboolean force_detail_quark);
|
||||
GSignalInvocationHint* g_signal_get_invocation_hint (gpointer instance);
|
||||
|
||||
|
||||
/* --- signal emissions --- */
|
||||
void g_signal_stop_emission (gpointer instance,
|
||||
guint signal_id,
|
||||
GQuark detail);
|
||||
void g_signal_stop_emission_by_name (gpointer instance,
|
||||
const gchar *detailed_signal);
|
||||
gulong g_signal_add_emission_hook (guint signal_id,
|
||||
GQuark detail,
|
||||
GSignalEmissionHook hook_func,
|
||||
gpointer hook_data,
|
||||
GDestroyNotify data_destroy);
|
||||
void g_signal_remove_emission_hook (guint signal_id,
|
||||
gulong hook_id);
|
||||
|
||||
|
||||
/* --- signal handlers --- */
|
||||
gboolean g_signal_has_handler_pending (gpointer instance,
|
||||
guint signal_id,
|
||||
GQuark detail,
|
||||
gboolean may_be_blocked);
|
||||
gulong g_signal_connect_closure_by_id (gpointer instance,
|
||||
guint signal_id,
|
||||
GQuark detail,
|
||||
GClosure *closure,
|
||||
gboolean after);
|
||||
gulong g_signal_connect_closure (gpointer instance,
|
||||
const gchar *detailed_signal,
|
||||
GClosure *closure,
|
||||
gboolean after);
|
||||
gulong g_signal_connect_data (gpointer instance,
|
||||
const gchar *detailed_signal,
|
||||
GCallback c_handler,
|
||||
gpointer data,
|
||||
GClosureNotify destroy_data,
|
||||
GConnectFlags connect_flags);
|
||||
void g_signal_handler_block (gpointer instance,
|
||||
gulong handler_id);
|
||||
void g_signal_handler_unblock (gpointer instance,
|
||||
gulong handler_id);
|
||||
void g_signal_handler_disconnect (gpointer instance,
|
||||
gulong handler_id);
|
||||
gboolean g_signal_handler_is_connected (gpointer instance,
|
||||
gulong handler_id);
|
||||
gulong g_signal_handler_find (gpointer instance,
|
||||
GSignalMatchType mask,
|
||||
guint signal_id,
|
||||
GQuark detail,
|
||||
GClosure *closure,
|
||||
gpointer func,
|
||||
gpointer data);
|
||||
guint g_signal_handlers_block_matched (gpointer instance,
|
||||
GSignalMatchType mask,
|
||||
guint signal_id,
|
||||
GQuark detail,
|
||||
GClosure *closure,
|
||||
gpointer func,
|
||||
gpointer data);
|
||||
guint g_signal_handlers_unblock_matched (gpointer instance,
|
||||
GSignalMatchType mask,
|
||||
guint signal_id,
|
||||
GQuark detail,
|
||||
GClosure *closure,
|
||||
gpointer func,
|
||||
gpointer data);
|
||||
guint g_signal_handlers_disconnect_matched (gpointer instance,
|
||||
GSignalMatchType mask,
|
||||
guint signal_id,
|
||||
GQuark detail,
|
||||
GClosure *closure,
|
||||
gpointer func,
|
||||
gpointer data);
|
||||
|
||||
|
||||
/* --- chaining for language bindings --- */
|
||||
void g_signal_override_class_closure (guint signal_id,
|
||||
GType instance_type,
|
||||
GClosure *class_closure);
|
||||
void g_signal_chain_from_overridden (const GValue *instance_and_params,
|
||||
GValue *return_value);
|
||||
|
||||
|
||||
/* --- convenience --- */
|
||||
#define g_signal_connect(instance, detailed_signal, c_handler, data) \
|
||||
g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), NULL, (GConnectFlags) 0)
|
||||
#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)
|
||||
#define g_signal_connect_swapped(instance, detailed_signal, c_handler, data) \
|
||||
g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), NULL, G_CONNECT_SWAPPED)
|
||||
#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), \
|
||||
0, 0, NULL, (func), (data))
|
||||
#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))
|
||||
#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))
|
||||
|
||||
|
||||
gboolean g_signal_accumulator_true_handled (GSignalInvocationHint *ihint,
|
||||
GValue *return_accu,
|
||||
const GValue *handler_return,
|
||||
gpointer dummy);
|
||||
|
||||
/*< private >*/
|
||||
void g_signal_handlers_destroy (gpointer instance);
|
||||
void _g_signals_destroy (GType itype);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_SIGNAL_H__ */
|
||||
@@ -0,0 +1,41 @@
|
||||
/* GObject - GLib Type, Object, Parameter and Signal Library
|
||||
* Copyright (C) 2001 Red Hat, Inc.
|
||||
*
|
||||
* 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
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
|
||||
#error "Only <glib-object.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_SOURCECLOSURE_H__
|
||||
#define __G_SOURCECLOSURE_H__
|
||||
|
||||
#include <gobject/gclosure.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
void g_source_set_closure (GSource *source,
|
||||
GClosure *closure);
|
||||
|
||||
GType g_io_channel_get_type (void);
|
||||
GType g_io_condition_get_type (void);
|
||||
|
||||
#define G_TYPE_IO_CHANNEL (g_io_channel_get_type ())
|
||||
#define G_TYPE_IO_CONDITION (g_io_condition_get_type ())
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_SOURCECLOSURE_H__ */
|
||||
498
libraries/i686-linux/include/glib-2.0/gobject/gtype.h
Normal file
498
libraries/i686-linux/include/glib-2.0/gobject/gtype.h
Normal file
@@ -0,0 +1,498 @@
|
||||
/* GObject - GLib Type, Object, Parameter and Signal Library
|
||||
* Copyright (C) 1998-1999, 2000-2001 Tim Janik and Red Hat, Inc.
|
||||
*
|
||||
* 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
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
|
||||
#error "Only <glib-object.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_TYPE_H__
|
||||
#define __G_TYPE_H__
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* Basic Type Macros
|
||||
*/
|
||||
#define G_TYPE_FUNDAMENTAL(type) (g_type_fundamental (type))
|
||||
#define G_TYPE_FUNDAMENTAL_MAX (255 << G_TYPE_FUNDAMENTAL_SHIFT)
|
||||
|
||||
/* Constant fundamental types,
|
||||
* introduced by g_type_init().
|
||||
*/
|
||||
#define G_TYPE_INVALID G_TYPE_MAKE_FUNDAMENTAL (0)
|
||||
#define G_TYPE_NONE G_TYPE_MAKE_FUNDAMENTAL (1)
|
||||
#define G_TYPE_INTERFACE G_TYPE_MAKE_FUNDAMENTAL (2)
|
||||
#define G_TYPE_CHAR G_TYPE_MAKE_FUNDAMENTAL (3)
|
||||
#define G_TYPE_UCHAR G_TYPE_MAKE_FUNDAMENTAL (4)
|
||||
#define G_TYPE_BOOLEAN G_TYPE_MAKE_FUNDAMENTAL (5)
|
||||
#define G_TYPE_INT G_TYPE_MAKE_FUNDAMENTAL (6)
|
||||
#define G_TYPE_UINT G_TYPE_MAKE_FUNDAMENTAL (7)
|
||||
#define G_TYPE_LONG G_TYPE_MAKE_FUNDAMENTAL (8)
|
||||
#define G_TYPE_ULONG G_TYPE_MAKE_FUNDAMENTAL (9)
|
||||
#define G_TYPE_INT64 G_TYPE_MAKE_FUNDAMENTAL (10)
|
||||
#define G_TYPE_UINT64 G_TYPE_MAKE_FUNDAMENTAL (11)
|
||||
#define G_TYPE_ENUM G_TYPE_MAKE_FUNDAMENTAL (12)
|
||||
#define G_TYPE_FLAGS G_TYPE_MAKE_FUNDAMENTAL (13)
|
||||
#define G_TYPE_FLOAT G_TYPE_MAKE_FUNDAMENTAL (14)
|
||||
#define G_TYPE_DOUBLE G_TYPE_MAKE_FUNDAMENTAL (15)
|
||||
#define G_TYPE_STRING G_TYPE_MAKE_FUNDAMENTAL (16)
|
||||
#define G_TYPE_POINTER G_TYPE_MAKE_FUNDAMENTAL (17)
|
||||
#define G_TYPE_BOXED G_TYPE_MAKE_FUNDAMENTAL (18)
|
||||
#define G_TYPE_PARAM G_TYPE_MAKE_FUNDAMENTAL (19)
|
||||
#define G_TYPE_OBJECT G_TYPE_MAKE_FUNDAMENTAL (20)
|
||||
|
||||
|
||||
/* Reserved fundamental type numbers to create new fundamental
|
||||
* type IDs with G_TYPE_MAKE_FUNDAMENTAL().
|
||||
* Send email to gtk-devel-list@redhat.com for reservations.
|
||||
*/
|
||||
#define G_TYPE_FUNDAMENTAL_SHIFT (2)
|
||||
#define G_TYPE_MAKE_FUNDAMENTAL(x) ((GType) ((x) << G_TYPE_FUNDAMENTAL_SHIFT))
|
||||
#define G_TYPE_RESERVED_GLIB_FIRST (21)
|
||||
#define G_TYPE_RESERVED_GLIB_LAST (31)
|
||||
#define G_TYPE_RESERVED_BSE_FIRST (32)
|
||||
#define G_TYPE_RESERVED_BSE_LAST (48)
|
||||
#define G_TYPE_RESERVED_USER_FIRST (49)
|
||||
|
||||
|
||||
/* Type Checking Macros
|
||||
*/
|
||||
#define G_TYPE_IS_FUNDAMENTAL(type) ((type) <= G_TYPE_FUNDAMENTAL_MAX)
|
||||
#define G_TYPE_IS_DERIVED(type) ((type) > G_TYPE_FUNDAMENTAL_MAX)
|
||||
#define G_TYPE_IS_INTERFACE(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_INTERFACE)
|
||||
#define G_TYPE_IS_CLASSED(type) (g_type_test_flags ((type), G_TYPE_FLAG_CLASSED))
|
||||
#define G_TYPE_IS_INSTANTIATABLE(type) (g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE))
|
||||
#define G_TYPE_IS_DERIVABLE(type) (g_type_test_flags ((type), G_TYPE_FLAG_DERIVABLE))
|
||||
#define G_TYPE_IS_DEEP_DERIVABLE(type) (g_type_test_flags ((type), G_TYPE_FLAG_DEEP_DERIVABLE))
|
||||
#define G_TYPE_IS_ABSTRACT(type) (g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT))
|
||||
#define G_TYPE_IS_VALUE_ABSTRACT(type) (g_type_test_flags ((type), G_TYPE_FLAG_VALUE_ABSTRACT))
|
||||
#define G_TYPE_IS_VALUE_TYPE(type) (g_type_check_is_value_type (type))
|
||||
#define G_TYPE_HAS_VALUE_TABLE(type) (g_type_value_table_peek (type) != NULL)
|
||||
|
||||
|
||||
/* Typedefs
|
||||
*/
|
||||
#if GLIB_SIZEOF_LONG == GLIB_SIZEOF_SIZE_T
|
||||
typedef gulong GType;
|
||||
#else /* hm, shouldn't happen? */
|
||||
typedef gsize GType;
|
||||
#endif
|
||||
typedef struct _GValue GValue;
|
||||
typedef union _GTypeCValue GTypeCValue;
|
||||
typedef struct _GTypePlugin GTypePlugin;
|
||||
typedef struct _GTypeClass GTypeClass;
|
||||
typedef struct _GTypeInterface GTypeInterface;
|
||||
typedef struct _GTypeInstance GTypeInstance;
|
||||
typedef struct _GTypeInfo GTypeInfo;
|
||||
typedef struct _GTypeFundamentalInfo GTypeFundamentalInfo;
|
||||
typedef struct _GInterfaceInfo GInterfaceInfo;
|
||||
typedef struct _GTypeValueTable GTypeValueTable;
|
||||
typedef struct _GTypeQuery GTypeQuery;
|
||||
|
||||
|
||||
/* Basic Type Structures
|
||||
*/
|
||||
struct _GTypeClass
|
||||
{
|
||||
/*< private >*/
|
||||
GType g_type;
|
||||
};
|
||||
struct _GTypeInstance
|
||||
{
|
||||
/*< private >*/
|
||||
GTypeClass *g_class;
|
||||
};
|
||||
struct _GTypeInterface
|
||||
{
|
||||
/*< private >*/
|
||||
GType g_type; /* iface type */
|
||||
GType g_instance_type;
|
||||
};
|
||||
struct _GTypeQuery
|
||||
{
|
||||
GType type;
|
||||
const gchar *type_name;
|
||||
guint class_size;
|
||||
guint instance_size;
|
||||
};
|
||||
|
||||
|
||||
/* Casts, checks and accessors for structured types
|
||||
* usage of these macros is reserved to type implementations only
|
||||
*/
|
||||
/*< protected >*/
|
||||
#define G_TYPE_CHECK_INSTANCE(instance) (_G_TYPE_CHI ((GTypeInstance*) (instance)))
|
||||
#define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type))
|
||||
#define G_TYPE_CHECK_INSTANCE_TYPE(instance, g_type) (_G_TYPE_CIT ((instance), (g_type)))
|
||||
#define G_TYPE_INSTANCE_GET_CLASS(instance, g_type, c_type) (_G_TYPE_IGC ((instance), (g_type), c_type))
|
||||
#define G_TYPE_INSTANCE_GET_INTERFACE(instance, g_type, c_type) (_G_TYPE_IGI ((instance), (g_type), c_type))
|
||||
#define G_TYPE_CHECK_CLASS_CAST(g_class, g_type, c_type) (_G_TYPE_CCC ((g_class), (g_type), c_type))
|
||||
#define G_TYPE_CHECK_CLASS_TYPE(g_class, g_type) (_G_TYPE_CCT ((g_class), (g_type)))
|
||||
#define G_TYPE_CHECK_VALUE(value) (_G_TYPE_CHV ((value)))
|
||||
#define G_TYPE_CHECK_VALUE_TYPE(value, g_type) (_G_TYPE_CVH ((value), (g_type)))
|
||||
#define G_TYPE_FROM_INSTANCE(instance) (G_TYPE_FROM_CLASS (((GTypeInstance*) (instance))->g_class))
|
||||
#define G_TYPE_FROM_CLASS(g_class) (((GTypeClass*) (g_class))->g_type)
|
||||
#define G_TYPE_FROM_INTERFACE(g_iface) (((GTypeInterface*) (g_iface))->g_type)
|
||||
|
||||
#define G_TYPE_INSTANCE_GET_PRIVATE(instance, g_type, c_type) ((c_type*) g_type_instance_get_private ((GTypeInstance*) (instance), (g_type)))
|
||||
|
||||
|
||||
/* debug flags for g_type_init_with_debug_flags() */
|
||||
typedef enum /*< skip >*/
|
||||
{
|
||||
G_TYPE_DEBUG_NONE = 0,
|
||||
G_TYPE_DEBUG_OBJECTS = 1 << 0,
|
||||
G_TYPE_DEBUG_SIGNALS = 1 << 1,
|
||||
G_TYPE_DEBUG_MASK = 0x03
|
||||
} GTypeDebugFlags;
|
||||
|
||||
|
||||
/* --- prototypes --- */
|
||||
void g_type_init (void);
|
||||
void g_type_init_with_debug_flags (GTypeDebugFlags debug_flags);
|
||||
G_CONST_RETURN gchar* g_type_name (GType type);
|
||||
GQuark g_type_qname (GType type);
|
||||
GType g_type_from_name (const gchar *name);
|
||||
GType g_type_parent (GType type);
|
||||
guint g_type_depth (GType type);
|
||||
GType g_type_next_base (GType leaf_type,
|
||||
GType root_type);
|
||||
gboolean g_type_is_a (GType type,
|
||||
GType is_a_type);
|
||||
gpointer g_type_class_ref (GType type);
|
||||
gpointer g_type_class_peek (GType type);
|
||||
gpointer g_type_class_peek_static (GType type);
|
||||
void g_type_class_unref (gpointer g_class);
|
||||
gpointer g_type_class_peek_parent (gpointer g_class);
|
||||
gpointer g_type_interface_peek (gpointer instance_class,
|
||||
GType iface_type);
|
||||
gpointer g_type_interface_peek_parent (gpointer g_iface);
|
||||
|
||||
gpointer g_type_default_interface_ref (GType g_type);
|
||||
gpointer g_type_default_interface_peek (GType g_type);
|
||||
void g_type_default_interface_unref (gpointer g_iface);
|
||||
|
||||
/* g_free() the returned arrays */
|
||||
GType* g_type_children (GType type,
|
||||
guint *n_children);
|
||||
GType* g_type_interfaces (GType type,
|
||||
guint *n_interfaces);
|
||||
|
||||
/* per-type _static_ data */
|
||||
void g_type_set_qdata (GType type,
|
||||
GQuark quark,
|
||||
gpointer data);
|
||||
gpointer g_type_get_qdata (GType type,
|
||||
GQuark quark);
|
||||
void g_type_query (GType type,
|
||||
GTypeQuery *query);
|
||||
|
||||
|
||||
/* --- type registration --- */
|
||||
typedef void (*GBaseInitFunc) (gpointer g_class);
|
||||
typedef void (*GBaseFinalizeFunc) (gpointer g_class);
|
||||
typedef void (*GClassInitFunc) (gpointer g_class,
|
||||
gpointer class_data);
|
||||
typedef void (*GClassFinalizeFunc) (gpointer g_class,
|
||||
gpointer class_data);
|
||||
typedef void (*GInstanceInitFunc) (GTypeInstance *instance,
|
||||
gpointer g_class);
|
||||
typedef void (*GInterfaceInitFunc) (gpointer g_iface,
|
||||
gpointer iface_data);
|
||||
typedef void (*GInterfaceFinalizeFunc) (gpointer g_iface,
|
||||
gpointer iface_data);
|
||||
typedef gboolean (*GTypeClassCacheFunc) (gpointer cache_data,
|
||||
GTypeClass *g_class);
|
||||
typedef void (*GTypeInterfaceCheckFunc) (gpointer check_data,
|
||||
gpointer g_iface);
|
||||
typedef enum /*< skip >*/
|
||||
{
|
||||
G_TYPE_FLAG_CLASSED = (1 << 0),
|
||||
G_TYPE_FLAG_INSTANTIATABLE = (1 << 1),
|
||||
G_TYPE_FLAG_DERIVABLE = (1 << 2),
|
||||
G_TYPE_FLAG_DEEP_DERIVABLE = (1 << 3)
|
||||
} GTypeFundamentalFlags;
|
||||
typedef enum /*< skip >*/
|
||||
{
|
||||
G_TYPE_FLAG_ABSTRACT = (1 << 4),
|
||||
G_TYPE_FLAG_VALUE_ABSTRACT = (1 << 5)
|
||||
} GTypeFlags;
|
||||
struct _GTypeInfo
|
||||
{
|
||||
/* interface types, classed types, instantiated types */
|
||||
guint16 class_size;
|
||||
|
||||
GBaseInitFunc base_init;
|
||||
GBaseFinalizeFunc base_finalize;
|
||||
|
||||
/* interface types, classed types, instantiated types */
|
||||
GClassInitFunc class_init;
|
||||
GClassFinalizeFunc class_finalize;
|
||||
gconstpointer class_data;
|
||||
|
||||
/* instantiated types */
|
||||
guint16 instance_size;
|
||||
guint16 n_preallocs;
|
||||
GInstanceInitFunc instance_init;
|
||||
|
||||
/* value handling */
|
||||
const GTypeValueTable *value_table;
|
||||
};
|
||||
struct _GTypeFundamentalInfo
|
||||
{
|
||||
GTypeFundamentalFlags type_flags;
|
||||
};
|
||||
struct _GInterfaceInfo
|
||||
{
|
||||
GInterfaceInitFunc interface_init;
|
||||
GInterfaceFinalizeFunc interface_finalize;
|
||||
gpointer interface_data;
|
||||
};
|
||||
struct _GTypeValueTable
|
||||
{
|
||||
void (*value_init) (GValue *value);
|
||||
void (*value_free) (GValue *value);
|
||||
void (*value_copy) (const GValue *src_value,
|
||||
GValue *dest_value);
|
||||
/* varargs functionality (optional) */
|
||||
gpointer (*value_peek_pointer) (const GValue *value);
|
||||
gchar *collect_format;
|
||||
gchar* (*collect_value) (GValue *value,
|
||||
guint n_collect_values,
|
||||
GTypeCValue *collect_values,
|
||||
guint collect_flags);
|
||||
gchar *lcopy_format;
|
||||
gchar* (*lcopy_value) (const GValue *value,
|
||||
guint n_collect_values,
|
||||
GTypeCValue *collect_values,
|
||||
guint collect_flags);
|
||||
};
|
||||
GType g_type_register_static (GType parent_type,
|
||||
const gchar *type_name,
|
||||
const GTypeInfo *info,
|
||||
GTypeFlags flags);
|
||||
GType g_type_register_static_simple (GType parent_type,
|
||||
const gchar *type_name,
|
||||
guint class_size,
|
||||
GClassInitFunc class_init,
|
||||
guint instance_size,
|
||||
GInstanceInitFunc instance_init,
|
||||
GTypeFlags flags);
|
||||
|
||||
GType g_type_register_dynamic (GType parent_type,
|
||||
const gchar *type_name,
|
||||
GTypePlugin *plugin,
|
||||
GTypeFlags flags);
|
||||
GType g_type_register_fundamental (GType type_id,
|
||||
const gchar *type_name,
|
||||
const GTypeInfo *info,
|
||||
const GTypeFundamentalInfo *finfo,
|
||||
GTypeFlags flags);
|
||||
void g_type_add_interface_static (GType instance_type,
|
||||
GType interface_type,
|
||||
const GInterfaceInfo *info);
|
||||
void g_type_add_interface_dynamic (GType instance_type,
|
||||
GType interface_type,
|
||||
GTypePlugin *plugin);
|
||||
void g_type_interface_add_prerequisite (GType interface_type,
|
||||
GType prerequisite_type);
|
||||
GType*g_type_interface_prerequisites (GType interface_type,
|
||||
guint *n_prerequisites);
|
||||
void g_type_class_add_private (gpointer g_class,
|
||||
gsize private_size);
|
||||
gpointer g_type_instance_get_private (GTypeInstance *instance,
|
||||
GType private_type);
|
||||
|
||||
|
||||
/* --- GType boilerplate --- */
|
||||
/* convenience macros for type implementations, which for a type GtkGadget will:
|
||||
* - prototype: static void gtk_gadget_class_init (GtkGadgetClass *klass);
|
||||
* - prototype: static void gtk_gadget_init (GtkGadget *self);
|
||||
* - define: static gpointer gtk_gadget_parent_class = NULL;
|
||||
* gtk_gadget_parent_class is initialized prior to calling gtk_gadget_class_init()
|
||||
* - implement: GType gtk_gadget_get_type (void) { ... }
|
||||
* - support custom code in gtk_gadget_get_type() after the type is registered.
|
||||
*
|
||||
* macro arguments: TypeName, type_name, TYPE_PARENT, CODE
|
||||
* example: G_DEFINE_TYPE_WITH_CODE (GtkGadget, gtk_gadget, GTK_TYPE_WIDGET,
|
||||
* g_print ("GtkGadget-id: %lu\n", g_define_type_id));
|
||||
*/
|
||||
#define G_DEFINE_TYPE(TN, t_n, T_P) G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, 0, {})
|
||||
#define G_DEFINE_TYPE_WITH_CODE(TN, t_n, T_P, _C_) _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, 0) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
|
||||
#define G_DEFINE_ABSTRACT_TYPE(TN, t_n, T_P) G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, G_TYPE_FLAG_ABSTRACT, {})
|
||||
#define G_DEFINE_ABSTRACT_TYPE_WITH_CODE(TN, t_n, T_P, _C_) _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, G_TYPE_FLAG_ABSTRACT) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
|
||||
#define G_DEFINE_TYPE_EXTENDED(TN, t_n, T_P, _f_, _C_) _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, _f_) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
|
||||
|
||||
/* convenience macro to ease interface addition in the CODE
|
||||
* section of G_DEFINE_TYPE_WITH_CODE() (this macro relies on
|
||||
* the g_define_type_id present within G_DEFINE_TYPE_WITH_CODE()).
|
||||
* usage example:
|
||||
* G_DEFINE_TYPE_WITH_CODE (GtkTreeStore, gtk_tree_store, G_TYPE_OBJECT,
|
||||
* G_IMPLEMENT_INTERFACE (GTK_TYPE_TREE_MODEL,
|
||||
* gtk_tree_store_tree_model_init));
|
||||
*/
|
||||
#define G_IMPLEMENT_INTERFACE(TYPE_IFACE, iface_init) { \
|
||||
const GInterfaceInfo g_implement_interface_info = { \
|
||||
(GInterfaceInitFunc) iface_init, NULL, NULL \
|
||||
}; \
|
||||
g_type_add_interface_static (g_define_type_id, TYPE_IFACE, &g_implement_interface_info); \
|
||||
}
|
||||
|
||||
#define _G_DEFINE_TYPE_EXTENDED_BEGIN(TypeName, type_name, TYPE_PARENT, flags) \
|
||||
\
|
||||
static void type_name##_init (TypeName *self); \
|
||||
static void type_name##_class_init (TypeName##Class *klass); \
|
||||
static gpointer type_name##_parent_class = NULL; \
|
||||
static void type_name##_class_intern_init (gpointer klass) \
|
||||
{ \
|
||||
type_name##_parent_class = g_type_class_peek_parent (klass); \
|
||||
type_name##_class_init ((TypeName##Class*) klass); \
|
||||
} \
|
||||
\
|
||||
GType \
|
||||
type_name##_get_type (void) \
|
||||
{ \
|
||||
static GType g_define_type_id = 0; \
|
||||
if (G_UNLIKELY (g_define_type_id == 0)) \
|
||||
{ \
|
||||
g_define_type_id = \
|
||||
g_type_register_static_simple (TYPE_PARENT, \
|
||||
g_intern_static_string (#TypeName), \
|
||||
sizeof (TypeName##Class), \
|
||||
(GClassInitFunc)type_name##_class_intern_init, \
|
||||
sizeof (TypeName), \
|
||||
(GInstanceInitFunc)type_name##_init, \
|
||||
(GTypeFlags) flags); \
|
||||
{ /* custom code follows */
|
||||
#define _G_DEFINE_TYPE_EXTENDED_END() \
|
||||
/* following custom code */ \
|
||||
} \
|
||||
} \
|
||||
return g_define_type_id; \
|
||||
} /* closes type_name##_get_type() */
|
||||
|
||||
|
||||
/* --- protected (for fundamental type implementations) --- */
|
||||
GTypePlugin* g_type_get_plugin (GType type);
|
||||
GTypePlugin* g_type_interface_get_plugin (GType instance_type,
|
||||
GType interface_type);
|
||||
GType g_type_fundamental_next (void);
|
||||
GType g_type_fundamental (GType type_id);
|
||||
GTypeInstance* g_type_create_instance (GType type);
|
||||
void g_type_free_instance (GTypeInstance *instance);
|
||||
|
||||
void g_type_add_class_cache_func (gpointer cache_data,
|
||||
GTypeClassCacheFunc cache_func);
|
||||
void g_type_remove_class_cache_func (gpointer cache_data,
|
||||
GTypeClassCacheFunc cache_func);
|
||||
void g_type_class_unref_uncached (gpointer g_class);
|
||||
|
||||
void g_type_add_interface_check (gpointer check_data,
|
||||
GTypeInterfaceCheckFunc check_func);
|
||||
void g_type_remove_interface_check (gpointer check_data,
|
||||
GTypeInterfaceCheckFunc check_func);
|
||||
|
||||
GTypeValueTable* g_type_value_table_peek (GType type);
|
||||
|
||||
|
||||
/*< private >*/
|
||||
gboolean g_type_check_instance (GTypeInstance *instance);
|
||||
GTypeInstance* g_type_check_instance_cast (GTypeInstance *instance,
|
||||
GType iface_type);
|
||||
gboolean g_type_check_instance_is_a (GTypeInstance *instance,
|
||||
GType iface_type);
|
||||
GTypeClass* g_type_check_class_cast (GTypeClass *g_class,
|
||||
GType is_a_type);
|
||||
gboolean g_type_check_class_is_a (GTypeClass *g_class,
|
||||
GType is_a_type);
|
||||
gboolean g_type_check_is_value_type (GType type);
|
||||
gboolean g_type_check_value (GValue *value);
|
||||
gboolean g_type_check_value_holds (GValue *value,
|
||||
GType type);
|
||||
gboolean g_type_test_flags (GType type,
|
||||
guint flags);
|
||||
|
||||
|
||||
/* --- debugging functions --- */
|
||||
G_CONST_RETURN gchar* g_type_name_from_instance (GTypeInstance *instance);
|
||||
G_CONST_RETURN gchar* g_type_name_from_class (GTypeClass *g_class);
|
||||
|
||||
|
||||
/* --- internal functions --- */
|
||||
void g_value_c_init (void) G_GNUC_INTERNAL; /* sync with gvalue.c */
|
||||
void g_value_types_init (void) G_GNUC_INTERNAL; /* sync with gvaluetypes.c */
|
||||
void g_enum_types_init (void) G_GNUC_INTERNAL; /* sync with genums.c */
|
||||
void g_param_type_init (void) G_GNUC_INTERNAL; /* sync with gparam.c */
|
||||
void g_boxed_type_init (void) G_GNUC_INTERNAL; /* sync with gboxed.c */
|
||||
void g_object_type_init (void) G_GNUC_INTERNAL; /* sync with gobject.c */
|
||||
void g_param_spec_types_init (void) G_GNUC_INTERNAL; /* sync with gparamspecs.c */
|
||||
void g_value_transforms_init (void) G_GNUC_INTERNAL; /* sync with gvaluetransform.c */
|
||||
void g_signal_init (void) G_GNUC_INTERNAL; /* sync with gsignal.c */
|
||||
|
||||
|
||||
/* --- implementation bits --- */
|
||||
#ifndef G_DISABLE_CAST_CHECKS
|
||||
# define _G_TYPE_CIC(ip, gt, ct) \
|
||||
((ct*) g_type_check_instance_cast ((GTypeInstance*) ip, gt))
|
||||
# define _G_TYPE_CCC(cp, gt, ct) \
|
||||
((ct*) g_type_check_class_cast ((GTypeClass*) cp, gt))
|
||||
#else /* G_DISABLE_CAST_CHECKS */
|
||||
# define _G_TYPE_CIC(ip, gt, ct) ((ct*) ip)
|
||||
# define _G_TYPE_CCC(cp, gt, ct) ((ct*) cp)
|
||||
#endif /* G_DISABLE_CAST_CHECKS */
|
||||
#define _G_TYPE_CHI(ip) (g_type_check_instance ((GTypeInstance*) ip))
|
||||
#define _G_TYPE_CHV(vl) (g_type_check_value ((GValue*) vl))
|
||||
#define _G_TYPE_IGC(ip, gt, ct) ((ct*) (((GTypeInstance*) ip)->g_class))
|
||||
#define _G_TYPE_IGI(ip, gt, ct) ((ct*) g_type_interface_peek (((GTypeInstance*) ip)->g_class, gt))
|
||||
#ifdef __GNUC__
|
||||
# define _G_TYPE_CIT(ip, gt) (G_GNUC_EXTENSION ({ \
|
||||
GTypeInstance *__inst = (GTypeInstance*) ip; GType __t = gt; gboolean __r; \
|
||||
if (__inst && __inst->g_class && __inst->g_class->g_type == __t) \
|
||||
__r = TRUE; \
|
||||
else \
|
||||
__r = g_type_check_instance_is_a (__inst, __t); \
|
||||
__r; \
|
||||
}))
|
||||
# define _G_TYPE_CCT(cp, gt) (G_GNUC_EXTENSION ({ \
|
||||
GTypeClass *__class = (GTypeClass*) cp; GType __t = gt; gboolean __r; \
|
||||
if (__class && __class->g_type == __t) \
|
||||
__r = TRUE; \
|
||||
else \
|
||||
__r = g_type_check_class_is_a (__class, __t); \
|
||||
__r; \
|
||||
}))
|
||||
# define _G_TYPE_CVH(vl, gt) (G_GNUC_EXTENSION ({ \
|
||||
GValue *__val = (GValue*) vl; GType __t = gt; gboolean __r; \
|
||||
if (__val && __val->g_type == __t) \
|
||||
__r = TRUE; \
|
||||
else \
|
||||
__r = g_type_check_value_holds (__val, __t); \
|
||||
__r; \
|
||||
}))
|
||||
#else /* !__GNUC__ */
|
||||
# define _G_TYPE_CIT(ip, gt) (g_type_check_instance_is_a ((GTypeInstance*) ip, gt))
|
||||
# define _G_TYPE_CCT(cp, gt) (g_type_check_class_is_a ((GTypeClass*) cp, gt))
|
||||
# define _G_TYPE_CVH(vl, gt) (g_type_check_value_holds ((GValue*) vl, gt))
|
||||
#endif /* !__GNUC__ */
|
||||
#define G_TYPE_FLAG_RESERVED_ID_BIT ((GType) (1 << 0))
|
||||
extern GTypeDebugFlags _g_type_debug_flags;
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_TYPE_H__ */
|
||||
92
libraries/i686-linux/include/glib-2.0/gobject/gtypemodule.h
Normal file
92
libraries/i686-linux/include/glib-2.0/gobject/gtypemodule.h
Normal file
@@ -0,0 +1,92 @@
|
||||
/* GObject - GLib Type, Object, Parameter and Signal Library
|
||||
* Copyright (C) 2000 Red Hat, Inc.
|
||||
*
|
||||
* 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
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
|
||||
#error "Only <glib-object.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_TYPE_MODULE_H__
|
||||
#define __G_TYPE_MODULE_H__
|
||||
|
||||
#include <gobject/gobject.h>
|
||||
#include <gobject/genums.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GTypeModule GTypeModule;
|
||||
typedef struct _GTypeModuleClass GTypeModuleClass;
|
||||
|
||||
#define G_TYPE_TYPE_MODULE (g_type_module_get_type ())
|
||||
#define G_TYPE_MODULE(module) (G_TYPE_CHECK_INSTANCE_CAST ((module), G_TYPE_TYPE_MODULE, GTypeModule))
|
||||
#define G_TYPE_MODULE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_TYPE_MODULE, GTypeModuleClass))
|
||||
#define G_IS_TYPE_MODULE(module) (G_TYPE_CHECK_INSTANCE_TYPE ((module), G_TYPE_TYPE_MODULE))
|
||||
#define G_IS_TYPE_MODULE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_TYPE_MODULE))
|
||||
#define G_TYPE_MODULE_GET_CLASS(module) (G_TYPE_INSTANCE_GET_CLASS ((module), G_TYPE_TYPE_MODULE, GTypeModuleClass))
|
||||
|
||||
struct _GTypeModule
|
||||
{
|
||||
GObject parent_instance;
|
||||
|
||||
guint use_count;
|
||||
GSList *type_infos;
|
||||
GSList *interface_infos;
|
||||
|
||||
/*< public >*/
|
||||
gchar *name;
|
||||
};
|
||||
|
||||
struct _GTypeModuleClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
/*< public >*/
|
||||
gboolean (* load) (GTypeModule *module);
|
||||
void (* unload) (GTypeModule *module);
|
||||
|
||||
/*< private >*/
|
||||
/* Padding for future expansion */
|
||||
void (*reserved1) (void);
|
||||
void (*reserved2) (void);
|
||||
void (*reserved3) (void);
|
||||
void (*reserved4) (void);
|
||||
};
|
||||
|
||||
GType g_type_module_get_type (void) G_GNUC_CONST;
|
||||
gboolean g_type_module_use (GTypeModule *module);
|
||||
void g_type_module_unuse (GTypeModule *module);
|
||||
void g_type_module_set_name (GTypeModule *module,
|
||||
const gchar *name);
|
||||
GType g_type_module_register_type (GTypeModule *module,
|
||||
GType parent_type,
|
||||
const gchar *type_name,
|
||||
const GTypeInfo *type_info,
|
||||
GTypeFlags flags);
|
||||
void g_type_module_add_interface (GTypeModule *module,
|
||||
GType instance_type,
|
||||
GType interface_type,
|
||||
const GInterfaceInfo *interface_info);
|
||||
GType g_type_module_register_enum (GTypeModule *module,
|
||||
const gchar *name,
|
||||
const GEnumValue *const_static_values);
|
||||
GType g_type_module_register_flags (GTypeModule *module,
|
||||
const gchar *name,
|
||||
const GFlagsValue *const_static_values);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_TYPE_MODULE_H__ */
|
||||
79
libraries/i686-linux/include/glib-2.0/gobject/gtypeplugin.h
Normal file
79
libraries/i686-linux/include/glib-2.0/gobject/gtypeplugin.h
Normal file
@@ -0,0 +1,79 @@
|
||||
/* GObject - GLib Type, Object, Parameter and Signal Library
|
||||
* Copyright (C) 2000 Red Hat, Inc.
|
||||
*
|
||||
* 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
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
|
||||
#error "Only <glib-object.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_TYPE_PLUGIN_H__
|
||||
#define __G_TYPE_PLUGIN_H__
|
||||
|
||||
#include <gobject/gtype.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* --- type macros --- */
|
||||
#define G_TYPE_TYPE_PLUGIN (g_type_plugin_get_type ())
|
||||
#define G_TYPE_PLUGIN(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_TYPE_PLUGIN, GTypePlugin))
|
||||
#define G_TYPE_PLUGIN_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), G_TYPE_TYPE_PLUGIN, GTypePluginClass))
|
||||
#define G_IS_TYPE_PLUGIN(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_TYPE_PLUGIN))
|
||||
#define G_IS_TYPE_PLUGIN_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), G_TYPE_TYPE_PLUGIN))
|
||||
#define G_TYPE_PLUGIN_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), G_TYPE_TYPE_PLUGIN, GTypePluginClass))
|
||||
|
||||
|
||||
/* --- typedefs & structures --- */
|
||||
typedef struct _GTypePluginClass GTypePluginClass;
|
||||
typedef void (*GTypePluginUse) (GTypePlugin *plugin);
|
||||
typedef void (*GTypePluginUnuse) (GTypePlugin *plugin);
|
||||
typedef void (*GTypePluginCompleteTypeInfo) (GTypePlugin *plugin,
|
||||
GType g_type,
|
||||
GTypeInfo *info,
|
||||
GTypeValueTable *value_table);
|
||||
typedef void (*GTypePluginCompleteInterfaceInfo) (GTypePlugin *plugin,
|
||||
GType instance_type,
|
||||
GType interface_type,
|
||||
GInterfaceInfo *info);
|
||||
struct _GTypePluginClass
|
||||
{
|
||||
/*< private >*/
|
||||
GTypeInterface base_iface;
|
||||
|
||||
/*< public >*/
|
||||
GTypePluginUse use_plugin;
|
||||
GTypePluginUnuse unuse_plugin;
|
||||
GTypePluginCompleteTypeInfo complete_type_info;
|
||||
GTypePluginCompleteInterfaceInfo complete_interface_info;
|
||||
};
|
||||
|
||||
|
||||
/* --- prototypes --- */
|
||||
GType g_type_plugin_get_type (void) G_GNUC_CONST;
|
||||
void g_type_plugin_use (GTypePlugin *plugin);
|
||||
void g_type_plugin_unuse (GTypePlugin *plugin);
|
||||
void g_type_plugin_complete_type_info (GTypePlugin *plugin,
|
||||
GType g_type,
|
||||
GTypeInfo *info,
|
||||
GTypeValueTable *value_table);
|
||||
void g_type_plugin_complete_interface_info (GTypePlugin *plugin,
|
||||
GType instance_type,
|
||||
GType interface_type,
|
||||
GInterfaceInfo *info);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_TYPE_PLUGIN_H__ */
|
||||
94
libraries/i686-linux/include/glib-2.0/gobject/gvalue.h
Normal file
94
libraries/i686-linux/include/glib-2.0/gobject/gvalue.h
Normal file
@@ -0,0 +1,94 @@
|
||||
/* GObject - GLib Type, Object, Parameter and Signal Library
|
||||
* Copyright (C) 1997-1999, 2000-2001 Tim Janik and Red Hat, Inc.
|
||||
*
|
||||
* 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
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* gvalue.h: generic GValue functions
|
||||
*/
|
||||
#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
|
||||
#error "Only <glib-object.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_VALUE_H__
|
||||
#define __G_VALUE_H__
|
||||
|
||||
#include <gobject/gtype.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* --- type macros --- */
|
||||
#define G_TYPE_IS_VALUE(type) (g_type_check_is_value_type (type))
|
||||
#define G_IS_VALUE(value) (G_TYPE_CHECK_VALUE (value))
|
||||
#define G_VALUE_TYPE(value) (((GValue*) (value))->g_type)
|
||||
#define G_VALUE_TYPE_NAME(value) (g_type_name (G_VALUE_TYPE (value)))
|
||||
#define G_VALUE_HOLDS(value,type) (G_TYPE_CHECK_VALUE_TYPE ((value), (type)))
|
||||
|
||||
|
||||
/* --- typedefs & structures --- */
|
||||
typedef void (*GValueTransform) (const GValue *src_value,
|
||||
GValue *dest_value);
|
||||
struct _GValue
|
||||
{
|
||||
/*< private >*/
|
||||
GType g_type;
|
||||
|
||||
/* public for GTypeValueTable methods */
|
||||
union {
|
||||
gint v_int;
|
||||
guint v_uint;
|
||||
glong v_long;
|
||||
gulong v_ulong;
|
||||
gint64 v_int64;
|
||||
guint64 v_uint64;
|
||||
gfloat v_float;
|
||||
gdouble v_double;
|
||||
gpointer v_pointer;
|
||||
} data[2];
|
||||
};
|
||||
|
||||
|
||||
/* --- prototypes --- */
|
||||
GValue* g_value_init (GValue *value,
|
||||
GType g_type);
|
||||
void g_value_copy (const GValue *src_value,
|
||||
GValue *dest_value);
|
||||
GValue* g_value_reset (GValue *value);
|
||||
void g_value_unset (GValue *value);
|
||||
void g_value_set_instance (GValue *value,
|
||||
gpointer instance);
|
||||
|
||||
|
||||
/* --- private --- */
|
||||
gboolean g_value_fits_pointer (const GValue *value);
|
||||
gpointer g_value_peek_pointer (const GValue *value);
|
||||
|
||||
|
||||
/* --- implementation details --- */
|
||||
gboolean g_value_type_compatible (GType src_type,
|
||||
GType dest_type);
|
||||
gboolean g_value_type_transformable (GType src_type,
|
||||
GType dest_type);
|
||||
gboolean g_value_transform (const GValue *src_value,
|
||||
GValue *dest_value);
|
||||
void g_value_register_transform_func (GType src_type,
|
||||
GType dest_type,
|
||||
GValueTransform transform_func);
|
||||
#define G_VALUE_NOCOPY_CONTENTS (1 << 27)
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_VALUE_H__ */
|
||||
70
libraries/i686-linux/include/glib-2.0/gobject/gvaluearray.h
Normal file
70
libraries/i686-linux/include/glib-2.0/gobject/gvaluearray.h
Normal file
@@ -0,0 +1,70 @@
|
||||
/* GObject - GLib Type, Object, Parameter and Signal Library
|
||||
* Copyright (C) 2001 Red Hat, Inc.
|
||||
*
|
||||
* 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
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* gvaluearray.h: GLib array type holding GValues
|
||||
*/
|
||||
#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
|
||||
#error "Only <glib-object.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_VALUE_ARRAY_H__
|
||||
#define __G_VALUE_ARRAY_H__
|
||||
|
||||
#include <gobject/gvalue.h>
|
||||
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
||||
/* --- typedefs & structs --- */
|
||||
typedef struct _GValueArray GValueArray;
|
||||
struct _GValueArray
|
||||
{
|
||||
guint n_values;
|
||||
GValue *values;
|
||||
|
||||
/*< private >*/
|
||||
guint n_prealloced;
|
||||
};
|
||||
|
||||
|
||||
/* --- prototypes --- */
|
||||
GValue* g_value_array_get_nth (GValueArray *value_array,
|
||||
guint index_);
|
||||
GValueArray* g_value_array_new (guint n_prealloced);
|
||||
void g_value_array_free (GValueArray *value_array);
|
||||
GValueArray* g_value_array_copy (const GValueArray *value_array);
|
||||
GValueArray* g_value_array_prepend (GValueArray *value_array,
|
||||
const GValue *value);
|
||||
GValueArray* g_value_array_append (GValueArray *value_array,
|
||||
const GValue *value);
|
||||
GValueArray* g_value_array_insert (GValueArray *value_array,
|
||||
guint index_,
|
||||
const GValue *value);
|
||||
GValueArray* g_value_array_remove (GValueArray *value_array,
|
||||
guint index_);
|
||||
GValueArray* g_value_array_sort (GValueArray *value_array,
|
||||
GCompareFunc compare_func);
|
||||
GValueArray* g_value_array_sort_with_data (GValueArray *value_array,
|
||||
GCompareDataFunc compare_func,
|
||||
gpointer user_data);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_VALUE_ARRAY_H__ */
|
||||
160
libraries/i686-linux/include/glib-2.0/gobject/gvaluecollector.h
Normal file
160
libraries/i686-linux/include/glib-2.0/gobject/gvaluecollector.h
Normal file
@@ -0,0 +1,160 @@
|
||||
/* GObject - GLib Type, Object, Parameter and Signal Library
|
||||
* Copyright (C) 1998-1999, 2000-2001 Tim Janik and Red Hat, Inc.
|
||||
*
|
||||
* 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
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* gvaluecollector.h: GValue varargs stubs
|
||||
*/
|
||||
#ifndef __G_VALUE_COLLECTOR_H__
|
||||
#define __G_VALUE_COLLECTOR_H__
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* we may want to add aggregate types here some day, if requested
|
||||
* by users. the basic C types are covered already, everything
|
||||
* smaller than an int is promoted to an integer and floats are
|
||||
* always promoted to doubles for varargs call constructions.
|
||||
*/
|
||||
enum /*< skip >*/
|
||||
{
|
||||
G_VALUE_COLLECT_INT = 'i',
|
||||
G_VALUE_COLLECT_LONG = 'l',
|
||||
G_VALUE_COLLECT_INT64 = 'q',
|
||||
G_VALUE_COLLECT_DOUBLE = 'd',
|
||||
G_VALUE_COLLECT_POINTER = 'p'
|
||||
};
|
||||
|
||||
|
||||
/* vararg union holding actuall values collected
|
||||
*/
|
||||
union _GTypeCValue
|
||||
{
|
||||
gint v_int;
|
||||
glong v_long;
|
||||
gint64 v_int64;
|
||||
gdouble v_double;
|
||||
gpointer v_pointer;
|
||||
};
|
||||
|
||||
|
||||
/* G_VALUE_COLLECT() collects a variable argument value
|
||||
* from a va_list. we have to implement the varargs collection as a
|
||||
* macro, because on some systems va_list variables cannot be passed
|
||||
* by reference.
|
||||
* value is supposed to be initialized according to the value
|
||||
* type to be collected.
|
||||
* var_args is the va_list variable and may be evaluated multiple times.
|
||||
* __error is a gchar** variable that will be modified to hold a g_new()
|
||||
* allocated error messages if something fails.
|
||||
*/
|
||||
#define G_VALUE_COLLECT(value, var_args, flags, __error) \
|
||||
G_STMT_START { \
|
||||
GValue *_value = (value); \
|
||||
guint _flags = (flags); \
|
||||
GType _value_type = G_VALUE_TYPE (_value); \
|
||||
GTypeValueTable *_vtable = g_type_value_table_peek (_value_type); \
|
||||
gchar *_collect_format = _vtable->collect_format; \
|
||||
GTypeCValue _cvalues[G_VALUE_COLLECT_FORMAT_MAX_LENGTH] = { { 0, }, }; \
|
||||
guint _n_values = 0; \
|
||||
\
|
||||
if (_vtable->value_free) \
|
||||
_vtable->value_free (_value); \
|
||||
_value->g_type = _value_type; /* value_meminit() from gvalue.c */ \
|
||||
memset (_value->data, 0, sizeof (_value->data)); \
|
||||
while (*_collect_format) \
|
||||
{ \
|
||||
GTypeCValue *_cvalue = _cvalues + _n_values++; \
|
||||
\
|
||||
switch (*_collect_format++) \
|
||||
{ \
|
||||
case G_VALUE_COLLECT_INT: \
|
||||
_cvalue->v_int = va_arg ((var_args), gint); \
|
||||
break; \
|
||||
case G_VALUE_COLLECT_LONG: \
|
||||
_cvalue->v_long = va_arg ((var_args), glong); \
|
||||
break; \
|
||||
case G_VALUE_COLLECT_INT64: \
|
||||
_cvalue->v_int64 = va_arg ((var_args), gint64); \
|
||||
break; \
|
||||
case G_VALUE_COLLECT_DOUBLE: \
|
||||
_cvalue->v_double = va_arg ((var_args), gdouble); \
|
||||
break; \
|
||||
case G_VALUE_COLLECT_POINTER: \
|
||||
_cvalue->v_pointer = va_arg ((var_args), gpointer); \
|
||||
break; \
|
||||
default: \
|
||||
g_assert_not_reached (); \
|
||||
} \
|
||||
} \
|
||||
*(__error) = _vtable->collect_value (_value, \
|
||||
_n_values, \
|
||||
_cvalues, \
|
||||
_flags); \
|
||||
} G_STMT_END
|
||||
|
||||
|
||||
/* G_VALUE_LCOPY() collects a value's variable argument
|
||||
* locations from a va_list. usage is analogous to G_VALUE_COLLECT().
|
||||
*/
|
||||
#define G_VALUE_LCOPY(value, var_args, flags, __error) \
|
||||
G_STMT_START { \
|
||||
const GValue *_value = (value); \
|
||||
guint _flags = (flags); \
|
||||
GType _value_type = G_VALUE_TYPE (_value); \
|
||||
GTypeValueTable *_vtable = g_type_value_table_peek (_value_type); \
|
||||
gchar *_lcopy_format = _vtable->lcopy_format; \
|
||||
GTypeCValue _cvalues[G_VALUE_COLLECT_FORMAT_MAX_LENGTH] = { { 0, }, }; \
|
||||
guint _n_values = 0; \
|
||||
\
|
||||
while (*_lcopy_format) \
|
||||
{ \
|
||||
GTypeCValue *_cvalue = _cvalues + _n_values++; \
|
||||
\
|
||||
switch (*_lcopy_format++) \
|
||||
{ \
|
||||
case G_VALUE_COLLECT_INT: \
|
||||
_cvalue->v_int = va_arg ((var_args), gint); \
|
||||
break; \
|
||||
case G_VALUE_COLLECT_LONG: \
|
||||
_cvalue->v_long = va_arg ((var_args), glong); \
|
||||
break; \
|
||||
case G_VALUE_COLLECT_INT64: \
|
||||
_cvalue->v_int64 = va_arg ((var_args), gint64); \
|
||||
break; \
|
||||
case G_VALUE_COLLECT_DOUBLE: \
|
||||
_cvalue->v_double = va_arg ((var_args), gdouble); \
|
||||
break; \
|
||||
case G_VALUE_COLLECT_POINTER: \
|
||||
_cvalue->v_pointer = va_arg ((var_args), gpointer); \
|
||||
break; \
|
||||
default: \
|
||||
g_assert_not_reached (); \
|
||||
} \
|
||||
} \
|
||||
*(__error) = _vtable->lcopy_value (_value, \
|
||||
_n_values, \
|
||||
_cvalues, \
|
||||
_flags); \
|
||||
} G_STMT_END
|
||||
|
||||
|
||||
#define G_VALUE_COLLECT_FORMAT_MAX_LENGTH (8)
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_VALUE_COLLECTOR_H__ */
|
||||
120
libraries/i686-linux/include/glib-2.0/gobject/gvaluetypes.h
Normal file
120
libraries/i686-linux/include/glib-2.0/gobject/gvaluetypes.h
Normal file
@@ -0,0 +1,120 @@
|
||||
/* GObject - GLib Type, Object, Parameter and Signal Library
|
||||
* Copyright (C) 1997-1999, 2000-2001 Tim Janik and Red Hat, Inc.
|
||||
*
|
||||
* 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
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* gvaluetypes.h: GLib default values
|
||||
*/
|
||||
#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
|
||||
#error "Only <glib-object.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_VALUETYPES_H__
|
||||
#define __G_VALUETYPES_H__
|
||||
|
||||
#include <gobject/gvalue.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* --- type macros --- */
|
||||
#define G_VALUE_HOLDS_CHAR(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_CHAR))
|
||||
#define G_VALUE_HOLDS_UCHAR(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_UCHAR))
|
||||
#define G_VALUE_HOLDS_BOOLEAN(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_BOOLEAN))
|
||||
#define G_VALUE_HOLDS_INT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_INT))
|
||||
#define G_VALUE_HOLDS_UINT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_UINT))
|
||||
#define G_VALUE_HOLDS_LONG(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_LONG))
|
||||
#define G_VALUE_HOLDS_ULONG(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_ULONG))
|
||||
#define G_VALUE_HOLDS_INT64(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_INT64))
|
||||
#define G_VALUE_HOLDS_UINT64(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_UINT64))
|
||||
#define G_VALUE_HOLDS_FLOAT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_FLOAT))
|
||||
#define G_VALUE_HOLDS_DOUBLE(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_DOUBLE))
|
||||
#define G_VALUE_HOLDS_STRING(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_STRING))
|
||||
#define G_VALUE_HOLDS_POINTER(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_POINTER))
|
||||
#define G_TYPE_GTYPE (g_gtype_get_type())
|
||||
#define G_VALUE_HOLDS_GTYPE(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_GTYPE))
|
||||
|
||||
|
||||
/* --- prototypes --- */
|
||||
void g_value_set_char (GValue *value,
|
||||
gchar v_char);
|
||||
gchar g_value_get_char (const GValue *value);
|
||||
void g_value_set_uchar (GValue *value,
|
||||
guchar v_uchar);
|
||||
guchar g_value_get_uchar (const GValue *value);
|
||||
void g_value_set_boolean (GValue *value,
|
||||
gboolean v_boolean);
|
||||
gboolean g_value_get_boolean (const GValue *value);
|
||||
void g_value_set_int (GValue *value,
|
||||
gint v_int);
|
||||
gint g_value_get_int (const GValue *value);
|
||||
void g_value_set_uint (GValue *value,
|
||||
guint v_uint);
|
||||
guint g_value_get_uint (const GValue *value);
|
||||
void g_value_set_long (GValue *value,
|
||||
glong v_long);
|
||||
glong g_value_get_long (const GValue *value);
|
||||
void g_value_set_ulong (GValue *value,
|
||||
gulong v_ulong);
|
||||
gulong g_value_get_ulong (const GValue *value);
|
||||
void g_value_set_int64 (GValue *value,
|
||||
gint64 v_int64);
|
||||
gint64 g_value_get_int64 (const GValue *value);
|
||||
void g_value_set_uint64 (GValue *value,
|
||||
guint64 v_uint64);
|
||||
guint64 g_value_get_uint64 (const GValue *value);
|
||||
void g_value_set_float (GValue *value,
|
||||
gfloat v_float);
|
||||
gfloat g_value_get_float (const GValue *value);
|
||||
void g_value_set_double (GValue *value,
|
||||
gdouble v_double);
|
||||
gdouble g_value_get_double (const GValue *value);
|
||||
void g_value_set_string (GValue *value,
|
||||
const gchar *v_string);
|
||||
void g_value_set_static_string (GValue *value,
|
||||
const gchar *v_string);
|
||||
G_CONST_RETURN gchar* g_value_get_string (const GValue *value);
|
||||
gchar* g_value_dup_string (const GValue *value);
|
||||
void g_value_set_pointer (GValue *value,
|
||||
gpointer v_pointer);
|
||||
gpointer g_value_get_pointer (const GValue *value);
|
||||
GType g_gtype_get_type (void);
|
||||
void g_value_set_gtype (GValue *value,
|
||||
GType v_gtype);
|
||||
GType g_value_get_gtype (const GValue *value);
|
||||
|
||||
|
||||
/* Convenience for registering new pointer types */
|
||||
GType g_pointer_type_register_static (const gchar *name);
|
||||
|
||||
/* debugging aid, describe value contents as string */
|
||||
gchar* g_strdup_value_contents (const GValue *value);
|
||||
|
||||
|
||||
void g_value_take_string (GValue *value,
|
||||
gchar *v_string);
|
||||
#ifndef G_DISABLE_DEPRECATED
|
||||
void g_value_set_string_take_ownership (GValue *value,
|
||||
gchar *v_string);
|
||||
#endif
|
||||
|
||||
|
||||
/* humpf, need a C representable type name for G_TYPE_STRING */
|
||||
typedef gchar* gchararray;
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_VALUETYPES_H__ */
|
||||
Reference in New Issue
Block a user