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