annotate src/gui-x.h @ 68:0b7f3b634cf2 r19-16-pre9

Import from CVS: tag r19-16-pre9
author cvs
date Mon, 13 Aug 2007 09:00:03 +0200
parents 376386a54a3c
children 6b37e6ddd302
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 /* General GUI code -- X-specific header file.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 Copyright (C) 1993, 1994 Free Software Foundation, Inc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 Copyright (C) 1996 Ben Wing.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 This file is part of XEmacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 XEmacs is free software; you can redistribute it and/or modify it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 under the terms of the GNU General Public License as published by the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 Free Software Foundation; either version 2, or (at your option) any
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 later version.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 XEmacs is distributed in the hope that it will be useful, but WITHOUT
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 for more details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 along with XEmacs; see the file COPYING. If not, write to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 Boston, MA 02111-1307, USA. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 /* Synched up with: Not in FSF. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 #ifndef _XEMACS_XLWLIB_H_
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 #define _XEMACS_XLWLIB_H_
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 #include "lwlib.h"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 widget_value *xmalloc_widget_value (void);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 extern LWLIB_ID new_lwlib_id (void);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 #ifdef HAVE_POPUPS
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 extern int popup_up_p;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 /* Each frame has one of these, and they are also contained in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 Vpopup_callbacks.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 It doesn't really need to be an lrecord (it's not lisp-accessible)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 but it makes marking slightly more modular.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 struct popup_data
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 struct lcrecord_header header;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 /* lwlib ID of the tree of widgets corresponding to this popup.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 We pass this to lw_map_widget_values() to retrieve all of our
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 Lispy call-data values that need to be GCPRO'd. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 LWLIB_ID id;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 /* For the frame popup data, this is the last buffer for which the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 menubar was displayed. If the buffer has changed, we may have to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 update things. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 Lisp_Object last_menubar_buffer;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 /* This flag tells us if the menubar contents are up-to-date with respect
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 to the current menubar structure. If we want to actually pull down a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 menu and this is false, then we need to update things. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 char menubar_contents_up_to_date;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 };
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 DECLARE_LRECORD (popup_data, struct popup_data);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 #define XPOPUP_DATA(x) XRECORD (x, popup_data, struct popup_data)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 #define XSETPOPUP_DATA(x, p) XSETRECORD (x, p, popup_data)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 #define POPUP_DATAP(x) RECORDP (x, popup_data)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 #define GC_POPUP_DATAP(x) GC_RECORDP (x, popup_data)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 #define CHECK_POPUP_DATA(x) CHECK_RECORD (x, popup_data)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 void gcpro_popup_callbacks (LWLIB_ID id);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 void ungcpro_popup_callbacks (LWLIB_ID id);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 int popup_handled_p (LWLIB_ID id);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 void free_popup_widget_value_tree (widget_value *wv);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 void popup_selection_callback (Widget widget, LWLIB_ID ignored_id,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 XtPointer client_data);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 int button_item_to_widget_value (Lisp_Object desc, widget_value *wv,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 int allow_text_field_p, int no_keys_p);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 Boolean separator_string_p (CONST char *s);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 char *menu_separator_style (CONST char *s);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 Lisp_Object widget_value_unwind (Lisp_Object closure);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 #endif /* HAVE_POPUPS */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 #endif /* _XEMACS_XLWLIB_H_ */