~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to fpcsrc/packages/extra/gtk2/glib/gtype.inc

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// included by glib2.pas
 
2
 
 
3
{$IFDEF read_forward_definitions}
 
4
{ Typedefs }
 
5
   PGType = ^GType;
 
6
   GType = gulong;
 
7
 
 
8
{ Basic Type Structures }
 
9
{< private > }
 
10
   PGTypeClass = ^TGTypeClass;
 
11
   TGTypeClass = record
 
12
        g_type : GType;
 
13
     end;
 
14
 
 
15
{< private > }
 
16
   PGTypeInstance = ^TGTypeInstance;
 
17
   TGTypeInstance = record
 
18
        g_class : PGTypeClass;
 
19
     end;
 
20
 
 
21
{< private > }
 
22
{ iface type  }
 
23
   PGTypeInterface = ^TGTypeInterface;
 
24
   TGTypeInterface = record
 
25
        g_type : GType;
 
26
        g_instance_type : GType;
 
27
     end;
 
28
 
 
29
   PGTypeQuery = ^TGTypeQuery;
 
30
   TGTypeQuery = record
 
31
        _type : GType;
 
32
        type_name : Pgchar;
 
33
        class_size : guint;
 
34
        instance_size : guint;
 
35
     end;
 
36
{$ENDIF read_forward_definitions}
 
37
 
 
38
//------------------------------------------------------------------------------
 
39
 
 
40
{$IFDEF read_interface_rest}
 
41
 
 
42
{ Basic Type Macros }
 
43
 
 
44
const
 
45
   G_TYPE_FUNDAMENTAL_SHIFT = 2;
 
46
   G_TYPE_FUNDAMENTAL_MAX = 255 shl G_TYPE_FUNDAMENTAL_SHIFT;
 
47
 
 
48
{ Constant fundamental types,
 
49
   introduced by g_type_init(). }
 
50
   G_TYPE_INVALID = GType(0 shl G_TYPE_FUNDAMENTAL_SHIFT);
 
51
   G_TYPE_NONE = GType(1 shl G_TYPE_FUNDAMENTAL_SHIFT);
 
52
   G_TYPE_INTERFACE = GType(2 shl G_TYPE_FUNDAMENTAL_SHIFT);
 
53
   G_TYPE_CHAR = GType(3 shl G_TYPE_FUNDAMENTAL_SHIFT);
 
54
   G_TYPE_UCHAR = GType(4 shl G_TYPE_FUNDAMENTAL_SHIFT);
 
55
   G_TYPE_BOOLEAN = GType(5 shl G_TYPE_FUNDAMENTAL_SHIFT);
 
56
   G_TYPE_INT = GType(6 shl G_TYPE_FUNDAMENTAL_SHIFT);
 
57
   G_TYPE_UINT = GType(7 shl G_TYPE_FUNDAMENTAL_SHIFT);
 
58
   G_TYPE_LONG = GType(8 shl G_TYPE_FUNDAMENTAL_SHIFT);
 
59
   G_TYPE_ULONG = GType(9 shl G_TYPE_FUNDAMENTAL_SHIFT);
 
60
   G_TYPE_INT64 = GType(10 shl G_TYPE_FUNDAMENTAL_SHIFT);
 
61
   G_TYPE_UINT64 = GType(11 shl G_TYPE_FUNDAMENTAL_SHIFT);
 
62
   G_TYPE_ENUM = GType(12 shl G_TYPE_FUNDAMENTAL_SHIFT);
 
63
   G_TYPE_FLAGS = GType(13 shl G_TYPE_FUNDAMENTAL_SHIFT);
 
64
   G_TYPE_FLOAT = GType(14 shl G_TYPE_FUNDAMENTAL_SHIFT);
 
65
   G_TYPE_DOUBLE = GType(15 shl G_TYPE_FUNDAMENTAL_SHIFT);
 
66
   G_TYPE_STRING = GType(16 shl G_TYPE_FUNDAMENTAL_SHIFT);
 
67
   G_TYPE_POINTER = GType(17 shl G_TYPE_FUNDAMENTAL_SHIFT);
 
68
   G_TYPE_BOXED = GType(18 shl G_TYPE_FUNDAMENTAL_SHIFT);
 
69
   G_TYPE_PARAM = GType(19 shl G_TYPE_FUNDAMENTAL_SHIFT);
 
70
   G_TYPE_OBJECT = GType(20 shl G_TYPE_FUNDAMENTAL_SHIFT);
 
71
 
 
72
{ Reserved fundamental type numbers to create new fundamental
 
73
   type IDs with G_TYPE_MAKE_FUNDAMENTAL().
 
74
   Send email to gtk-devel-list@redhat.com for reservations.
 
75
  }
 
76
 
 
77
function G_TYPE_MAKE_FUNDAMENTAL(x : longint) : GType;
 
78
 
 
79
 
 
80
const
 
81
   G_TYPE_RESERVED_GLIB_FIRST = 21;
 
82
   G_TYPE_RESERVED_GLIB_LAST = 31;
 
83
   G_TYPE_RESERVED_BSE_FIRST = 32;
 
84
   G_TYPE_RESERVED_BSE_LAST = 48;
 
85
   G_TYPE_RESERVED_USER_FIRST = 49;
 
86
 
 
87
 
 
88
{ Type Checking Macros }
 
89
 
 
90
function G_TYPE_IS_FUNDAMENTAL(_type : GType) : boolean;
 
91
function G_TYPE_IS_DERIVED(_type : GType) : boolean;
 
92
function G_TYPE_IS_INTERFACE(_type : GType) : boolean;
 
93
function G_TYPE_IS_CLASSED(_type : GType) : gboolean;
 
94
function G_TYPE_IS_INSTANTIATABLE(_type : GType) : boolean;
 
95
function G_TYPE_IS_DERIVABLE(_type : GType) : boolean;
 
96
function G_TYPE_IS_DEEP_DERIVABLE(_type : GType) : boolean;
 
97
function G_TYPE_IS_ABSTRACT(_type : GType) : boolean;
 
98
function G_TYPE_IS_VALUE_ABSTRACT(_type : GType) : boolean;
 
99
function G_TYPE_IS_VALUE_TYPE(_type : GType) : boolean;
 
100
function G_TYPE_HAS_VALUE_TABLE(_type : GType) : boolean;
 
101
 
 
102
{ Casts, checks and accessors for structured types
 
103
   usage of these macros is reserved to type implementations only }
 
104
{< protected > }
 
105
function G_TYPE_CHECK_INSTANCE(instance : Pointer) : gboolean;
 
106
function G_TYPE_CHECK_INSTANCE_CAST(instance: Pointer; g_type: GType) : PGTypeInstance;
 
107
function G_TYPE_CHECK_INSTANCE_TYPE(instance: Pointer; g_type: GType) : boolean;
 
108
function G_TYPE_INSTANCE_GET_CLASS(instance: Pointer; g_type: GType) : PGTypeClass;
 
109
function G_TYPE_INSTANCE_GET_INTERFACE(instance: Pointer; g_type: GType) : Pointer;
 
110
function G_TYPE_CHECK_CLASS_CAST(g_class: pointer; g_type: GType) : Pointer;
 
111
function G_TYPE_CHECK_CLASS_TYPE(g_class: pointer; g_type : GType) : boolean;
 
112
function G_TYPE_CHECK_VALUE(value : Pointer) : boolean;
 
113
function G_TYPE_CHECK_VALUE_TYPE(value: pointer; g_type : GType) : boolean;
 
114
function G_TYPE_FROM_INSTANCE(instance : Pointer) : GType;
 
115
function G_TYPE_FROM_CLASS(g_class : Pointer) : GType;
 
116
function G_TYPE_FROM_INTERFACE(g_iface : Pointer) : GType;
 
117
 
 
118
{ debug flags for g_type_init_with_debug_flags()  }
 
119
{< skip > }
 
120
type
 
121
   PGTypeDebugFlags = ^TGTypeDebugFlags;
 
122
   TGTypeDebugFlags = longint;
 
123
 
 
124
const
 
125
   G_TYPE_DEBUG_NONE = 0;
 
126
   G_TYPE_DEBUG_OBJECTS = 1 shl 0;
 
127
   G_TYPE_DEBUG_SIGNALS = 1 shl 1;
 
128
   G_TYPE_DEBUG_MASK = $03;
 
129
 
 
130
 
 
131
{ --- prototypes ---  }
 
132
 
 
133
procedure g_type_init; cdecl; external gobjectlib;
 
134
procedure g_type_init_with_debug_flags(debug_flags:TGTypeDebugFlags); cdecl; external gobjectlib;
 
135
function g_type_name(_type:GType):Pgchar; cdecl; external gobjectlib;
 
136
function g_type_qname(_type:GType):TGQuark; cdecl; external gobjectlib;
 
137
function g_type_from_name(name:Pgchar):GType; cdecl; external gobjectlib;
 
138
function g_type_parent(_type:GType):GType; cdecl; external gobjectlib;
 
139
function g_type_depth(_type:GType):guint; cdecl; external gobjectlib;
 
140
function g_type_next_base(leaf_type:GType; root_type:GType):GType; cdecl; external gobjectlib;
 
141
function g_type_is_a(_type:GType; is_a_type:GType):gboolean; cdecl; external gobjectlib;
 
142
function g_type_class_ref(_type:GType):gpointer; cdecl; external gobjectlib;
 
143
function g_type_class_peek(_type:GType):gpointer; cdecl; external gobjectlib;
 
144
procedure g_type_class_unref(g_class:gpointer); cdecl; external gobjectlib;
 
145
function g_type_class_peek_parent(g_class:gpointer):gpointer; cdecl; external gobjectlib;
 
146
function g_type_interface_peek(instance_class:gpointer; iface_type:GType):gpointer; cdecl; external gobjectlib;
 
147
function g_type_interface_peek_parent(g_iface:gpointer):gpointer; cdecl; external gobjectlib;
 
148
{ g_free() the returned arrays  }
 
149
function g_type_children(_type:GType; n_children:Pguint):PGType; cdecl; external gobjectlib;
 
150
function g_type_interfaces(_type:GType; n_interfaces:Pguint):PGType; cdecl; external gobjectlib;
 
151
{ per-type _static_ data  }
 
152
procedure g_type_set_qdata(_type:GType; quark:TGQuark; data:gpointer); cdecl; external gobjectlib;
 
153
function g_type_get_qdata(_type:GType; quark:TGQuark):gpointer; cdecl; external gobjectlib;
 
154
procedure g_type_query(_type:GType; query:PGTypeQuery); cdecl; external gobjectlib;
 
155
 
 
156
 
 
157
{ --- type registration ---  }
 
158
type
 
159
   TGBaseInitFunc = procedure (g_class:gpointer); cdecl;
 
160
 
 
161
   TGBaseFinalizeFunc = procedure (g_class:gpointer); cdecl;
 
162
 
 
163
   TGClassInitFunc = procedure (g_class:gpointer; class_data:gpointer); cdecl;
 
164
 
 
165
   TGClassFinalizeFunc = procedure (g_class:gpointer; class_data:gpointer); cdecl;
 
166
 
 
167
   TGInstanceInitFunc = procedure (instance:PGTypeInstance; g_class:gpointer); cdecl;
 
168
 
 
169
   TGInterfaceInitFunc = procedure (g_iface:gpointer; iface_data:gpointer); cdecl;
 
170
 
 
171
   TGInterfaceFinalizeFunc = procedure (g_iface:gpointer; iface_data:gpointer); cdecl;
 
172
 
 
173
   TGTypeClassCacheFunc = function (cache_data:gpointer; g_class:PGTypeClass):gboolean; cdecl;
 
174
 
 
175
{< skip > }
 
176
 
 
177
   PGTypeFundamentalFlags = ^TGTypeFundamentalFlags;
 
178
   TGTypeFundamentalFlags = longint;
 
179
 
 
180
const
 
181
   G_TYPE_FLAG_CLASSED        = 1 shl 0;
 
182
   G_TYPE_FLAG_INSTANTIATABLE = 1 shl 1;
 
183
   G_TYPE_FLAG_DERIVABLE      = 1 shl 2;
 
184
   G_TYPE_FLAG_DEEP_DERIVABLE = 1 shl 3;
 
185
 
 
186
 
 
187
{< skip > }
 
188
type
 
189
   PGTypeFlags = ^TGTypeFlags;
 
190
   TGTypeFlags = longint;
 
191
 
 
192
const
 
193
   G_TYPE_FLAG_ABSTRACT = 1 shl 4;
 
194
   G_TYPE_FLAG_VALUE_ABSTRACT = 1 shl 5;
 
195
 
 
196
type
 
197
{ interface types, classed types, instantiated types  }
 
198
 
 
199
{ varargs functionality (optional)  }
 
200
   PGTypeValueTable = ^TGTypeValueTable;
 
201
   TGTypeValueTable = record
 
202
        value_init : procedure (value:PGValue); cdecl;
 
203
        value_free : procedure (value:PGValue); cdecl;
 
204
        value_copy : procedure (src_value:PGValue; dest_value:PGValue); cdecl;
 
205
        value_peek_pointer : function (value:PGValue):gpointer; cdecl;
 
206
        collect_format : Pgchar;
 
207
        collect_value : function (value:PGValue; n_collect_values:guint; collect_values:PGTypeCValue; collect_flags:guint):Pgchar; cdecl;
 
208
        lcopy_format : Pgchar;
 
209
        lcopy_value : function (value:PGValue; n_collect_values:guint; collect_values:PGTypeCValue; collect_flags:guint):Pgchar; cdecl;
 
210
     end;
 
211
 
 
212
 
 
213
{ classed types, instantiated types  }
 
214
{ instantiated types  }
 
215
{ value handling  }
 
216
   PGTypeInfo = ^TGTypeInfo;
 
217
   TGTypeInfo = record
 
218
        class_size : guint16;
 
219
        base_init : TGBaseInitFunc;
 
220
        base_finalize : TGBaseFinalizeFunc;
 
221
        class_init : TGClassInitFunc;
 
222
        class_finalize : TGClassFinalizeFunc;
 
223
        class_data : gconstpointer;
 
224
        instance_size : guint16;
 
225
        n_preallocs : guint16;
 
226
        instance_init : TGInstanceInitFunc;
 
227
        value_table : PGTypeValueTable;
 
228
     end;
 
229
 
 
230
   PGTypeFundamentalInfo = ^TGTypeFundamentalInfo;
 
231
   TGTypeFundamentalInfo = record
 
232
        type_flags : TGTypeFundamentalFlags;
 
233
     end;
 
234
 
 
235
   PGInterfaceInfo = ^TGInterfaceInfo;
 
236
   TGInterfaceInfo = record
 
237
        interface_init : TGInterfaceInitFunc;
 
238
        interface_finalize : TGInterfaceFinalizeFunc;
 
239
        interface_data : gpointer;
 
240
     end;
 
241
 
 
242
 
 
243
function g_type_register_static(parent_type:GType; type_name:Pgchar; info:PGTypeInfo; flags:TGTypeFlags):GType; cdecl; external gobjectlib;
 
244
function g_type_register_dynamic(parent_type:GType; type_name:Pgchar; plugin:PGTypePlugin; flags:TGTypeFlags):GType; cdecl; external gobjectlib;
 
245
function g_type_register_fundamental(type_id:GType; type_name:Pgchar; info:PGTypeInfo; finfo:PGTypeFundamentalInfo; flags:TGTypeFlags):GType; cdecl; external gobjectlib;
 
246
procedure g_type_add_interface_static(instance_type:GType; interface_type:GType; info:PGInterfaceInfo); cdecl; external gobjectlib;
 
247
procedure g_type_add_interface_dynamic(instance_type:GType; interface_type:GType; plugin:PGTypePlugin); cdecl; external gobjectlib;
 
248
procedure g_type_interface_add_prerequisite(interface_type:GType; prerequisite_type:GType); cdecl; external gobjectlib;
 
249
{ --- protected (for fundamental type implementations) ---  }
 
250
function g_type_get_plugin(_type:GType):PGTypePlugin; cdecl; external gobjectlib;
 
251
function g_type_interface_get_plugin(instance_type:GType; implementation_type:GType):PGTypePlugin; cdecl; external gobjectlib;
 
252
function g_type_fundamental_next:GType; cdecl; external gobjectlib;
 
253
function g_type_fundamental(type_id:GType):GType; cdecl; external gobjectlib;
 
254
function g_type_create_instance(_type:GType):PGTypeInstance; cdecl; external gobjectlib;
 
255
procedure g_type_free_instance(instance:PGTypeInstance); cdecl; external gobjectlib;
 
256
procedure g_type_add_class_cache_func(cache_data:gpointer; cache_func:TGTypeClassCacheFunc); cdecl; external gobjectlib;
 
257
procedure g_type_remove_class_cache_func(cache_data:gpointer; cache_func:TGTypeClassCacheFunc); cdecl; external gobjectlib;
 
258
procedure g_type_class_unref_uncached(g_class:gpointer); cdecl; external gobjectlib;
 
259
function g_type_value_table_peek(_type:GType):PGTypeValueTable; cdecl; external gobjectlib;
 
260
{< private > }
 
261
function private_g_type_check_instance(instance:PGTypeInstance):gboolean; cdecl; external gobjectlib name 'g_type_check_instance';
 
262
function private_g_type_check_instance_cast(instance:PGTypeInstance; iface_type:GType):PGTypeInstance; cdecl; external gobjectlib name 'g_type_check_instance_cast';
 
263
function private_g_type_check_instance_is_a(instance:PGTypeInstance; iface_type:GType):gboolean; cdecl; external gobjectlib name 'g_type_check_instance_is_a';
 
264
function private_g_type_check_class_cast(g_class:PGTypeClass; is_a_type:GType):PGTypeClass; cdecl; external gobjectlib name 'g_type_check_class_cast';
 
265
function private_g_type_check_class_is_a(g_class:PGTypeClass; is_a_type:GType):gboolean; cdecl; external gobjectlib name 'g_type_check_class_is_a';
 
266
function private_g_type_check_is_value_type(_type:GType):gboolean; cdecl; external gobjectlib name 'g_type_check_is_value_type';
 
267
function private_g_type_check_value(value:PGValue):gboolean; cdecl; external gobjectlib name 'g_type_check_value';
 
268
function private_g_type_check_value_holds(value:PGValue; _type:GType):gboolean; cdecl; external gobjectlib name 'g_type_check_value_holds';
 
269
function private_g_type_test_flags(_type:GType; flags:guint):gboolean; cdecl; external gobjectlib name 'g_type_test_flags';
 
270
{ --- debugging functions ---  }
 
271
function g_type_name_from_instance(instance:PGTypeInstance):Pgchar; cdecl; external gobjectlib;
 
272
function g_type_name_from_class(g_class:PGTypeClass):Pgchar; cdecl; external gobjectlib;
 
273
{ --- implementation bits ---  }
 
274
 
 
275
const
 
276
  G_TYPE_FLAG_RESERVED_ID_BIT = GType(1 shl 0);
 
277
 
 
278
{$ENDIF read_interface_rest}
 
279
 
 
280
// included by glib2.pas
 
281