1 | /*
|
---|
2 | * External interface for the server's AppleWM support
|
---|
3 | */
|
---|
4 | /**************************************************************************
|
---|
5 |
|
---|
6 | Copyright (c) 2002 Apple Computer, Inc. All Rights Reserved.
|
---|
7 | Copyright (c) 2003-2004 Torrey T. Lyons. All Rights Reserved.
|
---|
8 |
|
---|
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:
|
---|
16 |
|
---|
17 | The above copyright notice and this permission notice (including the
|
---|
18 | next paragraph) shall be included in all copies or substantial portions
|
---|
19 | of the Software.
|
---|
20 |
|
---|
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.
|
---|
28 |
|
---|
29 | **************************************************************************/
|
---|
30 | /* $XFree86: xc/programs/Xserver/hw/darwin/quartz/applewmExt.h,v 1.2 2003/11/11 23:48:41 torrey Exp $ */
|
---|
31 |
|
---|
32 | #ifndef _APPLEWMEXT_H_
|
---|
33 | #define _APPLEWMEXT_H_
|
---|
34 |
|
---|
35 | #include "window.h"
|
---|
36 |
|
---|
37 | typedef int (*DisableUpdateProc)(void);
|
---|
38 | typedef int (*EnableUpdateProc)(void);
|
---|
39 | typedef int (*SetWindowLevelProc)(WindowPtr pWin, int level);
|
---|
40 | typedef int (*FrameGetRectProc)(int type, int class, const BoxRec *outer,
|
---|
41 | const BoxRec *inner, BoxRec *ret);
|
---|
42 | typedef int (*FrameHitTestProc)(int class, int x, int y,
|
---|
43 | const BoxRec *outer,
|
---|
44 | const BoxRec *inner, int *ret);
|
---|
45 | typedef int (*FrameDrawProc)(WindowPtr pWin, int class, unsigned int attr,
|
---|
46 | const BoxRec *outer, const BoxRec *inner,
|
---|
47 | unsigned int title_len,
|
---|
48 | const unsigned char *title_bytes);
|
---|
49 |
|
---|
50 | /*
|
---|
51 | * AppleWM implementation function list
|
---|
52 | */
|
---|
53 | typedef struct _AppleWMProcs {
|
---|
54 | DisableUpdateProc DisableUpdate;
|
---|
55 | EnableUpdateProc EnableUpdate;
|
---|
56 | SetWindowLevelProc SetWindowLevel;
|
---|
57 | FrameGetRectProc FrameGetRect;
|
---|
58 | FrameHitTestProc FrameHitTest;
|
---|
59 | FrameDrawProc FrameDraw;
|
---|
60 | } AppleWMProcsRec, *AppleWMProcsPtr;
|
---|
61 |
|
---|
62 | void AppleWMExtensionInit(
|
---|
63 | AppleWMProcsPtr procsPtr
|
---|
64 | );
|
---|
65 |
|
---|
66 | void AppleWMSetScreenOrigin(
|
---|
67 | WindowPtr pWin
|
---|
68 | );
|
---|
69 |
|
---|
70 | Bool AppleWMDoReorderWindow(
|
---|
71 | WindowPtr pWin
|
---|
72 | );
|
---|
73 |
|
---|
74 | void AppleWMSendEvent(
|
---|
75 | int /* type */,
|
---|
76 | unsigned int /* mask */,
|
---|
77 | int /* which */,
|
---|
78 | int /* arg */
|
---|
79 | );
|
---|
80 |
|
---|
81 | unsigned int AppleWMSelectedEvents(
|
---|
82 | void
|
---|
83 | );
|
---|
84 |
|
---|
85 | #endif /* _APPLEWMEXT_H_ */
|
---|