[kdbus] sync with kdbus (kdbus.h - commit: 5ae1ecac44cb)
[platform/upstream/glib.git] / gobject / gtype-private.h
1 /* GObject - GLib Type, Object, Parameter and Signal Library
2  * Copyright (C) 1998-1999, 2000-2001 Tim Janik and Red Hat, Inc.
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General
15  * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
16  */
17 #ifndef __G_TYPE_PRIVATE_H__
18 #define __G_TYPE_PRIVATE_H__
19
20 #if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
21 #error "Only <glib-object.h> can be included directly."
22 #endif
23
24 #include "gboxed.h"
25 #include "gclosure.h"
26
27 G_BEGIN_DECLS
28
29 extern GTypeDebugFlags _g_type_debug_flags;
30
31 typedef struct _GRealClosure  GRealClosure;
32 struct _GRealClosure
33 {
34   GClosureMarshal meta_marshal;
35   gpointer meta_marshal_data;
36   GVaClosureMarshal va_meta_marshal;
37   GVaClosureMarshal va_marshal;
38   GClosure closure;
39 };
40
41 #define G_REAL_CLOSURE(_c) \
42   ((GRealClosure *)G_STRUCT_MEMBER_P ((_c), -G_STRUCT_OFFSET (GRealClosure, closure)))
43
44 void    _g_value_c_init          (void); /* sync with gvalue.c */
45 void    _g_value_types_init      (void); /* sync with gvaluetypes.c */
46 void    _g_enum_types_init       (void); /* sync with genums.c */
47 void    _g_param_type_init       (void); /* sync with gparam.c */
48 void    _g_boxed_type_init       (void); /* sync with gboxed.c */
49 void    _g_object_type_init      (void); /* sync with gobject.c */
50 void    _g_param_spec_types_init (void); /* sync with gparamspecs.c */
51 void    _g_value_transforms_init (void); /* sync with gvaluetransform.c */
52 void    _g_signal_init           (void); /* sync with gsignal.c */
53
54 /* for gboxed.c */
55 gpointer        _g_type_boxed_copy      (GType          type,
56                                          gpointer       value);
57 void            _g_type_boxed_free      (GType          type,
58                                          gpointer       value);
59 void            _g_type_boxed_init      (GType          type,
60                                          GBoxedCopyFunc copy_func,
61                                          GBoxedFreeFunc free_func);
62
63 gboolean    _g_closure_is_void (GClosure       *closure,
64                                 gpointer        instance);
65 gboolean    _g_closure_supports_invoke_va (GClosure       *closure);
66 void        _g_closure_set_va_marshal (GClosure       *closure,
67                                        GVaClosureMarshal marshal);
68 void        _g_closure_invoke_va (GClosure       *closure,
69                                   GValue /*out*/ *return_value,
70                                   gpointer        instance,
71                                   va_list         args,
72                                   int             n_params,
73                                   GType          *param_types);
74
75
76 G_END_DECLS
77
78 #endif /* __G_TYPE_PRIVATE_H__ */