annotate src/EmacsFrameP.h @ 5537:2df2d9171f20

Suppress a "shadowed local" warning.
author Stephen J. Turnbull <stephen@xemacs.org>
date Mon, 08 Aug 2011 13:57:18 +0900
parents 308d34e9f07d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 /* Private header for the Emacs frame widget.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 Copyright (C) 1993-1995 Sun Microsystems, Inc.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3 Copyright (C) 1995 Ben Wing.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5 This file is part of XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 3381
diff changeset
7 XEmacs is free software: you can redistribute it and/or modify it
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 under the terms of the GNU General Public License as published by the
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 3381
diff changeset
9 Free Software Foundation, either version 3 of the License, or (at your
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 3381
diff changeset
10 option) any later version.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 XEmacs is distributed in the hope that it will be useful, but WITHOUT
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 for more details.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 3381
diff changeset
18 along with XEmacs. If not, see <http://www.gnu.org/licenses/>. */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20 /* Synched up with: Not in FSF. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
22 #ifndef INCLUDED_EmacsFrameP_h_
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
23 #define INCLUDED_EmacsFrameP_h_
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 #include "xintrinsicp.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 #include <X11/CoreP.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 #ifdef LWLIB_USES_MOTIF
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 #include "xmprimitivep.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 #include "EmacsFrame.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 typedef struct {
1455
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
33
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
34 #ifdef LWLIB_USES_MOTIF
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
35 #if XmVERSION < 2
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
36 /* It's easy to erroneously compile with Motif 1 headers, but link
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
37 with Motif 2 libraries.
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
38
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
39 For example, AIX stupidly provides Motif headers in
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
40 /usr/dt/include, but fails to provide the corresponding libraries
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
41 in /usr/dt/lib.
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
42
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
43 We actually try to survive such a version mismatch, since Motif 2
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
44 is _almost_ binary compatible with Motif 1. Motif 2's
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
45 XmPrimitivePart has some trailing data members which overlay the
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
46 start of this struct. We create dummy members to make space for
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
47 XmPrimitivePart's added members. These must, of course, be at
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
48 the beginning of this struct.
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
49
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
50 Delete this kludge when no one has Motif1 on their system anymore,
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
51 perhaps in 2010. */
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
52 XtCallbackList Motif2_dummy_convert_callback;
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
53 XtCallbackList Motif2_dummy_popup_handler_callback;
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
54 long Motif2_dummy_layout_direction;
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
55 #endif
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
56 #endif
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
57
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58 struct frame* frame; /* the *emacs* frame object */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60 /* Resources that can't be done from lisp.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 char* geometry; /* geometry spec of this frame */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 Boolean iconic; /* whether this frame is iconic */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 /* The rest of this is crap and should be deleted.
3381
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 1455
diff changeset
66 #### Comments that start with + are fields that actually get referred
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 1455
diff changeset
67 to somewhere aside from the init function.
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 1455
diff changeset
68 I guess the "crap" has mostly moved to specifiers?
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 Boolean minibuffer; /* 0: normal frames with minibuffers.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 * 1: frames without minibuffers
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 * 2: minibuffer only. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 Boolean unsplittable; /* frame can only have one window */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74
3381
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 1455
diff changeset
75 int internal_border_width; /* + internal borders */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 int scrollbar_width; /* width of frame vertical sb's */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 int scrollbar_height; /* height of frame horizontal sb's */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 int top_toolbar_height; /* height of top toolbar */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 int bottom_toolbar_height; /* height of bottom toolbar */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 int left_toolbar_width; /* width of left toolbar */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 int right_toolbar_width; /* width of right toolbar */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 int top_toolbar_border_width; /* border width */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 int bottom_toolbar_border_width; /* ... of bottom toolbar */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 int left_toolbar_border_width; /* ... of left toolbar */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 int right_toolbar_border_width; /* ... of right toolbar */
3381
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 1455
diff changeset
86 Dimension toolbar_shadow_thickness; /* + of shadows */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87 unsigned char scrollbar_placement;
3381
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 1455
diff changeset
88 int interline; /* + skips between lines */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 XFontStruct* font; /* font */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91 Pixel foreground_pixel; /* foreground */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 Pixel background_pixel; /* background */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 Pixel cursor_color; /* text cursor color */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 Boolean bar_cursor; /* 1 if bar, 0 if block */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 Boolean visual_bell; /* flash instead of beep */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 int bell_volume; /* how loud is beep */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 Boolean menubar_p; /* initially show a menubar? */
3381
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 1455
diff changeset
101 Boolean initially_unmapped; /* + inhibit initial window mapping */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 Boolean use_backing_store; /* backing store for menubar & ew? */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 Dimension preferred_width; /* if non-zero, preferred size for */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 Dimension preferred_height; /* QueryGeometry() */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 /* private state */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 } EmacsFramePart;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110 typedef struct _EmacsFrameRec { /* full instance record */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 CorePart core;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112 #ifdef LWLIB_USES_MOTIF
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 XmPrimitivePart primitive;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 EmacsFramePart emacs_frame;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116 } EmacsFrameRec;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 typedef struct { /* new fields for EmacsFrame class */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119 int dummy;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120 } EmacsFrameClassPart;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 typedef struct _EmacsFrameClassRec { /* full class record declaration */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 CoreClassPart core_class;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 #ifdef LWLIB_USES_MOTIF
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 XmPrimitiveClassPart primitive_class;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 EmacsFrameClassPart emacs_frame_class;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128 } EmacsFrameClassRec;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130 extern EmacsFrameClassRec emacsFrameClassRec; /* class pointer */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
132 #endif /* INCLUDED_EmacsFrameP_h_ */