comparison src/gui.h @ 442:abe6d1db359e r21-2-36

Import from CVS: tag r21-2-36
author cvs
date Mon, 13 Aug 2007 11:35:02 +0200
parents 8de8e3f6228a
children d7a9135ec789
comparison
equal deleted inserted replaced
441:72a7cfa4a488 442:abe6d1db359e
25 /* Written by kkm on 12/24/97 */ 25 /* Written by kkm on 12/24/97 */
26 26
27 #ifndef INCLUDED_gui_h_ 27 #ifndef INCLUDED_gui_h_
28 #define INCLUDED_gui_h_ 28 #define INCLUDED_gui_h_
29 29
30 int separator_string_p (CONST char *s); 30 int separator_string_p (const Bufbyte *s);
31 void get_gui_callback (Lisp_Object, Lisp_Object *, Lisp_Object *); 31 void get_gui_callback (Lisp_Object, Lisp_Object *, Lisp_Object *);
32 int gui_item_equal_sans_selected (Lisp_Object obj1, Lisp_Object obj2, int depth);
32 33
33 extern int popup_up_p; 34 extern int popup_up_p;
34 35
35 /************************************************************************/ 36 /************************************************************************/
36 /* Image Instance Object */ 37 /* Image Instance Object */
41 struct Lisp_Gui_Item 42 struct Lisp_Gui_Item
42 { 43 {
43 struct lcrecord_header header; 44 struct lcrecord_header header;
44 Lisp_Object name; /* String */ 45 Lisp_Object name; /* String */
45 Lisp_Object callback; /* Symbol or form */ 46 Lisp_Object callback; /* Symbol or form */
47 Lisp_Object callback_ex; /* Form taking context arguments */
46 Lisp_Object suffix; /* String */ 48 Lisp_Object suffix; /* String */
47 Lisp_Object active; /* Form */ 49 Lisp_Object active; /* Form */
48 Lisp_Object included; /* Form */ 50 Lisp_Object included; /* Form */
49 Lisp_Object config; /* Anything EQable */ 51 Lisp_Object config; /* Anything EQable */
50 Lisp_Object filter; /* Form */ 52 Lisp_Object filter; /* Form */
51 Lisp_Object style; /* Symbol */ 53 Lisp_Object style; /* Symbol */
52 Lisp_Object selected; /* Form */ 54 Lisp_Object selected; /* Form */
53 Lisp_Object keys; /* String */ 55 Lisp_Object keys; /* String */
54 Lisp_Object accelerator; /* Char or Symbol */ 56 Lisp_Object accelerator; /* Char or Symbol */
57 Lisp_Object value; /* Anything you like */
55 }; 58 };
56 59
57 DECLARE_LRECORD (gui_item, Lisp_Gui_Item); 60 DECLARE_LRECORD (gui_item, Lisp_Gui_Item);
58 #define XGUI_ITEM(x) XRECORD (x, gui_item, Lisp_Gui_Item) 61 #define XGUI_ITEM(x) XRECORD (x, gui_item, Lisp_Gui_Item)
59 #define XSETGUI_ITEM(x, p) XSETRECORD (x, p, gui_item) 62 #define XSETGUI_ITEM(x, p) XSETRECORD (x, p, gui_item)
60 #define GUI_ITEMP(x) RECORDP (x, gui_item) 63 #define GUI_ITEMP(x) RECORDP (x, gui_item)
61 #define CHECK_GUI_ITEM(x) CHECK_RECORD (x, gui_item) 64 #define CHECK_GUI_ITEM(x) CHECK_RECORD (x, gui_item)
62 #define CONCHECK_GUI_ITEM(x) CONCHECK_RECORD (x, gui_item) 65 #define CONCHECK_GUI_ITEM(x) CONCHECK_RECORD (x, gui_item)
63 66
64 extern Lisp_Object Q_accelerator, Q_active, Q_config, Q_filter, Q_included;
65 extern Lisp_Object Q_keys, Q_selected, Q_suffix, Qradio, Qtoggle;
66 extern Lisp_Object Q_key_sequence, Q_label, Q_callback;
67
68 void gui_item_add_keyval_pair (Lisp_Object, 67 void gui_item_add_keyval_pair (Lisp_Object,
69 Lisp_Object key, Lisp_Object val, 68 Lisp_Object key, Lisp_Object val,
70 Error_behavior errb); 69 Error_behavior errb);
71 Lisp_Object gui_parse_item_keywords (Lisp_Object item); 70 Lisp_Object gui_parse_item_keywords (Lisp_Object item);
72 Lisp_Object gui_parse_item_keywords_no_errors (Lisp_Object item); 71 Lisp_Object gui_parse_item_keywords_no_errors (Lisp_Object item);
73 void gui_add_item_keywords_to_plist (Lisp_Object plist, Lisp_Object gui_item); 72 void gui_add_item_keywords_to_plist (Lisp_Object plist, Lisp_Object gui_item);
74 int gui_item_active_p (Lisp_Object); 73 int gui_item_active_p (Lisp_Object);
75 int gui_item_selected_p (Lisp_Object); 74 int gui_item_selected_p (Lisp_Object);
75 Lisp_Object gui_item_list_find_selected (Lisp_Object gui_item_list);
76 int gui_item_included_p (Lisp_Object, Lisp_Object into); 76 int gui_item_included_p (Lisp_Object, Lisp_Object into);
77 Lisp_Object gui_item_accelerator (Lisp_Object gui_item); 77 Lisp_Object gui_item_accelerator (Lisp_Object gui_item);
78 Lisp_Object gui_name_accelerator (Lisp_Object name); 78 Lisp_Object gui_name_accelerator (Lisp_Object name);
79 int gui_item_id_hash (Lisp_Object, Lisp_Object gui_item, int); 79 int gui_item_id_hash (Lisp_Object, Lisp_Object gui_item, int);
80 unsigned int gui_item_display_flush_left (Lisp_Object pgui_item, 80 unsigned int gui_item_display_flush_left (Lisp_Object pgui_item,
83 char* buf, Bytecount buf_len); 83 char* buf, Bytecount buf_len);
84 84
85 Lisp_Object allocate_gui_item (void); 85 Lisp_Object allocate_gui_item (void);
86 void gui_item_init (Lisp_Object gui_item); 86 void gui_item_init (Lisp_Object gui_item);
87 Lisp_Object parse_gui_item_tree_children (Lisp_Object list); 87 Lisp_Object parse_gui_item_tree_children (Lisp_Object list);
88 Lisp_Object copy_gui_item_tree (Lisp_Object arg);
89
90 extern Lisp_Object Qmenu_no_selection_hook, Qdelete_dialog_box_hook;
88 91
89 /* this is mswindows biased but reasonably safe I think */ 92 /* this is mswindows biased but reasonably safe I think */
90 #define GUI_ITEM_ID_SLOTS 8 93 #define GUI_ITEM_ID_SLOTS 8
91 #define GUI_ITEM_ID_MIN(s) (s * 0x2000) 94 #define GUI_ITEM_ID_MIN(s) (s * 0x2000)
92 #define GUI_ITEM_ID_MAX(s) (0x1FFF + GUI_ITEM_ID_MIN (s)) 95 #define GUI_ITEM_ID_MAX(s) (0x1FFF + GUI_ITEM_ID_MIN (s))