VirtualBox

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

最後變更 在這個檔案是 54163,由 vboxsync 提交於 10 年 前

Additions/x11/vboxvideo: support X.Org Server 1.17 (still untested).

  • 屬性 svn:eol-style 設為 native
檔案大小: 2.9 KB
 
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#ifdef ARGB_CURSOR
23 Bool (*UseHWCursorARGB) (ScreenPtr, CursorPtr);
24 void (*LoadCursorARGB) (ScrnInfoPtr, CursorPtr);
25 Bool (*LoadCursorARGBCheck) (ScrnInfoPtr, CursorPtr);
26#endif
27
28} xf86CursorInfoRec, *xf86CursorInfoPtr;
29
30static inline Bool
31xf86DriverHasLoadCursorImage(xf86CursorInfoPtr infoPtr)
32{
33 return infoPtr->LoadCursorImageCheck || infoPtr->LoadCursorImage;
34}
35
36static inline Bool
37xf86DriverLoadCursorImage(xf86CursorInfoPtr infoPtr, unsigned char *bits)
38{
39 if(infoPtr->LoadCursorImageCheck)
40 return infoPtr->LoadCursorImageCheck(infoPtr->pScrn, bits);
41 infoPtr->LoadCursorImage(infoPtr->pScrn, bits);
42 return TRUE;
43}
44
45static inline Bool
46xf86DriverHasLoadCursorARGB(xf86CursorInfoPtr infoPtr)
47{
48 return infoPtr->LoadCursorARGBCheck || infoPtr->LoadCursorARGB;
49}
50
51static inline Bool
52xf86DriverLoadCursorARGB(xf86CursorInfoPtr infoPtr, CursorPtr pCursor)
53{
54 if(infoPtr->LoadCursorARGBCheck)
55 return infoPtr->LoadCursorARGBCheck(infoPtr->pScrn, pCursor);
56 infoPtr->LoadCursorARGB(infoPtr->pScrn, pCursor);
57 return TRUE;
58}
59
60extern _X_EXPORT Bool xf86InitCursor(ScreenPtr pScreen,
61 xf86CursorInfoPtr infoPtr);
62extern _X_EXPORT xf86CursorInfoPtr xf86CreateCursorInfoRec(void);
63extern _X_EXPORT void xf86DestroyCursorInfoRec(xf86CursorInfoPtr);
64extern _X_EXPORT void xf86ForceHWCursor(ScreenPtr pScreen, Bool on);
65
66#define HARDWARE_CURSOR_INVERT_MASK 0x00000001
67#define HARDWARE_CURSOR_AND_SOURCE_WITH_MASK 0x00000002
68#define HARDWARE_CURSOR_SWAP_SOURCE_AND_MASK 0x00000004
69#define HARDWARE_CURSOR_SOURCE_MASK_NOT_INTERLEAVED 0x00000008
70#define HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1 0x00000010
71#define HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_8 0x00000020
72#define HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_16 0x00000040
73#define HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_32 0x00000080
74#define HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_64 0x00000100
75#define HARDWARE_CURSOR_TRUECOLOR_AT_8BPP 0x00000200
76#define HARDWARE_CURSOR_BIT_ORDER_MSBFIRST 0x00000400
77#define HARDWARE_CURSOR_NIBBLE_SWAPPED 0x00000800
78#define HARDWARE_CURSOR_SHOW_TRANSPARENT 0x00001000
79#define HARDWARE_CURSOR_UPDATE_UNHIDDEN 0x00002000
80#ifdef ARGB_CURSOR
81#define HARDWARE_CURSOR_ARGB 0x00004000
82#endif
83
84#endif /* _XF86CURSOR_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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