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 |
|
---|
31 | #ifndef _APPLEWMEXT_H_
|
---|
32 | #define _APPLEWMEXT_H_
|
---|
33 |
|
---|
34 | #include "window.h"
|
---|
35 |
|
---|
36 | typedef int (*DisableUpdateProc)(void);
|
---|
37 | typedef int (*EnableUpdateProc)(void);
|
---|
38 | typedef int (*SetWindowLevelProc)(WindowPtr pWin, int level);
|
---|
39 | typedef int (*FrameGetRectProc)(int type, int class, const BoxRec *outer,
|
---|
40 | const BoxRec *inner, BoxRec *ret);
|
---|
41 | typedef int (*FrameHitTestProc)(int class, int x, int y,
|
---|
42 | const BoxRec *outer,
|
---|
43 | const BoxRec *inner, int *ret);
|
---|
44 | typedef int (*FrameDrawProc)(WindowPtr pWin, int class, unsigned int attr,
|
---|
45 | const BoxRec *outer, const BoxRec *inner,
|
---|
46 | unsigned int title_len,
|
---|
47 | const unsigned char *title_bytes);
|
---|
48 |
|
---|
49 | /*
|
---|
50 | * AppleWM implementation function list
|
---|
51 | */
|
---|
52 | typedef struct _AppleWMProcs {
|
---|
53 | DisableUpdateProc DisableUpdate;
|
---|
54 | EnableUpdateProc EnableUpdate;
|
---|
55 | SetWindowLevelProc SetWindowLevel;
|
---|
56 | FrameGetRectProc FrameGetRect;
|
---|
57 | FrameHitTestProc FrameHitTest;
|
---|
58 | FrameDrawProc FrameDraw;
|
---|
59 | } AppleWMProcsRec, *AppleWMProcsPtr;
|
---|
60 |
|
---|
61 | void AppleWMExtensionInit(
|
---|
62 | AppleWMProcsPtr procsPtr
|
---|
63 | );
|
---|
64 |
|
---|
65 | void AppleWMSetScreenOrigin(
|
---|
66 | WindowPtr pWin
|
---|
67 | );
|
---|
68 |
|
---|
69 | Bool AppleWMDoReorderWindow(
|
---|
70 | WindowPtr pWin
|
---|
71 | );
|
---|
72 |
|
---|
73 | void AppleWMSendEvent(
|
---|
74 | int /* type */,
|
---|
75 | unsigned int /* mask */,
|
---|
76 | int /* which */,
|
---|
77 | int /* arg */
|
---|
78 | );
|
---|
79 |
|
---|
80 | unsigned int AppleWMSelectedEvents(
|
---|
81 | void
|
---|
82 | );
|
---|
83 |
|
---|
84 | #endif /* _APPLEWMEXT_H_ */
|
---|