;;; -*- lisp -*-
;;; gnomeui.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.  */

(import "gtk.defs")
(import "gdk-pixbuf.defs")
(import "gnome-canvas.defs")

(define-enum GnomePreferencesType
  (never GNOME_PREFERENCES_NEVER)
  (user GNOME_PREFERENCES_USER)
  (always GNOME_PREFERENCES_ALWAYS))

;; ugh, kludge of the highest order..

(define-type 'GnomeStringCallback "sgtk_protshell*" output-rep-to-full-callback
	     nil "sgtk_valid_function"
	     (cons 'c2args
		   (lambda (output type var options)
		     (@ "sgtk_gnome_string_callback, (gpointer) %s" var)))
	     (cons 'finish output-full-callback-finish))

(define-type 'GnomeReplyCallback "sgtk_protshell*" output-rep-to-full-callback
	     nil "sgtk_valid_function"
	     (cons 'c2args
		   (lambda (output type var options)
		     (@ "sgtk_gnome_reply_callback, (gpointer) %s" var)))
	     (cons 'finish output-full-callback-finish))


;; gnome-app-helper

(define-func gnome_app_message
  GtkWidget
  ((GnomeApp app)
   (string message)))

(define-func gnome_app_flash
  none
  ((GnomeApp app)
   (string flash)))

(define-func gnome_app_error
  GtkWidget
  ((GnomeApp app)
   (string error)))

(define-func gnome_app_warning
  GtkWidget
  ((GnomeApp app)
   (string warning)))

(define-func gnome_app_question
  GtkWidget
  ((GnomeApp app)
   (string question)
   (GnomeReplyCallback callback))
  (protection *result*))

(define-func gnome_app_question_modal
  GtkWidget
  ((GnomeApp app)
   (string question)
   (GnomeReplyCallback callback))
  (protection *result*))

(define-func gnome_app_ok_cancel
  GtkWidget
  ((GnomeApp app)
   (string message)
   (GnomeReplyCallback callback))
  (protection *result*))

(define-func gnome_app_ok_cancel_modal
  GtkWidget
  ((GnomeApp app)
   (string message)
   (GnomeReplyCallback callback))
  (protection *result*))

(define-func gnome_app_request_string
  GtkWidget
  ((GnomeApp app)
   (string prompt)
   (GnomeStringCallback callback))
  (protection *result*))

(define-func gnome_app_request_password
  GtkWidget
  ((GnomeApp app)
   (string prompt)
   (GnomeStringCallback callback))
  (protection *result*))


;; gnome-dialog-util

(define-func gnome_ok_dialog
  GtkWidget
  ((string message)))

(define-func gnome_ok_dialog_parented
  GtkWidget
  ((string message)
   (GtkWindow parent)))

(define-func gnome_error_dialog
  GtkWidget
  ((string error)))

(define-func gnome_error_dialog_parented
  GtkWidget
  ((string error)
   (GtkWindow parent)))

(define-func gnome_warning_dialog
  GtkWidget
  ((string warning)))

(define-func gnome_warning_dialog_parented
  GtkWidget
  ((string warning)
   (GtkWindow parent)))

(define-func gnome_question_dialog
  GtkWidget
  ((string question)
   (GnomeReplyCallback callback))
  (protection *result*))

(define-func gnome_question_dialog_parented
  GtkWidget
  ((string question)
   (GnomeReplyCallback callback)
   (GtkWindow parent))
  (protection *result*))

(define-func gnome_question_dialog_modal
  GtkWidget
  ((string question)
   (GnomeReplyCallback callback))
  (protection *result*))

(define-func gnome_question_dialog_modal_parented
  GtkWidget
  ((string question)
   (GnomeReplyCallback callback)
   (GtkWindow parent))
  (protection *result*))

(define-func gnome_ok_cancel_dialog
  GtkWidget
  ((string question)
   (GnomeReplyCallback callback))
  (protection *result*))

(define-func gnome_ok_cancel_dialog_parented
  GtkWidget
  ((string question)
   (GnomeReplyCallback callback)
   (GtkWindow parent))
  (protection *result*))

(define-func gnome_ok_cancel_dialog_modal
  GtkWidget
  ((string question)
   (GnomeReplyCallback callback))
  (protection *result*))

(define-func gnome_ok_cancel_dialog_modal_parented
  GtkWidget
  ((string question)
   (GnomeReplyCallback callback)
   (GtkWindow parent))
  (protection *result*))

(define-func gnome_request_string_dialog
  GtkWidget
  ((string prompt)
   (GnomeStringCallback callback))
  (protection *result*))

(define-func gnome_request_string_dialog_parented
  GtkWidget
  ((string prompt)
   (GnomeStringCallback callback)
   (GtkWindow parent))
  (protection *result*))

(define-func gnome_request_password_dialog
  GtkWidget
  ((string prompt)
   (GnomeStringCallback callback))
  (protection *result*))

(define-func gnome_request_password_dialog_parented
  GtkWidget
  ((string prompt)
   (GnomeStringCallback callback)
   (GtkWindow parent))
  (protection *result*))

(define-func gnome_request_dialog
  GtkWidget
  ((bool password)
   (string prompt)
   (string default_text (null-ok))
   (int max_length)
   (GnomeStringCallback callback)
   (GtkWindow parent (null-ok)))
  (protection *result*))


;; gnome-geometry

(define-func gnome_parse_geometry
  bool
  ((string geom)
   ((ret int) xpos)
   ((ret int) ypos)
   ((ret int) width)
   ((ret int) height)))

(define-func gnome_geometry_string
  string
  ((GdkWindow window)))


;; gtkcauldron

;; [the interface isn't suited to lisp anyway..]


;; GnomeAbout

(define-object GnomeAbout (GtkDialog))

(define-func gnome_about_new
  GtkWidget
  ((string name)
   (string version)
   (string copyright)
   (string comments)
   ((tvec string) authors)
   ((tvec string) documentors)
   (string translator_credits)
   (GdkPixbuf logo (null-ok))))


;; GnomeApp

(define-object GnomeApp (GtkWindow))

(define-func gnome_app_new
  GtkWidget
  ((string appname)
   (string title)))

(define-func gnome_app_set_menus
  none
  ((GnomeApp app)
   (GtkMenuBar menubar)))

(define-func gnome_app_set_toolbar
  none
  ((GnomeApp app)
   (GtkToolbar toolbar)))

(define-func gnome_app_set_statusbar
  none
  ((GnomeApp app)
   (GtkWidget statusbar)))

(define-func gnome_app_set_contents
  none
  ((GnomeApp app)
   (GtkWidget contents)))


;; GnomeAppBar

(define-object GnomeAppBar (GtkHBox))

(define-func gnome_appbar_new
  GtkWidget
  ((bool has_progress)
   (bool has_status)
   (GnomePreferencesType interactivity)))

(define-func gnome_appbar_set_status
  none
  ((GnomeAppBar appbar)
   (string status)))

(define-func gnome_appbar_set_default
  none
  ((GnomeAppBar appbar)
   (string default_status)))

(define-func gnome_appbar_push
  none
  ((GnomeAppBar appbar)
   (string status)))

(define-func gnome_appbar_pop
  none
  ((GnomeAppBar appbar)))

(define-func gnome_appbar_clear_stack
  none
  ((GnomeAppBar appbar)))

(define-func gnome_appbar_set_progress
  none
  ((GnomeAppBar appbar)
   (float percentage)))

(define-func gnome_appbar_get_progress
  GtkProgress
  ((GnomeAppBar appbar)))

(define-func gnome_appbar_refresh
  none
  ((GnomeAppBar appbar)))

(define-func gnome_appbar_set_prompt
  none
  ((GnomeAppBar appbar)
   (string prompt)
   (bool modal)))

(define-func gnome_appbar_clear_prompt
  none
  ((GnomeAppBar appbar)))

(define-func gnome_appbar_get_response
  string
  ((GnomeAppBar appbar)))


;; GnomeClient

;; FIXME: Some functions still live in client.c, until argc/argv supported.

(define-enum GnomeInteractStyle
  (none GNOME_INTERACT_NONE)
  (errors GNOME_INTERACT_ERRORS)
  (any GNOME_INTERACT_ANY))

(define-enum GnomeDialogType
  (error GNOME_DIALOG_ERROR)
  (normal GNOME_DIALOG_NORMAL))

(define-enum GnomeSaveStyle
  (global GNOME_SAVE_GLOBAL)
  (local GNOME_SAVE_LOCAL)
  (both GNOME_SAVE_BOTH))

(define-enum GnomeRestartStyle
  (if-running GNOME_RESTART_IF_RUNNING)
  (anyway GNOME_RESTART_ANYWAY)
  (immediately GNOME_RESTART_IMMEDIATELY)
  (never GNOME_RESTART_NEVER))

(define-object GnomeClient (GtkObject))

(define-func gnome_client_disable_master_connection
  none
  ())

(define-func gnome_master_client
  GnomeClient
  ())

(define-func gnome_client_new
  GnomeClient
  ())

(define-func gnome_client_new_without_connection
  GnomeClient
  ())

(define-func gnome_client_connect
  none
  ((GnomeClient client)))

(define-func gnome_client_disconnect
  none
  ((GnomeClient client)))

(define-func gnome_client_flush
  none
  ((GnomeClient client)))

(define-func gnome_client_set_id
  none
  ((GnomeClient client)
   (string id)))

(define-func gnome_client_get_config_prefix
  static_string
  ((GnomeClient client)))

; gnome_client_set_clone_command

(define-func gnome_client_set_current_directory
  none
  ((GnomeClient client)
   (string dir)))     

; gnome_client_set_environment

(define-func gnome_client_set_process_id
  none
  ((GnomeClient client)
   (int id)))

(define-func gnome_client_set_program
  none
  ((GnomeClient client)
   (string program)))

; gnome_client_set_restart_command

; gnome_client_set_resign_command

(define-func gnome_client_set_restart_style
  none
  ((GnomeClient client)
   (GnomeRestartStyle style)))    

; gnome_client_set_shutdown_command

(define-func gnome_client_set_user_id
  none
  ((GnomeClient client)
   (string id)))

(define-func gnome_client_request_phase_2
  none
  ((GnomeClient client)))

(define-func gnome_client_request_save
  none
  ((GnomeClient client)
   (GnomeSaveStyle save_style)
   (bool shutdown)
   (GnomeInteractStyle interact_style)
   (bool fast)
   (bool global)))

; XXX can't handle callbacks, only full-callbacks
;(define-func gnome_client_request_interaction_interp
;  none
;  ((GnomeClient client)
;   (GnomeDialogType dialog_type)
;   (callback function))
;  (protection client))

(define-func gnome_interaction_key_return
  none
  ((int key)
   (bool cancel_shutdown)))


;; GnomeColorPicker

(define-object GnomeColorPicker (GtkButton))

(define-func gnome_color_picker_new
  GnomeColorPicker
  ())

(define-func gnome_color_picker_set_i16
  none
  ((GnomeColorPicker cp)
   (char r)
   (char g)
   (char b)
   (char a)))

(define-func gnome_color_picker_get_i16
  none
  ((GnomeColorPicker cp)
   ((ret ushort) r)
   ((ret ushort) g)
   ((ret ushort) b)
   ((ret ushort) a)))

(define-func gnome_color_picker_set_dither
  none
  ((GnomeColorPicker cp)
   (bool dither)))

(define-func gnome_color_picker_set_use_alpha
  none
  ((GnomeColorPicker cp)
   (bool use_alpha)))

(define-func gnome_color_picker_set_title
  none
  ((GnomeColorPicker cp)
   (string title)))


;; GnomeDateEdit

(define-object GnomeDateEdit (GtkHBox))

(define-func gnome_date_edit_new
  GtkWidget
  ((ulong the_time)			;actually time_t
   (bool show_time)
   (bool use_24)))

(define-func gnome_date_edit_set_time
  none
  ((GnomeDateEdit de)
   (ulong the_time)))			;actually time_t

(define-func gnome_date_edit_set_popup_range
  none
  ((GnomeDateEdit de)
   (int low_hour)
   (int high_hour)))

(define-func gnome_date_edit_get_date
  ulong					;actually time_t
  ((GnomeDateEdit de)))


;; GnomeDEntryEdit


;; GnomeDialog

(define-object GnomeDialog (GtkWindow)
  (fields
   (GtkWidget vbox)))

(define-func gnome_dialog_newv
  GtkWidget
  ((string title)
   ((tvec GnomeStockButtonNameType) buttons))
  (scm-name "gnome-dialog-new"))

(define-func gnome_dialog_set_parent
  none
  ((GnomeDialog d)
   (GtkWindow parent)))

(define-func gnome_dialog_run
  int
  ((GnomeDialog d)))

(define-func gnome_dialog_run_and_close
  int
  ((GnomeDialog d)))

(define-func gnome_dialog_set_default
  none
  ((GnomeDialog d)
   (int button)))

(define-func gnome_dialog_set_sensitive
  none
  ((GnomeDialog d)
   (int button)
   (bool setting)))

(define-func gnome_dialog_set_accelerator
  none
  ((GnomeDialog d)
   (int button)
   (char accel_key)
   (uint accel_mods)))			;uint8

(define-func gnome_dialog_close
  none
  ((GnomeDialog d)))

(define-func gnome_dialog_close_hides
  none
  ((GnomeDialog d)
   (bool just_hide)))

(define-func gnome_dialog_set_close
  none
  ((GnomeDialog d)
   (bool click_closes)))

(define-func gnome_dialog_editable_enters
  none
  ((GnomeDialog d)
   (GtkEditable editable)))

(define-func gnome_dialog_append_button
  none
  ((GnomeDialog d)
   (GnomeStockButtonNameType name)))

(define-func gnome_dialog_append_buttonsv
  none
  ((GnomeDialog d)
   ((tvec GnomeStockButtonNameType) buttons))
  (scm-name "gnome-dialog-append-buttons"))

(define-func gnome_dialog_append_button_with_pixmap
  none
  ((GnomeDialog d)
   (GnomeStockButtonNameType name)
   (string pixmap)))

(define-func gnome_dialog_append_buttons_with_pixmaps
  none
  ((GnomeDialog d)
   ((tvec GnomeStockButtonNameType) names)
   ((tvec string) pixmaps)))


;; GnomeDockBand
;; GnomeDockItem
;; GnomeDock
;; GnomeDockLayout

;; GnomeDruid
;; GnomeDruidPage
;; GnomeDruidPageStart
;; GnomeDruidPageStandard
;; GnomeDruidPageFinish


;; GnomeEntry

(define-object GnomeEntry (GtkCombo))

(define-func gnome_entry_new
  GtkWidget
  ((string history_id (null-ok))))

(define-func gnome_entry_gtk_entry
  GtkWidget
  ((GnomeEntry ge)))

(define-func gnome_entry_set_history_id
  none
  ((GnomeEntry ge)
   (string history_id)))

(define-func gnome_entry_prepend_history
  none
  ((GnomeEntry ge)
   (int save)
   (string text)))

(define-func gnome_entry_append_history
  none
  ((GnomeEntry ge)
   (int save)
   (string text)))

(define-func gnome_entry_load_history
  none
  ((GnomeEntry ge)))

(define-func gnome_entry_save_history
  none
  ((GnomeEntry ge)))


;; GnomeFileEntry

(define-object GnomeFileEntry (GtkHBox))

(define-func gnome_file_entry_new
  GtkWidget
  ((string history_id)
   (string browse_dialog_title)))

(define-func gnome_file_entry_gnome_entry
  GtkWidget
  ((GnomeFileEntry fe)))

(define-func gnome_file_entry_gtk_entry
  GtkWidget
  ((GnomeFileEntry fe)))

(define-func gnome_file_entry_set_title
  none
  ((GnomeFileEntry fe)
   (string browse_dialog_title)))

(define-func gnome_file_entry_set_default_path
  none
  ((GnomeFileEntry fe)
   (string path)))

(define-func gnome_file_entry_set_directory
  none
  ((GnomeFileEntry fe)
   (bool directory_only)))

(define-func gnome_file_entry_get_full_path
  string
  ((GnomeFileEntry fe)
   (bool file_must_exist)))

(define-func gnome_file_entry_set_modal
  none
  ((GnomeFileEntry fe)
   (bool is_modal)))


;; GnomeFontPicker


;; GnomeHRef

(define-object GnomeHRef (GtkButton))

(define-func gnome_href_new
  GtkWidget
  ((string url)
   (string label)))

(define-func gnome_href_set_url
  none
  ((GnomeHRef href)
   (string url)))

(define-func gnome_href_set_text
  none
  ((GnomeHRef href)
   (string label)))

(define-func gnome_href_get_url
  static_string
  ((GnomeHRef href)))

(define-func gnome_href_get_text
  string
  ((GnomeHRef href)))


;; GnomeIconEntry

(define-object GnomeIconEntry (GtkVBox))

(define-func gnome_icon_entry_new
  GtkWidget
  ((string history_id)
   (string browse_dialog_title)))

(define-func gnome_icon_entry_set_pixmap_subdir
  none
  ((GnomeIconEntry ie)
   (string subdir)))

(define-func gnome_icon_entry_set_icon
  none
  ((GnomeIconEntry ie)
   (string filename)))

(define-func gnome_icon_entry_gnome_file_entry
  GtkWidget
  ((GnomeIconEntry ie)))

(define-func gnome_icon_entry_gnome_entry
  GtkWidget
  ((GnomeIconEntry ie)))

(define-func gnome_icon_entry_gtk_entry
  GtkWidget
  ((GnomeIconEntry ie)))

(define-func gnome_icon_entry_get_filename
  string
  ((GnomeIconEntry ie)))


;; GnomeIconSelection

(define-object GnomeIconSelection (GtkVBox))

(define-func gnome_icon_selection_new
  GtkWidget
  ())

(define-func gnome_icon_selection_add_defaults
  none
  ((GnomeIconSelection gis)))

(define-func gnome_icon_selection_add_directory
  none
  ((GnomeIconSelection gis)
   (string dir)))

(define-func gnome_icon_selection_show_icons
  none
  ((GnomeIconSelection gis)))

(define-func gnome_icon_selection_clear
  none
  ((GnomeIconSelection gis)
   (bool not_shown)))

(define-func gnome_icon_selection_get_icon
  static_string
  ((GnomeIconSelection gis)
   (bool full_path)))

(define-func gnome_icon_selection_select_icon
  none
  ((GnomeIconSelection gis)
   (string filename)))


;; GnomeMessageBox

(define-object GnomeMessageBox (GnomeDialog))

(define-func gnome_message_box_newv
  GtkWidget
  ((string message)
   (string messagebox_type)
   ((tvec string) buttons)))


;; GnomePixmapEntry

(define-object GnomePixmapEntry (GtkVBox))

(define-func gnome_pixmap_entry_new
  GtkWidget
  ((string history_id)
   (string browse_dialog_title)
   (bool do_preview)))

(define-func gnome_pixmap_entry_set_pixmap_subdir
  none
  ((GnomePixmapEntry pe)
   (string subdir)))

(define-func gnome_pixmap_entry_gnome_file_entry
  GtkWidget
  ((GnomePixmapEntry pe)))

(define-func gnome_pixmap_entry_gtk_entry
  GtkWidget
  ((GnomePixmapEntry pe)))

(define-func gnome_pixmap_entry_set_preview
  none
  ((GnomePixmapEntry pe)
   (bool do_preview)))

(define-func gnome_pixmap_entry_set_preview_size
  none
  ((GnomePixmapEntry pe)
   (int preview_w)
   (int preview_h)))

(define-func gnome_pixmap_entry_get_filename
  string
  ((GnomePixmapEntry pe)))


;; GnomePixmap

(define-object GnomePixmap (GtkWidget))

(define-func gnome_pixmap_new_from_file
  GtkWidget
  ((string filename)))

(define-func gnome_pixmap_new_from_file_at_size
  GtkWidget
  ((string filename)
   (int width)
   (int height)))

(define-func gnome_pixmap_new_from_gnome_pixmap
  GtkWidget
  ((GnomePixmap p)))

(define-func gnome_pixmap_load_file
  none
  ((GnomePixmap p)
   (string file)))

(define-func gnome_pixmap_load_file_at_size
  none
  ((GnomePixmap p)
   (string file)
   (int width)
   (int height)))

;; lots of others I can't be arsed to type in..


;; GnomePropertyBox

(define-object GnomePropertyBox (GnomeDialog)
  (fields 
   (GtkWidget notebook)
   (GtkWidget ok_button)
   (GtkWidget apply_button)
   (GtkWidget cancel_button)
   (GtkWidget help_button)))

(define-func gnome_property_box_new
  GtkWidget
  ())

(define-func gnome_property_box_changed
  none
  ((GnomePropertyBox box)))

(define-func gnome_property_box_set_state
  none
  ((GnomePropertyBox box)
   (bool state)))

(define-func gnome_property_box_append_page
  int
  ((GnomePropertyBox box)
   (GtkWidget child)
   (GtkWidget tab_label)))


;; GnomeScores


;; GnomeStock

(define-string-enum GnomeStockButtonNameType
  (ok GNOME_STOCK_BUTTON_OK)
  (cancel GNOME_STOCK_BUTTON_CANCEL)
  (yes GNOME_STOCK_BUTTON_YES)
  (no GNOME_STOCK_BUTTON_NO)
  (close GNOME_STOCK_BUTTON_CLOSE)
  (apply GNOME_STOCK_BUTTON_APPLY)
  (help GNOME_STOCK_BUTTON_HELP))

(define-string-enum GnomeStockMenuNameType
  (blank GNOME_STOCK_MENU_BLANK)
  (new GNOME_STOCK_MENU_NEW)
  (save GNOME_STOCK_MENU_SAVE)
  (save-as GNOME_STOCK_MENU_SAVE_AS)
  (open GNOME_STOCK_MENU_OPEN)
  (quit GNOME_STOCK_MENU_QUIT)
  (cut GNOME_STOCK_MENU_CUT)
  (copy GNOME_STOCK_MENU_COPY)
  (paste GNOME_STOCK_MENU_PASTE)
  (prop GNOME_STOCK_MENU_PROP)
  (pref GNOME_STOCK_MENU_PREF)
  (about GNOME_STOCK_MENU_ABOUT)
  (scores GNOME_STOCK_MENU_SCORES)
  (undo GNOME_STOCK_MENU_UNDO)
  (print GNOME_STOCK_MENU_PRINT)
  (search GNOME_STOCK_MENU_SEARCH)
  (back GNOME_STOCK_MENU_BACK)
  (forward GNOME_STOCK_MENU_FORWARD)
  (home GNOME_STOCK_MENU_HOME)
  (stop GNOME_STOCK_MENU_STOP)
  (refresh GNOME_STOCK_MENU_REFRESH)
  (mail GNOME_STOCK_MENU_MAIL)
  (mail-receive GNOME_STOCK_MENU_MAIL_RCV)
  (mail-send GNOME_STOCK_MENU_MAIL_SND)
  (trash GNOME_STOCK_MENU_TRASH)
  (trash-full GNOME_STOCK_MENU_TRASH_FULL)
  ;; This is an alias for Quit for now.
  (exit GNOME_STOCK_MENU_QUIT))

(define-string-enum GnomeStockPixmapNameType
  (new GNOME_STOCK_PIXMAP_NEW)
  (open GNOME_STOCK_PIXMAP_OPEN)
  (close GNOME_STOCK_PIXMAP_CLOSE)
  (revert GNOME_STOCK_PIXMAP_REVERT)
  (save GNOME_STOCK_PIXMAP_SAVE)
  (save-as GNOME_STOCK_PIXMAP_SAVE_AS)
  (cut GNOME_STOCK_PIXMAP_CUT)
  (copy GNOME_STOCK_PIXMAP_COPY)
  (paste GNOME_STOCK_PIXMAP_PASTE)
  (clear GNOME_STOCK_PIXMAP_CLEAR)
  (properties GNOME_STOCK_PIXMAP_PROPERTIES)
  (preferences GNOME_STOCK_PIXMAP_PREFERENCES)
  (help GNOME_STOCK_PIXMAP_HELP)
  (scores GNOME_STOCK_PIXMAP_SCORES)
  (print GNOME_STOCK_PIXMAP_PRINT)
  (search GNOME_STOCK_PIXMAP_SEARCH)
  (search/Replace GNOME_STOCK_PIXMAP_SRCHRPL)
  (back GNOME_STOCK_PIXMAP_BACK)
  (forward GNOME_STOCK_PIXMAP_FORWARD)
  (first GNOME_STOCK_PIXMAP_FIRST)
  (last GNOME_STOCK_PIXMAP_LAST)
  (home GNOME_STOCK_PIXMAP_HOME)
  (stop GNOME_STOCK_PIXMAP_STOP)
  (refresh GNOME_STOCK_PIXMAP_REFRESH)
  (undo GNOME_STOCK_PIXMAP_UNDO)
  (redo GNOME_STOCK_PIXMAP_REDO)
  (timer GNOME_STOCK_PIXMAP_TIMER)
  (timer-stopped GNOME_STOCK_PIXMAP_TIMER_STOP)
  (mail GNOME_STOCK_PIXMAP_MAIL	)
  (receive-mail GNOME_STOCK_PIXMAP_MAIL_RCV)
  (send-mail GNOME_STOCK_PIXMAP_MAIL_SND)
  (reply-to-mail GNOME_STOCK_PIXMAP_MAIL_RPL)
  (forward-mail GNOME_STOCK_PIXMAP_MAIL_FWD)
  (new-mail GNOME_STOCK_PIXMAP_MAIL_NEW)
  (trash GNOME_STOCK_PIXMAP_TRASH)
  (trash-full GNOME_STOCK_PIXMAP_TRASH_FULL)
  (undelete GNOME_STOCK_PIXMAP_UNDELETE)
  (spellchecker GNOME_STOCK_PIXMAP_SPELLCHECK)
  (microphone GNOME_STOCK_PIXMAP_MIC)
  (line-in GNOME_STOCK_PIXMAP_LINE_IN)
  (cdrom GNOME_STOCK_PIXMAP_CDROM)
  (volume GNOME_STOCK_PIXMAP_VOLUME)
  (midi GNOME_STOCK_PIXMAP_MIDI)
  (book-red GNOME_STOCK_PIXMAP_BOOK_RED)
  (book-green GNOME_STOCK_PIXMAP_BOOK_GREEN)
  (book-blue GNOME_STOCK_PIXMAP_BOOK_BLUE)
  (book-yellow GNOME_STOCK_PIXMAP_BOOK_YELLOW)
  (book-open GNOME_STOCK_PIXMAP_BOOK_OPEN)
  (about GNOME_STOCK_PIXMAP_ABOUT)
  (quit GNOME_STOCK_PIXMAP_QUIT)
  (exit GNOME_STOCK_PIXMAP_QUIT)
  (multiple GNOME_STOCK_PIXMAP_MULTIPLE)
  (not GNOME_STOCK_PIXMAP_NOT)
  (convert GNOME_STOCK_PIXMAP_CONVERT)
  (jump-to GNOME_STOCK_PIXMAP_JUMP_TO)
  (up GNOME_STOCK_PIXMAP_UP)
  (down GNOME_STOCK_PIXMAP_DOWN)
  (top GNOME_STOCK_PIXMAP_TOP)
  (bottom GNOME_STOCK_PIXMAP_BOTTOM)
  (attach GNOME_STOCK_PIXMAP_ATTACH)
  (index GNOME_STOCK_PIXMAP_INDEX)
  (font GNOME_STOCK_PIXMAP_FONT)
  (exec GNOME_STOCK_PIXMAP_EXEC)
  (left GNOME_STOCK_PIXMAP_ALIGN_LEFT)
  (right GNOME_STOCK_PIXMAP_ALIGN_RIGHT)
  (center GNOME_STOCK_PIXMAP_ALIGN_CENTER)
  (justify GNOME_STOCK_PIXMAP_ALIGN_JUSTIFY)
  (bold GNOME_STOCK_PIXMAP_TEXT_BOLD)
  (italic GNOME_STOCK_PIXMAP_TEXT_ITALIC)
  (underline GNOME_STOCK_PIXMAP_TEXT_UNDERLINE)
  (strikeout GNOME_STOCK_PIXMAP_TEXT_STRIKEOUT)
  (text-indent GNOME_STOCK_PIXMAP_TEXT_INDENT)
  (text-unindent GNOME_STOCK_PIXMAP_TEXT_UNINDENT)
  (color-select GNOME_STOCK_PIXMAP_COLORSELECTOR)
  (add GNOME_STOCK_PIXMAP_ADD)
  (remove GNOME_STOCK_PIXMAP_REMOVE)
  (table-borders GNOME_STOCK_PIXMAP_TABLE_BORDERS)
  (table-fill GNOME_STOCK_PIXMAP_TABLE_FILL)
  (text-bulleted-list GNOME_STOCK_PIXMAP_TEXT_BULLETED_LIST)
  (text-numbered-list GNOME_STOCK_PIXMAP_TEXT_NUMBERED_LIST))


;; GnomeIconTextItem

(define-object GnomeIconTextItem (GnomeCanvasItem))

(define-func gnome_icon_text_item_configure
  none
  ((GnomeIconTextItem iti)
   (int x)
   (int y)
   (int width)
   (string fontname)
   (string text)
   (bool is_editable)
   (bool is_static)))

(define-func gnome_icon_text_item_setxy
  none
  ((GnomeIconTextItem iti)
   (int x)
   (int y)))

(define-func gnome_icon_text_item_select
  none
  ((GnomeIconTextItem iti)
   (bool sel)))

(define-func gnome_icon_text_item_get_text
  string
  ((GnomeIconTextItem iti)))

(define-func gnome_icon_text_item_stop_editing
  none
  ((GnomeIconTextItem iti)
   (bool accept)))


;; GnomeIconList

(define-object GnomeIconList (GnomeCanvas))

(define-enum GnomeIconListMode
  (icons GNOME_ICON_LIST_ICONS)
  (text-below GNOME_ICON_LIST_TEXT_BELOW)
  (text-right GNOME_ICON_LIST_TEXT_RIGHT))

(define-func gnome_icon_list_new
  GtkWidget
  ((uint icon_width)
   (GtkAdjustment adj)
   (int flags)))

(define-func gnome_icon_list_set_hadjustment
  none
  ((GnomeIconList gil)
   (GtkAdjustment hadj)))

(define-func gnome_icon_list_set_vadjustment
  none
  ((GnomeIconList gil)
   (GtkAdjustment vadj)))

(define-func gnome_icon_list_freeze
  none
  ((GnomeIconList gil)))

(define-func gnome_icon_list_thaw
  none
  ((GnomeIconList gil)))

(define-func gnome_icon_list_insert
  none
  ((GnomeIconList gil)
   (int pos)
   (string icon_filename)
   (string text)))

;(define-func gnome_icon_list_insert_imlib
;  none
;  ((GnomeIconList gil)
;   (int pos)
;   (GdkImlibImage im)
;   (string text)))

(define-func gnome_icon_list_append
  none
  ((GnomeIconList gil)
   (string icon_filename)
   (string text)))

;(define-func gnome_icon_list_append_imlib
;  none
;  ((GnomeIconList gil)
;   (GdkImlibImage im)
;   (string text)))

(define-func gnome_icon_list_clear
  none
  ((GnomeIconList gil)))

(define-func gnome_icon_list_remove
  none
  ((GnomeIconList gil)
   (int pos)))

(define-func gnome_icon_list_set_selection_mode
  none
  ((GnomeIconList gil)
   (GtkSelectionMode mode)))

(define-func gnome_icon_list_select_icon
  none
  ((GnomeIconList gil)
   (int idx)))

(define-func gnome_icon_list_unselect_icon
  none
  ((GnomeIconList gil)
   (int pos)))

(define-func gnome_icon_list_unselect_all
  none
  ((GnomeIconList gil)))

(define-func gnome_icon_list_set_row_spacing
  none
  ((GnomeIconList gil)
   (int pixels)))

(define-func gnome_icon_list_set_col_spacing
  none
  ((GnomeIconList gil)
   (int pixels)))

(define-func gnome_icon_list_set_text_spacing
  none
  ((GnomeIconList gil)
   (int pixels)))

(define-func gnome_icon_list_set_icon_border
  none
  ((GnomeIconList gil)
   (int pixels)))

(define-func gnome_icon_list_set_separators
  none
  ((GnomeIconList gil)
   (string sep)))

(define-func gnome_icon_list_moveto
  none
  ((GnomeIconList gil)
   (int pos)
   (double yalign (= "0.5"))))

(define-func gnome_icon_list_icon_is_visible
  GtkVisibility
  ((GnomeIconList gil)
   (int pos)))

(define-func gnome_icon_list_get_icon_at
  int
  ((GnomeIconList gil)
   (int x)
   (int y)))

(define-func gnome_icon_list_get_items_per_line
  int
  ((GnomeIconList gil)))


;; misc

(define-func sgtk_gnome_init
  bool
  ((string app_id)
   (string app_version))
  (scm-name "gnome-init"))



(options
 (includes "#include <gnome.h>")
 (includes "#include \"rep-gnome.h\"")
 (init-func "sgtk_gnome_init_gnomeui_glue"))
