1 /* Private header for the Emacs frame widget.
2 Copyright (C) 1993-1995 Sun Microsystems, Inc.
3 Copyright (C) 1995 Ben Wing.
5 This file is part of SXEmacs
7 SXEmacs is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 SXEmacs is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
21 /* Synched up with: Not in FSF. */
23 #ifndef INCLUDED_EmacsFrameP_h_
24 #define INCLUDED_EmacsFrameP_h_
26 #include "xintrinsicp.h"
27 #include <X11/CoreP.h>
28 #ifdef LWLIB_USES_MOTIF
29 #include "ui/X11/xmprimitivep.h"
31 #include "EmacsFrame.h"
35 #ifdef LWLIB_USES_MOTIF
37 /* It's easy to erroneously compile with Motif 1 headers, but link
38 with Motif 2 libraries.
40 For example, AIX stupidly provides Motif headers in
41 /usr/dt/include, but fails to provide the corresponding libraries
44 We actually try to survive such a version mismatch, since Motif 2
45 is _almost_ binary compatible with Motif 1. Motif 2's
46 XmPrimitivePart has some trailing data members which overlay the
47 start of this struct. We create dummy members to make space for
48 XmPrimitivePart's added members. These must, of course, be at
49 the beginning of this struct.
51 Delete this kludge when no one has Motif1 on their system anymore,
53 XtCallbackList Motif2_dummy_convert_callback;
54 XtCallbackList Motif2_dummy_popup_handler_callback;
55 long Motif2_dummy_layout_direction;
59 struct frame *frame; /* the *emacs* frame object */
61 /* Resources that can't be done from lisp.
63 char *geometry; /* geometry spec of this frame */
64 Boolean iconic; /* whether this frame is iconic */
66 /* The rest of this is crap and should be deleted.
68 Boolean minibuffer; /* 0: normal frames with minibuffers.
69 * 1: frames without minibuffers
70 * 2: minibuffer only. */
71 Boolean unsplittable; /* frame can only have one window */
73 int internal_border_width; /* internal borders */
74 int scrollbar_width; /* width of frame vertical sb's */
75 int scrollbar_height; /* height of frame horizontal sb's */
76 int top_toolbar_height; /* height of top toolbar */
77 int bottom_toolbar_height; /* height of bottom toolbar */
78 int left_toolbar_width; /* width of left toolbar */
79 int right_toolbar_width; /* width of right toolbar */
80 int top_toolbar_border_width; /* border width */
81 int bottom_toolbar_border_width; /* ... of bottom toolbar */
82 int left_toolbar_border_width; /* ... of left toolbar */
83 int right_toolbar_border_width; /* ... of right toolbar */
84 Pixel top_toolbar_shadow_pixel;
85 Pixel bottom_toolbar_shadow_pixel;
86 Pixel background_toolbar_pixel;
87 Pixel foreground_toolbar_pixel;
88 Pixmap top_toolbar_shadow_pixmap;
89 Pixmap bottom_toolbar_shadow_pixmap;
90 Dimension toolbar_shadow_thickness;
91 unsigned char scrollbar_placement;
92 int interline; /* skips between lines */
94 XFontStruct *font; /* font */
95 Pixel foreground_pixel; /* foreground */
96 Pixel background_pixel; /* background */
98 Pixel cursor_color; /* text cursor color */
99 Boolean bar_cursor; /* 1 if bar, 0 if block */
101 Boolean visual_bell; /* flash instead of beep */
102 int bell_volume; /* how loud is beep */
104 Boolean menubar_p; /* initially show a menubar? */
105 Boolean initially_unmapped; /* inhibit initial window mapping */
106 Boolean use_backing_store; /* backing store for menubar & ew? */
108 Dimension preferred_width; /* if non-zero, preferred size for */
109 Dimension preferred_height; /* QueryGeometry() */
114 typedef struct _EmacsFrameRec { /* full instance record */
116 #ifdef LWLIB_USES_MOTIF
117 XmPrimitivePart primitive;
119 EmacsFramePart emacs_frame;
122 typedef struct { /* new fields for EmacsFrame class */
124 } EmacsFrameClassPart;
126 typedef struct _EmacsFrameClassRec { /* full class record declaration */
127 CoreClassPart core_class;
128 #ifdef LWLIB_USES_MOTIF
129 XmPrimitiveClassPart primitive_class;
131 EmacsFrameClassPart emacs_frame_class;
132 } EmacsFrameClassRec;
134 extern EmacsFrameClassRec emacsFrameClassRec; /* class pointer */
136 #endif /* INCLUDED_EmacsFrameP_h_ */