1 /* External interface for the server's AppleWM support
3 * Copyright (c) 2003-2004 Torrey T. Lyons. All Rights Reserved.
4 * Copyright (c) 2002-2012 Apple Inc. All rights reserved.
6 * Permission is hereby granted, free of charge, to any person
7 * obtaining a copy of this software and associated documentation files
8 * (the "Software"), to deal in the Software without restriction,
9 * including without limitation the rights to use, copy, modify, merge,
10 * publish, distribute, sublicense, and/or sell copies of the Software,
11 * and to permit persons to whom the Software is furnished to do so,
12 * subject to the following conditions:
14 * The above copyright notice and this permission notice shall be
15 * included in all copies or substantial portions of the Software.
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 ABOVE LISTED COPYRIGHT
21 * HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24 * DEALINGS IN THE SOFTWARE.
26 * Except as contained in this notice, the name(s) of the above
27 * copyright holders shall not be used in advertising or otherwise to
28 * promote the sale, use or other dealings in this Software without
29 * prior written authorization.
32 #ifndef _APPLEWMEXT_H_
33 #define _APPLEWMEXT_H_
38 #if XPLUGIN_VERSION < 4
39 typedef int xp_frame_attr
;
40 typedef int xp_frame_class
;
41 typedef int xp_frame_rect
;
44 typedef int (*DisableUpdateProc
)(void);
45 typedef int (*EnableUpdateProc
)(void);
46 typedef int (*SetWindowLevelProc
)(WindowPtr pWin
, int level
);
47 typedef int (*FrameGetRectProc
)(xp_frame_rect type
, xp_frame_class
class,
49 const BoxRec
*inner
, BoxRec
*ret
);
50 typedef int (*FrameHitTestProc
)(xp_frame_class
class, int x
, int y
,
52 const BoxRec
*inner
, int *ret
);
53 typedef int (*FrameDrawProc
)(WindowPtr pWin
, xp_frame_class
class,
55 const BoxRec
*outer
, const BoxRec
*inner
,
56 unsigned int title_len
,
57 const unsigned char *title_bytes
);
58 typedef int (*SendPSNProc
)(uint32_t hi
, uint32_t lo
);
59 typedef int (*AttachTransientProc
)(WindowPtr pWinChild
, WindowPtr pWinParent
);
62 * AppleWM implementation function list
64 typedef struct _AppleWMProcs
{
65 DisableUpdateProc DisableUpdate
;
66 EnableUpdateProc EnableUpdate
;
67 SetWindowLevelProc SetWindowLevel
;
68 FrameGetRectProc FrameGetRect
;
69 FrameHitTestProc FrameHitTest
;
70 FrameDrawProc FrameDraw
;
72 AttachTransientProc AttachTransient
;
73 } AppleWMProcsRec
, *AppleWMProcsPtr
;
76 AppleWMExtensionInit(AppleWMProcsPtr procsPtr
);
79 AppleWMSetScreenOrigin(WindowPtr pWin
);
82 AppleWMDoReorderWindow(WindowPtr pWin
);
85 AppleWMSendEvent(int /* type */, unsigned int /* mask */, int /* which */,
90 AppleWMSelectedEvents(void);
92 #endif /* _APPLEWMEXT_H_ */