File: gnomelib.defs

package info (click to toggle)
rep-gtk 0.15-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 728 kB
  • ctags: 349
  • sloc: ansic: 3,577; sh: 2,430; lisp: 1,102; makefile: 159
file content (400 lines) | stat: -rw-r--r-- 7,221 bytes parent folder | download
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
396
397
398
399
400
;;; -*- lisp -*-
;;; gnomelib.defs - Export Gnome interfaces to Guile.
;;; 
;;; Copyright (C) 1998 Tom Tromey
;;; Copyright (C) 2000 John Harper
;;; 
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 2, or (at your option)
;;; any later version.
;;; 
;;; This program 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 General Public License for more details.
;;; 
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
;;; 02111-1307, USA.  */


;; Gnome util.

(define-func gnome_libdir_file
  string
  ((string filename)))

(define-func gnome_datadir_file
  string
  ((string filename)))

(define-func gnome_pixmap_file
  string
  ((string filename)))

(define-func gnome_unconditional_libdir_file
  string
  ((string filename)))

(define-func gnome_unconditional_datadir_file
  string
  ((string filename)))

(define-func gnome_unconditional_pixmap_file
  string
  ((string filename)))


;; Gnome config.
;; FIXME: iterators and _with_default functions not included.

(define-func gnome_config_get_string
  string
  ((string path)))

(define-func gnome_config_get_int
  int
  ((string path)))

(define-func gnome_config_get_bool
  bool
  ((string path)))

(define-func gnome_config_set_string
  none
  ((string path)
   (string value)))

(define-func gnome_config_set_int
  none
  ((string path)
   (int value)))

(define-func gnome_config_set_bool
  none
  ((string path)
   (bool value)))

(define-func gnome_config_has_section
  bool
  ((string path)))

(define-func gnome_config_drop_all
  none
  ())

(define-func gnome_config_sync
  none
  ())

(define-func gnome_config_clean_file
  none
  ((string path)))

(define-func gnome_config_clean_section
  none
  ((string path)))

(define-func gnome_config_clean_key
  none
  ((string path)))

(define-func gnome_config_push_prefix
  none
  ((string path)))

(define-func gnome_config_pop_prefix
  none
  ())


;; gnome-dentry

;; XXX can't handle structure conversion currently


;; gnome-fileconvert

(define-func gnome_file_convert_fd
  file-descriptor
  ((file-descriptor fd)
   (string fromtype)
   (string totype)))

(define-func gnome_file_convert
  file-descriptor
  ((string filename)
   (string fromtype)
   (string totype)))


;; gnome-help

(define-func gnome_help_file_find_file
  string
  ((string app)
   (string path)))

(define-func gnome_help_file_path
  string
  ((string app)
   (string path)))

(define-func gnome_help_display
  none
  ((pointer ignore)
   ((fvec string 2) ref)))		;actually GnomeHelpMenuEntry

(define-func gnome_help_goto
  none
  ((pointer ignore)
   (string file)))

(define-func gnome_help_pbox_display
  none
  ((pointer ignore)
   (int page_num)
   ((fvec string 2) ref)))		;actually GnomeHelpMenuEntry

(define-func gnome_help_pbox_goto
  none
  ((pointer ignore)
   (int ignore2 (= "0"))
   ((fvec string 2) ref)))		;actually GnomeHelpMenuEntry


;; gnome-history

;; FIXME: other functions done by hand due to build-guile-gtk limitations.

;(define-func gnome_history_recently_used
;  none
;  ((string filename)
;   (string filetype)
;   (string creator)
;   (string desc)))


;; gnome-i18n

(define-func gnome_i18n_get_language
  static_string
  ())

(define-func gnome_i18n_get_language_list
  ((list string))
  ((string category_name)))

(define-func gnome_i18n_set_preferred_language
  none
  ((string val)))

(define-func gnome_i18n_get_preferred_language
  static_string
  ())


;; gnome-metadata

;; should really handle the error typedef

(define-func sgtk_gnome_metadata_set
  int
  ((string file)
   (string name)
   (SCM data))
  (scm-name "gnome-metadata-set"))

(define-func gnome_metadata_remove
  int
  ((string file)
   (string name)))

;XXX can't return vectors currently
;(define-func gnome_metadata_list
;  (tvec string)
;  ((string file)))

(define-func sgtk_gnome_metadata_get
  SCM
  ((string file)
   (string name))
  (scm-name "gnome-metadata-get"))

(define-func sgtk_gnome_metadata_get_fast
  SCM
  ((string file)
   (string name))
  (scm-name "gnome-metadata-get-fast"))

(define-func gnome_metadata_rename
  int
  ((string from)
   (string to)))

(define-func gnome_metadata_copy
  int
  ((string from)
   (string to)))

(define-func gnome_metadata_delete
  int
  ((string file)))

(define-func sgtk_gnome_metadata_regex_add
  none
  ((string regex)
   (string key)
   (SCM data))
  (scm-name "gnome-metadata-regex-add"))

(define-func gnome_metadata_regex_remove
  none
  ((string regex)
   (string key)))

(define-func sgtk_gnome_metadata_type_add
  none
  ((string regex)
   (string key)
   (SCM data))
  (scm-name "gnome-metadata-type-add"))

(define-func gnome_metadata_type_remove
  none
  ((string regex)
   (string key)))

(define-func gnome_metadata_lock
  none
  ())

(define-func gnome_metadata_unlock
  none
  ())


;; gnome-mime-info

(define-func gnome_mime_get_value
  static_string
  ((string mime_type)
   (string key)))

(define-func gnome_mime_get_keys
  ((list string))
  ((string mime_type)))

(define-func gnome_mime_program
  static_string
  ((string mime_type)))

(define-func gnome_mime_description
  static_string
  ((string mime_type)))

(define-func gnome_mime_test
  static_string
  ((string mime_type)))

(define-func gnome_mime_composetyped
  static_string
  ((string mime_type)))

(define-func gnome_mime_copiousoutput
  bool
  ((string mime_type)
   (string key)))

(define-func gnome_mime_needsterminal
  bool
  ((string mime_type)
   (string key)))


;; gnome-mime

(define-func gnome_mime_type
  static_string
  ((string filename)))

(define-func gnome_mime_type_of_file
  static_string
  ((string existing_filename)))

(define-func gnome_mime_type_from_magic
  static_string
  ((string filename)))

(define-func gnome_uri_list_extract_filenames
  ((list string))
  ((string uri_list)))

(define-func gnome_uri_list_extract_uris
  ((list string))
  ((string uri_list)))


;; gnome-paper, gnome-popt, gnome-regex, gnome-remote

;; [can't be arsed]


;; gnome-score

(define-func gnome_score_init
  int
  ((string gamename)))

(define-func gnome_score_log
  int
  ((float score)
   (string level)
   (bool higher_to_lower_score_order)))


;; gnome-sound

(define-func gnome_sound_init
  none
  ((string hostname)))

(define-func gnome_sound_shutdown
  none
  ())

(define-func gnome_sound_sample_load
  int
  ((string sample_name)
   (string filename)))

(define-func gnome_sound_play
  none
  ((string filename)))


;; gnome-url

(define-func gnome_url_show
  none
  ((string url)))


;; init

(define-func gnomelib_init
  none
  ((string app_id)
   (string app_version)))


;; Options

(options
 (includes "#include <gnome.h>")
 (includes "#include <libgnome/gnome-fileconvert.h>")
 (includes "#include <libgnome/gnome-help.h>")
 (includes "#include \"rep-gnome.h\"")
 (init-func "sgtk_gnome_init_gnome_glue"))