b9a21c3c91c47e090316e28d759194e46628ed49vboxsync/***********************************************************
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncCopyright 1987, 1998 The Open Group
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncPermission to use, copy, modify, distribute, and sell this software and its
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncdocumentation for any purpose is hereby granted without fee, provided that
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncthe above copyright notice appear in all copies and that both that
b9a21c3c91c47e090316e28d759194e46628ed49vboxsynccopyright notice and this permission notice appear in supporting
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncdocumentation.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncThe above copyright notice and this permission notice shall be included in
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncall copies or substantial portions of the Software.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncExcept as contained in this notice, the name of The Open Group shall not be
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncused in advertising or otherwise to promote the sale, use or other dealings
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncin this Software without prior written authorization from The Open Group.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncCopyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync All Rights Reserved
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncPermission to use, copy, modify, and distribute this software and its
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncdocumentation for any purpose and without fee is hereby granted,
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncprovided that the above copyright notice appear in all copies and that
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncboth that copyright notice and this permission notice appear in
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncsupporting documentation, and that the name of Digital not be
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncused in advertising or publicity pertaining to distribution of the
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncsoftware without specific, written prior permission.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncSOFTWARE.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync******************************************************************/
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#ifndef CURSORSTRUCT_H
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#define CURSORSTRUCT_H
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#include "cursor.h"
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#include "privates.h"
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync/*
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * device-independent cursor storage
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync/*
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * source and mask point directly to the bits, which are in the server-defined
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * bitmap format.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsynctypedef struct _CursorBits {
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync unsigned char *source; /* points to bits */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync unsigned char *mask; /* points to bits */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync Bool emptyMask; /* all zeros mask */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync unsigned short width, height, xhot, yhot; /* metrics */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync int refcnt; /* can be shared */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync PrivateRec *devPrivates; /* set by pScr->RealizeCursor*/
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#ifdef ARGB_CURSOR
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync CARD32 *argb; /* full-color alpha blended */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#endif
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync} CursorBits, *CursorBitsPtr;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsynctypedef struct _Cursor {
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync CursorBitsPtr bits;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync unsigned short foreRed, foreGreen, foreBlue; /* device-independent color */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync unsigned short backRed, backGreen, backBlue; /* device-independent color */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync int refcnt;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync PrivateRec *devPrivates; /* set by pScr->RealizeCursor*/
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync XID id;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#ifdef XFIXES
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync CARD32 serialNumber;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync Atom name;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#endif
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync} CursorRec;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsynctypedef struct _CursorMetric {
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync unsigned short width, height, xhot, yhot;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync} CursorMetricRec;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsynctypedef struct {
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync int x, y;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync ScreenPtr pScreen;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync} HotSpot;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#endif /* CURSORSTRUCT_H */