VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.18.0/xf86Cursor.h@ 78293

Last change on this file since 78293 was 58634, checked in by vboxsync, 9 years ago

Additions/x11: added header files for building X.Org video driver against X.Org Server 1.18.

  • Property svn:eol-style set to native
File size: 2.9 KB
Line 
1
2#ifndef _XF86CURSOR_H
3#define _XF86CURSOR_H
4
5#include "xf86str.h"
6#include "mipointer.h"
7
8typedef struct _xf86CursorInfoRec {
9 ScrnInfoPtr pScrn;
10 int Flags;
11 int MaxWidth;
12 int MaxHeight;
13 void (*SetCursorColors) (ScrnInfoPtr pScrn, int bg, int fg);
14 void (*SetCursorPosition) (ScrnInfoPtr pScrn, int x, int y);
15 void (*LoadCursorImage) (ScrnInfoPtr pScrn, unsigned char *bits);
16 Bool (*LoadCursorImageCheck) (ScrnInfoPtr pScrn, unsigned char *bits);
17 void (*HideCursor) (ScrnInfoPtr pScrn);
18 void (*ShowCursor) (ScrnInfoPtr pScrn);
19 unsigned char *(*RealizeCursor) (struct _xf86CursorInfoRec *, CursorPtr);
20 Bool (*UseHWCursor) (ScreenPtr, CursorPtr);
21
22 Bool (*UseHWCursorARGB) (ScreenPtr, CursorPtr);
23 void (*LoadCursorARGB) (ScrnInfoPtr, CursorPtr);
24 Bool (*LoadCursorARGBCheck) (ScrnInfoPtr, CursorPtr);
25
26} xf86CursorInfoRec, *xf86CursorInfoPtr;
27
28static inline Bool
29xf86DriverHasLoadCursorImage(xf86CursorInfoPtr infoPtr)
30{
31 return infoPtr->LoadCursorImageCheck || infoPtr->LoadCursorImage;
32}
33
34static inline Bool
35xf86DriverLoadCursorImage(xf86CursorInfoPtr infoPtr, unsigned char *bits)
36{
37 if(infoPtr->LoadCursorImageCheck)
38 return infoPtr->LoadCursorImageCheck(infoPtr->pScrn, bits);
39 infoPtr->LoadCursorImage(infoPtr->pScrn, bits);
40 return TRUE;
41}
42
43static inline Bool
44xf86DriverHasLoadCursorARGB(xf86CursorInfoPtr infoPtr)
45{
46 return infoPtr->LoadCursorARGBCheck || infoPtr->LoadCursorARGB;
47}
48
49static inline Bool
50xf86DriverLoadCursorARGB(xf86CursorInfoPtr infoPtr, CursorPtr pCursor)
51{
52 if(infoPtr->LoadCursorARGBCheck)
53 return infoPtr->LoadCursorARGBCheck(infoPtr->pScrn, pCursor);
54 infoPtr->LoadCursorARGB(infoPtr->pScrn, pCursor);
55 return TRUE;
56}
57
58extern _X_EXPORT Bool xf86InitCursor(ScreenPtr pScreen,
59 xf86CursorInfoPtr infoPtr);
60extern _X_EXPORT xf86CursorInfoPtr xf86CreateCursorInfoRec(void);
61extern _X_EXPORT void xf86DestroyCursorInfoRec(xf86CursorInfoPtr);
62extern _X_EXPORT void xf86ForceHWCursor(ScreenPtr pScreen, Bool on);
63
64#define HARDWARE_CURSOR_INVERT_MASK 0x00000001
65#define HARDWARE_CURSOR_AND_SOURCE_WITH_MASK 0x00000002
66#define HARDWARE_CURSOR_SWAP_SOURCE_AND_MASK 0x00000004
67#define HARDWARE_CURSOR_SOURCE_MASK_NOT_INTERLEAVED 0x00000008
68#define HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1 0x00000010
69#define HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_8 0x00000020
70#define HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_16 0x00000040
71#define HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_32 0x00000080
72#define HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_64 0x00000100
73#define HARDWARE_CURSOR_TRUECOLOR_AT_8BPP 0x00000200
74#define HARDWARE_CURSOR_BIT_ORDER_MSBFIRST 0x00000400
75#define HARDWARE_CURSOR_NIBBLE_SWAPPED 0x00000800
76#define HARDWARE_CURSOR_SHOW_TRANSPARENT 0x00001000
77#define HARDWARE_CURSOR_UPDATE_UNHIDDEN 0x00002000
78#define HARDWARE_CURSOR_ARGB 0x00004000
79
80#endif /* _XF86CURSOR_H */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette