annotate src/gui.h @ 407:ed6218a7d4d3

Added tag r21-2-33 for changeset b8cc9ab3f761
author cvs
date Mon, 13 Aug 2007 11:17:10 +0200
parents b8cc9ab3f761
children 697ef44129c6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
231
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
1 /* Generic GUI code. (menubars, scrollbars, toolbars, dialogs)
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
2 Copyright (C) 1995 Board of Trustees, University of Illinois.
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
3 Copyright (C) 1995, 1996 Ben Wing.
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
4 Copyright (C) 1995 Sun Microsystems, Inc.
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
5
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
6 This file is part of XEmacs.
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
7
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
8 XEmacs is free software; you can redistribute it and/or modify it
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
9 under the terms of the GNU General Public License as published by the
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
10 Free Software Foundation; either version 2, or (at your option) any
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
11 later version.
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
12
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
13 XEmacs is distributed in the hope that it will be useful, but WITHOUT
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
16 for more details.
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
17
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
19 along with XEmacs; see the file COPYING. If not, write to
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
20 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
21 Boston, MA 02111-1307, USA. */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
22
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
23 /* Synched up with: Not in FSF. */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
24
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
25 /* Written by kkm on 12/24/97 */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
26
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
27 #ifndef INCLUDED_gui_h_
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
28 #define INCLUDED_gui_h_
231
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
29
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
30 int separator_string_p (const char *s);
288
e11d67e05968 Import from CVS: tag r21-0b42
cvs
parents: 286
diff changeset
31 void get_gui_callback (Lisp_Object, Lisp_Object *, Lisp_Object *);
286
57709be46d1b Import from CVS: tag r21-0b41
cvs
parents: 272
diff changeset
32
231
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
33 extern int popup_up_p;
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 231
diff changeset
34
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
35 /************************************************************************/
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
36 /* Image Instance Object */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
37 /************************************************************************/
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
38
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 231
diff changeset
39 /* This structure describes gui button,
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 231
diff changeset
40 menu item or submenu properties */
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
41 struct Lisp_Gui_Item
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 231
diff changeset
42 {
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
43 struct lcrecord_header header;
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 231
diff changeset
44 Lisp_Object name; /* String */
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 231
diff changeset
45 Lisp_Object callback; /* Symbol or form */
406
b8cc9ab3f761 Import from CVS: tag r21-2-33
cvs
parents: 398
diff changeset
46 Lisp_Object callback_ex; /* Form taking context arguments */
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 231
diff changeset
47 Lisp_Object suffix; /* String */
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 231
diff changeset
48 Lisp_Object active; /* Form */
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 231
diff changeset
49 Lisp_Object included; /* Form */
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 231
diff changeset
50 Lisp_Object config; /* Anything EQable */
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 231
diff changeset
51 Lisp_Object filter; /* Form */
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 231
diff changeset
52 Lisp_Object style; /* Symbol */
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 231
diff changeset
53 Lisp_Object selected; /* Form */
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 231
diff changeset
54 Lisp_Object keys; /* String */
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
55 Lisp_Object accelerator; /* Char or Symbol */
406
b8cc9ab3f761 Import from CVS: tag r21-2-33
cvs
parents: 398
diff changeset
56 Lisp_Object value; /* Anything you like */
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 231
diff changeset
57 };
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 231
diff changeset
58
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
59 DECLARE_LRECORD (gui_item, Lisp_Gui_Item);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
60 #define XGUI_ITEM(x) XRECORD (x, gui_item, Lisp_Gui_Item)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
61 #define XSETGUI_ITEM(x, p) XSETRECORD (x, p, gui_item)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
62 #define GUI_ITEMP(x) RECORDP (x, gui_item)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
63 #define CHECK_GUI_ITEM(x) CHECK_RECORD (x, gui_item)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
64 #define CONCHECK_GUI_ITEM(x) CONCHECK_RECORD (x, gui_item)
269
b2472a1930f2 Import from CVS: tag r20-5b33
cvs
parents: 251
diff changeset
65
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
66 extern Lisp_Object Q_accelerator, Q_active, Q_config, Q_filter, Q_included;
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
67 extern Lisp_Object Q_keys, Q_selected, Q_suffix, Qradio, Qtoggle;
406
b8cc9ab3f761 Import from CVS: tag r21-2-33
cvs
parents: 398
diff changeset
68 extern Lisp_Object Q_key_sequence, Q_label, Q_callback, Q_callback_ex, Q_value;
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
69
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
70 void gui_item_add_keyval_pair (Lisp_Object,
388
aabb7f5b1c81 Import from CVS: tag r21-2-9
cvs
parents: 384
diff changeset
71 Lisp_Object key, Lisp_Object val,
aabb7f5b1c81 Import from CVS: tag r21-2-9
cvs
parents: 384
diff changeset
72 Error_behavior errb);
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
73 Lisp_Object gui_parse_item_keywords (Lisp_Object item);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
74 Lisp_Object gui_parse_item_keywords_no_errors (Lisp_Object item);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
75 void gui_add_item_keywords_to_plist (Lisp_Object plist, Lisp_Object gui_item);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
76 int gui_item_active_p (Lisp_Object);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
77 int gui_item_selected_p (Lisp_Object);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
78 int gui_item_included_p (Lisp_Object, Lisp_Object into);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
79 Lisp_Object gui_item_accelerator (Lisp_Object gui_item);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
80 Lisp_Object gui_name_accelerator (Lisp_Object name);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
81 int gui_item_id_hash (Lisp_Object, Lisp_Object gui_item, int);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
82 unsigned int gui_item_display_flush_left (Lisp_Object pgui_item,
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
83 char* buf, Bytecount buf_len);
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
84 unsigned int gui_item_display_flush_right (Lisp_Object gui_item,
272
c5d627a313b1 Import from CVS: tag r21-0b34
cvs
parents: 269
diff changeset
85 char* buf, Bytecount buf_len);
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 231
diff changeset
86
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
87 Lisp_Object allocate_gui_item (void);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
88 void gui_item_init (Lisp_Object gui_item);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
89 Lisp_Object parse_gui_item_tree_children (Lisp_Object list);
406
b8cc9ab3f761 Import from CVS: tag r21-2-33
cvs
parents: 398
diff changeset
90 Lisp_Object copy_gui_item_tree (Lisp_Object arg);
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
91
384
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 377
diff changeset
92 /* this is mswindows biased but reasonably safe I think */
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 377
diff changeset
93 #define GUI_ITEM_ID_SLOTS 8
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 377
diff changeset
94 #define GUI_ITEM_ID_MIN(s) (s * 0x2000)
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 377
diff changeset
95 #define GUI_ITEM_ID_MAX(s) (0x1FFF + GUI_ITEM_ID_MIN (s))
bbff43aa5eb7 Import from CVS: tag r21-2-7
cvs
parents: 377
diff changeset
96 #define GUI_ITEM_ID_BITS(x,s) (((x) & 0x1FFF) + GUI_ITEM_ID_MIN (s))
231
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
97
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
98 #define MAX_MENUITEM_LENGTH 128
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
99
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 388
diff changeset
100 #endif /* INCLUDED_gui_h_ */