1/* 2 * External interface for the server's AppleWM support 3 */ 4/************************************************************************** 5 6Copyright (c) 2002 Apple Computer, Inc. All Rights Reserved. 7Copyright (c) 2003-2004 Torrey T. Lyons. All Rights Reserved. 8 9Permission is hereby granted, free of charge, to any person obtaining a 10copy of this software and associated documentation files (the 11"Software"), to deal in the Software without restriction, including 12without limitation the rights to use, copy, modify, merge, publish, 13distribute, sub license, and/or sell copies of the Software, and to 14permit persons to whom the Software is furnished to do so, subject to 15the following conditions: 16 17The above copyright notice and this permission notice (including the 18next paragraph) shall be included in all copies or substantial portions 19of the Software. 20 21THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 22OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 24IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 25ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 26TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 27SOFTWARE 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#include <Xplugin.h> 36 37#if XPLUGIN_VERSION < 4 38typedef int xp_frame_attr; 39typedef int xp_frame_class; 40typedef int xp_frame_rect; 41#endif 42 43typedef int (*DisableUpdateProc)(void); 44typedef int (*EnableUpdateProc)(void); 45typedef int (*SetWindowLevelProc)(WindowPtr pWin, int level); 46typedef int (*FrameGetRectProc)(xp_frame_rect type, xp_frame_class class, const BoxRec *outer, 47 const BoxRec *inner, BoxRec *ret); 48typedef int (*FrameHitTestProc)(xp_frame_class class, int x, int y, 49 const BoxRec *outer, 50 const BoxRec *inner, int *ret); 51typedef int (*FrameDrawProc)(WindowPtr pWin, xp_frame_class class, xp_frame_attr attr, 52 const BoxRec *outer, const BoxRec *inner, 53 unsigned int title_len, 54 const unsigned char *title_bytes); 55typedef int (*SendPSNProc)(uint32_t hi, uint32_t lo); 56typedef int (*AttachTransientProc)(WindowPtr pWinChild, WindowPtr pWinParent); 57 58/* 59 * AppleWM implementation function list 60 */ 61typedef struct _AppleWMProcs { 62 DisableUpdateProc DisableUpdate; 63 EnableUpdateProc EnableUpdate; 64 SetWindowLevelProc SetWindowLevel; 65 FrameGetRectProc FrameGetRect; 66 FrameHitTestProc FrameHitTest; 67 FrameDrawProc FrameDraw; 68 SendPSNProc SendPSN; 69 AttachTransientProc AttachTransient; 70} AppleWMProcsRec, *AppleWMProcsPtr; 71 72void AppleWMExtensionInit( 73 AppleWMProcsPtr procsPtr 74); 75 76void AppleWMSetScreenOrigin( 77 WindowPtr pWin 78); 79 80Bool AppleWMDoReorderWindow( 81 WindowPtr pWin 82); 83 84void AppleWMSendEvent( 85 int /* type */, 86 unsigned int /* mask */, 87 int /* which */, 88 int /* arg */ 89); 90 91unsigned int AppleWMSelectedEvents( 92 void 93); 94 95#endif /* _APPLEWMEXT_H_ */ 96