deb4998ba50060c48cce222fd18a8eed053918d7vboxsync/*
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * External interface for the server's AppleWM support
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync/**************************************************************************
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncCopyright (c) 2002 Apple Computer, Inc. All Rights Reserved.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncCopyright (c) 2003-2004 Torrey T. Lyons. All Rights Reserved.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncPermission is hereby granted, free of charge, to any person obtaining a
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynccopy of this software and associated documentation files (the
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync"Software"), to deal in the Software without restriction, including
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncwithout limitation the rights to use, copy, modify, merge, publish,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncdistribute, sub license, and/or sell copies of the Software, and to
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncpermit persons to whom the Software is furnished to do so, subject to
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncthe following conditions:
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncThe above copyright notice and this permission notice (including the
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncnext paragraph) shall be included in all copies or substantial portions
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncof the Software.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncIN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync**************************************************************************/
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#ifndef _APPLEWMEXT_H_
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#define _APPLEWMEXT_H_
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#include "window.h"
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef int (*DisableUpdateProc)(void);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef int (*EnableUpdateProc)(void);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef int (*SetWindowLevelProc)(WindowPtr pWin, int level);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef int (*FrameGetRectProc)(int type, int class, const BoxRec *outer,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync const BoxRec *inner, BoxRec *ret);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef int (*FrameHitTestProc)(int class, int x, int y,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync const BoxRec *outer,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync const BoxRec *inner, int *ret);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef int (*FrameDrawProc)(WindowPtr pWin, int class, unsigned int attr,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync const BoxRec *outer, const BoxRec *inner,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync unsigned int title_len,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync const unsigned char *title_bytes);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync/*
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * AppleWM implementation function list
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef struct _AppleWMProcs {
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync DisableUpdateProc DisableUpdate;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync EnableUpdateProc EnableUpdate;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync SetWindowLevelProc SetWindowLevel;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync FrameGetRectProc FrameGetRect;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync FrameHitTestProc FrameHitTest;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync FrameDrawProc FrameDraw;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync} AppleWMProcsRec, *AppleWMProcsPtr;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid AppleWMExtensionInit(
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync AppleWMProcsPtr procsPtr
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid AppleWMSetScreenOrigin(
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync WindowPtr pWin
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncBool AppleWMDoReorderWindow(
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync WindowPtr pWin
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid AppleWMSendEvent(
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int /* type */,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync unsigned int /* mask */,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int /* which */,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int /* arg */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncunsigned int AppleWMSelectedEvents(
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync void
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#endif /* _APPLEWMEXT_H_ */