Imported Upstream version 1.15.1
[deb_xorg-server.git] / hw / xwin / winmultiwindowclass.h
CommitLineData
a09e091a
JB
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 * Structures
35 */
36
37typedef struct {
38 long flags; /* marks which fields in this structure are defined */
39 Bool input; /* does this application rely on the window manager to
40 get keyboard input? */
41 int initial_state; /* see below */
42 Pixmap icon_pixmap; /* pixmap to be used as icon */
43 Window icon_window; /* window to be used as icon */
44 int icon_x, icon_y; /* initial position of icon */
45 Pixmap icon_mask; /* icon mask bitmap */
46 XID window_group; /* id of related window group */
47 /* this structure may be extended in the future */
48} WinXWMHints;
49
50/* Window manager hints mask bits */
51#define InputHint (1L << 0)
52#define StateHint (1L << 1)
53#define IconPixmapHint (1L << 2)
54#define IconWindowHint (1L << 3)
55#define IconPositionHint (1L << 4)
56#define IconMaskHint (1L << 5)
57#define WindowGroupHint (1L << 6)
58#define UrgencyHint (1L << 8)
59#define AllHints (InputHint|StateHint|IconPixmapHint|IconWindowHint|IconPositionHint|IconMaskHint|WindowGroupHint)
60
61/*
62 * new version containing base_width, base_height, and win_gravity fields;
63 * used with WM_NORMAL_HINTS.
64 */
65typedef struct {
66 long flags; /* marks which fields in this structure are defined */
67 int x, y; /* obsolete for new window mgrs, but clients */
68 int width, height; /* should set so old wm's don't mess up */
69 int min_width, min_height;
70 int max_width, max_height;
71 int width_inc, height_inc;
72 struct {
73 int x; /* numerator */
74 int y; /* denominator */
75 } min_aspect, max_aspect;
76 int base_width, base_height; /* added by ICCCM version 1 */
77 int win_gravity; /* added by ICCCM version 1 */
78} WinXSizeHints;
79
80/*
81 * The next block of definitions are for window manager properties that
82 * clients and applications use for communication.
83 */
84
85/* flags argument in size hints */
86#define USPosition (1L << 0) /* user specified x, y */
87#define USSize (1L << 1) /* user specified width, height */
88
89#define PPosition (1L << 2) /* program specified position */
90#define PSize (1L << 3) /* program specified size */
91#define PMinSize (1L << 4) /* program specified minimum size */
92#define PMaxSize (1L << 5) /* program specified maximum size */
93#define PResizeInc (1L << 6) /* program specified resize increments */
94#define PAspect (1L << 7) /* program specified min and max aspect ratios */
95#define PBaseSize (1L << 8) /* program specified base for incrementing */
96#define PWinGravity (1L << 9) /* program specified window gravity */
97
98/* obsolete */
99#define PAllHints (PPosition|PSize|PMinSize|PMaxSize|PResizeInc|PAspect)
100
101/*
102 * Function prototypes
103 */
104
105int
106 winMultiWindowGetWMHints(WindowPtr pWin, WinXWMHints * hints);
107
108int
109 winMultiWindowGetClassHint(WindowPtr pWin, char **res_name, char **res_class);
110
111int
112 winMultiWindowGetWindowRole(WindowPtr pWin, char **res_role);
113
114int
115 winMultiWindowGetWMNormalHints(WindowPtr pWin, WinXSizeHints * hints);
116
117int
118 winMultiWindowGetWMName(WindowPtr pWin, char **wmName);
119
120int
121 winMultiWindowGetTransientFor(WindowPtr pWin, Window *ppDaddy);
122
123#endif