1*4882a593Smuzhiyun #if !defined(WINMULTIWINDOWCLASS_H) 2*4882a593Smuzhiyun #define WINMULTIWINDOWCLASS_H 3*4882a593Smuzhiyun /* 4*4882a593Smuzhiyun *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. 5*4882a593Smuzhiyun * 6*4882a593Smuzhiyun *Permission is hereby granted, free of charge, to any person obtaining 7*4882a593Smuzhiyun * a copy of this software and associated documentation files (the 8*4882a593Smuzhiyun *"Software"), to deal in the Software without restriction, including 9*4882a593Smuzhiyun *without limitation the rights to use, copy, modify, merge, publish, 10*4882a593Smuzhiyun *distribute, sublicense, and/or sell copies of the Software, and to 11*4882a593Smuzhiyun *permit persons to whom the Software is furnished to do so, subject to 12*4882a593Smuzhiyun *the following conditions: 13*4882a593Smuzhiyun * 14*4882a593Smuzhiyun *The above copyright notice and this permission notice shall be 15*4882a593Smuzhiyun *included in all copies or substantial portions of the Software. 16*4882a593Smuzhiyun * 17*4882a593Smuzhiyun *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18*4882a593Smuzhiyun *EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19*4882a593Smuzhiyun *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20*4882a593Smuzhiyun *NONINFRINGEMENT. IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE FOR 21*4882a593Smuzhiyun *ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 22*4882a593Smuzhiyun *CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 23*4882a593Smuzhiyun *WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24*4882a593Smuzhiyun * 25*4882a593Smuzhiyun *Except as contained in this notice, the name of the XFree86 Project 26*4882a593Smuzhiyun *shall not be used in advertising or otherwise to promote the sale, use 27*4882a593Smuzhiyun *or other dealings in this Software without prior written authorization 28*4882a593Smuzhiyun *from the XFree86 Project. 29*4882a593Smuzhiyun * 30*4882a593Smuzhiyun * Authors: Earle F. Philhower, III 31*4882a593Smuzhiyun */ 32*4882a593Smuzhiyun 33*4882a593Smuzhiyun /* 34*4882a593Smuzhiyun * The next block of definitions are for window manager properties that 35*4882a593Smuzhiyun * clients and applications use for communication. 36*4882a593Smuzhiyun */ 37*4882a593Smuzhiyun 38*4882a593Smuzhiyun /* 39*4882a593Smuzhiyun * Structures 40*4882a593Smuzhiyun */ 41*4882a593Smuzhiyun 42*4882a593Smuzhiyun /* 43*4882a593Smuzhiyun * WM_HINTS structure 44*4882a593Smuzhiyun * 45*4882a593Smuzhiyun * NOTE: this structure represents the internal format stored in the property 46*4882a593Smuzhiyun * after it is marshalled by libX11, converting the flags field from an 47*4882a593Smuzhiyun * arch-dependent long to a 32-bit int. 48*4882a593Smuzhiyun */ 49*4882a593Smuzhiyun 50*4882a593Smuzhiyun typedef struct { 51*4882a593Smuzhiyun int flags; /* marks which fields in this structure are defined */ 52*4882a593Smuzhiyun Bool input; /* does this application rely on the window manager to 53*4882a593Smuzhiyun get keyboard input? */ 54*4882a593Smuzhiyun int initial_state; /* see below */ 55*4882a593Smuzhiyun Pixmap icon_pixmap; /* pixmap to be used as icon */ 56*4882a593Smuzhiyun Window icon_window; /* window to be used as icon */ 57*4882a593Smuzhiyun int icon_x, icon_y; /* initial position of icon */ 58*4882a593Smuzhiyun Pixmap icon_mask; /* icon mask bitmap */ 59*4882a593Smuzhiyun XID window_group; /* id of related window group */ 60*4882a593Smuzhiyun /* this structure may be extended in the future */ 61*4882a593Smuzhiyun } WinXWMHints; 62*4882a593Smuzhiyun 63*4882a593Smuzhiyun /* Window manager hints mask bits */ 64*4882a593Smuzhiyun #define InputHint (1L << 0) 65*4882a593Smuzhiyun #define StateHint (1L << 1) 66*4882a593Smuzhiyun #define IconPixmapHint (1L << 2) 67*4882a593Smuzhiyun #define IconWindowHint (1L << 3) 68*4882a593Smuzhiyun #define IconPositionHint (1L << 4) 69*4882a593Smuzhiyun #define IconMaskHint (1L << 5) 70*4882a593Smuzhiyun #define WindowGroupHint (1L << 6) 71*4882a593Smuzhiyun #define UrgencyHint (1L << 8) 72*4882a593Smuzhiyun #define AllHints (InputHint|StateHint|IconPixmapHint|IconWindowHint|IconPositionHint|IconMaskHint|WindowGroupHint) 73*4882a593Smuzhiyun 74*4882a593Smuzhiyun /* 75*4882a593Smuzhiyun * ICCCM 1.0 version containing base_width, base_height, and win_gravity fields; 76*4882a593Smuzhiyun * used with WM_NORMAL_HINTS. 77*4882a593Smuzhiyun * 78*4882a593Smuzhiyun * NOTE: this structure represents the internal format stored in the property 79*4882a593Smuzhiyun * after it is marshalled by libX11, converting the flags field from an 80*4882a593Smuzhiyun * arch-dependent long to a 32-bit int. 81*4882a593Smuzhiyun */ 82*4882a593Smuzhiyun typedef struct { 83*4882a593Smuzhiyun int flags; /* marks which fields in this structure are defined */ 84*4882a593Smuzhiyun int x, y; /* obsolete for new window mgrs, but clients */ 85*4882a593Smuzhiyun int width, height; /* should set so old wm's don't mess up */ 86*4882a593Smuzhiyun int min_width, min_height; 87*4882a593Smuzhiyun int max_width, max_height; 88*4882a593Smuzhiyun int width_inc, height_inc; 89*4882a593Smuzhiyun struct { 90*4882a593Smuzhiyun int x; /* numerator */ 91*4882a593Smuzhiyun int y; /* denominator */ 92*4882a593Smuzhiyun } min_aspect, max_aspect; 93*4882a593Smuzhiyun int base_width, base_height; /* added by ICCCM version 1 */ 94*4882a593Smuzhiyun int win_gravity; /* added by ICCCM version 1 */ 95*4882a593Smuzhiyun } WinXSizeHints; 96*4882a593Smuzhiyun 97*4882a593Smuzhiyun /* flags argument in size hints */ 98*4882a593Smuzhiyun #define USPosition (1L << 0) /* user specified x, y */ 99*4882a593Smuzhiyun #define USSize (1L << 1) /* user specified width, height */ 100*4882a593Smuzhiyun 101*4882a593Smuzhiyun #define PPosition (1L << 2) /* program specified position */ 102*4882a593Smuzhiyun #define PSize (1L << 3) /* program specified size */ 103*4882a593Smuzhiyun #define PMinSize (1L << 4) /* program specified minimum size */ 104*4882a593Smuzhiyun #define PMaxSize (1L << 5) /* program specified maximum size */ 105*4882a593Smuzhiyun #define PResizeInc (1L << 6) /* program specified resize increments */ 106*4882a593Smuzhiyun #define PAspect (1L << 7) /* program specified min and max aspect ratios */ 107*4882a593Smuzhiyun #define PBaseSize (1L << 8) /* program specified base for incrementing */ 108*4882a593Smuzhiyun #define PWinGravity (1L << 9) /* program specified window gravity */ 109*4882a593Smuzhiyun 110*4882a593Smuzhiyun /* obsolete */ 111*4882a593Smuzhiyun #define PAllHints (PPosition|PSize|PMinSize|PMaxSize|PResizeInc|PAspect) 112*4882a593Smuzhiyun 113*4882a593Smuzhiyun /* 114*4882a593Smuzhiyun * Function prototypes 115*4882a593Smuzhiyun */ 116*4882a593Smuzhiyun 117*4882a593Smuzhiyun int 118*4882a593Smuzhiyun winMultiWindowGetWMHints(WindowPtr pWin, WinXWMHints * hints); 119*4882a593Smuzhiyun 120*4882a593Smuzhiyun int 121*4882a593Smuzhiyun winMultiWindowGetClassHint(WindowPtr pWin, char **res_name, char **res_class); 122*4882a593Smuzhiyun 123*4882a593Smuzhiyun int 124*4882a593Smuzhiyun winMultiWindowGetWindowRole(WindowPtr pWin, char **res_role); 125*4882a593Smuzhiyun 126*4882a593Smuzhiyun int 127*4882a593Smuzhiyun winMultiWindowGetWMNormalHints(WindowPtr pWin, WinXSizeHints * hints); 128*4882a593Smuzhiyun 129*4882a593Smuzhiyun int 130*4882a593Smuzhiyun winMultiWindowGetWMName(WindowPtr pWin, char **wmName); 131*4882a593Smuzhiyun 132*4882a593Smuzhiyun int 133*4882a593Smuzhiyun winMultiWindowGetTransientFor(WindowPtr pWin, Window *ppDaddy); 134*4882a593Smuzhiyun 135*4882a593Smuzhiyun #endif 136