annotate src/EmacsFrame.c @ 5697:40fbceabaafd

menubar-items.el (default-menubar): Reorganize. Add PROBLEMS to toplevel. New "More about XEmacs" submenu for NEWS, licensing, etc. New "Recent History" menu for messages, lossage, etc. Get rid of ugly and unexpressive ellipses.
author Stephen J. Turnbull <stephen@xemacs.org>
date Mon, 24 Dec 2012 03:08:33 +0900
parents 56144c8593a8
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 /* The emacs frame widget.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3 Copyright (C) 1993-1995 Sun Microsystems, Inc.
5043
d0c14ea98592 various frame-geometry fixes
Ben Wing <ben@xemacs.org>
parents: 4769
diff changeset
4 Copyright (C) 1995, 2010 Ben Wing.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 This file is part of XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 5178
diff changeset
8 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
9 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: 5178
diff changeset
10 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: 5178
diff changeset
11 option) any later version.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 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
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 for more details.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 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: 5178
diff changeset
19 along with XEmacs. If not, see <http://www.gnu.org/licenses/>. */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 /* Synched up with: Not in FSF. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 /* #### Note to potential hackers: Don't mess with this unless you're
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24 sure you know what you're doing! Xt is a lot more subtle than
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 you may think. */
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 <config.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 #include "lisp.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29
872
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 869
diff changeset
30 #include "device-impl.h"
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 793
diff changeset
31 #include "faces.h"
872
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 869
diff changeset
32 #include "frame-impl.h"
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 793
diff changeset
33 #include "toolbar.h"
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 793
diff changeset
34 #include "window.h"
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 793
diff changeset
35
872
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 869
diff changeset
36 #include "console-x-impl.h"
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 #include "glyphs-x.h"
5176
8b2f75cecb89 rename objects* (.c, .h and .el files) to fontcolor*
Ben Wing <ben@xemacs.org>
parents: 5052
diff changeset
38 #include "fontcolor-x.h"
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 793
diff changeset
39
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 #include <X11/Shell.h>
4769
5460287a3327 Remove support for pre-X11R5 systems, including systems without Xmu. See
Jerry James <james@xemacs.org>
parents: 4528
diff changeset
41 #include <X11/Xmu/CharSet.h>
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 #include "EmacsFrameP.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 #include "EmacsManager.h" /* for EmacsManagerChangeSize */
4528
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
44 #include "../lwlib/xt-wrappers.h"
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 static void EmacsFrameClassInitialize (void);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 static void EmacsFrameInitialize (Widget, Widget, ArgList, Cardinal *);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 static void EmacsFrameRealize (Widget, XtValueMask*, XSetWindowAttributes*);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 static void EmacsFrameResize (Widget widget);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 static Boolean EmacsFrameSetValues (Widget, Widget, Widget,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 ArgList, Cardinal *);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 static XtGeometryResult EmacsFrameQueryGeometry (Widget, XtWidgetGeometry*,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 XtWidgetGeometry*);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 extern void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 emacs_Xt_mapping_action (Widget w, XEvent* event);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58 #undef XtOffset
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 #define XtOffset(p_type,field) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60 ((Cardinal) (((char *) (&(((p_type)0)->field))) - ((char *)0)))
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
61 #define offset(field) XtOffset (EmacsFrame, emacs_frame.field)
4528
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
62 #define res(name,_class,intrepr,type,member,extrepr,value) \
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
63 Xt_RESOURCE (name, _class, intrepr, type, offset(member), extrepr, value)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 static XtResource resources[] = {
4528
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
65 res (XtNgeometry, XtCGeometry, XtRString, String, geometry, XtRString, 0),
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
66 res (XtNiconic, XtCIconic, XtRBoolean, Boolean, iconic, XtRImmediate, False),
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67
4528
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
68 res (XtNemacsFrame, XtCEmacsFrame, XtRPointer, XtPointer,
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
69 frame, XtRImmediate, 0),
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
70 res (XtNmenubar, XtCMenubar, XtRBoolean, Boolean,
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
71 menubar_p, XtRImmediate, True),
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
72 res (XtNinitiallyUnmapped, XtCInitiallyUnmapped, XtRBoolean, Boolean,
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
73 initially_unmapped, XtRImmediate, False),
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
74 res (XtNminibuffer, XtCMinibuffer, XtRBoolean, Boolean,
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
75 minibuffer, XtRImmediate, True),
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
76 res (XtNunsplittable, XtCUnsplittable, XtRBoolean, Boolean,
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
77 unsplittable, XtRImmediate, False),
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
78 res (XtNinternalBorderWidth, XtCInternalBorderWidth, XtRInt, int,
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
79 internal_border_width, XtRImmediate, 4),
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 #ifdef HAVE_SCROLLBARS
4528
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
81 res (XtNscrollBarWidth, XtCScrollBarWidth, XtRInt, int,
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
82 scrollbar_width, XtRImmediate, -1),
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
83 res (XtNscrollBarHeight, XtCScrollBarHeight, XtRInt, int,
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
84 scrollbar_height, XtRImmediate, -1),
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
85 res (XtNscrollBarPlacement, XtCScrollBarPlacement, XtRScrollBarPlacement,
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
86 unsigned char, scrollbar_placement, XtRImmediate,
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87 #if defined (LWLIB_SCROLLBARS_MOTIF) || defined (LWLIB_SCROLLBARS_LUCID) || \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 defined (LWLIB_SCROLLBARS_ATHENA3D)
4528
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
89 XtBOTTOM_RIGHT
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 #else
4528
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
91 XtBOTTOM_LEFT
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 #endif
4528
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
93 ),
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 #endif /* HAVE_SCROLLBARS */
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
95
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 #ifdef HAVE_TOOLBARS
4528
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
97 res (XtNtopToolBarHeight, XtCTopToolBarHeight, XtRInt, int,
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
98 top_toolbar_height, XtRImmediate, -1),
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
99 res (XtNbottomToolBarHeight, XtCBottomToolBarHeight, XtRInt, int,
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
100 bottom_toolbar_height, XtRImmediate, -1),
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
101 res (XtNleftToolBarWidth, XtCLeftToolBarWidth, XtRInt, int,
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
102 left_toolbar_width, XtRImmediate, -1),
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
103 res (XtNrightToolBarWidth, XtCRightToolBarWidth, XtRInt, int,
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
104 right_toolbar_width, XtRImmediate, -1),
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
105 res (XtNtopToolBarBorderWidth, XtCTopToolBarBorderWidth, XtRInt, int,
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
106 top_toolbar_border_width, XtRImmediate, -1),
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
107 res (XtNbottomToolBarBorderWidth, XtCBottomToolBarBorderWidth, XtRInt, int,
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
108 bottom_toolbar_border_width, XtRImmediate, -1),
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
109 res (XtNleftToolBarBorderWidth, XtCLeftToolBarBorderWidth, XtRInt,
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
110 int, left_toolbar_border_width, XtRImmediate, -1),
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
111 res (XtNrightToolBarBorderWidth, XtCRightToolBarBorderWidth, XtRInt,
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
112 int, right_toolbar_border_width, XtRImmediate, -1),
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
113 res (XtNtoolBarShadowThickness, XtCToolBarShadowThickness, XtRDimension,
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
114 Dimension, toolbar_shadow_thickness, XtRImmediate, 2),
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 #endif /* HAVE_TOOLBARS */
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
116
4528
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
117 res (XtNinterline, XtCInterline, XtRInt, int,
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
118 interline, XtRImmediate, 0),
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
119 res (XtNfont, XtCFont, XtRFontStruct, XFontStruct *,
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
120 font, XtRImmediate, 0),
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
121 res (XtNforeground, XtCForeground, XtRPixel, Pixel,
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
122 foreground_pixel, XtRString, "Black"),
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
123 res (XtNbackground, XtCBackground, XtRPixel, Pixel,
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
124 background_pixel, XtRString, "Gray80"),
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
125 res (XtNcursorColor, XtCForeground, XtRPixel, Pixel,
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
126 cursor_color, XtRString, "XtDefaultForeground"),
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
127 res (XtNbarCursor, XtCBarCursor, XtRBoolean, Boolean,
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
128 bar_cursor, XtRImmediate, 0),
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
129 res (XtNvisualBell, XtCVisualBell, XtRBoolean, Boolean,
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
130 visual_bell, XtRImmediate, 0),
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
131 res (XtNbellVolume, XtCBellVolume, XtRInt, int,
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
132 bell_volume, XtRImmediate, 0),
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
133 res (XtNuseBackingStore, XtCUseBackingStore, XtRBoolean, Boolean,
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
134 use_backing_store, XtRImmediate, 0),
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
135 res (XtNpreferredWidth, XtCPreferredWidth, XtRDimension, Dimension,
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
136 preferred_width, XtRImmediate, 0),
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
137 res (XtNpreferredHeight, XtCPreferredHeight, XtRDimension, Dimension,
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
138 preferred_height, XtRImmediate, 0),
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
139 };
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
140
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141 #undef offset
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
143 /* Xt is stupid and dumb.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144 Xt is stupid and dumb.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145 Xt is stupid and dumb. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
146
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147 static XtActionsRec
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148 emacsFrameActionsTable [] = {
4528
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
149 { (String) "mapping", (XtActionProc) emacs_Xt_mapping_action},
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150 };
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152 static char
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
153 emacsFrameTranslations [] = "\
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
154 <Mapping>: mapping()\n\
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155 ";
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
157 /* If we're running under Motif, make this widget a subclass
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158 of XmPrimitive. It's not clear this is necessary, but it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159 may make focus behavior work better. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
161 EmacsFrameClassRec emacsFrameClassRec = {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162 { /* core fields */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163 #ifdef LWLIB_USES_MOTIF
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164 /* superclass */ (WidgetClass) &xmPrimitiveClassRec,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165 #else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166 /* superclass */ &widgetClassRec,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167 #endif
4528
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
168 /* class_name */ (String) "EmacsFrame",
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
169 /* widget_size */ sizeof (EmacsFrameRec),
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170 /* class_initialize */ EmacsFrameClassInitialize,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171 /* class_part_initialize */ 0,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
172 /* class_inited */ FALSE,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173 /* initialize */ EmacsFrameInitialize,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174 /* initialize_hook */ 0,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
175 /* realize */ EmacsFrameRealize,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
176 /* actions */ emacsFrameActionsTable,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
177 /* num_actions */ XtNumber (emacsFrameActionsTable),
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
178 /* resources */ resources,
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
179 /* resource_count */ XtNumber (resources),
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
180 /* xrm_class */ NULLQUARK,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
181 /* compress_motion */ TRUE,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
182 /* compress_exposure */ TRUE,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
183 /* compress_enterleave */ TRUE,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
184 /* visible_interest */ FALSE,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
185 /* destroy */ NULL,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
186 /* resize */ EmacsFrameResize,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
187 /* expose */ XtInheritExpose,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
188 /* set_values */ EmacsFrameSetValues,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
189 /* set_values_hook */ 0,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
190 /* set_values_almost */ XtInheritSetValuesAlmost,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191 /* get_values_hook */ 0,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
192 /* accept_focus */ XtInheritAcceptFocus,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
193 /* version */ XtVersion,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
194 /* callback_private */ 0,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195 /* tm_table */ emacsFrameTranslations,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
196 /* query_geometry */ EmacsFrameQueryGeometry,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197 /* display_accelerator */ XtInheritDisplayAccelerator,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
198 /* extension */ 0
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
199 },
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200 #ifdef LWLIB_USES_MOTIF
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
201 { /* XmPrimitiveClassPart
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
203 (XtWidgetProc) _XtInherit, /* border_highlight */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204 (XtWidgetProc) _XtInherit, /* border_unhighlight */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205 /* Setting the following to NULL causes PrimitiveInitialize()
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206 not to add traversal (TAB etc. to switch focus) and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
207 focus-in/out (border highlight/unhighlight) translations.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
208 If you want those translations, use the value XtInheritTranslations
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
209 instead. Doing this, however, will interfere with Emacs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
210 focus handling (which highlights/unhighlights the text cursor),
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
211 and will lead to strange display results around the border of the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
212 widget. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
213 NULL, /* translations */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
214 NULL, /* arm_and_activate */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
215 NULL, /* get resources */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
216 0, /* num get_resources */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
217 NULL, /* extension */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218 },
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
219 #endif /* LWLIB_USES_MOTIF */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
220 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
221 0
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
222 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
223 };
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
224 WidgetClass emacsFrameClass = (WidgetClass) &emacsFrameClassRec;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
225
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
226 static void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227 update_various_frame_slots (EmacsFrame ew)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
228 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
229 ew->emacs_frame.frame->pixheight = ew->core.height;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
230 ew->emacs_frame.frame->pixwidth = ew->core.width;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
231 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
232
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
233 static void
3025
facf3239ba30 [xemacs-hg @ 2005-10-25 11:16:19 by ben]
ben
parents: 2500
diff changeset
234 EmacsFrameInitialize (Widget UNUSED (request), Widget new_,
2286
04bc9d2f42c7 [xemacs-hg @ 2004-09-20 19:18:55 by james]
james
parents: 872
diff changeset
235 ArgList UNUSED (unused1), Cardinal *UNUSED (unused2))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
236 {
3025
facf3239ba30 [xemacs-hg @ 2005-10-25 11:16:19 by ben]
ben
parents: 2500
diff changeset
237 EmacsFrame ew = (EmacsFrame)new_;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
238 struct frame *f = ew->emacs_frame.frame;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
239
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240 if (!f)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
241 fatal ("can't create an emacs frame widget without a frame.");
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
242
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
243 ew->emacs_frame.frame->internal_border_width =
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
244 ew->emacs_frame.internal_border_width;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
245 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
246
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
247 void emacs_Xt_event_handler (Widget wid /* unused */,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
248 XtPointer closure /* unused */,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
249 XEvent *event,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
250 Boolean *continue_to_dispatch /* unused */);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
251
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
252 static void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
253 EmacsFrameRealize (Widget widget, XtValueMask *mask,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
254 XSetWindowAttributes *attrs)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
255 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
256 EmacsFrame ew = (EmacsFrame) widget;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
257 struct frame *f = ew->emacs_frame.frame;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
258 Widget shell_widget = FRAME_X_SHELL_WIDGET (f);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
259
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
260 attrs->event_mask =
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
261 ExposureMask |
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
262 VisibilityChangeMask |
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
263 PropertyChangeMask |
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
264 StructureNotifyMask |
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
265 SubstructureNotifyMask |
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
266 /*SubstructureRedirectMask |*/ /* Only for WMs! */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
267 KeyPressMask |
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
268 KeyReleaseMask |
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
269 ButtonPressMask |
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
270 ButtonReleaseMask |
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
271 FocusChangeMask |
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
272 PointerMotionHintMask |
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
273 PointerMotionMask |
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
274 LeaveWindowMask |
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
275 EnterWindowMask;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
276
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
277
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
278 *mask |= CWEventMask;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
279
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
280 if (ew->emacs_frame.use_backing_store)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
281 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
282 attrs->backing_store = Always;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
283 *mask |= CWBackingStore;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
284 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
285 XtCreateWindow (widget, InputOutput, (Visual *)CopyFromParent, *mask,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
286 attrs);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
287
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
288 /* snarf the events we want. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
289 XtInsertEventHandler (widget, attrs->event_mask, TRUE,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
290 emacs_Xt_event_handler, NULL, XtListHead);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
291 /* some events (e.g. map-notify and WM_DELETE_WINDOW) get sent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
292 directly to the shell, and the above event handler won't see
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
293 them. So add a handler to get them. These events don't
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
294 propagate, so there's no danger of them being seen twice. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
295 XtInsertEventHandler (shell_widget,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
296 EnterWindowMask | LeaveWindowMask |
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
297 VisibilityChangeMask | StructureNotifyMask |
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
298 KeyPressMask,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
299 TRUE, emacs_Xt_event_handler, NULL, XtListHead);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
300
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
301 #ifdef EXTERNAL_WIDGET
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
302 /* #### Not sure if this special case is necessary */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
303 if (!FRAME_X_EXTERNAL_WINDOW_P (f))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
304 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
305 /* This is necessary under Motif in order to make it possible to click in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
306 a buffer and move focus out of a dialog box or control panel and back
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
307 into emacs-land; also necessary so that you can still type chars
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
308 if the cursor is over the menubar or scrollbar. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
309 lw_set_keyboard_focus (shell_widget, FRAME_X_TEXT_WIDGET (f));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
310 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
311
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
312 /* DO NOT CALL THIS FUNCTION! Only Xt is supposed to do this. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
313
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
314 static void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
315 EmacsFrameResize (Widget widget)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
316 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
317 EmacsFrame ew = (EmacsFrame)widget;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
318 struct frame *f = ew->emacs_frame.frame;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
319 int columns;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
320 int rows;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
321 XtWidgetGeometry req, repl;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
322
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
323 update_various_frame_slots (ew);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
324
5043
d0c14ea98592 various frame-geometry fixes
Ben Wing <ben@xemacs.org>
parents: 4769
diff changeset
325 pixel_to_frame_unit_size (f, ew->core.width, ew->core.height, &columns, &rows);
d0c14ea98592 various frame-geometry fixes
Ben Wing <ben@xemacs.org>
parents: 4769
diff changeset
326 change_frame_size (f, columns, rows, 0);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
327
3381
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 3025
diff changeset
328 /* The code below is just plain wrong. If the EmacsShell or EmacsManager
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 3025
diff changeset
329 needs to know, they should just ask. If needed information is being
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 3025
diff changeset
330 updated here, then we should set a dirty flag and have it updated on an
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 3025
diff changeset
331 as-needed basis.
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 3025
diff changeset
332 For now, conditionalize so people can get work done if this breaks
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 3025
diff changeset
333 something. */
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 3025
diff changeset
334 if (wedge_metacity) /* cf. x_set_frame_size */
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 3025
diff changeset
335 {
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 3025
diff changeset
336 /* Now we tell the EmacsShell that we've changed the size of the
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 3025
diff changeset
337 non-fixed portion of the frame. Note that, if the resize occurred
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 3025
diff changeset
338 as a result of EmacsFrameSetCharSize(), this information will be
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 3025
diff changeset
339 stored twice. This is not a big deal, as storing this information
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 3025
diff changeset
340 doesn't actually do anything until the next resize. */
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 3025
diff changeset
341 if (FRAME_X_TOP_LEVEL_FRAME_P (f))
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 3025
diff changeset
342 x_wm_set_variable_size (FRAME_X_SHELL_WIDGET (f), columns, rows);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
343
3381
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 3025
diff changeset
344 /* Kick the manager so that it knows we've changed size.
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 3025
diff changeset
345 #### No, no, no! If this does anything at all, it will involve
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 3025
diff changeset
346 changing the manager's size. That's not something that a child
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 3025
diff changeset
347 widget should initialize as part of a purely informational
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 3025
diff changeset
348 method!! */
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 3025
diff changeset
349 req.request_mode = 0;
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 3025
diff changeset
350 XtQueryGeometry (FRAME_X_CONTAINER_WIDGET (f), &req, &repl);
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 3025
diff changeset
351 EmacsManagerChangeSize (FRAME_X_CONTAINER_WIDGET (f),
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 3025
diff changeset
352 repl.width, repl.height);
374186f156d5 [xemacs-hg @ 2006-05-06 17:55:58 by stephent]
stephent
parents: 3025
diff changeset
353 }
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
354 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
355
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
356 static Boolean
2286
04bc9d2f42c7 [xemacs-hg @ 2004-09-20 19:18:55 by james]
james
parents: 872
diff changeset
357 EmacsFrameSetValues (Widget cur_widget, Widget UNUSED (req_widget),
04bc9d2f42c7 [xemacs-hg @ 2004-09-20 19:18:55 by james]
james
parents: 872
diff changeset
358 Widget new_widget, ArgList argv, Cardinal *argc)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
359 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
360 EmacsFrame cur = (EmacsFrame) cur_widget;
3025
facf3239ba30 [xemacs-hg @ 2005-10-25 11:16:19 by ben]
ben
parents: 2500
diff changeset
361 EmacsFrame new_ = (EmacsFrame) new_widget;
facf3239ba30 [xemacs-hg @ 2005-10-25 11:16:19 by ben]
ben
parents: 2500
diff changeset
362 struct frame *f = new_->emacs_frame.frame;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
363 in_resource_setting++;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
364 /* This function does not need to do much. Pretty much everything
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
365 interesting will get done in the resize method, which will
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
366 (if necessary) get called by Xt when this function returns
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
367 (see below).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
368 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
369
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
370 /* #### This function will not work if it is not called from
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
371 update_EmacsFrame(), called from SET_FACE_PROPERTY().
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
372 The code located there should be moved inside of here instead,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
373 so that things work if either SET_FACE_PROPERTY() is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
374 called or XtSetValues() is called.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
375 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
376
3025
facf3239ba30 [xemacs-hg @ 2005-10-25 11:16:19 by ben]
ben
parents: 2500
diff changeset
377 if (cur->emacs_frame.iconic != new_->emacs_frame.iconic &&
facf3239ba30 [xemacs-hg @ 2005-10-25 11:16:19 by ben]
ben
parents: 2500
diff changeset
378 FRAME_X_TOP_LEVEL_FRAME_P (new_->emacs_frame.frame))
facf3239ba30 [xemacs-hg @ 2005-10-25 11:16:19 by ben]
ben
parents: 2500
diff changeset
379 x_wm_set_shell_iconic_p (FRAME_X_SHELL_WIDGET (new_->emacs_frame.frame),
facf3239ba30 [xemacs-hg @ 2005-10-25 11:16:19 by ben]
ben
parents: 2500
diff changeset
380 new_->emacs_frame.iconic);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
381
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
382 /* If we got here, then we were likely called as a result of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
383 the EditRes protocol, so go ahead and change scrollbar-width
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
384 and scrollbar-height. Otherwise, we're merely mirroring
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
385 a change made to scrollbar-width etc. so don't do anything
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
386 special. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
387 if (cur->emacs_frame.internal_border_width !=
3025
facf3239ba30 [xemacs-hg @ 2005-10-25 11:16:19 by ben]
ben
parents: 2500
diff changeset
388 new_->emacs_frame.internal_border_width)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
389 {
3025
facf3239ba30 [xemacs-hg @ 2005-10-25 11:16:19 by ben]
ben
parents: 2500
diff changeset
390 f->internal_border_width = new_->emacs_frame.internal_border_width;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
391 MARK_FRAME_SIZE_SLIPPED (f);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
392 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
393
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
394 #ifdef HAVE_SCROLLBARS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
395 if (cur->emacs_frame.scrollbar_width !=
3025
facf3239ba30 [xemacs-hg @ 2005-10-25 11:16:19 by ben]
ben
parents: 2500
diff changeset
396 new_->emacs_frame.scrollbar_width)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
397 Fadd_spec_to_specifier
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
398 (Vscrollbar_width,
5581
56144c8593a8 Mechanically change INT to FIXNUM in our sources.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5402
diff changeset
399 make_fixnum (new_->emacs_frame.scrollbar_width),
872
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 869
diff changeset
400 wrap_frame (f), Qnil, Qnil);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
401 if (cur->emacs_frame.scrollbar_height !=
3025
facf3239ba30 [xemacs-hg @ 2005-10-25 11:16:19 by ben]
ben
parents: 2500
diff changeset
402 new_->emacs_frame.scrollbar_height)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
403 Fadd_spec_to_specifier
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
404 (Vscrollbar_height,
5581
56144c8593a8 Mechanically change INT to FIXNUM in our sources.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5402
diff changeset
405 make_fixnum (new_->emacs_frame.scrollbar_height),
872
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 869
diff changeset
406 wrap_frame (f), Qnil, Qnil);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
407 #endif /* HAVE_SCROLLBARS */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
408 #ifdef HAVE_TOOLBARS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
409 if (cur->emacs_frame.top_toolbar_height !=
3025
facf3239ba30 [xemacs-hg @ 2005-10-25 11:16:19 by ben]
ben
parents: 2500
diff changeset
410 new_->emacs_frame.top_toolbar_height)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
411 Fadd_spec_to_specifier
5077
d372b17f63ce clean up toolbar/gutter edge geometry
Ben Wing <ben@xemacs.org>
parents: 5052
diff changeset
412 (Vtoolbar_size[TOP_EDGE],
5581
56144c8593a8 Mechanically change INT to FIXNUM in our sources.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5402
diff changeset
413 make_fixnum (new_->emacs_frame.top_toolbar_height),
872
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 869
diff changeset
414 wrap_frame (f), Qnil, Qnil);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
415 if (cur->emacs_frame.bottom_toolbar_height !=
3025
facf3239ba30 [xemacs-hg @ 2005-10-25 11:16:19 by ben]
ben
parents: 2500
diff changeset
416 new_->emacs_frame.bottom_toolbar_height)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
417 Fadd_spec_to_specifier
5077
d372b17f63ce clean up toolbar/gutter edge geometry
Ben Wing <ben@xemacs.org>
parents: 5052
diff changeset
418 (Vtoolbar_size[BOTTOM_EDGE],
5581
56144c8593a8 Mechanically change INT to FIXNUM in our sources.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5402
diff changeset
419 make_fixnum (new_->emacs_frame.bottom_toolbar_height),
872
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 869
diff changeset
420 wrap_frame (f), Qnil, Qnil);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
421 if (cur->emacs_frame.left_toolbar_width !=
3025
facf3239ba30 [xemacs-hg @ 2005-10-25 11:16:19 by ben]
ben
parents: 2500
diff changeset
422 new_->emacs_frame.left_toolbar_width)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
423 Fadd_spec_to_specifier
5077
d372b17f63ce clean up toolbar/gutter edge geometry
Ben Wing <ben@xemacs.org>
parents: 5052
diff changeset
424 (Vtoolbar_size[LEFT_EDGE],
5581
56144c8593a8 Mechanically change INT to FIXNUM in our sources.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5402
diff changeset
425 make_fixnum (new_->emacs_frame.left_toolbar_width),
872
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 869
diff changeset
426 wrap_frame (f), Qnil, Qnil);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
427 if (cur->emacs_frame.right_toolbar_width !=
3025
facf3239ba30 [xemacs-hg @ 2005-10-25 11:16:19 by ben]
ben
parents: 2500
diff changeset
428 new_->emacs_frame.right_toolbar_width)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
429 Fadd_spec_to_specifier
5077
d372b17f63ce clean up toolbar/gutter edge geometry
Ben Wing <ben@xemacs.org>
parents: 5052
diff changeset
430 (Vtoolbar_size[RIGHT_EDGE],
5581
56144c8593a8 Mechanically change INT to FIXNUM in our sources.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5402
diff changeset
431 make_fixnum (new_->emacs_frame.right_toolbar_width),
872
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 869
diff changeset
432 wrap_frame (f), Qnil, Qnil);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
433 if (cur->emacs_frame.top_toolbar_border_width !=
3025
facf3239ba30 [xemacs-hg @ 2005-10-25 11:16:19 by ben]
ben
parents: 2500
diff changeset
434 new_->emacs_frame.top_toolbar_border_width)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
435 Fadd_spec_to_specifier
5077
d372b17f63ce clean up toolbar/gutter edge geometry
Ben Wing <ben@xemacs.org>
parents: 5052
diff changeset
436 (Vtoolbar_border_width[TOP_EDGE],
5581
56144c8593a8 Mechanically change INT to FIXNUM in our sources.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5402
diff changeset
437 make_fixnum (new_->emacs_frame.top_toolbar_border_width),
872
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 869
diff changeset
438 wrap_frame (f), Qnil, Qnil);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
439 if (cur->emacs_frame.bottom_toolbar_border_width !=
3025
facf3239ba30 [xemacs-hg @ 2005-10-25 11:16:19 by ben]
ben
parents: 2500
diff changeset
440 new_->emacs_frame.bottom_toolbar_border_width)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
441 Fadd_spec_to_specifier
5077
d372b17f63ce clean up toolbar/gutter edge geometry
Ben Wing <ben@xemacs.org>
parents: 5052
diff changeset
442 (Vtoolbar_border_width[BOTTOM_EDGE],
5581
56144c8593a8 Mechanically change INT to FIXNUM in our sources.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5402
diff changeset
443 make_fixnum (new_->emacs_frame.bottom_toolbar_border_width),
872
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 869
diff changeset
444 wrap_frame (f), Qnil, Qnil);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
445 if (cur->emacs_frame.left_toolbar_border_width !=
3025
facf3239ba30 [xemacs-hg @ 2005-10-25 11:16:19 by ben]
ben
parents: 2500
diff changeset
446 new_->emacs_frame.left_toolbar_border_width)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
447 Fadd_spec_to_specifier
5077
d372b17f63ce clean up toolbar/gutter edge geometry
Ben Wing <ben@xemacs.org>
parents: 5052
diff changeset
448 (Vtoolbar_border_width[LEFT_EDGE],
5581
56144c8593a8 Mechanically change INT to FIXNUM in our sources.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5402
diff changeset
449 make_fixnum (new_->emacs_frame.left_toolbar_border_width),
872
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 869
diff changeset
450 wrap_frame (f), Qnil, Qnil);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
451 if (cur->emacs_frame.right_toolbar_border_width !=
3025
facf3239ba30 [xemacs-hg @ 2005-10-25 11:16:19 by ben]
ben
parents: 2500
diff changeset
452 new_->emacs_frame.right_toolbar_border_width)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
453 Fadd_spec_to_specifier
5077
d372b17f63ce clean up toolbar/gutter edge geometry
Ben Wing <ben@xemacs.org>
parents: 5052
diff changeset
454 (Vtoolbar_border_width[RIGHT_EDGE],
5581
56144c8593a8 Mechanically change INT to FIXNUM in our sources.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5402
diff changeset
455 make_fixnum (new_->emacs_frame.right_toolbar_border_width),
872
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 869
diff changeset
456 wrap_frame (f), Qnil, Qnil);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
457 #endif /* HAVE_TOOLBARS */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
458
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
459 in_resource_setting--;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
460
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
461 /* If the request was to resize us, but the size has not changed, Xt
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
462 will do nothing, and won't call our resize callback. Since such a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
463 request might be issued as a result of hiding/showing menubar or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
464 changing toolbar placement, where we rely on relayout made by the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
465 callback, we go ahead and simulate such a call */
3025
facf3239ba30 [xemacs-hg @ 2005-10-25 11:16:19 by ben]
ben
parents: 2500
diff changeset
466 if (cur->core.width == new_->core.width
facf3239ba30 [xemacs-hg @ 2005-10-25 11:16:19 by ben]
ben
parents: 2500
diff changeset
467 && cur->core.height == new_->core.height)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
468 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
469 int i;
647
b39c14581166 [xemacs-hg @ 2001-08-13 04:45:47 by ben]
ben
parents: 440
diff changeset
470 for (i = 0; i < (int) *argc; i++)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
471 if (strcmp (argv[i].name, XtNwidth) == 0
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
472 || strcmp (argv[i].name, XtNheight) == 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
473 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
474 EmacsFrameResize (new_widget);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
475 break;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
476 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
477 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
478
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
479 return False;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
480
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
481 /* Note that if either (a) we return True, or (b) the width or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
482 height has changed, an Expose event will be generated. The Xt
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
483 manual says you should not return True if the width or height has
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
484 changed, because then two Expose events will be generated.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
485
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
486 In any case, there is no need to return True because
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
487 SET_FACE_PROPERTY(), which does the resource
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
488 setting, automatically forces a redisplay as necessary. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
489 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
490
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
491 static XtGeometryResult
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
492 EmacsFrameQueryGeometry (Widget widget, XtWidgetGeometry *request,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
493 XtWidgetGeometry *result)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
494 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
495 EmacsFrame ew = (EmacsFrame) widget;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
496 int mask = request->request_mode;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
497 Dimension width, height;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
498 int ok_width_int, ok_height_int;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
499 Dimension ok_width, ok_height;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
500
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
501 /* We have a definite preference for what size we would like
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
502 to be.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
503
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
504 1) If a preferred size was specified for us, use it.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
505 (This is not currently used)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
506 2) If a proposed size was given, round it to the nearest
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
507 multiple of the default char size and return it.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
508 3) Otherwise, take our current size and round it to the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
509 nearest multiple of the default char size. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
510
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
511 width = mask & CWWidth ? request->width : ew->core.width;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
512 height = mask & CWHeight ? request->height : ew->core.height;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
513 round_size_to_char (ew->emacs_frame.frame, width, height,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
514 &ok_width_int, &ok_height_int);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
515 ok_width = (Dimension) ok_width_int;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
516 ok_height = (Dimension) ok_height_int;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
517 if (ew->emacs_frame.preferred_width)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
518 ok_width = ew->emacs_frame.preferred_width;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
519 if (ew->emacs_frame.preferred_height)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
520 ok_height = ew->emacs_frame.preferred_height;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
521 result->request_mode |= CWWidth | CWHeight;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
522 result->width = ok_width;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
523 result->height = ok_height;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
524 if (((mask & CWWidth) && ok_width != request->width)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
525 || ((mask & CWHeight) && ok_height != request->height))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
526 return XtGeometryAlmost;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
527 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
528 return XtGeometryYes;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
529 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
530
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
531 /* Xt string-to-scrollbar-placement converter */
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
532 /* #### Convert this to a `new-style' converter (See XtAddTypeConverter) */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
533
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
534 /* This variable cannot be a stack variable. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
535 static unsigned char cvt_string_scrollbar_placement;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
536
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
537 /* ARGSUSED */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
538 static void
2286
04bc9d2f42c7 [xemacs-hg @ 2004-09-20 19:18:55 by james]
james
parents: 872
diff changeset
539 Xt_StringToScrollBarPlacement (XrmValuePtr UNUSED (args),
04bc9d2f42c7 [xemacs-hg @ 2004-09-20 19:18:55 by james]
james
parents: 872
diff changeset
540 Cardinal *UNUSED (num_args),
04bc9d2f42c7 [xemacs-hg @ 2004-09-20 19:18:55 by james]
james
parents: 872
diff changeset
541 XrmValuePtr fromVal,
04bc9d2f42c7 [xemacs-hg @ 2004-09-20 19:18:55 by james]
james
parents: 872
diff changeset
542 XrmValuePtr toVal)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
543 {
2367
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 2286
diff changeset
544 /* !!#### needs work */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
545 XrmQuark q;
851
e7ee5f8bde58 [xemacs-hg @ 2002-05-23 11:46:08 by ben]
ben
parents: 800
diff changeset
546 char *lowerName = (char *) ALLOCA (strlen ((char *) fromVal->addr) + 1);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
547
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
548 XmuCopyISOLatin1Lowered (lowerName, (char *) fromVal->addr);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
549 q = XrmStringToQuark (lowerName);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
550
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
551 toVal->size = sizeof (cvt_string_scrollbar_placement);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
552 toVal->addr = (XPointer) &cvt_string_scrollbar_placement;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
553
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
554 if (q == XrmStringToQuark ("top-left")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
555 || q == XrmStringToQuark ("top_left"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
556 cvt_string_scrollbar_placement = XtTOP_LEFT;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
557 else if (q == XrmStringToQuark ("bottom-left")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
558 || q == XrmStringToQuark ("bottom_left"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
559 cvt_string_scrollbar_placement = XtBOTTOM_LEFT;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
560 else if (q == XrmStringToQuark ("top-right")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
561 || q == XrmStringToQuark ("top_right"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
562 cvt_string_scrollbar_placement = XtTOP_RIGHT;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
563 else if (q == XrmStringToQuark ("bottom-right")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
564 || q == XrmStringToQuark ("bottom_right"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
565 cvt_string_scrollbar_placement = XtBOTTOM_RIGHT;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
566 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
567 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
568 XtStringConversionWarning (fromVal->addr, "scrollBarPlacement");
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
569 toVal->addr = NULL;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
570 toVal->size = 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
571 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
572 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
573
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
574 static void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
575 EmacsFrameClassInitialize (void)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
576 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
577 XtAddConverter (XtRString, XtRScrollBarPlacement,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
578 Xt_StringToScrollBarPlacement, NULL, 0);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
579 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
580
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
581 /********************* Special entrypoints *******************/
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
582
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
583 void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
584 EmacsFrameRecomputeCellSize (Widget w)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
585 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
586 EmacsFrame ew = (EmacsFrame) w;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
587 int cw, ch;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
588 struct frame *f = ew->emacs_frame.frame;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
589
5050
6f2158fa75ed Fix quick-build, use asserts() in place of ABORT()
Ben Wing <ben@xemacs.org>
parents: 4769
diff changeset
590 assert (XtIsSubclass (w, emacsFrameClass));
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
591
5047
07dcc7000bbf put width before height consistently, fix a real bug found in the process
Ben Wing <ben@xemacs.org>
parents: 5043
diff changeset
592 default_face_width_and_height (wrap_frame (f), &cw, &ch);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
593 if (FRAME_X_TOP_LEVEL_FRAME_P (f))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
594 x_wm_set_cell_size (FRAME_X_SHELL_WIDGET (f), cw, ch);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
595 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
596
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
597 /* Set the size of the widget to have the number of rows and columns
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
598 specified. This both causes the X window to change and the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
599 internal frame structures to get modified to match. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
600
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
601 void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
602 EmacsFrameSetCharSize (Widget widget, int columns, int rows)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
603 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
604 EmacsFrame ew = (EmacsFrame) widget;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
605 int pixel_width, pixel_height;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
606 struct frame *f = ew->emacs_frame.frame;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
607
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
608 if (columns < 3)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
609 columns = 3; /* no way buddy */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
610 if (rows < 1)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
611 rows = 1;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
612
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
613 char_to_pixel_size (f, columns, rows, &pixel_width, &pixel_height);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
614
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
615 if (FRAME_X_TOP_LEVEL_FRAME_P (f))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
616 x_wm_set_variable_size (FRAME_X_SHELL_WIDGET (f), columns, rows);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
617
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
618 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
619 Arg al [2];
4528
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
620 Xt_SET_ARG (al [0], XtNwidth, pixel_width);
726060ee587c First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents: 4522
diff changeset
621 Xt_SET_ARG (al [1], XtNheight, pixel_height);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
622 XtSetValues ((Widget) ew, al, countof (al));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
623 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
624 }