Mercurial > hg > xemacs-beta
comparison src/EmacsShell-sub.c @ 4522:fc7067b7f407
Backout last patch; forgot to specify file.
author | Stephen J. Turnbull <stephen@xemacs.org> |
---|---|
date | Wed, 29 Oct 2008 03:37:16 +0900 |
parents | 383ab474a241 |
children | 726060ee587c |
comparison
equal
deleted
inserted
replaced
4521:383ab474a241 | 4522:fc7067b7f407 |
---|---|
87 #include <X11/Shell.h> | 87 #include <X11/Shell.h> |
88 #include <X11/ShellP.h> | 88 #include <X11/ShellP.h> |
89 #include <X11/Vendor.h> | 89 #include <X11/Vendor.h> |
90 #include <X11/VendorP.h> | 90 #include <X11/VendorP.h> |
91 #include "EmacsShellP.h" | 91 #include "EmacsShellP.h" |
92 #include "../lwlib/xt-wrappers.h" | |
93 | 92 |
94 #define ABORT abort | 93 #define ABORT abort |
95 | 94 |
96 #if defined (DEFINE_TOP_LEVEL_EMACS_SHELL) | 95 #if defined (DEFINE_TOP_LEVEL_EMACS_SHELL) |
97 #define EMACS_SHELL_WIDGET TopLevelEmacsShellWidget | 96 #define EMACS_SHELL_WIDGET TopLevelEmacsShellWidget |
133 #define BIGSIZE ((Dimension)32767) | 132 #define BIGSIZE ((Dimension)32767) |
134 | 133 |
135 static XtResource resources[] = { | 134 static XtResource resources[] = { |
136 #define offset(field) XtOffset(EMACS_SHELL_WIDGET, emacs_shell.field) | 135 #define offset(field) XtOffset(EMACS_SHELL_WIDGET, emacs_shell.field) |
137 #define coreoffset(field) XtOffset(EMACS_SHELL_WIDGET, core.field) | 136 #define coreoffset(field) XtOffset(EMACS_SHELL_WIDGET, core.field) |
138 #define res(name,_class,member,size) \ | |
139 { (String) name, (String) _class, XtRInt, sizeof (int), \ | |
140 offset (member), XtRImmediate, (XtPointer)0 } | |
141 #define motifres(name,member) \ | |
142 { (String) name, XtCPosition, XtRPosition, sizeof (Position), \ | |
143 coreoffset (member), XtRImmediate, (XtPointer)BIGSIZE } | |
144 #ifdef LWLIB_USES_MOTIF | 137 #ifdef LWLIB_USES_MOTIF |
145 /* *** BOGOSITY^10! *** The Motif VendorShell fucks around with | 138 /* *** BOGOSITY^10! *** The Motif VendorShell fucks around with |
146 the default values for X and Y, for no obvious reason. This | 139 the default values for X and Y, for no obvious reason. This |
147 causes Shell to indicate that the defaults of (0,0) were | 140 causes Shell to indicate that the defaults of (0,0) were |
148 program-specified, instead of letting the WM do what it wants. */ | 141 program-specified, instead of letting the WM do what it wants. */ |
149 motifres (XtNx, x), | 142 { XtNx, XtCPosition, |
150 motifres (XtNy, y), | 143 XtRPosition, sizeof (Position), |
151 #endif | 144 coreoffset (x), XtRImmediate, (XtPointer)BIGSIZE }, |
152 res (XtNwidthCells, XtCWidthCells, width_cells, 0), | 145 { XtNy, XtCPosition, |
153 res (XtNheightCells, XtCHeightCells, height_cells, 0), | 146 XtRPosition, sizeof (Position), |
154 res (XtNminWidthCells, XtCMinWidthCells, min_width_cells, 0), | 147 coreoffset (y), XtRImmediate, (XtPointer)BIGSIZE }, |
155 res (XtNminHeightCells, XtCMinHeightCells, min_height_cells, 0), | 148 #endif |
156 #undef offset | 149 { XtNwidthCells, XtCWidthCells, |
157 #undef coreoffset | 150 XtRInt, sizeof (int), |
158 #undef res | 151 offset (width_cells), XtRImmediate, (XtPointer)0 }, |
159 #undef motifres | 152 { XtNheightCells, XtCHeightCells, |
153 XtRInt, sizeof (int), | |
154 offset (height_cells), XtRImmediate, (XtPointer)0 }, | |
155 { XtNminWidthCells, XtCMinWidthCells, | |
156 XtRInt, sizeof (int), | |
157 offset (min_width_cells), XtRImmediate, (XtPointer)0 }, | |
158 { XtNminHeightCells, XtCMinHeightCells, | |
159 XtRInt, sizeof (int), | |
160 offset (min_height_cells), XtRImmediate, (XtPointer)0 }, | |
160 }; | 161 }; |
161 | 162 |
162 static CompositeClassExtensionRec compositeClassExtRec = { | 163 static CompositeClassExtensionRec compositeClassExtRec = { |
163 NULL, | 164 NULL, |
164 NULLQUARK, | 165 NULLQUARK, |
256 printf (" text area size in cells: %d %d\n", w->emacs_shell.width_cells, | 257 printf (" text area size in cells: %d %d\n", w->emacs_shell.width_cells, |
257 w->emacs_shell.height_cells); | 258 w->emacs_shell.height_cells); |
258 printf (" base size set to: %d %d\n", base_width, base_height); | 259 printf (" base size set to: %d %d\n", base_width, base_height); |
259 fflush (stdout); | 260 fflush (stdout); |
260 #endif | 261 #endif |
261 Xt_SET_ARG(al [0], XtNbaseWidth, base_width); | 262 XtSetArg(al [0], XtNbaseWidth, base_width); |
262 Xt_SET_ARG(al [1], XtNbaseHeight, base_height); | 263 XtSetArg(al [1], XtNbaseHeight, base_height); |
263 Xt_SET_ARG(al [2], XtNminWidth, base_width + | 264 XtSetArg(al [2], XtNminWidth, base_width + |
264 cell_width * w->emacs_shell.min_width_cells); | 265 cell_width * w->emacs_shell.min_width_cells); |
265 Xt_SET_ARG(al [3], XtNminHeight, base_height + | 266 XtSetArg(al [3], XtNminHeight, base_height + |
266 cell_height * w->emacs_shell.min_height_cells); | 267 cell_height * w->emacs_shell.min_height_cells); |
267 XtSetValues ((Widget) w, al, 4); | 268 XtSetValues ((Widget) w, al, 4); |
268 } | 269 } |
269 | 270 |
270 static XtGeometryResult | 271 static XtGeometryResult |
271 SuperClassRootGeometryManager (Widget gw, | 272 SuperClassRootGeometryManager (Widget gw, |