1 ;;; gnome-widgets.el --- Import GNOME functions into XEmacs
3 ;; Copyright (C) 2000 Free Software Foundation
5 ;; Maintainer: William Perry <wmperry@gnu.org>
6 ;; Keywords: extensions, dumped
8 ;; This file is part of XEmacs.
10 ;; XEmacs is free software; you can redistribute it and/or modify it
11 ;; under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; XEmacs is distributed in the hope that it will be useful, but
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ;; General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with XEmacs; see the file COPYING. If not, write to the Free
22 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
25 ;;; Synched up with: Not in FSF
29 ;; This file is dumped with XEmacs.
34 (gtk-import-function GtkType gnome_about_get_type)
35 (gtk-import-function GtkWidget gnome_about_new
38 (GtkString . copyright)
39 (GtkArrayOfString . authors)
40 (GtkString . comments)
44 (gtk-import-function GtkType gnome_app_get_type)
46 ;; Create a new (empty) application window. You must specify the
47 ;; application's name (used internally as an identifier). The window
48 ;; title can be left as NULL, in which case the window's title will
50 (gtk-import-function GtkWidget gnome_app_new
54 ;; Constructor for language bindings; you don't normally need this.
55 (gtk-import-function nil gnome_app_construct
60 ;; Sets the menu bar of the application window
61 (gtk-import-function nil gnome_app_set_menus
63 (GtkMenuBar . menubar))
65 ;; Sets the main toolbar of the application window
66 (gtk-import-function nil gnome_app_set_toolbar
68 (GtkToolbar . toolbar))
70 ;; Sets the status bar of the application window
71 (gtk-import-function nil gnome_app_set_statusbar
73 (GtkWidget . statusbar))
75 ;; Sets the status bar of the application window, but uses the given
76 ;; container widget rather than creating a new one.
77 (gtk-import-function nil gnome_app_set_statusbar_custom
79 (GtkWidget . container)
80 (GtkWidget . statusbar))
82 ;; Sets the content area of the application window
83 (gtk-import-function nil gnome_app_set_contents
85 (GtkWidget . contents))
87 (gtk-import-function nil gnome_app_add_toolbar
89 (GtkToolbar . toolbar)
91 (GnomeDockItemBehavior . behavior)
92 (GnomeDockPlacement . placement)
94 (gint . band_position)
97 (gtk-import-function nil gnome_app_add_docked
101 (GnomeDockItemBehavior . behavior)
102 (GnomeDockPlacement . placement)
104 (gint . band_position)
107 (gtk-import-function nil gnome_app_add_dock_item
109 (GnomeDockItem . item)
110 (GnomeDockPlacement . placement)
112 (gint . band_position)
115 (gtk-import-function nil gnome_app_enable_layout_config
119 (gtk-import-function GnomeDock gnome_app_get_dock
121 (gtk-import-function GnomeDockItem gnome_app_get_dock_item_by_name
126 (gtk-import-function GtkType gnome_appbar_get_type)
128 (gtk-import-function GtkWidget gnome_appbar_new
129 (gboolean . has_progress)
130 (gboolean . has_status)
131 (GnomePreferencesType . interactivity))
133 ;; Sets the status label without changing widget state; next set or push
134 ;; will destroy this permanently.
135 (gtk-import-function nil gnome_appbar_set_status
136 (GnomeAppBar . appbar)
137 (GtkString . status))
139 ;; What to show when showing nothing else; defaults to nothing
140 (gtk-import-function nil gnome_appbar_set_default
141 (GnomeAppBar . appbar)
142 (GtkString . default_status))
144 (gtk-import-function nil gnome_appbar_push
145 (GnomeAppBar . appbar)
146 (GtkString . status))
148 ;; OK to call on empty stack
149 (gtk-import-function nil gnome_appbar_pop
150 (GnomeAppBar . appbar))
153 (gtk-import-function nil gnome_appbar_clear_stack
154 (GnomeAppBar . appbar))
156 ;; pure sugar - with a bad name, in light of the get_progress name
157 ;; which is not the opposite of set_progress. Maybe this function
159 (gtk-import-function nil gnome_appbar_set_progress
160 (GnomeAppBar . appbar)
161 (gfloat . percentage))
163 ;; use GtkProgress functions on returned value
164 (gtk-import-function GtkProgress gnome_appbar_get_progress
165 (GnomeAppBar . appbar))
167 ;; Reflect the current state of stack/default. Useful to force a set_status
169 (gtk-import-function nil gnome_appbar_refresh
170 (GnomeAppBar . appbar))
172 ;; Put a prompt in the appbar and wait for a response. When the
173 ;; user responds or cancels, a user_response signal is emitted.
174 (gtk-import-function nil gnome_appbar_set_prompt
175 (GnomeAppBar . appbar)
180 (gtk-import-function nil gnome_appbar_clear_prompt
181 (GnomeAppBar . appbar))
183 ;; Get the response to the prompt, if any. Result must be g_free'd.
184 (gtk-import-function GtkString gnome_appbar_get_response
185 (GnomeAppBar . appbar))
188 (gtk-import-function GtkType gnome_calculator_get_type)
189 (gtk-import-function GtkWidget gnome_calculator_new)
190 (gtk-import-function nil gnome_calculator_clear
191 (GnomeCalculator . gc)
194 (gtk-import-function nil gnome_calculator_set
195 (GnomeCalculator . gc)
199 ;; Standard Gtk function
200 (gtk-import-function GtkType gnome_color_picker_get_type)
202 ;; Creates a new color picker widget
203 (gtk-import-function GtkWidget gnome_color_picker_new)
205 ;; Set/get the color in the picker. Values are in [0.0, 1.0]
206 (gtk-import-function nil gnome_color_picker_set_d
207 (GnomeColorPicker . cp)
213 ;; #### BILL!!! Need multiple return values
214 ;; void gnome_color_picker_get_d (GnomeColorPicker *cp, gdouble *r, gdouble *g, gdouble *b, gdouble *a)
216 ;; Set/get the color in the picker. Values are in [0, 255]
217 (gtk-import-function nil gnome_color_picker_set_i8
218 (GnomeColorPicker . cp)
224 ;; #### BILL!!! Need multiple return values
225 ;; void gnome_color_picker_get_i8 (GnomeColorPicker *cp, guint8 *r, guint8 *g, guint8 *b, guint8 *a);
227 ;; Set/get the color in the picker. Values are in [0, 65535]
228 (gtk-import-function nil gnome_color_picker_set_i16
229 (GnomeColorPicker . cp)
235 ;; #### BILL!!! Need multiple return values
236 ;; void gnome_color_picker_get_i16 (GnomeColorPicker *cp, gushort *r, gushort *g, gushort *b, gushort *a);
238 ;; Sets whether the picker should dither the color sample or just paint a solid rectangle
239 (gtk-import-function nil gnome_color_picker_set_dither
240 (GnomeColorPicker . cp)
243 ;; Sets whether the picker should use the alpha channel or not
244 (gtk-import-function nil gnome_color_picker_set_use_alpha
245 (GnomeColorPicker . cp)
246 (gboolean . use_alpha))
248 ;; Sets the title for the color selection dialog
249 (gtk-import-function nil gnome_color_picker_set_title
250 (GnomeColorPicker . cp)
254 (gtk-import-function GtkType gnome_date_edit_get_type)
255 (gtk-import-function GtkWidget gnome_date_edit_new
257 (gboolean . show_time)
258 (gboolean . use_24_format))
260 (gtk-import-function GtkWidget gnome_date_edit_new_flags
262 (GnomeDateEditFlags . flags))
264 (gtk-import-function nil gnome_date_edit_set_time
265 (GnomeDateEdit . gde)
268 (gtk-import-function nil gnome_date_edit_set_popup_range
269 (GnomeDateEdit . gde)
273 (gtk-import-function 'time_t gnome_date_edit_get_date
274 (GnomeDateEdit . gde))
276 (gtk-import-function nil gnome_date_edit_set_flags
277 (GnomeDateEdit . gde)
278 (GnomeDateEditFlags . flags))
280 (gtk-import-function GnomeDateEditFlags gnome_date_edit_get_flags
281 (GnomeDateEdit . gde))
284 (gtk-import-function GtkType gnome_dentry_edit_get_type)
286 ;; create a new dentry and get the children using the below macros
287 ;; or use the utility new_notebook below
288 (gtk-import-function GtkObject gnome_dentry_edit_new)
290 ;;#define gnome_dentry_edit_child1(d) (GNOME_DENTRY_EDIT(d)->child1)
291 ;;#define gnome_dentry_edit_child2(d) (GNOME_DENTRY_EDIT(d)->child2)
293 ;; Create a new edit in this notebook - appends two pages to the
295 (gtk-import-function GtkObject gnome_dentry_edit_new_notebook
296 (GtkNotebook . notebook))
298 (gtk-import-function nil gnome_dentry_edit_clear
299 (GnomeDEntryEdit . dee))
301 ;; The GnomeDEntryEdit does not store a dentry, and it does not keep
302 ;; track of the location field of GnomeDesktopEntry which will always
305 ;; Make the display reflect dentry at path
306 (gtk-import-function nil gnome_dentry_edit_load_file
307 (GnomeDEntryEdit . dee)
310 ;; Copy the contents of this dentry into the display
311 '(gtk-import-function nil gnome_dentry_edit_set_dentry
312 (GnomeDEntryEdit . dee)
313 (GnomeDesktopEntry . dentry))
315 ;; Generate a dentry based on the contents of the display
316 '(gtk-import-function GnomeDesktopEntry gnome_dentry_edit_get_dentry
317 (GnomeDEntryEdit . dee))
319 ;; Return an allocated string, you need to g_free it.
320 (gtk-import-function GtkString gnome_dentry_edit_get_icon
321 (GnomeDEntryEdit . dee))
322 (gtk-import-function GtkString gnome_dentry_edit_get_name
323 (GnomeDEntryEdit . dee))
325 ;; These are accessor functions for the widgets that make up the
326 ;; GnomeDEntryEdit widget.
327 (gtk-import-function GtkWidget gnome_dentry_get_name_entry (GnomeDEntryEdit . dee))
328 (gtk-import-function GtkWidget gnome_dentry_get_comment_entry (GnomeDEntryEdit . dee))
329 (gtk-import-function GtkWidget gnome_dentry_get_exec_entry (GnomeDEntryEdit . dee))
330 (gtk-import-function GtkWidget gnome_dentry_get_tryexec_entry (GnomeDEntryEdit . dee))
331 (gtk-import-function GtkWidget gnome_dentry_get_doc_entry (GnomeDEntryEdit . dee))
332 (gtk-import-function GtkWidget gnome_dentry_get_icon_entry (GnomeDEntryEdit . dee))
335 ;; The GtkWidget * return values were added in retrospect; sometimes
336 ;; you might want to connect to the "close" signal of the dialog, or
337 ;; something, the return value makes the functions more
338 ;; flexible. However, there is nothing especially guaranteed about
339 ;; these dialogs except that they will be dialogs, so don't count on
343 (gtk-import-function GtkWidget gnome_ok_dialog (GtkString . message))
344 (gtk-import-function GtkWidget gnome_ok_dialog_parented
345 (GtkString . message)
346 (GtkWindow . parent))
348 ;; Operation failed fatally. In an OK dialog.
349 (gtk-import-function GtkWidget gnome_error_dialog '(GtkString . error))
350 (gtk-import-function GtkWidget gnome_error_dialog_parented
352 (GtkWindow . parent))
355 (gtk-import-function GtkWidget gnome_warning_dialog '(GtkString . warning))
356 (gtk-import-function GtkWidget gnome_warning_dialog_parented
357 (GtkString . warning)
358 (GtkWindow . parent))
360 ;;;/* Look in gnome-types.h for the callback types. */
362 ;;;/* Ask a yes or no question, and call the callback when it's answered. */
363 ;;;GtkWidget * gnome_question_dialog (const gchar * question,
364 ;;; GnomeReplyCallback callback,
367 ;;;GtkWidget * gnome_question_dialog_parented (const gchar * question,
368 ;;; GnomeReplyCallback callback,
370 ;;; GtkWindow * parent);
372 ;;;GtkWidget * gnome_question_dialog_modal (const gchar * question,
373 ;;; GnomeReplyCallback callback,
376 ;;;GtkWidget * gnome_question_dialog_modal_parented (const gchar * question,
377 ;;; GnomeReplyCallback callback,
379 ;;; GtkWindow * parent);
382 ;;;/* OK-Cancel question. */
383 ;;;GtkWidget * gnome_ok_cancel_dialog (const gchar * message,
384 ;;; GnomeReplyCallback callback,
387 ;;;GtkWidget * gnome_ok_cancel_dialog_parented (const gchar * message,
388 ;;; GnomeReplyCallback callback,
390 ;;; GtkWindow * parent);
392 ;;;GtkWidget * gnome_ok_cancel_dialog_modal (const gchar * message,
393 ;;; GnomeReplyCallback callback,
396 ;;;GtkWidget * gnome_ok_cancel_dialog_modal_parented (const gchar * message,
397 ;;; GnomeReplyCallback callback,
399 ;;; GtkWindow * parent);
402 (gtk-import-function GtkType gnome_file_entry_get_type)
403 (gtk-import-function GtkWidget gnome_file_entry_new
404 (GtkString . history_id)
405 (GtkString . browse_dialog_title))
407 (gtk-import-function nil gnome_file_entry_construct
408 (GnomeFileEntry . fentry)
409 (GtkString . history_id)
410 (GtkString . browse_dialog_title))
412 (gtk-import-function GtkWidget gnome_file_entry_gnome_entry
413 (GnomeFileEntry .fentry))
415 (gtk-import-function GtkWidget gnome_file_entry_gtk_entry
416 (GnomeFileEntry . fentry))
418 (gtk-import-function nil gnome_file_entry_set_title
419 (GnomeFileEntry . fentry)
420 (GtkString . browse_dialog_title))
422 ;; set default path for the browse dialog
423 (gtk-import-function nil gnome_file_entry_set_default_path
424 (GnomeFileEntry . fentry)
427 ;; sets up the file entry to be a directory picker rather then a file picker
428 (gtk-import-function nil gnome_file_entry_set_directory
429 (GnomeFileEntry . fentry)
430 (gboolean . directory_entry))
432 ;; returns a filename which is a full path with WD or the default
433 ;; directory prepended if it's not an absolute path, returns
434 ;; NULL on empty entry or if the file doesn't exist and that was
436 (gtk-import-function GtkString gnome_file_entry_get_full_path
437 (GnomeFileEntry . fentry)
438 (gboolean . file_must_exist))
440 ;; set modality of the file browse dialog, only applies for the
441 ;; next time a dialog is created
442 (gtk-import-function nil gnome_file_entry_set_modal
443 (GnomeFileEntry . fentry)
444 (gboolean . is_modal))
447 ;; Standard Gtk function
448 (gtk-import-function GtkType gnome_font_picker_get_type)
450 ;; Creates a new font picker widget
451 (gtk-import-function GtkWidget gnome_font_picker_new)
453 ;; Sets the title for the font selection dialog
454 (gtk-import-function nil gnome_font_picker_set_title
455 (GnomeFontPicker . gfp)
459 (gtk-import-function GnomeFontPickerMode gnome_font_picker_get_mode
460 (GnomeFontPicker . gfp))
462 (gtk-import-function nil gnome_font_picker_set_mode
463 (GnomeFontPicker . gfp)
464 (GnomeFontPickerMode . mode))
466 ;; With GNOME_FONT_PICKER_MODE_FONT_INFO
467 ;; If use_font_in_label is true, font name will be writen using font choosed by user and
468 ;; using size passed to this function
469 (gtk-import-function nil gnome_font_picker_fi_set_use_font_in_label
470 (GnomeFontPicker . gfp)
471 (gboolean . use_font_in_label)
474 (gtk-import-function nil gnome_font_picker_fi_set_show_size
475 (GnomeFontPicker . gfp)
476 (gboolean . show_size))
478 ;; With GNOME_FONT_PICKER_MODE_USER_WIDGET
479 (gtk-import-function nil gnome_font_picker_uw_set_widget
480 (GnomeFontPicker . gfp)
481 (GtkWidget . widget))
483 ;; Functions to interface with GtkFontSelectionDialog
484 (gtk-import-function GtkString gnome_font_picker_get_font_name
485 (GnomeFontPicker . gfp))
487 ;;;GdkFont* gnome_font_picker_get_font (GnomeFontPicker *gfp);
489 (gtk-import-function gboolean gnome_font_picker_set_font_name
490 (GnomeFontPicker . gfp)
491 (GtkString . fontname))
493 (gtk-import-function GtkString gnome_font_picker_get_preview_text
494 (GnomeFontPicker . gfp))
496 (gtk-import-function nil gnome_font_picker_set_preview_text
497 (GnomeFontPicker . gfp)
501 (gtk-import-function GtkType gnome_href_get_type)
502 (gtk-import-function GtkWidget gnome_href_new
506 (gtk-import-function nil gnome_href_set_url
509 (gtk-import-function GtkString gnome_href_get_url
512 (gtk-import-function nil gnome_href_set_label
516 (gtk-import-function GtkString gnome_href_get_label
520 ;; Stock icons, buttons, and menu items.
522 ;; A short description:
524 ;; These functions provide an applications programmer with default
525 ;; icons for toolbars, menu pixmaps, etc. One such `icon' should have
526 ;; at least three pixmaps to reflect it's state. There is a `regular'
527 ;; pixmap, a `disabled' pixmap and a `focused' pixmap. You can get
528 ;; either each of these pixmaps by calling gnome_stock_pixmap or you
529 ;; can get a widget by calling gnome_stock_pixmap_widget. This widget
530 ;; is a container which gtk_widget_shows the pixmap, that is
531 ;; reflecting the current state of the widget. If for example you
532 ;; gtk_container_add this widget to a button, which is currently not
533 ;; sensitive, the widget will just show the `disabled' pixmap. If the
534 ;; state of the button changes to sensitive, the widget will change to
535 ;; the `regular' pixmap. The `focused' pixmap will be shown, when the
536 ;; mouse pointer enters the widget.
538 ;; To support themability, we use (char *) to call those functions. A
539 ;; new theme might register new icons by calling
540 ;; gnome_stock_pixmap_register, or may change existing icons by
541 ;; calling gnome_stock_pixmap_change. An application should check (by
542 ;; calling gnome_stock_pixmap_checkfor), if the current theme supports
543 ;; an uncommon icon, before using it. The only icons an app can rely
544 ;; on, are those defined in this header file.
546 ;; We now have stock buttons too. To use them, just replace any
547 ;; gtk_button_new{_with_label} with
548 ;; gnome_stock_button(GNOME_STOCK_BUTTON_...). This function returns
549 ;; a GtkButton with a gettexted default text and an icon.
551 ;; There's an additional feature, which might be interesting. If an
552 ;; application calls gnome_stock_pixmap_register and uses it by
553 ;; calling gnome_stock_pixmap_widget, it doesn't have to care about
554 ;; the state_changed signal to display the appropriate pixmap
555 ;; itself. Additionally gnome-stock generates a disabled version of a
556 ;; pixmap automatically, when no pixmap for a disabled state is
562 ;; currently implemented:
563 ;; - gnome_stock_pixmap
564 ;; - gnome_stock_pixmap_widget
565 ;; - gnome_stock_pixmap_checkfor
566 ;; - GnomeStockPixmapWidget
567 ;; - gnome_stock_button
568 ;; - gnome_stock_pixmap_register
571 ;; - gnome_stock_pixmap_change
573 ;; The names of `well known' icons. I define these strings mainly to
574 ;; prevent errors due to typos.
576 (defvar gnome-stock-pixmaps '(
582 (save-as . "Save As")
587 (properties . "Properties")
588 (preferences . "Preferences")
593 (srchrpl . "Search/Replace")
595 (forward . "Forward")
600 (refresh . "Refresh")
604 (timer-stop . "Timer Stopped")
606 (mail-rcv . "Receive Mail")
607 (mail-snd . "Send Mail")
608 (mail-rpl . "Reply to Mail")
609 (mail-fwd . "Forward Mail")
610 (mail-new . "New Mail")
612 (trash-full . "Trash Full")
613 (undelete . "Undelete")
614 (spellcheck . "Spellchecker")
616 (line-in . "Line In")
620 (book-red . "Book Red")
621 (book-green . "Book Green")
622 (book-blue . "Book Blue")
623 (BOOK-YELLOW . "Book Yellow")
624 (BOOK-OPEN . "Book Open")
627 (MULTIPLE . "Multiple")
629 (CONVERT . "Convert")
630 (JUMP-TO . "Jump To")
640 (ALIGN-LEFT . "Left")
641 (ALIGN-RIGHT . "Right")
642 (ALIGN-CENTER . "Center")
643 (ALIGN-JUSTIFY . "Justify")
646 (TEXT-ITALIC . "Italic")
647 (TEXT-UNDERLINE . "Underline")
648 (TEXT-STRIKEOUT . "Strikeout")
650 (TEXT-INDENT . "Text Indent")
651 (TEXT-UNINDENT . "Text Unindent")
655 (COLORSELECTOR . "Color Select")
660 (TABLE-BORDERS . "Table Borders")
661 (TABLE-FILL . "Table Fill")
663 (TEXT-BULLETED-LIST . "Text Bulleted List")
664 (TEXT-NUMBERED-LIST . "Text Numbered List")
667 ;; The basic pixmap version of an icon.
669 ;;#define GNOME_STOCK_PIXMAP_REGULAR "regular"
670 ;;#define GNOME_STOCK_PIXMAP_DISABLED "disabled"
671 ;;#define GNOME_STOCK_PIXMAP_FOCUSED "focused"
673 (defvar gnome-stock-pixmap-widget-new nil)
675 (defun gnome-stock-pixmap-widget-new (window symbol)
676 "Load a stock pixmap named SYMBOL using WINDOW as the parent."
677 (if (not gnome-stock-pixmap-widget-new)
678 (setq gnome-stock-pixmap-widget-new (gtk-import-function-internal
680 "gnome_stock_pixmap_widget_new"
681 '(GtkWidget GtkString))))
682 (let ((translation (assq symbol gnome-stock-pixmaps)))
683 (if (not translation)
684 (error "Unknown stock pixmap: %S" symbol))
685 (gtk-call-function gnome-stock-pixmap-widget-new (list window (cdr translation)))))
687 (gtk-import-function GtkType gnome_stock_get_type)
688 (gtk-import-function GtkWidget gnome_stock_new)
689 (gtk-import-function GtkWidget gnome_stock_new_with_icon '(GtkString . icon))
690 (gtk-import-function gboolean gnome_stock_set_icon
694 ;; just fetch a GnomeStock(PixmapWidget)
695 ;; It is possible to specify a filename instead of an icon name. Gnome stock
696 ;; will use gnome_pixmap_file to find the pixmap and return a GnomeStock widget
698 (gtk-import-function GtkWidget gnome_stock_pixmap_widget
702 ;; This function loads that file scaled to the specified size. Unlike
703 ;; gnome_pixmap_new_from_file_at_size this function uses antializing and stuff
704 ;; to scale the pixmap
705 (gtk-import-function GtkWidget gnome_stock_pixmap_widget_at_size
711 (gtk-import-function nil gnome_stock_pixmap_widget_set_icon
712 (GnomeStock . widget)
715 ;;;gint gnome_stock_pixmap_register (const char *icon,
716 ;;; const char *subtype,
717 ;;; GnomeStockPixmapEntry *entry);
719 ;; change an existing entry. returns non-zero on success
720 ;;;gint gnome_stock_pixmap_change (const char *icon,
721 ;;; const char *subtype,
722 ;;; GnomeStockPixmapEntry *entry);
724 ;; check for the existance of an entry. returns the entry if it
725 ;; exists, or NULL otherwise
726 ;;;GnomeStockPixmapEntry *gnome_stock_pixmap_checkfor (const char *icon,
727 ;;; const char *subtype);
731 (defvar gnome-stock-buttons '((ok . "Button_Ok")
732 (cancel . "Button_Cancel")
735 (close . "Button_Close")
736 (apply . "Button_Apply")
737 (help . "Button_Help")
738 (next . "Button_Next")
739 (prev . "Button_Prev")
741 (down . "Button_Down")
742 (font . "Button_Font")))
744 ;; this function returns a button with a pixmap (if ButtonUseIcons is enabled)
745 ;; and the provided text
747 (gtk-import-function GtkWidget gnome_pixmap_button
750 (gtk-import-function nil gnome_button_can_default
752 (gboolean . can_default))
754 (defvar gnome-stock-button nil)
756 (defun gnome-stock-button (symbol)
757 "Returns a default button widget for dialogs."
758 (if (not gnome-stock-button)
759 (setq gnome-stock-button (gtk-import-function-internal
760 'GtkWidget "gnome_stock_button"
762 (let ((translation (assq symbol gnome-stock-buttons)))
763 (if (not translation)
764 (error "Unknown stock button: %S" symbol))
765 (gtk-call-function gnome-stock-button (list (cdr translation)))))
767 (defun gnome-stock-or-ordinary-button (type)
768 "Returns a button widget. If the TYPE argument matches a
769 GNOME_STOCK_BUTTON_* define, then a stock button is created.
770 Otherwise, an ordinary button is created, and TYPE is given as the
772 (if (stringp type) (setq type (intern type)))
774 (gnome-stock-button type)
775 (error (gtk-button-new-with-label (symbol-name type)))))
779 ;;#define GNOME_STOCK_MENU_BLANK "Menu_"
780 ;;#define GNOME_STOCK_MENU_NEW "Menu_New"
781 ;;#define GNOME_STOCK_MENU_SAVE "Menu_Save"
782 ;;#define GNOME_STOCK_MENU_SAVE_AS "Menu_Save As"
783 ;;#define GNOME_STOCK_MENU_REVERT "Menu_Revert"
784 ;;#define GNOME_STOCK_MENU_OPEN "Menu_Open"
785 ;;#define GNOME_STOCK_MENU_CLOSE "Menu_Close"
786 ;;#define GNOME_STOCK_MENU_QUIT "Menu_Quit"
787 ;;#define GNOME_STOCK_MENU_CUT "Menu_Cut"
788 ;;#define GNOME_STOCK_MENU_COPY "Menu_Copy"
789 ;;#define GNOME_STOCK_MENU_PASTE "Menu_Paste"
790 ;;#define GNOME_STOCK_MENU_PROP "Menu_Properties"
791 ;;#define GNOME_STOCK_MENU_PREF "Menu_Preferences"
792 ;;#define GNOME_STOCK_MENU_ABOUT "Menu_About"
793 ;;#define GNOME_STOCK_MENU_SCORES "Menu_Scores"
794 ;;#define GNOME_STOCK_MENU_UNDO "Menu_Undo"
795 ;;#define GNOME_STOCK_MENU_REDO "Menu_Redo"
796 ;;#define GNOME_STOCK_MENU_PRINT "Menu_Print"
797 ;;#define GNOME_STOCK_MENU_SEARCH "Menu_Search"
798 ;;#define GNOME_STOCK_MENU_SRCHRPL "Menu_Search/Replace"
799 ;;#define GNOME_STOCK_MENU_BACK "Menu_Back"
800 ;;#define GNOME_STOCK_MENU_FORWARD "Menu_Forward"
801 ;;#define GNOME_STOCK_MENU_FIRST "Menu_First"
802 ;;#define GNOME_STOCK_MENU_LAST "Menu_Last"
803 ;;#define GNOME_STOCK_MENU_HOME "Menu_Home"
804 ;;#define GNOME_STOCK_MENU_STOP "Menu_Stop"
805 ;;#define GNOME_STOCK_MENU_REFRESH "Menu_Refresh"
806 ;;#define GNOME_STOCK_MENU_MAIL "Menu_Mail"
807 ;;#define GNOME_STOCK_MENU_MAIL_RCV "Menu_Receive Mail"
808 ;;#define GNOME_STOCK_MENU_MAIL_SND "Menu_Send Mail"
809 ;;#define GNOME_STOCK_MENU_MAIL_RPL "Menu_Reply to Mail"
810 ;;#define GNOME_STOCK_MENU_MAIL_FWD "Menu_Forward Mail"
811 ;;#define GNOME_STOCK_MENU_MAIL_NEW "Menu_New Mail"
812 ;;#define GNOME_STOCK_MENU_TRASH "Menu_Trash"
813 ;;#define GNOME_STOCK_MENU_TRASH_FULL "Menu_Trash Full"
814 ;;#define GNOME_STOCK_MENU_UNDELETE "Menu_Undelete"
815 ;;#define GNOME_STOCK_MENU_TIMER "Menu_Timer"
816 ;;#define GNOME_STOCK_MENU_TIMER_STOP "Menu_Timer Stopped"
817 ;;#define GNOME_STOCK_MENU_SPELLCHECK "Menu_Spellchecker"
818 ;;#define GNOME_STOCK_MENU_MIC "Menu_Microphone"
819 ;;#define GNOME_STOCK_MENU_LINE_IN "Menu_Line In"
820 ;;#define GNOME_STOCK_MENU_CDROM "Menu_Cdrom"
821 ;;#define GNOME_STOCK_MENU_VOLUME "Menu_Volume"
822 ;;#define GNOME_STOCK_MENU_MIDI "Menu_Midi"
823 ;;#define GNOME_STOCK_MENU_BOOK_RED "Menu_Book Red"
824 ;;#define GNOME_STOCK_MENU_BOOK_GREEN "Menu_Book Green"
825 ;;#define GNOME_STOCK_MENU_BOOK_BLUE "Menu_Book Blue"
826 ;;#define GNOME_STOCK_MENU_BOOK_YELLOW "Menu_Book Yellow"
827 ;;#define GNOME_STOCK_MENU_BOOK_OPEN "Menu_Book Open"
828 ;;#define GNOME_STOCK_MENU_CONVERT "Menu_Convert"
829 ;;#define GNOME_STOCK_MENU_JUMP_TO "Menu_Jump To"
830 ;;#define GNOME_STOCK_MENU_UP "Menu_Up"
831 ;;#define GNOME_STOCK_MENU_DOWN "Menu_Down"
832 ;;#define GNOME_STOCK_MENU_TOP "Menu_Top"
833 ;;#define GNOME_STOCK_MENU_BOTTOM "Menu_Bottom"
834 ;;#define GNOME_STOCK_MENU_ATTACH "Menu_Attach"
835 ;;#define GNOME_STOCK_MENU_INDEX "Menu_Index"
836 ;;#define GNOME_STOCK_MENU_FONT "Menu_Font"
837 ;;#define GNOME_STOCK_MENU_EXEC "Menu_Exec"
839 ;;#define GNOME_STOCK_MENU_ALIGN_LEFT "Menu_Left"
840 ;;#define GNOME_STOCK_MENU_ALIGN_RIGHT "Menu_Right"
841 ;;#define GNOME_STOCK_MENU_ALIGN_CENTER "Menu_Center"
842 ;;#define GNOME_STOCK_MENU_ALIGN_JUSTIFY "Menu_Justify"
844 ;;#define GNOME_STOCK_MENU_TEXT_BOLD "Menu_Bold"
845 ;;#define GNOME_STOCK_MENU_TEXT_ITALIC "Menu_Italic"
846 ;;#define GNOME_STOCK_MENU_TEXT_UNDERLINE "Menu_Underline"
847 ;;#define GNOME_STOCK_MENU_TEXT_STRIKEOUT "Menu_Strikeout"
849 ;;#define GNOME_STOCK_MENU_EXIT GNOME_STOCK_MENU_QUIT
852 ;;/* returns a GtkMenuItem with an stock icon and text */
853 ;;GtkWidget *gnome_stock_menu_item (const char *type,
854 ;; const char *text);
857 ;; Creates a toplevel window with a shaped mask. Useful for making the DnD
859 ;; GtkWidget *gnome_stock_transparent_window (const char *icon, const char *subtype);
862 ;;; * Return a GdkPixmap and GdkMask for a stock pixmap
864 ;;;void gnome_stock_pixmap_gdk (const char *icon,
865 ;;; const char *subtype,
866 ;;; GdkPixmap **pixmap,
867 ;;; GdkPixmap **mask);
870 (gtk-import-function GtkType gnome_druid_get_type)
871 (gtk-import-function GtkWidget gnome_druid_new)
872 (gtk-import-function void gnome_druid_set_buttons_sensitive
874 (gboolean . back_sensitive)
875 (gboolean . next_sensitive)
876 (gboolean . cancel_sensitive))
877 (gtk-import-function void gnome_druid_set_show_finish
879 (gboolean . show_finish))
880 (gtk-import-function void gnome_druid_prepend_page
882 (GnomeDruidPage . page))
883 (gtk-import-function void gnome_druid_insert_page
885 (GnomeDruidPage . back_page)
886 (GnomeDruidPage . page))
887 (gtk-import-function void gnome_druid_append_page
889 (GnomeDruidPage . page))
890 (gtk-import-function void gnome_druid_set_page
892 (GnomeDruidPage . page))
894 (gtk-import-function GtkType gnome_druid_page_get_type)
895 (gtk-import-function gboolean gnome_druid_page_next (GnomeDruidPage . druid_page))
896 (gtk-import-function gboolean gnome_druid_page_prepare (GnomeDruidPage . druid_page))
897 (gtk-import-function gboolean gnome_druid_page_back (GnomeDruidPage . druid_page))
898 (gtk-import-function gboolean gnome_druid_page_cancel (GnomeDruidPage . druid_page))
899 (gtk-import-function gboolean gnome_druid_page_finish (GnomeDruidPage . druid_page))
902 (gtk-import-function GtkType gnome_druid_page_start_get_type)
903 (gtk-import-function GtkWidget gnome_druid_page_start_new)
906 '(gtk-import-function GtkWidget gnome_druid_page_start_new_with_vals
909 (GdkImlibImage . logo)
910 (GdkImlibImage . watermark))
912 (gtk-import-function void gnome_druid_page_start_set_bg_color
913 (GnomeDruidPageStart . druid_page_start)
915 (gtk-import-function void gnome_druid_page_start_set_textbox_color
916 (GnomeDruidPageStart . druid_page_start)
918 (gtk-import-function void gnome_druid_page_start_set_logo_bg_color
919 (GnomeDruidPageStart . druid_page_start)
921 (gtk-import-function void gnome_druid_page_start_set_title_color
922 (GnomeDruidPageStart . druid_page_start)
924 (gtk-import-function void gnome_druid_page_start_set_text_color
925 (GnomeDruidPageStart . druid_page_start)
927 (gtk-import-function void gnome_druid_page_start_set_text
928 (GnomeDruidPageStart . druid_page_start)
930 (gtk-import-function void gnome_druid_page_start_set_title
931 (GnomeDruidPageStart . druid_page_start)
935 '(gtk-import-function void gnome_druid_page_start_set_logo
936 (GnomeDruidPageStart . druid_page_start)
937 (GdkImlibImage . logo_image))
939 '(gtk-import-function void gnome_druid_page_start_set_watermark
940 (GnomeDruidPageStart . druid_page_start)
941 (GdkImlibImage . watermark))
944 (gtk-import-function GtkType gnome_druid_page_standard_get_type)
945 (gtk-import-function GtkWidget gnome_druid_page_standard_new)
947 '(gtk-import-function GtkWidget gnome_druid_page_standard_new_with_vals
949 (GdkImlibImage . logo))
950 (gtk-import-function void gnome_druid_page_standard_set_bg_color
951 (GnomeDruidPageStandard . druid_page_standard)
953 (gtk-import-function void gnome_druid_page_standard_set_logo_bg_color
954 (GnomeDruidPageStandard . druid_page_standard)
956 (gtk-import-function void gnome_druid_page_standard_set_title_color
957 (GnomeDruidPageStandard . druid_page_standard)
959 (gtk-import-function void gnome_druid_page_standard_set_title
960 (GnomeDruidPageStandard . druid_page_standard)
963 '(gtk-import-function void gnome_druid_page_standard_set_logo
964 (GnomeDruidPageStandard . druid_page_standard)
965 (GdkImlibImage . logo_image))
968 (gtk-import-function GtkType gnome_druid_page_finish_get_type)
969 (gtk-import-function GtkWidget gnome_druid_page_finish_new)
970 (gtk-import-function GtkWidget gnome_druid_page_finish_new_with_vals
973 (GdkImlibImage . logo)
974 (GdkImlibImage . watermark))
976 (gtk-import-function void gnome_druid_page_finish_set_bg_color
977 (GnomeDruidPageFinish . druid_page_finish)
979 (gtk-import-function void gnome_druid_page_finish_set_textbox_color
980 (GnomeDruidPageFinish . druid_page_finish)
982 (gtk-import-function void gnome_druid_page_finish_set_logo_bg_color
983 (GnomeDruidPageFinish . druid_page_finish)
985 (gtk-import-function void gnome_druid_page_finish_set_title_color
986 (GnomeDruidPageFinish . druid_page_finish)
988 (gtk-import-function void gnome_druid_page_finish_set_text_color
989 (GnomeDruidPageFinish . druid_page_finish)
991 (gtk-import-function void gnome_druid_page_finish_set_text
992 (GnomeDruidPageFinish . druid_page_finish)
994 (gtk-import-function void gnome_druid_page_finish_set_title
995 (GnomeDruidPageFinish . druid_page_finish)
998 '(gtk-import-function void gnome_druid_page_finish_set_logo
999 (GnomeDruidPageFinish . druid_page_finish)
1000 (GdkImlibImage . logo_image))
1002 '(gtk-import-function void gnome_druid_page_finish_set_watermark
1003 (GnomeDruidPageFinish . druid_page_finish)
1004 (GdkImlibImage . watermark))
1006 (provide 'gnome-widgets)