summaryrefslogtreecommitdiff
path: root/fpcsrc/packages/gnome1/src/libgnome/gnomeconfig.inc
blob: 78e51cf3d7bf6b4f95cfa228c720525a13fe4da6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
{$IfDef read_interface}
function _gnome_config_get_string_with_default(path:Pchar; def:Pgboolean; priv:gint):pchar;cdecl;external libgnomedll name '_gnome_config_get_string_with_default';
function _gnome_config_get_translated_string_with_default(path:Pchar; def:Pgboolean; priv:gint):pchar;cdecl;external libgnomedll name '_gnome_config_get_translated_string_with_default';
function _gnome_config_get_int_with_default(path:Pchar; def:Pgboolean; priv:gint):gint;cdecl;external libgnomedll name '_gnome_config_get_int_with_default';
function _gnome_config_get_float_with_default(path:Pchar; def:Pgboolean; priv:gint):gdouble;cdecl;external libgnomedll name '_gnome_config_get_float_with_default';
function _gnome_config_get_bool_with_default(path:Pchar; def:Pgboolean; priv:gint):gboolean;cdecl;external libgnomedll name '_gnome_config_get_bool_with_default';
Procedure _gnome_config_get_vector_with_default(path:Pchar; argcp:Pgint; argvp:PPPchar; def:Pgboolean; priv:gint);cdecl;external libgnomedll name '_gnome_config_get_vector_with_default';

function gnome_config_get_string_with_default(path:Pchar; def:Pgboolean):pchar;
function gnome_config_get_translated_string_with_default(path:Pchar; def:Pgboolean):pchar;
function gnome_config_get_int_with_default(path:Pchar; def:Pgboolean):gint;
function gnome_config_get_float_with_default(path:Pchar; def:Pgboolean):gdouble;
function gnome_config_get_bool_with_default(path:Pchar; def:Pgboolean):gboolean;
Procedure gnome_config_get_vector_with_default(path:Pchar; argcp:Pgint; argvp:PPPchar; def:Pgboolean);

function gnome_config_private_get_string_with_default(path:Pchar; def:Pgboolean):pchar;
function gnome_config_private_get_translated_string_with_default(path:Pchar; def:Pgboolean):pchar;
function gnome_config_private_get_int_with_default(path:Pchar; def:Pgboolean):gint;
function gnome_config_private_get_float_with_default(path:Pchar; def:Pgboolean):gdouble;
function gnome_config_private_get_bool_with_default(path:Pchar; def:Pgboolean):gboolean;
procedure gnome_config_private_get_vector_with_default(path:Pchar; argcp:Pgint; argvp:PPPchar; def:Pgboolean);

function gnome_config_get_string(path:Pchar):pchar;
function gnome_config_get_translated_string(path:Pchar):pchar;
function gnome_config_get_int(path:Pchar):gint;
function gnome_config_get_float(path:Pchar):gdouble;
function gnome_config_get_bool(path:Pchar):gboolean;
procedure gnome_config_get_vector(path:Pchar; argcp:Pgint; argvp:PPPchar);

function gnome_config_private_get_string(path:Pchar):pchar;
function gnome_config_private_get_translated_string(path:Pchar):pchar;
function gnome_config_private_get_int(path:Pchar):gint;
function gnome_config_private_get_float(path:Pchar):gdouble;
function gnome_config_private_get_bool(path:Pchar):gboolean;
procedure gnome_config_private_get_vector(path:Pchar; argcp:Pgint; argvp:PPPchar);

procedure _gnome_config_set_string(path:Pchar; value:Pchar; priv:gint);cdecl;external libgnomedll name '_gnome_config_set_string';
procedure _gnome_config_set_translated_string(path:Pchar; value:Pchar; priv:gint);cdecl;external libgnomedll name '_gnome_config_set_translated_string';
procedure _gnome_config_set_int(path:Pchar; value:longint; priv:gint);cdecl;external libgnomedll name '_gnome_config_set_int';
procedure _gnome_config_set_float(path:Pchar; value:gdouble; priv:gint);cdecl;external libgnomedll name '_gnome_config_set_float';
procedure _gnome_config_set_bool(path:Pchar; value:gboolean; priv:gint);cdecl;external libgnomedll name '_gnome_config_set_bool';
procedure _gnome_config_set_vector(path:Pchar; argc:longint; argv:PPchar; priv:gint);cdecl;external libgnomedll name '_gnome_config_set_vector';

procedure gnome_config_set_string(path,new_value : Pchar);
procedure gnome_config_set_translated_string(path, new_value : PChar);
procedure gnome_config_set_int(path : PChar; new_value : longint);
procedure gnome_config_set_float(path : PChar; new_value : longint);
procedure gnome_config_set_bool(path : PChar; new_value : gboolean);
procedure gnome_config_set_vector(path:Pchar; argc:longint; argv:PPchar);

procedure gnome_config_private_set_string(path,new_value : Pchar);
procedure gnome_config_private_set_translated_string(path, new_value : PChar);
procedure gnome_config_private_set_int(path : Pchar; new_value : longint);
procedure gnome_config_private_set_float(path : PChar; new_value : longint);
procedure gnome_config_private_set_bool(path : PChar; new_value : gboolean);
procedure gnome_config_private_set_vector(path:Pchar; argc:longint; argv:PPchar);

function _gnome_config_has_section(path:Pchar; priv:gint):gboolean;cdecl;external libgnomedll name '_gnome_config_has_section';

function gnome_config_has_section(path : Pchar) : gboolean;

function gnome_config_private_has_section(path : pchar) : gboolean;

function _gnome_config_init_iterator(path:Pchar; priv:gint):pointer;cdecl;external libgnomedll name '_gnome_config_init_iterator';
function _gnome_config_init_iterator_sections(path:Pchar; priv:gint):pointer;cdecl;external libgnomedll name '_gnome_config_init_iterator_sections';
function gnome_config_iterator_next(iterator_handle:pointer; key:PPchar; value:PPchar):pointer;cdecl;external libgnomedll name 'gnome_config_iterator_next';

function gnome_config_init_iterator(path : pchar) : pointer;
function gnome_config_init_iterator_sections(path : Pchar) : pointer;

function gnome_config_private_init_iterator(path : Pchar) : pointer;
function gnome_config_private_init_iterator_sections(path : Pchar) : pointer;

procedure gnome_config_drop_all;cdecl;external libgnomedll name 'gnome_config_drop_all';
procedure gnome_config_sync;cdecl;external libgnomedll name 'gnome_config_sync';
procedure _gnome_config_sync_file(path:Pchar; priv:longint);cdecl;external libgnomedll name '_gnome_config_sync_file';

procedure gnome_config_sync_file(path : Pchar);

procedure gnome_config_private_sync_file(path : Pchar);

procedure _gnome_config_drop_file(path:Pchar; priv:gint);cdecl;external libgnomedll name '_gnome_config_drop_file';

procedure gnome_config_drop_file(path : Pchar);

procedure gnome_config_private_drop_file(path : Pchar);

procedure _gnome_config_clean_file(path:Pchar; priv:gint);cdecl;external libgnomedll name '_gnome_config_clean_file';

Procedure gnome_config_clean_file(path:Pchar);

Procedure gnome_config_private_clean_file(path:Pchar);

procedure _gnome_config_clean_section(path:Pchar; priv:gint);cdecl;external libgnomedll name '_gnome_config_clean_section';

procedure gnome_config_clean_section(path:Pchar);

procedure gnome_config_private_clean_section(path:Pchar);

procedure _gnome_config_clean_key(path:Pchar; priv:gint);cdecl;external libgnomedll name '_gnome_config_clean_key';

procedure gnome_config_clean_key(path:Pchar);

procedure gnome_config_private_clean_key(path:Pchar);

function gnome_config_get_real_path(path:Pchar):Pchar;

function gnome_config_private_get_real_path(path:Pchar):Pchar;

procedure gnome_config_push_prefix(path:Pchar);cdecl;external libgnomedll name 'gnome_config_push_prefix';
procedure gnome_config_pop_prefix;cdecl;external libgnomedll name 'gnome_config_pop_prefix';
procedure gnome_config_make_vector(_string:Pchar; argcp:Plongint; argvp:PPPchar);cdecl;external libgnomedll name 'gnome_config_make_vector';
function gnome_config_assemble_vector(argc:longint; argv:PPchar):pchar;cdecl;external libgnomedll name 'gnome_config_assemble_vector';

Type
  TGnomeConfigHandler = procedure (param : pointer); cdecl;

procedure gnome_config_set_set_handler(func : TGnomeConfigHandler; data:pointer);cdecl;external libgnomedll name 'gnome_config_set_set_handler';
procedure gnome_config_set_sync_handler(func:TGnomeConfigHandler; data:pointer);cdecl;external libgnomedll name 'gnome_config_set_sync_handler';

{$EndIf read_interface}

{$Ifdef read_implementation}

function gnome_config_get_string_with_default(path:Pchar; def:Pgboolean):pchar;
begin
   gnome_config_get_string_with_default:=_gnome_config_get_string_with_default(path,def,0);
end;

function gnome_config_get_translated_string_with_default(path:Pchar; def:Pgboolean):pchar;
begin
   gnome_config_get_translated_string_with_default:=_gnome_config_get_translated_string_with_default(path,def,0);
end;

function gnome_config_get_int_with_default(path:Pchar; def:Pgboolean):gint;
begin
   gnome_config_get_int_with_default:=_gnome_config_get_int_with_default(path,def,0);
end;

function gnome_config_get_float_with_default(path:Pchar; def:Pgboolean):gdouble;
begin
   gnome_config_get_float_with_default:=_gnome_config_get_float_with_default(path,def,0);
end;

function gnome_config_get_bool_with_default(path:Pchar; def:Pgboolean):gboolean;
begin
   gnome_config_get_bool_with_default:=_gnome_config_get_bool_with_default(path,def,0);
end;

procedure gnome_config_get_vector_with_default(path:Pchar; argcp:Pgint; argvp:PPPchar; def:Pgboolean);
begin
   _gnome_config_get_vector_with_default(path,argcp,argvp,def,0);
end;

function gnome_config_private_get_string_with_default(path:Pchar; def:Pgboolean):pchar;
begin
   gnome_config_private_get_string_with_default:=_gnome_config_get_string_with_default(path,def,1);
end;

function gnome_config_private_get_translated_string_with_default(path:Pchar; def:Pgboolean):pchar;
begin
   gnome_config_private_get_translated_string_with_default:=_gnome_config_get_translated_string_with_default(path,def,1);
end;

function gnome_config_private_get_int_with_default(path:Pchar; def:Pgboolean):gint;
begin
   gnome_config_private_get_int_with_default:=_gnome_config_get_int_with_default(path,def,1);
end;

function gnome_config_private_get_float_with_default(path:Pchar; def:Pgboolean):gdouble;
begin
   gnome_config_private_get_float_with_default:=_gnome_config_get_float_with_default(path,def,1);
end;

function gnome_config_private_get_bool_with_default(path:Pchar; def:Pgboolean):gboolean;
begin
   gnome_config_private_get_bool_with_default:=_gnome_config_get_bool_with_default(path,def,1);
end;

procedure gnome_config_private_get_vector_with_default(path:Pchar; argcp:Pgint; argvp:PPPchar; def:Pgboolean);
begin
   _gnome_config_get_vector_with_default(path,argcp,argvp,def,1);
end;

function gnome_config_get_string(path:Pchar):pchar;
begin
   gnome_config_get_string:=_gnome_config_get_string_with_default(path,nil,0);
end;

function gnome_config_get_translated_string(path:Pchar):pchar;
begin
   gnome_config_get_translated_string:=_gnome_config_get_translated_string_with_default(path,nil,0);
end;

function gnome_config_get_int(path:Pchar):gint;
begin
   gnome_config_get_int:=_gnome_config_get_int_with_default(path,nil,0);
end;

function gnome_config_get_float(path:Pchar):gdouble;
begin
   gnome_config_get_float:=_gnome_config_get_float_with_default(path,nil,0);
end;

function gnome_config_get_bool(path:Pchar):gboolean;
begin
   gnome_config_get_bool:=_gnome_config_get_bool_with_default(path,nil,0);
end;

procedure gnome_config_get_vector(path:Pchar; argcp:Pgint; argvp:PPPchar);
begin
   _gnome_config_get_vector_with_default(path,argcp,argvp,nil,0);
end;

function gnome_config_private_get_string(path:Pchar):pchar;
begin
   gnome_config_private_get_string:=_gnome_config_get_string_with_default(path,nil,1);
end;

function gnome_config_private_get_translated_string(path:Pchar):pchar;
begin
   gnome_config_private_get_translated_string:=_gnome_config_get_translated_string_with_default(path,nil,1);
end;

function gnome_config_private_get_int(path:Pchar):gint;
begin
   gnome_config_private_get_int:=_gnome_config_get_int_with_default(path,nil,1);
end;

function gnome_config_private_get_float(path:Pchar):gdouble;
begin
   gnome_config_private_get_float:=_gnome_config_get_float_with_default(path,nil,1);
end;

function gnome_config_private_get_bool(path:Pchar):gboolean;
begin
   gnome_config_private_get_bool:=_gnome_config_get_bool_with_default(path,nil,1);
end;

procedure gnome_config_private_get_vector(path:Pchar; argcp:Pgint; argvp:PPPchar);
begin
   _gnome_config_get_vector_with_default(path,argcp,argvp,nil,1);
end;

procedure gnome_config_set_string(path,new_value : Pchar);
begin
   _gnome_config_set_string(path,new_value,0);
end;

procedure gnome_config_set_translated_string(path, new_value : PChar);
begin
   _gnome_config_set_translated_string(path,new_value,0);
end;

procedure gnome_config_set_int(path : PChar; new_value : longint);
begin
   _gnome_config_set_int(path,new_value,0);
end;

procedure gnome_config_set_float(path : PChar; new_value : longint);
begin
   _gnome_config_set_float(path,new_value,0);
end;

procedure gnome_config_set_bool(path : PChar; new_value : gboolean);
begin
   _gnome_config_set_bool(path,new_value,0);
end;

procedure gnome_config_set_vector(path:Pchar; argc:longint; argv:PPchar);
begin
   _gnome_config_set_vector(path,argc,argv,0);
end;

procedure gnome_config_private_set_string(path,new_value : Pchar);
begin
   _gnome_config_set_string(path,new_value,1);
end;

procedure gnome_config_private_set_translated_string(path, new_value : PChar);
begin
   _gnome_config_set_translated_string(path,new_value,1);
end;

procedure gnome_config_private_set_int(path : PChar; new_value : longint);
begin
   _gnome_config_set_int(path,new_value,1);
end;

procedure gnome_config_private_set_float(path : PChar; new_value : longint);
begin
   _gnome_config_set_float(path,new_value,1);
end;

procedure gnome_config_private_set_bool(path : PChar; new_value : gboolean);
begin
   _gnome_config_set_bool(path,new_value,1);
end;

procedure gnome_config_private_set_vector(path:Pchar; argc:longint; argv:PPchar);
begin
   _gnome_config_set_vector(path,argc,argv,1);
end;

function gnome_config_has_section(path : Pchar) : gboolean;
begin
   gnome_config_has_section:=_gnome_config_has_section(path,0);
end;

function gnome_config_private_has_section(path : pchar) : gboolean;
begin
   gnome_config_private_has_section:=_gnome_config_has_section(path,1);
end;

function gnome_config_init_iterator(path : pchar) : pointer;
begin
   gnome_config_init_iterator:=_gnome_config_init_iterator(path,0);
end;

function gnome_config_init_iterator_sections(path : Pchar) : pointer;
begin
   gnome_config_init_iterator_sections:=_gnome_config_init_iterator_sections(path,0);
end;

function gnome_config_private_init_iterator(path : Pchar) : pointer;
begin
   gnome_config_private_init_iterator:=_gnome_config_init_iterator(path,1);
end;

function gnome_config_private_init_iterator_sections(path : Pchar) : pointer;
begin
   gnome_config_private_init_iterator_sections:=_gnome_config_init_iterator_sections(path,1);
end;

procedure gnome_config_sync_file(path : Pchar);
begin
   _gnome_config_sync_file(path,0);
end;

procedure gnome_config_private_sync_file(path : Pchar);
begin
   _gnome_config_sync_file(path,1);
end;

procedure gnome_config_drop_file(path : Pchar);
begin
   _gnome_config_drop_file(path,0);
end;

procedure gnome_config_private_drop_file(path : Pchar);
begin
   _gnome_config_drop_file(path,1);
end;

Procedure gnome_config_clean_file(path:Pchar);
begin
   _gnome_config_clean_file(path,0);
end;

Procedure gnome_config_private_clean_file(path:Pchar);
begin
   _gnome_config_clean_file(path,1);
end;

procedure gnome_config_clean_section(path:Pchar);
begin
   _gnome_config_clean_section(path,0);
end;

procedure gnome_config_private_clean_section(path:Pchar);
begin
   _gnome_config_clean_section(path,1);
end;

procedure gnome_config_clean_key(path:Pchar);
begin
   _gnome_config_clean_key(path,0);
end;

procedure gnome_config_private_clean_key(path:Pchar);
begin
   _gnome_config_clean_key(path,1);
end;

function gnome_config_get_real_path(path : pchar) : pchar;
begin
  gnome_config_get_real_path := g_concat_dir_and_file(gnome_user_dir, Path);
end;

function gnome_config_private_get_real_path(path : pchar) : pchar;
begin
  gnome_config_private_get_real_path := g_concat_dir_and_file(gnome_user_private_dir, Path);
end;

{$Endif read_implementation}