45e9809aff7304721fddb95654901b32195c9c7avboxsync/*
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * All Rights Reserved.
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Permission is hereby granted, free of charge, to any person obtaining
45e9809aff7304721fddb95654901b32195c9c7avboxsync * a copy of this software and associated documentation files (the
45e9809aff7304721fddb95654901b32195c9c7avboxsync * "Software"), to deal in the Software without restriction, including
45e9809aff7304721fddb95654901b32195c9c7avboxsync * without limitation on the rights to use, copy, modify, merge,
45e9809aff7304721fddb95654901b32195c9c7avboxsync * publish, distribute, sublicense, and/or sell copies of the Software,
45e9809aff7304721fddb95654901b32195c9c7avboxsync * and to permit persons to whom the Software is furnished to do so,
45e9809aff7304721fddb95654901b32195c9c7avboxsync * subject to the following conditions:
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * The above copyright notice and this permission notice (including the
45e9809aff7304721fddb95654901b32195c9c7avboxsync * next paragraph) shall be included in all copies or substantial
45e9809aff7304721fddb95654901b32195c9c7avboxsync * portions of the Software.
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
45e9809aff7304721fddb95654901b32195c9c7avboxsync * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
45e9809aff7304721fddb95654901b32195c9c7avboxsync * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
45e9809aff7304721fddb95654901b32195c9c7avboxsync * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
45e9809aff7304721fddb95654901b32195c9c7avboxsync * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
45e9809aff7304721fddb95654901b32195c9c7avboxsync * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
45e9809aff7304721fddb95654901b32195c9c7avboxsync * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
45e9809aff7304721fddb95654901b32195c9c7avboxsync * SOFTWARE.
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/*
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Authors:
45e9809aff7304721fddb95654901b32195c9c7avboxsync * David H. Dawes <dawes@xfree86.org>
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Kevin E. Martin <kem@redhat.com>
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Rickard E. (Rik) Faith <faith@redhat.com>
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/** \file
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Interface for cursor support. \see dmxcursor.c. */
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifndef DMXCURSOR_H
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define DMXCURSOR_H
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include "mipointer.h"
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/** Cursor private area. */
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct _dmxCursorPriv {
45e9809aff7304721fddb95654901b32195c9c7avboxsync Cursor cursor;
45e9809aff7304721fddb95654901b32195c9c7avboxsync} dmxCursorPrivRec, *dmxCursorPrivPtr;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/** Cursor functions for mi layer. \see dmxcursor.c \see dmxscrinit.c */
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern miPointerScreenFuncRec dmxPointerCursorFuncs;
45e9809aff7304721fddb95654901b32195c9c7avboxsync/** Sprite functions for mi layer. \see dmxcursor.c \see dmxscrinit.c */
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern miPointerSpriteFuncRec dmxPointerSpriteFuncs;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void dmxReInitOrigins(void);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void dmxInitOrigins(void);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void dmxInitOverlap(void);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void dmxCursorNoMulti(void);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void dmxMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void dmxCheckCursor(void);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int dmxOnScreen(int x, int y, DMXScreenInfo *dmxScreen);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void dmxHideCursor(DMXScreenInfo *dmxScreen);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void dmxBECreateCursor(ScreenPtr pScreen, CursorPtr pCursor);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern Bool dmxBEFreeCursor(ScreenPtr pScreen, CursorPtr pCursor);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define DMX_GET_CURSOR_PRIV(_pCursor, _pScreen) ((dmxCursorPrivPtr) \
45e9809aff7304721fddb95654901b32195c9c7avboxsync dixLookupPrivate(&(_pCursor)->devPrivates, CursorScreenKey(_pScreen)))
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define DMX_SET_CURSOR_PRIV(_pCursor, _pScreen, v) \
45e9809aff7304721fddb95654901b32195c9c7avboxsync dixSetPrivate(&(_pCursor)->devPrivates, CursorScreenKey(_pScreen), v)
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif /* DMXCURSOR_H */