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