xserver

xserver with xephyr scale patch
git clone https://git.neptards.moe/u3shit/xserver.git
Log | Files | Refs | README | LICENSE

winmultiwindowclass.h (5273B)


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