2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these libraries and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
26 * (c) Copyright 1989, 1990, 1991, 1992, 1993, 1994 OPEN SOFTWARE FOUNDATION, INC.
33 * (c) Copyright 1987,1988,1989,1990,1992,1993,1994 HEWLETT-PACKARD COMPANY
34 * (c) Copyright 1993, 1994 International Business Machines Corp.
35 * (c) Copyright 1993, 1994 Sun Microsystems, Inc.
36 * (c) Copyright 1993, 1994 Novell, Inc.
39 /* ANSI C definitions, This should be the first thing in WmGlobal.h */
53 #include <X11/Xutil.h>
55 #include <X11/extensions/shape.h>
57 #include <X11/IntrinsicP.h>
58 #include <X11/Intrinsic.h>
59 #include <X11/StringDefs.h>
60 #include <Xm/MwmUtil.h>
62 #include <Xm/ColorObjP.h>
63 #include <Dt/Service.h>
67 #include <Dt/Action.h>
69 #if defined(sun) && defined(ALLPLANES)
70 #include <X11/extensions/allplanes.h>
71 #endif /* defined(sun) && defined(ALLPLANES) */
74 * Value definitions and macros:
77 extern int WmIdentity;
80 * Color server defines
82 #define CSERVE_NORMAL 0
83 #define CSERVE_NOT_AVAILABLE 1
84 #define CSERVE_FAILURE 2
86 /* window manager name and class used to get resources: */
87 #define WM_RESOURCE_CLASS "Mwm"
88 #define WM_RESOURCE_NAME "mwm"
90 #define DT_WM_RESOURCE_CLASS "Dtwm"
91 #define DT_WM_RESOURCE_NAME "dtwm"
94 extern Pixel FPbackground;
95 extern Pixel FPforeground;
96 extern Pixel FPtopshadow;
97 extern Pixel FPbottomshadow;
98 extern Pixel FPselectcolor;
100 #define USE_ACTIVE_PIXELSET 0
101 #define USE_INACTIVE_PIXELSET 1
102 #define USE_PRIMARY_PIXELSET 2
103 #define USE_SECONDARY_PIXELSET 3
108 #define MwmBehavior (WmIdentity == MWM)
109 #define DtwmBehavior (WmIdentity == DT_MWM)
112 /* ICCC atom names: */
114 #define _XA_WM_STATE "WM_STATE"
115 #define _XA_WM_PROTOCOLS "WM_PROTOCOLS"
116 #define _XA_WM_CHANGE_STATE "WM_CHANGE_STATE"
117 #define _XA_WM_SAVE_YOURSELF "WM_SAVE_YOURSELF"
118 #define _XA_WM_DELETE_WINDOW "WM_DELETE_WINDOW"
119 #define _XA_WM_TAKE_FOCUS "WM_TAKE_FOCUS"
120 #define _XA_WM_COLORMAP_WINDOWS "WM_COLORMAP_WINDOWS"
122 /* window manager exit value on fatal errors: */
123 #define WM_ERROR_EXIT_VALUE 1
125 /* built-in button bindings for window manager actions: */
126 #define SELECT_BUTTON Button1
127 #define SELECT_BUTTON_MASK Button1Mask
128 #define SELECT_BUTTON_MOTION_MASK Button1MotionMask
130 #define FOCUS_SELECT_BUTTON SELECT_BUTTON
131 #define FOCUS_SELECT_MODIFIERS 0
133 /* direct manipulation button */
134 #define DMANIP_BUTTON Button2
135 #define DMANIP_BUTTON_MASK Button2Mask
136 #define DMANIP_BUTTON_MOTION_MASK Button2MotionMask
139 #define BMENU_BUTTON Button3
140 #define BMENU_BUTTON_MASK Button3Mask
142 /* max number of buttons on a mouse */
143 #define NUM_BUTTONS 5
145 /* Needed by PostMenu() to specify key post: */
148 /* manage window flags: */
149 #define MANAGEW_WM_STARTUP (1L << 0)
150 #define MANAGEW_WM_RESTART (1L << 1)
151 #define MANAGEW_NORMAL (1L << 2)
152 #define MANAGEW_ICON_BOX (1L << 3)
153 #define MANAGEW_CONFIRM_BOX (1L << 4)
154 #define MANAGEW_WM_RESTART_ICON (1L << 5)
156 #define MANAGEW_WM_CLIENTS (MANAGEW_ICON_BOX | \
157 MANAGEW_CONFIRM_BOX )
159 /* keyboard input focus flag values (for calls to SetKeyboardFocus) */
160 #define ALWAYS_SET_FOCUS (1L << 0)
161 #define REFRESH_LAST_FOCUS (1L << 1)
162 #define CLIENT_AREA_FOCUS (1L << 2)
163 #define SCREEN_SWITCH_FOCUS (1L << 3)
164 /* special value for use for Do_Focus_Key to set to internal window */
165 #define WORKSPACE_IF_NULL (1L << 4)
167 /* Menu posting flag values (for calls to PostMenu) */
168 #define POST_AT_XY (1L << 0)
169 #define POST_TRAVERSAL_ON (1L << 1)
170 #define POST_STICKY (1L << 2)
172 /* feedback box styles */
174 #define FB_SIZE (1L << 0)
175 #define FB_POSITION (1L << 1)
177 /* confirmbox and waitbox indexes */
178 #define DEFAULT_BEHAVIOR_ACTION 0
179 #define CUSTOM_BEHAVIOR_ACTION 1
180 #define RESTART_ACTION 2
181 #define QUIT_MWM_ACTION 3
183 /* extract text height in pixels from a (XFontStruct *) */
184 #define TEXT_HEIGHT(pfs) (((pfs)->ascent)+((pfs)->descent))
186 /* icon frame shadow widths */
187 #define ICON_EXTERNAL_SHADOW_WIDTH (wmGD.iconExternalShadowWidth)
188 #define ICON_INTERNAL_SHADOW_WIDTH 1
191 #define ICON_IMAGE_TOP_PAD 2
192 #define ICON_IMAGE_BOTTOM_PAD 2
193 #define ICON_IMAGE_LEFT_PAD 2
194 #define ICON_IMAGE_RIGHT_PAD 2
197 #define ICON_INNER_X_OFFSET \
198 (ICON_IMAGE_LEFT_PAD+ICON_EXTERNAL_SHADOW_WIDTH)
199 #define ICON_INNER_Y_OFFSET \
200 (ICON_IMAGE_TOP_PAD+ICON_EXTERNAL_SHADOW_WIDTH)
203 #define ICON_IMAGE_X_OFFSET ICON_INNER_X_OFFSET+ICON_INTERNAL_SHADOW_WIDTH
204 #define ICON_IMAGE_Y_OFFSET ICON_INNER_Y_OFFSET+ICON_INTERNAL_SHADOW_WIDTH
208 /* number of rectangles to allocate */
209 #define NUM_MATTE_TS_RECTS (6)
210 #define NUM_MATTE_BS_RECTS (6)
212 #define NUM_IMAGE_TOP_RECTS \
213 ((2*ICON_EXTERNAL_SHADOW_WIDTH)+(2*ICON_INTERNAL_SHADOW_WIDTH))
216 #define NUM_IMAGE_BOTTOM_RECTS \
217 ((2*ICON_EXTERNAL_SHADOW_WIDTH)+(2*ICON_INTERNAL_SHADOW_WIDTH))
220 #define NUM_LABEL_TOP_RECTS (2*ICON_EXTERNAL_SHADOW_WIDTH)
221 #define NUM_LABEL_BOTTOM_RECTS (2*ICON_EXTERNAL_SHADOW_WIDTH)
223 #define NUM_BOTH_TOP_RECTS \
224 ((3*ICON_EXTERNAL_SHADOW_WIDTH)+(3*ICON_INTERNAL_SHADOW_WIDTH))
227 #define NUM_BOTH_BOTTOM_RECTS \
228 ((3*ICON_EXTERNAL_SHADOW_WIDTH)+(3*ICON_INTERNAL_SHADOW_WIDTH))
231 #define NUM_STATIC_TOP_RECTS (2*ICON_INTERNAL_SHADOW_WIDTH)
232 #define NUM_STATIC_BOTTOM_RECTS (2*ICON_INTERNAL_SHADOW_WIDTH)
235 /* client frame shadow widths */
236 #define FRAME_EXTERNAL_SHADOW_WIDTH (wmGD.frameExternalShadowWidth)
237 #define FRAME_INTERNAL_SHADOW_WIDTH 1
238 #define FRAME_CLIENT_SHADOW_WIDTH 1
239 #define FRAME_MATTE_SHADOW_WIDTH 1
241 /* padding around text in title bar */
242 #define WM_TOP_TITLE_PADDING 1
243 #define WM_BOTTOM_TITLE_PADDING 1
244 #define WM_TOP_TITLE_SHADOW FRAME_INTERNAL_SHADOW_WIDTH
245 #define WM_BOTTOM_TITLE_SHADOW FRAME_INTERNAL_SHADOW_WIDTH
247 #define WM_TITLE_BAR_PADDING (WM_TOP_TITLE_PADDING \
248 +WM_BOTTOM_TITLE_PADDING \
249 +WM_TOP_TITLE_SHADOW \
250 +WM_BOTTOM_TITLE_SHADOW)
252 /* stretch directions - (starts at NW and goes clockwise) */
253 #define STRETCH_NO_DIRECTION -1
254 #define STRETCH_NORTH_WEST 0
255 #define STRETCH_NORTH 1
256 #define STRETCH_NORTH_EAST 2
257 #define STRETCH_EAST 3
258 #define STRETCH_SOUTH_EAST 4
259 #define STRETCH_SOUTH 5
260 #define STRETCH_SOUTH_WEST 6
261 #define STRETCH_WEST 7
263 #define STRETCH_COUNT 8
266 /* Workspace allocation granularity */
267 #define WS_ALLOC_AMOUNT 8
269 /* Window list allocation granularity */
270 #define WINDOW_ALLOC_AMOUNT 16
272 /* function flag masks */
273 #define WM_FUNC_DEFAULT MWM_FUNC_ALL
274 #define WM_FUNC_NONE 0
275 #define WM_FUNC_ALL (MWM_FUNC_RESIZE | MWM_FUNC_MOVE |\
276 MWM_FUNC_MINIMIZE | MWM_FUNC_MAXIMIZE |\
279 /* decorations flag masks */
280 #define WM_DECOR_DEFAULT MWM_DECOR_ALL
281 #define WM_DECOR_NONE 0
282 #define WM_DECOR_BORDER (MWM_DECOR_BORDER)
283 #define WM_DECOR_TITLE (MWM_DECOR_TITLE)
284 #define WM_DECOR_SYSTEM (WM_DECOR_TITLE | MWM_DECOR_MENU)
285 #define WM_DECOR_MINIMIZE (WM_DECOR_TITLE | MWM_DECOR_MINIMIZE)
286 #define WM_DECOR_MAXIMIZE (WM_DECOR_TITLE | MWM_DECOR_MAXIMIZE)
287 #define WM_DECOR_TITLEBAR (WM_DECOR_SYSTEM | WM_DECOR_MINIMIZE |\
289 #define WM_DECOR_RESIZEH (WM_DECOR_BORDER | MWM_DECOR_RESIZEH)
290 #define WM_DECOR_RESIZE (WM_DECOR_RESIZEH)
291 #define WM_DECOR_ALL (WM_DECOR_TITLEBAR | WM_DECOR_RESIZEH)
293 #define WM_DECOR_PANEL_DEFAULT WM_DECOR_BORDER
295 /* icon box definitions */
296 #define ICON_BOX_FUNCTIONS (MWM_FUNC_RESIZE | MWM_FUNC_MOVE |\
297 MWM_FUNC_MINIMIZE | MWM_FUNC_MAXIMIZE)
299 /* accessory panel definitions */
300 #define WM_FUNC_PANEL_DEFAULT (MWM_FUNC_MOVE | MWM_FUNC_MINIMIZE)
301 #define WM_FUNC_SUBPANEL_DEFAULT (MWM_FUNC_MOVE | MWM_FUNC_MINIMIZE|\
303 /* workspace controller definitions */
304 #define CONTROL_BOX_FUNCTIONS (MWM_FUNC_MOVE)
306 /* workspace presence definitions */
307 #define PRESENCE_BOX_FUNCTIONS (MWM_FUNC_MOVE)
309 /* show feedback definitions */
310 #define WM_SHOW_FB_BEHAVIOR (1L << 0)
311 #define WM_SHOW_FB_MOVE (1L << 1)
312 #define WM_SHOW_FB_PLACEMENT (1L << 2)
313 #define WM_SHOW_FB_RESIZE (1L << 3)
314 #define WM_SHOW_FB_RESTART (1L << 4)
315 #define WM_SHOW_FB_QUIT (1L << 5)
316 #define WM_SHOW_FB_KILL (1L << 6)
318 #define WM_SHOW_FB_ALL (WM_SHOW_FB_BEHAVIOR | WM_SHOW_FB_MOVE |\
319 WM_SHOW_FB_PLACEMENT | WM_SHOW_FB_RESIZE |\
320 WM_SHOW_FB_RESTART | WM_SHOW_FB_QUIT |\
323 #define WM_SHOW_FB_NONE 0
325 #define WM_SHOW_FB_DEFAULT WM_SHOW_FB_ALL
327 /* flags identifying resources to save */
329 #define WM_RES_WORKSPACE_LIST (1L << 0)
330 #define WM_RES_BACKDROP_IMAGE (1L << 1)
331 #define WM_RES_WORKSPACE_TITLE (1L << 2)
332 #define WM_RES_INITIAL_WORKSPACE (1L << 3)
333 #define WM_RES_FP_POSITION (1L << 4)
334 #define WM_RES_ICONBOX_GEOMETRY (1L << 5)
335 #define WM_RES_WORKSPACE_COUNT (1L << 6)
340 /*************************************<->*************************************
342 * Miscellaneous utility window manager data structures ...
347 * These data structures are used in resource processing, ...
349 *************************************<->***********************************/
351 typedef struct _WHSize
359 typedef struct _AspectRatio
367 typedef struct _WmColorData
378 typedef Atom WorkspaceID;
381 /*************************************<->*************************************
383 * Event processing data structures ...
388 * These data structures are used in saving button and key
389 * specifications that are used in processing events that are used to do
390 * window manager functions (e.g., set the colormap focus).
392 *************************************<->***********************************/
394 typedef unsigned long Context;
395 typedef unsigned long Behavior;
396 typedef unsigned long GroupArg;
398 typedef Boolean (*WmFunction) ();
400 #define NO_MODIFIER 0 /* value for state field */
402 typedef struct _KeySpec
408 WmFunction wmFunction;
410 struct _KeySpec *nextKeySpec;
414 typedef struct _ButtonSpec
418 unsigned int eventType;
422 WmFunction wmFunction;
424 struct _ButtonSpec *nextButtonSpec;
430 * Context field values:
433 #define F_CONTEXT_NONE 0
434 #define F_CONTEXT_ROOT (1L << 0)
435 #define F_CONTEXT_ICON (1L << 1)
436 #define F_CONTEXT_NORMAL (1L << 2)
437 #define F_CONTEXT_MAXIMIZE (1L << 3)
438 #define F_CONTEXT_ICONBOX (1L << 4)
439 #define F_CONTEXT_IFKEY (1L << 7)
440 #define F_CONTEXT_WINDOW (F_CONTEXT_NORMAL|F_CONTEXT_MAXIMIZE)
441 #define F_CONTEXT_ALL (F_CONTEXT_ROOT|F_CONTEXT_ICON|F_CONTEXT_WINDOW)
445 * context field mark for catching menu recursion
446 * (tied to F_CONTEXT_... values):
449 #define CR_MENU_MARK (1L << 5)
453 * Part context defines for event processing. The part context is used
454 * to make a subcontext mask.
457 /* window (frame and client) part contexts */
458 #define WINDOW_PART_NONE 0
459 #define FRAME_NONE WINDOW_PART_NONE
460 #define FRAME_CLIENT 1
461 #define FRAME_SYSTEM 2
462 #define FRAME_TITLE 3
463 #define FRAME_MINIMIZE 4
464 #define FRAME_MAXIMIZE 5
465 #define FRAME_RESIZE_NW 6
466 #define FRAME_RESIZE_N 7
467 #define FRAME_RESIZE_NE 8
468 #define FRAME_RESIZE_E 9
469 #define FRAME_RESIZE_SE 10
470 #define FRAME_RESIZE_S 11
471 #define FRAME_RESIZE_SW 12
472 #define FRAME_RESIZE_W 13
473 #define FRAME_NBORDER 14
474 #define FRAME_MATTE 15
475 #define FRAME_MISC FRAME_MATTE
476 #define FRAME_TITLEBAR 17
478 /* icon part contexts */
479 #define ICON_PART_NONE 0
480 #define ICON_PART_ALL 16
482 /* root part contexts */
483 #define ROOT_PART_NONE 0
484 #define ROOT_PART_ALL 17
486 /* iconbox part contexts */
487 #define ICONBOX_PART_NONE 0
488 #define ICONBOX_PART_IBOX 18
489 #define ICONBOX_PART_IICON 19
490 #define ICONBOX_PART_WICON 20
494 * Subcontext field values:
497 #define F_SUBCONTEXT_NONE (1L << WINDOW_PART_NONE)
499 #define F_SUBCONTEXT_I_ALL (1L << ICON_PART_ALL)
501 #define F_SUBCONTEXT_R_ALL (1L << ROOT_PART_ALL)
504 #define F_SUBCONTEXT_IB_IBOX (1L << ICONBOX_PART_IBOX)
505 #define F_SUBCONTEXT_IB_IICON (1L << ICONBOX_PART_IICON)
506 #define F_SUBCONTEXT_IB_WICON (1L << ICONBOX_PART_WICON)
508 #define F_SUBCONTEXT_IB_ICONS (F_SUBCONTEXT_IB_IICON |\
509 F_SUBCONTEXT_IB_WICON)
511 #define F_SUBCONTEXT_IB_ALL (F_SUBCONTEXT_IB_IBOX |\
512 F_SUBCONTEXT_IB_IICON |\
513 F_SUBCONTEXT_IB_WICON)
516 #define F_SUBCONTEXT_W_CLIENT (1L << FRAME_CLIENT)
517 #define F_SUBCONTEXT_W_APP F_SUBCONTEXT_W_CLIENT
518 #define F_SUBCONTEXT_W_SYSTEM (1L << FRAME_SYSTEM)
519 #define F_SUBCONTEXT_W_TITLE (1L << FRAME_TITLE)
520 #define F_SUBCONTEXT_W_MINIMIZE (1L << FRAME_MINIMIZE)
521 #define F_SUBCONTEXT_W_MAXIMIZE (1L << FRAME_MAXIMIZE)
522 #define F_SUBCONTEXT_W_RESIZE_NW (1L << FRAME_RESIZE_NW)
523 #define F_SUBCONTEXT_W_RESIZE_N (1L << FRAME_RESIZE_N)
524 #define F_SUBCONTEXT_W_RESIZE_NE (1L << FRAME_RESIZE_NE)
525 #define F_SUBCONTEXT_W_RESIZE_E (1L << FRAME_RESIZE_E)
526 #define F_SUBCONTEXT_W_RESIZE_SE (1L << FRAME_RESIZE_SE)
527 #define F_SUBCONTEXT_W_RESIZE_S (1L << FRAME_RESIZE_S)
528 #define F_SUBCONTEXT_W_RESIZE_SW (1L << FRAME_RESIZE_SW)
529 #define F_SUBCONTEXT_W_RESIZE_W (1L << FRAME_RESIZE_W)
530 #define F_SUBCONTEXT_W_NBORDER (1L << FRAME_NBORDER)
531 #define F_SUBCONTEXT_W_MATTE (1L << FRAME_MATTE)
532 #define F_SUBCONTEXT_W_MISC F_SUBCONTEXT_W_MATTE
535 #define F_SUBCONTEXT_W_RBORDER (F_SUBCONTEXT_W_RESIZE_NW |\
536 F_SUBCONTEXT_W_RESIZE_N |\
537 F_SUBCONTEXT_W_RESIZE_NE |\
538 F_SUBCONTEXT_W_RESIZE_E |\
539 F_SUBCONTEXT_W_RESIZE_SE |\
540 F_SUBCONTEXT_W_RESIZE_S |\
541 F_SUBCONTEXT_W_RESIZE_SW |\
542 F_SUBCONTEXT_W_RESIZE_W)
544 #define F_SUBCONTEXT_W_BORDER (F_SUBCONTEXT_W_RBORDER |\
545 F_SUBCONTEXT_W_NBORDER)
547 #define F_SUBCONTEXT_W_TITLEBAR (F_SUBCONTEXT_W_SYSTEM |\
548 F_SUBCONTEXT_W_TITLE |\
549 F_SUBCONTEXT_W_MINIMIZE |\
550 F_SUBCONTEXT_W_MAXIMIZE)
552 #define F_SUBCONTEXT_W_FRAME (F_SUBCONTEXT_W_BORDER |\
553 F_SUBCONTEXT_W_TITLEBAR)
555 #define F_SUBCONTEXT_W_ALL (F_SUBCONTEXT_W_FRAME |\
556 F_SUBCONTEXT_W_MATTE |\
557 F_SUBCONTEXT_W_CLIENT)
561 * Click / double-click processing data:
564 typedef struct _ClickData
566 Boolean clickPending;
567 Boolean doubleClickPending;
571 unsigned int releaseState;
572 struct _ClientData *pCD;
575 Context clickContext;
576 Context doubleClickContext;
583 * Frame part identification aids:
586 typedef struct _Gadget_Rectangle
595 * Behavior function argument field values:
598 #define F_BEHAVIOR_DEFAULT (1L << 0)
599 #define F_BEHAVIOR_CUSTOM (1L << 1)
600 #define F_BEHAVIOR_SWITCH (1L << 2)
604 * Window/icon group function argument field values:
607 #define F_GROUP_WINDOW (1L << 0)
608 #define F_GROUP_ICON (1L << 1)
609 #define F_GROUP_DEFAULT (F_GROUP_WINDOW | F_GROUP_ICON)
610 #define F_GROUP_TRANSIENT (1L << 2)
611 #define F_GROUP_ALL (F_GROUP_DEFAULT | F_GROUP_TRANSIENT)
612 #define F_GROUP_GROUP (1L << 3)
615 /*************************************<->*************************************
617 * Workspace data structures ...
619 ***************************************************************************/
622 * Specific data for workspacePresence dialog box
625 typedef struct _WsPresenceData
627 XmString title; /* resource */
633 Widget workspaceLabelW;
634 Widget workspaceScrolledListW;
635 Widget workspaceListW;
642 struct _ClientData *pCDforClient;
643 Context contextForClient;
645 Boolean *ItemSelected; /* workspaces in list */
646 XmStringTable ItemStrings; /* workspace names */
649 Boolean userDismissed;
654 #define NUM_WSP_WIDGETS 11
656 typedef struct _WsPresenceData *PtrWsPresenceData;
660 * Specific data for top level help dialog
663 typedef struct _WsDtHelpData
665 XmString title; /* resource */
673 Boolean userDismissed;
675 struct _ClientData *pCDforClient;
678 typedef struct _WsDtHelpData *PtrWsDtHelpData;
681 /*************************************<->*************************************
689 *************************************<->***********************************/
691 typedef struct _DtSessionItem
696 String clientMachine;
700 struct _SessionGeom *sessionGeom;
703 typedef struct _SessionGeom
713 * Status of Session Manager Contention Management
715 #define SM_UNITIALIZED 0
716 #define SM_START_ACK 1
717 #define SM_STOP_ACK 2
720 /*************************************<->*************************************
722 * Menu specification data structures ...
727 * These data structures are used in creating window manager menus that
728 * are specified using resource files. A list of menu specifications
729 * (MenuSpec) is made when the resource files are parsed. The desktop
730 * menu and system menus are created as needed using the menu specification
733 *************************************<->***********************************/
735 typedef struct _MenuItem
739 int labelBitmapIndex;
741 unsigned int accelState;
742 KeyCode accelKeyCode;
744 WmFunction wmFunction;
746 Context greyedContext;
748 struct _MenuItem *nextMenuItem;
754 * We use the top part of mgtMask for workspace function bits.
755 * When OSF MWM outgrows the lower 16 bits, we'll have to
756 * change how we do things.
759 #define MWM_MGT_MASK 0x0000FFFF
760 #define DTWM_MGT_MASK 0xFFFF0000
763 typedef struct _MenuButton
771 typedef struct _MenuSpec
774 Context currentContext;
775 Widget menuWidget; /* RowColumn widget */
776 unsigned int whichButton; /* tracks whichButton resource for top menu */
777 unsigned int height; /* height of top menu */
778 MenuItem *menuItems; /* linked list of MenuItem structures */
779 MenuButton *menuButtons; /* array of MenuButton structures */
780 unsigned int menuButtonSize; /* size of menuButtons array */
781 unsigned int menuButtonCount; /* number of menuButtons elements in use */
782 Context accelContext; /* accelerator context */
783 KeySpec *accelKeySpecs; /* list of accelerator KeySpecs */
784 struct _MenuSpec *nextMenuSpec;
788 /*************************************<->*************************************
790 * Window and function specification data structures ...
796 *************************************<->***********************************/
798 typedef struct _WindowItem
801 struct _WindowItem *nextWindowItem;
805 typedef struct _WindowSet
808 WindowItem *windowItems;
809 struct _WindowSet *nextWindowSet;
813 typedef struct _FunctionItem
815 WmFunction wmFunction;
817 struct _FunctionItem *nextFunctionItem;
821 typedef struct _FunctionSet
824 FunctionItem *functionItems;
825 struct _FunctionSet *nextFunctionSet;
829 /*************************************<->*************************************
831 * Window manager timer data structure ...
836 * This data stucture is used to keep track of window manager timers. Each
837 * active timer has an instance of the data structure.
839 *************************************<->***********************************/
841 typedef struct _WmTimer
843 XtIntervalId timerId;
844 struct _ClientData *timerCD;
845 unsigned int timerType;
846 struct _WmTimer *nextWmTimer;
853 #define TIMER_RAISE 2
856 /*************************************<->*************************************
858 * Window manager frame component data structures
863 * This data stucture is used for drawing frame component graphics.
865 *************************************<->***********************************/
867 typedef struct _RList
869 int allocated; /* number of allocated XRectangles */
870 int used; /* number currently in use */
871 XRectangle *prect; /* array of XRectangles */
877 /*************************************<->*************************************
879 * Window manager component appearance data structure ...
884 * This structure is used to hold component appearance data for client,
885 * icon, and feedback subparts.
887 *************************************<->***********************************/
890 typedef struct _AppearanceData
892 XmFontList fontList; /* resource */
894 unsigned int titleHeight; /* title bar's height */
895 Boolean saveUnder; /* resource */
896 Pixel background; /* resource */
897 Pixel foreground; /* resource */
898 String backgroundPStr; /* resource */
899 Pixmap backgroundPixmap;
900 Pixel bottomShadowColor; /* resource */
901 String bottomShadowPStr; /* resource */
902 Pixmap bottomShadowPixmap;
903 Pixel topShadowColor; /* resource */
904 String topShadowPStr; /* resource */
905 Pixmap topShadowPixmap;
906 Pixel activeBackground; /* resource */
907 String activeBackgroundPStr; /* resource */
908 Pixmap activeBackgroundPixmap;
909 Pixel activeBottomShadowColor; /* resource */
910 String activeBottomShadowPStr; /* resource */
911 Pixmap activeBottomShadowPixmap;
912 Pixel activeForeground; /* resource */
913 Pixel activeTopShadowColor; /* resource */
914 String activeTopShadowPStr; /* resource */
915 Pixmap activeTopShadowPixmap;
918 GC inactiveTopShadowGC;
919 GC inactiveBottomShadowGC;
921 GC activeTopShadowGC;
922 GC activeBottomShadowGC;
927 typedef struct _AppearanceData *PtrAppearanceData;
930 /*************************************<->*************************************
938 *************************************<->***********************************/
940 typedef struct _IconInfo
943 struct _ClientData *pCD;
946 typedef struct _IconInfo *PtrIconInfo;
950 /*************************************<->*************************************
958 *************************************<->***********************************/
960 typedef struct _IconPlacementData
962 Boolean onRootWindow; /* true if icons on root window */
963 unsigned iconPlacement; /* style of placement */
964 int placementRows; /* number of rows in placement space */
965 int placementCols; /* number of cols in placement space */
966 int totalPlaces; /* total number of placment slots */
967 int iPlaceW; /* width increment (to next place) */
968 int iPlaceH; /* height increment (to next place) */
969 IconInfo *placeList; /* list of icon info */
978 /*************************************<->*************************************
985 * This structure is used to hold window and widget information for
988 *************************************<->***********************************/
990 typedef struct _IconBoxData
994 Widget scrolledWidget;
1004 WorkspaceID wsID; /* workspace identifier */
1005 struct _ClientData *pCD_iconBox; /* ptr to its own clientdata */
1006 struct _IconBoxData *pNextIconBox; /* ptr to next icon box */
1007 struct _IconPlacementData IPD; /* icon placement data */
1010 typedef struct _IconBoxData *PtrIconBoxData;
1012 #define IB_SPACING 0
1013 #define IB_MARGIN_HEIGHT 3
1014 #define IB_MARGIN_WIDTH 3
1015 #define IB_HIGHLIGHT_BORDER 3
1018 /*************************************<->*************************************
1020 * Bitmap/Pixmap cache data
1025 * These structures are used for the bitmap and pixmap caches held
1026 * on a per-screen basis. (This is per-screen because you can't do
1027 * XCopyPlane from one pixmap to another when they have different
1030 *************************************<->***********************************/
1033 #define LABEL_PIXMAP 1
1034 #define ICON_PIXMAP 2
1036 typedef struct _PixmapCache
1038 unsigned int pixmapType; /* icon or label? */
1042 struct _PixmapCache *next;
1046 typedef struct _BitmapCache
1051 unsigned int height;
1052 PixmapCache *pixmapCache;
1060 /******************************<->*************************************
1062 * Client window list entry data structure ...
1067 * This structure provides the data for an entry in the client window list.
1068 * The client window list has an entry for each non-transient client
1069 * window and each non-iconbox icon.
1071 ******************************<->***********************************/
1073 typedef struct _ClientListEntry
1075 struct _ClientListEntry *nextSibling;
1076 struct _ClientListEntry *prevSibling;
1078 struct _ClientData *pCD;
1084 /*************************************<->*************************************
1091 * This structure contains geometry information for the window manager
1094 *************************************<->***********************************/
1096 typedef struct _FrameInfo
1101 unsigned int height;
1102 unsigned int upperBorderWidth;
1103 unsigned int lowerBorderWidth;
1104 unsigned int cornerWidth;
1105 unsigned int cornerHeight;
1106 unsigned int titleBarHeight;
1112 /*************************************<->*************************************
1119 * This is the data structure for holding the window manager's
1120 * screen data. There is one instantiation of the structure for
1123 *************************************<->***********************************/
1125 typedef struct _WmScreenData
1128 int screen; /* number for this screen */
1131 Widget screenTopLevelW;
1132 Widget screenTopLevelW1; /* for internal WM components */
1133 Widget confirmboxW[4];
1134 Widget wPanelist; /* panel object */
1135 WsPresenceData presence; /* workspace presence dialog*/
1136 Widget switcherW; /* workspace switcher */
1137 Widget switcherShellW; /* shell for ws switcher */
1138 Window wmWorkspaceWin; /* holds wm properties */
1140 Window activeIconTextWin;
1141 Window activeLabelParent;
1142 String displayString; /* used for putenv in F_Exec */
1143 int displayResolutionType;
1144 struct _WmFpEmbeddedClientData *pECD; /* clients living in front panel */
1145 int numEmbeddedClients;
1146 struct _WmFpPushRecallClientData *pPRCD; /* push_recall clients */
1147 int numPushRecallClients;
1149 /* wm state info: */
1151 unsigned long clientCounter;
1153 Window inputScreenWindow;
1154 struct _ClientData *colormapFocus;
1155 Colormap workspaceColormap;
1156 Colormap lastInstalledColormap;
1157 struct _WmWorkspaceData *pActiveWS; /* for this screen */
1158 struct _WmWorkspaceData *pLastWS; /* previously active WS */
1160 /* per screen caches */
1161 BitmapCache *bitmapCache;
1162 unsigned int bitmapCacheSize;
1163 unsigned int bitmapCacheCount;
1165 /* per screen icon info */
1166 Boolean fadeNormalIcon; /* resource */
1167 int iconPlacement; /* resource */
1168 int iconPlacementMargin; /* resource */
1169 int iconDecoration; /* resource */
1170 WHSize iconImageMaximum; /* resource */
1171 WHSize iconImageMinimum; /* resource */
1172 Pixmap builtinIconPixmap;
1175 int iconImageHeight;
1176 int iconLabelHeight;
1181 /* per screen configuration outline windows */
1182 Window woN; /* North outline window */
1183 Window woS; /* South outline window */
1184 Window woE; /* East outline window */
1185 Window woW; /* West outline window */
1187 /* per screen feedback data */
1188 unsigned long fbStyle;
1189 unsigned int fbWinWidth;
1190 unsigned int fbWinHeight;
1191 char fbLocation[20];
1199 unsigned int fbLastWidth;
1200 unsigned int fbLastHeight;
1205 /* resource description file data: */
1206 String buttonBindings; /* resource */
1207 ButtonSpec *buttonSpecs;
1208 String keyBindings; /* resource */
1210 MenuSpec **acceleratorMenuSpecs;
1211 unsigned int acceleratorMenuCount;
1212 MenuSpec *menuSpecs;
1214 Boolean defaultSystemMenuUseBuiltin;
1216 Pixmap defaultPixmap;
1219 /* per screen appearance resources */
1221 Boolean cleanText; /* resource */
1222 Boolean decoupleTitleAppearance; /* see clientTitleAppearance */
1223 int frameBorderWidth; /* resource */
1224 String feedbackGeometry; /* resource */
1225 String iconBoxName; /* resource */
1226 String iconBoxSBDisplayPolicy; /* resource */
1227 int iconBoxScheme; /* resource - testing */
1228 XmString iconBoxTitle; /* resource */
1231 Boolean limitResize; /* resource */
1232 WHSize maximumMaximumSize; /* resource */
1233 int resizeBorderWidth; /* resource */
1234 Boolean resizeCursors; /* resource */
1235 int transientDecoration; /* resource */
1236 int transientFunctions; /* resource */
1237 Boolean useIconBox; /* resource */
1238 int subpanelDecoration; /* resource */
1239 String subpanelResources; /*to restore subpanels */
1240 Boolean iconBoxControl; /* FP control for icon box */
1241 Boolean moveOpaque; /* move window not outlines */
1243 /* pixel set info (from color object) */
1244 XmPixelSet *pPixelData; /* all pixel data */
1245 XmPixelSet *pActivePixelSet; /* ptr into pPixelData */
1246 XmPixelSet *pInactivePixelSet; /* ptr into pPixelData */
1247 XmPixelSet *pPrimaryPixelSet; /* ptr into pPixelData */
1248 XmPixelSet *pSecondaryPixelSet; /* ptr into pPixelData */
1249 XmPixelSet *pTextPixelSet; /* ptr into pPixelData */
1250 int colorUse; /* indication from color obj */
1252 /* client frame component appearance resources and data: */
1254 AppearanceData clientAppearance; /* resources ... */
1255 AppearanceData clientTitleAppearance; /* resources ... */
1256 XPoint transientOffset;
1257 int Num_Resize_Ts_Elements;
1258 int Num_Resize_Bs_Elements;
1259 int Num_Title_Ts_Elements;
1260 int Num_Title_Bs_Elements;
1262 /* icon component appearance resources and data: */
1264 AppearanceData iconAppearance; /* resources ... */
1266 /* feedback component appearance resources and data: */
1268 AppearanceData feedbackAppearance; /* resources ... */
1270 /* client list pointers: */
1272 ClientListEntry *clientList;
1273 ClientListEntry *lastClient;
1275 /* DtSessionHints for clients */
1276 struct _DtSessionItem *pDtSessionItems;
1277 int totalSessionItems;
1278 int remainingSessionItems;
1281 /* workspace list for this screen */
1282 String initialWorkspace; /* private resource */
1283 String workspaceList; /* resource */
1285 int numWsDataAllocated;
1286 struct _WmWorkspaceData *pWS;
1287 Window lastBackdropWin;
1288 struct _WsDtHelpData dtHelp;
1289 struct _CacheListStruct *cachedHelp;
1290 String helpResources; /* to restore help */
1291 DtSvcHandle hWsm; /* WORKSPACEMGR message handle */
1292 Boolean bMarqueeSelectionInitialized;
1296 typedef struct _WmScreenData *PtrScreenData;
1300 * Convenience macros for data access
1302 #define ROOT_FOR_CLIENT(pcd) ((pcd)->pSD->rootWindow)
1303 #define SCREEN_FOR_CLIENT(pcd) ((pcd)->pSD->screen)
1304 #define PSD_FOR_CLIENT(pcd) ((pcd)->pSD)
1305 #define BUTTON_SPECS(pcd) ((pcd)->pSD->buttonSpecs)
1306 #define KEY_SPECS(pcd) ((pcd)->pSD->keySpecs)
1307 #define ACCELERATOR_MENU_COUNT(pcd) ((pcd)->pSD->acceleratorMenuCount)
1308 #define ACCELERATOR_MENU_SPECS(pcd) ((pcd)->pSD->acceleratorMenuSpecs)
1309 #define WORKSPACE_COLORMAP(pcd) ((pcd)->pSD->workspaceColormap)
1310 #define FADE_NORMAL_ICON(pcd) ((pcd)->pSD->fadeNormalIcon)
1312 #define ICON_DEFAULT_TITLE(pcd) ((pcd)->iconDefaultTitle)
1314 #define ICON_DECORATION(pcd) ((pcd)->pSD->iconDecoration)
1315 #define ICON_HEIGHT(pcd) ((pcd)->pSD->iconHeight)
1316 #define ICON_WIDTH(pcd) ((pcd)->pSD->iconWidth)
1317 #define ICON_IMAGE_HEIGHT(pcd) ((pcd)->pSD->iconImageHeight)
1318 #define ICON_LABEL_HEIGHT(pcd) ((pcd)->pSD->iconLabelHeight)
1319 #define ICON_IMAGE_MAXIMUM(pcd) ((pcd)->pSD->iconImageMaximum)
1320 #define ICON_IMAGE_MINIMUM(pcd) ((pcd)->pSD->iconImageMinimum)
1321 #define SHRINK_WRAP_GC(pcd) ((pcd)->pSD->shrinkWrapGC)
1322 #define FADE_ICON_GC(pcd) ((pcd)->pSD->fadeIconGC)
1323 #define FADE_ICON_TEXT_GC(pcd) ((pcd)->pSD->fadeIconTextGC)
1324 #define DEFAULT_PIXMAP(pcd) ((pcd)->pSD->defaultPixmap)
1325 #define ICON_PLACE(pcd) ((pcd)->pWsList[(pcd)->currentWsc].iconPlace)
1326 #define ICON_X(pcd) ((pcd)->pWsList[(pcd)->currentWsc].iconX)
1327 #define ICON_Y(pcd) ((pcd)->pWsList[(pcd)->currentWsc].iconY)
1328 #define P_ICON_BOX(pcd) ((pcd)->pWsList[(pcd)->currentWsc].pIconBox)
1329 #define ICON_FRAME_WIN(pcd) ((pcd)->pWsList[(pcd)->currentWsc].iconFrameWin)
1332 * Definitions for Screen data
1334 #define MAX_WORKSPACE_COUNT 64
1338 /*************************************<->*************************************
1345 * This structure hold information for the workspace background
1347 *************************************<->***********************************/
1349 typedef struct _WmBackdropData
1351 String image; /* resource */
1354 int colorSet; /* resource */
1355 Pixel background; /* resource */
1356 Pixel foreground; /* resource */
1363 * bit definiton for "flags" member of BackdropData
1365 #define BACKDROP_NONE 0
1366 #define BACKDROP_CLIENT (1L<<1)
1367 #define BACKDROP_BITMAP (1L<<2)
1368 #define BACKDROP_IMAGE_ALLOCED (1L<<3) /* image string can be freed */
1370 typedef struct _WmBackdropData *PtrBackdropData;
1372 #define DEFAULT_BACKDROP_DIR CDE_INSTALLATION_TOP "/backdrops"
1375 * direction for slide-out panels
1377 typedef enum _SlideDirection
1379 SLIDE_NOT, SLIDE_NORTH, SLIDE_EAST, SLIDE_SOUTH, SLIDE_WEST
1383 * Slide out record for subpanels
1385 typedef struct _SlideOutRec
1387 struct _ClientData *pCD;
1390 Dimension incHeight;
1391 Dimension currWidth;
1392 Dimension currHeight;
1395 unsigned int interval;
1396 SlideDirection direction;
1402 * Data structure for arguments to f.action
1404 typedef struct _WmActionArg {
1414 /*************************************<->*************************************
1421 * This is the structure for holding the workspace specific data.
1422 * (This has been broken out in anticipation of possible future
1425 *************************************<->***********************************/
1427 typedef struct _WmWorkspaceData
1433 BackdropData backdrop;
1435 XmString title; /* resource (visible name) */
1436 String iconBoxGeometry;/* resource */
1437 String name; /* workspace name */
1438 /* (used for resource fetching) */
1440 WmScreenData *pSD; /* screen data for this workspace */
1441 IconBoxData *pIconBox; /* icon box data for this workspace */
1442 IconPlacementData IPData;
1444 Widget workspaceTopLevelW;
1446 /* workspace state information */
1448 struct _ClientData *keyboardFocus; /* ptr to client with the key focus */
1449 struct _ClientData *nextKeyboardFocus; /* next client to get focus */
1450 struct _ClientData **ppClients; /* list of client data ptrs */
1451 unsigned int numClients; /* number of client in list */
1452 unsigned int sizeClientList; /* size of client list */
1456 typedef struct _WmWorkspaceData *PtrWorkspaceData;
1460 * Convenience macros for data access
1462 #define CLIENT_APPEARANCE(pcd) ((pcd)->pSD->clientAppearance)
1463 #define CLIENT_TITLE_APPEARANCE(pcd) ((pcd)->pSD->clientTitleAppearance)
1464 #define DECOUPLE_TITLE_APPEARANCE(pcd) ((pcd)->pSD->decoupleTitleAppearance)
1466 #define CLIENT_DEFAULT_TITLE(pcd) ((pcd)->pSD->clientDefaultTitle)
1468 #define MAX_MAX_SIZE(pcd) ((pcd)->pSD->maximumMaximumSize)
1469 #define SHOW_RESIZE_CURSORS(pcd) ((pcd)->pSD->resizeCursors)
1470 #define JOIN_BEVEL(pcd) ((pcd)->pSD->joinBevel)
1471 #define EXTERNAL_BEVEL(pcd) ((pcd)->pSD->externalBevel)
1472 #define FRAME_BORDER_WIDTH(pcd) ((pcd)->pSD->frameBorderWidth)
1473 #define RESIZE_BORDER_WIDTH(pcd) ((pcd)->pSD->resizeBorderWidth)
1474 #define NUM_TITLE_TS_ELEMENTS(pcd) ((pcd)->pSD->Num_Title_Ts_Elements)
1475 #define NUM_TITLE_BS_ELEMENTS(pcd) ((pcd)->pSD->Num_Title_Bs_Elements)
1476 #define NUM_RESIZE_TS_ELEMENTS(pcd) ((pcd)->pSD->Num_Resize_Ts_Elements)
1477 #define NUM_RESIZE_BS_ELEMENTS(pcd) ((pcd)->pSD->Num_Resize_Bs_Elements)
1478 #define ICON_APPEARANCE(pcd) ((pcd)->pSD->iconAppearance)
1480 #define ACTIVE_LABEL_PARENT(pcd) ((pcd)->pSD->activeLabelParent)
1482 #define ICON_BOX_TITLE(pcd) ((pcd)->pSD->iconBoxTitle)
1484 #define TRANSIENT_DECORATION(pcd) ((pcd)->pSD->transientDecoration)
1485 #define TRANSIENT_FUNCTIONS(pcd) ((pcd)->pSD->transientFunctions)
1488 /*************************************<->*************************************
1495 * This data structure is instantiated for every client window that is
1496 * managed by the window manager. The information that is saved in the
1497 * data structure is specific to the associated client window.
1499 * ClientData is instantiated at the time a client window is intially
1500 * managed and is destroyed when the client window is withdrawn from
1501 * window management (the ClientData may not be destroyed when a
1502 * client window is withdrawn if frame/icons are cached).
1504 *************************************<->***********************************/
1506 typedef struct _ClientData
1508 int dataType; /* client data type */
1513 int clientState; /* WM_HINTS field */
1514 int inputFocusModel; /* WM_HINTS field */
1517 unsigned long clientID;
1519 struct _WmFpEmbeddedClientData *pECD; /* embedded client data */
1520 struct _WmFpPushRecallClientData *pPRCD; /* embedded client data */
1521 Atom * paInitialProperties; /* initial window properties */
1522 int numInitialProperties; /* number of initial properties */
1524 /* client supported protocols: */
1526 Atom *clientProtocols; /* WM_PROTOCOLS */
1527 int clientProtocolCount;
1529 long *mwmMessages; /* _MWM_MESSAGES */
1530 int mwmMessagesCount;
1532 /* client colormap data: */
1534 Colormap clientColormap; /* selected client colormap */
1535 Window *cmapWindows; /* from WM_COLORMAP_WINDOWS */
1536 Colormap *clientCmapList;
1537 int clientCmapCount; /* len of clientCmapList */
1538 int clientCmapIndex; /* current cmap in list */
1539 #ifndef OLD_COLORMAP /* colormap */
1540 int *clientCmapFlags; /* installed, uninstalled */
1541 Bool clientCmapFlagsInitialized; /* Are clientCmapFlags valid? */
1544 /* associated window data: */
1546 ClientListEntry clientEntry;
1547 ClientListEntry iconEntry;
1548 XID windowGroup; /* WM_HINTS field */
1549 #ifndef NO_OL_COMPAT
1550 Boolean bPseudoTransient; /* transientFor window group */
1551 #endif /* NO_OL_COMPAT */
1552 IconBoxData *thisIconBox; /* icon box data for self */
1553 /* if this is an icon box */
1554 Context grabContext; /* used to support icon box */
1555 /* icon key, button, menus */
1556 Window transientFor; /* transient for another win */
1557 struct _ClientData *transientLeader; /* trans leader of this win */
1558 struct _ClientData *transientChildren; /* transients of this win */
1559 struct _ClientData *transientSiblings; /* related transient win's */
1560 int primaryStackPosition; /* stack pos'n of primary */
1561 Boolean secondariesOnTop; /* resource */
1562 int primaryModalCount; /* primary modal win count */
1563 int fullModalCount; /* full modal win count */
1565 /* client resource data */
1567 String clientClass; /* WM_CLASS field */
1568 String clientName; /* WM_CLASS field */
1569 int clientDecoration; /* resource */
1570 int clientFunctions; /* resource */
1571 Boolean focusAutoRaise; /* resource */
1572 Boolean focusAutoRaiseDisabled; /* to support f.lower */
1573 Boolean focusAutoRaiseDisablePending; /* to support f.lower */
1574 String iconImage; /* resource */
1575 Pixel iconImageBackground; /* resource */
1576 Pixel iconImageBottomShadowColor; /* resource */
1577 String iconImageBottomShadowPStr; /* resource */
1578 Pixmap iconImageBottomShadowPixmap;
1579 Pixel iconImageForeground; /* resource */
1580 Pixel iconImageTopShadowColor; /* resource */
1581 String iconImageTopShadowPStr; /* resource */
1582 Pixmap iconImageTopShadowPixmap;
1583 Boolean ignoreWMSaveHints; /* resource */
1584 int internalBevel; /* resource */
1585 Pixel matteBackground; /* resource */
1586 Pixel matteBottomShadowColor; /* resource */
1587 String matteBottomShadowPStr; /* resource */
1588 Pixmap matteBottomShadowPixmap;
1589 Pixel matteForeground; /* resource */
1590 Pixel matteTopShadowColor; /* resource */
1591 String matteTopShadowPStr; /* resource */
1592 Pixmap matteTopShadowPixmap;
1593 int matteWidth; /* resource */
1594 WHSize maximumClientSize; /* resource */
1595 String smClientID; /* SM_CLIENT_ID */
1596 String systemMenu; /* resource */
1597 MenuItem *mwmMenuItems; /* custom menu items or NULL */
1598 MenuSpec *systemMenuSpec;
1599 Boolean useClientIcon; /* resource */
1600 int wmSaveHintFlags; /* WMSAVE_HINT */
1602 /* client frame data: */
1604 long sizeFlags; /* WM_NORMAL_HINTS field */
1605 long decor; /* client decoration*/
1606 long decorFlags; /* depressed gadgets flags */
1607 int minWidth; /* WM_NORMAL_HINTS field */
1608 int minHeight; /* WM_NORMAL_HINTS field */
1609 Boolean maxConfig; /* True => use max config */
1610 int maxX; /* maximized window X loc */
1611 int maxY; /* maximized window Y loc */
1613 int maxWidth; /* WM_NORMAL_HINTS field */
1615 int maxHeight; /* WM_NORMAL_HINTS field */
1616 int oldMaxWidth; /* for good HPterm behavior */
1617 int oldMaxHeight; /* for good HPterm behavior */
1618 int widthInc; /* WM_NORMAL_HINTS field */
1619 int heightInc; /* WM_NORMAL_HINTS field */
1620 AspectRatio minAspect; /* WM_NORMAL_HINTS field */
1621 AspectRatio maxAspect; /* WM_NORMAL_HINTS field */
1622 int baseWidth; /* WM_NORMAL_HINTS field */
1623 int baseHeight; /* WM_NORMAL_HINTS field */
1624 int windowGravity; /* WM_NORMAL_HINTS field */
1625 int clientX; /* normal window X loc */
1626 int clientY; /* normal window Y loc */
1627 int clientWidth; /* normal window width */
1628 int clientHeight; /* normal window height */
1629 XPoint clientOffset; /* frame to client window */
1630 XmString clientTitle; /* WM_NAME field */
1631 Window clientFrameWin; /* top-level, frame window */
1632 Window clientStretchWin[STRETCH_COUNT];/* for resizing border */
1633 Window clientTitleWin; /* for title bar */
1634 Window clientBaseWin; /* for matte & reparenting */
1635 int xBorderWidth; /* original X border width */
1636 FrameInfo frameInfo; /* frame geometry data */
1638 /* client window frame graphic data: */
1640 RList *pclientTopShadows; /* top shadow areas */
1641 RList *pclientBottomShadows; /* bottom shadow areas */
1643 RList *pclientTitleTopShadows; /* top shadow areas */
1644 RList *pclientTitleBottomShadows; /* bottom shadow areas */
1646 RList *pclientMatteTopShadows; /* matte top shadows */
1647 RList *pclientMatteBottomShadows; /* matte bottom shadows */
1649 /* rectangles for client frame gadgets */
1651 XRectangle titleRectangle; /* title bar area */
1652 GadgetRectangle *pTitleGadgets; /* title bar gadgets */
1653 int cTitleGadgets; /* count of title rects */
1654 GadgetRectangle *pResizeGadgets; /* resize areas */
1655 XRectangle matteRectangle; /* matte / base window area */
1657 /* client appearance data: */
1659 GC clientMatteTopShadowGC;
1660 GC clientMatteBottomShadowGC;
1661 WmScreenData *pSD; /* where visuals come from */
1666 XmString iconTitle; /* WM_ICON_NAME field */
1667 Pixmap iconPixmap; /* WM_HINTS field */
1668 Pixmap iconMask; /* WM_HINTS field */
1669 Window iconWindow; /* WM_HINTS field */
1671 RList *piconTopShadows; /* these change to */
1672 /* to reflect the */
1673 RList *piconBottomShadows; /* depressed icon image */
1675 /* workspace data */
1677 int absentMapBehavior; /* resource */
1678 int numInhabited; /* number of WS's inhabited */
1679 int sizeWsList; /* size of wsc data list */
1680 struct _WsClientData *pWsList; /* list of workspace-client data */
1681 int currentWsc; /* index to current wsc data */
1682 WorkspaceID *pWorkspaceHints; /* _DT_WORKSPACE_HINTS */
1683 int numWorkspaceHints; /* size of pWorkspaceHints */
1684 Boolean putInAll; /* persistent window flag */
1685 long dtwmFunctions; /* _DT_WM_HINTS */
1686 long dtwmBehaviors; /* _DT_WM_HINTS */
1687 Window attachWindow; /* _DT_WM_HINTS */
1688 SlideDirection slideDirection; /* slide-up direction */
1689 SlideOutRec *pSOR; /* slide-out record */
1691 short wShaped; /* this window has a bounding shape */
1692 #endif /* NO_SHAPE */
1694 int usePPosition; /* indicate whether to use PPosition */
1696 long window_status; /* used for Tear-off Menus */
1700 typedef struct _ClientData *PtrClientData;
1702 /* client data convenience macros */
1704 #define IS_APP_MODALIZED(pcd) \
1705 (((pcd)->primaryModalCount)||((pcd)->fullModalCount))
1707 #define IS_MAXIMIZE_VERTICAL(pcd) \
1708 ((pcd->maximumClientSize.height == BIGSIZE) && \
1709 (pcd->maximumClientSize.width == 0))
1711 #define IS_MAXIMIZE_HORIZONTAL(pcd) \
1712 ((pcd->maximumClientSize.width == BIGSIZE) && \
1713 (pcd->maximumClientSize.height == 0))
1715 /* window management state of client windows (clientState): */
1716 #define WITHDRAWN_STATE 0
1717 #define NORMAL_STATE 1
1718 #define MINIMIZED_STATE 2
1719 #define MAXIMIZED_STATE 3
1720 #define UNSEEN_STATE 8
1722 /* clientFlags field values: */
1723 #define CLIENT_HINTS_TITLE (1L << 0)
1724 #define CLIENT_REPARENTED (1L << 1)
1725 #define CLIENT_TRANSIENT (1L << 2)
1726 #define CLIENT_CONTEXT_SAVED (1L << 3)
1727 #define CLIENT_IN_SAVE_SET (1L << 4)
1728 #define USERS_MAX_POSITION (1L << 5)
1729 #define WM_INITIALIZATION (1L << 6)
1730 #define CLIENT_DESTROYED (1L << 7)
1731 #define ICON_REPARENTED (1L << 8)
1732 #define ICON_IN_SAVE_SET (1L << 9)
1733 #define CLIENT_TERMINATING (1L << 10)
1734 #define ICON_BOX (1L << 11) /* one of our icon boxes */
1735 #define CONFIRM_BOX (1L << 12) /* a confirmation box */
1737 #define FRONT_PANEL_BOX (1L << 14) /* a DT 3.0 front panel */
1738 #define GOT_DT_WM_HINTS (1L << 15)
1739 #define SM_LAUNCHED (1L << 17) /* launched by dtsession */
1741 #define SM_X (1L << 18) /* X from DB/dtsession */
1742 #define SM_Y (1L << 19) /* Y from DB/dtsession */
1743 #define SM_WIDTH (1L << 20) /* width fm DB/dtsession */
1744 #define SM_HEIGHT (1L << 21) /* height fm DB/dtsession */
1745 #define SM_CLIENT_STATE (1L << 22) /* clientState fm DB/dtsession */
1746 #define SM_ICON_X (1L << 23) /* icon X from DB */
1747 #define SM_ICON_Y (1L << 24) /* icon Y from DB */
1749 #define CLIENT_WM_CLIENTS (ICON_BOX | CONFIRM_BOX)
1751 /* decorFlags bit fields */
1752 #define SYSTEM_DEPRESSED (1L << 0)
1753 #define TITLE_DEPRESSED (1L << 1)
1754 #define MINIMIZE_DEPRESSED (1L << 2)
1755 #define MAXIMIZE_DEPRESSED (1L << 3)
1757 /* iconFlags field values: */
1758 #define ICON_HINTS_POSITION (1L << 0)
1759 #define ICON_HINTS_TITLE (1L << 1)
1760 #define ICON_HINTS_PIXMAP (1L << 2)
1762 /* client protocol flags and sizes: */
1763 #define PROTOCOL_WM_SAVE_YOURSELF (1L << 0)
1764 #define PROTOCOL_WM_DELETE_WINDOW (1L << 1)
1765 #define PROTOCOL_WM_TAKE_FOCUS (1L << 2)
1766 #define PROTOCOL_MWM_MESSAGES (1L << 3)
1767 #define PROTOCOL_MWM_OFFSET (1L << 4)
1769 #define MAX_CLIENT_PROTOCOL_COUNT 40
1770 #define MAX_COLORMAP_WINDOWS_COUNT 40
1771 #define MAX_MWM_MESSAGES_COUNT 40
1773 /* bevel width limits between window manager frame and client window */
1774 #define MIN_INTERNAL_BEVEL 0
1775 #define MAX_INTERNAL_BEVEL 2
1777 /* global return buffer */
1778 #define MAXWMPATH 1023
1779 #define MAXBUF (MAXWMPATH+1)
1781 /*************************************<->*************************************
1788 * This datum compartmentalizes client data that must be replicated
1789 * on a per workspace basis.
1791 *************************************<->***********************************/
1792 typedef struct _WsClientData
1794 WorkspaceID wsID; /* workspace identifier */
1795 int iconPlace; /* icon placment index */
1798 Window iconFrameWin;
1799 IconBoxData *pIconBox; /* icon box for this win */
1807 typedef enum _FrameStyle
1814 /*************************************<->*************************************
1821 * This is the main data structure for holding the window manager's
1822 * global data. There is one instantiation of the structure for
1823 * the window manager.
1825 *************************************<->***********************************/
1827 typedef struct _WmGlobalData
1830 char **argv; /* command line argument vector */
1831 char **environ; /* environment vector */
1832 char *mwmName; /* name of our executable */
1834 Widget topLevelW1; /* from which WM components hang */
1835 Boolean confirmDialogMapped; /* confirm dialog is mapped */
1836 XtAppContext mwmAppContext; /* application context for mwm */
1837 XContext windowContextType; /* window context for XSaveContext */
1838 XContext screenContextType; /* screen context for XSaveContext */
1840 XContext cmapWindowContextType; /* list of pCD's in WM_COLORMAP_WINDOWS context for XSaveContext */
1842 XContext mwmWindowContextType; /* mwm win context for XSaveContext */
1843 Window dtSmWindow; /* used for contention management */
1844 Window commandWindow; /* WM_SAVE_YOURSELF win for dtwm */
1846 /* presentation resource id's: */
1848 String displayString; /* used for putenv in F_Exec */
1849 Display *display; /* display we are running to */
1850 Display *display1; /* second display connection */
1851 int statusColorServer; /* CSERVE_NORMAL, CSERVE_NOT_AVAILABLE */
1852 DtWmpParseBuf *pWmPB; /* global parse buffer */
1853 int numScreens; /* number of screens */
1854 unsigned char **screenNames; /* default names for screens */
1855 WmScreenData *Screens; /* array of screen info */
1857 Cursor workspaceCursor; /* basic arrow cursor */
1858 Cursor stretchCursors[STRETCH_COUNT];
1859 Cursor configCursor;
1860 Cursor movePlacementCursor;
1861 Cursor sizePlacementCursor;
1863 #ifndef NO_MESSAGE_CATALOG
1865 XmString cancelLabel;
1870 /* wm state info: */
1872 WmScreenData *pActiveSD; /* with keyfocus window */
1873 Boolean useStandardBehavior; /* behavior flag */
1874 Boolean wmRestarted; /* restart flag */
1875 Boolean errorFlag; /* handle on async errors */
1876 XID errorResource; /* from XErrorEvent */
1877 unsigned char errorRequestCode; /* from XErrorEvent */
1879 /* The following are global because pointer is grabbed */
1880 MenuSpec *menuActive; /* ptr to currently active menu */
1881 KeySpec *menuUnpostKeySpec; /* key to upost current menu */
1882 ClientData *menuClient; /* client for which menu is posted */
1883 KeySpec *F_NextKeySpec; /* used when travering to windows */
1884 KeySpec *F_PrevKeySpec; /* used when travering to windows */
1886 Context grabContext; /* used in GrabWin when no event */
1888 ClickData clickData; /* double-click detection data */
1889 int configAction; /* none, resize, move */
1890 unsigned int configButton; /* button used for config */
1891 unsigned int configPart; /* resize frame part */
1892 Boolean configSet; /* True if configPart set */
1893 Boolean movingIcon; /* True if icon being moved */
1894 Boolean preMove; /* move threshold support */
1897 ClientData *gadgetClient; /* last client with */
1898 int gadgetDepressed; /* depressed gadget */
1899 Boolean checkHotspot; /* event hotspot flag */
1900 XRectangle hotspotRectangle; /* event hotspot area */
1901 WmTimer *wmTimers; /* timer data */
1902 Boolean passKeysActive; /* flag for pass keys function */
1903 KeySpec *passKeysKeySpec; /* key for pass keys function */
1904 Boolean activeIconTextDisplayed; /* True if active label up */
1905 Boolean queryScreen; /* True if not sure of active screen */
1907 /* keyboard focus data: */
1909 ClientData *keyboardFocus; /* ptr to client with the key focus */
1910 ClientData *nextKeyboardFocus; /* next client to get focus */
1911 Boolean systemModalActive;
1912 ClientData *systemModalClient;
1913 Window systemModalWindow;
1915 /* Resource database used to restore client geometries, etc. */
1916 XrmDatabase clientResourceDB;
1918 /* atoms used in inter-client communication: */
1921 Atom xa_WM_PROTOCOLS;
1922 Atom xa_WM_CHANGE_STATE;
1923 Atom xa_WM_SAVE_YOURSELF;
1924 Atom xa_WM_DELETE_WINDOW;
1925 Atom xa_WM_TAKE_FOCUS;
1926 Atom xa_WM_COLORMAP_WINDOWS;
1928 Atom xa_MWM_MESSAGES;
1933 Atom xa_MOTIF_BINDINGS;
1934 Atom xa_COMPOUND_TEXT;
1935 Atom xa_SM_CLIENT_ID;
1936 Atom xa_WMSAVE_HINT;
1939 /* atoms used for workspace management: */
1941 Atom xa_DT_WORKSPACE_HINTS;
1942 Atom xa_DT_WORKSPACE_PRESENCE;
1943 Atom xa_DT_WORKSPACE_INFO;
1944 Atom xa_DT_EMBEDDED_CLIENTS;
1945 Atom xa_DT_WORKSPACE_LIST;
1946 Atom xa_DT_WORKSPACE_CURRENT;
1948 Atom xa_ALL_WORKSPACES;
1949 Atom xa_DT_SESSION_HINTS;
1950 Atom xa_DT_WM_REQUEST;
1952 Atom xa_DT_SM_WM_PROTOCOL;
1953 Atom xa_DT_SM_START_ACK_WINDOWS;
1954 Atom xa_DT_SM_STOP_ACK_WINDOWS;
1955 Atom xa_DT_WM_WINDOW_ACK;
1956 Atom xa_DT_WM_EXIT_SESSION;
1957 Atom xa_DT_WM_LOCK_DISPLAY;
1958 Atom xa_DT_WM_READY;
1960 #ifndef NO_OL_COMPAT
1961 Atom xa_OL_WIN_ATTR;
1962 Atom xa_OL_DECOR_RESIZE;
1963 Atom xa_OL_DECOR_HEADER;
1964 Atom xa_OL_DECOR_CLOSE;
1965 Atom xa_OL_DECOR_PIN;
1966 Atom xa_OL_DECOR_ADD;
1967 Atom xa_OL_DECOR_DEL;
1969 Atom xa_OL_WT_COMMAND;
1971 Atom xa_OL_WT_NOTICE;
1972 Atom xa_OL_WT_OTHER;
1975 Atom xa_OL_MENU_LIMITED;
1976 Atom xa_OL_MENU_FULL;
1977 #endif /* NO_OL_COMPAT */
1979 /* mwm specific appearance and behavior resources and data: */
1981 Boolean autoKeyFocus; /* resource */
1982 int autoRaiseDelay; /* resource */
1983 String bitmapDirectory; /* resource */
1984 String backdropDirs; /* resource */
1985 Boolean clientAutoPlace; /* resource */
1986 int colormapFocusPolicy; /* resource */
1987 String configFile; /* resource */
1988 String cppCommand; /* resource */
1989 Boolean deiconifyKeyFocus; /* resource */
1990 int doubleClickTime; /* resource */
1991 Boolean enableWarp; /* resource */
1992 Boolean enforceKeyFocus; /* resource */
1993 Boolean freezeOnConfig; /* resource - testing */
1994 Boolean useWindowOutline; /* resource */
1995 Boolean iconAutoPlace; /* resource */
1996 Boolean iconClick; /* resource */
1997 Boolean interactivePlacement; /* resource */
1998 int keyboardFocusPolicy; /* resource */
1999 Boolean lowerOnIconify; /* resource */
2000 int moveThreshold; /* resource */
2001 Boolean passButtonsCheck; /* used to override passButtons */
2002 Boolean passButtons; /* resource */
2003 Boolean passSelectButton; /* resource */
2004 Boolean positionIsFrame; /* resource */
2005 Boolean positionOnScreen; /* resource */
2006 int quitTimeout; /* resource */
2007 Boolean raiseKeyFocus; /* resource */
2008 Boolean multiScreen; /* resource */
2009 String screenList; /* resource */
2010 int showFeedback; /* resource */
2011 Boolean refreshByClearing; /* resource */
2012 Boolean rootButtonClick; /* resource */
2013 Boolean startupKeyFocus; /* resource */
2014 Boolean systemButtonClick; /* resource */
2015 Boolean systemButtonClick2; /* resource */
2016 Boolean useLargeCursors;
2017 Boolean useFrontPanel; /* resource */
2018 String helpDirectory; /* resource */
2019 Window requestContextWin; /* for WmRequest f.fcns */
2020 Boolean dtLite; /* resource */
2021 Boolean blinkOnExec; /* resource */
2022 WmScreenData *dtSD; /* screen for front panel */
2023 int iSlideUpsInProgress;
2024 Boolean waitForClicks; /* resource */
2025 FrameStyle frameStyle; /* resource */
2026 Dimension iconExternalShadowWidth; /* resource */
2027 Dimension frameExternalShadowWidth; /* resource */
2028 int marqueeSelectGranularity; /* resource */
2029 XButtonEvent evLastButton; /* for detecting replayed
2031 Boolean bReplayedButton; /* true if button replayed */
2032 Boolean bSuspendSecondaryRestack; /* overrides transient
2035 XmString clientDefaultTitle;
2036 XmString iconDefaultTitle;
2038 Window attributesWindow;
2039 XWindowAttributes windowAttributes;
2042 Boolean hasShape; /* server supports Shape extension */
2043 int shapeEventBase, shapeErrorBase;
2044 #endif /* NO_SHAPE */
2045 /* Need to replay enter notify events on windows with the
2046 pointer that used to be modalized. This is for pointer focus. */
2047 int replayEnterEvent;
2048 XEnterWindowEvent savedEnterEvent;
2050 unsigned int lockingModMask; /* mask of locking modifier keys */
2051 unsigned int *pLockMaskSequence;
2053 unsigned char tmpBuffer[MAXBUF]; /* replaces static buffers used */
2054 /* for large return values */
2056 int numMouseButtons; /* num of mouse buttons available */
2057 unsigned int bMenuButton; /* BMenu binding (button/state) */
2058 #if defined(sun) && defined(ALLPLANES)
2059 Bool allplanes; /* is SUN_ALLPLANES available? */
2060 #endif /* defined(sun) && defined(ALLPLANES) */
2063 /* quick references to global data: */
2064 #define DISPLAY wmGD.display
2065 #define DISPLAY1 wmGD.display1
2066 #define ACTIVE_PSD (wmGD.pActiveSD)
2067 #define ACTIVE_SCREEN (wmGD.pActiveSD->screen)
2068 #define ACTIVE_WS (wmGD.pActiveSD->pActiveWS)
2069 #define ACTIVE_ROOT (wmGD.pActiveSD->rootWindow)
2070 #define ACTIVE_ICON_TEXT_WIN (wmGD.pActiveSD->activeIconTextWin)
2072 /* According to the xkb protocol bits 13 and 14 are interpreted as a */
2073 /* two-bit unsigned numeric value and report the state keyboard group */
2074 #define NOLOCKMOD(state) ((state) & ~wmGD.lockingModMask & ~(3 << 13))
2075 /* absent map behavior policy values (absentMapBehavior): */
2076 #define AMAP_BEHAVIOR_ADD 0
2077 #define AMAP_BEHAVIOR_MOVE 1
2078 #define AMAP_BEHAVIOR_IGNORE 2
2080 /* colormap focus policy values (colormapFocus): */
2081 #define CMAP_FOCUS_EXPLICIT 0
2082 #define CMAP_FOCUS_POINTER 1
2083 #define CMAP_FOCUS_KEYBOARD 2
2085 /* keyboard input focus policy values (keyboardFocus): */
2086 #define KEYBOARD_FOCUS_EXPLICIT 0
2087 #define KEYBOARD_FOCUS_POINTER 1
2089 /* icon appearance values (iconAppearance): */
2090 #define ICON_LABEL_PART (1L << 0)
2091 #define ICON_IMAGE_PART (1L << 1)
2092 #define ICON_ACTIVE_LABEL_PART (1L << 2)
2093 #define USE_ICON_DEFAULT_APPEARANCE (1L << 3)
2094 #define ICON_APPEARANCE_STANDALONE (ICON_LABEL_PART | ICON_IMAGE_PART |\
2095 ICON_ACTIVE_LABEL_PART)
2096 #define ICON_APPEARANCE_ICONBOX (ICON_LABEL_PART | ICON_IMAGE_PART)
2098 /* icon placement values (iconPlacement, ...): */
2099 #define ICON_PLACE_LEFT_PRIMARY (1L << 0)
2100 #define ICON_PLACE_RIGHT_PRIMARY (1L << 1)
2101 #define ICON_PLACE_TOP_PRIMARY (1L << 2)
2102 #define ICON_PLACE_BOTTOM_PRIMARY (1L << 3)
2103 #define ICON_PLACE_LEFT_SECONDARY (1L << 4)
2104 #define ICON_PLACE_RIGHT_SECONDARY (1L << 5)
2105 #define ICON_PLACE_TOP_SECONDARY (1L << 6)
2106 #define ICON_PLACE_BOTTOM_SECONDARY (1L << 7)
2107 #define ICON_PLACE_EDGE (1L << 8)
2108 #define ICON_PLACE_TIGHT (1L << 9)
2109 #define ICON_PLACE_RESERVE (1L << 10)
2111 #define NO_ICON_PLACE -1
2112 #define MINIMUM_ICON_SPACING 4
2113 #define MAXIMUM_ICON_MARGIN 128
2114 #define ICON_IMAGE_MAX_WIDTH 128
2115 #define ICON_IMAGE_MAX_HEIGHT 128
2116 #define ICON_IMAGE_MIN_WIDTH 16
2117 #define ICON_IMAGE_MIN_HEIGHT 16
2119 /*default client window title: */
2120 #define DEFAULT_CLIENT_TITLE "*****"
2121 #define DEFAULT_ICON_TITLE DEFAULT_CLIENT_TITLE
2123 /* client decoration parameters */
2124 #define MAXIMUM_FRAME_BORDER_WIDTH 64
2126 /* configuration action (configAction): */
2128 #define MOVE_CLIENT 1
2129 #define RESIZE_CLIENT 2
2130 #define PLACE_CLIENT 3
2131 #define MARQUEE_SELECT 4
2133 /* Motif input bindings file name */
2134 #define MOTIF_BINDINGS_FILE ".motifbind"
2136 /* Data type definitions */
2137 #define GLOBAL_DATA_TYPE 1001
2138 #define CLIENT_DATA_TYPE 1002
2139 #define SCREEN_DATA_TYPE 1003
2140 #define WORKSPACE_DATA_TYPE 1004
2142 #ifndef NO_MESSAGE_CATALOG
2143 /*************************************<->*************************************
2150 * This structure is used to hold message strings that used to
2153 *************************************<->***********************************/
2155 typedef struct _NlsStrings
2157 char *default_icon_box_title;
2158 char *builtinSystemMenu;
2159 char *defaultKeyBindings;
2160 char *builtinKeyBindings;
2161 char *defaultButtonBindings;
2162 char *defaultVersionTitle;
2163 char *defaultDtwmHelpTitle;
2164 char *defaultHelpTitle;
2168 extern NlsStrings wmNLS;
2172 /* Stacking functions */
2173 #define STACK_NORMAL 0
2174 #define STACK_WITHIN_FAMILY 1
2175 #define STACK_FREE_FAMILY 2
2177 /* UsePPosition values */
2178 #define USE_PPOSITION_OFF 0
2179 #define USE_PPOSITION_ON 1
2180 #define USE_PPOSITION_NONZERO 2
2182 /* Largest dimension for special casing */
2183 #define BIGSIZE 32767
2186 * External references for global data:
2189 extern WmGlobalData wmGD;
2190 extern char defaultSystemMenuName[];
2191 extern char defaultKeyBindings[];
2192 extern char defaultKeyBindingsName[];
2193 #ifndef NO_MESSAGE_CATALOG
2194 extern char *builtinSystemMenu;
2196 extern char builtinSystemMenu[];
2198 extern char builtinKeyBindings[];
2200 extern Const char _75_foreground[];
2201 extern Const char _50_foreground[];
2202 extern Const char _25_foreground[];
2205 extern char *_DtGetMessage(char *filename, int set, int n, char *s);
2208 * macro to get message catalog strings
2210 #ifndef NO_MESSAGE_CATALOG
2212 # define _CLIENT_CAT_NAME "dtwm.cat"
2213 # else /* __ultrix */
2214 # define _CLIENT_CAT_NAME "dtwm"
2215 # endif /* __ultrix */
2216 # define GETMESSAGE(set, number, string)\
2217 _DtGetMessage(_CLIENT_CAT_NAME, set, number, string)
2219 # define GETMESSAGE(set, number, string)\
2222 #endif /* _WmGlobal_h */