annotate src/EmacsFrameP.h @ 3988:1227374e7199

[xemacs-hg @ 2007-05-26 18:28:19 by aidan] Make double-free checks 64-bit safe, from Sebastian Freundt.
author aidan
date Sat, 26 May 2007 18:28:23 +0000
parents 374186f156d5
children 308d34e9f07d
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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 XEmacs is free software; you can redistribute it and/or modify it
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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 Free Software Foundation; either version 2, or (at your option) any
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10 later version.
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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 along with XEmacs; see the file COPYING. If not, write to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20 Boston, MA 02111-1307, USA. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22 /* Synched up with: Not in FSF. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
24 #ifndef INCLUDED_EmacsFrameP_h_
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
25 #define INCLUDED_EmacsFrameP_h_
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 #include "xintrinsicp.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 #include <X11/CoreP.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29 #ifdef LWLIB_USES_MOTIF
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 #include "xmprimitivep.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 #include "EmacsFrame.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 typedef struct {
1455
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
35
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
36 #ifdef LWLIB_USES_MOTIF
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
37 #if XmVERSION < 2
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
38 /* 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
39 with Motif 2 libraries.
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
40
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
41 For example, AIX stupidly provides Motif headers in
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
42 /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
43 in /usr/dt/lib.
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
44
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
45 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
46 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
47 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
48 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
49 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
50 the beginning of this struct.
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
51
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
52 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
53 perhaps in 2010. */
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
54 XtCallbackList Motif2_dummy_convert_callback;
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
55 XtCallbackList Motif2_dummy_popup_handler_callback;
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
56 long Motif2_dummy_layout_direction;
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
57 #endif
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
58 #endif
449cf6dc2025 [xemacs-hg @ 2003-05-04 02:34:34 by youngs]
youngs
parents: 869
diff changeset
59
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60 struct frame* frame; /* the *emacs* frame object */
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 /* Resources that can't be done from lisp.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 char* geometry; /* geometry spec of this frame */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 Boolean iconic; /* whether this frame is iconic */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67 /* 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
68 #### 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
69 to somewhere aside from the init function.
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 1455
diff changeset
70 I guess the "crap" has mostly moved to specifiers?
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 Boolean minibuffer; /* 0: normal frames with minibuffers.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 * 1: frames without minibuffers
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 * 2: minibuffer only. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 Boolean unsplittable; /* frame can only have one window */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76
3381
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 1455
diff changeset
77 int internal_border_width; /* + internal borders */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 int scrollbar_width; /* width of frame vertical sb's */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 int scrollbar_height; /* height of frame horizontal sb's */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 int top_toolbar_height; /* height of top toolbar */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 int bottom_toolbar_height; /* height of bottom toolbar */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 int left_toolbar_width; /* width of left toolbar */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 int right_toolbar_width; /* width of right toolbar */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 int top_toolbar_border_width; /* border width */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 int bottom_toolbar_border_width; /* ... of bottom toolbar */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86 int left_toolbar_border_width; /* ... of left toolbar */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87 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
88 Dimension toolbar_shadow_thickness; /* + of shadows */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 unsigned char scrollbar_placement;
3381
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 1455
diff changeset
90 int interline; /* + skips between lines */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 XFontStruct* font; /* font */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93 Pixel foreground_pixel; /* foreground */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 Pixel background_pixel; /* background */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 Pixel cursor_color; /* text cursor color */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 Boolean bar_cursor; /* 1 if bar, 0 if block */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 Boolean visual_bell; /* flash instead of beep */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 int bell_volume; /* how loud is beep */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 Boolean menubar_p; /* initially show a menubar? */
3381
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 1455
diff changeset
103 Boolean initially_unmapped; /* + inhibit initial window mapping */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 Boolean use_backing_store; /* backing store for menubar & ew? */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 Dimension preferred_width; /* if non-zero, preferred size for */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107 Dimension preferred_height; /* QueryGeometry() */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 /* private state */
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 } EmacsFramePart;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112 typedef struct _EmacsFrameRec { /* full instance record */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 CorePart core;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 #ifdef LWLIB_USES_MOTIF
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 XmPrimitivePart primitive;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 EmacsFramePart emacs_frame;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 } EmacsFrameRec;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120 typedef struct { /* new fields for EmacsFrame class */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121 int dummy;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 } EmacsFrameClassPart;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 typedef struct _EmacsFrameClassRec { /* full class record declaration */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 CoreClassPart core_class;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 #ifdef LWLIB_USES_MOTIF
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 XmPrimitiveClassPart primitive_class;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129 EmacsFrameClassPart emacs_frame_class;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130 } EmacsFrameClassRec;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132 extern EmacsFrameClassRec emacsFrameClassRec; /* class pointer */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
134 #endif /* INCLUDED_EmacsFrameP_h_ */