f78b12e570284aa8291f4ca1add24937fd107403vboxsync/***********************************************************
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncCopyright 1987, 1998 The Open Group
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncPermission to use, copy, modify, distribute, and sell this software and its
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncdocumentation for any purpose is hereby granted without fee, provided that
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncthe above copyright notice appear in all copies and that both that
f78b12e570284aa8291f4ca1add24937fd107403vboxsynccopyright notice and this permission notice appear in supporting
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncdocumentation.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncThe above copyright notice and this permission notice shall be included in
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncall copies or substantial portions of the Software.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncExcept as contained in this notice, the name of The Open Group shall not be
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncused in advertising or otherwise to promote the sale, use or other dealings
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncin this Software without prior written authorization from The Open Group.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncCopyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync All Rights Reserved
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncPermission to use, copy, modify, and distribute this software and its
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncdocumentation for any purpose and without fee is hereby granted,
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncprovided that the above copyright notice appear in all copies and that
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncboth that copyright notice and this permission notice appear in
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncsupporting documentation, and that the name of Digital not be
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncused in advertising or publicity pertaining to distribution of the
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncsoftware without specific, written prior permission.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncSOFTWARE.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync******************************************************************/
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#ifndef CURSORSTRUCT_H
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define CURSORSTRUCT_H
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#include "cursor.h"
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#include "privates.h"
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/*
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * device-independent cursor storage
f78b12e570284aa8291f4ca1add24937fd107403vboxsync */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/*
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * source and mask point directly to the bits, which are in the server-defined
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * bitmap format.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync */
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct _CursorBits {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync unsigned char *source; /* points to bits */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync unsigned char *mask; /* points to bits */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Bool emptyMask; /* all zeros mask */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync unsigned short width, height, xhot, yhot; /* metrics */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int refcnt; /* can be shared */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync PrivateRec *devPrivates; /* set by pScr->RealizeCursor*/
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#ifdef ARGB_CURSOR
f78b12e570284aa8291f4ca1add24937fd107403vboxsync CARD32 *argb; /* full-color alpha blended */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#endif
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} CursorBits, *CursorBitsPtr;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define CURSOR_BITS_SIZE (sizeof(CursorBits) + dixPrivatesSize(PRIVATE_CURSOR_BITS))
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct _Cursor {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync CursorBitsPtr bits;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync unsigned short foreRed, foreGreen, foreBlue; /* device-independent color */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync unsigned short backRed, backGreen, backBlue; /* device-independent color */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int refcnt;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync PrivateRec *devPrivates; /* set by pScr->RealizeCursor*/
f78b12e570284aa8291f4ca1add24937fd107403vboxsync XID id;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#ifdef XFIXES
f78b12e570284aa8291f4ca1add24937fd107403vboxsync CARD32 serialNumber;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Atom name;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#endif
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} CursorRec;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define CURSOR_REC_SIZE (sizeof(CursorRec) + dixPrivatesSize(PRIVATE_CURSOR))
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct _CursorMetric {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync unsigned short width, height, xhot, yhot;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} CursorMetricRec;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int x, y;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync ScreenPtr pScreen;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} HotSpot;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#endif /* CURSORSTRUCT_H */