;;; -*- scheme -*- ;;; gnome.defs - Export Gnome interfaces to Guile. ;;; ;;; Copyright (C) 1998 Tom Tromey ;;; ;;; 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-1.2.defs") ;; ;; 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. ;; ; (define-func gnome_config_get_string ; string ; ((string path))) ; (define-func gnome_config_get_string_with_default ; (string (values (def))) ; ((string path) (bool def))) ; (define-func gnome_config_get_translated_string ; string ; ((string path))) ; (define-func gnome_config_get_translated_string_with_default ; (string (values (def))) ; ((string path) (bool def))) ; (define-func gnome_config_get_int ; int ; ((string path))) ; (define-func gnome_config_get_int_with_default ; (int (values (def))) ; ((string path) (bool def))) ; (define-func gnome_config_get_bool ; bool ; ((string path))) ; (define-func gnome_config_get_bool_with_default ; (bool (values (def))) ; ((string path) (bool def))) ; (define-func gnome_config_get_float ; double ; ((string path))) ; (define-func gnome_config_get_float_with_default ; (double (values (def))) ; ((string path) (bool def))) ; (define-func gnome_config_get_vector ; (none (values (vect))) ; ((string path) ((cvec string) vect))) ; (define-func gnome_config_get_vector_with_default ; (none (values (vect def))) ; ((string path) ((cvec string) vect) (bool def))) ; (define-func gnome_config_private_get_string ; string ; ((string path))) ; (define-func gnome_config_private_get_string_with_default ; (string (values (def))) ; ((string path) (bool def))) ; (define-func gnome_config_private_get_translated_string ; string ; ((string path))) ; (define-func gnome_config_private_get_translated_string_with_default ; (string (values (def))) ; ((string path) (bool def))) ; (define-func gnome_config_private_get_int ; int ; ((string path))) ; (define-func gnome_config_private_get_int_with_default ; (int (values (def))) ; ((string path) (bool def))) ; (define-func gnome_config_private_get_bool ; bool ; ((string path))) ; (define-func gnome_config_private_get_bool_with_default ; (bool (values (def))) ; ((string path) (bool def))) ; (define-func gnome_config_private_get_float ; double ; ((string path))) ; (define-func gnome_config_private_get_float_with_default ; (double (values (def))) ; ((string path) (bool def))) ; (define-func gnome_config_private_get_vector ; (none (values (vect))) ; ((string path) ((cvec string) vect))) ; (define-func gnome_config_private_get_vector_with_default ; (none (values (vect def))) ; ((string path) ((cvec string) vect) (bool def))) ; (define-func gnome_config_set_string ; none ; ((string path) ; (string value))) ; (define-func gnome_config_set_translated_string ; none ; ((string path) ; (string value))) ; (define-func gnome_config_set_int ; none ; ((string path) ; (int value))) ; (define-func gnome_config_set_float ; none ; ((string path) ; (double value))) ; (define-func gnome_config_set_bool ; none ; ((string path) ; (bool value))) ; ;;(define-func gnome_config_set_vector ; ;; none ; ;; ((string path) ; ;; ((cvec string) values))) ; (define-func gnome_config_private_set_string ; none ; ((string path) ; (string value))) ; (define-func gnome_config_private_set_translated_string ; none ; ((string path) ; (string value))) ; (define-func gnome_config_private_set_int ; none ; ((string path) ; (int value))) ; (define-func gnome_config_private_set_float ; none ; ((string path) ; (double value))) ; (define-func gnome_config_private_set_bool ; none ; ((string path) ; (bool value))) ; ;;(define-func gnome_config_private_set_vector ; ;; none ; ;; ((string path) ; ;; ((cvec string) values))) ; ; (if gnome-config-typo ; ; () ; ; ((define-func gnome_config_has_section ; ; bool ; ; ((string Path))))) ; (define-func gnome_config_private_has_section ; bool ; ((string Path))) ; (define-func gnome_config_drop_all ; none ; ()) ; (define-func gnome_config_sync ; none ; ()) ; (define-func gnome_config_sync_file ; none ; ((string path))) ; (define-func gnome_config_private_sync_file ; none ; ((string path))) ; (define-func gnome_config_drop_file ; none ; ((string path))) ; (define-func gnome_config_private_drop_file ; none ; ((string path))) ; (define-func gnome_config_clean_file ; none ; ((string path))) ; (define-func gnome_config_private_clean_file ; none ; ((string path))) ; (define-func gnome_config_clean_section ; none ; ((string path))) ; ; (if gnome-config-typo ; ; () ; ; ((define-func gnome_config_private_clean_section ; ; none ; ; ((string path))))) ; (define-func gnome_config_clean_key ; none ; ((string path))) ; (define-func gnome_config_private_clean_key ; none ; ((string path))) ; (define-func gnome_config_get_real_path ; string ; ((string path))) ; (define-func gnome_config_private_get_real_path ; string ; ((string path))) ; (define-func gnome_config_push_prefix ; none ; ((string path))) ; (define-func gnome_config_pop_prefix ; none ; ()) ; ;;(define-func gnome_config_make_vector ; ;; (none (values (vect))) ; ;; ((string val) ((cvec string) vect))) ; ;;(define-func gnome_config_assemble_vector ; ;; string ; ;; (((cvec string) vect))) ; ;; gnome-animator ; (define-object GnomeAnimator (GtkWidget)) ; (define-enum GnomeAnimatorStatus ; (stopped GNOME_ANIMATOR_STATUS_STOPPED) ; (running GNOME_ANIMATOR_STATUS_RUNNING)) ; (define-enum GnomeAnimatorLoopType ; (none GNOME_ANIMATOR_LOOP_NONE) ; (restart GNOME_ANIMATOR_LOOP_RESTART) ; (ping-pong GNOME_ANIMATOR_LOOP_PING_PONG)) ; (define-func gnome_animator_new_with_size ; GtkWidget ; ((uint width) ; (uint height))) ; (define-func gnome_animator_set_loop_type ; none ; ((GnomeAnimator animator) ; (GnomeAnimatorLoopType loop_type))) ; (define-func gnome_animator_get_loop_type ; GnomeAnimatorLoopType ; ((GnomeAnimator animator))) ; (define-func gnome_animator_set_playback_direction ; none ; ((GnomeAnimator animator) ; (int playback_direction))) ; (define-func gnome_animator_get_playback_direction ; int ; ((GnomeAnimator animator))) ; ;;(define-func gnome_animator_append_frame_from_imlib_at_size ; ;; bool ; ;; ((GnomeAnimator animator) ; ;; (GdkImlibImage image) ; ;; (int x-offset) ; ;; (int y-offset) ; ;; (uint interval) ; ;; (uint width) ; ;; (uint height))) ; ;;(define-func gnome_animator_append_frame_from_imlib ; ;; bool ; ;; ((GnomeAnimator animator) ; ;; (GdkImlibImage image) ; ;; (int x-offset) ; ;; (int y-offset) ; ;; (uint interval))) ; (define-func gnome_animator_append_frame_from_file_at_size ; bool ; ((GnomeAnimator animator) ; (string name) ; (int x_offset) ; (int y_offset) ; (uint interval) ; (uint width) ; (uint height))) ; ;; ; ;; gnome-dentry ; ;; ; (define-boxed GnomeDesktopEntry ; (copy gnome_desktop_entry_copy) ; (free gnome_desktop_entry_destroy)) ; (define-func gnome_desktop_entry_load ; GnomeDesktopEntry ; ((string file))) ; (define-func gnome_desktop_entry_load_flags ; GnomeDesktopEntry ; ((string file) (bool clean))) ; (define-func gnome_desktop_entry_load_flags_conditional ; GnomeDesktopEntry ; ((string file) (bool clean) (bool uncond))) ; (define-func gnome_desktop_entry_load_unconditional ; GnomeDesktopEntry ; ((string file))) ; (define-func gnome_desktop_entry_save ; none ; ((GnomeDesktopEntry entry))) ; (define-func gnome_desktop_entry_launch ; none ; ((GnomeDesktopEntry item))) ; (define-func gnome_desktop_entry_launch_with_args ; none ; ((GnomeDesktopEntry item) ; ((cvec string) args))) ; (define-func gnome_is_program_in_path ; string ; ((string program))) ; ;; ; ;; gnome-exec ; ;; Yes, I know it probably duplicates some Guile functionality, but in an ; ;; extension language, things don't have to be doable just one way. :) ; ;; ; (define-func gnome_execute_async ; int ; ((string dir) ; ((cvec string) args))) ; (define-func gnome_execute_async_fds ; int ; ((string dir) ((cvec string) args) (bool close_fds))) ; (define-func gnome_execute_async_with_env ; int ; ((string dir) ((cvec string) args) ((cvec string) env))) ; (define-func gnome_execute_async_with_env_fds ; int ; ((string dir) ((cvec string) args) ((cvec string) env) (bool close_fds))) ; (define-func gnome_execute_shell ; int ; ((string dir) (string command))) ; (define-func gnome_execute_shell_fds ; int ; ((string dir) (string command) (bool close_fds))) ; ;; ; ;; 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 file))) ; (define-func gnome_help_file_path ; string ; ((string app) (string file))) ; (define-func gnome_help_goto_file ; none ; ((string path))) ; ;; ; ;; 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_statusbar_custom ; none ; ((GnomeApp app) ; (GtkWidget container) ; (GtkWidget statusbar))) ; (define-func gnome_app_set_contents ; none ; ((GnomeApp app) ; (GtkWidget contents))) ; (define-enum GnomeDockItemBehavior ; (normal GNOME_DOCK_ITEM_BEH_NORMAL) ; (exclusive GNOME_DOCK_ITEM_BEH_EXCLUSIVE) ; (floating GNOME_DOCK_ITEM_BEH_NEVER_FLOATING) ; (vertical GNOME_DOCK_ITEM_BEH_NEVER_VERTICAL) ; (horizontal GNOME_DOCK_ITEM_BEH_NEVER_HORIZONTAL) ; (locked GNOME_DOCK_ITEM_BEH_LOCKED)) ; (define-enum GnomeDockPlacement ; (top GNOME_DOCK_TOP) ; (right GNOME_DOCK_RIGHT) ; (bottom GNOME_DOCK_BOTTOM) ; (left GNOME_DOCK_LEFT) ; (floating GNOME_DOCK_FLOATING)) ; (define-func gnome_app_add_toolbar ; none ; ((GnomeApp app) ; (GtkToolbar toolbar) ; (string name) ; (GnomeDockItemBehavior behavior) ; (GnomeDockPlacement placement) ; (int band_num) ; (int band_position) ; (int offset))) ; (define-func gnome_app_add_docked ; none ; ((GnomeApp app) ; (GtkWidget widget) ; (string name) ; (GnomeDockItemBehavior behavior) ; (GnomeDockPlacement placement) ; (int band_num) ; (int band_position) ; (int offset))) ; (define-object GnomeDockItem (GtkObject) ; ;; FIXME: no contents ; ) ; (define-object GnomeDock (GtkContainer) ; ;; FIXME: no contents ; ) ; (define-func gnome_app_add_dock_item ; none ; ((GnomeApp app) ; (GnomeDockItem item) ; (GnomeDockPlacement placement) ; (int band_num) ; (int band_position) ; (int offset))) ; (define-func gnome_app_enable_layout_config ; none ; ((GnomeApp app) ; (bool enable))) ; (define-func gnome_app_get_dock ; GnomeDock ; ((GnomeApp app))) ; (define-func gnome_app_get_dock_item_by_name ; GnomeDockItem ; ((GnomeApp app) (string name))) ; ;; GnomeDialog ; (define-object GnomeDialog (GtkWindow)) ; ;;(define-func gnome_dialog_newv ; ;; GtkWidget ; ;; ((string title) ; ;; ((cvec string) buttons))) ; (define-func gnome_dialog_run ; int ; ((GnomeDialog dialog))) ; (define-func gnome_dialog_run_and_close ; int ; ((GnomeDialog dialog))) ; (define-func gnome_dialog_set_default ; none ; ((GnomeDialog dialog) ; (int button))) ; (define-func gnome_dialog_close ; none ; ((GnomeDialog dialog))) ; (define-func gnome_dialog_close_hides ; none ; ((GnomeDialog dialog) ; (bool just_hide))) ; (define-func gnome_dialog_editable_enters ; none ; ((GnomeDialog dialog) ; (GtkEditable editable))) ; (define-func gnome_dialog_append_button ; none ; ((GnomeDialog dialog) ; (string name))) ; ;;(define-func gnome_dialog_append_buttonsv ; ;; none ; ;; ((GnomeDialog dialog) ; ;; ((fvec string) buttons))) ; ;; GnomeAbout ; (define-object GnomeAbout (GnomeDialog)) ; ;;(define-func gnome_about_new ; ;; GtkWidget ; ;; ((string title) ; ;; (string version) ; ;; (string copyright) ; ;; ((cvec string) authors) ; ;; (string comments) ; ;; (string logo))) ; ;;(define-func gnome_about_construct ; ;; none ; ;; ((GnomeAbout about) ; ;; (string title) ; ;; (string version) ; ;; (string copyright) ; ;; ((cvec string) authors) ; ;; (string comments) ; ;; (string logo))) ; ;; GnomeCalculator ; (define-object GnomeCalculator (GtkVBox)) ; (define-func gnome_calculator_new ; GtkWidget ; ()) ; (define-func gnome_calculator_clear ; none ; ((GnomeCalculator gc) ; (bool reset))) ; (define-func gnome_calculator_set ; none ; ((GnomeCalculator gc) ; (float result))) ; ;; GtkClock ; (define-object GtkClock (GtkLabel)) ; (define-enum GtkClockType ; (increasing GTK_CLOCK_INCREASING) ; (decreasing GTK_CLOCK_DECREASING) ; (realtime GTK_CLOCK_REALTIME)) ; (define-func gtk_clock_new ; GtkWidget ; ((GtkClockType type))) ; (define-func gtk_clock_set_format ; none ; ((GtkClock glock) ; (string fmt))) ; (define-func gtk_clock_set_seconds ; none ; ((GtkClock gclock) ; (int seconds))) ; (define-func gtk_clock_set_update_interval ; none ; ((GtkClock gclock) ; (int seconds))) ; (define-func gtk_clock_start ; none ; ((GtkClock gclock))) ; (define-func gtk_clock_stop ; none ; ((GtkClock gclock))) ; ;; ; ;; 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-entry ; (define-object GnomeEntry (GtkCombo)) ; (define-func gnome_entry_new ; GtkWidget ; ((string history_id))) ; (define-func gnome_entry_gtk_entry ; GtkWidget ; ((GnomeEntry gentry))) ; (define-func gnome_entry_set_history_id ; none ; ((GnomeEntry gentry) ; (string history_id))) ; (define-func gnome_entry_set_max_saved ; none ; ((GnomeEntry gentry) ; (uint max_saved))) ; (define-func gnome_entry_prepend_history ; none ; ((GnomeEntry gentry) ; (int save) ; (string text))) ; (define-func gnome_entry_append_history ; none ; ((GnomeEntry gentry) ; (int save) ; (string text))) ; (define-func gnome_entry_load_history ; none ; ((GnomeEntry gentry))) ; (define-func gnome_entry_save_history ; none ; ((GnomeEntry gentry))) ; ;; gnome-dateedit.h ; (define-object GnomeDateEdit (GtkHBox)) ; (define-enum GnomeDateEditFlag ; (show-time GNOME_DATE_EDIT_SHOW_TIME) ; (24-hr GNOME_DATE_EDIT_24_HR) ; (on-monday GNOME_DATE_EDIT_WEEK_STARTS_ON_MONDAY)) ; (define-func gnome_date_edit_new ; GtkWidget ; ((int the_time) ; (int show_time) ; (int use_24_format))) ; ;;(define-func gnome_date_edit_new_flags ; ;; GtkWidget ; ;; ((int the_time) ; ;; (GnomeDateEditFlags flags))) ; (define-func gnome_date_edit_set_time ; none ; ((GnomeDateEdit gde) ; (int the_time))) ; (define-func gnome_date_edit_set_popup_range ; none ; ((GnomeDateEdit gde) ; (int low_hour) ; (int up_hour))) ; (define-func gnome_date_edit_get_date ; int ; ((GnomeDateEdit gde))) ; ;;(define-func gnome_date_edit_set_flags ; ;; none ; ;; ((GnomeDateEdit gde) ; ;; (GnomeDateEditFlags flags))) ; (define-func gnome_date_edit_get_flags ; int ; ((GnomeDateEdit gde))) ; ;; GnomeDentry ; (define-object GnomeDEntryEdit (GtkObject) ; (fields ; (GtkWidget child1) ; (GtkWidget child2))) ; (define-func gnome_dentry_edit_new ; GtkObject ; ()) ; (define-func gnome_dentry_edit_new_notebook ; GtkObject ; ((GtkNotebook notebook))) ; (define-func gnome_dentry_edit_clear ; none ; ((GnomeDEntryEdit dee))) ; (define-func gnome_dentry_edit_load_file ; none ; ((GnomeDEntryEdit dee) ; (string path))) ; (define-func gnome_dentry_edit_set_dentry ; none ; ((GnomeDEntryEdit dee) ; (GnomeDesktopEntry dentry))) ; (define-func gnome_dentry_edit_get_dentry ; GnomeDesktopEntry ; ((GnomeDEntryEdit dee))) ; (define-func gnome_dentry_get_dentry ; GnomeDesktopEntry ; ((GnomeDEntryEdit dee))) ; (define-func gnome_dentry_edit_get_icon ; string ; ((GnomeDEntryEdit dee))) ; (define-func gnome_dentry_edit_get_name ; string ; ((GnomeDEntryEdit dee))) ; (define-func gnome_dentry_get_name_entry ; GtkWidget ; ((GnomeDEntryEdit dee))) ; (define-func gnome_dentry_get_comment_entry ; GtkWidget ; ((GnomeDEntryEdit dee))) ; (define-func gnome_dentry_get_exec_entry ; GtkWidget ; ((GnomeDEntryEdit dee))) ; (define-func gnome_dentry_get_tryexec_entry ; GtkWidget ; ((GnomeDEntryEdit dee))) ; (define-func gnome_dentry_get_doc_entry ; GtkWidget ; ((GnomeDEntryEdit dee))) ; (define-func gnome_dentry_get_icon_entry ; GtkWidget ; ((GnomeDEntryEdit dee))) ; ;; ; ;; Stock widgets. ; ;; ; (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-func gnome_stock_button ; GtkWidget ; ((GnomeStockButtonNameType type))) ; (define-func gnome_stock_or_ordinary_button ; GtkWidget ; ((GnomeStockButtonNameType type))) ; (define-func gnome_stock_menu_item ; GtkWidget ; ((GnomeStockMenuNameType type) ; (string text))) ; ;; ; ;; Messagebox. ; ;; ; (define-object GnomeMessageBox (GtkWindow) ; ;; FIXME: can't represent contents. ; ) ; ; gnome_message_box_new ; (define-func gnome_message_box_set_modal ; none ; ((GnomeMessageBox message_box))) ; (define-func gnome_message_box_set_default ; none ; ((GnomeMessageBox message_box) ; (int button))) ; ;; ; ;; Property box. ; ;; ; (define-object GnomePropertyBox (GtkWindow) ; (fields ; (GtkWidget notebook) ; (GtkWidget ok_button) ; (GtkWidget apply_button) ; (GtkWidget cancel_button) ; (GtkWidget help_button) ; ;; FIXME: can't represent `items'. ; ) ; ) ; (define-func gnome_property_box_new ; GtkWidget ; ()) ; (define-func gnome_property_box_changed ; none ; ((GnomePropertyBox box))) ; (define-func gnome_property_box_append_page ; int ; ((GnomePropertyBox box) ; (GtkWidget child) ; (GtkWidget tab_label))) ; ;; ; ;; Client code. ; ;; 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_cloned_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))) ; ; 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))) ; (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))) ;; Canvas (define-object GnomeCanvas (GtkContainer)) (define-object GnomeCanvasItem (GtkObject) (fields (GnomeCanvas canvas) (GnomeCanvasItem parent) (int x1) (int y1) (int x2) (int y2))) (define-object GnomeCanvasGroup (GnomeCanvasItem)) ;; XXX - build-guile-gtk needs varargs and GtkType to support these. ;; For now, there are `hand tweaked' versions in gnomeg.c ;;(define-func gnome_canvas_item_new ;; GnomeCanvasItem ;; ((GnomeCanvas canvas) ;; (GnomeCanvasGroup group) ;; (GtkType type) ;; (args ...))) ;;(define-func gnome_canvas_item_set ;; none ;; ((GnomeCanvasItem item) ;; (args ...))) (define-func gnome_canvas_item_raise none ((GnomeCanvasItem item) (int positions))) (define-func gnome_canvas_item_move none ((GnomeCanvasItem canvas) (double dx) (double dy))) (define-func gnome_canvas_item_scale_scm none ((GnomeCanvasItem item) (double sx) (double sy))) (define-func gnome_canvas_item_rotate_scm none ((GnomeCanvasItem item) (double angle))) (define-func gnome_canvas_item_show none ((GnomeCanvasItem item))) (define-func gnome_canvas_item_hide none ((GnomeCanvasItem item))) (define-func gdk_imlib_get_visual GdkVisual ()) (define-func gdk_imlib_get_colormap GdkColormap ()) (define-func gnome_canvas_new GtkWidget ()) (define-func gnome_canvas_root GnomeCanvasGroup ((GnomeCanvas canvas))) (define-func gnome_canvas_update_now none ((GnomeCanvas canvas))) (define-func gnome_canvas_set_pixels_per_unit none ((GnomeCanvas canvas) (double n))) (define-object GnomeCanvasRE (GnomeCanvasItem)) (define-object GnomeCanvasRect (GnomeCanvasRE)) (define-object GnomeCanvasEllipse (GnomeCanvasRE)) (define-boxed GnomeCanvasPoints (copy gnome_canvas_points_ref) (free gnome_canvas_points_unref)) (add-options GnomeCanvasPoints (conversion "sgnome_canvas_points_conversion")) (define-func gnome_canvas_points_from_coords (GnomeCanvasPoints (copy #f)) (((cvec double) coords))) (define-func gnome_canvas_points_intern GnomeCanvasPoints ((GnomeCanvasPoints points))) (define-object GnomeCanvasLine (GnomeCanvasItem)) (define-object GnomeCanvasText (GnomeCanvasItem)) (define-object GnomeCanvasWidget (GnomeCanvasItem)) ;;; app helper ;; C support routines are in gnomeg.c (define-enum GnomeUIInfoType (item GNOME_APP_UI_ITEM) (toggleitem GNOME_APP_UI_TOGGLEITEM) (radioitems GNOME_APP_UI_RADIOITEMS) (subtree GNOME_APP_UI_SUBTREE) (separator GNOME_APP_UI_SEPARATOR) (help GNOME_APP_UI_HELP) (configurable GNOME_APP_UI_ITEM_CONFIGURABLE) (subtree-stock GNOME_APP_UI_SUBTREE_STOCK)) (define-enum GnomeUIInfoConfigurableTypes (new GNOME_APP_CONFIGURABLE_ITEM_NEW) (open GNOME_APP_CONFIGURABLE_ITEM_OPEN) (save GNOME_APP_CONFIGURABLE_ITEM_SAVE) (save-as GNOME_APP_CONFIGURABLE_ITEM_SAVE_AS) (revert GNOME_APP_CONFIGURABLE_ITEM_REVERT) (print GNOME_APP_CONFIGURABLE_ITEM_PRINT) (print-setup GNOME_APP_CONFIGURABLE_ITEM_PRINT_SETUP) (close GNOME_APP_CONFIGURABLE_ITEM_CLOSE) (exit GNOME_APP_CONFIGURABLE_ITEM_EXIT) (cut GNOME_APP_CONFIGURABLE_ITEM_CUT) (copy GNOME_APP_CONFIGURABLE_ITEM_COPY) (paste GNOME_APP_CONFIGURABLE_ITEM_PASTE) (clear GNOME_APP_CONFIGURABLE_ITEM_CLEAR) (undo GNOME_APP_CONFIGURABLE_ITEM_UNDO) (redo GNOME_APP_CONFIGURABLE_ITEM_REDO) (find GNOME_APP_CONFIGURABLE_ITEM_FIND) (find-again GNOME_APP_CONFIGURABLE_ITEM_FIND_AGAIN) (replace GNOME_APP_CONFIGURABLE_ITEM_REPLACE) (properties GNOME_APP_CONFIGURABLE_ITEM_PROPERTIES) (preferences GNOME_APP_CONFIGURABLE_ITEM_PREFERENCES) (about GNOME_APP_CONFIGURABLE_ITEM_ABOUT) (select-all GNOME_APP_CONFIGURABLE_ITEM_SELECT_ALL) (new-window GNOME_APP_CONFIGURABLE_ITEM_NEW_WINDOW) (close-window GNOME_APP_CONFIGURABLE_ITEM_CLOSE_WINDOW) (new-game GNOME_APP_CONFIGURABLE_ITEM_NEW_GAME) (pause-game GNOME_APP_CONFIGURABLE_ITEM_PAUSE_GAME) (restart-game GNOME_APP_CONFIGURABLE_ITEM_RESTART_GAME) (undo-move GNOME_APP_CONFIGURABLE_ITEM_UNDO_MOVE) (redo-move GNOME_APP_CONFIGURABLE_ITEM_REDO_MOVE) (hint GNOME_APP_CONFIGURABLE_ITEM_HINT) (scores GNOME_APP_CONFIGURABLE_ITEM_SCORES) (end-game GNOME_APP_CONFIGURABLE_ITEM_END_GAME)) (define-object GnomeUIInfos (GtkData)) (add-options GnomeUIInfos (conversion "sgnome_uiinfos_conversion")) (define-func gnome_uiinfos_intern GnomeUIInfos ((GnomeUIInfos desc))) ;;(define-func gnome_uiinfos_get_widgets SCM ((GnomeUIInfos desc))) ; (define-func gnome_app_create_menus_from_uiinfos ; none ; ((GnomeApp app) ; (GnomeUIInfos desc)) ; (scm-name "gnome-app-create-menus")) ;;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_new_flags ; GtkWidget ; ((uint icon_width) ; (GtkAdjustment adj) ; (int flags))) ; (define-func gnome_icon_list_construct ; none ; ((GnomeIconList gil) ; (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 ; ;; ((GnomeIconList gil) ; ;; (int pos) ; ;; (GdkImlibImage im) ; ;; (string text))) ; (define-func gnome_icon_list_append ; int ; ((GnomeIconList gil) ; (string icon_filename) ; (string text))) ; ;(define-func gnome_icon_list_append_imlib ; ; int ; ; ((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))) (options (includes "#include " "#include " "#include \"gnome-canvas-support.h\"") (init-func "gnome_init_guile_glue") (libs "-lguilegnome") (extra-init-code "gnome_init_guile_support ();")) ; ;; ; ;; Cauldron ; ;; ; (define-flags GtkCauldronOptions ; (toplevel GTK_CAULDRON_TOPLEVEL) ; (dialog GTK_CAULDRON_DIALOG) ; (popup GTK_CAULDRON_POPUP) ; (space1 GTK_CAULDRON_SPACE1) ; (space2 GTK_CAULDRON_SPACE2) ; (space3 GTK_CAULDRON_SPACE3) ; (space4 GTK_CAULDRON_SPACE4) ; (space5 GTK_CAULDRON_SPACE5) ; (space6 GTK_CAULDRON_SPACE6) ; (space7 GTK_CAULDRON_SPACE7) ; (space8 GTK_CAULDRON_SPACE8) ; (space9 GTK_CAULDRON_SPACE9) ; (space10 GTK_CAULDRON_SPACE10) ; (space11 GTK_CAULDRON_SPACE11) ; (space12 GTK_CAULDRON_SPACE12) ; (space13 GTK_CAULDRON_SPACE13) ; (space14 GTK_CAULDRON_SPACE14) ; (space15 GTK_CAULDRON_SPACE15) ; (ignoreescape GTK_CAULDRON_IGNOREESCAPE) ; (ignoreenter GTK_CAULDRON_IGNOREENTER) ; (grab GTK_CAULDRON_GRAB))