cursorstr.h revision 4c221b0da1816acf2ca302b10092df059484468d
2N/A/***********************************************************
2N/A
2N/ACopyright 1987, 1998 The Open Group
2N/A
2N/APermission to use, copy, modify, distribute, and sell this software and its
2N/Adocumentation for any purpose is hereby granted without fee, provided that
2N/Athe above copyright notice appear in all copies and that both that
2N/Acopyright notice and this permission notice appear in supporting
2N/Adocumentation.
2N/A
2N/AThe above copyright notice and this permission notice shall be included in
2N/Aall copies or substantial portions of the Software.
2N/A
2N/ATHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2N/AIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2N/AFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2N/AOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
2N/AAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
2N/ACONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2N/A
2N/AExcept as contained in this notice, the name of The Open Group shall not be
2N/Aused in advertising or otherwise to promote the sale, use or other dealings
2N/Ain this Software without prior written authorization from The Open Group.
2N/A
2N/A
2N/ACopyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
2N/A
2N/A All Rights Reserved
2N/A
2N/APermission to use, copy, modify, and distribute this software and its
2N/Adocumentation for any purpose and without fee is hereby granted,
2N/Aprovided that the above copyright notice appear in all copies and that
2N/Aboth that copyright notice and this permission notice appear in
2N/Asupporting documentation, and that the name of Digital not be
2N/Aused in advertising or publicity pertaining to distribution of the
2N/Asoftware without specific, written prior permission.
2N/A
2N/ADIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
2N/AALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
2N/ADIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
2N/AANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
2N/AWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
2N/AARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
2N/ASOFTWARE.
2N/A
2N/A******************************************************************/
2N/A
2N/A#ifndef CURSORSTRUCT_H
2N/A#define CURSORSTRUCT_H
2N/A
2N/A#include "cursor.h"
2N/A#include "privates.h"
2N/A/*
2N/A * device-independent cursor storage
2N/A */
2N/A
2N/A/*
2N/A * source and mask point directly to the bits, which are in the server-defined
2N/A * bitmap format.
2N/A */
2N/Atypedef struct _CursorBits {
2N/A unsigned char *source; /* points to bits */
2N/A unsigned char *mask; /* points to bits */
2N/A Bool emptyMask; /* all zeros mask */
2N/A unsigned short width, height, xhot, yhot; /* metrics */
2N/A int refcnt; /* can be shared */
2N/A PrivateRec *devPrivates; /* set by pScr->RealizeCursor*/
2N/A#ifdef ARGB_CURSOR
CARD32 *argb; /* full-color alpha blended */
#endif
} CursorBits, *CursorBitsPtr;
#define CURSOR_BITS_SIZE (sizeof(CursorBits) + dixPrivatesSize(PRIVATE_CURSOR_BITS))
typedef struct _Cursor {
CursorBitsPtr bits;
unsigned short foreRed, foreGreen, foreBlue; /* device-independent color */
unsigned short backRed, backGreen, backBlue; /* device-independent color */
int refcnt;
PrivateRec *devPrivates; /* set by pScr->RealizeCursor*/
XID id;
#ifdef XFIXES
CARD32 serialNumber;
Atom name;
#endif
} CursorRec;
#define CURSOR_REC_SIZE (sizeof(CursorRec) + dixPrivatesSize(PRIVATE_CURSOR))
typedef struct _CursorMetric {
unsigned short width, height, xhot, yhot;
} CursorMetricRec;
typedef struct {
int x, y;
ScreenPtr pScreen;
} HotSpot;
#endif /* CURSORSTRUCT_H */