1 ;;; gnome-widgets.el --- Import GNOME functions into SXEmacs
3 ;; Copyright (C) 2000 Free Software Foundation
5 ;; Maintainer: William Perry <wmperry@gnu.org>
6 ;; Keywords: extensions, dumped
8 ;; This file is part of SXEmacs.
10 ;; SXEmacs is free software: you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation, either version 3 of the License, or
13 ;; (at your option) any later version.
15 ;; SXEmacs is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
23 ;;; Synched up with: Not in FSF
27 ;; This file is dumped with SXEmacs.
32 (globally-declare-fboundp
33 '(gtk-import-function-internal
35 gtk-button-new-with-label))
37 (gtk-import-function GtkType gnome_about_get_type)
38 (gtk-import-function GtkWidget gnome_about_new
41 (GtkString . copyright)
42 (GtkArrayOfString . authors)
43 (GtkString . comments)
47 (gtk-import-function GtkType gnome_app_get_type)
49 ;; Create a new (empty) application window. You must specify the
50 ;; application's name (used internally as an identifier). The window
51 ;; title can be left as NULL, in which case the window's title will
53 (gtk-import-function GtkWidget gnome_app_new
57 ;; Constructor for language bindings; you don't normally need this.
58 (gtk-import-function nil gnome_app_construct
63 ;; Sets the menu bar of the application window
64 (gtk-import-function nil gnome_app_set_menus
66 (GtkMenuBar . menubar))
68 ;; Sets the main toolbar of the application window
69 (gtk-import-function nil gnome_app_set_toolbar
71 (GtkToolbar . toolbar))
73 ;; Sets the status bar of the application window
74 (gtk-import-function nil gnome_app_set_statusbar
76 (GtkWidget . statusbar))
78 ;; Sets the status bar of the application window, but uses the given
79 ;; container widget rather than creating a new one.
80 (gtk-import-function nil gnome_app_set_statusbar_custom
82 (GtkWidget . container)
83 (GtkWidget . statusbar))
85 ;; Sets the content area of the application window
86 (gtk-import-function nil gnome_app_set_contents
88 (GtkWidget . contents))
90 (gtk-import-function nil gnome_app_add_toolbar
92 (GtkToolbar . toolbar)
94 (GnomeDockItemBehavior . behavior)
95 (GnomeDockPlacement . placement)
97 (gint . band_position)
100 (gtk-import-function nil gnome_app_add_docked
102 (GtkWidget . toolbar)
104 (GnomeDockItemBehavior . behavior)
105 (GnomeDockPlacement . placement)
107 (gint . band_position)
110 (gtk-import-function nil gnome_app_add_dock_item
112 (GnomeDockItem . item)
113 (GnomeDockPlacement . placement)
115 (gint . band_position)
118 (gtk-import-function nil gnome_app_enable_layout_config
122 (gtk-import-function GnomeDock gnome_app_get_dock
124 (gtk-import-function GnomeDockItem gnome_app_get_dock_item_by_name
129 (gtk-import-function GtkType gnome_appbar_get_type)
131 (gtk-import-function GtkWidget gnome_appbar_new
132 (gboolean . has_progress)
133 (gboolean . has_status)
134 (GnomePreferencesType . interactivity))
136 ;; Sets the status label without changing widget state; next set or push
137 ;; will destroy this permanently.
138 (gtk-import-function nil gnome_appbar_set_status
139 (GnomeAppBar . appbar)
140 (GtkString . status))
142 ;; What to show when showing nothing else; defaults to nothing
143 (gtk-import-function nil gnome_appbar_set_default
144 (GnomeAppBar . appbar)
145 (GtkString . default_status))
147 (gtk-import-function nil gnome_appbar_push
148 (GnomeAppBar . appbar)
149 (GtkString . status))
151 ;; OK to call on empty stack
152 (gtk-import-function nil gnome_appbar_pop
153 (GnomeAppBar . appbar))
156 (gtk-import-function nil gnome_appbar_clear_stack
157 (GnomeAppBar . appbar))
159 ;; pure sugar - with a bad name, in light of the get_progress name
160 ;; which is not the opposite of set_progress. Maybe this function
162 (gtk-import-function nil gnome_appbar_set_progress
163 (GnomeAppBar . appbar)
164 (gfloat . percentage))
166 ;; use GtkProgress functions on returned value
167 (gtk-import-function GtkProgress gnome_appbar_get_progress
168 (GnomeAppBar . appbar))
170 ;; Reflect the current state of stack/default. Useful to force a set_status
172 (gtk-import-function nil gnome_appbar_refresh
173 (GnomeAppBar . appbar))
175 ;; Put a prompt in the appbar and wait for a response. When the
176 ;; user responds or cancels, a user_response signal is emitted.
177 (gtk-import-function nil gnome_appbar_set_prompt
178 (GnomeAppBar . appbar)
183 (gtk-import-function nil gnome_appbar_clear_prompt
184 (GnomeAppBar . appbar))
186 ;; Get the response to the prompt, if any. Result must be g_free'd.
187 (gtk-import-function GtkString gnome_appbar_get_response
188 (GnomeAppBar . appbar))
191 (gtk-import-function GtkType gnome_calculator_get_type)
192 (gtk-import-function GtkWidget gnome_calculator_new)
193 (gtk-import-function nil gnome_calculator_clear
194 (GnomeCalculator . gc)
197 (gtk-import-function nil gnome_calculator_set
198 (GnomeCalculator . gc)
202 ;; Standard Gtk function
203 (gtk-import-function GtkType gnome_color_picker_get_type)
205 ;; Creates a new color picker widget
206 (gtk-import-function GtkWidget gnome_color_picker_new)
208 ;; Set/get the color in the picker. Values are in [0.0, 1.0]
209 (gtk-import-function nil gnome_color_picker_set_d
210 (GnomeColorPicker . cp)
216 ;; #### BILL!!! Need multiple return values
217 ;; void gnome_color_picker_get_d (GnomeColorPicker *cp, gdouble *r, gdouble *g, gdouble *b, gdouble *a)
219 ;; Set/get the color in the picker. Values are in [0, 255]
220 (gtk-import-function nil gnome_color_picker_set_i8
221 (GnomeColorPicker . cp)
227 ;; #### BILL!!! Need multiple return values
228 ;; void gnome_color_picker_get_i8 (GnomeColorPicker *cp, guint8 *r, guint8 *g, guint8 *b, guint8 *a);
230 ;; Set/get the color in the picker. Values are in [0, 65535]
231 (gtk-import-function nil gnome_color_picker_set_i16
232 (GnomeColorPicker . cp)
238 ;; #### BILL!!! Need multiple return values
239 ;; void gnome_color_picker_get_i16 (GnomeColorPicker *cp, gushort *r, gushort *g, gushort *b, gushort *a);
241 ;; Sets whether the picker should dither the color sample or just paint a solid rectangle
242 (gtk-import-function nil gnome_color_picker_set_dither
243 (GnomeColorPicker . cp)
246 ;; Sets whether the picker should use the alpha channel or not
247 (gtk-import-function nil gnome_color_picker_set_use_alpha
248 (GnomeColorPicker . cp)
249 (gboolean . use_alpha))
251 ;; Sets the title for the color selection dialog
252 (gtk-import-function nil gnome_color_picker_set_title
253 (GnomeColorPicker . cp)
257 (gtk-import-function GtkType gnome_date_edit_get_type)
258 (gtk-import-function GtkWidget gnome_date_edit_new
260 (gboolean . show_time)
261 (gboolean . use_24_format))
263 (gtk-import-function GtkWidget gnome_date_edit_new_flags
265 (GnomeDateEditFlags . flags))
267 (gtk-import-function nil gnome_date_edit_set_time
268 (GnomeDateEdit . gde)
271 (gtk-import-function nil gnome_date_edit_set_popup_range
272 (GnomeDateEdit . gde)
276 (gtk-import-function 'time_t gnome_date_edit_get_date
277 (GnomeDateEdit . gde))
279 (gtk-import-function nil gnome_date_edit_set_flags
280 (GnomeDateEdit . gde)
281 (GnomeDateEditFlags . flags))
283 (gtk-import-function GnomeDateEditFlags gnome_date_edit_get_flags
284 (GnomeDateEdit . gde))
287 (gtk-import-function GtkType gnome_dentry_edit_get_type)
289 ;; create a new dentry and get the children using the below macros
290 ;; or use the utility new_notebook below
291 (gtk-import-function GtkObject gnome_dentry_edit_new)
293 ;;#define gnome_dentry_edit_child1(d) (GNOME_DENTRY_EDIT(d)->child1)
294 ;;#define gnome_dentry_edit_child2(d) (GNOME_DENTRY_EDIT(d)->child2)
296 ;; Create a new edit in this notebook - appends two pages to the
298 (gtk-import-function GtkObject gnome_dentry_edit_new_notebook
299 (GtkNotebook . notebook))
301 (gtk-import-function nil gnome_dentry_edit_clear
302 (GnomeDEntryEdit . dee))
304 ;; The GnomeDEntryEdit does not store a dentry, and it does not keep
305 ;; track of the location field of GnomeDesktopEntry which will always
308 ;; Make the display reflect dentry at path
309 (gtk-import-function nil gnome_dentry_edit_load_file
310 (GnomeDEntryEdit . dee)
313 ;; Copy the contents of this dentry into the display
314 '(gtk-import-function nil gnome_dentry_edit_set_dentry
315 (GnomeDEntryEdit . dee)
316 (GnomeDesktopEntry . dentry))
318 ;; Generate a dentry based on the contents of the display
319 '(gtk-import-function GnomeDesktopEntry gnome_dentry_edit_get_dentry
320 (GnomeDEntryEdit . dee))
322 ;; Return an allocated string, you need to g_free it.
323 (gtk-import-function GtkString gnome_dentry_edit_get_icon
324 (GnomeDEntryEdit . dee))
325 (gtk-import-function GtkString gnome_dentry_edit_get_name
326 (GnomeDEntryEdit . dee))
328 ;; These are accessor functions for the widgets that make up the
329 ;; GnomeDEntryEdit widget.
330 (gtk-import-function GtkWidget gnome_dentry_get_name_entry (GnomeDEntryEdit . dee))
331 (gtk-import-function GtkWidget gnome_dentry_get_comment_entry (GnomeDEntryEdit . dee))
332 (gtk-import-function GtkWidget gnome_dentry_get_exec_entry (GnomeDEntryEdit . dee))
333 (gtk-import-function GtkWidget gnome_dentry_get_tryexec_entry (GnomeDEntryEdit . dee))
334 (gtk-import-function GtkWidget gnome_dentry_get_doc_entry (GnomeDEntryEdit . dee))
335 (gtk-import-function GtkWidget gnome_dentry_get_icon_entry (GnomeDEntryEdit . dee))
338 ;; The GtkWidget * return values were added in retrospect; sometimes
339 ;; you might want to connect to the "close" signal of the dialog, or
340 ;; something, the return value makes the functions more
341 ;; flexible. However, there is nothing especially guaranteed about
342 ;; these dialogs except that they will be dialogs, so don't count on
346 (gtk-import-function GtkWidget gnome_ok_dialog (GtkString . message))
347 (gtk-import-function GtkWidget gnome_ok_dialog_parented
348 (GtkString . message)
349 (GtkWindow . parent))
351 ;; Operation failed fatally. In an OK dialog.
352 (gtk-import-function GtkWidget gnome_error_dialog '(GtkString . error))
353 (gtk-import-function GtkWidget gnome_error_dialog_parented
355 (GtkWindow . parent))
358 (gtk-import-function GtkWidget gnome_warning_dialog '(GtkString . warning))
359 (gtk-import-function GtkWidget gnome_warning_dialog_parented
360 (GtkString . warning)
361 (GtkWindow . parent))
363 ;;;/* Look in gnome-types.h for the callback types. */
365 ;;;/* Ask a yes or no question, and call the callback when it's answered. */
366 ;;;GtkWidget * gnome_question_dialog (const gchar * question,
367 ;;; GnomeReplyCallback callback,
370 ;;;GtkWidget * gnome_question_dialog_parented (const gchar * question,
371 ;;; GnomeReplyCallback callback,
373 ;;; GtkWindow * parent);
375 ;;;GtkWidget * gnome_question_dialog_modal (const gchar * question,
376 ;;; GnomeReplyCallback callback,
379 ;;;GtkWidget * gnome_question_dialog_modal_parented (const gchar * question,
380 ;;; GnomeReplyCallback callback,
382 ;;; GtkWindow * parent);
385 ;;;/* OK-Cancel question. */
386 ;;;GtkWidget * gnome_ok_cancel_dialog (const gchar * message,
387 ;;; GnomeReplyCallback callback,
390 ;;;GtkWidget * gnome_ok_cancel_dialog_parented (const gchar * message,
391 ;;; GnomeReplyCallback callback,
393 ;;; GtkWindow * parent);
395 ;;;GtkWidget * gnome_ok_cancel_dialog_modal (const gchar * message,
396 ;;; GnomeReplyCallback callback,
399 ;;;GtkWidget * gnome_ok_cancel_dialog_modal_parented (const gchar * message,
400 ;;; GnomeReplyCallback callback,
402 ;;; GtkWindow * parent);
405 (gtk-import-function GtkType gnome_file_entry_get_type)
406 (gtk-import-function GtkWidget gnome_file_entry_new
407 (GtkString . history_id)
408 (GtkString . browse_dialog_title))
410 (gtk-import-function nil gnome_file_entry_construct
411 (GnomeFileEntry . fentry)
412 (GtkString . history_id)
413 (GtkString . browse_dialog_title))
415 (gtk-import-function GtkWidget gnome_file_entry_gnome_entry
416 (GnomeFileEntry .fentry))
418 (gtk-import-function GtkWidget gnome_file_entry_gtk_entry
419 (GnomeFileEntry . fentry))
421 (gtk-import-function nil gnome_file_entry_set_title
422 (GnomeFileEntry . fentry)
423 (GtkString . browse_dialog_title))
425 ;; set default path for the browse dialog
426 (gtk-import-function nil gnome_file_entry_set_default_path
427 (GnomeFileEntry . fentry)
430 ;; sets up the file entry to be a directory picker rather then a file picker
431 (gtk-import-function nil gnome_file_entry_set_directory
432 (GnomeFileEntry . fentry)
433 (gboolean . directory_entry))
435 ;; returns a filename which is a full path with WD or the default
436 ;; directory prepended if it's not an absolute path, returns
437 ;; NULL on empty entry or if the file doesn't exist and that was
439 (gtk-import-function GtkString gnome_file_entry_get_full_path
440 (GnomeFileEntry . fentry)
441 (gboolean . file_must_exist))
443 ;; set modality of the file browse dialog, only applies for the
444 ;; next time a dialog is created
445 (gtk-import-function nil gnome_file_entry_set_modal
446 (GnomeFileEntry . fentry)
447 (gboolean . is_modal))
450 ;; Standard Gtk function
451 (gtk-import-function GtkType gnome_font_picker_get_type)
453 ;; Creates a new font picker widget
454 (gtk-import-function GtkWidget gnome_font_picker_new)
456 ;; Sets the title for the font selection dialog
457 (gtk-import-function nil gnome_font_picker_set_title
458 (GnomeFontPicker . gfp)
462 (gtk-import-function GnomeFontPickerMode gnome_font_picker_get_mode
463 (GnomeFontPicker . gfp))
465 (gtk-import-function nil gnome_font_picker_set_mode
466 (GnomeFontPicker . gfp)
467 (GnomeFontPickerMode . mode))
469 ;; With GNOME_FONT_PICKER_MODE_FONT_INFO
470 ;; If use_font_in_label is true, font name will be writen using font choosed by user and
471 ;; using size passed to this function
472 (gtk-import-function nil gnome_font_picker_fi_set_use_font_in_label
473 (GnomeFontPicker . gfp)
474 (gboolean . use_font_in_label)
477 (gtk-import-function nil gnome_font_picker_fi_set_show_size
478 (GnomeFontPicker . gfp)
479 (gboolean . show_size))
481 ;; With GNOME_FONT_PICKER_MODE_USER_WIDGET
482 (gtk-import-function nil gnome_font_picker_uw_set_widget
483 (GnomeFontPicker . gfp)
484 (GtkWidget . widget))
486 ;; Functions to interface with GtkFontSelectionDialog
487 (gtk-import-function GtkString gnome_font_picker_get_font_name
488 (GnomeFontPicker . gfp))
490 ;;;GdkFont* gnome_font_picker_get_font (GnomeFontPicker *gfp);
492 (gtk-import-function gboolean gnome_font_picker_set_font_name
493 (GnomeFontPicker . gfp)
494 (GtkString . fontname))
496 (gtk-import-function GtkString gnome_font_picker_get_preview_text
497 (GnomeFontPicker . gfp))
499 (gtk-import-function nil gnome_font_picker_set_preview_text
500 (GnomeFontPicker . gfp)
504 (gtk-import-function GtkType gnome_href_get_type)
505 (gtk-import-function GtkWidget gnome_href_new
509 (gtk-import-function nil gnome_href_set_url
512 (gtk-import-function GtkString gnome_href_get_url
515 (gtk-import-function nil gnome_href_set_label
519 (gtk-import-function GtkString gnome_href_get_label
523 ;; Stock icons, buttons, and menu items.
525 ;; A short description:
527 ;; These functions provide an applications programmer with default
528 ;; icons for toolbars, menu pixmaps, etc. One such `icon' should have
529 ;; at least three pixmaps to reflect it's state. There is a `regular'
530 ;; pixmap, a `disabled' pixmap and a `focused' pixmap. You can get
531 ;; either each of these pixmaps by calling gnome_stock_pixmap or you
532 ;; can get a widget by calling gnome_stock_pixmap_widget. This widget
533 ;; is a container which gtk_widget_shows the pixmap, that is
534 ;; reflecting the current state of the widget. If for example you
535 ;; gtk_container_add this widget to a button, which is currently not
536 ;; sensitive, the widget will just show the `disabled' pixmap. If the
537 ;; state of the button changes to sensitive, the widget will change to
538 ;; the `regular' pixmap. The `focused' pixmap will be shown, when the
539 ;; mouse pointer enters the widget.
541 ;; To support themability, we use (char *) to call those functions. A
542 ;; new theme might register new icons by calling
543 ;; gnome_stock_pixmap_register, or may change existing icons by
544 ;; calling gnome_stock_pixmap_change. An application should check (by
545 ;; calling gnome_stock_pixmap_checkfor), if the current theme supports
546 ;; an uncommon icon, before using it. The only icons an app can rely
547 ;; on, are those defined in this header file.
549 ;; We now have stock buttons too. To use them, just replace any
550 ;; gtk_button_new{_with_label} with
551 ;; gnome_stock_button(GNOME_STOCK_BUTTON_...). This function returns
552 ;; a GtkButton with a gettexted default text and an icon.
554 ;; There's an additional feature, which might be interesting. If an
555 ;; application calls gnome_stock_pixmap_register and uses it by
556 ;; calling gnome_stock_pixmap_widget, it doesn't have to care about
557 ;; the state_changed signal to display the appropriate pixmap
558 ;; itself. Additionally gnome-stock generates a disabled version of a
559 ;; pixmap automatically, when no pixmap for a disabled state is
565 ;; currently implemented:
566 ;; - gnome_stock_pixmap
567 ;; - gnome_stock_pixmap_widget
568 ;; - gnome_stock_pixmap_checkfor
569 ;; - GnomeStockPixmapWidget
570 ;; - gnome_stock_button
571 ;; - gnome_stock_pixmap_register
574 ;; - gnome_stock_pixmap_change
576 ;; The names of `well known' icons. I define these strings mainly to
577 ;; prevent errors due to typos.
579 (defvar gnome-stock-pixmaps '(
585 (save-as . "Save As")
590 (properties . "Properties")
591 (preferences . "Preferences")
596 (srchrpl . "Search/Replace")
598 (forward . "Forward")
603 (refresh . "Refresh")
607 (timer-stop . "Timer Stopped")
609 (mail-rcv . "Receive Mail")
610 (mail-snd . "Send Mail")
611 (mail-rpl . "Reply to Mail")
612 (mail-fwd . "Forward Mail")
613 (mail-new . "New Mail")
615 (trash-full . "Trash Full")
616 (undelete . "Undelete")
617 (spellcheck . "Spellchecker")
619 (line-in . "Line In")
623 (book-red . "Book Red")
624 (book-green . "Book Green")
625 (book-blue . "Book Blue")
626 (BOOK-YELLOW . "Book Yellow")
627 (BOOK-OPEN . "Book Open")
630 (MULTIPLE . "Multiple")
632 (CONVERT . "Convert")
633 (JUMP-TO . "Jump To")
643 (ALIGN-LEFT . "Left")
644 (ALIGN-RIGHT . "Right")
645 (ALIGN-CENTER . "Center")
646 (ALIGN-JUSTIFY . "Justify")
649 (TEXT-ITALIC . "Italic")
650 (TEXT-UNDERLINE . "Underline")
651 (TEXT-STRIKEOUT . "Strikeout")
653 (TEXT-INDENT . "Text Indent")
654 (TEXT-UNINDENT . "Text Unindent")
658 (COLORSELECTOR . "Color Select")
663 (TABLE-BORDERS . "Table Borders")
664 (TABLE-FILL . "Table Fill")
666 (TEXT-BULLETED-LIST . "Text Bulleted List")
667 (TEXT-NUMBERED-LIST . "Text Numbered List")
670 ;; The basic pixmap version of an icon.
672 ;;#define GNOME_STOCK_PIXMAP_REGULAR "regular"
673 ;;#define GNOME_STOCK_PIXMAP_DISABLED "disabled"
674 ;;#define GNOME_STOCK_PIXMAP_FOCUSED "focused"
676 (defvar gnome-stock-pixmap-widget-new nil)
678 (defun gnome-stock-pixmap-widget-new (window symbol)
679 "Load a stock pixmap named SYMBOL using WINDOW as the parent."
680 (if (not gnome-stock-pixmap-widget-new)
681 (setq gnome-stock-pixmap-widget-new (gtk-import-function-internal
683 "gnome_stock_pixmap_widget_new"
684 '(GtkWidget GtkString))))
685 (let ((translation (assq symbol gnome-stock-pixmaps)))
686 (if (not translation)
687 (error "Unknown stock pixmap: %S" symbol))
688 (gtk-call-function gnome-stock-pixmap-widget-new (list window (cdr translation)))))
690 (gtk-import-function GtkType gnome_stock_get_type)
691 (gtk-import-function GtkWidget gnome_stock_new)
692 (gtk-import-function GtkWidget gnome_stock_new_with_icon '(GtkString . icon))
693 (gtk-import-function gboolean gnome_stock_set_icon
697 ;; just fetch a GnomeStock(PixmapWidget)
698 ;; It is possible to specify a filename instead of an icon name. Gnome stock
699 ;; will use gnome_pixmap_file to find the pixmap and return a GnomeStock widget
701 (gtk-import-function GtkWidget gnome_stock_pixmap_widget
705 ;; This function loads that file scaled to the specified size. Unlike
706 ;; gnome_pixmap_new_from_file_at_size this function uses antializing and stuff
707 ;; to scale the pixmap
708 (gtk-import-function GtkWidget gnome_stock_pixmap_widget_at_size
714 (gtk-import-function nil gnome_stock_pixmap_widget_set_icon
715 (GnomeStock . widget)
718 ;;;gint gnome_stock_pixmap_register (const char *icon,
719 ;;; const char *subtype,
720 ;;; GnomeStockPixmapEntry *entry);
722 ;; change an existing entry. returns non-zero on success
723 ;;;gint gnome_stock_pixmap_change (const char *icon,
724 ;;; const char *subtype,
725 ;;; GnomeStockPixmapEntry *entry);
727 ;; check for the existance of an entry. returns the entry if it
728 ;; exists, or NULL otherwise
729 ;;;GnomeStockPixmapEntry *gnome_stock_pixmap_checkfor (const char *icon,
730 ;;; const char *subtype);
734 (defvar gnome-stock-buttons '((ok . "Button_Ok")
735 (cancel . "Button_Cancel")
738 (close . "Button_Close")
739 (apply . "Button_Apply")
740 (help . "Button_Help")
741 (next . "Button_Next")
742 (prev . "Button_Prev")
744 (down . "Button_Down")
745 (font . "Button_Font")))
747 ;; this function returns a button with a pixmap (if ButtonUseIcons is enabled)
748 ;; and the provided text
750 (gtk-import-function GtkWidget gnome_pixmap_button
753 (gtk-import-function nil gnome_button_can_default
755 (gboolean . can_default))
757 (defvar gnome-stock-button nil)
759 (defun gnome-stock-button (symbol)
760 "Returns a default button widget for dialogs."
761 (if (not gnome-stock-button)
762 (setq gnome-stock-button (gtk-import-function-internal
763 'GtkWidget "gnome_stock_button"
765 (let ((translation (assq symbol gnome-stock-buttons)))
766 (if (not translation)
767 (error "Unknown stock button: %S" symbol))
768 (gtk-call-function gnome-stock-button (list (cdr translation)))))
770 (defun gnome-stock-or-ordinary-button (type)
771 "Returns a button widget. If the TYPE argument matches a
772 GNOME_STOCK_BUTTON_* define, then a stock button is created.
773 Otherwise, an ordinary button is created, and TYPE is given as the
775 (if (stringp type) (setq type (intern type)))
777 (gnome-stock-button type)
778 (error (gtk-button-new-with-label (symbol-name type)))))
782 ;;#define GNOME_STOCK_MENU_BLANK "Menu_"
783 ;;#define GNOME_STOCK_MENU_NEW "Menu_New"
784 ;;#define GNOME_STOCK_MENU_SAVE "Menu_Save"
785 ;;#define GNOME_STOCK_MENU_SAVE_AS "Menu_Save As"
786 ;;#define GNOME_STOCK_MENU_REVERT "Menu_Revert"
787 ;;#define GNOME_STOCK_MENU_OPEN "Menu_Open"
788 ;;#define GNOME_STOCK_MENU_CLOSE "Menu_Close"
789 ;;#define GNOME_STOCK_MENU_QUIT "Menu_Quit"
790 ;;#define GNOME_STOCK_MENU_CUT "Menu_Cut"
791 ;;#define GNOME_STOCK_MENU_COPY "Menu_Copy"
792 ;;#define GNOME_STOCK_MENU_PASTE "Menu_Paste"
793 ;;#define GNOME_STOCK_MENU_PROP "Menu_Properties"
794 ;;#define GNOME_STOCK_MENU_PREF "Menu_Preferences"
795 ;;#define GNOME_STOCK_MENU_ABOUT "Menu_About"
796 ;;#define GNOME_STOCK_MENU_SCORES "Menu_Scores"
797 ;;#define GNOME_STOCK_MENU_UNDO "Menu_Undo"
798 ;;#define GNOME_STOCK_MENU_REDO "Menu_Redo"
799 ;;#define GNOME_STOCK_MENU_PRINT "Menu_Print"
800 ;;#define GNOME_STOCK_MENU_SEARCH "Menu_Search"
801 ;;#define GNOME_STOCK_MENU_SRCHRPL "Menu_Search/Replace"
802 ;;#define GNOME_STOCK_MENU_BACK "Menu_Back"
803 ;;#define GNOME_STOCK_MENU_FORWARD "Menu_Forward"
804 ;;#define GNOME_STOCK_MENU_FIRST "Menu_First"
805 ;;#define GNOME_STOCK_MENU_LAST "Menu_Last"
806 ;;#define GNOME_STOCK_MENU_HOME "Menu_Home"
807 ;;#define GNOME_STOCK_MENU_STOP "Menu_Stop"
808 ;;#define GNOME_STOCK_MENU_REFRESH "Menu_Refresh"
809 ;;#define GNOME_STOCK_MENU_MAIL "Menu_Mail"
810 ;;#define GNOME_STOCK_MENU_MAIL_RCV "Menu_Receive Mail"
811 ;;#define GNOME_STOCK_MENU_MAIL_SND "Menu_Send Mail"
812 ;;#define GNOME_STOCK_MENU_MAIL_RPL "Menu_Reply to Mail"
813 ;;#define GNOME_STOCK_MENU_MAIL_FWD "Menu_Forward Mail"
814 ;;#define GNOME_STOCK_MENU_MAIL_NEW "Menu_New Mail"
815 ;;#define GNOME_STOCK_MENU_TRASH "Menu_Trash"
816 ;;#define GNOME_STOCK_MENU_TRASH_FULL "Menu_Trash Full"
817 ;;#define GNOME_STOCK_MENU_UNDELETE "Menu_Undelete"
818 ;;#define GNOME_STOCK_MENU_TIMER "Menu_Timer"
819 ;;#define GNOME_STOCK_MENU_TIMER_STOP "Menu_Timer Stopped"
820 ;;#define GNOME_STOCK_MENU_SPELLCHECK "Menu_Spellchecker"
821 ;;#define GNOME_STOCK_MENU_MIC "Menu_Microphone"
822 ;;#define GNOME_STOCK_MENU_LINE_IN "Menu_Line In"
823 ;;#define GNOME_STOCK_MENU_CDROM "Menu_Cdrom"
824 ;;#define GNOME_STOCK_MENU_VOLUME "Menu_Volume"
825 ;;#define GNOME_STOCK_MENU_MIDI "Menu_Midi"
826 ;;#define GNOME_STOCK_MENU_BOOK_RED "Menu_Book Red"
827 ;;#define GNOME_STOCK_MENU_BOOK_GREEN "Menu_Book Green"
828 ;;#define GNOME_STOCK_MENU_BOOK_BLUE "Menu_Book Blue"
829 ;;#define GNOME_STOCK_MENU_BOOK_YELLOW "Menu_Book Yellow"
830 ;;#define GNOME_STOCK_MENU_BOOK_OPEN "Menu_Book Open"
831 ;;#define GNOME_STOCK_MENU_CONVERT "Menu_Convert"
832 ;;#define GNOME_STOCK_MENU_JUMP_TO "Menu_Jump To"
833 ;;#define GNOME_STOCK_MENU_UP "Menu_Up"
834 ;;#define GNOME_STOCK_MENU_DOWN "Menu_Down"
835 ;;#define GNOME_STOCK_MENU_TOP "Menu_Top"
836 ;;#define GNOME_STOCK_MENU_BOTTOM "Menu_Bottom"
837 ;;#define GNOME_STOCK_MENU_ATTACH "Menu_Attach"
838 ;;#define GNOME_STOCK_MENU_INDEX "Menu_Index"
839 ;;#define GNOME_STOCK_MENU_FONT "Menu_Font"
840 ;;#define GNOME_STOCK_MENU_EXEC "Menu_Exec"
842 ;;#define GNOME_STOCK_MENU_ALIGN_LEFT "Menu_Left"
843 ;;#define GNOME_STOCK_MENU_ALIGN_RIGHT "Menu_Right"
844 ;;#define GNOME_STOCK_MENU_ALIGN_CENTER "Menu_Center"
845 ;;#define GNOME_STOCK_MENU_ALIGN_JUSTIFY "Menu_Justify"
847 ;;#define GNOME_STOCK_MENU_TEXT_BOLD "Menu_Bold"
848 ;;#define GNOME_STOCK_MENU_TEXT_ITALIC "Menu_Italic"
849 ;;#define GNOME_STOCK_MENU_TEXT_UNDERLINE "Menu_Underline"
850 ;;#define GNOME_STOCK_MENU_TEXT_STRIKEOUT "Menu_Strikeout"
852 ;;#define GNOME_STOCK_MENU_EXIT GNOME_STOCK_MENU_QUIT
855 ;;/* returns a GtkMenuItem with an stock icon and text */
856 ;;GtkWidget *gnome_stock_menu_item (const char *type,
857 ;; const char *text);
860 ;; Creates a toplevel window with a shaped mask. Useful for making the DnD
862 ;; GtkWidget *gnome_stock_transparent_window (const char *icon, const char *subtype);
865 ;;; * Return a GdkPixmap and GdkMask for a stock pixmap
867 ;;;void gnome_stock_pixmap_gdk (const char *icon,
868 ;;; const char *subtype,
869 ;;; GdkPixmap **pixmap,
870 ;;; GdkPixmap **mask);
873 (gtk-import-function GtkType gnome_druid_get_type)
874 (gtk-import-function GtkWidget gnome_druid_new)
875 (gtk-import-function void gnome_druid_set_buttons_sensitive
877 (gboolean . back_sensitive)
878 (gboolean . next_sensitive)
879 (gboolean . cancel_sensitive))
880 (gtk-import-function void gnome_druid_set_show_finish
882 (gboolean . show_finish))
883 (gtk-import-function void gnome_druid_prepend_page
885 (GnomeDruidPage . page))
886 (gtk-import-function void gnome_druid_insert_page
888 (GnomeDruidPage . back_page)
889 (GnomeDruidPage . page))
890 (gtk-import-function void gnome_druid_append_page
892 (GnomeDruidPage . page))
893 (gtk-import-function void gnome_druid_set_page
895 (GnomeDruidPage . page))
897 (gtk-import-function GtkType gnome_druid_page_get_type)
898 (gtk-import-function gboolean gnome_druid_page_next (GnomeDruidPage . druid_page))
899 (gtk-import-function gboolean gnome_druid_page_prepare (GnomeDruidPage . druid_page))
900 (gtk-import-function gboolean gnome_druid_page_back (GnomeDruidPage . druid_page))
901 (gtk-import-function gboolean gnome_druid_page_cancel (GnomeDruidPage . druid_page))
902 (gtk-import-function gboolean gnome_druid_page_finish (GnomeDruidPage . druid_page))
905 (gtk-import-function GtkType gnome_druid_page_start_get_type)
906 (gtk-import-function GtkWidget gnome_druid_page_start_new)
909 '(gtk-import-function GtkWidget gnome_druid_page_start_new_with_vals
912 (GdkImlibImage . logo)
913 (GdkImlibImage . watermark))
915 (gtk-import-function void gnome_druid_page_start_set_bg_color
916 (GnomeDruidPageStart . druid_page_start)
918 (gtk-import-function void gnome_druid_page_start_set_textbox_color
919 (GnomeDruidPageStart . druid_page_start)
921 (gtk-import-function void gnome_druid_page_start_set_logo_bg_color
922 (GnomeDruidPageStart . druid_page_start)
924 (gtk-import-function void gnome_druid_page_start_set_title_color
925 (GnomeDruidPageStart . druid_page_start)
927 (gtk-import-function void gnome_druid_page_start_set_text_color
928 (GnomeDruidPageStart . druid_page_start)
930 (gtk-import-function void gnome_druid_page_start_set_text
931 (GnomeDruidPageStart . druid_page_start)
933 (gtk-import-function void gnome_druid_page_start_set_title
934 (GnomeDruidPageStart . druid_page_start)
938 '(gtk-import-function void gnome_druid_page_start_set_logo
939 (GnomeDruidPageStart . druid_page_start)
940 (GdkImlibImage . logo_image))
942 '(gtk-import-function void gnome_druid_page_start_set_watermark
943 (GnomeDruidPageStart . druid_page_start)
944 (GdkImlibImage . watermark))
947 (gtk-import-function GtkType gnome_druid_page_standard_get_type)
948 (gtk-import-function GtkWidget gnome_druid_page_standard_new)
950 '(gtk-import-function GtkWidget gnome_druid_page_standard_new_with_vals
952 (GdkImlibImage . logo))
953 (gtk-import-function void gnome_druid_page_standard_set_bg_color
954 (GnomeDruidPageStandard . druid_page_standard)
956 (gtk-import-function void gnome_druid_page_standard_set_logo_bg_color
957 (GnomeDruidPageStandard . druid_page_standard)
959 (gtk-import-function void gnome_druid_page_standard_set_title_color
960 (GnomeDruidPageStandard . druid_page_standard)
962 (gtk-import-function void gnome_druid_page_standard_set_title
963 (GnomeDruidPageStandard . druid_page_standard)
966 '(gtk-import-function void gnome_druid_page_standard_set_logo
967 (GnomeDruidPageStandard . druid_page_standard)
968 (GdkImlibImage . logo_image))
971 (gtk-import-function GtkType gnome_druid_page_finish_get_type)
972 (gtk-import-function GtkWidget gnome_druid_page_finish_new)
973 (gtk-import-function GtkWidget gnome_druid_page_finish_new_with_vals
976 (GdkImlibImage . logo)
977 (GdkImlibImage . watermark))
979 (gtk-import-function void gnome_druid_page_finish_set_bg_color
980 (GnomeDruidPageFinish . druid_page_finish)
982 (gtk-import-function void gnome_druid_page_finish_set_textbox_color
983 (GnomeDruidPageFinish . druid_page_finish)
985 (gtk-import-function void gnome_druid_page_finish_set_logo_bg_color
986 (GnomeDruidPageFinish . druid_page_finish)
988 (gtk-import-function void gnome_druid_page_finish_set_title_color
989 (GnomeDruidPageFinish . druid_page_finish)
991 (gtk-import-function void gnome_druid_page_finish_set_text_color
992 (GnomeDruidPageFinish . druid_page_finish)
994 (gtk-import-function void gnome_druid_page_finish_set_text
995 (GnomeDruidPageFinish . druid_page_finish)
997 (gtk-import-function void gnome_druid_page_finish_set_title
998 (GnomeDruidPageFinish . druid_page_finish)
1001 '(gtk-import-function void gnome_druid_page_finish_set_logo
1002 (GnomeDruidPageFinish . druid_page_finish)
1003 (GdkImlibImage . logo_image))
1005 '(gtk-import-function void gnome_druid_page_finish_set_watermark
1006 (GnomeDruidPageFinish . druid_page_finish)
1007 (GdkImlibImage . watermark))
1009 (provide 'gnome-widgets)