2 * External interface for the server's AppleWM support
4 /**************************************************************************
6 Copyright (c) 2002 Apple Computer, Inc. All Rights Reserved.
7 Copyright (c) 2003-2004 Torrey T. Lyons. All Rights Reserved.
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 **************************************************************************/
31 #ifndef _APPLEWMEXT_H_
32 #define _APPLEWMEXT_H_
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
,
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
);
50 * AppleWM implementation function list
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
;
61 void AppleWMExtensionInit(
62 AppleWMProcsPtr procsPtr
65 void AppleWMSetScreenOrigin(
69 Bool
AppleWMDoReorderWindow(
73 void AppleWMSendEvent(
75 unsigned int /* mask */,
80 unsigned int AppleWMSelectedEvents(
84 #endif /* _APPLEWMEXT_H_ */