a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync/*
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncCopyright 1989, 1998 The Open Group
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncPermission to use, copy, modify, distribute, and sell this software and its
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncdocumentation for any purpose is hereby granted without fee, provided that
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncthe above copyright notice appear in all copies and that both that
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsynccopyright notice and this permission notice appear in supporting
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncdocumentation.
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncThe above copyright notice and this permission notice shall be included in
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncall copies or substantial portions of the Software.
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncExcept as contained in this notice, the name of The Open Group shall not be
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncused in advertising or otherwise to promote the sale, use or other dealings
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncin this Software without prior written authorization from The Open Group.
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync*/
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#ifndef MIPOINTER_H
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#define MIPOINTER_H
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#include "cursor.h"
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#include "input.h"
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#include "privates.h"
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsynctypedef struct _miPointerSpriteFuncRec {
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync Bool (*RealizeCursor) (DeviceIntPtr /* pDev */ ,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync ScreenPtr /* pScr */ ,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync CursorPtr /* pCurs */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync );
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync Bool (*UnrealizeCursor) (DeviceIntPtr /* pDev */ ,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync ScreenPtr /* pScr */ ,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync CursorPtr /* pCurs */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync );
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync void (*SetCursor) (DeviceIntPtr /* pDev */ ,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync ScreenPtr /* pScr */ ,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync CursorPtr /* pCurs */ ,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int /* x */ ,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int /* y */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync );
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync void (*MoveCursor) (DeviceIntPtr /* pDev */ ,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync ScreenPtr /* pScr */ ,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int /* x */ ,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int /* y */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync );
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync Bool (*DeviceCursorInitialize) (DeviceIntPtr /* pDev */ ,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync ScreenPtr /* pScr */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync );
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync void (*DeviceCursorCleanup) (DeviceIntPtr /* pDev */ ,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync ScreenPtr /* pScr */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync );
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync} miPointerSpriteFuncRec, *miPointerSpriteFuncPtr;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsynctypedef struct _miPointerScreenFuncRec {
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync Bool (*CursorOffScreen) (ScreenPtr * /* ppScr */ ,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int * /* px */ ,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int * /* py */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync );
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync void (*CrossScreen) (ScreenPtr /* pScr */ ,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int /* entering */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync );
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync void (*WarpCursor) (DeviceIntPtr /*pDev */ ,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync ScreenPtr /* pScr */ ,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int /* x */ ,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int /* y */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync );
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync} miPointerScreenFuncRec, *miPointerScreenFuncPtr;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncextern _X_EXPORT Bool miDCInitialize(ScreenPtr /*pScreen */ ,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync miPointerScreenFuncPtr /*screenFuncs */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync );
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncextern _X_EXPORT Bool miPointerInitialize(ScreenPtr /*pScreen */ ,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync miPointerSpriteFuncPtr
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync /*spriteFuncs */ ,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync miPointerScreenFuncPtr
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync /*screenFuncs */ ,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync Bool /*waitForUpdate */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync );
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncextern _X_EXPORT void miPointerWarpCursor(DeviceIntPtr /*pDev */ ,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync ScreenPtr /*pScreen */ ,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int /*x */ ,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int /*y */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync );
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncextern _X_EXPORT ScreenPtr
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncmiPointerGetScreen(DeviceIntPtr pDev);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncextern _X_EXPORT void
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncmiPointerSetScreen(DeviceIntPtr pDev, int screen_num, int x, int y);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync/* Returns the current cursor position. */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncextern _X_EXPORT void
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncmiPointerGetPosition(DeviceIntPtr pDev, int *x, int *y);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync/* Moves the cursor to the specified position. May clip the co-ordinates:
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * x and y are modified in-place. */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncextern _X_EXPORT ScreenPtr
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncmiPointerSetPosition(DeviceIntPtr pDev, int mode, double *x, double *y,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int *nevents, InternalEvent *events);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncextern _X_EXPORT void
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncmiPointerUpdateSprite(DeviceIntPtr pDev);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync/* Sets whether the sprite should be updated immediately on pointer moves */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncextern _X_EXPORT Bool
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncmiPointerSetWaitForUpdate(ScreenPtr pScreen, Bool wait);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncextern _X_EXPORT DevPrivateKeyRec miPointerPrivKeyRec;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#define miPointerPrivKey (&miPointerPrivKeyRec)
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncextern _X_EXPORT DevPrivateKeyRec miPointerScreenKeyRec;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#define miPointerScreenKey (&miPointerScreenKeyRec)
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#endif /* MIPOINTER_H */