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