1 /* $XFree86: xc/lib/GL/dri/xf86dri.h,v 1.7 2000/12/07 20:26:02 dawes Exp $ */
2 /**************************************************************************
4 Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
5 Copyright 2000 VA Linux Systems, Inc.
6 Copyright (c) 2002 Apple Computer, Inc.
9 Permission is hereby granted, free of charge, to any person obtaining a
10 copy of this software and associated documentation files (the
11 "Software"), to deal in the Software without restriction, including
12 without limitation the rights to use, copy, modify, merge, publish,
13 distribute, sub license, and/or sell copies of the Software, and to
14 permit persons to whom the Software is furnished to do so, subject to
15 the following conditions:
17 The above copyright notice and this permission notice (including the
18 next paragraph) shall be included in all copies or substantial portions
21 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
24 IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
25 ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
26 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 **************************************************************************/
34 #include <X11/Xfuncproto.h>
36 #define X_AppleWMQueryVersion 0
37 #define X_AppleWMFrameGetRect 1
38 #define X_AppleWMFrameHitTest 2
39 #define X_AppleWMFrameDraw 3
40 #define X_AppleWMDisableUpdate 4
41 #define X_AppleWMReenableUpdate 5
42 #define X_AppleWMSelectInput 6
43 #define X_AppleWMSetWindowMenuCheck 7
44 #define X_AppleWMSetFrontProcess 8
45 #define X_AppleWMSetWindowLevel 9
46 #define X_AppleWMSetCanQuit 10
47 #define X_AppleWMSetWindowMenu 11
50 #define AppleWMControllerNotify 0
51 #define AppleWMActivationNotify 1
52 #define AppleWMPasteboardNotify 2
53 #define AppleWMNumberEvents 3
55 #define AppleWMControllerNotifyMask (1L << 0)
56 #define AppleWMActivationNotifyMask (1L << 1)
57 #define AppleWMPasteboardNotifyMask (1L << 2)
59 /* "Kinds" of ControllerNotify events */
60 #define AppleWMMinimizeWindow 0
61 #define AppleWMZoomWindow 1
62 #define AppleWMCloseWindow 2
63 #define AppleWMBringAllToFront 3
64 #define AppleWMHideWindow 4
65 #define AppleWMHideAll 5
66 #define AppleWMShowAll 6
67 #define AppleWMWindowMenuItem 9
68 #define AppleWMWindowMenuNotify 10
69 #define AppleWMNextWindow 11
70 #define AppleWMPreviousWindow 12
72 /* "Kinds" of ActivationNotify events */
73 #define AppleWMIsActive 0
74 #define AppleWMIsInactive 1
76 /* "Kinds" of PasteboardNotify events */
77 #define AppleWMCopyToPasteboard 0
80 #define AppleWMClientNotLocal 0
81 #define AppleWMOperationNotSupported 1
82 #define AppleWMNumberErrors (AppleWMOperationNotSupported + 1)
84 /* Window level ids */
85 #define AppleWMWindowLevelNormal 0
86 #define AppleWMWindowLevelFloating 1
87 #define AppleWMWindowLevelTornOff 2
88 #define AppleWMWindowLevelDock 3
89 #define AppleWMWindowLevelDesktop 4
90 #define AppleWMNumWindowLevels 5
92 #ifndef _APPLEWM_SERVER_
95 int type; /* of event */
96 unsigned long serial; /* # of last request processed by server */
97 Bool send_event; /* true if this came frome a SendEvent request */
98 Display *display; /* Display the event was read from */
99 Window window; /* window of event */
100 Time time; /* server timestamp when event happened */
101 int kind; /* subtype of event */
103 } XAppleWMNotifyEvent;
107 Bool XAppleWMQueryExtension (Display *dpy, int *event_base, int *error_base);
109 Bool XAppleWMQueryVersion (Display *dpy, int *majorVersion,
110 int *minorVersion, int *patchVersion);
112 Bool XAppleWMDisableUpdate (Display *dpy, int screen);
114 Bool XAppleWMReenableUpdate (Display *dpy, int screen);
116 Bool XAppleWMSelectInput (Display *dpy, unsigned long mask);
118 Bool XAppleWMSetWindowMenu (Display *dpy, int nitems, const char **items);
119 Bool XAppleWMSetWindowMenuWithShortcuts (Display *dpy, int nitems,
121 const char *shortcuts);
123 Bool XAppleWMSetWindowMenuCheck (Display *dpy, int index);
125 Bool XAppleWMSetFrontProcess (Display *dpy);
127 Bool XAppleWMSetWindowLevel (Display *dpy, Window id, int level);
129 Bool XAppleWMSetCanQuit (Display *dpy, Bool state);
131 Bool XAppleWMFrameGetRect (Display *dpy,
132 unsigned int frame_class, unsigned int frame_rect,
133 short inner_x, short inner_y,
134 short inner_w, short inner_h,
135 short outer_x, short outer_y,
136 short outer_w, short outer_h,
137 short *ret_x, short *ret_y,
138 short *ret_w, short *ret_h);
140 unsigned int XAppleWMFrameHitTest (Display *dpy,
141 unsigned int frame_class,
142 short point_x, short point_y,
143 short inner_x, short inner_y,
144 short inner_w, short inner_h,
145 short outer_x, short outer_y,
146 short outer_w, short outer_h);
148 Bool XAppleWMFrameDraw (Display *dpy, int screen, Window window,
149 unsigned int frame_class, unsigned int frame_attr,
150 short inner_x, short inner_y,
151 short inner_w, short inner_h,
152 short outer_x, short outer_y,
153 short outer_w, short outer_h,
154 unsigned int title_length,
155 const unsigned char * title_bytes);
159 #endif /* _APPLEWM_SERVER_ */
160 #endif /* _APPLEWM_H_ */