;;; -*- 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-help

;(define-func gnome_help_display
;  none
;  ((string file_name)
;   (string link_id)
;   (GErrorPointer error)))

;(define-func gnome_help_display_uri
;  none
;  ((string help_uri)
;   (GErrorPointer error)))


;; 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_list
  ((list string))
  ((string category_name)))


;; 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)
;   (GErrorPointer error)))


;; init

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


;; Options

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