1 /* $Id: mwm.h,v 1.1 2004/08/28 19:25:46 dannybackx Exp $ */ 2 /*****************************************************************************/ 3 /** Copyright 1988 by Evans & Sutherland Computer Corporation, **/ 4 /** Salt Lake City, Utah **/ 5 /** Portions Copyright 1989 by the Massachusetts Institute of Technology **/ 6 /** Cambridge, Massachusetts **/ 7 /** **/ 8 /** All Rights Reserved **/ 9 /** **/ 10 /** Permission to use, copy, modify, and distribute this software and **/ 11 /** its documentation for any purpose and without fee is hereby **/ 12 /** granted, provided that the above copyright notice appear in all **/ 13 /** copies and that both that copyright notice and this permis- **/ 14 /** sion notice appear in supporting documentation, and that the **/ 15 /** names of Evans & Sutherland and M.I.T. not be used in advertising **/ 16 /** in publicity pertaining to distribution of the software without **/ 17 /** specific, written prior permission. **/ 18 /** **/ 19 /** EVANS & SUTHERLAND AND M.I.T. DISCLAIM ALL WARRANTIES WITH REGARD **/ 20 /** TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANT- **/ 21 /** ABILITY AND FITNESS, IN NO EVENT SHALL EVANS & SUTHERLAND OR **/ 22 /** M.I.T. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAM- **/ 23 /** AGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA **/ 24 /** OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER **/ 25 /** TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE **/ 26 /** OR PERFORMANCE OF THIS SOFTWARE. **/ 27 /*****************************************************************************/ 28 /**************************************************************************** 29 * This module is based on Twm, but has been siginificantly modified 30 * by Rob Nation 31 ****************************************************************************/ 32 /*********************************************************************** 33 * The rest of it is all my fault -- MLM 34 * mwm - "LessTif Window Manager" 35 * 36 * Copyright (C) 1995-2002 LessTif Development Team 37 * 38 ***********************************************************************/ 39 40 41 #ifndef _MWM_H 42 #define _MWM_H 43 44 #include <limits.h> 45 46 #include <Xm/Xm.h> 47 #include <Xm/MwmUtil.h> 48 49 /* 50 * path components 51 */ 52 #define MWM_SHELL_NAME "MWMSHELL" 53 #define SHELL_NAME "SHELL" 54 #define DEFAULT_SHELL "/bin/sh" 55 #define DEFAULT_SCREEN "DISPLAY=:%s.%d" 56 #define DEFAULT_DISPLAY "DISPLAY=%s:%s.%d" 57 #define DEFAULT_DISPLAY_STRING "DISPLAY=%s" 58 #define HOME_MWMRC ".mwmrc" /* precede with $HOME */ 59 #define SYSTEM_MWMRC "system.mwmrc" /* precede with MWM_DDIR */ 60 #define HOME_BINDINGS_FILE ".motifbind" 61 #define MWM_VERSION "Lesstif mwm Release" 62 #define OPT_MULTISCREEN "-multiscreen" 63 #define OPT_SCREENS "-screens" 64 65 66 #ifndef MWM_DDIR 67 #define MWM_DDIR "/usr/lib/X11/mwm" 68 #endif 69 70 #ifndef XINCL_PATH 71 #define XINCL_PATH "/usr/X11/include" 72 #endif 73 74 75 #ifdef __EMX__ 76 #define MWM_ICONDIR "/XFree86/include/X11/bitmaps;/XFree86/include/X11/pixmaps" 77 /* amai: this is an ugly hack ... */ 78 #ifdef MWM_DDIR 79 #undef MWM_DDIR 80 #endif 81 #define MWM_DDIR (char*)__XOS2RedirRoot("/XFree86/lib/X11/mwm") 82 #else /* !__EMX__ */ 83 #define MWM_ICONDIR XINCL_PATH"/X11/bitmaps:"XINCL_PATH"/X11/pixmaps" 84 #endif 85 86 87 /* 88 * builtin defaults, when a configuration file can't be found 89 * Don't change the WIN_MENU_NAME unless you change it in both places 90 */ 91 #define DEFAULT_WIN_MENU_NAME "DefaultWindowMenu" 92 #define DEFAULT_BUTTON_BINDING_NAME "DefaultButtonBindings" 93 #define DEFAULT_KEY_BINDING_NAME "DefaultKeyBindings" 94 95 #define DEFAULT_MWM_WINDOW_MENU \ 96 "Menu DefaultWindowMenu {\n" \ 97 "Restore Alt<Key>F5 f.restore\n" \ 98 "Move Alt<Key>F7 f.move\n" \ 99 "Size Alt<Key>F8 f.resize\n" \ 100 "Minimize Alt<Key>F9 f.minimize\n" \ 101 "Maximize Alt<Key>F10 f.maximize\n" \ 102 "Lower Alt<Key>F3 f.lower\n" \ 103 "no-label f.separator\n" \ 104 "Close Alt<Key>F4 f.kill\n" \ 105 "}" 106 107 #define DEFAULT_MWM_ROOT_MENU \ 108 "Menu DefaultRootMenu {\n" \ 109 "\"Root Menu\" f.title\n" \ 110 "\"New Window\" f.exec \"xterm &\"\n" \ 111 "\"Shuffle Up\" f.circle_up\n" \ 112 "\"Shuffle Down\" f.circle_down\n" \ 113 "\"Refresh\" f.refresh\n" \ 114 "\"Pack Icons\" f.pack_icons\n" \ 115 "no-label f.separator\n" \ 116 "\"Restart...\" f.restart\n" \ 117 "\"Quit...\" f.quit_mwm\n" \ 118 "}\n" 119 120 #define DEFAULT_MWM_KEY_BINDINGS \ 121 "Keys DefaultKeyBindings {\n" \ 122 "Shift<Key>Escape window|icon f.post_wmenu\n" \ 123 "Alt<Key>space window|icon f.post_wmenu\n" \ 124 "Alt<Key>Tab root|icon|window f.next_key\n" \ 125 "Alt Shift<Key>Tab root|icon|window f.prev_key\n" \ 126 "Alt<Key>Escape root|icon|window f.circle_down\n" \ 127 "Alt Shift<Key>Escape root|icon|window f.circle_up\n" \ 128 "Alt Shift Ctrl<Key>exclam root|icon|window f.set_behavior\n" \ 129 "Alt Ctrl<Key>1 root|icon|window f.set_behavior\n" \ 130 "Alt<Key>F6 window f.next_key transient\n" \ 131 "Alt Shift<Key>F6 window f.prev_key transient\n" \ 132 "Shift<Key>F10 icon f.post_wmenu\n" \ 133 "}" 134 135 #define DEFAULT_MWM_BUTTON_BINDINGS \ 136 "Buttons DefaultButtonBindings {\n" \ 137 "<Btn1Down> icon|frame f.raise\n" \ 138 "<Btn3Down> icon|frame f.post_wmenu\n" \ 139 "<Btn3Down> root f.menu DefaultRootMenu\n" \ 140 "}" 141 142 /* 143 * this next one is for toggling behavior 144 */ 145 #define MWM_BEHAVIOR_KEY_BINDINGS \ 146 "Keys MwmBehaviorButtonBindings {\n" \ 147 "Alt Shift Ctrl<Key>exclam root|icon|window f.set_behavior\n" \ 148 "Alt Ctrl<Key>1 root|icon|window f.set_behavior\n" \ 149 "}" 150 151 /* 152 * this one is for builtin behaviors that always exist 153 */ 154 #define BUILTIN_MWM_BUTTON_BINDINGS \ 155 "Buttons BuiltinButtonBindings {\n" \ 156 "<Btn1Down> root f.window_list\n" \ 157 "<Btn3Down> root f.menu DefaultRootMenu\n" \ 158 "<Btn1Down> border f.resize\n" \ 159 "<Btn1Down> icon|title f.move\n"\ 160 "<Btn3Down> icon|frame f.post_wmenu\n" \ 161 "<Btn1Down> menub f.post_wmenu\n" \ 162 "<Btn1Down> minimizeb f.minimize\n" \ 163 "<Btn1Down> maximizeb f.maximize\n" \ 164 "}" 165 166 #define BUILTIN_MENU_BUTTON_BINDINGS \ 167 "Buttons MenuButtonBinding {" \ 168 "<Btn1Click> menub f.post_wmenu\n" \ 169 "}" 170 171 #define BUILTIN_KILL_BUTTON_BINDINGS \ 172 "Buttons KillButtonBinding {" \ 173 "<Btn1Click2> menub f.kill\n" \ 174 "}" 175 176 #define BUILTIN_ICON_BUTTON_BINDINGS \ 177 "Buttons IconButtonBinding {" \ 178 "<Btn1Click> icon f.post_wmenu\n" \ 179 "<Btn1Click2> icon f.restore\n" \ 180 "}" 181 182 typedef struct Size { 183 Dimension width; 184 Dimension height; 185 } Size; 186 187 typedef XRectangle Geometry; 188 189 /* 190 * decoration components have resources, too... 191 */ 192 typedef struct ComponentInfo { 193 int type; 194 195 Pixel background; 196 Pixmap background_pixmap; 197 Pixel bottom_shadow_color; 198 Pixmap bottom_shadow_pixmap; 199 XmFontList font_list; 200 Pixel foreground; 201 Boolean save_under; 202 Pixel top_shadow_color; 203 Pixmap top_shadow_pixmap; 204 205 GC normal_GC; 206 GC grayed_GC; 207 GC top_GC; 208 GC bot_GC; 209 XFontStruct *font; 210 int f_height; 211 int f_y; 212 213 /* frame and icon components have a few more */ 214 Pixel active_background; 215 Pixmap active_background_pixmap; 216 Pixel active_bottom_shadow_color; 217 Pixmap active_bottom_shadow_pixmap; 218 Pixel active_foreground; 219 Pixel active_top_shadow_color; 220 Pixmap active_top_shadow_pixmap; 221 222 GC active_GC; 223 GC active_top_GC; 224 GC active_bot_GC; 225 } ComponentInfo; 226 227 /* 228 * component types 229 */ 230 enum { 231 MWM_MENU, 232 MWM_FEEDBACK, 233 MWM_PAGER, 234 MWM_ICON, 235 MWM_TITLE_A, 236 MWM_RESIZE_H, 237 MWM_BORDER, 238 MWM_MAXIMIZE_B, 239 MWM_MINIMIZE_B, 240 MWM_MENU_B, 241 MWM_MAX_COMPONENTS 242 }; 243 244 /* 245 * for focus policies. Other valus are in Xm/Xm.h 246 */ 247 enum { 248 XmKEYBOARD = 2 249 }; 250 251 /* 252 * for icon decorations 253 */ 254 #define XmICON_ACTIVELABEL (1L << 0) 255 #define XmICON_IMAGE (1L << 1) 256 #define XmICON_LABEL (1L << 2) 257 258 /* 259 * for icon placement 260 */ 261 #define XmICONS_TOP (1L << 0) 262 #define XmICONS_BOTTOM (1L << 1) 263 #define XmICONS_LEFT (1L << 2) 264 #define XmICONS_RIGHT (1L << 3) 265 #define XmICONS_TIGHT (1L << 4) 266 267 /* 268 * for icon placement 269 */ 270 #define MWM_FEEDBACK_ALL (1L << 0) 271 #define MWM_FEEDBACK_BEHAVIOR (1L << 1) 272 #define MWM_FEEDBACK_KILL (1L << 2) 273 #define MWM_FEEDBACK_MOVE (1L << 3) 274 #define MWM_FEEDBACK_PLACEMENT (1L << 4) 275 #define MWM_FEEDBACK_QUIT (1L << 5) 276 #define MWM_FEEDBACK_RESIZE (1L << 6) 277 #define MWM_FEEDBACK_RESTART (1L << 7) 278 279 enum { 280 XmUSE_PPOSITION_ON, 281 XmUSE_PPOSITION_OFF, 282 XmUSE_PPOSITION_NON_ZERO 283 }; 284 285 #ifndef WithdrawnState 286 #define WithdrawnState 0 287 #endif 288 289 /* 290 * frame width 291 */ 292 #define PAN_FRAME_THICKNESS 2 293 294 /* 295 * the maximum number of mouse buttons mwm knows about 296 * 297 * don't think that upping this to 5 will make everything 298 * hunky-dory with 5 button mouses 299 */ 300 #define MAX_BUTTONS 3 301 302 #define HEIGHT_EXTRA 4 /* Extra height for texts in popus */ 303 #define HEIGHT_EXTRA_TITLE 4 /* Extra height for underlining title */ 304 #define HEIGHT_SEPARATOR 4 /* Height of separator lines */ 305 306 #define SCROLL_REGION 2 /* region around screen edge that */ 307 /* triggers scrolling */ 308 309 /* 310 * menu label types 311 */ 312 enum { 313 IS_STRING, 314 IS_BITMAP 315 }; 316 317 #ifndef TRUE 318 #define TRUE 1 319 #define FALSE 0 320 #endif 321 322 #define NULLSTR ((char *) NULL) 323 324 /* 325 * contexts for button presses 326 */ 327 #define C_NO_CONTEXT 0x0000 328 #define C_WINDOW 0x0001 329 #define C_TITLE 0x0002 330 #define C_ICON 0x0004 331 #define C_ROOT 0x0008 332 #define C_FRAME 0x0010 333 #define C_MENUB 0x0020 334 #define C_MAXIMIZEB 0x0040 335 #define C_MINIMIZEB 0x0080 336 #define C_RALL (C_MINIMIZEB|C_MAXIMIZEB) 337 #define C_LALL (C_MENUB) 338 #define C_ALL (C_WINDOW|C_TITLE|C_ICON|C_ROOT|C_FRAME| \ 339 C_MINIMIZEB|C_MAXIMIZEB|C_MENUB) 340 341 /* 342 * window flags definitions 343 */ 344 #define STICKY 0x00000001 /* Does window stick to glass? */ 345 #define CIRCULATESKIP 0x00000002 346 #define STARTICONIC 0x00000004 347 #define WINDOWLISTSKIP 0x00000008 348 #define MAPPED 0x00000010 /* is it mapped? */ 349 #define ICONIFIED 0x00000020 /* is it an icon now? */ 350 #define TRANSIENT 0x00000040 /* is it a transient window? */ 351 #define RAISED 0x00000080 /* if a sticky window, does it need to be raised */ 352 #define VISIBLE 0x00000100 /* is the window fully visible */ 353 #define ICON_OURS 0x00000200 /* is the icon window supplied by the app? */ 354 #define XPM_FLAG 0x00000400 /* is the icon window an xpm? */ 355 #define PIXMAP_OURS 0x00000800 /* is the icon pixmap ours to free? */ 356 #define SHAPED_ICON 0x00001000 /* is the icon shaped? */ 357 #define MAXIMIZED 0x00002000 /* is the window maximized? */ 358 #define WM_TAKES_FOCUS 0x00004000 /* takes focus */ 359 #define WM_DELS_WINDOW 0x00008000 /* accepts DEL_WINDOW message */ 360 #define WM_SAVE_SELF 0x00010000 /* accepts DEL_WINDOW message */ 361 #define ICON_MOVED 0x00020000 /* has the icon been moved by the user? */ 362 #define ICON_UNMAPPED 0x00040000 /* was the icon unmapped, though window is iconified (Transients) */ 363 #define MAP_PENDING 0x00080000 /* Sent an XMapWindow, but didn't receive a MapNotify yet. */ 364 #define MWM_MESSAGES 0x00100000 /* has a MWM_MESSAGES property */ 365 366 /* 367 * flags to suppress/enable title bar buttons 368 */ 369 #define BUTTON1 0x0001 370 #define BUTTON2 0x0002 371 #define BUTTON3 0x0004 372 #define BUTTON4 0x0008 373 #define BUTTON5 0x0010 374 #define BUTTON6 0x0020 375 #define BUTTON7 0x0040 376 #define BUTTON8 0x0080 377 #define BUTTON9 0x0100 378 #define BUTTON10 0x0200 379 380 #define MAXPOPUPS 50 381 382 typedef struct MenuItem { 383 struct MenuItem *next; /* next menu item */ 384 struct MenuItem *prev; /* prev menu item */ 385 char *item; /* the character string displayed on left */ 386 char *item2; /* the character string displayed on right */ 387 char *action; /* action to be performed */ 388 short x; /* x coordinate for text (item) */ 389 short x2; /* x coordinate for text (item2) */ 390 short y_offset; /* y coordinate for item */ 391 short y_height; /* y height for item */ 392 short func; /* twm built in function */ 393 long val1; /* values needed for F_SCROLL */ 394 long val2; 395 long val1_unit; /* units for val1, val2 */ 396 long val2_unit; /* pixels (unit=1) or percent of screen 397 * (unit = Scr.d_width/d_height */ 398 short state; /* video state, 0 = normal, 1 = reversed */ 399 short strlen; /* strlen(item) */ 400 short strlen2; /* strlen(item2) */ 401 short hotkey; /* Hot key offset (pete@tecc.co.uk). 402 0 - No hot key 403 +ve - offset to hot key char in item 404 -ve - offset to hot key char in item2 405 (offsets have 1 added, so +1 or -1 406 refer to the *first* character) 407 */ 408 struct MenuRoot *menu; /* sub-menu */ 409 } MenuItem; 410 411 typedef struct MenuRoot { 412 struct MenuItem *first; /* first item in menu */ 413 struct MenuItem *last; /* last item in menu */ 414 struct MenuRoot *next; /* next in list of root menus */ 415 char *name; /* name of root */ 416 Window w; /* the window of the menu */ 417 short height; /* height of the menu */ 418 short width; /* width of the menu for 1st col */ 419 short width2; /* width of the menu for 2nd col */ 420 short items; /* number of items in the menu */ 421 Bool in_use; 422 } MenuRoot; 423 424 typedef struct MouseButton { 425 struct MouseButton *next; 426 int func; /* the function number */ 427 MenuRoot *menu; /* menu if func is F_POPUP */ 428 MenuItem *item; /* action to perform if func != F_POPUP */ 429 int button; 430 int context; 431 int modifier; 432 int mask; 433 int count; 434 int val1; 435 int val2; 436 long val1_unit; /* units for val1, val2 */ 437 long val2_unit; /* pixels (unit=1) or percent of screen 438 * (unit = Scr.d_width/d_height */ 439 } MouseButton; 440 441 typedef struct FuncKey { 442 struct FuncKey *next; /* next in the list of function keys */ 443 char *name; /* key name */ 444 KeyCode keycode; /* X keycode */ 445 int cont; /* context */ 446 int mods; /* modifiers */ 447 int func; /* function to perform */ 448 MenuRoot *menu; /* menu if func is F_POPUP */ 449 char *action; /* action string (if any) */ 450 int val1; /* values needed for F_SCROLL */ 451 int val2; 452 long val1_unit; /* units for val1, val2 */ 453 long val2_unit; /* pixels (unit=1) or percent of screen */ 454 } FuncKey; 455 456 #define MENU_ERROR -1 457 #define MENU_NOP 0 458 #define MENU_DONE 1 459 #define SUBMENU_DONE 2 460 461 #define SIZE_HINDENT 5 462 #define SIZE_VINDENT 3 463 #define MAX_WINDOW_WIDTH 32767 464 #define MAX_WINDOW_HEIGHT 32767 465 466 /* 467 * for each window that is on the display, one of these structures 468 * is allocated and linked into a list 469 */ 470 typedef struct MwmWindow { 471 struct MwmWindow *next; /* next mwm window */ 472 struct MwmWindow *prev; /* prev mwm window */ 473 474 struct MwmWindow *ancestor; /* family lineage order */ 475 struct MwmWindow *child; /* family lineage order */ 476 477 struct MwmWindow *focus_in_tree; /* focus in family */ 478 479 long client_decoration; 480 long client_functions; 481 Boolean focus_auto_raise; 482 String icon_image; 483 Pixel icon_image_background; 484 Pixel icon_image_bottom_shadow_color; 485 Pixmap icon_image_bottom_shadow_pixmap; 486 Pixel icon_image_foreground; 487 Pixel icon_image_top_shadow_color; 488 Pixmap icon_image_top_shadow_pixmap; 489 Pixel matte_background; 490 Pixel matte_bottom_shadow_color; 491 Pixmap matte_bottom_shadow_pixmap; 492 Pixel matte_foreground; 493 Pixel matte_top_shadow_color; 494 Pixmap matte_top_shadow_pixmap; 495 Dimension matte_width; 496 Size maximum_client_size; 497 Boolean use_client_icon; 498 unsigned char use_p_position; 499 String window_menu; 500 501 char *name; /* name of the window */ 502 503 Window w; /* the child window */ 504 Window frame; /* the frame window */ 505 Window parent; /* Ugly Ugly Ugly - it looks like you 506 * HAVE to reparent the app window into 507 * a window whose size = app window, 508 * or else you can't keep xv and matlab 509 * happy at the same time! */ 510 Window title; /* the title bar window */ 511 Window sides[4]; 512 Window corners[4]; /* Corner pieces */ 513 Window menub; 514 Window minimizeb; 515 Window maximizeb; 516 Window icon_w; /* the icon window */ 517 Window icon_pixmap_w; /* the icon window */ 518 Window icon_borders[4]; 519 Window icon_frame; 520 Window transientfor; 521 Window pager_view; 522 Window shield; /* for application modality & refresh */ 523 524 int wShaped; /* is this a shaped window */ 525 526 int frame_x; /* x position of frame */ 527 int frame_y; /* y position of frame */ 528 int frame_width; /* width of frame */ 529 int frame_height; /* height of frame */ 530 531 int boundary_width; 532 int corner_width; 533 int old_bw; /* border width before reparenting */ 534 int bw; 535 536 int title_x; 537 int title_y; 538 int title_height; /* height of the title bar */ 539 int title_width; /* width of the title bar */ 540 541 int icon_x_loc; /* icon window x coordinate */ 542 int icon_xl_loc; /* icon label window x coordinate */ 543 int icon_y_loc; /* icon window y coordiante */ 544 int icon_w_width; /* width of the icon window */ 545 int icon_w_height; /* height of the icon window */ 546 int icon_t_width; /* width of the icon title window */ 547 int icon_p_width; /* width of the icon pixmap window */ 548 int icon_p_height; /* height of the icon pixmap window */ 549 int icon_border_width; /* does this icon have borders? */ 550 Pixmap icon_pixmap; /* pixmap for the icon */ 551 int icon_depth; /* Drawable depth for the icon */ 552 Pixmap icon_mask_pixmap; /* pixmap for the icon mask */ 553 554 XWindowAttributes attr; /* the child window attributes */ 555 XSizeHints hints; /* normal hints */ 556 XWMHints *wmhints; /* WM hints */ 557 XClassHint classhint; 558 559 int Desk; /* Tells which desktop this window is on */ 560 int FocusDesk; /* Where (if at all) was it focussed */ 561 int DeIconifyDesk; /* Desk to deiconify to, for StubbornIcons */ 562 563 unsigned long flags; 564 char *icon_bitmap_file; 565 char *icon_label; 566 char *icon_active_label; 567 568 int orig_x; /* unmaximized x coordinate */ 569 int orig_y; /* unmaximized y coordinate */ 570 int orig_wd; /* unmaximized window width */ 571 int orig_ht; /* unmaximized window height */ 572 573 int xdiff, ydiff; /* used to restore window position on exit */ 574 MwmHints *mwm_hints; 575 char *mwm_menu; 576 Atom *mwm_messages; 577 unsigned long num_messages; 578 int functions; 579 int decorations; 580 Window *cmap_windows; /* Colormap windows property */ 581 int number_cmap_windows; /* Should generally be 0 */ 582 int focus_sequence; 583 584 unsigned long buttons; 585 586 MenuRoot *custom_menu; 587 } MwmWindow; 588 589 /* 590 * windows without titles 591 */ 592 #define NO_NAME "Untitled" 593 594 /* 595 * Cursor types 596 */ 597 #define POSITION_CURS 0 /* upper Left corner cursor */ 598 #define TITLE_CURS 1 /* title-bar cursor */ 599 #define DEFAULT_CURS 2 /* cursor for apps to inherit */ 600 #define SYS_CURS 3 /* sys-menu and iconify boxes cursor */ 601 #define MOVE_CURS 4 /* resize cursor */ 602 #define WAIT_CURS 5 /* wait a while cursor */ 603 #define MENU_CURS 6 /* menu cursor */ 604 #define SELECT_CURS 7 /* dot cursor for f.move, etc. from menus */ 605 #define DESTROY_CURS 8 /* skull and cross bones, f.destroy */ 606 #define TOP_CURS 9 607 #define RIGHT_CURS 10 608 #define BOTTOM_CURS 11 609 #define LEFT_CURS 12 610 #define TOP_LEFT_CURS 13 611 #define TOP_RIGHT_CURS 14 612 #define BOT_LEFT_CURS 15 613 #define BOT_RIGHT_CURS 16 614 #define SYS_MODAL_CURS 17 615 #define HOURGLASS_CURS 18 616 #define MAX_CURSORS 19 617 618 /* 619 * Maximum number of icon boxes that are allowed 620 */ 621 #define MAX_BOXES 4 622 623 typedef struct { 624 Window win; 625 int isMapped; 626 } PanFrame; 627 628 typedef struct ScreenInfo { 629 String button_bindings; 630 Boolean clean_text; 631 Boolean fade_normal_icon; 632 Geometry feedback_geometry; 633 Dimension frame_border_width; 634 Geometry icon_box_geometry; 635 String icon_box_name; 636 String icon_box_sb_display_policy; 637 XmString icon_box_title; 638 long icon_decoration; 639 Size icon_image_maximum; 640 Size icon_image_minimum; 641 unsigned char icon_placement; 642 Dimension icon_placement_margin; 643 String key_bindings; 644 Boolean limit_resize; 645 Size maximum_maximum_size; 646 Boolean move_opaque; 647 Dimension resize_border_width; 648 Boolean resize_cursors; 649 long transient_decoration; 650 long transient_functions; 651 Boolean use_icon_box; 652 653 /* instance vars */ 654 unsigned long screen; /* screen number */ 655 String screen_name; 656 657 int d_depth; /* copy of DefaultDepth(dpy, screen) */ 658 int d_width; /* copy of DisplayWidth(dpy, screen) */ 659 int d_height; /* copy of DisplayHeight(dpy, screen) */ 660 661 Window root_win; /* the root window */ 662 Window size_win; /* the resize dimensions window */ 663 Window no_focus_win; /* focus window when nobody has it */ 664 Window pager_win; /* pager window */ 665 Window pager_child_win; 666 Window pressed_win; /* the decoration window pressed */ 667 Window restart_win; 668 Window quit_win; 669 Window toggle_win; 670 Window shield_win; 671 672 MwmWindow mwm_root; /* the head of the mwm window list */ 673 MwmWindow *mwm_colormap; /* mwm colormap window */ 674 MwmWindow *mwm_pager; /* the pager window */ 675 MwmWindow *mwm_pushed; /* saved window to install when pushes 676 * drops to zero */ 677 MwmWindow *mwm_highlight; /* the mwm window that is highlighted 678 * except for networking delays, this 679 * is the window which has the focus */ 680 MwmWindow *mwm_focus; /* Last window which Mwm gave the focus 681 * to; NOT the window that really has 682 *the focus */ 683 MwmWindow *mwm_last_focus; /* Window which had focus before mwm 684 * stole it to do moves/menus/etc. */ 685 MwmWindow *mwm_last_raised; /* Last window which was raised. Used 686 * for raise lower func. */ 687 MwmWindow *mwm_grabbing; 688 MwmWindow *mwm_event; /* for choosing highlight window on a 689 * button or key event */ 690 MwmWindow *top; /* for stacking order */ 691 MwmWindow *bottom; /* for stacking order */ 692 693 Colormap last_cmap; 694 int alt_mask; 695 696 int smart_placement; 697 698 int root_pushes; /* current push level to install root 699 colormap windows */ 700 int event_context; 701 702 Cursor cursors[MAX_CURSORS]; 703 704 GC resize_GC; 705 GC matte_ts_GC; 706 GC matte_bs_GC; 707 708 PanFrame panner_top, 709 panner_left, 710 panner_right, 711 panner_bottom; 712 713 ComponentInfo components[MWM_MAX_COMPONENTS]; 714 715 unsigned virt_scale; /* Panner scale factor */ 716 int virt_x_max; /* Max location for top left of virt desk */ 717 int virt_y_max; 718 int virt_x; /* X Dimension of virtual desktop */ 719 int virt_y; /* Y Dimension of virtual desktop */ 720 int edge_scroll_x; 721 int edge_scroll_y; 722 int pager_x; 723 int pager_y; 724 725 MouseButton *buttons; 726 FuncKey *keys; 727 MenuRoot **popups; 728 int num_popups; 729 int max_popups; 730 731 char *DefaultIcon; /* Icon to use when no other icons are found */ 732 733 unsigned char buttons2grab; /* buttons to grab in click to focus mode */ 734 unsigned long flags; 735 int icon_boxes[MAX_BOXES][4]; 736 int num_icon_boxes; 737 738 int ScrollResistance; /* resistance to scrolling in desktop */ 739 int MoveResistance; /* res to moving windows over viewport edge */ 740 int OpaqueSize; 741 int current_desk; /* The current desktop number */ 742 char *IconPath; 743 char *PixmapPath; 744 } ScreenInfo; 745 746 /* 747 * for the flags value - these used to be seperate Bool's 748 */ 749 #define CirculateSkipIcons 0x0001 750 #define StubbornIcons 0x0002 751 #define StubbornPlacement 0x0004 752 #define StubbornIconPlacement 0x0008 753 #define OpaqueResize 0x0010 754 755 /* 756 * management info for the whole window manager 757 */ 758 typedef struct MwmInternalInfo { 759 Boolean auto_key_focus; 760 Time auto_raise_delay; 761 String bitmap_directory; 762 Boolean client_auto_place; 763 unsigned char colormap_focus_policy; 764 String config_file; 765 Boolean deiconify_key_focus; 766 Time double_click_time; 767 Boolean enable_warp; 768 Boolean enforce_key_focus; 769 Boolean icon_auto_place; 770 Boolean icon_click; 771 Boolean interactive_placement; 772 unsigned char keyboard_focus_policy; 773 Boolean lower_on_iconify; 774 Dimension move_threshold; 775 Boolean multi_screen; 776 Boolean pass_buttons; 777 Boolean pass_selection_buttons; 778 Boolean position_is_frame; 779 Boolean position_on_screen; 780 Time quit_timeout; 781 Boolean raise_key_focus; 782 String screens; 783 long show_feedback; 784 Boolean startup_key_focus; 785 Boolean w_menu_button_click; 786 Boolean w_menu_button_click_2; 787 Boolean use_pager; 788 int edge_scroll_x; 789 int edge_scroll_y; 790 int pager_x; 791 int pager_y; 792 int virtual_x; 793 int virtual_y; 794 Boolean smart_placement; 795 796 /* instance vars */ 797 ScreenInfo **screen_info; 798 int number_of_screens; 799 int click_time; /* Max button-click delay */ 800 } MwmInternalInfo; 801 802 /* 803 * mwm functions 804 */ 805 #define F_NOP 0 806 #define F_BEEP 1 807 #define F_CHANGE_WINDOWS_DESK 2 808 #define F_CIRCULATE_DOWN 3 809 #define F_CIRCULATE_UP 4 810 #define F_CLOSE 5 811 #define F_DESK 6 812 #define F_EXEC 7 /* string */ 813 #define F_FOCUS 8 814 #define F_FOCUS_COLOR 9 815 #define F_FOCUS_KEY 10 816 #define F_GOTO_PAGE 11 817 #define F_ICONIFY 12 818 #define F_LOWER 13 819 #define F_MAXIMIZE 14 820 #define F_MOVE 15 821 #define F_MOVECURSOR 16 822 #define F_NEXT_CMAP 17 823 #define F_NEXT_KEY 18 824 #define F_NORMALIZE 19 825 #define F_NORM_AND_RAISE 20 826 #define F_PACK_ICONS 21 827 #define F_PASS_KEYS 22 828 #define F_POPUP 23 /* string */ 829 #define F_PREV_CMAP 24 830 #define F_PREV_KEY 25 831 #define F_QUIT 26 832 #define F_RAISE 27 833 #define F_RAISE_IT 28 834 #define F_RAISELOWER 29 835 #define F_RESIZE 30 836 #define F_RESTART 31 837 #define F_REFRESH 32 838 #define F_REFRESH_WIN 33 839 #define F_RESTORE_AND_RAISE 34 840 #define F_SCREEN 35 841 #define F_SCROLL 36 /* scroll the virtual desktop */ 842 #define F_SEND_MSG 37 843 #define F_SET_BEHAVIOR 38 844 #define F_STICK 39 845 #define F_TITLE 40 846 #define F_TOGGLE_PAGE 41 847 #define F_WARP 42 848 #define F_WINDOWLIST 43 849 #define F_W_POPUP 44 /* string */ 850 851 /* 852 * error handler 853 */ 854 #define REDIRECT 01 855 #define GENERAL 02 856 857 /* 858 * gotta know which way 859 */ 860 #define UP 1 861 #define DOWN 0 862 863 /* 864 * prototypes 865 */ 866 /* Panner functions */ 867 extern void PAN_Initialize(ScreenInfo *scr); 868 extern void PAN_Raise(ScreenInfo *scr); 869 extern void PAN_CheckBounds(ScreenInfo *scr); 870 extern void PAN_PanDesktop(ScreenInfo *scr, int, int, 871 int *, int *, int *, int *, Boolean, XEvent *); 872 extern Boolean PAN_IsPannerWindow(ScreenInfo *scr, Window win); 873 874 /* Desktop functions */ 875 extern void DT_SaveState(ScreenInfo *scr); 876 extern void DT_ChangeDesks(ScreenInfo *scr, int val1, int val2); 877 extern void DT_WindowChangingDesks(ScreenInfo *scr, MwmWindow *t, int val1); 878 879 /* Pager functions */ 880 extern void PAGER_Clear(ScreenInfo *scr); 881 extern void PAGER_Redraw(ScreenInfo *scr); 882 extern void PAGER_SwitchPage(ScreenInfo *scr, Bool, Bool, XEvent *event); 883 extern void PAGER_UpdateViewPort(ScreenInfo *scr); 884 extern void PAGER_UpdateView(ScreenInfo *scr, MwmWindow * t); 885 extern void PAGER_Initialize(ScreenInfo *scr, Position x, Position y); 886 extern void PAGER_Update(ScreenInfo *scr, XEvent *event); 887 extern void PAGER_MoveViewPort(ScreenInfo *scr, int newx, int newy, Boolean); 888 889 /* Parser functions */ 890 extern void PARSE_mwmrc(ScreenInfo *scr); 891 extern int PARSE_buf(ScreenInfo *scr, char *buf); 892 893 /* Resource functions */ 894 extern void RES_Initialize(void); 895 extern void RES_GetClientDefaults(ScreenInfo *scr, MwmWindow *win, char *name_s, char *class_s); 896 extern void RES_GetScreenDefaults(ScreenInfo *scr); 897 extern void RES_GetComponentDefaults(ScreenInfo *scr); 898 899 /* Miscellaneous functions */ 900 extern Boolean MISC_Grab(ScreenInfo *scr, int); 901 extern void MISC_Ungrab(ScreenInfo *scr); 902 extern void MISC_WaitForButtonsUp(ScreenInfo *scr); 903 extern int MISC_FlushExpose(Window w); 904 extern void MISC_SetTimer(int); 905 extern Boolean MISC_StashEventTime(XEvent * ev); 906 extern Time MISC_FetchEventTime(void); 907 extern void MISC_SetFocusSequence(ScreenInfo *scr); 908 extern void MISC_KeyboardShortcut(ScreenInfo *scr, XEvent *, int); 909 extern void MISC_AddToTree(ScreenInfo *scr, MwmWindow *win); 910 extern void MISC_RemoveFromTree(ScreenInfo *scr, MwmWindow *win); 911 extern void MISC_PrintTree(ScreenInfo *scr); 912 extern MwmWindow *MISC_RootOfTree(MwmWindow *win); 913 extern void MISC_FixupTransients(ScreenInfo *scr); 914 extern void MISC_DestroyChildren(ScreenInfo *scr, MwmWindow *win); 915 916 /* Cursor functions */ 917 extern void CURS_Initialize(ScreenInfo *scr); 918 919 /* Property functions */ 920 extern void PROP_Initialize(void); 921 extern void PROP_SetBehavior(ScreenInfo *scr, Boolean custom); 922 extern void PROP_ClearBehavior(ScreenInfo *scr); 923 extern void PROP_SetPriorityColors(ScreenInfo *scr); 924 extern Boolean PROP_CheckDesktop(ScreenInfo *scr); 925 extern void PROP_SetState(MwmWindow *, int); 926 extern void PROP_SendClientMessage(Window w, Atom a, Time timestamp); 927 extern void PROP_GetMwmHints(MwmWindow *win); 928 extern void PROP_GetMwmMenu(MwmWindow *win); 929 extern void PROP_GetMwmMessages(MwmWindow *win); 930 extern void PROP_GetWmIconName(MwmWindow *win); 931 extern void PROP_GetWindowSizeHints(MwmWindow *win); 932 extern void PROP_GetWmProtocols(MwmWindow *win); 933 extern int PROP_GetBehavior(ScreenInfo *scr); 934 extern void PROP_GetWmColormapWindows(MwmWindow *tmp); 935 extern Boolean PROP_VerifyMwmMessage(MwmWindow *w, Atom message); 936 extern void PROP_SendMwmMessage(Window w, Atom message, Time timestamp); 937 938 /* Screen functions */ 939 extern Boolean SCREEN_Initialize(ScreenInfo *scr); 940 extern ScreenInfo *SCREEN_EventToStruct(XEvent *event); 941 942 /* Window functions */ 943 extern void WIN_CaptureWindows(ScreenInfo *scr); 944 extern void WIN_ReleaseWindows(ScreenInfo *scr); 945 extern void WIN_MapWindow(ScreenInfo *scr, Window win); 946 extern void WIN_SetFocus(ScreenInfo *scr, Window, MwmWindow *); 947 extern void WIN_ChangeFocus(ScreenInfo *scr, MwmWindow *t, 948 int DeIconifyOnly); 949 extern void WIN_RestoreWithdrawn(ScreenInfo *scr, MwmWindow *, Boolean); 950 extern MwmWindow *WIN_WindowToStruct(ScreenInfo *scr, Window target); 951 extern void WIN_Raise(ScreenInfo *scr, MwmWindow * t); 952 extern void WIN_Lower(ScreenInfo *scr, MwmWindow * t); 953 extern void WIN_ConstrainWindow(ScreenInfo *scr, MwmWindow *win, 954 int *widthp, int *heightp); 955 extern void WIN_DrawOutline(ScreenInfo *scr, Window win, 956 int x, int y, int wd, int ht); 957 extern void WIN_FreeNames(MwmWindow * tmp, Bool nukename, Bool nukeicon); 958 extern void WIN_DestroyWindow(ScreenInfo *scr, MwmWindow *Tmp_win); 959 extern void WIN_SetFocusInTree(MwmWindow *win); 960 961 /* ColorMap functions */ 962 extern void COLOR_InstallWindowColorMap(ScreenInfo *scr, MwmWindow *win); 963 extern void COLOR_PushRootColorMap(ScreenInfo *scr); 964 extern void COLOR_PopRootColorMap(ScreenInfo *scr); 965 966 /* Decoration functions */ 967 extern void DEC_DrawDecorations(ScreenInfo *, MwmWindow *, 968 Bool, Bool, Bool, Window); 969 extern void DEC_DrawTitleBar(ScreenInfo *scr, MwmWindow *, Bool, Bool); 970 extern void DEC_DrawShadows(MwmWindow *, Window, int, int, int, int, 971 GC, GC); 972 extern void DEC_DrawBorder(MwmWindow *, Window, int, int, int, int, 973 GC, GC); 974 extern void DEC_CreateDecorations(ScreenInfo *scr, MwmWindow *); 975 extern void DEC_ConfigureDecorations(ScreenInfo *scr, MwmWindow *, 976 int, int, int, int, Boolean); 977 extern void DEC_SelectDecorations(ScreenInfo *scr, MwmWindow *t); 978 extern void DEC_ReselectDecorations(ScreenInfo *scr, MwmWindow *t); 979 extern void DEC_SetShape(MwmWindow *, int); 980 981 /* Event functions */ 982 extern void EVENT_Initialize(void); 983 extern int EVENT_GetContext(ScreenInfo *scr, MwmWindow *t, XEvent *e, Window *w); 984 extern int EVENT_Next(XEvent *event); 985 extern void EVENT_Dispatch(XEvent *event); 986 987 /* Function functions */ 988 extern void FUNC_Execute(ScreenInfo *scr, int, char *, Window, 989 MwmWindow *, XEvent *, unsigned long, 990 long, long, int, int, MenuRoot *); 991 992 /* Icon functions */ 993 extern void ICON_CreateWindow(ScreenInfo *scr, MwmWindow *tmp, 994 int def_x, int def_y); 995 extern void ICON_DrawWindow(ScreenInfo *scr, MwmWindow *); 996 extern void ICON_UpdateWindow(ScreenInfo *scr, MwmWindow *, Boolean force); 997 extern void ICON_AutoPlace(ScreenInfo *scr, MwmWindow *); 998 extern void ICON_Iconify(ScreenInfo *scr, MwmWindow *, int, int); 999 extern void ICON_DeIconify(ScreenInfo *scr, MwmWindow *); 1000 1001 /* Menu functions */ 1002 extern MenuRoot *MENU_Create(const char *name); 1003 extern void MENU_FindHotKey(MenuItem *it, KeySym key); 1004 extern void MENU_Add(ScreenInfo *scr, MenuRoot *menu); 1005 extern void MENU_Remove(ScreenInfo *scr, MenuRoot *menu); 1006 extern void MENU_AddItem(ScreenInfo *scr, MenuRoot *menu, 1007 char *item, char *item2, 1008 char *action, int func, 1009 long func_val_1, long func_val_2, 1010 char unit_1, char unit_2); 1011 extern void MENU_LinkUp(ScreenInfo *scr); 1012 extern void MENU_Realize(ScreenInfo *scr, MenuRoot *); 1013 extern void MENU_RealizeMenus(ScreenInfo *scr); 1014 extern int MENU_PopupMenu(ScreenInfo *scr, MenuRoot * menu); 1015 extern int MENU_WinMenu(ScreenInfo *scr, MenuRoot *menu, 1016 MwmWindow *win, Boolean button, Boolean icon); 1017 extern void MENU_Destroy(MenuRoot *menu); 1018 extern void MENU_DestroyMenus(ScreenInfo *scr); 1019 extern void MENU_Reset(void); 1020 extern void MENU_BuildWindowMenu(ScreenInfo *scr, MwmWindow *win); 1021 extern void MENU_DestroyWindowMenu(ScreenInfo *scr, MwmWindow *win); 1022 extern char *MENU_AcceleratorString(ScreenInfo *scr, KeySym key, 1023 int modifiers); 1024 1025 /* Movement functions */ 1026 extern void MOVE_EventLoop(ScreenInfo *scr, MwmWindow *, int, int, int, int, 1027 int *, int *, Boolean, Boolean); 1028 extern void MOVE_Interactive(ScreenInfo *scr, Window *win, MwmWindow *tmp_win, 1029 int *FinalX, int *FinalY, XEvent *eventp); 1030 1031 /* Resize functions */ 1032 extern void RESIZE_EventLoop(ScreenInfo *scr, Window w, MwmWindow *tmp_win, 1033 int val1, int val2, 1034 int val1_unit, int val2_unit); 1035 1036 /* exit functions */ 1037 extern void MWM_SetErrorHandler(int which); 1038 extern void MWM_Done(int, const char *); 1039 1040 /* Debugging functions */ 1041 extern const char *_MwmPrintC(int x); 1042 extern const char *_MwmPrintF(int x); 1043 1044 /* Resource default functions */ 1045 extern void _WmMultiClickTimeDefault(Widget w, int offset, XrmValue *val); 1046 extern void _WmFocusAutoRaiseDefault(Widget w, int offset, XrmValue *val); 1047 extern void _WmDefaultBorderWidth(Widget w, int offset, XrmValue *val); 1048 extern void _WmDefaultResizeBorderWidth(Widget widget, int offset, 1049 XrmValue *val); 1050 extern void _WmIconImageBDefault(Widget w, int offset, XrmValue *val); 1051 extern void _WmIconImageBSCDefault(Widget w, int offset, XrmValue *val); 1052 extern void _WmIconImageBSPDefault(Widget w, int offset, XrmValue *val); 1053 extern void _WmIconImageFDefault(Widget w, int offset, XrmValue *val); 1054 extern void _WmIconImageTSCDefault(Widget w, int offset, XrmValue *val); 1055 extern void _WmIconImageTSPDefault(Widget w, int offset, XrmValue *val); 1056 extern void _WmMatteBDefault(Widget w, int offset, XrmValue *val); 1057 extern void _WmMatteBSCDefault(Widget w, int offset, XrmValue *val); 1058 extern void _WmMatteBSPDefault(Widget w, int offset, XrmValue *val); 1059 extern void _WmMatteFDefault(Widget w, int offset, XrmValue *val); 1060 extern void _WmMatteTSCDefault(Widget w, int offset, XrmValue *val); 1061 extern void _WmMatteTSPDefault(Widget w, int offset, XrmValue *val); 1062 extern void _WmBackgroundDefault(Widget w, int offset, XrmValue *val); 1063 extern void _WmBackgroundPixmapDefault(Widget w, int offset, 1064 XrmValue *val); 1065 extern void _WmBottomShadowColorDefault(Widget w, int offset, 1066 XrmValue *val); 1067 extern void _WmBottomShadowPixmapDefault(Widget w, int offset, 1068 XrmValue *val); 1069 extern void _WmForegroundDefault(Widget w, int offset, XrmValue *val); 1070 extern void _WmTopShadowColorDefault(Widget w, int offset, XrmValue *val); 1071 extern void _WmTopShadowPixmapDefault(Widget w, int offset, XrmValue *val); 1072 extern void _WmABackgroundDefault(Widget w, int offset, XrmValue *val); 1073 extern void _WmAForegroundDefault(Widget w, int offset, XrmValue *val); 1074 extern void _WmABottomShadowColorDefault(Widget w, int offset, 1075 XrmValue *val); 1076 extern void _WmATopShadowColorDefault(Widget w, int offset, XrmValue *val); 1077 extern void _WmABackgroundPixmapDefault(Widget w, int offset, 1078 XrmValue *val); 1079 extern void _WmATopShadowPixmapDefault(Widget w, int offset, 1080 XrmValue *val); 1081 1082 /* Parsing functions */ 1083 extern char mwm_getc(void); 1084 extern void mwm_putc(char c); 1085 extern void mwm_unputc(char c); 1086 extern void yyerror(const char *fmt, ...); 1087 1088 /* Misc utility functions */ 1089 extern int SetEnvironment(const char *key, const char *value); 1090 void ReapChildren(void); 1091 extern char *find_config_file(void); 1092 1093 /* 1094 * global data 1095 */ 1096 extern MwmInternalInfo Mwm; 1097 extern XContext MwmContext; 1098 extern XContext MenuContext; 1099 extern Display *dpy; 1100 extern int fd_width, x_fd; 1101 extern Widget toplevel; 1102 extern char NoName[]; 1103 extern Window JunkRoot, JunkChild; 1104 extern int JunkX, JunkY; 1105 extern unsigned int JunkWidth, JunkHeight, JunkBW, JunkDepth, JunkMask; 1106 extern void *working_base; 1107 extern ScreenInfo *rscr; 1108 1109 /* menus.c: */ 1110 extern int menuFromFrameOrWindowOrTitlebar; 1111 extern int Stashed_X, Stashed_Y; 1112 1113 /* move.c: */ 1114 extern Bool NeedToResizeToo; 1115 1116 /* mwm.c: */ 1117 extern volatile int alarmed; 1118 extern Bool debugging; 1119 extern char **g_argv; 1120 1121 /* pager.c: */ 1122 extern Bool DoHandlePageing; 1123 extern Bool pagerOn; 1124 extern Bool EnablePagerRedraw; 1125 extern Bool DoHandlePageing; 1126 1127 1128 1129 extern Atom XA_MIT_PRIORITY_COLORS; 1130 extern Atom XA_WM_CHANGE_STATE; 1131 extern Atom XA_WM_STATE; 1132 extern Atom XA_WM_COLORMAP_WINDOWS; 1133 extern Atom XA_WM_PROTOCOLS; 1134 extern Atom XA_WM_TAKE_FOCUS; 1135 extern Atom XA_WM_SAVE_YOURSELF; 1136 extern Atom XA_WM_DELETE_WINDOW; 1137 extern Atom XA_WM_DESKTOP; 1138 extern Atom XA_MWM_CLIENT; 1139 extern Atom XA_MWM_HINTS; 1140 extern Atom XA_MWM_MESSAGES; 1141 extern Atom XA_MWM_MENU; 1142 extern Atom XA_MWM_INFO; 1143 1144 1145 /* some utility #defines */ 1146 #ifdef PATH_MAX 1147 # define MAX_PATH_LEN PATH_MAX 1148 #else 1149 # define MAX_PATH_LEN 2048 /* this is OS dependent, but this should catch most */ 1150 #endif 1151 1152 1153 #endif /* _MWM_H */ 1154