1
0
forked from pool/virtualbox
virtualbox/Virtualbox-xserver-1.16.patch

36197 lines
1.3 MiB

Index: src/VBox/Additions/x11/vboxvideo/Makefile.kmk
===================================================================
--- src/VBox/Additions/x11/vboxvideo/Makefile.kmk (revision 50790)
+++ src/VBox/Additions/x11/vboxvideo/Makefile.kmk (working copy)
@@ -362,6 +362,20 @@
vboxvideo_drv_115_SOURCES := $(vboxvideo_drv_17_SOURCES)
+#
+# vboxvideo_drv_116
+#
+DLLS += vboxvideo_drv_116
+vboxvideo_drv_116_TEMPLATE = VBOXGUESTR3XORGMOD
+vboxvideo_drv_116_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
+vboxvideo_drv_116_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=101600000
+vboxvideo_drv_116_INCS = \
+ $(vboxvideo_xorg_INCS) \
+ $(VBOX_PATH_X11_ROOT)/xorg-server-1.16.0
+vboxvideo_drv_116_INCS += $(PATH_ROOT)/src/VBox/Runtime/include
+vboxvideo_drv_116_SOURCES := $(vboxvideo_drv_17_SOURCES)
+
+
ifdef VBOX_USE_SYSTEM_XORG_HEADERS
# Build using local X.Org headers. We assume X.Org Server 1.7 or later.
DLLS := $(filter-out vboxvideo_drv_%,$(DLLS)) vboxvideo_drv_system
@@ -415,7 +429,7 @@
$$(QUIET)$$(APPEND) -t "$$@" "done"
endef
- $(foreach ver, _70 _71 _13 _14 _15 _16 _17 _18 _19 _110 _111 _112 _113 _114 _115, $(eval $(def_vboxvideo_test)))
+ $(foreach ver, _70 _71 _13 _14 _15 _16 _17 _18 _19 _110 _111 _112 _113 _114 _115 _116, $(eval $(def_vboxvideo_test)))
endif # ! VBOX_ONLY_SDK
endif # eq ($(KBUILD_HOST_ARCH),$(KBUILD_TARGET_ARCH))
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/BT.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/BT.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/BT.h (working copy)
@@ -0,0 +1,37 @@
+
+#include "xf86RamDac.h"
+
+extern _X_EXPORT RamDacHelperRecPtr BTramdacProbe(ScrnInfoPtr pScrn,
+ RamDacSupportedInfoRecPtr
+ ramdacs);
+extern _X_EXPORT void BTramdacSave(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec,
+ RamDacRegRecPtr RamDacRegRec);
+extern _X_EXPORT void BTramdacRestore(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec,
+ RamDacRegRecPtr RamDacRegRec);
+extern _X_EXPORT void BTramdacSetBpp(ScrnInfoPtr pScrn,
+ RamDacRegRecPtr RamDacRegRec);
+
+#define ATT20C504_RAMDAC (VENDOR_BT << 16) | 0x00
+#define ATT20C505_RAMDAC (VENDOR_BT << 16) | 0x01
+#define BT485_RAMDAC (VENDOR_BT << 16) | 0x02
+
+/*
+ * BT registers
+ */
+
+#define BT_WRITE_ADDR 0x00
+#define BT_RAMDAC_DATA 0x01
+#define BT_PIXEL_MASK 0x02
+#define BT_READ_ADDR 0x03
+#define BT_CURS_WR_ADDR 0x04
+#define BT_CURS_DATA 0x05
+#define BT_COMMAND_REG_0 0x06
+#define BT_CURS_RD_ADDR 0x07
+#define BT_COMMAND_REG_1 0x08
+#define BT_COMMAND_REG_2 0x09
+#define BT_STATUS_REG 0x0A
+#define BT_CURS_RAM_DATA 0x0B
+#define BT_CURS_X_LOW 0x0C
+#define BT_CURS_X_HIGH 0x0D
+#define BT_CURS_Y_LOW 0x0E
+#define BT_CURS_Y_HIGH 0x0F
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/IBM.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/IBM.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/IBM.h (working copy)
@@ -0,0 +1,418 @@
+
+#include <xf86RamDac.h>
+
+extern _X_EXPORT RamDacHelperRecPtr IBMramdacProbe(ScrnInfoPtr pScrn,
+ RamDacSupportedInfoRecPtr
+ ramdacs);
+extern _X_EXPORT void IBMramdacSave(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec,
+ RamDacRegRecPtr RamDacRegRec);
+extern _X_EXPORT void IBMramdacRestore(ScrnInfoPtr pScrn,
+ RamDacRecPtr RamDacRec,
+ RamDacRegRecPtr RamDacRegRec);
+extern _X_EXPORT void IBMramdac526SetBpp(ScrnInfoPtr pScrn,
+ RamDacRegRecPtr RamDacRegRec);
+extern _X_EXPORT void IBMramdac640SetBpp(ScrnInfoPtr pScrn,
+ RamDacRegRecPtr RamDacRegRec);
+extern _X_EXPORT unsigned long IBMramdac526CalculateMNPCForClock(unsigned long
+ RefClock,
+ unsigned long
+ ReqClock,
+ char
+ IsPixClock,
+ unsigned long
+ MinClock,
+ unsigned long
+ MaxClock,
+ unsigned long
+ *rM,
+ unsigned long
+ *rN,
+ unsigned long
+ *rP,
+ unsigned long
+ *rC);
+extern _X_EXPORT unsigned long IBMramdac640CalculateMNPCForClock(unsigned long
+ RefClock,
+ unsigned long
+ ReqClock,
+ char
+ IsPixClock,
+ unsigned long
+ MinClock,
+ unsigned long
+ MaxClock,
+ unsigned long
+ *rM,
+ unsigned long
+ *rN,
+ unsigned long
+ *rP,
+ unsigned long
+ *rC);
+extern _X_EXPORT void IBMramdac526HWCursorInit(xf86CursorInfoPtr infoPtr);
+extern _X_EXPORT void IBMramdac640HWCursorInit(xf86CursorInfoPtr infoPtr);
+
+typedef void IBMramdac526SetBppProc(ScrnInfoPtr, RamDacRegRecPtr);
+extern _X_EXPORT IBMramdac526SetBppProc *IBMramdac526SetBppWeak(void);
+
+#define IBM524_RAMDAC ((VENDOR_IBM << 16) | 0x00)
+#define IBM524A_RAMDAC ((VENDOR_IBM << 16) | 0x01)
+#define IBM525_RAMDAC ((VENDOR_IBM << 16) | 0x02)
+#define IBM526_RAMDAC ((VENDOR_IBM << 16) | 0x03)
+#define IBM526DB_RAMDAC ((VENDOR_IBM << 16) | 0x04)
+#define IBM528_RAMDAC ((VENDOR_IBM << 16) | 0x05)
+#define IBM528A_RAMDAC ((VENDOR_IBM << 16) | 0x06)
+#define IBM624_RAMDAC ((VENDOR_IBM << 16) | 0x07)
+#define IBM624DB_RAMDAC ((VENDOR_IBM << 16) | 0x08)
+#define IBM640_RAMDAC ((VENDOR_IBM << 16) | 0x09)
+
+/*
+ * IBM Ramdac registers
+ */
+
+#define IBMRGB_REF_FREQ_1 14.31818
+#define IBMRGB_REF_FREQ_2 50.00000
+
+#define IBMRGB_rev 0x00
+#define IBMRGB_id 0x01
+#define IBMRGB_misc_clock 0x02
+#define IBMRGB_sync 0x03
+#define IBMRGB_hsync_pos 0x04
+#define IBMRGB_pwr_mgmt 0x05
+#define IBMRGB_dac_op 0x06
+#define IBMRGB_pal_ctrl 0x07
+#define IBMRGB_sysclk 0x08 /* not RGB525 */
+#define IBMRGB_pix_fmt 0x0a
+#define IBMRGB_8bpp 0x0b
+#define IBMRGB_16bpp 0x0c
+#define IBMRGB_24bpp 0x0d
+#define IBMRGB_32bpp 0x0e
+#define IBMRGB_pll_ctrl1 0x10
+#define IBMRGB_pll_ctrl2 0x11
+#define IBMRGB_pll_ref_div_fix 0x14
+#define IBMRGB_sysclk_ref_div 0x15 /* not RGB525 */
+#define IBMRGB_sysclk_vco_div 0x16 /* not RGB525 */
+/* #define IBMRGB_f0 0x20 */
+
+#define IBMRGB_sysclk_n 0x15
+#define IBMRGB_sysclk_m 0x16
+#define IBMRGB_sysclk_p 0x17
+#define IBMRGB_sysclk_c 0x18
+
+#define IBMRGB_m0 0x20
+#define IBMRGB_n0 0x21
+#define IBMRGB_p0 0x22
+#define IBMRGB_c0 0x23
+#define IBMRGB_m1 0x24
+#define IBMRGB_n1 0x25
+#define IBMRGB_p1 0x26
+#define IBMRGB_c1 0x27
+#define IBMRGB_m2 0x28
+#define IBMRGB_n2 0x29
+#define IBMRGB_p2 0x2a
+#define IBMRGB_c2 0x2b
+#define IBMRGB_m3 0x2c
+#define IBMRGB_n3 0x2d
+#define IBMRGB_p3 0x2e
+#define IBMRGB_c3 0x2f
+
+#define IBMRGB_curs 0x30
+#define IBMRGB_curs_xl 0x31
+#define IBMRGB_curs_xh 0x32
+#define IBMRGB_curs_yl 0x33
+#define IBMRGB_curs_yh 0x34
+#define IBMRGB_curs_hot_x 0x35
+#define IBMRGB_curs_hot_y 0x36
+#define IBMRGB_curs_col1_r 0x40
+#define IBMRGB_curs_col1_g 0x41
+#define IBMRGB_curs_col1_b 0x42
+#define IBMRGB_curs_col2_r 0x43
+#define IBMRGB_curs_col2_g 0x44
+#define IBMRGB_curs_col2_b 0x45
+#define IBMRGB_curs_col3_r 0x46
+#define IBMRGB_curs_col3_g 0x47
+#define IBMRGB_curs_col3_b 0x48
+#define IBMRGB_border_col_r 0x60
+#define IBMRGB_border_col_g 0x61
+#define IBMRGB_botder_col_b 0x62
+#define IBMRGB_key 0x68
+#define IBMRGB_key_mask 0x6C
+#define IBMRGB_misc1 0x70
+#define IBMRGB_misc2 0x71
+#define IBMRGB_misc3 0x72
+#define IBMRGB_misc4 0x73 /* not RGB525 */
+#define IBMRGB_key_control 0x78
+#define IBMRGB_dac_sense 0x82
+#define IBMRGB_misr_r 0x84
+#define IBMRGB_misr_g 0x86
+#define IBMRGB_misr_b 0x88
+#define IBMRGB_pll_vco_div_in 0x8e
+#define IBMRGB_pll_ref_div_in 0x8f
+#define IBMRGB_vram_mask_0 0x90
+#define IBMRGB_vram_mask_1 0x91
+#define IBMRGB_vram_mask_2 0x92
+#define IBMRGB_vram_mask_3 0x93
+#define IBMRGB_curs_array 0x100
+
+/* Constants rgb525.h */
+
+/* RGB525_REVISION_LEVEL */
+#define RGB525_PRODUCT_REV_LEVEL 0xf0
+
+/* RGB525_ID */
+#define RGB525_PRODUCT_ID 0x01
+
+/* RGB525_MISC_CTRL_1 */
+#define MISR_CNTL_ENABLE 0x80
+#define VMSK_CNTL_ENABLE 0x40
+#define PADR_RDMT_RDADDR 0x0
+#define PADR_RDMT_PAL_STATE 0x20
+#define SENS_DSAB_DISABLE 0x10
+#define SENS_SEL_BIT3 0x0
+#define SENS_SEL_BIT7 0x08
+#define VRAM_SIZE_32 0x0
+#define VRAM_SIZE_64 0x01
+
+/* RGB525_MISC_CTRL_2 */
+#define PCLK_SEL_LCLK 0x0
+#define PCLK_SEL_PLL 0x40
+#define PCLK_SEL_EXT 0x80
+#define INTL_MODE_ENABLE 0x20
+#define BLANK_CNTL_ENABLE 0x10
+#define COL_RES_6BIT 0x0
+#define COL_RES_8BIT 0x04
+#define PORT_SEL_VGA 0x0
+#define PORT_SEL_VRAM 0x01
+
+/* RGB525_MISC_CTRL_3 */
+#define SWAP_RB 0x80
+#define SWAP_WORD_LOHI 0x0
+#define SWAP_WORD_HILO 0x10
+#define SWAP_NIB_HILO 0x0
+#define SWAP_NIB_LOHI 0x02
+
+/* RGB525_MISC_CLK_CTRL */
+#define DDOT_CLK_ENABLE 0x0
+#define DDOT_CLK_DISABLE 0x80
+#define SCLK_ENABLE 0x0
+#define SCLK_DISABLE 0x40
+#define B24P_DDOT_PLL 0x0
+#define B24P_DDOT_SCLK 0x20
+#define DDOT_DIV_PLL_1 0x0
+#define DDOT_DIV_PLL_2 0x02
+#define DDOT_DIV_PLL_4 0x04
+#define DDOT_DIV_PLL_8 0x06
+#define DDOT_DIV_PLL_16 0x08
+#define PLL_DISABLE 0x0
+#define PLL_ENABLE 0x01
+
+/* RGB525_SYNC_CTRL */
+#define DLY_CNTL_ADD 0x0
+#define DLY_SYNC_NOADD 0x80
+#define CSYN_INVT_DISABLE 0x0
+#define CSYN_INVT_ENABLE 0x40
+#define VSYN_INVT_DISABLE 0x0
+#define VSYN_INVT_ENABLE 0x20
+#define HSYN_INVT_DISABLE 0x0
+#define HSYN_INVT_ENABLE 0x10
+#define VSYN_CNTL_NORMAL 0x0
+#define VSYN_CNTL_HIGH 0x04
+#define VSYN_CNTL_LOW 0x08
+#define VSYN_CNTL_DISABLE 0x0C
+#define HSYN_CNTL_NORMAL 0x0
+#define HSYN_CNTL_HIGH 0x01
+#define HSYN_CNTL_LOW 0x02
+#define HSYN_CNTL_DISABLE 0x03
+
+/* RGB525_HSYNC_CTRL */
+#define HSYN_POS(n) (n)
+
+/* RGB525_POWER_MANAGEMENT */
+#define SCLK_PWR_NORMAL 0x0
+#define SCLK_PWR_DISABLE 0x10
+#define DDOT_PWR_NORMAL 0x0
+#define DDOT_PWR_DISABLE 0x08
+#define SYNC_PWR_NORMAL 0x0
+#define SYNC_PWR_DISABLE 0x04
+#define ICLK_PWR_NORMAL 0x0
+#define ICLK_PWR_DISABLE 0x02
+#define DAC_PWR_NORMAL 0x0
+#define DAC_PWR_DISABLE 0x01
+
+/* RGB525_DAC_OPERATION */
+#define SOG_DISABLE 0x0
+#define SOG_ENABLE 0x08
+#define BRB_NORMAL 0x0
+#define BRB_ALWAYS 0x04
+#define DSR_DAC_SLOW 0x02
+#define DSR_DAC_FAST 0x0
+#define DPE_DISABLE 0x0
+#define DPE_ENABLE 0x01
+
+/* RGB525_PALETTE_CTRL */
+#define SIXBIT_LINEAR_ENABLE 0x0
+#define SIXBIT_LINEAR_DISABLE 0x80
+#define PALETTE_PARITION(n) (n)
+
+/* RGB525_PIXEL_FORMAT */
+#define PIXEL_FORMAT_4BPP 0x02
+#define PIXEL_FORMAT_8BPP 0x03
+#define PIXEL_FORMAT_16BPP 0x04
+#define PIXEL_FORMAT_24BPP 0x05
+#define PIXEL_FORMAT_32BPP 0x06
+
+/* RGB525_8BPP_CTRL */
+#define B8_DCOL_INDIRECT 0x0
+#define B8_DCOL_DIRECT 0x01
+
+/* RGB525_16BPP_CTRL */
+#define B16_DCOL_INDIRECT 0x0
+#define B16_DCOL_DYNAMIC 0x40
+#define B16_DCOL_DIRECT 0xC0
+#define B16_POL_FORCE_BYPASS 0x0
+#define B16_POL_FORCE_LOOKUP 0x20
+#define B16_ZIB 0x0
+#define B16_LINEAR 0x04
+#define B16_555 0x0
+#define B16_565 0x02
+#define B16_SPARSE 0x0
+#define B16_CONTIGUOUS 0x01
+
+/* RGB525_24BPP_CTRL */
+#define B24_DCOL_INDIRECT 0x0
+#define B24_DCOL_DIRECT 0x01
+
+/* RGB525_32BPP_CTRL */
+#define B32_POL_FORCE_BYPASS 0x0
+#define B32_POL_FORCE_LOOKUP 0x04
+#define B32_DCOL_INDIRECT 0x0
+#define B32_DCOL_DYNAMIC 0x01
+#define B32_DCOL_DIRECT 0x03
+
+/* RGB525_PLL_CTRL_1 */
+#define REF_SRC_REFCLK 0x0
+#define REF_SRC_EXTCLK 0x10
+#define PLL_EXT_FS_3_0 0x0
+#define PLL_EXT_FS_2_0 0x01
+#define PLL_CNTL2_3_0 0x02
+#define PLL_CNTL2_2_0 0x03
+
+/* RGB525_PLL_CTRL_2 */
+#define PLL_INT_FS_3_0(n) (n)
+#define PLL_INT_FS_2_0(n) (n)
+
+/* RGB525_PLL_REF_DIV_COUNT */
+#define REF_DIV_COUNT(n) (n)
+
+/* RGB525_F0 - RGB525_F15 */
+#define VCO_DIV_COUNT(n) (n)
+
+/* RGB525_PLL_REFCLK values */
+#define RGB525_PLL_REFCLK_MHz(n) ((n)/2)
+
+/* RGB525_CURSOR_CONTROL */
+#define SMLC_PART_0 0x0
+#define SMLC_PART_1 0x40
+#define SMLC_PART_2 0x80
+#define SMLC_PART_3 0xC0
+#define PIX_ORDER_RL 0x0
+#define PIX_ORDER_LR 0x20
+#define LOC_READ_LAST 0x0
+#define LOC_READ_ACTUAL 0x10
+#define UPDT_CNTL_DELAYED 0x0
+#define UPDT_CNTL_IMMEDIATE 0x08
+#define CURSOR_SIZE_32 0x0
+#define CURSOR_SIZE_64 0x40
+#define CURSOR_MODE_OFF 0x0
+#define CURSOR_MODE_3_COLOR 0x01
+#define CURSOR_MODE_2_COLOR_HL 0x02
+#define CURSOR_MODE_2_COLOR 0x03
+
+/* RGB525_REVISION_LEVEL */
+#define REVISION_LEVEL 0xF0 /* predefined */
+
+/* RGB525_ID */
+#define ID_CODE 0x01 /* predefined */
+
+/* MISR status */
+#define RGB525_MISR_DONE 0x01
+
+/* the IBMRGB640 is rather different from the rest of the RAMDACs,
+ so we define a completely new set of register names for it */
+#define RGB640_SER_07_00 0x02
+#define RGB640_SER_15_08 0x03
+#define RGB640_SER_23_16 0x04
+#define RGB640_SER_31_24 0x05
+#define RGB640_SER_WID_03_00 0x06
+#define RGB640_SER_WID_07_04 0x07
+#define RGB640_SER_MODE 0x08
+#define IBM640_SER_2_1 0x00
+#define IBM640_SER_4_1 0x01
+#define IBM640_SER_8_1 0x02
+#define IBM640_SER_16_1 0x03
+#define IBM640_SER_16_3 0x05
+#define IBM640_SER_5_1 0x06
+#define RGB640_PIXEL_INTERLEAVE 0x09
+#define RGB640_MISC_CONF 0x0a
+#define IBM640_PCLK 0x00
+#define IBM640_PCLK_2 0x40
+#define IBM640_PCLK_4 0x80
+#define IBM640_PCLK_8 0xc0
+#define IBM640_PSIZE10 0x10
+#define IBM640_LCI 0x08
+#define IBM640_WIDCTL_MASK 0x07
+#define RGB640_VGA_CONTROL 0x0b
+#define IBM640_RDBK 0x04
+#define IBM640_PSIZE8 0x02
+#define IBM640_VRAM 0x01
+#define RGB640_DAC_CONTROL 0x0d
+#define IBM640_MONO 0x08
+#define IBM640_DACENBL 0x04
+#define IBM640_SHUNT 0x02
+#define IBM640_SLOWSLEW 0x01
+#define RGB640_OUTPUT_CONTROL 0x0e
+#define IBM640_RDAI 0x04
+#define IBM640_WDAI 0x02
+#define IBM640_WATCTL 0x01
+#define RGB640_SYNC_CONTROL 0x0f
+#define IBM640_PWR 0x20
+#define IBM640_VSP 0x10
+#define IBM640_HSP 0x08
+#define IBM640_CSE 0x04
+#define IBM640_CSG 0x02
+#define IBM640_BPE 0x01
+#define RGB640_PLL_N 0x10
+#define RGB640_PLL_M 0x11
+#define RGB640_PLL_P 0x12
+#define RGB640_PLL_CTL 0x13
+#define IBM640_PLL_EN 0x04
+#define IBM640_PLL_HIGH 0x10
+#define IBM640_PLL_LOW 0x01
+#define RGB640_AUX_PLL_CTL 0x17
+#define IBM640_AUXPLL 0x04
+#define IBM640_AUX_HI 0x02
+#define IBM640_AUX_LO 0x01
+#define RGB640_CHROMA_KEY0 0x20
+#define RGB640_CHROMA_MASK0 0x21
+#define RGB640_CURS_X_LOW 0x40
+#define RGB640_CURS_X_HIGH 0x41
+#define RGB640_CURS_Y_LOW 0x42
+#define RGB640_CURS_Y_HIGH 0x43
+#define RGB640_CURS_OFFSETX 0x44
+#define RGB640_CURS_OFFSETY 0x45
+#define RGB640_CURSOR_CONTROL 0x4B
+#define IBM640_CURS_OFF 0x00
+#define IBM640_CURS_MODE0 0x01
+#define IBM640_CURS_MODE1 0x02
+#define IBM640_CURS_MODE2 0x03
+#define IBM640_CURS_ADV 0x04
+#define RGB640_CROSSHAIR_CONTROL 0x57
+#define RGB640_VRAM_MASK0 0xf0
+#define RGB640_VRAM_MASK1 0xf1
+#define RGB640_VRAM_MASK2 0xf2
+#define RGB640_DIAGS 0xfa
+#define RGB640_CURS_WRITE 0x1000
+#define RGB640_CURS_COL0 0x4800
+#define RGB640_CURS_COL1 0x4801
+#define RGB640_CURS_COL2 0x4802
+#define RGB640_CURS_COL3 0x4803
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/TI.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/TI.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/TI.h (working copy)
@@ -0,0 +1,106 @@
+
+#include <xf86RamDac.h>
+
+extern _X_EXPORT unsigned long TIramdacCalculateMNPForClock(unsigned long
+ RefClock,
+ unsigned long
+ ReqClock,
+ char IsPixClock,
+ unsigned long
+ MinClock,
+ unsigned long
+ MaxClock,
+ unsigned long *rM,
+ unsigned long *rN,
+ unsigned long *rP);
+extern _X_EXPORT RamDacHelperRecPtr TIramdacProbe(ScrnInfoPtr pScrn,
+ RamDacSupportedInfoRecPtr
+ ramdacs);
+extern _X_EXPORT void TIramdacSave(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec,
+ RamDacRegRecPtr RamDacRegRec);
+extern _X_EXPORT void TIramdacRestore(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec,
+ RamDacRegRecPtr RamDacRegRec);
+extern _X_EXPORT void TIramdac3026SetBpp(ScrnInfoPtr pScrn,
+ RamDacRegRecPtr RamDacRegRec);
+extern _X_EXPORT void TIramdac3030SetBpp(ScrnInfoPtr pScrn,
+ RamDacRegRecPtr RamDacRegRec);
+extern _X_EXPORT void TIramdacHWCursorInit(xf86CursorInfoPtr infoPtr);
+extern _X_EXPORT void TIramdacLoadPalette(ScrnInfoPtr pScrn, int numColors,
+ int *indices, LOCO * colors,
+ VisualPtr pVisual);
+
+typedef void TIramdacLoadPaletteProc(ScrnInfoPtr, int, int *, LOCO *,
+ VisualPtr);
+extern _X_EXPORT TIramdacLoadPaletteProc *TIramdacLoadPaletteWeak(void);
+
+#define TI3030_RAMDAC (VENDOR_TI << 16) | 0x00
+#define TI3026_RAMDAC (VENDOR_TI << 16) | 0x01
+
+/*
+ * TI Ramdac registers
+ */
+
+#define TIDAC_rev 0x01
+#define TIDAC_ind_curs_ctrl 0x06
+#define TIDAC_byte_router_ctrl 0x07
+#define TIDAC_latch_ctrl 0x0f
+#define TIDAC_true_color_ctrl 0x18
+#define TIDAC_multiplex_ctrl 0x19
+#define TIDAC_clock_select 0x1a
+#define TIDAC_palette_page 0x1c
+#define TIDAC_general_ctrl 0x1d
+#define TIDAC_misc_ctrl 0x1e
+#define TIDAC_pll_addr 0x2c
+#define TIDAC_pll_pixel_data 0x2d
+#define TIDAC_pll_memory_data 0x2e
+#define TIDAC_pll_loop_data 0x2f
+#define TIDAC_key_over_low 0x30
+#define TIDAC_key_over_high 0x31
+#define TIDAC_key_red_low 0x32
+#define TIDAC_key_red_high 0x33
+#define TIDAC_key_green_low 0x34
+#define TIDAC_key_green_high 0x35
+#define TIDAC_key_blue_low 0x36
+#define TIDAC_key_blue_high 0x37
+#define TIDAC_key_ctrl 0x38
+#define TIDAC_clock_ctrl 0x39
+#define TIDAC_sense_test 0x3a
+#define TIDAC_test_mode_data 0x3b
+#define TIDAC_crc_remain_lsb 0x3c
+#define TIDAC_crc_remain_msb 0x3d
+#define TIDAC_crc_bit_select 0x3e
+#define TIDAC_id 0x3f
+
+/* These are pll values that are accessed via TIDAC_pll_pixel_data */
+#define TIDAC_PIXEL_N 0x80
+#define TIDAC_PIXEL_M 0x81
+#define TIDAC_PIXEL_P 0x82
+#define TIDAC_PIXEL_VALID 0x83
+
+/* These are pll values that are accessed via TIDAC_pll_loop_data */
+#define TIDAC_LOOP_N 0x90
+#define TIDAC_LOOP_M 0x91
+#define TIDAC_LOOP_P 0x92
+#define TIDAC_LOOP_VALID 0x93
+
+/* Direct mapping addresses */
+#define TIDAC_INDEX 0xa0
+#define TIDAC_PALETTE_DATA 0xa1
+#define TIDAC_READ_MASK 0xa2
+#define TIDAC_READ_ADDR 0xa3
+#define TIDAC_CURS_WRITE_ADDR 0xa4
+#define TIDAC_CURS_COLOR 0xa5
+#define TIDAC_CURS_READ_ADDR 0xa7
+#define TIDAC_CURS_CTL 0xa9
+#define TIDAC_INDEXED_DATA 0xaa
+#define TIDAC_CURS_RAM_DATA 0xab
+#define TIDAC_CURS_XLOW 0xac
+#define TIDAC_CURS_XHIGH 0xad
+#define TIDAC_CURS_YLOW 0xae
+#define TIDAC_CURS_YHIGH 0xaf
+
+#define TIDAC_sw_reset 0xff
+
+/* Constants */
+#define TIDAC_TVP_3026_ID 0x26
+#define TIDAC_TVP_3030_ID 0x30
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/XIstubs.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/XIstubs.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/XIstubs.h (working copy)
@@ -0,0 +1,46 @@
+/************************************************************
+
+Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of the above listed
+copyright holder(s) not be used in advertising or publicity pertaining
+to distribution of the software without specific, written prior
+permission.
+
+THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD
+TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
+LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+#ifndef XI_STUBS_H
+#define XI_STUBS_H 1
+
+extern _X_EXPORT int
+ SetDeviceMode(ClientPtr /* client */ ,
+ DeviceIntPtr /* dev */ ,
+ int /* mode */ );
+
+extern _X_EXPORT int
+ SetDeviceValuators(ClientPtr /* client */ ,
+ DeviceIntPtr /* dev */ ,
+ int * /* valuators */ ,
+ int /* first_valuator */ ,
+ int /* num_valuators */ );
+
+extern _X_EXPORT int
+ ChangeDeviceControl(ClientPtr /* client */ ,
+ DeviceIntPtr /* dev */ ,
+ xDeviceCtl * /* control */ );
+
+#endif /* XI_STUBS_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/Xprintf.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/Xprintf.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/Xprintf.h (working copy)
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef XPRINTF_H
+#define XPRINTF_H
+
+#include <stdio.h>
+#include <stdarg.h>
+#include <X11/Xfuncproto.h>
+
+#ifndef _X_RESTRICT_KYWD
+#if defined(restrict) /* assume autoconf set it correctly */ || \
+ (defined(__STDC__) && (__STDC_VERSION__ - 0 >= 199901L)) /* C99 */
+#define _X_RESTRICT_KYWD restrict
+#elif defined(__GNUC__) && !defined(__STRICT_ANSI__) /* gcc w/C89+extensions */
+#define _X_RESTRICT_KYWD __restrict__
+#else
+#define _X_RESTRICT_KYWD
+#endif
+#endif
+
+/*
+ * These functions provide a portable implementation of the common (but not
+ * yet universal) asprintf & vasprintf routines to allocate a buffer big
+ * enough to sprintf the arguments to. The XNF variants terminate the server
+ * if the allocation fails.
+ * The buffer allocated is returned in the pointer provided in the first
+ * argument. The return value is the size of the allocated buffer, or -1
+ * on failure.
+ */
+extern _X_EXPORT int
+Xasprintf(char **ret, const char *_X_RESTRICT_KYWD fmt, ...)
+_X_ATTRIBUTE_PRINTF(2, 3);
+extern _X_EXPORT int
+Xvasprintf(char **ret, const char *_X_RESTRICT_KYWD fmt, va_list va)
+_X_ATTRIBUTE_PRINTF(2, 0);
+extern _X_EXPORT int
+XNFasprintf(char **ret, const char *_X_RESTRICT_KYWD fmt, ...)
+_X_ATTRIBUTE_PRINTF(2, 3);
+extern _X_EXPORT int
+XNFvasprintf(char **ret, const char *_X_RESTRICT_KYWD fmt, va_list va)
+_X_ATTRIBUTE_PRINTF(2, 0);
+
+#if !defined(HAVE_ASPRINTF) && !defined(HAVE_VASPRINTF)
+#define asprintf Xasprintf
+#define vasprintf Xvasprintf
+#endif
+
+/*
+ * These functions provide a portable implementation of the linux kernel
+ * scnprintf & vscnprintf routines that return the number of bytes actually
+ * copied during a snprintf, (excluding the final '\0').
+ */
+extern _X_EXPORT int
+Xscnprintf(char *s, int n, const char * _X_RESTRICT_KYWD fmt, ...)
+_X_ATTRIBUTE_PRINTF(3,4);
+extern _X_EXPORT int
+Xvscnprintf(char *s, int n, const char * _X_RESTRICT_KYWD fmt, va_list va)
+_X_ATTRIBUTE_PRINTF(3,0);
+
+#endif /* XPRINTF_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/bt829.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/bt829.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/bt829.h (working copy)
@@ -0,0 +1,103 @@
+#ifndef __BT829_H__
+#define __BT829_H__
+
+#include "xf86i2c.h"
+
+typedef struct {
+ int tunertype; /* Must be set before init */
+ /* Private variables */
+ I2CDevRec d;
+
+ CARD8 brightness;
+ CARD8 ccmode;
+ CARD8 code;
+ CARD16 contrast;
+ CARD8 format;
+ int height;
+ CARD8 hue;
+ CARD8 len;
+ CARD8 mux;
+ CARD8 out_en;
+ CARD8 p_io;
+ CARD16 sat_u;
+ CARD16 sat_v;
+ CARD8 vbien;
+ CARD8 vbifmt;
+ int width;
+
+ CARD16 hdelay;
+ CARD16 hscale;
+ CARD16 vactive;
+ CARD16 vdelay;
+ CARD16 vscale;
+
+ CARD16 htotal;
+ CARD8 id;
+ CARD8 svideo_mux;
+} BT829Rec, *BT829Ptr;
+
+#define xf86_bt829_Detect bt829_Detect
+extern _X_EXPORT BT829Ptr bt829_Detect(I2CBusPtr b, I2CSlaveAddr addr);
+
+/* ATI card specific initialization */
+#define BT829_ATI_ADDR_1 0x8A
+#define BT829_ATI_ADDR_2 0x88
+
+#define xf86_bt829_ATIInit bt829_ATIInit
+extern _X_EXPORT int bt829_ATIInit(BT829Ptr bt);
+
+#define BT829_NTSC 1 /* NTSC-M */
+#define BT829_NTSC_JAPAN 2 /* NTSC-Japan */
+#define BT829_PAL 3 /* PAL-B,D,G,H,I */
+#define BT829_PAL_M 4 /* PAL-M */
+#define BT829_PAL_N 5 /* PAL-N */
+#define BT829_SECAM 6 /* SECAM */
+#define BT829_PAL_N_COMB 7 /* PAL-N combination */
+
+#define xf86_bt829_SetFormat bt829_SetFormat
+extern _X_EXPORT int bt829_SetFormat(BT829Ptr bt, CARD8 format);
+
+#define BT829_MUX2 1 /* ATI -> composite video */
+#define BT829_MUX0 2 /* ATI -> tv tuner */
+#define BT829_MUX1 3 /* ATI -> s-video */
+
+#define xf86_bt829_SetMux bt829_SetMux
+extern _X_EXPORT int bt829_SetMux(BT829Ptr bt, CARD8 mux);
+
+#define xf86_bt829_SetCaptSize bt829_SetCaptSize
+extern _X_EXPORT int bt829_SetCaptSize(BT829Ptr bt, int width, int height);
+
+#define xf86_bt829_SetBrightness bt829_SetBrightness
+extern _X_EXPORT void bt829_SetBrightness(BT829Ptr bt, int brightness);
+
+#define xf86_bt829_SetContrast bt829_SetContrast
+extern _X_EXPORT void bt829_SetContrast(BT829Ptr bt, int contrast);
+
+#define xf86_bt829_SetSaturation bt829_SetSaturation
+extern _X_EXPORT void bt829_SetSaturation(BT829Ptr bt, int saturation);
+
+#define xf86_bt829_SetTint bt829_SetTint
+extern _X_EXPORT void bt829_SetTint(BT829Ptr bt, int hue); /* Hue */
+
+#define xf86_bt829_SetOUT_EN bt829_SetOUT_EN
+extern _X_EXPORT void bt829_SetOUT_EN(BT829Ptr bt, BOOL out_en); /* VPOLE register */
+
+#define xf86_bt829_SetP_IO bt829_SetP_IO
+extern _X_EXPORT void bt829_SetP_IO(BT829Ptr bt, CARD8 p_io); /* P_IO register */
+
+extern _X_EXPORT int bt829_SetCC(BT829Ptr bt);
+
+#define BT829SymbolsList \
+ "bt829_Detect", \
+ "bt829_ATIInit", \
+ "bt829_SetFormat", \
+ "bt829_SetMux", \
+ "bt829_SetBrightness", \
+ "bt829_SetContrast", \
+ "bt829_SetSaturation", \
+ "bt829_SetTint", \
+ "bt829_SetCaptSize", \
+ "bt829_SetOUT_EN", \
+ "bt829_SetP_IO"
+
+#endif
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/callback.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/callback.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/callback.h (working copy)
@@ -0,0 +1,91 @@
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef CALLBACK_H
+#define CALLBACK_H
+
+#include <X11/X.h> /* for GContext, Mask */
+#include <X11/Xdefs.h> /* for Bool */
+#include <X11/Xproto.h>
+#include <X11/Xfuncproto.h>
+
+/*
+ * callback manager stuff
+ */
+
+#ifndef _XTYPEDEF_CALLBACKLISTPTR
+typedef struct _CallbackList *CallbackListPtr; /* also in misc.h */
+
+#define _XTYPEDEF_CALLBACKLISTPTR
+#endif
+
+typedef void (*CallbackProcPtr) (CallbackListPtr *, void *, void *);
+
+extern _X_EXPORT Bool AddCallback(CallbackListPtr * /*pcbl */ ,
+ CallbackProcPtr /*callback */ ,
+ void */*data */ );
+
+extern _X_EXPORT Bool DeleteCallback(CallbackListPtr * /*pcbl */ ,
+ CallbackProcPtr /*callback */ ,
+ void */*data */ );
+
+extern _X_EXPORT void _CallCallbacks(CallbackListPtr * /*pcbl */ ,
+ void */*call_data */ );
+
+static inline void
+CallCallbacks(CallbackListPtr *pcbl, void *call_data)
+{
+ if (!pcbl || !*pcbl)
+ return;
+ _CallCallbacks(pcbl, call_data);
+}
+
+extern _X_EXPORT void DeleteCallbackList(CallbackListPtr * /*pcbl */ );
+
+extern _X_EXPORT void InitCallbackManager(void);
+extern _X_EXPORT void DeleteCallbackManager(void);
+
+#endif /* CALLBACK_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/client.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/client.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/client.h (working copy)
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). All
+ * rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+/* Author: Rami Ylimäki <rami.ylimaki@vincit.fi> */
+
+#ifndef CLIENT_H
+#define CLIENT_H
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif /* HAVE_DIX_CONFIG_H */
+#include <X11/Xfuncproto.h>
+#include <sys/types.h>
+
+/* Client IDs. Use GetClientPid, GetClientCmdName and GetClientCmdArgs
+ * instead of accessing the fields directly. */
+typedef struct {
+ pid_t pid; /* process ID, -1 if not available */
+ const char *cmdname; /* process name, NULL if not available */
+ const char *cmdargs; /* process arguments, NULL if not available */
+} ClientIdRec, *ClientIdPtr;
+
+struct _Client;
+
+/* Initialize and clean up. */
+void ReserveClientIds(struct _Client *client);
+void ReleaseClientIds(struct _Client *client);
+
+/* Determine client IDs for caching. Exported on purpose for
+ * extensions such as SELinux. */
+extern _X_EXPORT pid_t DetermineClientPid(struct _Client *client);
+extern _X_EXPORT void DetermineClientCmd(pid_t, const char **cmdname,
+ const char **cmdargs);
+
+/* Query cached client IDs. Exported on purpose for drivers. */
+extern _X_EXPORT pid_t GetClientPid(struct _Client *client);
+extern _X_EXPORT const char *GetClientCmdName(struct _Client *client);
+extern _X_EXPORT const char *GetClientCmdArgs(struct _Client *client);
+
+#endif /* CLIENT_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/closestr.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/closestr.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/closestr.h (working copy)
@@ -0,0 +1,126 @@
+/*
+
+Copyright 1991, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+*/
+
+#ifndef CLOSESTR_H
+#define CLOSESTR_H
+
+#include <X11/Xproto.h>
+#include "closure.h"
+#include "dix.h"
+#include "misc.h"
+#include "gcstruct.h"
+
+/* closure structures */
+
+/* OpenFont */
+
+typedef struct _OFclosure {
+ ClientPtr client;
+ short current_fpe;
+ short num_fpes;
+ FontPathElementPtr *fpe_list;
+ Mask flags;
+
+/* XXX -- get these from request buffer instead? */
+ const char *origFontName;
+ int origFontNameLen;
+ XID fontid;
+ char *fontname;
+ int fnamelen;
+ FontPtr non_cachable_font;
+} OFclosureRec;
+
+/* ListFontsWithInfo */
+
+#define XLFDMAXFONTNAMELEN 256
+typedef struct _LFWIstate {
+ char pattern[XLFDMAXFONTNAMELEN];
+ int patlen;
+ int current_fpe;
+ int max_names;
+ Bool list_started;
+ void *private;
+} LFWIstateRec, *LFWIstatePtr;
+
+typedef struct _LFWIclosure {
+ ClientPtr client;
+ int num_fpes;
+ FontPathElementPtr *fpe_list;
+ xListFontsWithInfoReply *reply;
+ int length;
+ LFWIstateRec current;
+ LFWIstateRec saved;
+ int savedNumFonts;
+ Bool haveSaved;
+ char *savedName;
+} LFWIclosureRec;
+
+/* ListFonts */
+
+typedef struct _LFclosure {
+ ClientPtr client;
+ int num_fpes;
+ FontPathElementPtr *fpe_list;
+ FontNamesPtr names;
+ LFWIstateRec current;
+ LFWIstateRec saved;
+ Bool haveSaved;
+ char *savedName;
+ int savedNameLen;
+} LFclosureRec;
+
+/* PolyText */
+
+typedef struct _PTclosure {
+ ClientPtr client;
+ DrawablePtr pDraw;
+ GC *pGC;
+ unsigned char *pElt;
+ unsigned char *endReq;
+ unsigned char *data;
+ int xorg;
+ int yorg;
+ CARD8 reqType;
+ XID did;
+ int err;
+} PTclosureRec;
+
+/* ImageText */
+
+typedef struct _ITclosure {
+ ClientPtr client;
+ DrawablePtr pDraw;
+ GC *pGC;
+ BYTE nChars;
+ unsigned char *data;
+ int xorg;
+ int yorg;
+ CARD8 reqType;
+ XID did;
+} ITclosureRec;
+#endif /* CLOSESTR_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/closure.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/closure.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/closure.h (working copy)
@@ -0,0 +1,56 @@
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef CLOSURE_H
+#define CLOSURE_H 1
+
+typedef struct _LFclosure *LFclosurePtr;
+typedef struct _LFWIclosure *LFWIclosurePtr;
+typedef struct _OFclosure *OFclosurePtr;
+typedef struct _PTclosure *PTclosurePtr;
+typedef struct _ITclosure *ITclosurePtr;
+
+#endif /* CLOSURE_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/colormap.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/colormap.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/colormap.h (working copy)
@@ -0,0 +1,170 @@
+/*
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+*/
+
+#ifndef CMAP_H
+#define CMAP_H 1
+
+#include <X11/Xproto.h>
+#include "screenint.h"
+#include "window.h"
+
+/* these follow X.h's AllocNone and AllocAll */
+#define CM_PSCREEN 2
+#define CM_PWIN 3
+/* Passed internally in colormap.c */
+#define REDMAP 0
+#define GREENMAP 1
+#define BLUEMAP 2
+#define PSEUDOMAP 3
+#define AllocPrivate (-1)
+#define AllocTemporary (-2)
+#define DynamicClass 1
+
+/* Values for the flags field of a colormap. These should have 1 bit set
+ * and not overlap */
+#define IsDefault 1
+#define AllAllocated 2
+#define BeingCreated 4
+
+typedef CARD32 Pixel;
+typedef struct _CMEntry *EntryPtr;
+
+/* moved to screenint.h: typedef struct _ColormapRec *ColormapPtr */
+typedef struct _colorResource *colorResourcePtr;
+
+extern _X_EXPORT int CreateColormap(Colormap /*mid */ ,
+ ScreenPtr /*pScreen */ ,
+ VisualPtr /*pVisual */ ,
+ ColormapPtr * /*ppcmap */ ,
+ int /*alloc */ ,
+ int /*client */ );
+
+extern _X_EXPORT int FreeColormap(void */*pmap */ ,
+ XID /*mid */ );
+
+extern _X_EXPORT int TellLostMap(WindowPtr /*pwin */ ,
+ void */* Colormap *pmid */ );
+
+extern _X_EXPORT int TellGainedMap(WindowPtr /*pwin */ ,
+ void */* Colormap *pmid */ );
+
+extern _X_EXPORT int CopyColormapAndFree(Colormap /*mid */ ,
+ ColormapPtr /*pSrc */ ,
+ int /*client */ );
+
+extern _X_EXPORT int AllocColor(ColormapPtr /*pmap */ ,
+ unsigned short * /*pred */ ,
+ unsigned short * /*pgreen */ ,
+ unsigned short * /*pblue */ ,
+ Pixel * /*pPix */ ,
+ int /*client */ );
+
+extern _X_EXPORT void FakeAllocColor(ColormapPtr /*pmap */ ,
+ xColorItem * /*item */ );
+
+extern _X_EXPORT void FakeFreeColor(ColormapPtr /*pmap */ ,
+ Pixel /*pixel */ );
+
+typedef int (*ColorCompareProcPtr) (EntryPtr /*pent */ ,
+ xrgb * /*prgb */ );
+
+extern _X_EXPORT int FindColor(ColormapPtr /*pmap */ ,
+ EntryPtr /*pentFirst */ ,
+ int /*size */ ,
+ xrgb * /*prgb */ ,
+ Pixel * /*pPixel */ ,
+ int /*channel */ ,
+ int /*client */ ,
+ ColorCompareProcPtr /*comp */ );
+
+extern _X_EXPORT int QueryColors(ColormapPtr /*pmap */ ,
+ int /*count */ ,
+ Pixel * /*ppixIn */ ,
+ xrgb * /*prgbList */ ,
+ ClientPtr client);
+
+extern _X_EXPORT int FreeClientPixels(void */*pcr */ ,
+ XID /*fakeid */ );
+
+extern _X_EXPORT int AllocColorCells(int /*client */ ,
+ ColormapPtr /*pmap */ ,
+ int /*colors */ ,
+ int /*planes */ ,
+ Bool /*contig */ ,
+ Pixel * /*ppix */ ,
+ Pixel * /*masks */ );
+
+extern _X_EXPORT int AllocColorPlanes(int /*client */ ,
+ ColormapPtr /*pmap */ ,
+ int /*colors */ ,
+ int /*r */ ,
+ int /*g */ ,
+ int /*b */ ,
+ Bool /*contig */ ,
+ Pixel * /*pixels */ ,
+ Pixel * /*prmask */ ,
+ Pixel * /*pgmask */ ,
+ Pixel * /*pbmask */ );
+
+extern _X_EXPORT int FreeColors(ColormapPtr /*pmap */ ,
+ int /*client */ ,
+ int /*count */ ,
+ Pixel * /*pixels */ ,
+ Pixel /*mask */ );
+
+extern _X_EXPORT int StoreColors(ColormapPtr /*pmap */ ,
+ int /*count */ ,
+ xColorItem * /*defs */ ,
+ ClientPtr client);
+
+extern _X_EXPORT int IsMapInstalled(Colormap /*map */ ,
+ WindowPtr /*pWin */ );
+
+extern _X_EXPORT Bool ResizeVisualArray(ScreenPtr /* pScreen */ ,
+ int /* new_vis_count */ ,
+ DepthPtr /* depth */ );
+
+#endif /* CMAP_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/colormapst.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/colormapst.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/colormapst.h (working copy)
@@ -0,0 +1,111 @@
+/*
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+*/
+
+#ifndef CMAPSTRUCT_H
+#define CMAPSTRUCT_H 1
+
+#include "colormap.h"
+#include "screenint.h"
+#include "privates.h"
+
+/* Shared color -- the color is used by AllocColorPlanes */
+typedef struct {
+ unsigned short color;
+ short refcnt;
+} SHAREDCOLOR;
+
+/* LOCO -- a local color for a PseudoColor cell. DirectColor maps always
+ * use the first value (called red) in the structure. What channel they
+ * are really talking about depends on which map they are in. */
+typedef struct {
+ unsigned short red, green, blue;
+} LOCO;
+
+/* SHCO -- a shared color for a PseudoColor cell. Used with AllocColorPlanes.
+ * DirectColor maps always use the first value (called red) in the structure.
+ * What channel they are really talking about depends on which map they
+ * are in. */
+typedef struct {
+ SHAREDCOLOR *red, *green, *blue;
+} SHCO;
+
+/* color map entry */
+typedef struct _CMEntry {
+ union {
+ LOCO local;
+ SHCO shco;
+ } co;
+ short refcnt;
+ Bool fShared;
+} Entry;
+
+/* COLORMAPs can be used for either Direct or Pseudo color. PseudoColor
+ * only needs one cell table, we arbitrarily pick red. We keep track
+ * of that table with freeRed, numPixelsRed, and clientPixelsRed */
+
+typedef struct _ColormapRec {
+ VisualPtr pVisual;
+ short class; /* PseudoColor or DirectColor */
+ XID mid; /* client's name for colormap */
+ ScreenPtr pScreen; /* screen map is associated with */
+ short flags; /* 1 = IsDefault
+ * 2 = AllAllocated */
+ int freeRed;
+ int freeGreen;
+ int freeBlue;
+ int *numPixelsRed;
+ int *numPixelsGreen;
+ int *numPixelsBlue;
+ Pixel **clientPixelsRed;
+ Pixel **clientPixelsGreen;
+ Pixel **clientPixelsBlue;
+ Entry *red;
+ Entry *green;
+ Entry *blue;
+ PrivateRec *devPrivates;
+} ColormapRec;
+
+#endif /* COLORMAP_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/compiler.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/compiler.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/compiler.h (working copy)
@@ -0,0 +1,1745 @@
+/*
+ * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Thomas Roell not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Thomas Roell makes no representations
+ * about the suitability of this software for any purpose. It is provided
+ * "as is" without express or implied warranty.
+ *
+ * THOMAS ROELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THOMAS ROELL BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/*
+ * Copyright (c) 1994-2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+#ifndef _COMPILER_H
+
+#define _COMPILER_H
+
+#if defined(__SUNPRO_C)
+#define DO_PROTOTYPES
+#endif
+
+/* Map Sun compiler platform defines to gcc-style used in the code */
+#if defined(__amd64) && !defined(__amd64__)
+#define __amd64__
+#endif
+#if defined(__i386) && !defined(__i386__)
+#define __i386__
+#endif
+#if defined(__sparc) && !defined(__sparc__)
+#define __sparc__
+#endif
+#if defined(__sparcv9) && !defined(__sparc64__)
+#define __sparc64__
+#endif
+
+#ifndef _X_EXPORT
+#include <X11/Xfuncproto.h>
+#endif
+
+#include <pixman.h> /* for uint*_t types */
+
+/* Allow drivers to use the GCC-supported __inline__ and/or __inline. */
+#ifndef __inline__
+#if defined(__GNUC__)
+ /* gcc has __inline__ */
+#elif defined(__HIGHC__)
+#define __inline__ _Inline
+#else
+#define __inline__ /**/
+#endif
+#endif /* __inline__ */
+#ifndef __inline
+#if defined(__GNUC__)
+ /* gcc has __inline */
+#elif defined(__HIGHC__)
+#define __inline _Inline
+#else
+#define __inline /**/
+#endif
+#endif /* __inline */
+/* Support gcc's __FUNCTION__ for people using other compilers */
+#if !defined(__GNUC__) && !defined(__FUNCTION__)
+#define __FUNCTION__ __func__ /* C99 */
+#endif
+#if defined(NO_INLINE) || defined(DO_PROTOTYPES)
+#if !defined(__arm__)
+#if !defined(__sparc__) && !defined(__sparc) && !defined(__arm32__) && !defined(__nds32__) \
+ && !(defined(__alpha__) && defined(linux)) \
+ && !(defined(__ia64__) && defined(linux)) \
+
+extern _X_EXPORT void outb(unsigned short, unsigned char);
+extern _X_EXPORT void outw(unsigned short, unsigned short);
+extern _X_EXPORT void outl(unsigned short, unsigned int);
+extern _X_EXPORT unsigned int inb(unsigned short);
+extern _X_EXPORT unsigned int inw(unsigned short);
+extern _X_EXPORT unsigned int inl(unsigned short);
+
+#else /* __sparc__, __arm32__, __alpha__, __nds32__ */
+extern _X_EXPORT void outb(unsigned long, unsigned char);
+extern _X_EXPORT void outw(unsigned long, unsigned short);
+extern _X_EXPORT void outl(unsigned long, unsigned int);
+extern _X_EXPORT unsigned int inb(unsigned long);
+extern _X_EXPORT unsigned int inw(unsigned long);
+extern _X_EXPORT unsigned int inl(unsigned long);
+
+#ifdef __SUNPRO_C
+extern _X_EXPORT unsigned char xf86ReadMmio8 (void *, unsigned long);
+extern _X_EXPORT unsigned short xf86ReadMmio16Be (void *, unsigned long);
+extern _X_EXPORT unsigned short xf86ReadMmio16Le (void *, unsigned long);
+extern _X_EXPORT unsigned int xf86ReadMmio32Be (void *, unsigned long);
+extern _X_EXPORT unsigned int xf86ReadMmio32Le (void *, unsigned long);
+extern _X_EXPORT void xf86WriteMmio8 (void *, unsigned long, unsigned int);
+extern _X_EXPORT void xf86WriteMmio16Be (void *, unsigned long, unsigned int);
+extern _X_EXPORT void xf86WriteMmio16Le (void *, unsigned long, unsigned int);
+extern _X_EXPORT void xf86WriteMmio32Be (void *, unsigned long, unsigned int);
+extern _X_EXPORT void xf86WriteMmio32Le (void *, unsigned long, unsigned int);
+extern _X_EXPORT void xf86WriteMmio8NB (void *, unsigned long, unsigned int);
+extern _X_EXPORT void xf86WriteMmio16BeNB (void *, unsigned long, unsigned int);
+extern _X_EXPORT void xf86WriteMmio16LeNB (void *, unsigned long, unsigned int);
+extern _X_EXPORT void xf86WriteMmio32BeNB (void *, unsigned long, unsigned int);
+extern _X_EXPORT void xf86WriteMmio32LeNB (void *, unsigned long, unsigned int);
+#endif /* _SUNPRO_C */
+#endif /* __sparc__, __arm32__, __alpha__, __nds32__ */
+#endif /* __arm__ */
+
+#if defined(__powerpc__) && !defined(__OpenBSD__)
+extern unsigned long ldq_u(unsigned long *);
+extern unsigned long ldl_u(unsigned int *);
+extern unsigned long ldw_u(unsigned short *);
+extern void stq_u(unsigned long, unsigned long *);
+extern void stl_u(unsigned long, unsigned int *);
+extern void stw_u(unsigned long, unsigned short *);
+extern void mem_barrier(void);
+extern void write_mem_barrier(void);
+extern void stl_brx(unsigned long, volatile unsigned char *, int);
+extern void stw_brx(unsigned short, volatile unsigned char *, int);
+extern unsigned long ldl_brx(volatile unsigned char *, int);
+extern unsigned short ldw_brx(volatile unsigned char *, int);
+#endif /* __powerpc__ && !__OpenBSD */
+
+#endif /* NO_INLINE || DO_PROTOTYPES */
+
+#ifndef NO_INLINE
+#ifdef __GNUC__
+#ifdef __i386__
+
+#ifdef __SSE__
+#define write_mem_barrier() __asm__ __volatile__ ("sfence" : : : "memory")
+#else
+#define write_mem_barrier() __asm__ __volatile__ ("lock; addl $0,0(%%esp)" : : : "memory")
+#endif
+
+#ifdef __SSE2__
+#define mem_barrier() __asm__ __volatile__ ("mfence" : : : "memory")
+#else
+#define mem_barrier() __asm__ __volatile__ ("lock; addl $0,0(%%esp)" : : : "memory")
+#endif
+
+#elif defined __alpha__
+
+#define mem_barrier() __asm__ __volatile__ ("mb" : : : "memory")
+#define write_mem_barrier() __asm__ __volatile__ ("wmb" : : : "memory")
+
+#elif defined __amd64__
+
+#define mem_barrier() __asm__ __volatile__ ("mfence" : : : "memory")
+#define write_mem_barrier() __asm__ __volatile__ ("sfence" : : : "memory")
+
+#elif defined __ia64__
+
+#ifndef __INTEL_COMPILER
+#define mem_barrier() __asm__ __volatile__ ("mf" : : : "memory")
+#define write_mem_barrier() __asm__ __volatile__ ("mf" : : : "memory")
+#else
+#include "ia64intrin.h"
+#define mem_barrier() __mf()
+#define write_mem_barrier() __mf()
+#endif
+
+#elif defined __mips__
+ /* Note: sync instruction requires MIPS II instruction set */
+#define mem_barrier() \
+ __asm__ __volatile__( \
+ ".set push\n\t" \
+ ".set noreorder\n\t" \
+ ".set mips2\n\t" \
+ "sync\n\t" \
+ ".set pop" \
+ : /* no output */ \
+ : /* no input */ \
+ : "memory")
+#define write_mem_barrier() mem_barrier()
+
+#elif defined __powerpc__
+
+#if defined(linux) && defined(__powerpc64__)
+#include <linux/version.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
+#include <asm/memory.h>
+#endif
+#endif /* defined(linux) && defined(__powerpc64__) */
+
+#ifndef eieio /* We deal with arch-specific eieio() routines above... */
+#define eieio() __asm__ __volatile__ ("eieio" ::: "memory")
+#endif /* eieio */
+#define mem_barrier() eieio()
+#define write_mem_barrier() eieio()
+
+#elif defined __sparc__
+
+#define barrier() __asm__ __volatile__ (".word 0x8143e00a" : : : "memory")
+#define mem_barrier() /* XXX: nop for now */
+#define write_mem_barrier() /* XXX: nop for now */
+#endif
+#endif /* __GNUC__ */
+#endif /* NO_INLINE */
+
+#ifndef mem_barrier
+#define mem_barrier() /* NOP */
+#endif
+
+#ifndef write_mem_barrier
+#define write_mem_barrier() /* NOP */
+#endif
+
+#ifndef NO_INLINE
+#ifdef __GNUC__
+
+/* Define some packed structures to use with unaligned accesses */
+
+struct __una_u64 {
+ uint64_t x __attribute__ ((packed));
+};
+struct __una_u32 {
+ uint32_t x __attribute__ ((packed));
+};
+struct __una_u16 {
+ uint16_t x __attribute__ ((packed));
+};
+
+/* Elemental unaligned loads */
+
+static __inline__ uint64_t
+ldq_u(uint64_t * p)
+{
+ const struct __una_u64 *ptr = (const struct __una_u64 *) p;
+
+ return ptr->x;
+}
+
+static __inline__ uint32_t
+ldl_u(uint32_t * p)
+{
+ const struct __una_u32 *ptr = (const struct __una_u32 *) p;
+
+ return ptr->x;
+}
+
+static __inline__ uint16_t
+ldw_u(uint16_t * p)
+{
+ const struct __una_u16 *ptr = (const struct __una_u16 *) p;
+
+ return ptr->x;
+}
+
+/* Elemental unaligned stores */
+
+static __inline__ void
+stq_u(uint64_t val, uint64_t * p)
+{
+ struct __una_u64 *ptr = (struct __una_u64 *) p;
+
+ ptr->x = val;
+}
+
+static __inline__ void
+stl_u(uint32_t val, uint32_t * p)
+{
+ struct __una_u32 *ptr = (struct __una_u32 *) p;
+
+ ptr->x = val;
+}
+
+static __inline__ void
+stw_u(uint16_t val, uint16_t * p)
+{
+ struct __una_u16 *ptr = (struct __una_u16 *) p;
+
+ ptr->x = val;
+}
+#else /* !__GNUC__ */
+
+#include <string.h> /* needed for memmove */
+
+static __inline__ uint64_t
+ldq_u(uint64_t * p)
+{
+ uint64_t ret;
+
+ memmove(&ret, p, sizeof(*p));
+ return ret;
+}
+
+static __inline__ uint32_t
+ldl_u(uint32_t * p)
+{
+ uint32_t ret;
+
+ memmove(&ret, p, sizeof(*p));
+ return ret;
+}
+
+static __inline__ uint16_t
+ldw_u(uint16_t * p)
+{
+ uint16_t ret;
+
+ memmove(&ret, p, sizeof(*p));
+ return ret;
+}
+
+static __inline__ void
+stq_u(uint64_t val, uint64_t * p)
+{
+ uint64_t tmp = val;
+
+ memmove(p, &tmp, sizeof(*p));
+}
+
+static __inline__ void
+stl_u(uint32_t val, uint32_t * p)
+{
+ uint32_t tmp = val;
+
+ memmove(p, &tmp, sizeof(*p));
+}
+
+static __inline__ void
+stw_u(uint16_t val, uint16_t * p)
+{
+ uint16_t tmp = val;
+
+ memmove(p, &tmp, sizeof(*p));
+}
+
+#endif /* __GNUC__ */
+#endif /* NO_INLINE */
+
+#ifndef NO_INLINE
+#ifdef __GNUC__
+#if (defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) && (defined(__alpha__))
+
+#ifdef linux
+/* for Linux on Alpha, we use the LIBC _inx/_outx routines */
+/* note that the appropriate setup via "ioperm" needs to be done */
+/* *before* any inx/outx is done. */
+
+extern _X_EXPORT void _outb(unsigned char val, unsigned long port);
+extern _X_EXPORT void _outw(unsigned short val, unsigned long port);
+extern _X_EXPORT void _outl(unsigned int val, unsigned long port);
+extern _X_EXPORT unsigned int _inb(unsigned long port);
+extern _X_EXPORT unsigned int _inw(unsigned long port);
+extern _X_EXPORT unsigned int _inl(unsigned long port);
+
+static __inline__ void
+outb(unsigned long port, unsigned char val)
+{
+ _outb(val, port);
+}
+
+static __inline__ void
+outw(unsigned long port, unsigned short val)
+{
+ _outw(val, port);
+}
+
+static __inline__ void
+outl(unsigned long port, unsigned int val)
+{
+ _outl(val, port);
+}
+
+static __inline__ unsigned int
+inb(unsigned long port)
+{
+ return _inb(port);
+}
+
+static __inline__ unsigned int
+inw(unsigned long port)
+{
+ return _inw(port);
+}
+
+static __inline__ unsigned int
+inl(unsigned long port)
+{
+ return _inl(port);
+}
+
+#endif /* linux */
+
+#if (defined(__FreeBSD__) || defined(__OpenBSD__)) \
+ && !defined(DO_PROTOTYPES)
+
+/* for FreeBSD and OpenBSD on Alpha, we use the libio (resp. libalpha) */
+/* inx/outx routines */
+/* note that the appropriate setup via "ioperm" needs to be done */
+/* *before* any inx/outx is done. */
+
+extern _X_EXPORT void outb(unsigned int port, unsigned char val);
+extern _X_EXPORT void outw(unsigned int port, unsigned short val);
+extern _X_EXPORT void outl(unsigned int port, unsigned int val);
+extern _X_EXPORT unsigned char inb(unsigned int port);
+extern _X_EXPORT unsigned short inw(unsigned int port);
+extern _X_EXPORT unsigned int inl(unsigned int port);
+
+#endif /* (__FreeBSD__ || __OpenBSD__ ) && !DO_PROTOTYPES */
+
+#if defined(__NetBSD__)
+#include <machine/pio.h>
+#endif /* __NetBSD__ */
+
+#elif (defined(linux) || defined(__FreeBSD__)) && defined(__amd64__)
+
+#include <inttypes.h>
+
+static __inline__ void
+outb(unsigned short port, unsigned char val)
+{
+ __asm__ __volatile__("outb %0,%1"::"a"(val), "d"(port));
+}
+
+static __inline__ void
+outw(unsigned short port, unsigned short val)
+{
+ __asm__ __volatile__("outw %0,%1"::"a"(val), "d"(port));
+}
+
+static __inline__ void
+outl(unsigned short port, unsigned int val)
+{
+ __asm__ __volatile__("outl %0,%1"::"a"(val), "d"(port));
+}
+
+static __inline__ unsigned int
+inb(unsigned short port)
+{
+ unsigned char ret;
+ __asm__ __volatile__("inb %1,%0":"=a"(ret):"d"(port));
+
+ return ret;
+}
+
+static __inline__ unsigned int
+inw(unsigned short port)
+{
+ unsigned short ret;
+ __asm__ __volatile__("inw %1,%0":"=a"(ret):"d"(port));
+
+ return ret;
+}
+
+static __inline__ unsigned int
+inl(unsigned short port)
+{
+ unsigned int ret;
+ __asm__ __volatile__("inl %1,%0":"=a"(ret):"d"(port));
+
+ return ret;
+}
+
+#elif (defined(linux) || defined(sun) || defined(__OpenBSD__) || defined(__FreeBSD__)) && defined(__sparc__)
+
+#ifndef ASI_PL
+#define ASI_PL 0x88
+#endif
+
+static __inline__ void
+outb(unsigned long port, unsigned char val)
+{
+ __asm__ __volatile__("stba %0, [%1] %2": /* No outputs */
+ :"r"(val), "r"(port), "i"(ASI_PL));
+
+ barrier();
+}
+
+static __inline__ void
+outw(unsigned long port, unsigned short val)
+{
+ __asm__ __volatile__("stha %0, [%1] %2": /* No outputs */
+ :"r"(val), "r"(port), "i"(ASI_PL));
+
+ barrier();
+}
+
+static __inline__ void
+outl(unsigned long port, unsigned int val)
+{
+ __asm__ __volatile__("sta %0, [%1] %2": /* No outputs */
+ :"r"(val), "r"(port), "i"(ASI_PL));
+
+ barrier();
+}
+
+static __inline__ unsigned int
+inb(unsigned long port)
+{
+ unsigned int ret;
+ __asm__ __volatile__("lduba [%1] %2, %0":"=r"(ret)
+ :"r"(port), "i"(ASI_PL));
+
+ return ret;
+}
+
+static __inline__ unsigned int
+inw(unsigned long port)
+{
+ unsigned int ret;
+ __asm__ __volatile__("lduha [%1] %2, %0":"=r"(ret)
+ :"r"(port), "i"(ASI_PL));
+
+ return ret;
+}
+
+static __inline__ unsigned int
+inl(unsigned long port)
+{
+ unsigned int ret;
+ __asm__ __volatile__("lda [%1] %2, %0":"=r"(ret)
+ :"r"(port), "i"(ASI_PL));
+
+ return ret;
+}
+
+static __inline__ unsigned char
+xf86ReadMmio8(__volatile__ void *base, const unsigned long offset)
+{
+ unsigned long addr = ((unsigned long) base) + offset;
+ unsigned char ret;
+
+ __asm__ __volatile__("lduba [%1] %2, %0":"=r"(ret)
+ :"r"(addr), "i"(ASI_PL));
+
+ return ret;
+}
+
+static __inline__ unsigned short
+xf86ReadMmio16Be(__volatile__ void *base, const unsigned long offset)
+{
+ unsigned long addr = ((unsigned long) base) + offset;
+ unsigned short ret;
+
+ __asm__ __volatile__("lduh [%1], %0":"=r"(ret)
+ :"r"(addr));
+
+ return ret;
+}
+
+static __inline__ unsigned short
+xf86ReadMmio16Le(__volatile__ void *base, const unsigned long offset)
+{
+ unsigned long addr = ((unsigned long) base) + offset;
+ unsigned short ret;
+
+ __asm__ __volatile__("lduha [%1] %2, %0":"=r"(ret)
+ :"r"(addr), "i"(ASI_PL));
+
+ return ret;
+}
+
+static __inline__ unsigned int
+xf86ReadMmio32Be(__volatile__ void *base, const unsigned long offset)
+{
+ unsigned long addr = ((unsigned long) base) + offset;
+ unsigned int ret;
+
+ __asm__ __volatile__("ld [%1], %0":"=r"(ret)
+ :"r"(addr));
+
+ return ret;
+}
+
+static __inline__ unsigned int
+xf86ReadMmio32Le(__volatile__ void *base, const unsigned long offset)
+{
+ unsigned long addr = ((unsigned long) base) + offset;
+ unsigned int ret;
+
+ __asm__ __volatile__("lda [%1] %2, %0":"=r"(ret)
+ :"r"(addr), "i"(ASI_PL));
+
+ return ret;
+}
+
+static __inline__ void
+xf86WriteMmio8(__volatile__ void *base, const unsigned long offset,
+ const unsigned int val)
+{
+ unsigned long addr = ((unsigned long) base) + offset;
+
+ __asm__ __volatile__("stba %0, [%1] %2": /* No outputs */
+ :"r"(val), "r"(addr), "i"(ASI_PL));
+
+ barrier();
+}
+
+static __inline__ void
+xf86WriteMmio16Be(__volatile__ void *base, const unsigned long offset,
+ const unsigned int val)
+{
+ unsigned long addr = ((unsigned long) base) + offset;
+
+ __asm__ __volatile__("sth %0, [%1]": /* No outputs */
+ :"r"(val), "r"(addr));
+
+ barrier();
+}
+
+static __inline__ void
+xf86WriteMmio16Le(__volatile__ void *base, const unsigned long offset,
+ const unsigned int val)
+{
+ unsigned long addr = ((unsigned long) base) + offset;
+
+ __asm__ __volatile__("stha %0, [%1] %2": /* No outputs */
+ :"r"(val), "r"(addr), "i"(ASI_PL));
+
+ barrier();
+}
+
+static __inline__ void
+xf86WriteMmio32Be(__volatile__ void *base, const unsigned long offset,
+ const unsigned int val)
+{
+ unsigned long addr = ((unsigned long) base) + offset;
+
+ __asm__ __volatile__("st %0, [%1]": /* No outputs */
+ :"r"(val), "r"(addr));
+
+ barrier();
+}
+
+static __inline__ void
+xf86WriteMmio32Le(__volatile__ void *base, const unsigned long offset,
+ const unsigned int val)
+{
+ unsigned long addr = ((unsigned long) base) + offset;
+
+ __asm__ __volatile__("sta %0, [%1] %2": /* No outputs */
+ :"r"(val), "r"(addr), "i"(ASI_PL));
+
+ barrier();
+}
+
+static __inline__ void
+xf86WriteMmio8NB(__volatile__ void *base, const unsigned long offset,
+ const unsigned int val)
+{
+ unsigned long addr = ((unsigned long) base) + offset;
+
+ __asm__ __volatile__("stba %0, [%1] %2": /* No outputs */
+ :"r"(val), "r"(addr), "i"(ASI_PL));
+}
+
+static __inline__ void
+xf86WriteMmio16BeNB(__volatile__ void *base, const unsigned long offset,
+ const unsigned int val)
+{
+ unsigned long addr = ((unsigned long) base) + offset;
+
+ __asm__ __volatile__("sth %0, [%1]": /* No outputs */
+ :"r"(val), "r"(addr));
+}
+
+static __inline__ void
+xf86WriteMmio16LeNB(__volatile__ void *base, const unsigned long offset,
+ const unsigned int val)
+{
+ unsigned long addr = ((unsigned long) base) + offset;
+
+ __asm__ __volatile__("stha %0, [%1] %2": /* No outputs */
+ :"r"(val), "r"(addr), "i"(ASI_PL));
+}
+
+static __inline__ void
+xf86WriteMmio32BeNB(__volatile__ void *base, const unsigned long offset,
+ const unsigned int val)
+{
+ unsigned long addr = ((unsigned long) base) + offset;
+
+ __asm__ __volatile__("st %0, [%1]": /* No outputs */
+ :"r"(val), "r"(addr));
+}
+
+static __inline__ void
+xf86WriteMmio32LeNB(__volatile__ void *base, const unsigned long offset,
+ const unsigned int val)
+{
+ unsigned long addr = ((unsigned long) base) + offset;
+
+ __asm__ __volatile__("sta %0, [%1] %2": /* No outputs */
+ :"r"(val), "r"(addr), "i"(ASI_PL));
+}
+
+#elif defined(__mips__) || (defined(__arm32__) && !defined(__linux__))
+#ifdef __arm32__
+#define PORT_SIZE long
+#else
+#define PORT_SIZE short
+#endif
+
+_X_EXPORT unsigned int IOPortBase; /* Memory mapped I/O port area */
+
+static __inline__ void
+outb(unsigned PORT_SIZE port, unsigned char val)
+{
+ *(volatile unsigned char *) (((unsigned PORT_SIZE) (port)) + IOPortBase) =
+ val;
+}
+
+static __inline__ void
+outw(unsigned PORT_SIZE port, unsigned short val)
+{
+ *(volatile unsigned short *) (((unsigned PORT_SIZE) (port)) + IOPortBase) =
+ val;
+}
+
+static __inline__ void
+outl(unsigned PORT_SIZE port, unsigned int val)
+{
+ *(volatile unsigned int *) (((unsigned PORT_SIZE) (port)) + IOPortBase) =
+ val;
+}
+
+static __inline__ unsigned int
+inb(unsigned PORT_SIZE port)
+{
+ return *(volatile unsigned char *) (((unsigned PORT_SIZE) (port)) +
+ IOPortBase);
+}
+
+static __inline__ unsigned int
+inw(unsigned PORT_SIZE port)
+{
+ return *(volatile unsigned short *) (((unsigned PORT_SIZE) (port)) +
+ IOPortBase);
+}
+
+static __inline__ unsigned int
+inl(unsigned PORT_SIZE port)
+{
+ return *(volatile unsigned int *) (((unsigned PORT_SIZE) (port)) +
+ IOPortBase);
+}
+
+#if defined(__mips__)
+#ifdef linux /* don't mess with other OSs */
+#if X_BYTE_ORDER == X_BIG_ENDIAN
+static __inline__ unsigned int
+xf86ReadMmio32Be(__volatile__ void *base, const unsigned long offset)
+{
+ unsigned long addr = ((unsigned long) base) + offset;
+ unsigned int ret;
+
+ __asm__ __volatile__("lw %0, 0(%1)":"=r"(ret)
+ :"r"(addr));
+
+ return ret;
+}
+
+static __inline__ void
+xf86WriteMmio32Be(__volatile__ void *base, const unsigned long offset,
+ const unsigned int val)
+{
+ unsigned long addr = ((unsigned long) base) + offset;
+
+ __asm__ __volatile__("sw %0, 0(%1)": /* No outputs */
+ :"r"(val), "r"(addr));
+}
+#endif
+#endif /* !linux */
+#endif /* __mips__ */
+
+#elif (defined(linux) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)) && defined(__powerpc__)
+
+#ifndef MAP_FAILED
+#define MAP_FAILED ((void *)-1)
+#endif
+
+extern _X_EXPORT volatile unsigned char *ioBase;
+
+static __inline__ unsigned char
+xf86ReadMmio8(__volatile__ void *base, const unsigned long offset)
+{
+ register unsigned char val;
+ __asm__ __volatile__("lbzx %0,%1,%2\n\t" "eieio":"=r"(val)
+ :"b"(base), "r"(offset),
+ "m"(*((volatile unsigned char *) base + offset)));
+ return val;
+}
+
+static __inline__ unsigned short
+xf86ReadMmio16Be(__volatile__ void *base, const unsigned long offset)
+{
+ register unsigned short val;
+ __asm__ __volatile__("lhzx %0,%1,%2\n\t" "eieio":"=r"(val)
+ :"b"(base), "r"(offset),
+ "m"(*((volatile unsigned char *) base + offset)));
+ return val;
+}
+
+static __inline__ unsigned short
+xf86ReadMmio16Le(__volatile__ void *base, const unsigned long offset)
+{
+ register unsigned short val;
+ __asm__ __volatile__("lhbrx %0,%1,%2\n\t" "eieio":"=r"(val)
+ :"b"(base), "r"(offset),
+ "m"(*((volatile unsigned char *) base + offset)));
+ return val;
+}
+
+static __inline__ unsigned int
+xf86ReadMmio32Be(__volatile__ void *base, const unsigned long offset)
+{
+ register unsigned int val;
+ __asm__ __volatile__("lwzx %0,%1,%2\n\t" "eieio":"=r"(val)
+ :"b"(base), "r"(offset),
+ "m"(*((volatile unsigned char *) base + offset)));
+ return val;
+}
+
+static __inline__ unsigned int
+xf86ReadMmio32Le(__volatile__ void *base, const unsigned long offset)
+{
+ register unsigned int val;
+ __asm__ __volatile__("lwbrx %0,%1,%2\n\t" "eieio":"=r"(val)
+ :"b"(base), "r"(offset),
+ "m"(*((volatile unsigned char *) base + offset)));
+ return val;
+}
+
+static __inline__ void
+xf86WriteMmioNB8(__volatile__ void *base, const unsigned long offset,
+ const unsigned char val)
+{
+ __asm__
+ __volatile__("stbx %1,%2,%3\n\t":"=m"
+ (*((volatile unsigned char *) base + offset))
+ :"r"(val), "b"(base), "r"(offset));
+}
+
+static __inline__ void
+xf86WriteMmioNB16Le(__volatile__ void *base, const unsigned long offset,
+ const unsigned short val)
+{
+ __asm__
+ __volatile__("sthbrx %1,%2,%3\n\t":"=m"
+ (*((volatile unsigned char *) base + offset))
+ :"r"(val), "b"(base), "r"(offset));
+}
+
+static __inline__ void
+xf86WriteMmioNB16Be(__volatile__ void *base, const unsigned long offset,
+ const unsigned short val)
+{
+ __asm__
+ __volatile__("sthx %1,%2,%3\n\t":"=m"
+ (*((volatile unsigned char *) base + offset))
+ :"r"(val), "b"(base), "r"(offset));
+}
+
+static __inline__ void
+xf86WriteMmioNB32Le(__volatile__ void *base, const unsigned long offset,
+ const unsigned int val)
+{
+ __asm__
+ __volatile__("stwbrx %1,%2,%3\n\t":"=m"
+ (*((volatile unsigned char *) base + offset))
+ :"r"(val), "b"(base), "r"(offset));
+}
+
+static __inline__ void
+xf86WriteMmioNB32Be(__volatile__ void *base, const unsigned long offset,
+ const unsigned int val)
+{
+ __asm__
+ __volatile__("stwx %1,%2,%3\n\t":"=m"
+ (*((volatile unsigned char *) base + offset))
+ :"r"(val), "b"(base), "r"(offset));
+}
+
+static __inline__ void
+xf86WriteMmio8(__volatile__ void *base, const unsigned long offset,
+ const unsigned char val)
+{
+ xf86WriteMmioNB8(base, offset, val);
+ eieio();
+}
+
+static __inline__ void
+xf86WriteMmio16Le(__volatile__ void *base, const unsigned long offset,
+ const unsigned short val)
+{
+ xf86WriteMmioNB16Le(base, offset, val);
+ eieio();
+}
+
+static __inline__ void
+xf86WriteMmio16Be(__volatile__ void *base, const unsigned long offset,
+ const unsigned short val)
+{
+ xf86WriteMmioNB16Be(base, offset, val);
+ eieio();
+}
+
+static __inline__ void
+xf86WriteMmio32Le(__volatile__ void *base, const unsigned long offset,
+ const unsigned int val)
+{
+ xf86WriteMmioNB32Le(base, offset, val);
+ eieio();
+}
+
+static __inline__ void
+xf86WriteMmio32Be(__volatile__ void *base, const unsigned long offset,
+ const unsigned int val)
+{
+ xf86WriteMmioNB32Be(base, offset, val);
+ eieio();
+}
+
+static __inline__ void
+outb(unsigned short port, unsigned char value)
+{
+ if (ioBase == MAP_FAILED)
+ return;
+ xf86WriteMmio8((void *) ioBase, port, value);
+}
+
+static __inline__ void
+outw(unsigned short port, unsigned short value)
+{
+ if (ioBase == MAP_FAILED)
+ return;
+ xf86WriteMmio16Le((void *) ioBase, port, value);
+}
+
+static __inline__ void
+outl(unsigned short port, unsigned int value)
+{
+ if (ioBase == MAP_FAILED)
+ return;
+ xf86WriteMmio32Le((void *) ioBase, port, value);
+}
+
+static __inline__ unsigned int
+inb(unsigned short port)
+{
+ if (ioBase == MAP_FAILED)
+ return 0;
+ return xf86ReadMmio8((void *) ioBase, port);
+}
+
+static __inline__ unsigned int
+inw(unsigned short port)
+{
+ if (ioBase == MAP_FAILED)
+ return 0;
+ return xf86ReadMmio16Le((void *) ioBase, port);
+}
+
+static __inline__ unsigned int
+inl(unsigned short port)
+{
+ if (ioBase == MAP_FAILED)
+ return 0;
+ return xf86ReadMmio32Le((void *) ioBase, port);
+}
+
+#elif defined(__arm__) && defined(__linux__)
+
+/* for Linux on ARM, we use the LIBC inx/outx routines */
+/* note that the appropriate setup via "ioperm" needs to be done */
+/* *before* any inx/outx is done. */
+
+#include <sys/io.h>
+
+static __inline__ void
+xf_outb(unsigned short port, unsigned char val)
+{
+ outb(val, port);
+}
+
+static __inline__ void
+xf_outw(unsigned short port, unsigned short val)
+{
+ outw(val, port);
+}
+
+static __inline__ void
+xf_outl(unsigned short port, unsigned int val)
+{
+ outl(val, port);
+}
+
+#define outb xf_outb
+#define outw xf_outw
+#define outl xf_outl
+
+#elif defined(__nds32__)
+
+/*
+ * Assume all port access are aligned. We need to revise this implementation
+ * if there is unaligned port access. For ldq_u, ldl_u, ldw_u, stq_u, stl_u and
+ * stw_u, they are assumed unaligned.
+ */
+
+#define barrier() /* no barrier */
+
+#define PORT_SIZE long
+
+static __inline__ unsigned char
+xf86ReadMmio8(__volatile__ void *base, const unsigned long offset)
+{
+ return *(volatile unsigned char *) ((unsigned char *) base + offset);
+}
+
+static __inline__ void
+xf86WriteMmio8(__volatile__ void *base, const unsigned long offset,
+ const unsigned int val)
+{
+ *(volatile unsigned char *) ((unsigned char *) base + offset) = val;
+ barrier();
+}
+
+static __inline__ void
+xf86WriteMmio8NB(__volatile__ void *base, const unsigned long offset,
+ const unsigned int val)
+{
+ *(volatile unsigned char *) ((unsigned char *) base + offset) = val;
+}
+
+static __inline__ unsigned short
+xf86ReadMmio16Swap(__volatile__ void *base, const unsigned long offset)
+{
+ unsigned long addr = ((unsigned long) base) + offset;
+ unsigned short ret;
+
+ __asm__ __volatile__("lhi %0, [%1];\n\t" "wsbh %0, %0;\n\t":"=r"(ret)
+ :"r"(addr));
+
+ return ret;
+}
+
+static __inline__ unsigned short
+xf86ReadMmio16(__volatile__ void *base, const unsigned long offset)
+{
+ return *(volatile unsigned short *) ((char *) base + offset);
+}
+
+static __inline__ void
+xf86WriteMmio16Swap(__volatile__ void *base, const unsigned long offset,
+ const unsigned int val)
+{
+ unsigned long addr = ((unsigned long) base) + offset;
+
+ __asm__ __volatile__("wsbh %0, %0;\n\t" "shi %0, [%1];\n\t": /* No outputs */
+ :"r"(val), "r"(addr));
+
+ barrier();
+}
+
+static __inline__ void
+xf86WriteMmio16(__volatile__ void *base, const unsigned long offset,
+ const unsigned int val)
+{
+ *(volatile unsigned short *) ((unsigned char *) base + offset) = val;
+ barrier();
+}
+
+static __inline__ void
+xf86WriteMmio16SwapNB(__volatile__ void *base, const unsigned long offset,
+ const unsigned int val)
+{
+ unsigned long addr = ((unsigned long) base) + offset;
+
+ __asm__ __volatile__("wsbh %0, %0;\n\t" "shi %0, [%1];\n\t": /* No outputs */
+ :"r"(val), "r"(addr));
+}
+
+static __inline__ void
+xf86WriteMmio16NB(__volatile__ void *base, const unsigned long offset,
+ const unsigned int val)
+{
+ *(volatile unsigned short *) ((unsigned char *) base + offset) = val;
+}
+
+static __inline__ unsigned int
+xf86ReadMmio32Swap(__volatile__ void *base, const unsigned long offset)
+{
+ unsigned long addr = ((unsigned long) base) + offset;
+ unsigned int ret;
+
+ __asm__ __volatile__("lwi %0, [%1];\n\t"
+ "wsbh %0, %0;\n\t" "rotri %0, %0, 16;\n\t":"=r"(ret)
+ :"r"(addr));
+
+ return ret;
+}
+
+static __inline__ unsigned int
+xf86ReadMmio32(__volatile__ void *base, const unsigned long offset)
+{
+ return *(volatile unsigned int *) ((unsigned char *) base + offset);
+}
+
+static __inline__ void
+xf86WriteMmio32Swap(__volatile__ void *base, const unsigned long offset,
+ const unsigned int val)
+{
+ unsigned long addr = ((unsigned long) base) + offset;
+
+ __asm__ __volatile__("wsbh %0, %0;\n\t" "rotri %0, %0, 16;\n\t" "swi %0, [%1];\n\t": /* No outputs */
+ :"r"(val), "r"(addr));
+
+ barrier();
+}
+
+static __inline__ void
+xf86WriteMmio32(__volatile__ void *base, const unsigned long offset,
+ const unsigned int val)
+{
+ *(volatile unsigned int *) ((unsigned char *) base + offset) = val;
+ barrier();
+}
+
+static __inline__ void
+xf86WriteMmio32SwapNB(__volatile__ void *base, const unsigned long offset,
+ const unsigned int val)
+{
+ unsigned long addr = ((unsigned long) base) + offset;
+
+ __asm__ __volatile__("wsbh %0, %0;\n\t" "rotri %0, %0, 16;\n\t" "swi %0, [%1];\n\t": /* No outputs */
+ :"r"(val), "r"(addr));
+}
+
+static __inline__ void
+xf86WriteMmio32NB(__volatile__ void *base, const unsigned long offset,
+ const unsigned int val)
+{
+ *(volatile unsigned int *) ((unsigned char *) base + offset) = val;
+}
+
+#if defined(NDS32_MMIO_SWAP)
+static __inline__ void
+outb(unsigned PORT_SIZE port, unsigned char val)
+{
+ xf86WriteMmio8(IOPortBase, port, val);
+}
+
+static __inline__ void
+outw(unsigned PORT_SIZE port, unsigned short val)
+{
+ xf86WriteMmio16Swap(IOPortBase, port, val);
+}
+
+static __inline__ void
+outl(unsigned PORT_SIZE port, unsigned int val)
+{
+ xf86WriteMmio32Swap(IOPortBase, port, val);
+}
+
+static __inline__ unsigned int
+inb(unsigned PORT_SIZE port)
+{
+ return xf86ReadMmio8(IOPortBase, port);
+}
+
+static __inline__ unsigned int
+inw(unsigned PORT_SIZE port)
+{
+ return xf86ReadMmio16Swap(IOPortBase, port);
+}
+
+static __inline__ unsigned int
+inl(unsigned PORT_SIZE port)
+{
+ return xf86ReadMmio32Swap(IOPortBase, port);
+}
+
+static __inline__ unsigned long
+ldq_u(unsigned long *p)
+{
+ unsigned long addr = (unsigned long) p;
+ unsigned int ret;
+
+ __asm__ __volatile__("lmw.bi %0, [%1], %0, 0;\n\t"
+ "wsbh %0, %0;\n\t" "rotri %0, %0, 16;\n\t":"=r"(ret)
+ :"r"(addr));
+
+ return ret;
+}
+
+static __inline__ unsigned long
+ldl_u(unsigned int *p)
+{
+ unsigned long addr = (unsigned long) p;
+ unsigned int ret;
+
+ __asm__ __volatile__("lmw.bi %0, [%1], %0, 0;\n\t"
+ "wsbh %0, %0;\n\t" "rotri %0, %0, 16;\n\t":"=r"(ret)
+ :"r"(addr));
+
+ return ret;
+}
+
+static __inline__ void
+stq_u(unsigned long val, unsigned long *p)
+{
+ unsigned long addr = (unsigned long) p;
+
+ __asm__ __volatile__("wsbh %0, %0;\n\t" "rotri %0, %0, 16;\n\t" "smw.bi %0, [%1], %0, 0;\n\t": /* No outputs */
+ :"r"(val), "r"(addr));
+}
+
+static __inline__ void
+stl_u(unsigned long val, unsigned int *p)
+{
+ unsigned long addr = (unsigned long) p;
+
+ __asm__ __volatile__("wsbh %0, %0;\n\t" "rotri %0, %0, 16;\n\t" "smw.bi %0, [%1], %0, 0;\n\t": /* No outputs */
+ :"r"(val), "r"(addr));
+}
+
+#else /* !NDS32_MMIO_SWAP */
+static __inline__ void
+outb(unsigned PORT_SIZE port, unsigned char val)
+{
+ *(volatile unsigned char *) (((unsigned PORT_SIZE) (port))) = val;
+ barrier();
+}
+
+static __inline__ void
+outw(unsigned PORT_SIZE port, unsigned short val)
+{
+ *(volatile unsigned short *) (((unsigned PORT_SIZE) (port))) = val;
+ barrier();
+}
+
+static __inline__ void
+outl(unsigned PORT_SIZE port, unsigned int val)
+{
+ *(volatile unsigned int *) (((unsigned PORT_SIZE) (port))) = val;
+ barrier();
+}
+
+static __inline__ unsigned int
+inb(unsigned PORT_SIZE port)
+{
+ return *(volatile unsigned char *) (((unsigned PORT_SIZE) (port)));
+}
+
+static __inline__ unsigned int
+inw(unsigned PORT_SIZE port)
+{
+ return *(volatile unsigned short *) (((unsigned PORT_SIZE) (port)));
+}
+
+static __inline__ unsigned int
+inl(unsigned PORT_SIZE port)
+{
+ return *(volatile unsigned int *) (((unsigned PORT_SIZE) (port)));
+}
+
+static __inline__ unsigned long
+ldq_u(unsigned long *p)
+{
+ unsigned long addr = (unsigned long) p;
+ unsigned int ret;
+
+ __asm__ __volatile__("lmw.bi %0, [%1], %0, 0;\n\t":"=r"(ret)
+ :"r"(addr));
+
+ return ret;
+}
+
+static __inline__ unsigned long
+ldl_u(unsigned int *p)
+{
+ unsigned long addr = (unsigned long) p;
+ unsigned int ret;
+
+ __asm__ __volatile__("lmw.bi %0, [%1], %0, 0;\n\t":"=r"(ret)
+ :"r"(addr));
+
+ return ret;
+}
+
+static __inline__ void
+stq_u(unsigned long val, unsigned long *p)
+{
+ unsigned long addr = (unsigned long) p;
+
+ __asm__ __volatile__("smw.bi %0, [%1], %0, 0;\n\t": /* No outputs */
+ :"r"(val), "r"(addr));
+}
+
+static __inline__ void
+stl_u(unsigned long val, unsigned int *p)
+{
+ unsigned long addr = (unsigned long) p;
+
+ __asm__ __volatile__("smw.bi %0, [%1], %0, 0;\n\t": /* No outputs */
+ :"r"(val), "r"(addr));
+}
+#endif /* NDS32_MMIO_SWAP */
+
+#if (((X_BYTE_ORDER == X_BIG_ENDIAN) && !defined(NDS32_MMIO_SWAP)) || ((X_BYTE_ORDER != X_BIG_ENDIAN) && defined(NDS32_MMIO_SWAP)))
+#define ldw_u(p) ((*(unsigned char *)(p)) << 8 | \
+ (*((unsigned char *)(p)+1)))
+#define stw_u(v,p) (*(unsigned char *)(p)) = ((v) >> 8); \
+ (*((unsigned char *)(p)+1)) = (v)
+#else
+#define ldw_u(p) ((*(unsigned char *)(p)) | \
+ (*((unsigned char *)(p)+1)<<8))
+#define stw_u(v,p) (*(unsigned char *)(p)) = (v); \
+ (*((unsigned char *)(p)+1)) = ((v) >> 8)
+#endif
+
+#define mem_barrier() /* XXX: nop for now */
+#define write_mem_barrier() /* XXX: nop for now */
+
+#else /* ix86 */
+
+#if !defined(__SUNPRO_C)
+#if !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__m32r__) && !defined(__aarch64__)
+#ifdef GCCUSESGAS
+
+/*
+ * If gcc uses gas rather than the native assembler, the syntax of these
+ * inlines has to be different. DHD
+ */
+
+static __inline__ void
+outb(unsigned short port, unsigned char val)
+{
+ __asm__ __volatile__("outb %0,%1"::"a"(val), "d"(port));
+}
+
+static __inline__ void
+outw(unsigned short port, unsigned short val)
+{
+ __asm__ __volatile__("outw %0,%1"::"a"(val), "d"(port));
+}
+
+static __inline__ void
+outl(unsigned short port, unsigned int val)
+{
+ __asm__ __volatile__("outl %0,%1"::"a"(val), "d"(port));
+}
+
+static __inline__ unsigned int
+inb(unsigned short port)
+{
+ unsigned char ret;
+ __asm__ __volatile__("inb %1,%0":"=a"(ret):"d"(port));
+
+ return ret;
+}
+
+static __inline__ unsigned int
+inw(unsigned short port)
+{
+ unsigned short ret;
+ __asm__ __volatile__("inw %1,%0":"=a"(ret):"d"(port));
+
+ return ret;
+}
+
+static __inline__ unsigned int
+inl(unsigned short port)
+{
+ unsigned int ret;
+ __asm__ __volatile__("inl %1,%0":"=a"(ret):"d"(port));
+
+ return ret;
+}
+
+#else /* GCCUSESGAS */
+
+static __inline__ void
+outb(unsigned short port, unsigned char val)
+{
+ __asm__ __volatile__("out%B0 (%1)"::"a"(val), "d"(port));
+}
+
+static __inline__ void
+outw(unsigned short port, unsigned short val)
+{
+ __asm__ __volatile__("out%W0 (%1)"::"a"(val), "d"(port));
+}
+
+static __inline__ void
+outl(unsigned short port, unsigned int val)
+{
+ __asm__ __volatile__("out%L0 (%1)"::"a"(val), "d"(port));
+}
+
+static __inline__ unsigned int
+inb(unsigned short port)
+{
+ unsigned char ret;
+ __asm__ __volatile__("in%B0 (%1)":"=a"(ret):"d"(port));
+
+ return ret;
+}
+
+static __inline__ unsigned int
+inw(unsigned short port)
+{
+ unsigned short ret;
+ __asm__ __volatile__("in%W0 (%1)":"=a"(ret):"d"(port));
+
+ return ret;
+}
+
+static __inline__ unsigned int
+inl(unsigned short port)
+{
+ unsigned int ret;
+ __asm__ __volatile__("in%L0 (%1)":"=a"(ret):"d"(port));
+
+ return ret;
+}
+
+#endif /* GCCUSESGAS */
+
+#else /* !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__) && !defined(__m32r__) */
+
+static __inline__ void
+outb(unsigned short port, unsigned char val)
+{
+}
+
+static __inline__ void
+outw(unsigned short port, unsigned short val)
+{
+}
+
+static __inline__ void
+outl(unsigned short port, unsigned int val)
+{
+}
+
+static __inline__ unsigned int
+inb(unsigned short port)
+{
+ return 0;
+}
+
+static __inline__ unsigned int
+inw(unsigned short port)
+{
+ return 0;
+}
+
+static __inline__ unsigned int
+inl(unsigned short port)
+{
+ return 0;
+}
+
+#endif /* FAKEIT */
+#endif /* __SUNPRO_C */
+
+#endif /* ix86 */
+
+#else /* !GNUC */
+#if defined(__STDC__) && (__STDC__ == 1)
+#ifndef asm
+#define asm __asm
+#endif
+#endif
+#if !defined(__SUNPRO_C)
+#include <sys/inline.h>
+#endif
+#if !defined(__HIGHC__) && !defined(__SUNPRO_C) || \
+ defined(__USLC__)
+#pragma asm partial_optimization outl
+#pragma asm partial_optimization outw
+#pragma asm partial_optimization outb
+#pragma asm partial_optimization inl
+#pragma asm partial_optimization inw
+#pragma asm partial_optimization inb
+#endif
+#endif /* __GNUC__ */
+
+#endif /* NO_INLINE */
+
+#ifdef __alpha__
+/* entry points for Mmio memory access routines */
+extern _X_EXPORT int (*xf86ReadMmio8) (void *, unsigned long);
+extern _X_EXPORT int (*xf86ReadMmio16) (void *, unsigned long);
+
+#ifndef STANDALONE_MMIO
+extern _X_EXPORT int (*xf86ReadMmio32) (void *, unsigned long);
+#else
+/* Some DRI 3D drivers need MMIO_IN32. */
+static __inline__ int
+xf86ReadMmio32(void *Base, unsigned long Offset)
+{
+ mem_barrier();
+ return *(volatile unsigned int *) ((unsigned long) Base + (Offset));
+}
+#endif
+extern _X_EXPORT void (*xf86WriteMmio8) (int, void *, unsigned long);
+extern _X_EXPORT void (*xf86WriteMmio16) (int, void *, unsigned long);
+extern _X_EXPORT void (*xf86WriteMmio32) (int, void *, unsigned long);
+extern _X_EXPORT void (*xf86WriteMmioNB8) (int, void *, unsigned long);
+extern _X_EXPORT void (*xf86WriteMmioNB16) (int, void *, unsigned long);
+extern _X_EXPORT void (*xf86WriteMmioNB32) (int, void *, unsigned long);
+extern _X_EXPORT void xf86SlowBCopyFromBus(unsigned char *, unsigned char *,
+ int);
+extern _X_EXPORT void xf86SlowBCopyToBus(unsigned char *, unsigned char *, int);
+
+/* Some macros to hide the system dependencies for MMIO accesses */
+/* Changed to kill noise generated by gcc's -Wcast-align */
+#define MMIO_IN8(base, offset) (*xf86ReadMmio8)(base, offset)
+#define MMIO_IN16(base, offset) (*xf86ReadMmio16)(base, offset)
+#ifndef STANDALONE_MMIO
+#define MMIO_IN32(base, offset) (*xf86ReadMmio32)(base, offset)
+#else
+#define MMIO_IN32(base, offset) xf86ReadMmio32(base, offset)
+#endif
+
+#define MMIO_OUT32(base, offset, val) \
+ do { \
+ write_mem_barrier(); \
+ *(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset)) = (val); \
+ } while (0)
+#define MMIO_ONB32(base, offset, val) \
+ *(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset)) = (val)
+
+#define MMIO_OUT8(base, offset, val) \
+ (*xf86WriteMmio8)((CARD8)(val), base, offset)
+#define MMIO_OUT16(base, offset, val) \
+ (*xf86WriteMmio16)((CARD16)(val), base, offset)
+#define MMIO_ONB8(base, offset, val) \
+ (*xf86WriteMmioNB8)((CARD8)(val), base, offset)
+#define MMIO_ONB16(base, offset, val) \
+ (*xf86WriteMmioNB16)((CARD16)(val), base, offset)
+#define MMIO_MOVE32(base, offset, val) \
+ MMIO_OUT32(base, offset, val)
+
+#elif defined(__powerpc__)
+ /*
+ * we provide byteswapping and no byteswapping functions here
+ * with byteswapping as default,
+ * drivers that don't need byteswapping should define PPC_MMIO_IS_BE
+ */
+#define MMIO_IN8(base, offset) xf86ReadMmio8(base, offset)
+#define MMIO_OUT8(base, offset, val) \
+ xf86WriteMmio8(base, offset, (CARD8)(val))
+#define MMIO_ONB8(base, offset, val) \
+ xf86WriteMmioNB8(base, offset, (CARD8)(val))
+
+#if defined(PPC_MMIO_IS_BE) /* No byteswapping */
+#define MMIO_IN16(base, offset) xf86ReadMmio16Be(base, offset)
+#define MMIO_IN32(base, offset) xf86ReadMmio32Be(base, offset)
+#define MMIO_OUT16(base, offset, val) \
+ xf86WriteMmio16Be(base, offset, (CARD16)(val))
+#define MMIO_OUT32(base, offset, val) \
+ xf86WriteMmio32Be(base, offset, (CARD32)(val))
+#define MMIO_ONB16(base, offset, val) \
+ xf86WriteMmioNB16Be(base, offset, (CARD16)(val))
+#define MMIO_ONB32(base, offset, val) \
+ xf86WriteMmioNB32Be(base, offset, (CARD32)(val))
+#else /* byteswapping is the default */
+#define MMIO_IN16(base, offset) xf86ReadMmio16Le(base, offset)
+#define MMIO_IN32(base, offset) xf86ReadMmio32Le(base, offset)
+#define MMIO_OUT16(base, offset, val) \
+ xf86WriteMmio16Le(base, offset, (CARD16)(val))
+#define MMIO_OUT32(base, offset, val) \
+ xf86WriteMmio32Le(base, offset, (CARD32)(val))
+#define MMIO_ONB16(base, offset, val) \
+ xf86WriteMmioNB16Le(base, offset, (CARD16)(val))
+#define MMIO_ONB32(base, offset, val) \
+ xf86WriteMmioNB32Le(base, offset, (CARD32)(val))
+#endif
+
+#define MMIO_MOVE32(base, offset, val) \
+ xf86WriteMmio32Be(base, offset, (CARD32)(val))
+
+#elif defined(__sparc__) || defined(sparc) || defined(__sparc)
+ /*
+ * Like powerpc, we provide byteswapping and no byteswapping functions
+ * here with byteswapping as default, drivers that don't need byteswapping
+ * should define SPARC_MMIO_IS_BE (perhaps create a generic macro so that we
+ * do not need to use PPC_MMIO_IS_BE and the sparc one in all the same places
+ * of drivers?).
+ */
+#define MMIO_IN8(base, offset) xf86ReadMmio8(base, offset)
+#define MMIO_OUT8(base, offset, val) \
+ xf86WriteMmio8(base, offset, (CARD8)(val))
+#define MMIO_ONB8(base, offset, val) \
+ xf86WriteMmio8NB(base, offset, (CARD8)(val))
+
+#if defined(SPARC_MMIO_IS_BE) /* No byteswapping */
+#define MMIO_IN16(base, offset) xf86ReadMmio16Be(base, offset)
+#define MMIO_IN32(base, offset) xf86ReadMmio32Be(base, offset)
+#define MMIO_OUT16(base, offset, val) \
+ xf86WriteMmio16Be(base, offset, (CARD16)(val))
+#define MMIO_OUT32(base, offset, val) \
+ xf86WriteMmio32Be(base, offset, (CARD32)(val))
+#define MMIO_ONB16(base, offset, val) \
+ xf86WriteMmio16BeNB(base, offset, (CARD16)(val))
+#define MMIO_ONB32(base, offset, val) \
+ xf86WriteMmio32BeNB(base, offset, (CARD32)(val))
+#else /* byteswapping is the default */
+#define MMIO_IN16(base, offset) xf86ReadMmio16Le(base, offset)
+#define MMIO_IN32(base, offset) xf86ReadMmio32Le(base, offset)
+#define MMIO_OUT16(base, offset, val) \
+ xf86WriteMmio16Le(base, offset, (CARD16)(val))
+#define MMIO_OUT32(base, offset, val) \
+ xf86WriteMmio32Le(base, offset, (CARD32)(val))
+#define MMIO_ONB16(base, offset, val) \
+ xf86WriteMmio16LeNB(base, offset, (CARD16)(val))
+#define MMIO_ONB32(base, offset, val) \
+ xf86WriteMmio32LeNB(base, offset, (CARD32)(val))
+#endif
+
+#define MMIO_MOVE32(base, offset, val) \
+ xf86WriteMmio32Be(base, offset, (CARD32)(val))
+
+#elif defined(__nds32__)
+ /*
+ * we provide byteswapping and no byteswapping functions here
+ * with no byteswapping as default; when endianness of CPU core
+ * and I/O devices don't match, byte swapping is necessary
+ * drivers that need byteswapping should define NDS32_MMIO_SWAP
+ */
+#define MMIO_IN8(base, offset) xf86ReadMmio8(base, offset)
+#define MMIO_OUT8(base, offset, val) \
+ xf86WriteMmio8(base, offset, (CARD8)(val))
+#define MMIO_ONB8(base, offset, val) \
+ xf86WriteMmioNB8(base, offset, (CARD8)(val))
+
+#if defined(NDS32_MMIO_SWAP) /* byteswapping */
+#define MMIO_IN16(base, offset) xf86ReadMmio16Swap(base, offset)
+#define MMIO_IN32(base, offset) xf86ReadMmio32Swap(base, offset)
+#define MMIO_OUT16(base, offset, val) \
+ xf86WriteMmio16Swap(base, offset, (CARD16)(val))
+#define MMIO_OUT32(base, offset, val) \
+ xf86WriteMmio32Swap(base, offset, (CARD32)(val))
+#define MMIO_ONB16(base, offset, val) \
+ xf86WriteMmioNB16Swap(base, offset, (CARD16)(val))
+#define MMIO_ONB32(base, offset, val) \
+ xf86WriteMmioNB32Swap(base, offset, (CARD32)(val))
+#else /* no byteswapping is the default */
+#define MMIO_IN16(base, offset) xf86ReadMmio16(base, offset)
+#define MMIO_IN32(base, offset) xf86ReadMmio32(base, offset)
+#define MMIO_OUT16(base, offset, val) \
+ xf86WriteMmio16(base, offset, (CARD16)(val))
+#define MMIO_OUT32(base, offset, val) \
+ xf86WriteMmio32(base, offset, (CARD32)(val))
+#define MMIO_ONB16(base, offset, val) \
+ xf86WriteMmioNB16(base, offset, (CARD16)(val))
+#define MMIO_ONB32(base, offset, val) \
+ xf86WriteMmioNB32(base, offset, (CARD32)(val))
+#endif
+
+#define MMIO_MOVE32(base, offset, val) \
+ xf86WriteMmio32(base, offset, (CARD32)(val))
+
+#ifdef N1213_HC /* for NDS32 N1213 hardcore */
+static __inline__ void
+nds32_flush_icache(char *addr)
+{
+ __asm__ volatile ("isync %0;"
+ "msync;"
+ "isb;"
+ "cctl %0,L1I_VA_INVAL;" "isb;"::"r" (addr):"memory");
+}
+#else
+static __inline__ void
+nds32_flush_icache(char *addr)
+{
+ __asm__ volatile ("isync %0;" "isb;"::"r" (addr):"memory");
+}
+#endif
+
+#else /* !__alpha__ && !__powerpc__ && !__sparc__ */
+
+#define MMIO_IN8(base, offset) \
+ *(volatile CARD8 *)(((CARD8*)(base)) + (offset))
+#define MMIO_IN16(base, offset) \
+ *(volatile CARD16 *)(void *)(((CARD8*)(base)) + (offset))
+#define MMIO_IN32(base, offset) \
+ *(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset))
+#define MMIO_OUT8(base, offset, val) \
+ *(volatile CARD8 *)(((CARD8*)(base)) + (offset)) = (val)
+#define MMIO_OUT16(base, offset, val) \
+ *(volatile CARD16 *)(void *)(((CARD8*)(base)) + (offset)) = (val)
+#define MMIO_OUT32(base, offset, val) \
+ *(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset)) = (val)
+#define MMIO_ONB8(base, offset, val) MMIO_OUT8(base, offset, val)
+#define MMIO_ONB16(base, offset, val) MMIO_OUT16(base, offset, val)
+#define MMIO_ONB32(base, offset, val) MMIO_OUT32(base, offset, val)
+
+#define MMIO_MOVE32(base, offset, val) MMIO_OUT32(base, offset, val)
+
+#endif /* __alpha__ */
+
+/*
+ * With Intel, the version in os-support/misc/SlowBcopy.s is used.
+ * This avoids port I/O during the copy (which causes problems with
+ * some hardware).
+ */
+#ifdef __alpha__
+#define slowbcopy_tobus(src,dst,count) xf86SlowBCopyToBus(src,dst,count)
+#define slowbcopy_frombus(src,dst,count) xf86SlowBCopyFromBus(src,dst,count)
+#else /* __alpha__ */
+#define slowbcopy_tobus(src,dst,count) xf86SlowBcopy(src,dst,count)
+#define slowbcopy_frombus(src,dst,count) xf86SlowBcopy(src,dst,count)
+#endif /* __alpha__ */
+
+#endif /* _COMPILER_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/compositeext.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/compositeext.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/compositeext.h (working copy)
@@ -0,0 +1,40 @@
+/*
+ * Copyright © 2009 NVIDIA Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifndef _COMPOSITEEXT_H_
+#define _COMPOSITEEXT_H_
+
+#include "misc.h"
+#include "scrnintstr.h"
+
+extern _X_EXPORT Bool CompositeRegisterAlternateVisuals(ScreenPtr pScreen,
+ VisualID * vids,
+ int nVisuals);
+
+extern _X_EXPORT RESTYPE CompositeClientWindowType;
+
+#endif /* _COMPOSITEEXT_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/cursor.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/cursor.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/cursor.h (working copy)
@@ -0,0 +1,136 @@
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef CURSOR_H
+#define CURSOR_H
+
+#include "misc.h"
+#include "screenint.h"
+#include "window.h"
+#include "privates.h"
+
+#define NullCursor ((CursorPtr)NULL)
+
+/* Provide support for alpha composited cursors */
+#define ARGB_CURSOR
+
+struct _DeviceIntRec;
+
+typedef struct _Cursor *CursorPtr;
+typedef struct _CursorMetric *CursorMetricPtr;
+
+extern _X_EXPORT DevScreenPrivateKeyRec cursorScreenDevPriv;
+
+#define CursorScreenKey (&cursorScreenDevPriv)
+
+extern _X_EXPORT CursorPtr rootCursor;
+
+extern _X_EXPORT int FreeCursor(void */*pCurs */ ,
+ XID /*cid */ );
+
+extern _X_EXPORT CursorPtr RefCursor(CursorPtr /* cursor */);
+extern _X_EXPORT CursorPtr UnrefCursor(CursorPtr /* cursor */);
+extern _X_EXPORT int CursorRefCount(const CursorPtr /* cursor */);
+
+extern _X_EXPORT int AllocARGBCursor(unsigned char * /*psrcbits */ ,
+ unsigned char * /*pmaskbits */ ,
+ CARD32 * /*argb */ ,
+ CursorMetricPtr /*cm */ ,
+ unsigned /*foreRed */ ,
+ unsigned /*foreGreen */ ,
+ unsigned /*foreBlue */ ,
+ unsigned /*backRed */ ,
+ unsigned /*backGreen */ ,
+ unsigned /*backBlue */ ,
+ CursorPtr * /*ppCurs */ ,
+ ClientPtr /*client */ ,
+ XID /*cid */ );
+
+extern _X_EXPORT int AllocGlyphCursor(Font /*source */ ,
+ unsigned int /*sourceChar */ ,
+ Font /*mask */ ,
+ unsigned int /*maskChar */ ,
+ unsigned /*foreRed */ ,
+ unsigned /*foreGreen */ ,
+ unsigned /*foreBlue */ ,
+ unsigned /*backRed */ ,
+ unsigned /*backGreen */ ,
+ unsigned /*backBlue */ ,
+ CursorPtr * /*ppCurs */ ,
+ ClientPtr /*client */ ,
+ XID /*cid */ );
+
+extern _X_EXPORT CursorPtr CreateRootCursor(char * /*pfilename */ ,
+ unsigned int /*glyph */ );
+
+extern _X_EXPORT int ServerBitsFromGlyph(FontPtr /*pfont */ ,
+ unsigned int /*ch */ ,
+ CursorMetricPtr /*cm */ ,
+ unsigned char ** /*ppbits */ );
+
+extern _X_EXPORT Bool CursorMetricsFromGlyph(FontPtr /*pfont */ ,
+ unsigned /*ch */ ,
+ CursorMetricPtr /*cm */ );
+
+extern _X_EXPORT void CheckCursorConfinement(WindowPtr /*pWin */ );
+
+extern _X_EXPORT void NewCurrentScreen(struct _DeviceIntRec * /*pDev */ ,
+ ScreenPtr /*newScreen */ ,
+ int /*x */ ,
+ int /*y */ );
+
+extern _X_EXPORT Bool PointerConfinedToScreen(struct _DeviceIntRec * /* pDev */
+ );
+
+extern _X_EXPORT void GetSpritePosition(struct _DeviceIntRec * /* pDev */ ,
+ int * /*px */ ,
+ int * /*py */ );
+
+#ifdef PANORAMIX
+extern _X_EXPORT int XineramaGetCursorScreen(struct _DeviceIntRec *pDev);
+#endif /* PANORAMIX */
+
+#endif /* CURSOR_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/cursorstr.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/cursorstr.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/cursorstr.h (working copy)
@@ -0,0 +1,96 @@
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef CURSORSTRUCT_H
+#define CURSORSTRUCT_H
+
+#include "cursor.h"
+#include "privates.h"
+/*
+ * device-independent cursor storage
+ */
+
+/*
+ * source and mask point directly to the bits, which are in the server-defined
+ * bitmap format.
+ */
+typedef struct _CursorBits {
+ unsigned char *source; /* points to bits */
+ unsigned char *mask; /* points to bits */
+ Bool emptyMask; /* all zeros mask */
+ unsigned short width, height, xhot, yhot; /* metrics */
+ int refcnt; /* can be shared */
+ PrivateRec *devPrivates; /* set by pScr->RealizeCursor */
+#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;
+ CARD32 serialNumber;
+ Atom name;
+} 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 */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/damage.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/damage.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/damage.h (working copy)
@@ -0,0 +1,115 @@
+/*
+ * Copyright © 2003 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifndef _DAMAGE_H_
+#define _DAMAGE_H_
+
+typedef struct _damage *DamagePtr;
+
+typedef enum _damageReportLevel {
+ DamageReportRawRegion,
+ DamageReportDeltaRegion,
+ DamageReportBoundingBox,
+ DamageReportNonEmpty,
+ DamageReportNone
+} DamageReportLevel;
+
+typedef void (*DamageReportFunc) (DamagePtr pDamage, RegionPtr pRegion,
+ void *closure);
+typedef void (*DamageDestroyFunc) (DamagePtr pDamage, void *closure);
+
+typedef void (*DamageScreenCreateFunc) (DamagePtr);
+typedef void (*DamageScreenRegisterFunc) (DrawablePtr, DamagePtr);
+typedef void (*DamageScreenUnregisterFunc) (DrawablePtr, DamagePtr);
+typedef void (*DamageScreenDestroyFunc) (DamagePtr);
+
+typedef struct _damageScreenFuncs {
+ DamageScreenCreateFunc Create;
+ DamageScreenRegisterFunc Register;
+ DamageScreenUnregisterFunc Unregister;
+ DamageScreenDestroyFunc Destroy;
+} DamageScreenFuncsRec, *DamageScreenFuncsPtr;
+
+extern _X_EXPORT void miDamageCreate(DamagePtr);
+extern _X_EXPORT void miDamageRegister(DrawablePtr, DamagePtr);
+extern _X_EXPORT void miDamageUnregister(DrawablePtr, DamagePtr);
+extern _X_EXPORT void miDamageDestroy(DamagePtr);
+
+extern _X_EXPORT Bool
+ DamageSetup(ScreenPtr pScreen);
+
+extern _X_EXPORT DamagePtr
+DamageCreate(DamageReportFunc damageReport,
+ DamageDestroyFunc damageDestroy,
+ DamageReportLevel damageLevel,
+ Bool isInternal, ScreenPtr pScreen, void *closure);
+
+extern _X_EXPORT void
+ DamageDrawInternal(ScreenPtr pScreen, Bool enable);
+
+extern _X_EXPORT void
+ DamageRegister(DrawablePtr pDrawable, DamagePtr pDamage);
+
+extern _X_EXPORT void
+ DamageUnregister(DamagePtr pDamage);
+
+extern _X_EXPORT void
+ DamageDestroy(DamagePtr pDamage);
+
+extern _X_EXPORT Bool
+ DamageSubtract(DamagePtr pDamage, const RegionPtr pRegion);
+
+extern _X_EXPORT void
+ DamageEmpty(DamagePtr pDamage);
+
+extern _X_EXPORT RegionPtr
+ DamageRegion(DamagePtr pDamage);
+
+extern _X_EXPORT RegionPtr
+ DamagePendingRegion(DamagePtr pDamage);
+
+/* In case of rendering, call this before the submitting the commands. */
+extern _X_EXPORT void
+ DamageRegionAppend(DrawablePtr pDrawable, RegionPtr pRegion);
+
+/* Call this directly after the rendering operation has been submitted. */
+extern _X_EXPORT void
+ DamageRegionProcessPending(DrawablePtr pDrawable);
+
+/* Call this when you create a new Damage and you wish to send an initial damage message (to it). */
+extern _X_EXPORT void
+ DamageReportDamage(DamagePtr pDamage, RegionPtr pDamageRegion);
+
+/* Avoid using this call, it only exists for API compatibility. */
+extern _X_EXPORT void
+ DamageDamageRegion(DrawablePtr pDrawable, const RegionPtr pRegion);
+
+extern _X_EXPORT void
+ DamageSetReportAfterOp(DamagePtr pDamage, Bool reportAfter);
+
+extern _X_EXPORT DamageScreenFuncsPtr DamageGetScreenFuncs(ScreenPtr);
+
+#endif /* _DAMAGE_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/damagestr.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/damagestr.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/damagestr.h (working copy)
@@ -0,0 +1,111 @@
+/*
+ * Copyright © 2003 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifndef _DAMAGESTR_H_
+#define _DAMAGESTR_H_
+
+#include "damage.h"
+#include "gcstruct.h"
+#include "privates.h"
+#include "picturestr.h"
+
+typedef struct _damage {
+ DamagePtr pNext;
+ DamagePtr pNextWin;
+ RegionRec damage;
+
+ DamageReportLevel damageLevel;
+ Bool isInternal;
+ void *closure;
+ Bool isWindow;
+ DrawablePtr pDrawable;
+
+ DamageReportFunc damageReport;
+ DamageDestroyFunc damageDestroy;
+
+ Bool reportAfter;
+ RegionRec pendingDamage; /* will be flushed post submission at the latest */
+ ScreenPtr pScreen;
+ PrivateRec *devPrivates;
+} DamageRec;
+
+typedef struct _damageScrPriv {
+ int internalLevel;
+
+ /*
+ * For DDXen which don't provide GetScreenPixmap, this provides
+ * a place to hook damage for windows on the screen
+ */
+ DamagePtr pScreenDamage;
+
+ CopyWindowProcPtr CopyWindow;
+ CloseScreenProcPtr CloseScreen;
+ CreateGCProcPtr CreateGC;
+ DestroyPixmapProcPtr DestroyPixmap;
+ SetWindowPixmapProcPtr SetWindowPixmap;
+ DestroyWindowProcPtr DestroyWindow;
+ CompositeProcPtr Composite;
+ GlyphsProcPtr Glyphs;
+ AddTrapsProcPtr AddTraps;
+
+ /* Table of wrappable function pointers */
+ DamageScreenFuncsRec funcs;
+} DamageScrPrivRec, *DamageScrPrivPtr;
+
+typedef struct _damageGCPriv {
+ const GCOps *ops;
+ const GCFuncs *funcs;
+} DamageGCPrivRec, *DamageGCPrivPtr;
+
+/* XXX should move these into damage.c, damageScrPrivateIndex is static */
+#define damageGetScrPriv(pScr) ((DamageScrPrivPtr) \
+ dixLookupPrivate(&(pScr)->devPrivates, damageScrPrivateKey))
+
+#define damageScrPriv(pScr) \
+ DamageScrPrivPtr pScrPriv = damageGetScrPriv(pScr)
+
+#define damageGetPixPriv(pPix) \
+ dixLookupPrivate(&(pPix)->devPrivates, damagePixPrivateKey)
+
+#define damgeSetPixPriv(pPix,v) \
+ dixSetPrivate(&(pPix)->devPrivates, damagePixPrivateKey, v)
+
+#define damagePixPriv(pPix) \
+ DamagePtr pDamage = damageGetPixPriv(pPix)
+
+#define damageGetGCPriv(pGC) \
+ dixLookupPrivate(&(pGC)->devPrivates, damageGCPrivateKey)
+
+#define damageGCPriv(pGC) \
+ DamageGCPrivPtr pGCPriv = damageGetGCPriv(pGC)
+
+#define damageGetWinPriv(pWin) \
+ ((DamagePtr)dixLookupPrivate(&(pWin)->devPrivates, damageWinPrivateKey))
+
+#define damageSetWinPriv(pWin,d) \
+ dixSetPrivate(&(pWin)->devPrivates, damageWinPrivateKey, d)
+
+#endif /* _DAMAGESTR_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dbestruct.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dbestruct.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dbestruct.h (working copy)
@@ -0,0 +1,202 @@
+/******************************************************************************
+ *
+ * Copyright (c) 1994, 1995 Hewlett-Packard Company
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL HEWLETT-PACKARD COMPANY BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the Hewlett-Packard
+ * Company shall not be used in advertising or otherwise to promote the
+ * sale, use or other dealings in this Software without prior written
+ * authorization from the Hewlett-Packard Company.
+ *
+ * Header file for DIX-related DBE
+ *
+ *****************************************************************************/
+
+#ifndef DBE_STRUCT_H
+#define DBE_STRUCT_H
+
+/* INCLUDES */
+
+#define NEED_DBE_PROTOCOL
+#include <X11/extensions/dbeproto.h>
+#include "windowstr.h"
+#include "privates.h"
+
+typedef struct {
+ VisualID visual; /* one visual ID that supports double-buffering */
+ int depth; /* depth of visual in bits */
+ int perflevel; /* performance level of visual */
+} XdbeVisualInfo;
+
+typedef struct {
+ int count; /* number of items in visual_depth */
+ XdbeVisualInfo *visinfo; /* list of visuals & depths for scrn */
+} XdbeScreenVisualInfo;
+
+/* DEFINES */
+
+#define DBE_SCREEN_PRIV(pScreen) ((DbeScreenPrivPtr) \
+ dixLookupPrivate(&(pScreen)->devPrivates, dbeScreenPrivKey))
+
+#define DBE_SCREEN_PRIV_FROM_DRAWABLE(pDrawable) \
+ DBE_SCREEN_PRIV((pDrawable)->pScreen)
+
+#define DBE_SCREEN_PRIV_FROM_WINDOW_PRIV(pDbeWindowPriv) \
+ DBE_SCREEN_PRIV((pDbeWindowPriv)->pWindow->drawable.pScreen)
+
+#define DBE_SCREEN_PRIV_FROM_WINDOW(pWindow) \
+ DBE_SCREEN_PRIV((pWindow)->drawable.pScreen)
+
+#define DBE_SCREEN_PRIV_FROM_PIXMAP(pPixmap) \
+ DBE_SCREEN_PRIV((pPixmap)->drawable.pScreen)
+
+#define DBE_SCREEN_PRIV_FROM_GC(pGC)\
+ DBE_SCREEN_PRIV((pGC)->pScreen)
+
+#define DBE_WINDOW_PRIV(pWin) ((DbeWindowPrivPtr) \
+ dixLookupPrivate(&(pWin)->devPrivates, dbeWindowPrivKey))
+
+/* Initial size of the buffer ID array in the window priv. */
+#define DBE_INIT_MAX_IDS 2
+
+/* Reallocation increment for the buffer ID array. */
+#define DBE_INCR_MAX_IDS 4
+
+/* Marker for free elements in the buffer ID array. */
+#define DBE_FREE_ID_ELEMENT 0
+
+/* TYPEDEFS */
+
+/* Record used to pass swap information between DIX and DDX swapping
+ * procedures.
+ */
+typedef struct _DbeSwapInfoRec {
+ WindowPtr pWindow;
+ unsigned char swapAction;
+
+} DbeSwapInfoRec, *DbeSwapInfoPtr;
+
+/*
+ ******************************************************************************
+ ** Per-window data
+ ******************************************************************************
+ */
+
+typedef struct _DbeWindowPrivRec {
+ /* A pointer to the window with which the DBE window private (buffer) is
+ * associated.
+ */
+ WindowPtr pWindow;
+
+ /* Last known swap action for this buffer. Legal values for this field
+ * are XdbeUndefined, XdbeBackground, XdbeUntouched, and XdbeCopied.
+ */
+ unsigned char swapAction;
+
+ /* Last known buffer size.
+ */
+ unsigned short width, height;
+
+ /* Coordinates used for static gravity when the window is positioned.
+ */
+ short x, y;
+
+ /* Number of XIDs associated with this buffer.
+ */
+ int nBufferIDs;
+
+ /* Capacity of the current buffer ID array, IDs. */
+ int maxAvailableIDs;
+
+ /* Pointer to the array of buffer IDs. This initially points to initIDs.
+ * When the static limit of the initIDs array is reached, the array is
+ * reallocated and this pointer is set to the new array instead of initIDs.
+ */
+ XID *IDs;
+
+ /* Initial array of buffer IDs. We are defining the XID array within the
+ * window priv to optimize for data locality. In most cases, only one
+ * buffer will be associated with a window. Having the array declared
+ * here can prevent us from accessing the data in another memory page,
+ * possibly resulting in a page swap and loss of performance. Initially we
+ * will use this array to store buffer IDs. For situations where we have
+ * more IDs than can fit in this static array, we will allocate a larger
+ * array to use, possibly suffering a performance loss.
+ */
+ XID initIDs[DBE_INIT_MAX_IDS];
+
+ /* Pointer to a drawable that contains the contents of the back buffer.
+ */
+ PixmapPtr pBackBuffer;
+
+ /* Pointer to a drawable that contains the contents of the front buffer.
+ * This pointer is only used for the XdbeUntouched swap action. For that
+ * swap action, we need to copy the front buffer (window) contents into
+ * this drawable, copy the contents of current back buffer drawable (the
+ * back buffer) into the window, swap the front and back drawable pointers,
+ * and then swap the drawable/resource associations in the resource
+ * database.
+ */
+ PixmapPtr pFrontBuffer;
+
+ /* Device-specific private information.
+ */
+ PrivateRec *devPrivates;
+
+} DbeWindowPrivRec, *DbeWindowPrivPtr;
+
+/*
+ ******************************************************************************
+ ** Per-screen data
+ ******************************************************************************
+ */
+
+typedef struct _DbeScreenPrivRec {
+ /* Wrapped functions
+ * It is the responsibilty of the DDX layer to wrap PositionWindow().
+ * DbeExtensionInit wraps DestroyWindow().
+ */
+ PositionWindowProcPtr PositionWindow;
+ DestroyWindowProcPtr DestroyWindow;
+
+ /* Per-screen DIX routines */
+ Bool (*SetupBackgroundPainter) (WindowPtr /*pWin */ ,
+ GCPtr /*pGC */
+ );
+
+ /* Per-screen DDX routines */
+ Bool (*GetVisualInfo) (ScreenPtr /*pScreen */ ,
+ XdbeScreenVisualInfo * /*pVisInfo */
+ );
+ int (*AllocBackBufferName) (WindowPtr /*pWin */ ,
+ XID /*bufId */ ,
+ int /*swapAction */
+ );
+ int (*SwapBuffers) (ClientPtr /*client */ ,
+ int * /*pNumWindows */ ,
+ DbeSwapInfoPtr /*swapInfo */
+ );
+ void (*WinPrivDelete) (DbeWindowPrivPtr /*pDbeWindowPriv */ ,
+ XID /*bufId */
+ );
+} DbeScreenPrivRec, *DbeScreenPrivPtr;
+
+#endif /* DBE_STRUCT_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dgaproc.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dgaproc.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dgaproc.h (working copy)
@@ -0,0 +1,110 @@
+
+#ifndef __DGAPROC_H
+#define __DGAPROC_H
+
+#include <X11/Xproto.h>
+#include "pixmap.h"
+
+#define DGA_CONCURRENT_ACCESS 0x00000001
+#define DGA_FILL_RECT 0x00000002
+#define DGA_BLIT_RECT 0x00000004
+#define DGA_BLIT_RECT_TRANS 0x00000008
+#define DGA_PIXMAP_AVAILABLE 0x00000010
+
+#define DGA_INTERLACED 0x00010000
+#define DGA_DOUBLESCAN 0x00020000
+
+#define DGA_FLIP_IMMEDIATE 0x00000001
+#define DGA_FLIP_RETRACE 0x00000002
+
+#define DGA_COMPLETED 0x00000000
+#define DGA_PENDING 0x00000001
+
+#define DGA_NEED_ROOT 0x00000001
+
+typedef struct {
+ int num; /* A unique identifier for the mode (num > 0) */
+ const char *name; /* name of mode given in the XF86Config */
+ int VSync_num;
+ int VSync_den;
+ int flags; /* DGA_CONCURRENT_ACCESS, etc... */
+ int imageWidth; /* linear accessible portion (pixels) */
+ int imageHeight;
+ int pixmapWidth; /* Xlib accessible portion (pixels) */
+ int pixmapHeight; /* both fields ignored if no concurrent access */
+ int bytesPerScanline;
+ int byteOrder; /* MSBFirst, LSBFirst */
+ int depth;
+ int bitsPerPixel;
+ unsigned long red_mask;
+ unsigned long green_mask;
+ unsigned long blue_mask;
+ short visualClass;
+ int viewportWidth;
+ int viewportHeight;
+ int xViewportStep; /* viewport position granularity */
+ int yViewportStep;
+ int maxViewportX; /* max viewport origin */
+ int maxViewportY;
+ int viewportFlags; /* types of page flipping possible */
+ int offset;
+ int reserved1;
+ int reserved2;
+} XDGAModeRec, *XDGAModePtr;
+
+/* DDX interface */
+
+extern _X_EXPORT int
+ DGASetMode(int Index, int num, XDGAModePtr mode, PixmapPtr *pPix);
+
+extern _X_EXPORT void
+ DGASetInputMode(int Index, Bool keyboard, Bool mouse);
+
+extern _X_EXPORT void
+ DGASelectInput(int Index, ClientPtr client, long mask);
+
+extern _X_EXPORT Bool DGAAvailable(int Index);
+extern _X_EXPORT Bool DGAScreenAvailable(ScreenPtr pScreen);
+extern _X_EXPORT Bool DGAActive(int Index);
+extern _X_EXPORT void DGAShutdown(void);
+extern _X_EXPORT void DGAInstallCmap(ColormapPtr cmap);
+extern _X_EXPORT int DGAGetViewportStatus(int Index);
+extern _X_EXPORT int DGASync(int Index);
+
+extern _X_EXPORT int
+ DGAFillRect(int Index, int x, int y, int w, int h, unsigned long color);
+
+extern _X_EXPORT int
+ DGABlitRect(int Index, int srcx, int srcy, int w, int h, int dstx, int dsty);
+
+extern _X_EXPORT int
+
+DGABlitTransRect(int Index,
+ int srcx, int srcy,
+ int w, int h, int dstx, int dsty, unsigned long color);
+
+extern _X_EXPORT int
+ DGASetViewport(int Index, int x, int y, int mode);
+
+extern _X_EXPORT int DGAGetModes(int Index);
+extern _X_EXPORT int DGAGetOldDGAMode(int Index);
+
+extern _X_EXPORT int DGAGetModeInfo(int Index, XDGAModePtr mode, int num);
+
+extern _X_EXPORT Bool DGAVTSwitch(void);
+extern _X_EXPORT Bool DGAStealButtonEvent(DeviceIntPtr dev, int Index,
+ int button, int is_down);
+extern _X_EXPORT Bool DGAStealMotionEvent(DeviceIntPtr dev, int Index, int dx,
+ int dy);
+extern _X_EXPORT Bool DGAStealKeyEvent(DeviceIntPtr dev, int Index,
+ int key_code, int is_down);
+
+extern _X_EXPORT Bool DGAOpenFramebuffer(int Index, char **name,
+ unsigned char **mem, int *size,
+ int *offset, int *flags);
+extern _X_EXPORT void DGACloseFramebuffer(int Index);
+extern _X_EXPORT Bool DGAChangePixmapMode(int Index, int *x, int *y, int mode);
+extern _X_EXPORT int DGACreateColormap(int Index, ClientPtr client, int id,
+ int mode, int alloc);
+
+#endif /* __DGAPROC_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dix.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dix.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dix.h (working copy)
@@ -0,0 +1,611 @@
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef DIX_H
+#define DIX_H
+
+#include "callback.h"
+#include "gc.h"
+#include "window.h"
+#include "input.h"
+#include "cursor.h"
+#include "geext.h"
+#include "events.h"
+#include <X11/extensions/XI.h>
+
+#define EARLIER -1
+#define SAMETIME 0
+#define LATER 1
+
+#define NullClient ((ClientPtr) 0)
+#define REQUEST(type) \
+ type *stuff = (type *)client->requestBuffer
+
+#define ARRAY_SIZE(a) (sizeof((a)) / sizeof((a)[0]))
+
+#define REQUEST_SIZE_MATCH(req)\
+ if ((sizeof(req) >> 2) != client->req_len)\
+ return(BadLength)
+
+#define REQUEST_AT_LEAST_SIZE(req) \
+ if ((sizeof(req) >> 2) > client->req_len )\
+ return(BadLength)
+
+#define REQUEST_FIXED_SIZE(req, n)\
+ if (((sizeof(req) >> 2) > client->req_len) || \
+ (((sizeof(req) + (n) + 3) >> 2) != client->req_len)) \
+ return(BadLength)
+
+#define LEGAL_NEW_RESOURCE(id,client)\
+ if (!LegalNewID(id,client)) \
+ {\
+ client->errorValue = id;\
+ return BadIDChoice;\
+ }
+
+#define VALIDATE_DRAWABLE_AND_GC(drawID, pDraw, mode)\
+ {\
+ int tmprc = dixLookupDrawable(&(pDraw), drawID, client, M_ANY, mode);\
+ if (tmprc != Success)\
+ return tmprc;\
+ tmprc = dixLookupGC(&(pGC), stuff->gc, client, DixUseAccess);\
+ if (tmprc != Success)\
+ return tmprc;\
+ if ((pGC->depth != pDraw->depth) || (pGC->pScreen != pDraw->pScreen))\
+ return BadMatch;\
+ }\
+ if (pGC->serialNumber != pDraw->serialNumber)\
+ ValidateGC(pDraw, pGC);
+
+#define WriteReplyToClient(pClient, size, pReply) { \
+ if ((pClient)->swapped) \
+ (*ReplySwapVector[((xReq *)(pClient)->requestBuffer)->reqType]) \
+ (pClient, (int)(size), pReply); \
+ else WriteToClient(pClient, (int)(size), (pReply)); }
+
+#define WriteSwappedDataToClient(pClient, size, pbuf) \
+ if ((pClient)->swapped) \
+ (*(pClient)->pSwapReplyFunc)(pClient, (int)(size), pbuf); \
+ else WriteToClient(pClient, (int)(size), (pbuf));
+
+typedef struct _TimeStamp *TimeStampPtr;
+
+#ifndef _XTYPEDEF_CLIENTPTR
+typedef struct _Client *ClientPtr; /* also in misc.h */
+
+#define _XTYPEDEF_CLIENTPTR
+#endif
+
+typedef struct _WorkQueue *WorkQueuePtr;
+
+extern _X_EXPORT ClientPtr clients[MAXCLIENTS];
+extern _X_EXPORT ClientPtr serverClient;
+extern _X_EXPORT int currentMaxClients;
+extern _X_EXPORT char dispatchExceptionAtReset;
+
+typedef int HWEventQueueType;
+typedef HWEventQueueType *HWEventQueuePtr;
+
+extern _X_EXPORT HWEventQueuePtr checkForInput[2];
+
+typedef struct _TimeStamp {
+ CARD32 months; /* really ~49.7 days */
+ CARD32 milliseconds;
+} TimeStamp;
+
+/* dispatch.c */
+
+extern _X_EXPORT void SetInputCheck(HWEventQueuePtr /*c0 */ ,
+ HWEventQueuePtr /*c1 */ );
+
+extern _X_EXPORT void CloseDownClient(ClientPtr /*client */ );
+
+extern _X_EXPORT void UpdateCurrentTime(void);
+
+extern _X_EXPORT void UpdateCurrentTimeIf(void);
+
+extern _X_EXPORT int dixDestroyPixmap(void */*value */ ,
+ XID /*pid */ );
+
+extern _X_EXPORT void InitClient(ClientPtr /*client */ ,
+ int /*i */ ,
+ void */*ospriv */ );
+
+extern _X_EXPORT ClientPtr NextAvailableClient(void */*ospriv */ );
+
+extern _X_EXPORT void SendErrorToClient(ClientPtr /*client */ ,
+ unsigned int /*majorCode */ ,
+ unsigned int /*minorCode */ ,
+ XID /*resId */ ,
+ int /*errorCode */ );
+
+extern _X_EXPORT void MarkClientException(ClientPtr /*client */ );
+
+extern _X_HIDDEN Bool CreateConnectionBlock(void);
+
+/* dixutils.c */
+
+extern _X_EXPORT int CompareISOLatin1Lowered(const unsigned char * /*a */ ,
+ int alen,
+ const unsigned char * /*b */ ,
+ int blen);
+
+extern _X_EXPORT int dixLookupWindow(WindowPtr *result,
+ XID id,
+ ClientPtr client, Mask access_mode);
+
+extern _X_EXPORT int dixLookupDrawable(DrawablePtr *result,
+ XID id,
+ ClientPtr client,
+ Mask type_mask, Mask access_mode);
+
+extern _X_EXPORT int dixLookupGC(GCPtr *result,
+ XID id, ClientPtr client, Mask access_mode);
+
+extern _X_EXPORT int dixLookupFontable(FontPtr *result,
+ XID id,
+ ClientPtr client, Mask access_mode);
+
+extern _X_EXPORT int dixLookupClient(ClientPtr *result,
+ XID id,
+ ClientPtr client, Mask access_mode);
+
+extern _X_EXPORT void NoopDDA(void);
+
+extern _X_EXPORT int AlterSaveSetForClient(ClientPtr /*client */ ,
+ WindowPtr /*pWin */ ,
+ unsigned /*mode */ ,
+ Bool /*toRoot */ ,
+ Bool /*map */ );
+
+extern _X_EXPORT void DeleteWindowFromAnySaveSet(WindowPtr /*pWin */ );
+
+extern _X_EXPORT void BlockHandler(void */*pTimeout */ ,
+ void */*pReadmask */ );
+
+extern _X_EXPORT void WakeupHandler(int /*result */ ,
+ void */*pReadmask */ );
+
+void
+ EnableLimitedSchedulingLatency(void);
+
+void
+ DisableLimitedSchedulingLatency(void);
+
+typedef void (*WakeupHandlerProcPtr) (void */* blockData */ ,
+ int /* result */ ,
+ void */* pReadmask */ );
+
+extern _X_EXPORT Bool RegisterBlockAndWakeupHandlers(BlockHandlerProcPtr
+ /*blockHandler */ ,
+ WakeupHandlerProcPtr
+ /*wakeupHandler */ ,
+ void */*blockData */ );
+
+extern _X_EXPORT void RemoveBlockAndWakeupHandlers(BlockHandlerProcPtr
+ /*blockHandler */ ,
+ WakeupHandlerProcPtr
+ /*wakeupHandler */ ,
+ void */*blockData */ );
+
+extern _X_EXPORT void InitBlockAndWakeupHandlers(void);
+
+extern _X_EXPORT void ProcessWorkQueue(void);
+
+extern _X_EXPORT void ProcessWorkQueueZombies(void);
+
+extern _X_EXPORT Bool QueueWorkProc(Bool (* /*function */ )(
+ ClientPtr
+ /*clientUnused */
+ ,
+ void *
+ /*closure */ ),
+ ClientPtr /*client */ ,
+ void */*closure */
+ );
+
+typedef Bool (*ClientSleepProcPtr) (ClientPtr /*client */ ,
+ void */*closure */ );
+
+extern _X_EXPORT Bool ClientSleep(ClientPtr /*client */ ,
+ ClientSleepProcPtr /* function */ ,
+ void */*closure */ );
+
+#ifndef ___CLIENTSIGNAL_DEFINED___
+#define ___CLIENTSIGNAL_DEFINED___
+extern _X_EXPORT Bool ClientSignal(ClientPtr /*client */ );
+#endif /* ___CLIENTSIGNAL_DEFINED___ */
+
+extern _X_EXPORT void ClientWakeup(ClientPtr /*client */ );
+
+extern _X_EXPORT Bool ClientIsAsleep(ClientPtr /*client */ );
+
+/* atom.c */
+
+extern _X_EXPORT Atom MakeAtom(const char * /*string */ ,
+ unsigned /*len */ ,
+ Bool /*makeit */ );
+
+extern _X_EXPORT Bool ValidAtom(Atom /*atom */ );
+
+extern _X_EXPORT const char *NameForAtom(Atom /*atom */ );
+
+extern _X_EXPORT void
+AtomError(void)
+ _X_NORETURN;
+
+extern _X_EXPORT void
+FreeAllAtoms(void);
+
+extern _X_EXPORT void
+InitAtoms(void);
+
+/* main.c */
+
+extern _X_EXPORT void
+SetVendorRelease(int release);
+
+extern _X_EXPORT void
+SetVendorString(const char *string);
+
+int
+dix_main(int argc, char *argv[], char *envp[]);
+
+/* events.c */
+
+extern void
+SetMaskForEvent(int /* deviceid */ ,
+ Mask /* mask */ ,
+ int /* event */ );
+
+extern _X_EXPORT void
+ConfineToShape(DeviceIntPtr /* pDev */ ,
+ RegionPtr /* shape */ ,
+ int * /* px */ ,
+ int * /* py */ );
+
+extern _X_EXPORT Bool
+IsParent(WindowPtr /* maybeparent */ ,
+ WindowPtr /* child */ );
+
+extern _X_EXPORT WindowPtr
+GetCurrentRootWindow(DeviceIntPtr pDev);
+
+extern _X_EXPORT WindowPtr
+GetSpriteWindow(DeviceIntPtr pDev);
+
+extern _X_EXPORT void
+NoticeTime(const DeviceIntPtr dev,
+ TimeStamp time);
+extern _X_EXPORT void
+NoticeEventTime(InternalEvent *ev,
+ DeviceIntPtr dev);
+extern _X_EXPORT TimeStamp
+LastEventTime(int deviceid);
+extern _X_EXPORT Bool
+LastEventTimeWasReset(int deviceid);
+extern _X_EXPORT void
+LastEventTimeToggleResetFlag(int deviceid, Bool state);
+extern _X_EXPORT void
+LastEventTimeToggleResetAll(Bool state);
+
+extern void
+EnqueueEvent(InternalEvent * /* ev */ ,
+ DeviceIntPtr /* device */ );
+extern void
+PlayReleasedEvents(void);
+
+extern void
+ActivatePointerGrab(DeviceIntPtr /* mouse */ ,
+ GrabPtr /* grab */ ,
+ TimeStamp /* time */ ,
+ Bool /* autoGrab */ );
+
+extern void
+DeactivatePointerGrab(DeviceIntPtr /* mouse */ );
+
+extern void
+ActivateKeyboardGrab(DeviceIntPtr /* keybd */ ,
+ GrabPtr /* grab */ ,
+ TimeStamp /* time */ ,
+ Bool /* passive */ );
+
+extern void
+DeactivateKeyboardGrab(DeviceIntPtr /* keybd */ );
+
+extern BOOL
+ActivateFocusInGrab(DeviceIntPtr /* dev */ ,
+ WindowPtr /* old */ ,
+ WindowPtr /* win */ );
+
+extern void
+AllowSome(ClientPtr /* client */ ,
+ TimeStamp /* time */ ,
+ DeviceIntPtr /* thisDev */ ,
+ int /* newState */ );
+
+extern void
+ReleaseActiveGrabs(ClientPtr client);
+
+extern GrabPtr
+CheckPassiveGrabsOnWindow(WindowPtr /* pWin */ ,
+ DeviceIntPtr /* device */ ,
+ InternalEvent * /* event */ ,
+ BOOL /* checkCore */ ,
+ BOOL /* activate */ );
+
+extern _X_EXPORT int
+DeliverEventsToWindow(DeviceIntPtr /* pWin */ ,
+ WindowPtr /* pWin */ ,
+ xEventPtr /* pEvents */ ,
+ int /* count */ ,
+ Mask /* filter */ ,
+ GrabPtr /* grab */ );
+
+extern _X_EXPORT void
+DeliverRawEvent(RawDeviceEvent * /* ev */ ,
+ DeviceIntPtr /* dev */
+ );
+
+extern int
+DeliverDeviceEvents(WindowPtr /* pWin */ ,
+ InternalEvent * /* event */ ,
+ GrabPtr /* grab */ ,
+ WindowPtr /* stopAt */ ,
+ DeviceIntPtr /* dev */ );
+
+extern int
+DeliverOneGrabbedEvent(InternalEvent * /* event */ ,
+ DeviceIntPtr /* dev */ ,
+ enum InputLevel /* level */ );
+
+extern void
+DeliverTouchEvents(DeviceIntPtr /* dev */ ,
+ TouchPointInfoPtr /* ti */ ,
+ InternalEvent * /* ev */ ,
+ XID /* resource */ );
+
+extern void
+InitializeSprite(DeviceIntPtr /* pDev */ ,
+ WindowPtr /* pWin */ );
+extern void
+FreeSprite(DeviceIntPtr pDev);
+
+extern void
+UpdateSpriteForScreen(DeviceIntPtr /* pDev */ ,
+ ScreenPtr /* pScreen */ );
+
+extern _X_EXPORT void
+WindowHasNewCursor(WindowPtr /* pWin */ );
+
+extern Bool
+CheckDeviceGrabs(DeviceIntPtr /* device */ ,
+ DeviceEvent * /* event */ ,
+ WindowPtr /* ancestor */ );
+
+extern void
+DeliverFocusedEvent(DeviceIntPtr /* keybd */ ,
+ InternalEvent * /* event */ ,
+ WindowPtr /* window */ );
+
+extern int
+DeliverGrabbedEvent(InternalEvent * /* event */ ,
+ DeviceIntPtr /* thisDev */ ,
+ Bool /* deactivateGrab */ );
+
+extern void
+FixKeyState(DeviceEvent * /* event */ ,
+ DeviceIntPtr /* keybd */ );
+
+extern void
+RecalculateDeliverableEvents(WindowPtr /* pWin */ );
+
+extern _X_EXPORT int
+OtherClientGone(void */* value */ ,
+ XID /* id */ );
+
+extern void
+DoFocusEvents(DeviceIntPtr /* dev */ ,
+ WindowPtr /* fromWin */ ,
+ WindowPtr /* toWin */ ,
+ int /* mode */ );
+
+extern int
+SetInputFocus(ClientPtr /* client */ ,
+ DeviceIntPtr /* dev */ ,
+ Window /* focusID */ ,
+ CARD8 /* revertTo */ ,
+ Time /* ctime */ ,
+ Bool /* followOK */ );
+
+extern int
+GrabDevice(ClientPtr /* client */ ,
+ DeviceIntPtr /* dev */ ,
+ unsigned /* this_mode */ ,
+ unsigned /* other_mode */ ,
+ Window /* grabWindow */ ,
+ unsigned /* ownerEvents */ ,
+ Time /* ctime */ ,
+ GrabMask * /* mask */ ,
+ int /* grabtype */ ,
+ Cursor /* curs */ ,
+ Window /* confineToWin */ ,
+ CARD8 * /* status */ );
+
+extern void
+InitEvents(void);
+
+extern void
+CloseDownEvents(void);
+
+extern void
+DeleteWindowFromAnyEvents(WindowPtr /* pWin */ ,
+ Bool /* freeResources */ );
+
+extern Mask
+EventMaskForClient(WindowPtr /* pWin */ ,
+ ClientPtr /* client */ );
+
+extern _X_EXPORT int
+DeliverEvents(WindowPtr /*pWin */ ,
+ xEventPtr /*xE */ ,
+ int /*count */ ,
+ WindowPtr /*otherParent */ );
+
+extern Bool
+CheckMotion(DeviceEvent * /* ev */ ,
+ DeviceIntPtr /* pDev */ );
+
+extern _X_EXPORT void
+WriteEventsToClient(ClientPtr /*pClient */ ,
+ int /*count */ ,
+ xEventPtr /*events */ );
+
+extern _X_EXPORT int
+TryClientEvents(ClientPtr /*client */ ,
+ DeviceIntPtr /* device */ ,
+ xEventPtr /*pEvents */ ,
+ int /*count */ ,
+ Mask /*mask */ ,
+ Mask /*filter */ ,
+ GrabPtr /*grab */ );
+
+extern _X_EXPORT void
+WindowsRestructured(void);
+
+extern int
+SetClientPointer(ClientPtr /* client */ ,
+ DeviceIntPtr /* device */ );
+
+extern _X_EXPORT DeviceIntPtr
+PickPointer(ClientPtr /* client */ );
+
+extern _X_EXPORT DeviceIntPtr
+PickKeyboard(ClientPtr /* client */ );
+
+extern Bool
+IsInterferingGrab(ClientPtr /* client */ ,
+ DeviceIntPtr /* dev */ ,
+ xEvent * /* events */ );
+
+#ifdef PANORAMIX
+extern _X_EXPORT void
+ReinitializeRootWindow(WindowPtr win, int xoff, int yoff);
+#endif
+
+#ifdef RANDR
+extern _X_EXPORT void
+ScreenRestructured(ScreenPtr pScreen);
+#endif
+
+#ifndef HAVE_FFS
+extern _X_EXPORT int
+ffs(int i);
+#endif
+
+/*
+ * ServerGrabCallback stuff
+ */
+
+extern _X_EXPORT CallbackListPtr ServerGrabCallback;
+
+typedef enum { SERVER_GRABBED, SERVER_UNGRABBED,
+ CLIENT_PERVIOUS, CLIENT_IMPERVIOUS
+} ServerGrabState;
+
+typedef struct {
+ ClientPtr client;
+ ServerGrabState grabstate;
+} ServerGrabInfoRec;
+
+/*
+ * EventCallback stuff
+ */
+
+extern _X_EXPORT CallbackListPtr EventCallback;
+
+typedef struct {
+ ClientPtr client;
+ xEventPtr events;
+ int count;
+} EventInfoRec;
+
+/*
+ * DeviceEventCallback stuff
+ */
+
+extern _X_EXPORT CallbackListPtr DeviceEventCallback;
+
+typedef struct {
+ InternalEvent *event;
+ DeviceIntPtr device;
+} DeviceEventInfoRec;
+
+extern int
+XItoCoreType(int xi_type);
+extern Bool
+DevHasCursor(DeviceIntPtr pDev);
+extern _X_EXPORT Bool
+IsPointerDevice(DeviceIntPtr dev);
+extern _X_EXPORT Bool
+IsKeyboardDevice(DeviceIntPtr dev);
+extern Bool
+IsPointerEvent(InternalEvent *event);
+extern Bool
+IsTouchEvent(InternalEvent *event);
+extern _X_EXPORT Bool
+IsMaster(DeviceIntPtr dev);
+extern _X_EXPORT Bool
+IsFloating(DeviceIntPtr dev);
+
+extern _X_HIDDEN void
+CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master);
+extern _X_HIDDEN int
+CorePointerProc(DeviceIntPtr dev, int what);
+extern _X_HIDDEN int
+CoreKeyboardProc(DeviceIntPtr dev, int what);
+
+#endif /* DIX_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dixaccess.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dixaccess.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dixaccess.h (working copy)
@@ -0,0 +1,54 @@
+/***********************************************************
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+******************************************************************/
+
+#ifndef DIX_ACCESS_H
+#define DIX_ACCESS_H
+
+/* These are the access modes that can be passed in the last parameter
+ * to several of the dix lookup functions. They were originally part
+ * of the Security extension, now used by XACE.
+ *
+ * You can or these values together to indicate multiple modes
+ * simultaneously.
+ */
+
+#define DixUnknownAccess 0 /* don't know intentions */
+#define DixReadAccess (1<<0) /* inspecting the object */
+#define DixWriteAccess (1<<1) /* changing the object */
+#define DixDestroyAccess (1<<2) /* destroying the object */
+#define DixCreateAccess (1<<3) /* creating the object */
+#define DixGetAttrAccess (1<<4) /* get object attributes */
+#define DixSetAttrAccess (1<<5) /* set object attributes */
+#define DixListPropAccess (1<<6) /* list properties of object */
+#define DixGetPropAccess (1<<7) /* get properties of object */
+#define DixSetPropAccess (1<<8) /* set properties of object */
+#define DixGetFocusAccess (1<<9) /* get focus of object */
+#define DixSetFocusAccess (1<<10) /* set focus of object */
+#define DixListAccess (1<<11) /* list objects */
+#define DixAddAccess (1<<12) /* add object */
+#define DixRemoveAccess (1<<13) /* remove object */
+#define DixHideAccess (1<<14) /* hide object */
+#define DixShowAccess (1<<15) /* show object */
+#define DixBlendAccess (1<<16) /* mix contents of objects */
+#define DixGrabAccess (1<<17) /* exclusive access to object */
+#define DixFreezeAccess (1<<18) /* freeze status of object */
+#define DixForceAccess (1<<19) /* force status of object */
+#define DixInstallAccess (1<<20) /* install object */
+#define DixUninstallAccess (1<<21) /* uninstall object */
+#define DixSendAccess (1<<22) /* send to object */
+#define DixReceiveAccess (1<<23) /* receive from object */
+#define DixUseAccess (1<<24) /* use object */
+#define DixManageAccess (1<<25) /* manage object */
+#define DixDebugAccess (1<<26) /* debug object */
+#define DixBellAccess (1<<27) /* audible sound */
+#define DixPostAccess (1<<28) /* post or follow-up call */
+
+#endif /* DIX_ACCESS_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dixevents.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dixevents.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dixevents.h (working copy)
@@ -0,0 +1,80 @@
+/************************************************************
+
+Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of the above listed
+copyright holder(s) not be used in advertising or publicity pertaining
+to distribution of the software without specific, written prior
+permission.
+
+THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD
+TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
+LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+#ifndef DIXEVENTS_H
+#define DIXEVENTS_H
+
+extern _X_EXPORT void SetCriticalEvent(int /* event */ );
+
+extern _X_EXPORT CursorPtr GetSpriteCursor(DeviceIntPtr /*pDev */ );
+
+extern _X_EXPORT int ProcAllowEvents(ClientPtr /* client */ );
+
+extern _X_EXPORT int MaybeDeliverEventsToClient(WindowPtr /* pWin */ ,
+ xEvent * /* pEvents */ ,
+ int /* count */ ,
+ Mask /* filter */ ,
+ ClientPtr /* dontClient */ );
+
+extern _X_EXPORT int ProcWarpPointer(ClientPtr /* client */ );
+
+extern _X_EXPORT int EventSelectForWindow(WindowPtr /* pWin */ ,
+ ClientPtr /* client */ ,
+ Mask /* mask */ );
+
+extern _X_EXPORT int EventSuppressForWindow(WindowPtr /* pWin */ ,
+ ClientPtr /* client */ ,
+ Mask /* mask */ ,
+ Bool * /* checkOptional */ );
+
+extern _X_EXPORT int ProcSetInputFocus(ClientPtr /* client */ );
+
+extern _X_EXPORT int ProcGetInputFocus(ClientPtr /* client */ );
+
+extern _X_EXPORT int ProcGrabPointer(ClientPtr /* client */ );
+
+extern _X_EXPORT int ProcChangeActivePointerGrab(ClientPtr /* client */ );
+
+extern _X_EXPORT int ProcUngrabPointer(ClientPtr /* client */ );
+
+extern _X_EXPORT int ProcGrabKeyboard(ClientPtr /* client */ );
+
+extern _X_EXPORT int ProcUngrabKeyboard(ClientPtr /* client */ );
+
+extern _X_EXPORT int ProcQueryPointer(ClientPtr /* client */ );
+
+extern _X_EXPORT int ProcSendEvent(ClientPtr /* client */ );
+
+extern _X_EXPORT int ProcUngrabKey(ClientPtr /* client */ );
+
+extern _X_EXPORT int ProcGrabKey(ClientPtr /* client */ );
+
+extern _X_EXPORT int ProcGrabButton(ClientPtr /* client */ );
+
+extern _X_EXPORT int ProcUngrabButton(ClientPtr /* client */ );
+
+extern _X_EXPORT int ProcRecolorCursor(ClientPtr /* client */ );
+
+#endif /* DIXEVENTS_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dixfont.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dixfont.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dixfont.h (working copy)
@@ -0,0 +1,147 @@
+/***********************************************************
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef DIXFONT_H
+#define DIXFONT_H 1
+
+#include "dix.h"
+#include <X11/fonts/font.h>
+#include "closure.h"
+#include <X11/fonts/fontstruct.h>
+#include <X11/fonts/fontproto.h>
+
+#define NullDIXFontProp ((DIXFontPropPtr)0)
+
+typedef struct _DIXFontProp *DIXFontPropPtr;
+
+extern _X_EXPORT Bool SetDefaultFont(const char * /*defaultfontname */ );
+
+extern _X_EXPORT void QueueFontWakeup(FontPathElementPtr /*fpe */ );
+
+extern _X_EXPORT void RemoveFontWakeup(FontPathElementPtr /*fpe */ );
+
+extern _X_EXPORT void FontWakeup(void */*data */ ,
+ int /*count */ ,
+ void */*LastSelectMask */ );
+
+extern _X_EXPORT int OpenFont(ClientPtr /*client */ ,
+ XID /*fid */ ,
+ Mask /*flags */ ,
+ unsigned /*lenfname */ ,
+ const char * /*pfontname */ );
+
+extern _X_EXPORT int CloseFont(void */*pfont */ ,
+ XID /*fid */ );
+
+typedef struct _xQueryFontReply *xQueryFontReplyPtr;
+
+extern _X_EXPORT void QueryFont(FontPtr /*pFont */ ,
+ xQueryFontReplyPtr /*pReply */ ,
+ int /*nProtoCCIStructs */ );
+
+extern _X_EXPORT int ListFonts(ClientPtr /*client */ ,
+ unsigned char * /*pattern */ ,
+ unsigned int /*length */ ,
+ unsigned int /*max_names */ );
+
+extern _X_EXPORT int
+ doListFontsWithInfo(ClientPtr /*client */ ,
+ LFWIclosurePtr /*c */ );
+
+extern _X_EXPORT int doPolyText(ClientPtr /*client */ ,
+ PTclosurePtr /*c */
+ );
+
+extern _X_EXPORT int PolyText(ClientPtr /*client */ ,
+ DrawablePtr /*pDraw */ ,
+ GCPtr /*pGC */ ,
+ unsigned char * /*pElt */ ,
+ unsigned char * /*endReq */ ,
+ int /*xorg */ ,
+ int /*yorg */ ,
+ int /*reqType */ ,
+ XID /*did */ );
+
+extern _X_EXPORT int doImageText(ClientPtr /*client */ ,
+ ITclosurePtr /*c */ );
+
+extern _X_EXPORT int ImageText(ClientPtr /*client */ ,
+ DrawablePtr /*pDraw */ ,
+ GCPtr /*pGC */ ,
+ int /*nChars */ ,
+ unsigned char * /*data */ ,
+ int /*xorg */ ,
+ int /*yorg */ ,
+ int /*reqType */ ,
+ XID /*did */ );
+
+extern _X_EXPORT int SetFontPath(ClientPtr /*client */ ,
+ int /*npaths */ ,
+ unsigned char * /*paths */ );
+
+extern _X_EXPORT int SetDefaultFontPath(const char * /*path */ );
+
+extern _X_EXPORT int GetFontPath(ClientPtr client,
+ int *count,
+ int *length, unsigned char **result);
+
+extern _X_EXPORT void DeleteClientFontStuff(ClientPtr /*client */ );
+
+/* Quartz support on Mac OS X pulls in the QuickDraw
+ framework whose InitFonts function conflicts here. */
+#ifdef __APPLE__
+#define InitFonts Darwin_X_InitFonts
+#endif
+extern _X_EXPORT void InitFonts(void);
+
+extern _X_EXPORT void FreeFonts(void);
+
+extern _X_EXPORT FontPtr find_old_font(XID /*id */ );
+
+#define GetGlyphs dixGetGlyphs
+extern _X_EXPORT void dixGetGlyphs(FontPtr /*font */ ,
+ unsigned long /*count */ ,
+ unsigned char * /*chars */ ,
+ FontEncoding /*fontEncoding */ ,
+ unsigned long * /*glyphcount */ ,
+ CharInfoPtr * /*glyphs */ );
+
+extern _X_EXPORT void QueryGlyphExtents(FontPtr /*pFont */ ,
+ CharInfoPtr * /*charinfo */ ,
+ unsigned long /*count */ ,
+ ExtentInfoPtr /*info */ );
+
+extern _X_EXPORT Bool QueryTextExtents(FontPtr /*pFont */ ,
+ unsigned long /*count */ ,
+ unsigned char * /*chars */ ,
+ ExtentInfoPtr /*info */ );
+
+extern _X_EXPORT Bool ParseGlyphCachingMode(char * /*str */ );
+
+extern _X_EXPORT void InitGlyphCaching(void);
+
+extern _X_EXPORT void SetGlyphCachingMode(int /*newmode */ );
+
+extern _X_EXPORT void register_fpe_functions(void);
+
+#endif /* DIXFONT_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dixfontstr.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dixfontstr.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dixfontstr.h (working copy)
@@ -0,0 +1,93 @@
+/***********************************************************
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef DIXFONTSTRUCT_H
+#define DIXFONTSTRUCT_H
+
+#include "servermd.h"
+#include "dixfont.h"
+#include <X11/fonts/fontstruct.h>
+#include "closure.h"
+#include <X11/Xproto.h> /* for xQueryFontReply */
+
+#define FONTCHARSET(font) (font)
+#define FONTMAXBOUNDS(font,field) (font)->info.maxbounds.field
+#define FONTMINBOUNDS(font,field) (font)->info.minbounds.field
+#define TERMINALFONT(font) (font)->info.terminalFont
+#define FONTASCENT(font) (font)->info.fontAscent
+#define FONTDESCENT(font) (font)->info.fontDescent
+#define FONTGLYPHS(font) 0
+#define FONTCONSTMETRICS(font) (font)->info.constantMetrics
+#define FONTCONSTWIDTH(font) (font)->info.constantWidth
+#define FONTALLEXIST(font) (font)->info.allExist
+#define FONTFIRSTCOL(font) (font)->info.firstCol
+#define FONTLASTCOL(font) (font)->info.lastCol
+#define FONTFIRSTROW(font) (font)->info.firstRow
+#define FONTLASTROW(font) (font)->info.lastRow
+#define FONTDEFAULTCH(font) (font)->info.defaultCh
+#define FONTINKMIN(font) (&((font)->info.ink_minbounds))
+#define FONTINKMAX(font) (&((font)->info.ink_maxbounds))
+#define FONTPROPS(font) (font)->info.props
+#define FONTGLYPHBITS(base,pci) ((unsigned char *) (pci)->bits)
+#define FONTINFONPROPS(font) (font)->info.nprops
+
+/* some things haven't changed names, but we'll be careful anyway */
+
+#define FONTREFCNT(font) (font)->refcnt
+
+/*
+ * for linear char sets
+ */
+#define N1dChars(pfont) (FONTLASTCOL(pfont) - FONTFIRSTCOL(pfont) + 1)
+
+/*
+ * for 2D char sets
+ */
+#define N2dChars(pfont) (N1dChars(pfont) * \
+ (FONTLASTROW(pfont) - FONTFIRSTROW(pfont) + 1))
+
+#ifndef GLYPHPADBYTES
+#define GLYPHPADBYTES -1
+#endif
+
+#if GLYPHPADBYTES == 0 || GLYPHPADBYTES == 1
+#define GLYPHWIDTHBYTESPADDED(pci) (GLYPHWIDTHBYTES(pci))
+#define PADGLYPHWIDTHBYTES(w) (((w)+7)>>3)
+#endif
+
+#if GLYPHPADBYTES == 2
+#define GLYPHWIDTHBYTESPADDED(pci) ((GLYPHWIDTHBYTES(pci)+1) & ~0x1)
+#define PADGLYPHWIDTHBYTES(w) (((((w)+7)>>3)+1) & ~0x1)
+#endif
+
+#if GLYPHPADBYTES == 4
+#define GLYPHWIDTHBYTESPADDED(pci) ((GLYPHWIDTHBYTES(pci)+3) & ~0x3)
+#define PADGLYPHWIDTHBYTES(w) (((((w)+7)>>3)+3) & ~0x3)
+#endif
+
+#if GLYPHPADBYTES == 8 /* for a cray? */
+#define GLYPHWIDTHBYTESPADDED(pci) ((GLYPHWIDTHBYTES(pci)+7) & ~0x7)
+#define PADGLYPHWIDTHBYTES(w) (((((w)+7)>>3)+7) & ~0x7)
+#endif
+
+#endif /* DIXFONTSTRUCT_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dixgrabs.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dixgrabs.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dixgrabs.h (working copy)
@@ -0,0 +1,64 @@
+/************************************************************
+
+Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of the above listed
+copyright holder(s) not be used in advertising or publicity pertaining
+to distribution of the software without specific, written prior
+permission.
+
+THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD
+TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
+LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+#ifndef DIXGRABS_H
+#define DIXGRABS_H 1
+
+struct _GrabParameters;
+
+extern void PrintDeviceGrabInfo(DeviceIntPtr dev);
+extern void UngrabAllDevices(Bool kill_client);
+
+extern GrabPtr AllocGrab(const GrabPtr src);
+extern void FreeGrab(GrabPtr grab);
+extern Bool CopyGrab(GrabPtr dst, const GrabPtr src);
+
+extern GrabPtr CreateGrab(int /* client */ ,
+ DeviceIntPtr /* device */ ,
+ DeviceIntPtr /* modDevice */ ,
+ WindowPtr /* window */ ,
+ enum InputLevel /* grabtype */ ,
+ GrabMask * /* mask */ ,
+ struct _GrabParameters * /* param */ ,
+ int /* type */ ,
+ KeyCode /* keybut */ ,
+ WindowPtr /* confineTo */ ,
+ CursorPtr /* cursor */ );
+
+extern _X_EXPORT int DeletePassiveGrab(void */* value */ ,
+ XID /* id */ );
+
+extern _X_EXPORT Bool GrabMatchesSecond(GrabPtr /* pFirstGrab */ ,
+ GrabPtr /* pSecondGrab */ ,
+ Bool /*ignoreDevice */ );
+
+extern _X_EXPORT int AddPassiveGrabToList(ClientPtr /* client */ ,
+ GrabPtr /* pGrab */ );
+
+extern _X_EXPORT Bool DeletePassiveGrabFromList(GrabPtr /* pMinuendGrab */ );
+
+extern Bool GrabIsPointerGrab(GrabPtr grab);
+extern Bool GrabIsKeyboardGrab(GrabPtr grab);
+#endif /* DIXGRABS_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dixstruct.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dixstruct.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dixstruct.h (working copy)
@@ -0,0 +1,193 @@
+/***********************************************************
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef DIXSTRUCT_H
+#define DIXSTRUCT_H
+
+#include "client.h"
+#include "dix.h"
+#include "resource.h"
+#include "cursor.h"
+#include "gc.h"
+#include "pixmap.h"
+#include "privates.h"
+#include <X11/Xmd.h>
+
+/*
+ * direct-mapped hash table, used by resource manager to store
+ * translation from client ids to server addresses.
+ */
+
+extern _X_EXPORT CallbackListPtr ClientStateCallback;
+
+typedef struct {
+ ClientPtr client;
+ xConnSetupPrefix *prefix;
+ xConnSetup *setup;
+} NewClientInfoRec;
+
+typedef void (*ReplySwapPtr) (ClientPtr /* pClient */ ,
+ int /* size */ ,
+ void * /* pbuf */ );
+
+extern _X_EXPORT void
+ReplyNotSwappd(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ void * /* pbuf */ ) _X_NORETURN;
+
+typedef enum { ClientStateInitial,
+ ClientStateRunning,
+ ClientStateRetained,
+ ClientStateGone
+} ClientState;
+
+typedef struct _saveSet {
+ struct _Window *windowPtr;
+ Bool toRoot;
+ Bool map;
+} SaveSetElt;
+#define SaveSetWindow(ss) ((ss).windowPtr)
+#define SaveSetToRoot(ss) ((ss).toRoot)
+#define SaveSetShouldMap(ss) ((ss).map)
+#define SaveSetAssignWindow(ss,w) ((ss).windowPtr = (w))
+#define SaveSetAssignToRoot(ss,tr) ((ss).toRoot = (tr))
+#define SaveSetAssignMap(ss,m) ((ss).map = (m))
+
+typedef struct _Client {
+ void *requestBuffer;
+ void *osPrivate; /* for OS layer, including scheduler */
+ Mask clientAsMask;
+ short index;
+ unsigned char majorOp, minorOp;
+ unsigned int swapped:1;
+ unsigned int local:1;
+ unsigned int big_requests:1; /* supports large requests */
+ unsigned int clientGone:1;
+ unsigned int closeDownMode:2;
+ unsigned int clientState:2;
+ signed char smart_priority;
+ short noClientException; /* this client died or needs to be killed */
+ int priority;
+ ReplySwapPtr pSwapReplyFunc;
+ XID errorValue;
+ int sequence;
+ int ignoreCount; /* count for Attend/IgnoreClient */
+ int numSaved;
+ SaveSetElt *saveSet;
+ int (**requestVector) (ClientPtr /* pClient */ );
+ CARD32 req_len; /* length of current request */
+ unsigned int replyBytesRemaining;
+ PrivateRec *devPrivates;
+ unsigned short xkbClientFlags;
+ unsigned short mapNotifyMask;
+ unsigned short newKeyboardNotifyMask;
+ unsigned short vMajor, vMinor;
+ KeyCode minKC, maxKC;
+
+ int smart_start_tick;
+ int smart_stop_tick;
+
+ DeviceIntPtr clientPtr;
+ ClientIdPtr clientIds;
+#if XTRANS_SEND_FDS
+ int req_fds;
+#endif
+} ClientRec;
+
+#if XTRANS_SEND_FDS
+static inline void
+SetReqFds(ClientPtr client, int req_fds) {
+ if (client->req_fds != 0 && req_fds != client->req_fds)
+ LogMessage(X_ERROR, "Mismatching number of request fds %d != %d\n", req_fds, client->req_fds);
+ client->req_fds = req_fds;
+}
+#endif
+
+/*
+ * Scheduling interface
+ */
+extern _X_EXPORT long SmartScheduleTime;
+extern _X_EXPORT long SmartScheduleInterval;
+extern _X_EXPORT long SmartScheduleSlice;
+extern _X_EXPORT long SmartScheduleMaxSlice;
+extern _X_EXPORT Bool SmartScheduleDisable;
+extern _X_EXPORT void
+SmartScheduleStartTimer(void);
+extern _X_EXPORT void
+SmartScheduleStopTimer(void);
+
+#define SMART_MAX_PRIORITY (20)
+#define SMART_MIN_PRIORITY (-20)
+
+extern _X_EXPORT void
+SmartScheduleInit(void);
+
+/* This prototype is used pervasively in Xext, dix */
+#define DISPATCH_PROC(func) int func(ClientPtr /* client */)
+
+typedef struct _WorkQueue {
+ struct _WorkQueue *next;
+ Bool (*function) (ClientPtr /* pClient */ ,
+ void * /* closure */
+ );
+ ClientPtr client;
+ void *closure;
+} WorkQueueRec;
+
+extern _X_EXPORT TimeStamp currentTime;
+
+extern _X_EXPORT int
+CompareTimeStamps(TimeStamp /*a */ ,
+ TimeStamp /*b */ );
+
+extern _X_EXPORT TimeStamp
+ClientTimeToServerTime(CARD32 /*c */ );
+
+typedef struct _CallbackRec {
+ CallbackProcPtr proc;
+ void *data;
+ Bool deleted;
+ struct _CallbackRec *next;
+} CallbackRec, *CallbackPtr;
+
+typedef struct _CallbackList {
+ int inCallback;
+ Bool deleted;
+ int numDeleted;
+ CallbackPtr list;
+} CallbackListRec;
+
+/* proc vectors */
+
+extern _X_EXPORT int (*InitialVector[3]) (ClientPtr /*client */ );
+
+extern _X_EXPORT int (*ProcVector[256]) (ClientPtr /*client */ );
+
+extern _X_EXPORT int (*SwappedProcVector[256]) (ClientPtr /*client */ );
+
+extern _X_EXPORT ReplySwapPtr ReplySwapVector[256];
+
+extern _X_EXPORT int
+ProcBadRequest(ClientPtr /*client */ );
+
+#endif /* DIXSTRUCT_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dri.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dri.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dri.h (working copy)
@@ -0,0 +1,361 @@
+/**************************************************************************
+
+Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
+All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sub license, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice (including the
+next paragraph) shall be included in all copies or substantial portions
+of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+**************************************************************************/
+
+/*
+ * Authors:
+ * Jens Owen <jens@tungstengraphics.com>
+ *
+ */
+
+/* Prototypes for DRI functions */
+
+#ifndef _DRI_H_
+
+#include <pciaccess.h>
+
+#include "scrnintstr.h"
+#include "xf86dri.h"
+
+typedef int DRISyncType;
+
+#define DRI_NO_SYNC 0
+#define DRI_2D_SYNC 1
+#define DRI_3D_SYNC 2
+
+typedef int DRIContextType;
+
+typedef struct _DRIContextPrivRec DRIContextPrivRec, *DRIContextPrivPtr;
+
+typedef enum _DRIContextFlags {
+ DRI_CONTEXT_2DONLY = 0x01,
+ DRI_CONTEXT_PRESERVED = 0x02,
+ DRI_CONTEXT_RESERVED = 0x04 /* DRI Only -- no kernel equivalent */
+} DRIContextFlags;
+
+#define DRI_NO_CONTEXT 0
+#define DRI_2D_CONTEXT 1
+#define DRI_3D_CONTEXT 2
+
+typedef int DRISwapMethod;
+
+#define DRI_HIDE_X_CONTEXT 0
+#define DRI_SERVER_SWAP 1
+#define DRI_KERNEL_SWAP 2
+
+typedef int DRIWindowRequests;
+
+#define DRI_NO_WINDOWS 0
+#define DRI_3D_WINDOWS_ONLY 1
+#define DRI_ALL_WINDOWS 2
+
+typedef void (*ClipNotifyPtr) (WindowPtr, int, int);
+typedef void (*AdjustFramePtr) (ScrnInfoPtr pScrn, int x, int y);
+
+/*
+ * These functions can be wrapped by the DRI. Each of these have
+ * generic default funcs (initialized in DRICreateInfoRec) and can be
+ * overridden by the driver in its [driver]DRIScreenInit function.
+ */
+typedef struct {
+ ScreenWakeupHandlerProcPtr WakeupHandler;
+ ScreenBlockHandlerProcPtr BlockHandler;
+ WindowExposuresProcPtr WindowExposures;
+ CopyWindowProcPtr CopyWindow;
+ ValidateTreeProcPtr ValidateTree;
+ PostValidateTreeProcPtr PostValidateTree;
+ ClipNotifyProcPtr ClipNotify;
+ AdjustFramePtr AdjustFrame;
+} DRIWrappedFuncsRec, *DRIWrappedFuncsPtr;
+
+/*
+ * Prior to Xorg 6.8.99.8, the DRIInfoRec structure was implicitly versioned
+ * by the XF86DRI_*_VERSION defines in xf86dristr.h. These numbers were also
+ * being used to version the XFree86-DRI protocol. Bugs #3066 and #3163
+ * showed that this was inadequate. The DRIInfoRec structure is now versioned
+ * by the DRIINFO_*_VERSION defines in this file. - ajax, 2005-05-18.
+ *
+ * Revision history:
+ * 4.1.0 and earlier: DRIQueryVersion returns XF86DRI_*_VERSION.
+ * 4.2.0: DRIQueryVersion begins returning DRIINFO_*_VERSION.
+ * 5.0.0: frameBufferPhysicalAddress changed from CARD32 to pointer.
+ */
+
+#define DRIINFO_MAJOR_VERSION 5
+#define DRIINFO_MINOR_VERSION 4
+#define DRIINFO_PATCH_VERSION 0
+
+typedef unsigned long long (*DRITexOffsetStartProcPtr) (PixmapPtr pPix);
+typedef void (*DRITexOffsetFinishProcPtr) (PixmapPtr pPix);
+
+typedef struct {
+ /* driver call back functions
+ *
+ * New fields should be added at the end for backwards compatibility.
+ * Bump the DRIINFO patch number to indicate bugfixes.
+ * Bump the DRIINFO minor number to indicate new fields.
+ * Bump the DRIINFO major number to indicate binary-incompatible changes.
+ */
+ Bool (*CreateContext) (ScreenPtr pScreen,
+ VisualPtr visual,
+ drm_context_t hHWContext,
+ void *pVisualConfigPriv, DRIContextType context);
+ void (*DestroyContext) (ScreenPtr pScreen,
+ drm_context_t hHWContext, DRIContextType context);
+ void (*SwapContext) (ScreenPtr pScreen,
+ DRISyncType syncType,
+ DRIContextType readContextType,
+ void *readContextStore,
+ DRIContextType writeContextType,
+ void *writeContextStore);
+ void (*InitBuffers) (WindowPtr pWin, RegionPtr prgn, CARD32 indx);
+ void (*MoveBuffers) (WindowPtr pWin,
+ DDXPointRec ptOldOrg, RegionPtr prgnSrc, CARD32 indx);
+ void (*TransitionTo3d) (ScreenPtr pScreen);
+ void (*TransitionTo2d) (ScreenPtr pScreen);
+
+ void (*SetDrawableIndex) (WindowPtr pWin, CARD32 indx);
+ Bool (*OpenFullScreen) (ScreenPtr pScreen);
+ Bool (*CloseFullScreen) (ScreenPtr pScreen);
+
+ /* wrapped functions */
+ DRIWrappedFuncsRec wrap;
+
+ /* device info */
+ char *drmDriverName;
+ char *clientDriverName;
+ char *busIdString;
+ int ddxDriverMajorVersion;
+ int ddxDriverMinorVersion;
+ int ddxDriverPatchVersion;
+ void *frameBufferPhysicalAddress;
+ long frameBufferSize;
+ long frameBufferStride;
+ long SAREASize;
+ int maxDrawableTableEntry;
+ int ddxDrawableTableEntry;
+ long contextSize;
+ DRISwapMethod driverSwapMethod;
+ DRIWindowRequests bufferRequests;
+ int devPrivateSize;
+ void *devPrivate;
+ Bool createDummyCtx;
+ Bool createDummyCtxPriv;
+
+ /* New with DRI version 4.1.0 */
+ void (*TransitionSingleToMulti3D) (ScreenPtr pScreen);
+ void (*TransitionMultiToSingle3D) (ScreenPtr pScreen);
+
+ /* New with DRI version 5.1.0 */
+ void (*ClipNotify) (ScreenPtr pScreen, WindowPtr *ppWin, int num);
+
+ /* New with DRI version 5.2.0 */
+ Bool allocSarea;
+ Bool keepFDOpen;
+
+ /* New with DRI version 5.3.0 */
+ DRITexOffsetStartProcPtr texOffsetStart;
+ DRITexOffsetFinishProcPtr texOffsetFinish;
+
+ /* New with DRI version 5.4.0 */
+ int dontMapFrameBuffer;
+ drm_handle_t hFrameBuffer; /* Handle to framebuffer, either
+ * mapped by DDX driver or DRI */
+
+} DRIInfoRec, *DRIInfoPtr;
+
+extern _X_EXPORT Bool DRIOpenDRMMaster(ScrnInfoPtr pScrn,
+ unsigned long sAreaSize,
+ const char *busID,
+ const char *drmDriverName);
+
+extern _X_EXPORT Bool DRIScreenInit(ScreenPtr pScreen,
+ DRIInfoPtr pDRIInfo, int *pDRMFD);
+
+extern _X_EXPORT void DRICloseScreen(ScreenPtr pScreen);
+
+extern Bool DRIExtensionInit(void);
+
+extern _X_EXPORT void DRIReset(void);
+
+extern _X_EXPORT Bool DRIQueryDirectRenderingCapable(ScreenPtr pScreen,
+ Bool *isCapable);
+
+extern _X_EXPORT Bool DRIOpenConnection(ScreenPtr pScreen,
+ drm_handle_t * hSAREA,
+ char **busIdString);
+
+extern _X_EXPORT Bool DRIAuthConnection(ScreenPtr pScreen, drm_magic_t magic);
+
+extern _X_EXPORT Bool DRICloseConnection(ScreenPtr pScreen);
+
+extern _X_EXPORT Bool DRIGetClientDriverName(ScreenPtr pScreen,
+ int *ddxDriverMajorVersion,
+ int *ddxDriverMinorVersion,
+ int *ddxDriverPatchVersion,
+ char **clientDriverName);
+
+extern _X_EXPORT Bool DRICreateContext(ScreenPtr pScreen,
+ VisualPtr visual,
+ XID context, drm_context_t * pHWContext);
+
+extern _X_EXPORT Bool DRIDestroyContext(ScreenPtr pScreen, XID context);
+
+extern _X_EXPORT Bool DRIContextPrivDelete(void *pResource, XID id);
+
+extern _X_EXPORT Bool DRICreateDrawable(ScreenPtr pScreen,
+ ClientPtr client,
+ DrawablePtr pDrawable,
+ drm_drawable_t * hHWDrawable);
+
+extern _X_EXPORT Bool DRIDestroyDrawable(ScreenPtr pScreen,
+ ClientPtr client,
+ DrawablePtr pDrawable);
+
+extern _X_EXPORT Bool DRIDrawablePrivDelete(void *pResource, XID id);
+
+extern _X_EXPORT Bool DRIGetDrawableInfo(ScreenPtr pScreen,
+ DrawablePtr pDrawable,
+ unsigned int *indx,
+ unsigned int *stamp,
+ int *X,
+ int *Y,
+ int *W,
+ int *H,
+ int *numClipRects,
+ drm_clip_rect_t ** pClipRects,
+ int *backX,
+ int *backY,
+ int *numBackClipRects,
+ drm_clip_rect_t ** pBackClipRects);
+
+extern _X_EXPORT Bool DRIGetDeviceInfo(ScreenPtr pScreen,
+ drm_handle_t * hFrameBuffer,
+ int *fbOrigin,
+ int *fbSize,
+ int *fbStride,
+ int *devPrivateSize, void **pDevPrivate);
+
+extern _X_EXPORT DRIInfoPtr DRICreateInfoRec(void);
+
+extern _X_EXPORT void DRIDestroyInfoRec(DRIInfoPtr DRIInfo);
+
+extern _X_EXPORT Bool DRIFinishScreenInit(ScreenPtr pScreen);
+
+extern _X_EXPORT void DRIWakeupHandler(void *wakeupData,
+ int result, void *pReadmask);
+
+extern _X_EXPORT void DRIBlockHandler(void *blockData,
+ OSTimePtr pTimeout, void *pReadmask);
+
+extern _X_EXPORT void DRIDoWakeupHandler(ScreenPtr pScreen,
+ unsigned long result,
+ void *pReadmask);
+
+extern _X_EXPORT void DRIDoBlockHandler(ScreenPtr pScreen,
+ void *pTimeout, void *pReadmask);
+
+extern _X_EXPORT void DRISwapContext(int drmFD, void *oldctx, void *newctx);
+
+extern _X_EXPORT void *DRIGetContextStore(DRIContextPrivPtr context);
+
+extern _X_EXPORT void DRIWindowExposures(WindowPtr pWin,
+ RegionPtr prgn, RegionPtr bsreg);
+
+extern _X_EXPORT Bool DRIDestroyWindow(WindowPtr pWin);
+
+extern _X_EXPORT void DRICopyWindow(WindowPtr pWin,
+ DDXPointRec ptOldOrg, RegionPtr prgnSrc);
+
+extern _X_EXPORT int DRIValidateTree(WindowPtr pParent,
+ WindowPtr pChild, VTKind kind);
+
+extern _X_EXPORT void DRIPostValidateTree(WindowPtr pParent,
+ WindowPtr pChild, VTKind kind);
+
+extern _X_EXPORT void DRIClipNotify(WindowPtr pWin, int dx, int dy);
+
+extern _X_EXPORT CARD32 DRIGetDrawableIndex(WindowPtr pWin);
+
+extern _X_EXPORT void DRIPrintDrawableLock(ScreenPtr pScreen, char *msg);
+
+extern _X_EXPORT void DRILock(ScreenPtr pScreen, int flags);
+
+extern _X_EXPORT void DRIUnlock(ScreenPtr pScreen);
+
+extern _X_EXPORT DRIWrappedFuncsRec *DRIGetWrappedFuncs(ScreenPtr pScreen);
+
+extern _X_EXPORT void *DRIGetSAREAPrivate(ScreenPtr pScreen);
+
+extern _X_EXPORT unsigned int DRIGetDrawableStamp(ScreenPtr pScreen,
+ CARD32 drawable_index);
+
+extern _X_EXPORT DRIContextPrivPtr DRICreateContextPriv(ScreenPtr pScreen,
+ drm_context_t *
+ pHWContext,
+ DRIContextFlags flags);
+
+extern _X_EXPORT DRIContextPrivPtr DRICreateContextPrivFromHandle(ScreenPtr
+ pScreen,
+ drm_context_t
+ hHWContext,
+ DRIContextFlags
+ flags);
+
+extern _X_EXPORT Bool DRIDestroyContextPriv(DRIContextPrivPtr pDRIContextPriv);
+
+extern _X_EXPORT drm_context_t DRIGetContext(ScreenPtr pScreen);
+
+extern _X_EXPORT void DRIQueryVersion(int *majorVersion,
+ int *minorVersion, int *patchVersion);
+
+extern _X_EXPORT void DRIAdjustFrame(ScrnInfoPtr pScrn, int x, int y);
+
+extern _X_EXPORT void DRIMoveBuffersHelper(ScreenPtr pScreen,
+ int dx,
+ int dy,
+ int *xdir, int *ydir, RegionPtr reg);
+
+extern _X_EXPORT char *DRICreatePCIBusID(const struct pci_device *PciInfo);
+
+extern _X_EXPORT int drmInstallSIGIOHandler(int fd,
+ void (*f) (int, void *, void *));
+extern _X_EXPORT int drmRemoveSIGIOHandler(int fd);
+extern _X_EXPORT int DRIMasterFD(ScrnInfoPtr pScrn);
+
+extern _X_EXPORT void *DRIMasterSareaPointer(ScrnInfoPtr pScrn);
+
+extern _X_EXPORT drm_handle_t DRIMasterSareaHandle(ScrnInfoPtr pScrn);
+
+extern _X_EXPORT void DRIGetTexOffsetFuncs(ScreenPtr pScreen,
+ DRITexOffsetStartProcPtr *
+ texOffsetStartFunc,
+ DRITexOffsetFinishProcPtr *
+ texOffsetFinishFunc);
+
+#define _DRI_H_
+
+#endif
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dri2.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dri2.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dri2.h (working copy)
@@ -0,0 +1,362 @@
+/*
+ * Copyright © 2007 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Soft-
+ * ware"), to deal in the Software without restriction, including without
+ * limitation the rights to use, copy, modify, merge, publish, distribute,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, provided that the above copyright
+ * notice(s) and this permission notice appear in all copies of the Soft-
+ * ware and that both the above copyright notice(s) and this permission
+ * notice appear in supporting documentation.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+ * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY
+ * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN
+ * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE-
+ * QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR-
+ * MANCE OF THIS SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall
+ * not be used in advertising or otherwise to promote the sale, use or
+ * other dealings in this Software without prior written authorization of
+ * the copyright holder.
+ *
+ * Authors:
+ * Kristian Høgsberg (krh@redhat.com)
+ */
+
+#ifndef _DRI2_H_
+#define _DRI2_H_
+
+#include <X11/extensions/dri2tokens.h>
+
+/* Version 2 structure (with format at the end) */
+typedef struct {
+ unsigned int attachment;
+ unsigned int name;
+ unsigned int pitch;
+ unsigned int cpp;
+ unsigned int flags;
+ unsigned int format;
+ void *driverPrivate;
+} DRI2BufferRec, *DRI2BufferPtr;
+
+extern CARD8 dri2_major; /* version of DRI2 supported by DDX */
+extern CARD8 dri2_minor;
+
+typedef DRI2BufferRec DRI2Buffer2Rec, *DRI2Buffer2Ptr;
+typedef void (*DRI2SwapEventPtr) (ClientPtr client, void *data, int type,
+ CARD64 ust, CARD64 msc, CARD32 sbc);
+
+typedef DRI2BufferPtr(*DRI2CreateBuffersProcPtr) (DrawablePtr pDraw,
+ unsigned int *attachments,
+ int count);
+typedef void (*DRI2DestroyBuffersProcPtr) (DrawablePtr pDraw,
+ DRI2BufferPtr buffers, int count);
+typedef void (*DRI2CopyRegionProcPtr) (DrawablePtr pDraw,
+ RegionPtr pRegion,
+ DRI2BufferPtr pDestBuffer,
+ DRI2BufferPtr pSrcBuffer);
+typedef void (*DRI2WaitProcPtr) (WindowPtr pWin, unsigned int sequence);
+typedef int (*DRI2AuthMagicProcPtr) (int fd, uint32_t magic);
+typedef int (*DRI2AuthMagic2ProcPtr) (ScreenPtr pScreen, uint32_t magic);
+
+/**
+ * Schedule a buffer swap
+ *
+ * This callback is used to support glXSwapBuffers and the OML_sync_control
+ * extension (see it for a description of the params).
+ *
+ * Drivers should queue an event for the frame count that satisfies the
+ * parameters passed in. If the event is in the future (i.e. the conditions
+ * aren't currently satisfied), the server may block the client at the next
+ * GLX request using DRI2WaitSwap. When the event arrives, drivers should call
+ * \c DRI2SwapComplete, which will handle waking the client and returning
+ * the appropriate data.
+ *
+ * The DDX is responsible for doing a flip, exchange, or blit of the swap
+ * when the corresponding event arrives. The \c DRI2CanFlip and
+ * \c DRI2CanExchange functions can be used as helpers for this purpose.
+ *
+ * \param client client pointer (used for block/unblock)
+ * \param pDraw drawable whose count we want
+ * \param pDestBuffer current front buffer
+ * \param pSrcBuffer current back buffer
+ * \param target_msc frame count to wait for
+ * \param divisor divisor for condition equation
+ * \param remainder remainder for division equation
+ * \param func function to call when the swap completes
+ * \param data data for the callback \p func.
+ */
+typedef int (*DRI2ScheduleSwapProcPtr) (ClientPtr client,
+ DrawablePtr pDraw,
+ DRI2BufferPtr pDestBuffer,
+ DRI2BufferPtr pSrcBuffer,
+ CARD64 * target_msc,
+ CARD64 divisor,
+ CARD64 remainder,
+ DRI2SwapEventPtr func, void *data);
+typedef DRI2BufferPtr(*DRI2CreateBufferProcPtr) (DrawablePtr pDraw,
+ unsigned int attachment,
+ unsigned int format);
+typedef void (*DRI2DestroyBufferProcPtr) (DrawablePtr pDraw,
+ DRI2BufferPtr buffer);
+/**
+ * Notifies driver when DRI2GetBuffers reuses a dri2 buffer.
+ *
+ * Driver may rename the dri2 buffer in this notify if it is required.
+ *
+ * \param pDraw drawable whose count we want
+ * \param buffer buffer that will be returned to client
+ */
+typedef void (*DRI2ReuseBufferNotifyProcPtr) (DrawablePtr pDraw,
+ DRI2BufferPtr buffer);
+/**
+ * Get current media stamp counter values
+ *
+ * This callback is used to support the SGI_video_sync and OML_sync_control
+ * extensions.
+ *
+ * Drivers should return the current frame counter and the timestamp from
+ * when the returned frame count was last incremented.
+ *
+ * The count should correspond to the screen where the drawable is currently
+ * visible. If the drawable isn't visible (e.g. redirected), the server
+ * should return BadDrawable to the client, pending GLX spec updates to
+ * define this behavior.
+ *
+ * \param pDraw drawable whose count we want
+ * \param ust timestamp from when the count was last incremented.
+ * \param mst current frame count
+ */
+typedef int (*DRI2GetMSCProcPtr) (DrawablePtr pDraw, CARD64 * ust,
+ CARD64 * msc);
+/**
+ * Schedule a frame count related wait
+ *
+ * This callback is used to support the SGI_video_sync and OML_sync_control
+ * extensions. See those specifications for details on how to handle
+ * the divisor and remainder parameters.
+ *
+ * Drivers should queue an event for the frame count that satisfies the
+ * parameters passed in. If the event is in the future (i.e. the conditions
+ * aren't currently satisfied), the driver should block the client using
+ * \c DRI2BlockClient. When the event arrives, drivers should call
+ * \c DRI2WaitMSCComplete, which will handle waking the client and returning
+ * the appropriate data.
+ *
+ * \param client client pointer (used for block/unblock)
+ * \param pDraw drawable whose count we want
+ * \param target_msc frame count to wait for
+ * \param divisor divisor for condition equation
+ * \param remainder remainder for division equation
+ */
+typedef int (*DRI2ScheduleWaitMSCProcPtr) (ClientPtr client,
+ DrawablePtr pDraw,
+ CARD64 target_msc,
+ CARD64 divisor, CARD64 remainder);
+
+typedef void (*DRI2InvalidateProcPtr) (DrawablePtr pDraw, void *data, XID id);
+
+/**
+ * DRI2 calls this hook when ever swap_limit is going to be changed. Default
+ * implementation for the hook only accepts one as swap_limit. If driver can
+ * support other swap_limits it has to implement supported limits with this
+ * callback.
+ *
+ * \param pDraw drawable whos swap_limit is going to be changed
+ * \param swap_limit new swap_limit that going to be set
+ * \return TRUE if limit is support, FALSE if not.
+ */
+typedef Bool (*DRI2SwapLimitValidateProcPtr) (DrawablePtr pDraw,
+ int swap_limit);
+
+typedef DRI2BufferPtr(*DRI2CreateBuffer2ProcPtr) (ScreenPtr pScreen,
+ DrawablePtr pDraw,
+ unsigned int attachment,
+ unsigned int format);
+typedef void (*DRI2DestroyBuffer2ProcPtr) (ScreenPtr pScreen, DrawablePtr pDraw,
+ DRI2BufferPtr buffer);
+
+typedef void (*DRI2CopyRegion2ProcPtr) (ScreenPtr pScreen, DrawablePtr pDraw,
+ RegionPtr pRegion,
+ DRI2BufferPtr pDestBuffer,
+ DRI2BufferPtr pSrcBuffer);
+
+/**
+ * \brief Get the value of a parameter.
+ *
+ * The parameter's \a value is looked up on the screen associated with
+ * \a pDrawable.
+ *
+ * \return \c Success or error code.
+ */
+typedef int (*DRI2GetParamProcPtr) (ClientPtr client,
+ DrawablePtr pDrawable,
+ CARD64 param,
+ BOOL *is_param_recognized,
+ CARD64 *value);
+
+/**
+ * Version of the DRI2InfoRec structure defined in this header
+ */
+#define DRI2INFOREC_VERSION 9
+
+typedef struct {
+ unsigned int version; /**< Version of this struct */
+ int fd;
+ const char *driverName;
+ const char *deviceName;
+
+ DRI2CreateBufferProcPtr CreateBuffer;
+ DRI2DestroyBufferProcPtr DestroyBuffer;
+ DRI2CopyRegionProcPtr CopyRegion;
+ DRI2WaitProcPtr Wait;
+
+ /* added in version 4 */
+
+ DRI2ScheduleSwapProcPtr ScheduleSwap;
+ DRI2GetMSCProcPtr GetMSC;
+ DRI2ScheduleWaitMSCProcPtr ScheduleWaitMSC;
+
+ /* number of drivers in the driverNames array */
+ unsigned int numDrivers;
+ /* array of driver names, indexed by DRI2Driver* driver types */
+ /* a name of NULL means that driver is not supported */
+ const char *const *driverNames;
+
+ /* added in version 5 */
+
+ DRI2AuthMagicProcPtr AuthMagic;
+
+ /* added in version 6 */
+
+ DRI2ReuseBufferNotifyProcPtr ReuseBufferNotify;
+ DRI2SwapLimitValidateProcPtr SwapLimitValidate;
+
+ /* added in version 7 */
+ DRI2GetParamProcPtr GetParam;
+
+ /* added in version 8 */
+ /* AuthMagic callback which passes extra context */
+ /* If this is NULL the AuthMagic callback is used */
+ /* If this is non-NULL the AuthMagic callback is ignored */
+ DRI2AuthMagic2ProcPtr AuthMagic2;
+
+ /* added in version 9 */
+ DRI2CreateBuffer2ProcPtr CreateBuffer2;
+ DRI2DestroyBuffer2ProcPtr DestroyBuffer2;
+ DRI2CopyRegion2ProcPtr CopyRegion2;
+} DRI2InfoRec, *DRI2InfoPtr;
+
+extern _X_EXPORT Bool DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info);
+
+extern _X_EXPORT void DRI2CloseScreen(ScreenPtr pScreen);
+
+extern _X_EXPORT Bool DRI2HasSwapControl(ScreenPtr pScreen);
+
+extern _X_EXPORT Bool DRI2Connect(ClientPtr client, ScreenPtr pScreen,
+ unsigned int driverType,
+ int *fd,
+ const char **driverName,
+ const char **deviceName);
+
+extern _X_EXPORT Bool DRI2Authenticate(ClientPtr client, ScreenPtr pScreen, uint32_t magic);
+
+extern _X_EXPORT int DRI2CreateDrawable(ClientPtr client,
+ DrawablePtr pDraw,
+ XID id,
+ DRI2InvalidateProcPtr invalidate,
+ void *priv);
+
+extern _X_EXPORT int DRI2CreateDrawable2(ClientPtr client,
+ DrawablePtr pDraw,
+ XID id,
+ DRI2InvalidateProcPtr invalidate,
+ void *priv,
+ XID *dri2_id_out);
+
+extern _X_EXPORT DRI2BufferPtr *DRI2GetBuffers(DrawablePtr pDraw,
+ int *width,
+ int *height,
+ unsigned int *attachments,
+ int count, int *out_count);
+
+extern _X_EXPORT int DRI2CopyRegion(DrawablePtr pDraw,
+ RegionPtr pRegion,
+ unsigned int dest, unsigned int src);
+
+/**
+ * Determine the major and minor version of the DRI2 extension.
+ *
+ * Provides a mechanism to other modules (e.g., 2D drivers) to determine the
+ * version of the DRI2 extension. While it is possible to peek directly at
+ * the \c XF86ModuleData from a layered module, such a module will fail to
+ * load (due to an unresolved symbol) if the DRI2 extension is not loaded.
+ *
+ * \param major Location to store the major verion of the DRI2 extension
+ * \param minor Location to store the minor verion of the DRI2 extension
+ *
+ * \note
+ * This interface was added some time after the initial release of the DRI2
+ * module. Layered modules that wish to use this interface must first test
+ * its existance by calling \c xf86LoaderCheckSymbol.
+ */
+extern _X_EXPORT void DRI2Version(int *major, int *minor);
+
+extern _X_EXPORT DRI2BufferPtr *DRI2GetBuffersWithFormat(DrawablePtr pDraw,
+ int *width,
+ int *height,
+ unsigned int
+ *attachments,
+ int count,
+ int *out_count);
+
+extern _X_EXPORT void DRI2SwapInterval(DrawablePtr pDrawable, int interval);
+extern _X_EXPORT Bool DRI2SwapLimit(DrawablePtr pDraw, int swap_limit);
+extern _X_EXPORT int DRI2SwapBuffers(ClientPtr client, DrawablePtr pDrawable,
+ CARD64 target_msc, CARD64 divisor,
+ CARD64 remainder, CARD64 * swap_target,
+ DRI2SwapEventPtr func, void *data);
+extern _X_EXPORT Bool DRI2WaitSwap(ClientPtr client, DrawablePtr pDrawable);
+
+extern _X_EXPORT int DRI2GetMSC(DrawablePtr pDrawable, CARD64 * ust,
+ CARD64 * msc, CARD64 * sbc);
+extern _X_EXPORT int DRI2WaitMSC(ClientPtr client, DrawablePtr pDrawable,
+ CARD64 target_msc, CARD64 divisor,
+ CARD64 remainder);
+extern _X_EXPORT int ProcDRI2WaitMSCReply(ClientPtr client, CARD64 ust,
+ CARD64 msc, CARD64 sbc);
+extern _X_EXPORT int DRI2WaitSBC(ClientPtr client, DrawablePtr pDraw,
+ CARD64 target_sbc);
+extern _X_EXPORT Bool DRI2ThrottleClient(ClientPtr client, DrawablePtr pDraw);
+
+extern _X_EXPORT Bool DRI2CanFlip(DrawablePtr pDraw);
+
+extern _X_EXPORT Bool DRI2CanExchange(DrawablePtr pDraw);
+
+/* Note: use *only* for MSC related waits */
+extern _X_EXPORT void DRI2BlockClient(ClientPtr client, DrawablePtr pDraw);
+
+extern _X_EXPORT void DRI2SwapComplete(ClientPtr client, DrawablePtr pDraw,
+ int frame, unsigned int tv_sec,
+ unsigned int tv_usec, int type,
+ DRI2SwapEventPtr swap_complete,
+ void *swap_data);
+extern _X_EXPORT void DRI2WaitMSCComplete(ClientPtr client, DrawablePtr pDraw,
+ int frame, unsigned int tv_sec,
+ unsigned int tv_usec);
+
+extern _X_EXPORT int DRI2GetParam(ClientPtr client,
+ DrawablePtr pDrawable,
+ CARD64 param,
+ BOOL *is_param_recognized,
+ CARD64 *value);
+
+extern _X_EXPORT DrawablePtr DRI2UpdatePrime(DrawablePtr pDraw, DRI2BufferPtr pDest);
+#endif
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dri3.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dri3.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dri3.h (working copy)
@@ -0,0 +1,65 @@
+/*
+ * Copyright © 2013 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no representations
+ * about the suitability of this software for any purpose. It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+#ifndef _DRI3_H_
+#define _DRI3_H_
+
+#include <xorg-server.h>
+
+#ifdef DRI3
+
+#include <X11/extensions/dri3proto.h>
+#include <randrstr.h>
+
+#define DRI3_SCREEN_INFO_VERSION 0
+
+typedef int (*dri3_open_proc)(ScreenPtr screen,
+ RRProviderPtr provider,
+ int *fd);
+
+typedef PixmapPtr (*dri3_pixmap_from_fd_proc) (ScreenPtr screen,
+ int fd,
+ CARD16 width,
+ CARD16 height,
+ CARD16 stride,
+ CARD8 depth,
+ CARD8 bpp);
+
+typedef int (*dri3_fd_from_pixmap_proc) (ScreenPtr screen,
+ PixmapPtr pixmap,
+ CARD16 *stride,
+ CARD32 *size);
+
+typedef struct dri3_screen_info {
+ uint32_t version;
+
+ dri3_open_proc open;
+ dri3_pixmap_from_fd_proc pixmap_from_fd;
+ dri3_fd_from_pixmap_proc fd_from_pixmap;
+} dri3_screen_info_rec, *dri3_screen_info_ptr;
+
+extern _X_EXPORT Bool
+dri3_screen_init(ScreenPtr screen, dri3_screen_info_ptr info);
+
+#endif
+
+#endif /* _DRI3_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dristruct.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dristruct.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/dristruct.h (working copy)
@@ -0,0 +1,124 @@
+/**************************************************************************
+
+Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
+All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sub license, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice (including the
+next paragraph) shall be included in all copies or substantial portions
+of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+**************************************************************************/
+
+/*
+ * Authors:
+ * Jens Owen <jens@tungstengraphics.com>
+ *
+ */
+
+#ifndef DRI_STRUCT_H
+#define DRI_STRUCT_H
+
+#include "xf86drm.h"
+#include "xf86Crtc.h"
+
+#define DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin) ((DRIDrawablePrivPtr) \
+ dixLookupPrivate(&(pWin)->devPrivates, DRIWindowPrivKey))
+#define DRI_DRAWABLE_PRIV_FROM_PIXMAP(pPix) ((DRIDrawablePrivPtr) \
+ dixLookupPrivate(&(pPix)->devPrivates, DRIWindowPrivKey))
+
+typedef struct _DRIDrawablePrivRec {
+ drm_drawable_t hwDrawable;
+ int drawableIndex;
+ ScreenPtr pScreen;
+ int refCount;
+ int nrects;
+} DRIDrawablePrivRec, *DRIDrawablePrivPtr;
+
+struct _DRIContextPrivRec {
+ drm_context_t hwContext;
+ ScreenPtr pScreen;
+ Bool valid3D;
+ DRIContextFlags flags;
+ void **pContextStore;
+};
+
+#define DRI_SCREEN_PRIV(pScreen) ((DRIScreenPrivPtr) \
+ (dixPrivateKeyRegistered(DRIScreenPrivKey) ? \
+ dixLookupPrivate(&(pScreen)->devPrivates, DRIScreenPrivKey) : NULL))
+
+#define DRI_SCREEN_PRIV_FROM_INDEX(screenIndex) ((DRIScreenPrivPtr) \
+ dixLookupPrivate(&screenInfo.screens[screenIndex]->devPrivates, \
+ DRIScreenPrivKey))
+
+#define DRI_ENT_PRIV(pScrn) \
+ ((DRIEntPrivIndex < 0) ? \
+ NULL: \
+ ((DRIEntPrivPtr)(xf86GetEntityPrivate((pScrn)->entityList[0], \
+ DRIEntPrivIndex)->ptr)))
+
+typedef struct _DRIScreenPrivRec {
+ Bool directRenderingSupport;
+ int drmFD; /* File descriptor for /dev/video/? */
+ drm_handle_t hSAREA; /* Handle to SAREA, for mapping */
+ XF86DRISAREAPtr pSAREA; /* Mapped pointer to SAREA */
+ drm_context_t myContext; /* DDX Driver's context */
+ DRIContextPrivPtr myContextPriv; /* Pointer to server's private area */
+ DRIContextPrivPtr lastPartial3DContext; /* last one partially saved */
+ void **hiddenContextStore; /* hidden X context */
+ void **partial3DContextStore; /* parital 3D context */
+ DRIInfoPtr pDriverInfo;
+ int nrWindows;
+ int nrWindowsVisible;
+ int nrWalked;
+ drm_clip_rect_t private_buffer_rect; /* management of private buffers */
+ DrawablePtr fullscreen; /* pointer to fullscreen drawable */
+ drm_clip_rect_t fullscreen_rect; /* fake rect for fullscreen mode */
+ DRIWrappedFuncsRec wrap;
+ DestroyWindowProcPtr DestroyWindow;
+ DrawablePtr DRIDrawables[SAREA_MAX_DRAWABLES];
+ DRIContextPrivPtr dummyCtxPriv; /* Pointer to dummy context */
+ Bool createDummyCtx;
+ Bool createDummyCtxPriv;
+ Bool grabbedDRILock;
+ Bool drmSIGIOHandlerInstalled;
+ Bool wrapped;
+ Bool windowsTouched;
+ int lockRefCount;
+ drm_handle_t hLSAREA; /* Handle to SAREA containing lock, for mapping */
+ XF86DRILSAREAPtr pLSAREA; /* Mapped pointer to SAREA containing lock */
+ int *pLockRefCount;
+ int *pLockingContext;
+ xf86_crtc_notify_proc_ptr xf86_crtc_notify;
+} DRIScreenPrivRec, *DRIScreenPrivPtr;
+
+typedef struct _DRIEntPrivRec {
+ int drmFD;
+ Bool drmOpened;
+ Bool sAreaGrabbed;
+ drm_handle_t hLSAREA;
+ XF86DRILSAREAPtr pLSAREA;
+ unsigned long sAreaSize;
+ int lockRefCount;
+ int lockingContext;
+ ScreenPtr resOwner;
+ Bool keepFDOpen;
+ int refCount;
+} DRIEntPrivRec, *DRIEntPrivPtr;
+
+#endif /* DRI_STRUCT_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/edid.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/edid.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/edid.h (working copy)
@@ -0,0 +1,657 @@
+/*
+ * edid.h: defines to parse an EDID block
+ *
+ * This file contains all information to interpret a standard EDIC block
+ * transmitted by a display device via DDC (Display Data Channel). So far
+ * there is no information to deal with optional EDID blocks.
+ * DDC is a Trademark of VESA (Video Electronics Standard Association).
+ *
+ * Copyright 1998 by Egbert Eich <Egbert.Eich@Physik.TU-Darmstadt.DE>
+ */
+
+#ifndef _EDID_H_
+#define _EDID_H_
+
+#include <X11/Xmd.h>
+
+#ifndef _X_EXPORT
+#include <X11/Xfuncproto.h>
+#endif
+
+/* read complete EDID record */
+#define EDID1_LEN 128
+#define BITS_PER_BYTE 9
+#define NUM BITS_PER_BYTE*EDID1_LEN
+#define HEADER 6
+
+#define STD_TIMINGS 8
+#define DET_TIMINGS 4
+
+#ifdef _PARSE_EDID_
+
+/* header: 0x00 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0x00 */
+#define HEADER_SECTION 0
+#define HEADER_LENGTH 8
+
+/* vendor section */
+#define VENDOR_SECTION (HEADER_SECTION + HEADER_LENGTH)
+#define V_MANUFACTURER 0
+#define V_PROD_ID (V_MANUFACTURER + 2)
+#define V_SERIAL (V_PROD_ID + 2)
+#define V_WEEK (V_SERIAL + 4)
+#define V_YEAR (V_WEEK + 1)
+#define VENDOR_LENGTH (V_YEAR + 1)
+
+/* EDID version */
+#define VERSION_SECTION (VENDOR_SECTION + VENDOR_LENGTH)
+#define V_VERSION 0
+#define V_REVISION (V_VERSION + 1)
+#define VERSION_LENGTH (V_REVISION + 1)
+
+/* display information */
+#define DISPLAY_SECTION (VERSION_SECTION + VERSION_LENGTH)
+#define D_INPUT 0
+#define D_HSIZE (D_INPUT + 1)
+#define D_VSIZE (D_HSIZE + 1)
+#define D_GAMMA (D_VSIZE + 1)
+#define FEAT_S (D_GAMMA + 1)
+#define D_RG_LOW (FEAT_S + 1)
+#define D_BW_LOW (D_RG_LOW + 1)
+#define D_REDX (D_BW_LOW + 1)
+#define D_REDY (D_REDX + 1)
+#define D_GREENX (D_REDY + 1)
+#define D_GREENY (D_GREENX + 1)
+#define D_BLUEX (D_GREENY + 1)
+#define D_BLUEY (D_BLUEX + 1)
+#define D_WHITEX (D_BLUEY + 1)
+#define D_WHITEY (D_WHITEX + 1)
+#define DISPLAY_LENGTH (D_WHITEY + 1)
+
+/* supported VESA and other standard timings */
+#define ESTABLISHED_TIMING_SECTION (DISPLAY_SECTION + DISPLAY_LENGTH)
+#define E_T1 0
+#define E_T2 (E_T1 + 1)
+#define E_TMANU (E_T2 + 1)
+#define E_TIMING_LENGTH (E_TMANU + 1)
+
+/* non predefined standard timings supported by display */
+#define STD_TIMING_SECTION (ESTABLISHED_TIMING_SECTION + E_TIMING_LENGTH)
+#define STD_TIMING_INFO_LEN 2
+#define STD_TIMING_INFO_NUM STD_TIMINGS
+#define STD_TIMING_LENGTH (STD_TIMING_INFO_LEN * STD_TIMING_INFO_NUM)
+
+/* detailed timing info of non standard timings */
+#define DET_TIMING_SECTION (STD_TIMING_SECTION + STD_TIMING_LENGTH)
+#define DET_TIMING_INFO_LEN 18
+#define MONITOR_DESC_LEN DET_TIMING_INFO_LEN
+#define DET_TIMING_INFO_NUM DET_TIMINGS
+#define DET_TIMING_LENGTH (DET_TIMING_INFO_LEN * DET_TIMING_INFO_NUM)
+
+/* number of EDID sections to follow */
+#define NO_EDID (DET_TIMING_SECTION + DET_TIMING_LENGTH)
+/* one byte checksum */
+#define CHECKSUM (NO_EDID + 1)
+
+#if (CHECKSUM != (EDID1_LEN - 1))
+#error "EDID1 length != 128!"
+#endif
+
+#define SECTION(x,y) (Uchar *)(x + y)
+#define GET_ARRAY(y) ((Uchar *)(c + y))
+#define GET(y) *(Uchar *)(c + y)
+
+/* extract information from vendor section */
+#define _PROD_ID(x) x[0] + (x[1] << 8);
+#define PROD_ID _PROD_ID(GET_ARRAY(V_PROD_ID))
+#define _SERIAL_NO(x) x[0] + (x[1] << 8) + (x[2] << 16) + (x[3] << 24)
+#define SERIAL_NO _SERIAL_NO(GET_ARRAY(V_SERIAL))
+#define _YEAR(x) (x & 0xFF) + 1990
+#define YEAR _YEAR(GET(V_YEAR))
+#define WEEK GET(V_WEEK) & 0xFF
+#define _L1(x) ((x[0] & 0x7C) >> 2) + '@'
+#define _L2(x) ((x[0] & 0x03) << 3) + ((x[1] & 0xE0) >> 5) + '@'
+#define _L3(x) (x[1] & 0x1F) + '@';
+#define L1 _L1(GET_ARRAY(V_MANUFACTURER))
+#define L2 _L2(GET_ARRAY(V_MANUFACTURER))
+#define L3 _L3(GET_ARRAY(V_MANUFACTURER))
+
+/* extract information from version section */
+#define VERSION GET(V_VERSION)
+#define REVISION GET(V_REVISION)
+
+/* extract information from display section */
+#define _INPUT_TYPE(x) ((x & 0x80) >> 7)
+#define INPUT_TYPE _INPUT_TYPE(GET(D_INPUT))
+#define _INPUT_VOLTAGE(x) ((x & 0x60) >> 5)
+#define INPUT_VOLTAGE _INPUT_VOLTAGE(GET(D_INPUT))
+#define _SETUP(x) ((x & 0x10) >> 4)
+#define SETUP _SETUP(GET(D_INPUT))
+#define _SYNC(x) (x & 0x0F)
+#define SYNC _SYNC(GET(D_INPUT))
+#define _DFP(x) (x & 0x01)
+#define DFP _DFP(GET(D_INPUT))
+#define _BPC(x) ((x & 0x70) >> 4)
+#define BPC _BPC(GET(D_INPUT))
+#define _DIGITAL_INTERFACE(x) (x & 0x0F)
+#define DIGITAL_INTERFACE _DIGITAL_INTERFACE(GET(D_INPUT))
+#define _GAMMA(x) (x == 0xff ? 0.0 : ((x + 100.0)/100.0))
+#define GAMMA _GAMMA(GET(D_GAMMA))
+#define HSIZE_MAX GET(D_HSIZE)
+#define VSIZE_MAX GET(D_VSIZE)
+#define _DPMS(x) ((x & 0xE0) >> 5)
+#define DPMS _DPMS(GET(FEAT_S))
+#define _DISPLAY_TYPE(x) ((x & 0x18) >> 3)
+#define DISPLAY_TYPE _DISPLAY_TYPE(GET(FEAT_S))
+#define _MSC(x) (x & 0x7)
+#define MSC _MSC(GET(FEAT_S))
+
+/* color characteristics */
+#define CC_L(x,y) ((x & (0x03 << y)) >> y)
+#define CC_H(x) (x << 2)
+#define I_CC(x,y,z) CC_H(y) | CC_L(x,z)
+#define F_CC(x) ((x)/1024.0)
+#define REDX F_CC(I_CC((GET(D_RG_LOW)),(GET(D_REDX)),6))
+#define REDY F_CC(I_CC((GET(D_RG_LOW)),(GET(D_REDY)),4))
+#define GREENX F_CC(I_CC((GET(D_RG_LOW)),(GET(D_GREENX)),2))
+#define GREENY F_CC(I_CC((GET(D_RG_LOW)),(GET(D_GREENY)),0))
+#define BLUEX F_CC(I_CC((GET(D_BW_LOW)),(GET(D_BLUEX)),6))
+#define BLUEY F_CC(I_CC((GET(D_BW_LOW)),(GET(D_BLUEY)),4))
+#define WHITEX F_CC(I_CC((GET(D_BW_LOW)),(GET(D_WHITEX)),2))
+#define WHITEY F_CC(I_CC((GET(D_BW_LOW)),(GET(D_WHITEY)),0))
+
+/* extract information from standard timing section */
+#define T1 GET(E_T1)
+#define T2 GET(E_T2)
+#define T_MANU GET(E_TMANU)
+
+/* extract information from estabished timing section */
+#define _VALID_TIMING(x) !(((x[0] == 0x01) && (x[1] == 0x01)) \
+ || ((x[0] == 0x00) && (x[1] == 0x00)) \
+ || ((x[0] == 0x20) && (x[1] == 0x20)) )
+#define VALID_TIMING _VALID_TIMING(c)
+#define _HSIZE1(x) ((x[0] + 31) * 8)
+#define HSIZE1 _HSIZE1(c)
+#define RATIO(x) ((x[1] & 0xC0) >> 6)
+#define RATIO1_1 0
+/* EDID Ver. 1.3 redefined this */
+#define RATIO16_10 RATIO1_1
+#define RATIO4_3 1
+#define RATIO5_4 2
+#define RATIO16_9 3
+#define _VSIZE1(x,y,r) switch(RATIO(x)){ \
+ case RATIO1_1: y = ((v->version > 1 || v->revision > 2) \
+ ? (_HSIZE1(x) * 10) / 16 : _HSIZE1(x)); break; \
+ case RATIO4_3: y = _HSIZE1(x) * 3 / 4; break; \
+ case RATIO5_4: y = _HSIZE1(x) * 4 / 5; break; \
+ case RATIO16_9: y = _HSIZE1(x) * 9 / 16; break; \
+ }
+#define VSIZE1(x) _VSIZE1(c,x,v)
+#define _REFRESH_R(x) (x[1] & 0x3F) + 60
+#define REFRESH_R _REFRESH_R(c)
+#define _ID_LOW(x) x[0]
+#define ID_LOW _ID_LOW(c)
+#define _ID_HIGH(x) (x[1] << 8)
+#define ID_HIGH _ID_HIGH(c)
+#define STD_TIMING_ID (ID_LOW | ID_HIGH)
+#define _NEXT_STD_TIMING(x) (x = (x + STD_TIMING_INFO_LEN))
+#define NEXT_STD_TIMING _NEXT_STD_TIMING(c)
+
+/* EDID Ver. >= 1.2 */
+/**
+ * Returns true if the pointer is the start of a monitor descriptor block
+ * instead of a detailed timing descriptor.
+ *
+ * Checking the reserved pad fields for zeroes fails on some monitors with
+ * broken empty ASCII strings. Only the first two bytes are reliable.
+ */
+#define _IS_MONITOR_DESC(x) (x[0] == 0 && x[1] == 0)
+#define IS_MONITOR_DESC _IS_MONITOR_DESC(c)
+#define _PIXEL_CLOCK(x) (x[0] + (x[1] << 8)) * 10000
+#define PIXEL_CLOCK _PIXEL_CLOCK(c)
+#define _H_ACTIVE(x) (x[2] + ((x[4] & 0xF0) << 4))
+#define H_ACTIVE _H_ACTIVE(c)
+#define _H_BLANK(x) (x[3] + ((x[4] & 0x0F) << 8))
+#define H_BLANK _H_BLANK(c)
+#define _V_ACTIVE(x) (x[5] + ((x[7] & 0xF0) << 4))
+#define V_ACTIVE _V_ACTIVE(c)
+#define _V_BLANK(x) (x[6] + ((x[7] & 0x0F) << 8))
+#define V_BLANK _V_BLANK(c)
+#define _H_SYNC_OFF(x) (x[8] + ((x[11] & 0xC0) << 2))
+#define H_SYNC_OFF _H_SYNC_OFF(c)
+#define _H_SYNC_WIDTH(x) (x[9] + ((x[11] & 0x30) << 4))
+#define H_SYNC_WIDTH _H_SYNC_WIDTH(c)
+#define _V_SYNC_OFF(x) ((x[10] >> 4) + ((x[11] & 0x0C) << 2))
+#define V_SYNC_OFF _V_SYNC_OFF(c)
+#define _V_SYNC_WIDTH(x) ((x[10] & 0x0F) + ((x[11] & 0x03) << 4))
+#define V_SYNC_WIDTH _V_SYNC_WIDTH(c)
+#define _H_SIZE(x) (x[12] + ((x[14] & 0xF0) << 4))
+#define H_SIZE _H_SIZE(c)
+#define _V_SIZE(x) (x[13] + ((x[14] & 0x0F) << 8))
+#define V_SIZE _V_SIZE(c)
+#define _H_BORDER(x) (x[15])
+#define H_BORDER _H_BORDER(c)
+#define _V_BORDER(x) (x[16])
+#define V_BORDER _V_BORDER(c)
+#define _INTERLACED(x) ((x[17] & 0x80) >> 7)
+#define INTERLACED _INTERLACED(c)
+#define _STEREO(x) ((x[17] & 0x60) >> 5)
+#define STEREO _STEREO(c)
+#define _STEREO1(x) (x[17] & 0x1)
+#define STEREO1 _STEREO(c)
+#define _SYNC_T(x) ((x[17] & 0x18) >> 3)
+#define SYNC_T _SYNC_T(c)
+#define _MISC(x) ((x[17] & 0x06) >> 1)
+#define MISC _MISC(c)
+
+#define _MONITOR_DESC_TYPE(x) x[3]
+#define MONITOR_DESC_TYPE _MONITOR_DESC_TYPE(c)
+#define SERIAL_NUMBER 0xFF
+#define ASCII_STR 0xFE
+#define MONITOR_RANGES 0xFD
+#define _MIN_V_OFFSET(x) ((!!(x[4] & 0x01)) * 255)
+#define _MAX_V_OFFSET(x) ((!!(x[4] & 0x02)) * 255)
+#define _MIN_H_OFFSET(x) ((!!(x[4] & 0x04)) * 255)
+#define _MAX_H_OFFSET(x) ((!!(x[4] & 0x08)) * 255)
+#define _MIN_V(x) x[5]
+#define MIN_V (_MIN_V(c) + _MIN_V_OFFSET(c))
+#define _MAX_V(x) x[6]
+#define MAX_V (_MAX_V(c) + _MAX_V_OFFSET(c))
+#define _MIN_H(x) x[7]
+#define MIN_H (_MIN_H(c) + _MIN_H_OFFSET(c))
+#define _MAX_H(x) x[8]
+#define MAX_H (_MAX_H(c) + _MAX_H_OFFSET(c))
+#define _MAX_CLOCK(x) x[9]
+#define MAX_CLOCK _MAX_CLOCK(c)
+#define _HAVE_2ND_GTF(x) (x[10] == 0x02)
+#define HAVE_2ND_GTF _HAVE_2ND_GTF(c)
+#define _F_2ND_GTF(x) (x[12] * 2)
+#define F_2ND_GTF _F_2ND_GTF(c)
+#define _C_2ND_GTF(x) (x[13] / 2)
+#define C_2ND_GTF _C_2ND_GTF(c)
+#define _M_2ND_GTF(x) (x[14] + (x[15] << 8))
+#define M_2ND_GTF _M_2ND_GTF(c)
+#define _K_2ND_GTF(x) (x[16])
+#define K_2ND_GTF _K_2ND_GTF(c)
+#define _J_2ND_GTF(x) (x[17] / 2)
+#define J_2ND_GTF _J_2ND_GTF(c)
+#define _HAVE_CVT(x) (x[10] == 0x04)
+#define HAVE_CVT _HAVE_CVT(c)
+#define _MAX_CLOCK_KHZ(x) (x[12] >> 2)
+#define MAX_CLOCK_KHZ (MAX_CLOCK * 10000) - (_MAX_CLOCK_KHZ(c) * 250)
+#define _MAXWIDTH(x) ((x[13] == 0 ? 0 : x[13] + ((x[12] & 0x03) << 8)) * 8)
+#define MAXWIDTH _MAXWIDTH(c)
+#define _SUPPORTED_ASPECT(x) x[14]
+#define SUPPORTED_ASPECT _SUPPORTED_ASPECT(c)
+#define SUPPORTED_ASPECT_4_3 0x80
+#define SUPPORTED_ASPECT_16_9 0x40
+#define SUPPORTED_ASPECT_16_10 0x20
+#define SUPPORTED_ASPECT_5_4 0x10
+#define SUPPORTED_ASPECT_15_9 0x08
+#define _PREFERRED_ASPECT(x) ((x[15] & 0xe0) >> 5)
+#define PREFERRED_ASPECT _PREFERRED_ASPECT(c)
+#define PREFERRED_ASPECT_4_3 0
+#define PREFERRED_ASPECT_16_9 1
+#define PREFERRED_ASPECT_16_10 2
+#define PREFERRED_ASPECT_5_4 3
+#define PREFERRED_ASPECT_15_9 4
+#define _SUPPORTED_BLANKING(x) ((x[15] & 0x18) >> 3)
+#define SUPPORTED_BLANKING _SUPPORTED_BLANKING(c)
+#define CVT_STANDARD 0x01
+#define CVT_REDUCED 0x02
+#define _SUPPORTED_SCALING(x) ((x[16] & 0xf0) >> 4)
+#define SUPPORTED_SCALING _SUPPORTED_SCALING(c)
+#define SCALING_HSHRINK 0x08
+#define SCALING_HSTRETCH 0x04
+#define SCALING_VSHRINK 0x02
+#define SCALING_VSTRETCH 0x01
+#define _PREFERRED_REFRESH(x) x[17]
+#define PREFERRED_REFRESH _PREFERRED_REFRESH(c)
+
+#define MONITOR_NAME 0xFC
+#define ADD_COLOR_POINT 0xFB
+#define WHITEX F_CC(I_CC((GET(D_BW_LOW)),(GET(D_WHITEX)),2))
+#define WHITEY F_CC(I_CC((GET(D_BW_LOW)),(GET(D_WHITEY)),0))
+#define _WHITEX_ADD(x,y) F_CC(I_CC(((*(x + y))),(*(x + y + 1)),2))
+#define _WHITEY_ADD(x,y) F_CC(I_CC(((*(x + y))),(*(x + y + 2)),0))
+#define _WHITE_INDEX1(x) x[5]
+#define WHITE_INDEX1 _WHITE_INDEX1(c)
+#define _WHITE_INDEX2(x) x[10]
+#define WHITE_INDEX2 _WHITE_INDEX2(c)
+#define WHITEX1 _WHITEX_ADD(c,6)
+#define WHITEY1 _WHITEY_ADD(c,6)
+#define WHITEX2 _WHITEX_ADD(c,12)
+#define WHITEY2 _WHITEY_ADD(c,12)
+#define _WHITE_GAMMA1(x) _GAMMA(x[9])
+#define WHITE_GAMMA1 _WHITE_GAMMA1(c)
+#define _WHITE_GAMMA2(x) _GAMMA(x[14])
+#define WHITE_GAMMA2 _WHITE_GAMMA2(c)
+#define ADD_STD_TIMINGS 0xFA
+#define COLOR_MANAGEMENT_DATA 0xF9
+#define CVT_3BYTE_DATA 0xF8
+#define ADD_EST_TIMINGS 0xF7
+#define ADD_DUMMY 0x10
+
+#define _NEXT_DT_MD_SECTION(x) (x = (x + DET_TIMING_INFO_LEN))
+#define NEXT_DT_MD_SECTION _NEXT_DT_MD_SECTION(c)
+
+#endif /* _PARSE_EDID_ */
+
+/* input type */
+#define DIGITAL(x) x
+
+/* DFP */
+#define DFP1(x) x
+
+/* input voltage level */
+#define V070 0 /* 0.700V/0.300V */
+#define V071 1 /* 0.714V/0.286V */
+#define V100 2 /* 1.000V/0.400V */
+#define V007 3 /* 0.700V/0.000V */
+
+/* Signal level setup */
+#define SIG_SETUP(x) (x)
+
+/* sync characteristics */
+#define SEP_SYNC(x) (x & 0x08)
+#define COMP_SYNC(x) (x & 0x04)
+#define SYNC_O_GREEN(x) (x & 0x02)
+#define SYNC_SERR(x) (x & 0x01)
+
+/* DPMS features */
+#define DPMS_STANDBY(x) (x & 0x04)
+#define DPMS_SUSPEND(x) (x & 0x02)
+#define DPMS_OFF(x) (x & 0x01)
+
+/* display type, analog */
+#define DISP_MONO 0
+#define DISP_RGB 1
+#define DISP_MULTCOLOR 2
+
+/* display color encodings, digital */
+#define DISP_YCRCB444 0x01
+#define DISP_YCRCB422 0x02
+
+/* Msc stuff EDID Ver > 1.1 */
+#define STD_COLOR_SPACE(x) (x & 0x4)
+#define PREFERRED_TIMING_MODE(x) (x & 0x2)
+#define GFT_SUPPORTED(x) (x & 0x1)
+#define GTF_SUPPORTED(x) (x & 0x1)
+#define CVT_SUPPORTED(x) (x & 0x1)
+
+/* detailed timing misc */
+#define IS_INTERLACED(x) (x)
+#define IS_STEREO(x) (x)
+#define IS_RIGHT_STEREO(x) (x & 0x01)
+#define IS_LEFT_STEREO(x) (x & 0x02)
+#define IS_4WAY_STEREO(x) (x & 0x03)
+#define IS_RIGHT_ON_SYNC(x) IS_RIGHT_STEREO(x)
+#define IS_LEFT_ON_SYNC(x) IS_LEFT_STEREO(x)
+
+typedef unsigned int Uint;
+typedef unsigned char Uchar;
+
+struct vendor {
+ char name[4];
+ int prod_id;
+ Uint serial;
+ int week;
+ int year;
+};
+
+struct edid_version {
+ int version;
+ int revision;
+};
+
+struct disp_features {
+ unsigned int input_type:1;
+ unsigned int input_voltage:2;
+ unsigned int input_setup:1;
+ unsigned int input_sync:5;
+ unsigned int input_dfp:1;
+ unsigned int input_bpc:3;
+ unsigned int input_interface:4;
+ /* 15 bit hole */
+ int hsize;
+ int vsize;
+ float gamma;
+ unsigned int dpms:3;
+ unsigned int display_type:2;
+ unsigned int msc:3;
+ float redx;
+ float redy;
+ float greenx;
+ float greeny;
+ float bluex;
+ float bluey;
+ float whitex;
+ float whitey;
+};
+
+struct established_timings {
+ Uchar t1;
+ Uchar t2;
+ Uchar t_manu;
+};
+
+struct std_timings {
+ int hsize;
+ int vsize;
+ int refresh;
+ CARD16 id;
+};
+
+struct detailed_timings {
+ int clock;
+ int h_active;
+ int h_blanking;
+ int v_active;
+ int v_blanking;
+ int h_sync_off;
+ int h_sync_width;
+ int v_sync_off;
+ int v_sync_width;
+ int h_size;
+ int v_size;
+ int h_border;
+ int v_border;
+ unsigned int interlaced:1;
+ unsigned int stereo:2;
+ unsigned int sync:2;
+ unsigned int misc:2;
+ unsigned int stereo_1:1;
+};
+
+#define DT 0
+#define DS_SERIAL 0xFF
+#define DS_ASCII_STR 0xFE
+#define DS_NAME 0xFC
+#define DS_RANGES 0xFD
+#define DS_WHITE_P 0xFB
+#define DS_STD_TIMINGS 0xFA
+#define DS_CMD 0xF9
+#define DS_CVT 0xF8
+#define DS_EST_III 0xF7
+#define DS_DUMMY 0x10
+#define DS_UNKOWN 0x100 /* type is an int */
+#define DS_VENDOR 0x101
+#define DS_VENDOR_MAX 0x110
+
+struct monitor_ranges {
+ int min_v;
+ int max_v;
+ int min_h;
+ int max_h;
+ int max_clock; /* in mhz */
+ int gtf_2nd_f;
+ int gtf_2nd_c;
+ int gtf_2nd_m;
+ int gtf_2nd_k;
+ int gtf_2nd_j;
+ int max_clock_khz;
+ int maxwidth; /* in pixels */
+ char supported_aspect;
+ char preferred_aspect;
+ char supported_blanking;
+ char supported_scaling;
+ int preferred_refresh; /* in hz */
+};
+
+struct whitePoints {
+ int index;
+ float white_x;
+ float white_y;
+ float white_gamma;
+};
+
+struct cvt_timings {
+ int width;
+ int height;
+ int rate;
+ int rates;
+};
+
+/*
+ * Be careful when adding new sections; this structure can't grow, it's
+ * embedded in the middle of xf86Monitor which is ABI. Sizes below are
+ * in bytes, for ILP32 systems. If all else fails just copy the section
+ * literally like serial and friends.
+ */
+struct detailed_monitor_section {
+ int type;
+ union {
+ struct detailed_timings d_timings; /* 56 */
+ Uchar serial[13];
+ Uchar ascii_data[13];
+ Uchar name[13];
+ struct monitor_ranges ranges; /* 56 */
+ struct std_timings std_t[5]; /* 80 */
+ struct whitePoints wp[2]; /* 32 */
+ /* color management data */
+ struct cvt_timings cvt[4]; /* 64 */
+ Uchar est_iii[6]; /* 6 */
+ } section; /* max: 80 */
+};
+
+/* flags */
+#define MONITOR_EDID_COMPLETE_RAWDATA 0x01
+/* old, don't use */
+#define EDID_COMPLETE_RAWDATA 0x01
+#define MONITOR_DISPLAYID 0x02
+
+/*
+ * For DisplayID devices, only the scrnIndex, flags, and rawData fields
+ * are meaningful. For EDID, they all are.
+ */
+typedef struct {
+ int scrnIndex;
+ struct vendor vendor;
+ struct edid_version ver;
+ struct disp_features features;
+ struct established_timings timings1;
+ struct std_timings timings2[8];
+ struct detailed_monitor_section det_mon[4];
+ unsigned long flags;
+ int no_sections;
+ Uchar *rawData;
+} xf86Monitor, *xf86MonPtr;
+
+extern _X_EXPORT xf86MonPtr ConfiguredMonitor;
+
+#define EXT_TAG 0
+#define EXT_REV 1
+#define CEA_EXT 0x02
+#define VTB_EXT 0x10
+#define DI_EXT 0x40
+#define LS_EXT 0x50
+#define MI_EXT 0x60
+
+#define CEA_EXT_MIN_DATA_OFFSET 4
+#define CEA_EXT_MAX_DATA_OFFSET 127
+#define CEA_EXT_DET_TIMING_NUM 6
+
+#define IEEE_ID_HDMI 0x000C03
+#define CEA_AUDIO_BLK 1
+#define CEA_VIDEO_BLK 2
+#define CEA_VENDOR_BLK 3
+#define CEA_SPEAKER_ALLOC_BLK 4
+#define CEA_VESA_DTC_BLK 5
+#define VENDOR_SUPPORT_AI(x) ((x) >> 7)
+#define VENDOR_SUPPORT_DC_48bit(x) ( ( (x) >> 6) & 0x01)
+#define VENDOR_SUPPORT_DC_36bit(x) ( ( (x) >> 5) & 0x01)
+#define VENDOR_SUPPORT_DC_30bit(x) ( ( (x) >> 4) & 0x01)
+#define VENDOR_SUPPORT_DC_Y444(x) ( ( (x) >> 3) & 0x01)
+#define VENDOR_LATENCY_PRESENT(x) ( (x) >> 7)
+#define VENDOR_LATENCY_PRESENT_I(x) ( ( (x) >> 6) & 0x01)
+#define HDMI_MAX_TMDS_UNIT (5000)
+
+struct cea_video_block {
+ Uchar video_code;
+};
+
+struct cea_audio_block_descriptor {
+ Uchar audio_code[3];
+};
+
+struct cea_audio_block {
+ struct cea_audio_block_descriptor descriptor[10];
+};
+
+struct cea_vendor_block_hdmi {
+ Uchar portB:4;
+ Uchar portA:4;
+ Uchar portD:4;
+ Uchar portC:4;
+ Uchar support_flags;
+ Uchar max_tmds_clock;
+ Uchar latency_present;
+ Uchar video_latency;
+ Uchar audio_latency;
+ Uchar interlaced_video_latency;
+ Uchar interlaced_audio_latency;
+};
+
+struct cea_vendor_block {
+ unsigned char ieee_id[3];
+ union {
+ struct cea_vendor_block_hdmi hdmi;
+ /* any other vendor blocks we know about */
+ };
+};
+
+struct cea_speaker_block {
+ Uchar FLR:1;
+ Uchar LFE:1;
+ Uchar FC:1;
+ Uchar RLR:1;
+ Uchar RC:1;
+ Uchar FLRC:1;
+ Uchar RLRC:1;
+ Uchar FLRW:1;
+ Uchar FLRH:1;
+ Uchar TC:1;
+ Uchar FCH:1;
+ Uchar Resv:5;
+ Uchar ResvByte;
+};
+
+struct cea_data_block {
+ Uchar len:5;
+ Uchar tag:3;
+ union {
+ struct cea_video_block video;
+ struct cea_audio_block audio;
+ struct cea_vendor_block vendor;
+ struct cea_speaker_block speaker;
+ } u;
+};
+
+struct cea_ext_body {
+ Uchar tag;
+ Uchar rev;
+ Uchar dt_offset;
+ Uchar flags;
+ struct cea_data_block data_collection;
+};
+
+#endif /* _EDID_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/events.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/events.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/events.h (working copy)
@@ -0,0 +1,42 @@
+/*
+ * Copyright © 2009 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef EVENTS_H
+#define EVENTS_H
+typedef struct _DeviceEvent DeviceEvent;
+typedef struct _DeviceChangedEvent DeviceChangedEvent;
+typedef struct _TouchOwnershipEvent TouchOwnershipEvent;
+typedef struct _BarrierEvent BarrierEvent;
+
+#if XFreeXDGA
+typedef struct _DGAEvent DGAEvent;
+#endif
+typedef struct _RawDeviceEvent RawDeviceEvent;
+
+#ifdef XQUARTZ
+typedef struct _XQuartzEvent XQuartzEvent;
+#endif
+typedef union _InternalEvent InternalEvent;
+
+#endif
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/exa.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/exa.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/exa.h (working copy)
@@ -0,0 +1,820 @@
+/*
+ *
+ * Copyright (C) 2000 Keith Packard
+ * 2004 Eric Anholt
+ * 2005 Zack Rusin
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of copyright holders not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Copyright holders make no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ */
+
+/** @file
+ * This is the header containing the public API of EXA for exa drivers.
+ */
+
+#ifndef EXA_H
+#define EXA_H
+
+#include "scrnintstr.h"
+#include "pixmapstr.h"
+#include "windowstr.h"
+#include "gcstruct.h"
+#include "picturestr.h"
+#include "fb.h"
+
+#define EXA_VERSION_MAJOR 2
+#define EXA_VERSION_MINOR 6
+#define EXA_VERSION_RELEASE 0
+
+typedef struct _ExaOffscreenArea ExaOffscreenArea;
+
+typedef void (*ExaOffscreenSaveProc) (ScreenPtr pScreen,
+ ExaOffscreenArea * area);
+
+typedef enum _ExaOffscreenState {
+ ExaOffscreenAvail,
+ ExaOffscreenRemovable,
+ ExaOffscreenLocked
+} ExaOffscreenState;
+
+struct _ExaOffscreenArea {
+ int base_offset; /* allocation base */
+ int offset; /* aligned offset */
+ int size; /* total allocation size */
+ unsigned last_use;
+ void *privData;
+
+ ExaOffscreenSaveProc save;
+
+ ExaOffscreenState state;
+
+ ExaOffscreenArea *next;
+
+ unsigned eviction_cost;
+
+ ExaOffscreenArea *prev; /* Double-linked list for defragmentation */
+ int align; /* required alignment */
+};
+
+/**
+ * The ExaDriver structure is allocated through exaDriverAlloc(), and then
+ * fllled in by drivers.
+ */
+typedef struct _ExaDriver {
+ /**
+ * exa_major and exa_minor should be set by the driver to the version of
+ * EXA which the driver was compiled for (or configures itself at runtime
+ * to support). This allows EXA to extend the structure for new features
+ * without breaking ABI for drivers compiled against older versions.
+ */
+ int exa_major, exa_minor;
+
+ /**
+ * memoryBase is the address of the beginning of framebuffer memory.
+ * The visible screen should be within memoryBase to memoryBase +
+ * memorySize.
+ */
+ CARD8 *memoryBase;
+
+ /**
+ * offScreenBase is the offset from memoryBase of the beginning of the area
+ * to be managed by EXA's linear offscreen memory manager.
+ *
+ * In XFree86 DDX drivers, this is probably:
+ * (pScrn->displayWidth * cpp * pScrn->virtualY)
+ */
+ unsigned long offScreenBase;
+
+ /**
+ * memorySize is the length (in bytes) of framebuffer memory beginning
+ * from memoryBase.
+ *
+ * The offscreen memory manager will manage the area beginning at
+ * (memoryBase + offScreenBase), with a length of (memorySize -
+ * offScreenBase)
+ *
+ * In XFree86 DDX drivers, this is probably (pScrn->videoRam * 1024)
+ */
+ unsigned long memorySize;
+
+ /**
+ * pixmapOffsetAlign is the byte alignment necessary for pixmap offsets
+ * within framebuffer.
+ *
+ * Hardware typically has a required alignment of offsets, which may or may
+ * not be a power of two. EXA will ensure that pixmaps managed by the
+ * offscreen memory manager meet this alignment requirement.
+ */
+ int pixmapOffsetAlign;
+
+ /**
+ * pixmapPitchAlign is the byte alignment necessary for pixmap pitches
+ * within the framebuffer.
+ *
+ * Hardware typically has a required alignment of pitches for acceleration.
+ * For 3D hardware, Composite acceleration often requires that source and
+ * mask pixmaps (textures) have a power-of-two pitch, which can be demanded
+ * using EXA_OFFSCREEN_ALIGN_POT. These pitch requirements only apply to
+ * pixmaps managed by the offscreen memory manager. Thus, it is up to the
+ * driver to ensure that the visible screen has an appropriate pitch for
+ * acceleration.
+ */
+ int pixmapPitchAlign;
+
+ /**
+ * The flags field is bitfield of boolean values controlling EXA's behavior.
+ *
+ * The flags in clude EXA_OFFSCREEN_PIXMAPS, EXA_OFFSCREEN_ALIGN_POT, and
+ * EXA_TWO_BITBLT_DIRECTIONS.
+ */
+ int flags;
+
+ /** @{ */
+ /**
+ * maxX controls the X coordinate limitation for rendering from the card.
+ * The driver should never receive a request for rendering beyond maxX
+ * in the X direction from the origin of a pixmap.
+ */
+ int maxX;
+
+ /**
+ * maxY controls the Y coordinate limitation for rendering from the card.
+ * The driver should never receive a request for rendering beyond maxY
+ * in the Y direction from the origin of a pixmap.
+ */
+ int maxY;
+ /** @} */
+
+ /* private */
+ ExaOffscreenArea *offScreenAreas;
+ Bool needsSync;
+ int lastMarker;
+
+ /** @name Solid
+ * @{
+ */
+ /**
+ * PrepareSolid() sets up the driver for doing a solid fill.
+ * @param pPixmap Destination pixmap
+ * @param alu raster operation
+ * @param planemask write mask for the fill
+ * @param fg "foreground" color for the fill
+ *
+ * This call should set up the driver for doing a series of solid fills
+ * through the Solid() call. The alu raster op is one of the GX*
+ * graphics functions listed in X.h, and typically maps to a similar
+ * single-byte "ROP" setting in all hardware. The planemask controls
+ * which bits of the destination should be affected, and will only represent
+ * the bits up to the depth of pPixmap. The fg is the pixel value of the
+ * foreground color referred to in ROP descriptions.
+ *
+ * Note that many drivers will need to store some of the data in the driver
+ * private record, for sending to the hardware with each drawing command.
+ *
+ * The PrepareSolid() call is required of all drivers, but it may fail for any
+ * reason. Failure results in a fallback to software rendering.
+ */
+ Bool (*PrepareSolid) (PixmapPtr pPixmap,
+ int alu, Pixel planemask, Pixel fg);
+
+ /**
+ * Solid() performs a solid fill set up in the last PrepareSolid() call.
+ *
+ * @param pPixmap destination pixmap
+ * @param x1 left coordinate
+ * @param y1 top coordinate
+ * @param x2 right coordinate
+ * @param y2 bottom coordinate
+ *
+ * Performs the fill set up by the last PrepareSolid() call, covering the
+ * area from (x1,y1) to (x2,y2) in pPixmap. Note that the coordinates are
+ * in the coordinate space of the destination pixmap, so the driver will
+ * need to set up the hardware's offset and pitch for the destination
+ * coordinates according to the pixmap's offset and pitch within
+ * framebuffer. This likely means using exaGetPixmapOffset() and
+ * exaGetPixmapPitch().
+ *
+ * This call is required if PrepareSolid() ever succeeds.
+ */
+ void (*Solid) (PixmapPtr pPixmap, int x1, int y1, int x2, int y2);
+
+ /**
+ * DoneSolid() finishes a set of solid fills.
+ *
+ * @param pPixmap destination pixmap.
+ *
+ * The DoneSolid() call is called at the end of a series of consecutive
+ * Solid() calls following a successful PrepareSolid(). This allows drivers
+ * to finish up emitting drawing commands that were buffered, or clean up
+ * state from PrepareSolid().
+ *
+ * This call is required if PrepareSolid() ever succeeds.
+ */
+ void (*DoneSolid) (PixmapPtr pPixmap);
+ /** @} */
+
+ /** @name Copy
+ * @{
+ */
+ /**
+ * PrepareCopy() sets up the driver for doing a copy within video
+ * memory.
+ *
+ * @param pSrcPixmap source pixmap
+ * @param pDstPixmap destination pixmap
+ * @param dx X copy direction
+ * @param dy Y copy direction
+ * @param alu raster operation
+ * @param planemask write mask for the fill
+ *
+ * This call should set up the driver for doing a series of copies from the
+ * the pSrcPixmap to the pDstPixmap. The dx flag will be positive if the
+ * hardware should do the copy from the left to the right, and dy will be
+ * positive if the copy should be done from the top to the bottom. This
+ * is to deal with self-overlapping copies when pSrcPixmap == pDstPixmap.
+ * If your hardware can only support blits that are (left to right, top to
+ * bottom) or (right to left, bottom to top), then you should set
+ * #EXA_TWO_BITBLT_DIRECTIONS, and EXA will break down Copy operations to
+ * ones that meet those requirements. The alu raster op is one of the GX*
+ * graphics functions listed in X.h, and typically maps to a similar
+ * single-byte "ROP" setting in all hardware. The planemask controls which
+ * bits of the destination should be affected, and will only represent the
+ * bits up to the depth of pPixmap.
+ *
+ * Note that many drivers will need to store some of the data in the driver
+ * private record, for sending to the hardware with each drawing command.
+ *
+ * The PrepareCopy() call is required of all drivers, but it may fail for any
+ * reason. Failure results in a fallback to software rendering.
+ */
+ Bool (*PrepareCopy) (PixmapPtr pSrcPixmap,
+ PixmapPtr pDstPixmap,
+ int dx, int dy, int alu, Pixel planemask);
+
+ /**
+ * Copy() performs a copy set up in the last PrepareCopy call.
+ *
+ * @param pDstPixmap destination pixmap
+ * @param srcX source X coordinate
+ * @param srcY source Y coordinate
+ * @param dstX destination X coordinate
+ * @param dstY destination Y coordinate
+ * @param width width of the rectangle to be copied
+ * @param height height of the rectangle to be copied.
+ *
+ * Performs the copy set up by the last PrepareCopy() call, copying the
+ * rectangle from (srcX, srcY) to (srcX + width, srcY + width) in the source
+ * pixmap to the same-sized rectangle at (dstX, dstY) in the destination
+ * pixmap. Those rectangles may overlap in memory, if
+ * pSrcPixmap == pDstPixmap. Note that this call does not receive the
+ * pSrcPixmap as an argument -- if it's needed in this function, it should
+ * be stored in the driver private during PrepareCopy(). As with Solid(),
+ * the coordinates are in the coordinate space of each pixmap, so the driver
+ * will need to set up source and destination pitches and offsets from those
+ * pixmaps, probably using exaGetPixmapOffset() and exaGetPixmapPitch().
+ *
+ * This call is required if PrepareCopy ever succeeds.
+ */
+ void (*Copy) (PixmapPtr pDstPixmap,
+ int srcX,
+ int srcY, int dstX, int dstY, int width, int height);
+
+ /**
+ * DoneCopy() finishes a set of copies.
+ *
+ * @param pPixmap destination pixmap.
+ *
+ * The DoneCopy() call is called at the end of a series of consecutive
+ * Copy() calls following a successful PrepareCopy(). This allows drivers
+ * to finish up emitting drawing commands that were buffered, or clean up
+ * state from PrepareCopy().
+ *
+ * This call is required if PrepareCopy() ever succeeds.
+ */
+ void (*DoneCopy) (PixmapPtr pDstPixmap);
+ /** @} */
+
+ /** @name Composite
+ * @{
+ */
+ /**
+ * CheckComposite() checks to see if a composite operation could be
+ * accelerated.
+ *
+ * @param op Render operation
+ * @param pSrcPicture source Picture
+ * @param pMaskPicture mask picture
+ * @param pDstPicture destination Picture
+ *
+ * The CheckComposite() call checks if the driver could handle acceleration
+ * of op with the given source, mask, and destination pictures. This allows
+ * drivers to check source and destination formats, supported operations,
+ * transformations, and component alpha state, and send operations it can't
+ * support to software rendering early on. This avoids costly pixmap
+ * migration to the wrong places when the driver can't accelerate
+ * operations. Note that because migration hasn't happened, the driver
+ * can't know during CheckComposite() what the offsets and pitches of the
+ * pixmaps are going to be.
+ *
+ * See PrepareComposite() for more details on likely issues that drivers
+ * will have in accelerating Composite operations.
+ *
+ * The CheckComposite() call is recommended if PrepareComposite() is
+ * implemented, but is not required.
+ */
+ Bool (*CheckComposite) (int op,
+ PicturePtr pSrcPicture,
+ PicturePtr pMaskPicture, PicturePtr pDstPicture);
+
+ /**
+ * PrepareComposite() sets up the driver for doing a Composite operation
+ * described in the Render extension protocol spec.
+ *
+ * @param op Render operation
+ * @param pSrcPicture source Picture
+ * @param pMaskPicture mask picture
+ * @param pDstPicture destination Picture
+ * @param pSrc source pixmap
+ * @param pMask mask pixmap
+ * @param pDst destination pixmap
+ *
+ * This call should set up the driver for doing a series of Composite
+ * operations, as described in the Render protocol spec, with the given
+ * pSrcPicture, pMaskPicture, and pDstPicture. The pSrc, pMask, and
+ * pDst are the pixmaps containing the pixel data, and should be used for
+ * setting the offset and pitch used for the coordinate spaces for each of
+ * the Pictures.
+ *
+ * Notes on interpreting Picture structures:
+ * - The Picture structures will always have a valid pDrawable.
+ * - The Picture structures will never have alphaMap set.
+ * - The mask Picture (and therefore pMask) may be NULL, in which case the
+ * operation is simply src OP dst instead of src IN mask OP dst, and
+ * mask coordinates should be ignored.
+ * - pMarkPicture may have componentAlpha set, which greatly changes
+ * the behavior of the Composite operation. componentAlpha has no effect
+ * when set on pSrcPicture or pDstPicture.
+ * - The source and mask Pictures may have a transformation set
+ * (Picture->transform != NULL), which means that the source coordinates
+ * should be transformed by that transformation, resulting in scaling,
+ * rotation, etc. The PictureTransformPoint() call can transform
+ * coordinates for you. Transforms have no effect on Pictures when used
+ * as a destination.
+ * - The source and mask pictures may have a filter set. PictFilterNearest
+ * and PictFilterBilinear are defined in the Render protocol, but others
+ * may be encountered, and must be handled correctly (usually by
+ * PrepareComposite failing, and falling back to software). Filters have
+ * no effect on Pictures when used as a destination.
+ * - The source and mask Pictures may have repeating set, which must be
+ * respected. Many chipsets will be unable to support repeating on
+ * pixmaps that have a width or height that is not a power of two.
+ *
+ * If your hardware can't support source pictures (textures) with
+ * non-power-of-two pitches, you should set #EXA_OFFSCREEN_ALIGN_POT.
+ *
+ * Note that many drivers will need to store some of the data in the driver
+ * private record, for sending to the hardware with each drawing command.
+ *
+ * The PrepareComposite() call is not required. However, it is highly
+ * recommended for performance of antialiased font rendering and performance
+ * of cairo applications. Failure results in a fallback to software
+ * rendering.
+ */
+ Bool (*PrepareComposite) (int op,
+ PicturePtr pSrcPicture,
+ PicturePtr pMaskPicture,
+ PicturePtr pDstPicture,
+ PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst);
+
+ /**
+ * Composite() performs a Composite operation set up in the last
+ * PrepareComposite() call.
+ *
+ * @param pDstPixmap destination pixmap
+ * @param srcX source X coordinate
+ * @param srcY source Y coordinate
+ * @param maskX source X coordinate
+ * @param maskY source Y coordinate
+ * @param dstX destination X coordinate
+ * @param dstY destination Y coordinate
+ * @param width destination rectangle width
+ * @param height destination rectangle height
+ *
+ * Performs the Composite operation set up by the last PrepareComposite()
+ * call, to the rectangle from (dstX, dstY) to (dstX + width, dstY + height)
+ * in the destination Pixmap. Note that if a transformation was set on
+ * the source or mask Pictures, the source rectangles may not be the same
+ * size as the destination rectangles and filtering. Getting the coordinate
+ * transformation right at the subpixel level can be tricky, and rendercheck
+ * can test this for you.
+ *
+ * This call is required if PrepareComposite() ever succeeds.
+ */
+ void (*Composite) (PixmapPtr pDst,
+ int srcX,
+ int srcY,
+ int maskX,
+ int maskY, int dstX, int dstY, int width, int height);
+
+ /**
+ * DoneComposite() finishes a set of Composite operations.
+ *
+ * @param pPixmap destination pixmap.
+ *
+ * The DoneComposite() call is called at the end of a series of consecutive
+ * Composite() calls following a successful PrepareComposite(). This allows
+ * drivers to finish up emitting drawing commands that were buffered, or
+ * clean up state from PrepareComposite().
+ *
+ * This call is required if PrepareComposite() ever succeeds.
+ */
+ void (*DoneComposite) (PixmapPtr pDst);
+ /** @} */
+
+ /**
+ * UploadToScreen() loads a rectangle of data from src into pDst.
+ *
+ * @param pDst destination pixmap
+ * @param x destination X coordinate.
+ * @param y destination Y coordinate
+ * @param width width of the rectangle to be copied
+ * @param height height of the rectangle to be copied
+ * @param src pointer to the beginning of the source data
+ * @param src_pitch pitch (in bytes) of the lines of source data.
+ *
+ * UploadToScreen() copies data in system memory beginning at src (with
+ * pitch src_pitch) into the destination pixmap from (x, y) to
+ * (x + width, y + height). This is typically done with hostdata uploads,
+ * where the CPU sets up a blit command on the hardware with instructions
+ * that the blit data will be fed through some sort of aperture on the card.
+ *
+ * If UploadToScreen() is performed asynchronously, it is up to the driver
+ * to call exaMarkSync(). This is in contrast to most other acceleration
+ * calls in EXA.
+ *
+ * UploadToScreen() can aid in pixmap migration, but is most important for
+ * the performance of exaGlyphs() (antialiased font drawing) by allowing
+ * pipelining of data uploads, avoiding a sync of the card after each glyph.
+ *
+ * @return TRUE if the driver successfully uploaded the data. FALSE
+ * indicates that EXA should fall back to doing the upload in software.
+ *
+ * UploadToScreen() is not required, but is recommended if Composite
+ * acceleration is supported.
+ */
+ Bool (*UploadToScreen) (PixmapPtr pDst,
+ int x,
+ int y, int w, int h, char *src, int src_pitch);
+
+ /**
+ * UploadToScratch() is no longer used and will be removed next time the EXA
+ * major version needs to be bumped.
+ */
+ Bool (*UploadToScratch) (PixmapPtr pSrc, PixmapPtr pDst);
+
+ /**
+ * DownloadFromScreen() loads a rectangle of data from pSrc into dst
+ *
+ * @param pSrc source pixmap
+ * @param x source X coordinate.
+ * @param y source Y coordinate
+ * @param width width of the rectangle to be copied
+ * @param height height of the rectangle to be copied
+ * @param dst pointer to the beginning of the destination data
+ * @param dst_pitch pitch (in bytes) of the lines of destination data.
+ *
+ * DownloadFromScreen() copies data from offscreen memory in pSrc from
+ * (x, y) to (x + width, y + height), to system memory starting at
+ * dst (with pitch dst_pitch). This would usually be done
+ * using scatter-gather DMA, supported by a DRM call, or by blitting to AGP
+ * and then synchronously reading from AGP. Because the implementation
+ * might be synchronous, EXA leaves it up to the driver to call
+ * exaMarkSync() if DownloadFromScreen() was asynchronous. This is in
+ * contrast to most other acceleration calls in EXA.
+ *
+ * DownloadFromScreen() can aid in the largest bottleneck in pixmap
+ * migration, which is the read from framebuffer when evicting pixmaps from
+ * framebuffer memory. Thus, it is highly recommended, even though
+ * implementations are typically complicated.
+ *
+ * @return TRUE if the driver successfully downloaded the data. FALSE
+ * indicates that EXA should fall back to doing the download in software.
+ *
+ * DownloadFromScreen() is not required, but is highly recommended.
+ */
+ Bool (*DownloadFromScreen) (PixmapPtr pSrc,
+ int x, int y,
+ int w, int h, char *dst, int dst_pitch);
+
+ /**
+ * MarkSync() requests that the driver mark a synchronization point,
+ * returning an driver-defined integer marker which could be requested for
+ * synchronization to later in WaitMarker(). This might be used in the
+ * future to avoid waiting for full hardware stalls before accessing pixmap
+ * data with the CPU, but is not important in the current incarnation of
+ * EXA.
+ *
+ * Note that drivers should call exaMarkSync() when they have done some
+ * acceleration, rather than their own MarkSync() handler, as otherwise EXA
+ * will be unaware of the driver's acceleration and not sync to it during
+ * fallbacks.
+ *
+ * MarkSync() is optional.
+ */
+ int (*MarkSync) (ScreenPtr pScreen);
+
+ /**
+ * WaitMarker() waits for all rendering before the given marker to have
+ * completed. If the driver does not implement MarkSync(), marker is
+ * meaningless, and all rendering by the hardware should be completed before
+ * WaitMarker() returns.
+ *
+ * Note that drivers should call exaWaitSync() to wait for all acceleration
+ * to finish, as otherwise EXA will be unaware of the driver having
+ * synchronized, resulting in excessive WaitMarker() calls.
+ *
+ * WaitMarker() is required of all drivers.
+ */
+ void (*WaitMarker) (ScreenPtr pScreen, int marker);
+
+ /** @{ */
+ /**
+ * PrepareAccess() is called before CPU access to an offscreen pixmap.
+ *
+ * @param pPix the pixmap being accessed
+ * @param index the index of the pixmap being accessed.
+ *
+ * PrepareAccess() will be called before CPU access to an offscreen pixmap.
+ * This can be used to set up hardware surfaces for byteswapping or
+ * untiling, or to adjust the pixmap's devPrivate.ptr for the purpose of
+ * making CPU access use a different aperture.
+ *
+ * The index is one of #EXA_PREPARE_DEST, #EXA_PREPARE_SRC,
+ * #EXA_PREPARE_MASK, #EXA_PREPARE_AUX_DEST, #EXA_PREPARE_AUX_SRC, or
+ * #EXA_PREPARE_AUX_MASK. Since only up to #EXA_NUM_PREPARE_INDICES pixmaps
+ * will have PrepareAccess() called on them per operation, drivers can have
+ * a small, statically-allocated space to maintain state for PrepareAccess()
+ * and FinishAccess() in. Note that PrepareAccess() is only called once per
+ * pixmap and operation, regardless of whether the pixmap is used as a
+ * destination and/or source, and the index may not reflect the usage.
+ *
+ * PrepareAccess() may fail. An example might be the case of hardware that
+ * can set up 1 or 2 surfaces for CPU access, but not 3. If PrepareAccess()
+ * fails, EXA will migrate the pixmap to system memory.
+ * DownloadFromScreen() must be implemented and must not fail if a driver
+ * wishes to fail in PrepareAccess(). PrepareAccess() must not fail when
+ * pPix is the visible screen, because the visible screen can not be
+ * migrated.
+ *
+ * @return TRUE if PrepareAccess() successfully prepared the pixmap for CPU
+ * drawing.
+ * @return FALSE if PrepareAccess() is unsuccessful and EXA should use
+ * DownloadFromScreen() to migate the pixmap out.
+ */
+ Bool (*PrepareAccess) (PixmapPtr pPix, int index);
+
+ /**
+ * FinishAccess() is called after CPU access to an offscreen pixmap.
+ *
+ * @param pPix the pixmap being accessed
+ * @param index the index of the pixmap being accessed.
+ *
+ * FinishAccess() will be called after finishing CPU access of an offscreen
+ * pixmap set up by PrepareAccess(). Note that the FinishAccess() will not be
+ * called if PrepareAccess() failed and the pixmap was migrated out.
+ */
+ void (*FinishAccess) (PixmapPtr pPix, int index);
+
+ /**
+ * PixmapIsOffscreen() is an optional driver replacement to
+ * exaPixmapHasGpuCopy(). Set to NULL if you want the standard behaviour
+ * of exaPixmapHasGpuCopy().
+ *
+ * @param pPix the pixmap
+ * @return TRUE if the given drawable is in framebuffer memory.
+ *
+ * exaPixmapHasGpuCopy() is used to determine if a pixmap is in offscreen
+ * memory, meaning that acceleration could probably be done to it, and that it
+ * will need to be wrapped by PrepareAccess()/FinishAccess() when accessing it
+ * with the CPU.
+ *
+ *
+ */
+ Bool (*PixmapIsOffscreen) (PixmapPtr pPix);
+
+ /** @name PrepareAccess() and FinishAccess() indices
+ * @{
+ */
+ /**
+ * EXA_PREPARE_DEST is the index for a pixmap that may be drawn to or
+ * read from.
+ */
+#define EXA_PREPARE_DEST 0
+ /**
+ * EXA_PREPARE_SRC is the index for a pixmap that may be read from
+ */
+#define EXA_PREPARE_SRC 1
+ /**
+ * EXA_PREPARE_SRC is the index for a second pixmap that may be read
+ * from.
+ */
+#define EXA_PREPARE_MASK 2
+ /**
+ * EXA_PREPARE_AUX* are additional indices for other purposes, e.g.
+ * separate alpha maps with Composite operations.
+ */
+#define EXA_PREPARE_AUX_DEST 3
+#define EXA_PREPARE_AUX_SRC 4
+#define EXA_PREPARE_AUX_MASK 5
+#define EXA_NUM_PREPARE_INDICES 6
+ /** @} */
+
+ /**
+ * maxPitchPixels controls the pitch limitation for rendering from
+ * the card.
+ * The driver should never receive a request for rendering a pixmap
+ * that has a pitch (in pixels) beyond maxPitchPixels.
+ *
+ * Setting this field is optional -- if your hardware doesn't have
+ * a pitch limitation in pixels, don't set this. If neither this value
+ * nor maxPitchBytes is set, then maxPitchPixels is set to maxX.
+ * If set, it must not be smaller than maxX.
+ *
+ * @sa maxPitchBytes
+ */
+ int maxPitchPixels;
+
+ /**
+ * maxPitchBytes controls the pitch limitation for rendering from
+ * the card.
+ * The driver should never receive a request for rendering a pixmap
+ * that has a pitch (in bytes) beyond maxPitchBytes.
+ *
+ * Setting this field is optional -- if your hardware doesn't have
+ * a pitch limitation in bytes, don't set this.
+ * If set, it must not be smaller than maxX * 4.
+ * There's no default value for maxPitchBytes.
+ *
+ * @sa maxPitchPixels
+ */
+ int maxPitchBytes;
+
+ /* Hooks to allow driver to its own pixmap memory management */
+ void *(*CreatePixmap) (ScreenPtr pScreen, int size, int align);
+ void (*DestroyPixmap) (ScreenPtr pScreen, void *driverPriv);
+ /**
+ * Returning a pixmap with non-NULL devPrivate.ptr implies a pixmap which is
+ * not offscreen, which will never be accelerated and Prepare/FinishAccess won't
+ * be called.
+ */
+ Bool (*ModifyPixmapHeader) (PixmapPtr pPixmap, int width, int height,
+ int depth, int bitsPerPixel, int devKind,
+ void *pPixData);
+
+ /* hooks for drivers with tiling support:
+ * driver MUST fill out new_fb_pitch with valid pitch of pixmap
+ */
+ void *(*CreatePixmap2) (ScreenPtr pScreen, int width, int height,
+ int depth, int usage_hint, int bitsPerPixel,
+ int *new_fb_pitch);
+ /** @} */
+ Bool (*SharePixmapBacking)(PixmapPtr pPixmap, ScreenPtr slave, void **handle_p);
+
+ Bool (*SetSharedPixmapBacking)(PixmapPtr pPixmap, void *handle);
+
+} ExaDriverRec, *ExaDriverPtr;
+
+/** @name EXA driver flags
+ * @{
+ */
+/**
+ * EXA_OFFSCREEN_PIXMAPS indicates to EXA that the driver can support
+ * offscreen pixmaps.
+ */
+#define EXA_OFFSCREEN_PIXMAPS (1 << 0)
+
+/**
+ * EXA_OFFSCREEN_ALIGN_POT indicates to EXA that the driver needs pixmaps
+ * to have a power-of-two pitch.
+ */
+#define EXA_OFFSCREEN_ALIGN_POT (1 << 1)
+
+/**
+ * EXA_TWO_BITBLT_DIRECTIONS indicates to EXA that the driver can only
+ * support copies that are (left-to-right, top-to-bottom) or
+ * (right-to-left, bottom-to-top).
+ */
+#define EXA_TWO_BITBLT_DIRECTIONS (1 << 2)
+
+/**
+ * EXA_HANDLES_PIXMAPS indicates to EXA that the driver can handle
+ * all pixmap addressing and migration.
+ */
+#define EXA_HANDLES_PIXMAPS (1 << 3)
+
+/**
+ * EXA_SUPPORTS_PREPARE_AUX indicates to EXA that the driver can handle the
+ * EXA_PREPARE_AUX* indices in the Prepare/FinishAccess hooks. If there are no
+ * such hooks, this flag has no effect.
+ */
+#define EXA_SUPPORTS_PREPARE_AUX (1 << 4)
+
+/**
+ * EXA_SUPPORTS_OFFSCREEN_OVERLAPS indicates to EXA that the driver Copy hooks
+ * can handle the source and destination occupying overlapping offscreen memory
+ * areas. This allows the offscreen memory defragmentation code to defragment
+ * areas where the defragmented position overlaps the fragmented position.
+ *
+ * Typically this is supported by traditional 2D engines but not by 3D engines.
+ */
+#define EXA_SUPPORTS_OFFSCREEN_OVERLAPS (1 << 5)
+
+/**
+ * EXA_MIXED_PIXMAPS will hide unacceleratable pixmaps from drivers and manage the
+ * problem known software fallbacks like trapezoids. This only migrates pixmaps one way
+ * into a driver pixmap and then pins it.
+ */
+#define EXA_MIXED_PIXMAPS (1 << 6)
+
+/** @} */
+
+/* in exa.c */
+extern _X_EXPORT ExaDriverPtr exaDriverAlloc(void);
+
+extern _X_EXPORT Bool
+ exaDriverInit(ScreenPtr pScreen, ExaDriverPtr pScreenInfo);
+
+extern _X_EXPORT void
+ exaDriverFini(ScreenPtr pScreen);
+
+extern _X_EXPORT void
+ exaMarkSync(ScreenPtr pScreen);
+extern _X_EXPORT void
+ exaWaitSync(ScreenPtr pScreen);
+
+extern _X_EXPORT unsigned long
+ exaGetPixmapOffset(PixmapPtr pPix);
+
+extern _X_EXPORT unsigned long
+ exaGetPixmapPitch(PixmapPtr pPix);
+
+extern _X_EXPORT unsigned long
+ exaGetPixmapSize(PixmapPtr pPix);
+
+extern _X_EXPORT void *exaGetPixmapDriverPrivate(PixmapPtr p);
+
+/* in exa_offscreen.c */
+extern _X_EXPORT ExaOffscreenArea *exaOffscreenAlloc(ScreenPtr pScreen,
+ int size, int align,
+ Bool locked,
+ ExaOffscreenSaveProc save,
+ void *privData);
+
+extern _X_EXPORT ExaOffscreenArea *exaOffscreenFree(ScreenPtr pScreen,
+ ExaOffscreenArea * area);
+
+extern _X_EXPORT void
+ ExaOffscreenMarkUsed(PixmapPtr pPixmap);
+
+extern _X_EXPORT void
+ exaEnableDisableFBAccess(ScreenPtr pScreen, Bool enable);
+
+extern _X_EXPORT Bool
+ exaDrawableIsOffscreen(DrawablePtr pDrawable);
+
+/* in exa.c */
+extern _X_EXPORT void
+ exaMoveInPixmap(PixmapPtr pPixmap);
+
+extern _X_EXPORT void
+ exaMoveOutPixmap(PixmapPtr pPixmap);
+
+/* in exa_unaccel.c */
+extern _X_EXPORT CARD32
+ exaGetPixmapFirstPixel(PixmapPtr pPixmap);
+
+/**
+ * Returns TRUE if the given planemask covers all the significant bits in the
+ * pixel values for pDrawable.
+ */
+#define EXA_PM_IS_SOLID(_pDrawable, _pm) \
+ (((_pm) & FbFullMask((_pDrawable)->depth)) == \
+ FbFullMask((_pDrawable)->depth))
+
+#endif /* EXA_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/exevents.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/exevents.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/exevents.h (working copy)
@@ -0,0 +1,307 @@
+/************************************************************
+
+Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of the above listed
+copyright holder(s) not be used in advertising or publicity pertaining
+to distribution of the software without specific, written prior
+permission.
+
+THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD
+TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
+LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+/********************************************************************
+ * Interface of 'exevents.c'
+ */
+
+#ifndef EXEVENTS_H
+#define EXEVENTS_H
+
+#include <X11/extensions/XIproto.h>
+#include "inputstr.h"
+
+/***************************************************************
+ * Interface available to drivers *
+ ***************************************************************/
+
+/**
+ * Scroll flags for ::SetScrollValuator.
+ */
+enum ScrollFlags {
+ SCROLL_FLAG_NONE = 0,
+ /**
+ * Do not emulate legacy button events for valuator events on this axis.
+ */
+ SCROLL_FLAG_DONT_EMULATE = (1 << 1),
+ /**
+ * This axis is the preferred axis for valuator emulation for this axis'
+ * scroll type.
+ */
+ SCROLL_FLAG_PREFERRED = (1 << 2)
+};
+
+extern _X_EXPORT int InitProximityClassDeviceStruct(DeviceIntPtr /* dev */ );
+
+extern _X_EXPORT Bool InitValuatorAxisStruct(DeviceIntPtr /* dev */ ,
+ int /* axnum */ ,
+ Atom /* label */ ,
+ int /* minval */ ,
+ int /* maxval */ ,
+ int /* resolution */ ,
+ int /* min_res */ ,
+ int /* max_res */ ,
+ int /* mode */ );
+
+extern _X_EXPORT Bool SetScrollValuator(DeviceIntPtr /* dev */ ,
+ int /* axnum */ ,
+ enum ScrollType /* type */ ,
+ double /* increment */ ,
+ int /* flags */ );
+
+/* Input device properties */
+extern _X_EXPORT void XIDeleteAllDeviceProperties(DeviceIntPtr /* device */
+ );
+
+extern _X_EXPORT int XIDeleteDeviceProperty(DeviceIntPtr /* device */ ,
+ Atom /* property */ ,
+ Bool /* fromClient */
+ );
+
+extern _X_EXPORT int XIChangeDeviceProperty(DeviceIntPtr /* dev */ ,
+ Atom /* property */ ,
+ Atom /* type */ ,
+ int /* format */ ,
+ int /* mode */ ,
+ unsigned long /* len */ ,
+ const void * /* value */ ,
+ Bool /* sendevent */
+ );
+
+extern _X_EXPORT int XIGetDeviceProperty(DeviceIntPtr /* dev */ ,
+ Atom /* property */ ,
+ XIPropertyValuePtr * /* value */
+ );
+
+extern _X_EXPORT int XISetDevicePropertyDeletable(DeviceIntPtr /* dev */ ,
+ Atom /* property */ ,
+ Bool /* deletable */
+ );
+
+extern _X_EXPORT long XIRegisterPropertyHandler(DeviceIntPtr dev,
+ int (*SetProperty) (DeviceIntPtr
+ dev,
+ Atom
+ property,
+ XIPropertyValuePtr
+ prop,
+ BOOL
+ checkonly),
+ int (*GetProperty) (DeviceIntPtr
+ dev,
+ Atom
+ property),
+ int (*DeleteProperty)
+ (DeviceIntPtr dev,
+ Atom property)
+ );
+
+extern _X_EXPORT void XIUnregisterPropertyHandler(DeviceIntPtr dev, long id);
+
+extern _X_EXPORT Atom XIGetKnownProperty(const char *name);
+
+extern _X_EXPORT DeviceIntPtr XIGetDevice(xEvent *ev);
+
+extern _X_EXPORT int XIPropToInt(XIPropertyValuePtr val,
+ int *nelem_return, int **buf_return);
+
+extern _X_EXPORT int XIPropToFloat(XIPropertyValuePtr val,
+ int *nelem_return, float **buf_return);
+
+/****************************************************************************
+ * End of driver interface *
+ ****************************************************************************/
+
+/**
+ * Attached to the devPrivates of each client. Specifies the version number as
+ * supported by the client.
+ */
+typedef struct _XIClientRec {
+ int major_version;
+ int minor_version;
+} XIClientRec, *XIClientPtr;
+
+typedef struct _GrabParameters {
+ int grabtype; /* CORE, etc. */
+ unsigned int ownerEvents;
+ unsigned int this_device_mode;
+ unsigned int other_devices_mode;
+ Window grabWindow;
+ Window confineTo;
+ Cursor cursor;
+ unsigned int modifiers;
+} GrabParameters;
+
+extern int
+ UpdateDeviceState(DeviceIntPtr /* device */ ,
+ DeviceEvent * /* xE */ );
+
+extern void
+ ProcessOtherEvent(InternalEvent * /* ev */ ,
+ DeviceIntPtr /* other */ );
+
+extern int
+ CheckGrabValues(ClientPtr /* client */ ,
+ GrabParameters * /* param */ );
+
+extern int
+ GrabButton(ClientPtr /* client */ ,
+ DeviceIntPtr /* dev */ ,
+ DeviceIntPtr /* modifier_device */ ,
+ int /* button */ ,
+ GrabParameters * /* param */ ,
+ enum InputLevel /* grabtype */ ,
+ GrabMask * /* eventMask */ );
+
+extern int
+ GrabKey(ClientPtr /* client */ ,
+ DeviceIntPtr /* dev */ ,
+ DeviceIntPtr /* modifier_device */ ,
+ int /* key */ ,
+ GrabParameters * /* param */ ,
+ enum InputLevel /* grabtype */ ,
+ GrabMask * /* eventMask */ );
+
+extern int
+ GrabWindow(ClientPtr /* client */ ,
+ DeviceIntPtr /* dev */ ,
+ int /* type */ ,
+ GrabParameters * /* param */ ,
+ GrabMask * /* eventMask */ );
+
+extern int
+ GrabTouch(ClientPtr /* client */ ,
+ DeviceIntPtr /* dev */ ,
+ DeviceIntPtr /* mod_dev */ ,
+ GrabParameters * /* param */ ,
+ GrabMask * /* eventMask */ );
+
+extern int
+ SelectForWindow(DeviceIntPtr /* dev */ ,
+ WindowPtr /* pWin */ ,
+ ClientPtr /* client */ ,
+ Mask /* mask */ ,
+ Mask /* exclusivemasks */ );
+
+extern int
+ AddExtensionClient(WindowPtr /* pWin */ ,
+ ClientPtr /* client */ ,
+ Mask /* mask */ ,
+ int /* mskidx */ );
+
+extern void
+ RecalculateDeviceDeliverableEvents(WindowPtr /* pWin */ );
+
+extern int
+ InputClientGone(WindowPtr /* pWin */ ,
+ XID /* id */ );
+
+extern void
+ WindowGone(WindowPtr /* win */ );
+
+extern int
+ SendEvent(ClientPtr /* client */ ,
+ DeviceIntPtr /* d */ ,
+ Window /* dest */ ,
+ Bool /* propagate */ ,
+ xEvent * /* ev */ ,
+ Mask /* mask */ ,
+ int /* count */ );
+
+extern int
+ SetButtonMapping(ClientPtr /* client */ ,
+ DeviceIntPtr /* dev */ ,
+ int /* nElts */ ,
+ BYTE * /* map */ );
+
+extern int
+ ChangeKeyMapping(ClientPtr /* client */ ,
+ DeviceIntPtr /* dev */ ,
+ unsigned /* len */ ,
+ int /* type */ ,
+ KeyCode /* firstKeyCode */ ,
+ CARD8 /* keyCodes */ ,
+ CARD8 /* keySymsPerKeyCode */ ,
+ KeySym * /* map */ );
+
+extern void
+ DeleteWindowFromAnyExtEvents(WindowPtr /* pWin */ ,
+ Bool /* freeResources */ );
+
+extern int
+ MaybeSendDeviceMotionNotifyHint(deviceKeyButtonPointer * /* pEvents */ ,
+ Mask /* mask */ );
+
+extern void
+ CheckDeviceGrabAndHintWindow(WindowPtr /* pWin */ ,
+ int /* type */ ,
+ deviceKeyButtonPointer * /* xE */ ,
+ GrabPtr /* grab */ ,
+ ClientPtr /* client */ ,
+ Mask /* deliveryMask */ );
+
+extern void
+ MaybeStopDeviceHint(DeviceIntPtr /* dev */ ,
+ ClientPtr /* client */ );
+
+extern int
+ DeviceEventSuppressForWindow(WindowPtr /* pWin */ ,
+ ClientPtr /* client */ ,
+ Mask /* mask */ ,
+ int /* maskndx */ );
+
+extern void
+ SendEventToAllWindows(DeviceIntPtr /* dev */ ,
+ Mask /* mask */ ,
+ xEvent * /* ev */ ,
+ int /* count */ );
+
+extern void
+ TouchRejected(DeviceIntPtr /* sourcedev */ ,
+ TouchPointInfoPtr /* ti */ ,
+ XID /* resource */ ,
+ TouchOwnershipEvent * /* ev */ );
+
+extern _X_HIDDEN void XI2EventSwap(xGenericEvent * /* from */ ,
+ xGenericEvent * /* to */ );
+
+/* For an event such as MappingNotify which affects client interpretation
+ * of input events sent by device dev, should we notify the client, or
+ * would it merely be irrelevant and confusing? */
+extern int
+ XIShouldNotify(ClientPtr client, DeviceIntPtr dev);
+
+extern void
+ XISendDeviceChangedEvent(DeviceIntPtr device, DeviceChangedEvent *dce);
+
+extern int
+
+XISetEventMask(DeviceIntPtr dev, WindowPtr win, ClientPtr client,
+ unsigned int len, unsigned char *mask);
+
+extern int
+ XICheckInvalidMaskBits(ClientPtr client, unsigned char *mask, int len);
+
+#endif /* EXEVENTS_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/extension.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/extension.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/extension.h (working copy)
@@ -0,0 +1,102 @@
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+#ifndef EXTENSION_H
+#define EXTENSION_H
+
+#include <X11/Xfuncproto.h>
+
+#include "dixstruct.h"
+
+typedef void (*InitExtension) (void);
+
+typedef struct {
+ InitExtension initFunc;
+ const char *name;
+ Bool *disablePtr;
+} ExtensionModule;
+
+extern _X_EXPORT unsigned short StandardMinorOpcode(ClientPtr /*client */ );
+
+extern _X_EXPORT Bool EnableDisableExtension(const char *name, Bool enable);
+
+extern _X_EXPORT void EnableDisableExtensionError(const char *name,
+ Bool enable);
+
+extern _X_EXPORT void InitExtensions(int argc, char **argv);
+
+extern _X_EXPORT void CloseDownExtensions(void);
+
+extern _X_EXPORT void LoadExtension(const ExtensionModule *ext, Bool external);
+
+#endif /* EXTENSION_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/extinit.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/extinit.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/extinit.h (working copy)
@@ -0,0 +1,189 @@
+/************************************************************
+
+Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of the above listed
+copyright holder(s) not be used in advertising or publicity pertaining
+to distribution of the software without specific, written prior
+permission.
+
+THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD
+TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
+LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+/*
+ * Copyright (C) 1994-2003 The XFree86 Project, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is furnished to do
+ * so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
+ * NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the XFree86 Project shall not
+ * be used in advertising or otherwise to promote the sale, use or other dealings
+ * in this Software without prior written authorization from the XFree86 Project.
+ */
+
+#ifndef EXTINIT_H
+#define EXTINIT_H
+
+#include "extnsionst.h"
+
+#ifdef COMPOSITE
+extern _X_EXPORT Bool noCompositeExtension;
+extern void CompositeExtensionInit(void);
+#endif
+
+#ifdef DAMAGE
+extern _X_EXPORT Bool noDamageExtension;
+extern void DamageExtensionInit(void);
+#endif
+
+#if defined(DBE)
+extern _X_EXPORT Bool noDbeExtension;
+extern void DbeExtensionInit(void);
+#endif
+
+#if defined(DPMSExtension)
+#include <X11/extensions/dpmsconst.h>
+extern _X_EXPORT Bool noDPMSExtension;
+extern void DPMSExtensionInit(void);
+#endif
+
+extern Bool noGEExtension;
+extern void GEExtensionInit(void);
+
+#ifdef GLXEXT
+extern _X_EXPORT Bool noGlxExtension;
+#endif
+
+#ifdef PANORAMIX
+#include <X11/extensions/panoramiXproto.h>
+extern _X_EXPORT Bool noPanoramiXExtension;
+extern void PanoramiXExtensionInit(void);
+#endif
+
+#ifdef RANDR
+extern _X_EXPORT Bool noRRExtension;
+extern void RRExtensionInit(void);
+#endif
+
+#if defined(XRECORD)
+extern void RecordExtensionInit(void);
+#endif
+
+extern _X_EXPORT Bool noRenderExtension;
+extern void RenderExtensionInit(void);
+
+#if defined(RES)
+#include <X11/extensions/XResproto.h>
+extern _X_EXPORT Bool noResExtension;
+extern void ResExtensionInit(void);
+#endif
+
+#if defined(SCREENSAVER)
+#include <X11/extensions/saver.h>
+extern _X_EXPORT Bool noScreenSaverExtension;
+extern void ScreenSaverExtensionInit(void);
+#endif
+
+#include <X11/extensions/shapeproto.h>
+extern void ShapeExtensionInit(void);
+
+#ifdef MITSHM
+#include <X11/extensions/shm.h>
+#include <X11/extensions/shmproto.h>
+extern _X_EXPORT Bool noMITShmExtension;
+extern void ShmExtensionInit(void);
+#endif
+
+extern void SyncExtensionInit(void);
+
+extern void XCMiscExtensionInit(void);
+
+#ifdef XCSECURITY
+#include <X11/extensions/secur.h>
+#include "securitysrv.h"
+extern _X_EXPORT Bool noSecurityExtension;
+extern void SecurityExtensionInit(void);
+#endif
+
+#ifdef XF86BIGFONT
+#include <X11/extensions/xf86bigfproto.h>
+extern _X_EXPORT Bool noXFree86BigfontExtension;
+extern void XFree86BigfontExtensionInit(void);
+#endif
+
+extern void BigReqExtensionInit(void);
+
+extern _X_EXPORT Bool noXFixesExtension;
+extern void XFixesExtensionInit(void);
+
+extern void XInputExtensionInit(void);
+extern _X_EXPORT void AssignTypeAndName(DeviceIntPtr dev,
+ Atom type,
+ const char *name);
+
+#include <X11/extensions/XKB.h>
+extern void XkbExtensionInit(void);
+
+#if defined(XSELINUX)
+#include "xselinux.h"
+extern _X_EXPORT Bool noSELinuxExtension;
+extern void SELinuxExtensionInit(void);
+#endif
+
+#ifdef XTEST
+#include <X11/extensions/xtestconst.h>
+#include <X11/extensions/xtestproto.h>
+extern void XTestExtensionInit(void);
+#endif
+
+#ifdef INXQUARTZ
+extern _X_EXPORT Bool noPseudoramiXExtension;
+extern void PseudoramiXExtensionInit(void);
+#endif
+
+#if defined(XV)
+#include <X11/extensions/Xv.h>
+#include <X11/extensions/XvMC.h>
+extern _X_EXPORT Bool noXvExtension;
+extern void XvExtensionInit(void);
+extern void XvMCExtensionInit(void);
+#endif
+
+#if defined(DRI3)
+#include <X11/extensions/dri3proto.h>
+extern void dri3_extension_init(void);
+#endif
+
+#if defined(PRESENT)
+#include <X11/extensions/presentproto.h>
+#include "presentext.h"
+#endif
+
+#endif
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/extnsionst.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/extnsionst.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/extnsionst.h (working copy)
@@ -0,0 +1,112 @@
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef EXTENSIONSTRUCT_H
+#define EXTENSIONSTRUCT_H
+
+#include "dix.h"
+#include "misc.h"
+#include "screenint.h"
+#include "extension.h"
+#include "gc.h"
+#include "privates.h"
+
+typedef struct _ExtensionEntry {
+ int index;
+ void (*CloseDown) ( /* called at server shutdown */
+ struct _ExtensionEntry * /* extension */ );
+ const char *name; /* extension name */
+ int base; /* base request number */
+ int eventBase;
+ int eventLast;
+ int errorBase;
+ int errorLast;
+ int num_aliases;
+ const char **aliases;
+ void *extPrivate;
+ unsigned short (*MinorOpcode) ( /* called for errors */
+ ClientPtr /* client */ );
+ PrivateRec *devPrivates;
+} ExtensionEntry;
+
+/*
+ * The arguments may be different for extension event swapping functions.
+ * Deal with this by casting when initializing the event's EventSwapVector[]
+ * entries.
+ */
+typedef void (*EventSwapPtr) (xEvent *, xEvent *);
+
+extern _X_EXPORT EventSwapPtr EventSwapVector[128];
+
+extern _X_EXPORT void
+NotImplemented( /* FIXME: this may move to another file... */
+ xEvent *, xEvent *) _X_NORETURN;
+
+#define SetGCVector(pGC, VectorElement, NewRoutineAddress, Atom) \
+ pGC->VectorElement = NewRoutineAddress;
+
+#define GetGCValue(pGC, GCElement) (pGC->GCElement)
+
+extern _X_EXPORT ExtensionEntry *
+AddExtension(const char * /*name */ ,
+ int /*NumEvents */ ,
+ int /*NumErrors */ ,
+ int (* /*MainProc */ )(ClientPtr /*client */ ),
+ int (* /*SwappedMainProc */ )(ClientPtr /*client */ ),
+ void (* /*CloseDownProc */ )(ExtensionEntry * /*extension */ ),
+ unsigned short (* /*MinorOpcodeProc */ )(ClientPtr /*client */ )
+ );
+
+extern _X_EXPORT Bool
+AddExtensionAlias(const char * /*alias */ ,
+ ExtensionEntry * /*extension */ );
+
+extern _X_EXPORT ExtensionEntry *
+CheckExtension(const char *extname);
+extern _X_EXPORT ExtensionEntry *
+GetExtensionEntry(int major);
+
+#endif /* EXTENSIONSTRUCT_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/fb.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/fb.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/fb.h (working copy)
@@ -0,0 +1,1660 @@
+/*
+ *
+ * Copyright © 1998 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _FB_H_
+#define _FB_H_
+
+#include <X11/X.h>
+#include <pixman.h>
+
+#include "scrnintstr.h"
+#include "pixmap.h"
+#include "pixmapstr.h"
+#include "region.h"
+#include "gcstruct.h"
+#include "colormap.h"
+#include "miscstruct.h"
+#include "servermd.h"
+#include "windowstr.h"
+#include "privates.h"
+#include "mi.h"
+#include "migc.h"
+#include "picturestr.h"
+
+#ifdef FB_ACCESS_WRAPPER
+
+#include "wfbrename.h"
+#define FBPREFIX(x) wfb##x
+#define WRITE(ptr, val) ((*wfbWriteMemory)((ptr), (val), sizeof(*(ptr))))
+#define READ(ptr) ((*wfbReadMemory)((ptr), sizeof(*(ptr))))
+
+#define MEMCPY_WRAPPED(dst, src, size) do { \
+ size_t _i; \
+ CARD8 *_dst = (CARD8*)(dst), *_src = (CARD8*)(src); \
+ for(_i = 0; _i < size; _i++) { \
+ WRITE(_dst +_i, READ(_src + _i)); \
+ } \
+} while(0)
+
+#define MEMSET_WRAPPED(dst, val, size) do { \
+ size_t _i; \
+ CARD8 *_dst = (CARD8*)(dst); \
+ for(_i = 0; _i < size; _i++) { \
+ WRITE(_dst +_i, (val)); \
+ } \
+} while(0)
+
+#else
+
+#define FBPREFIX(x) fb##x
+#define WRITE(ptr, val) (*(ptr) = (val))
+#define READ(ptr) (*(ptr))
+#define MEMCPY_WRAPPED(dst, src, size) memcpy((dst), (src), (size))
+#define MEMSET_WRAPPED(dst, val, size) memset((dst), (val), (size))
+
+#endif
+
+/*
+ * This single define controls the basic size of data manipulated
+ * by this software; it must be log2(sizeof (FbBits) * 8)
+ */
+
+#ifndef FB_SHIFT
+#define FB_SHIFT LOG2_BITMAP_PAD
+#endif
+
+#if FB_SHIFT < LOG2_BITMAP_PAD
+error FB_SHIFT must be >= LOG2_BITMAP_PAD
+#endif
+#define FB_UNIT (1 << FB_SHIFT)
+#define FB_HALFUNIT (1 << (FB_SHIFT-1))
+#define FB_MASK (FB_UNIT - 1)
+#define FB_ALLONES ((FbBits) -1)
+#if GLYPHPADBYTES != 4
+#error "GLYPHPADBYTES must be 4"
+#endif
+/* for driver compat - intel UXA needs the second one at least */
+#define FB_24BIT
+#define FB_24_32BIT
+#define FB_STIP_SHIFT LOG2_BITMAP_PAD
+#define FB_STIP_UNIT (1 << FB_STIP_SHIFT)
+#define FB_STIP_MASK (FB_STIP_UNIT - 1)
+#define FB_STIP_ALLONES ((FbStip) -1)
+#define FB_STIP_ODDSTRIDE(s) (((s) & (FB_MASK >> FB_STIP_SHIFT)) != 0)
+#define FB_STIP_ODDPTR(p) ((((long) (p)) & (FB_MASK >> 3)) != 0)
+#define FbStipStrideToBitsStride(s) (((s) >> (FB_SHIFT - FB_STIP_SHIFT)))
+#define FbBitsStrideToStipStride(s) (((s) << (FB_SHIFT - FB_STIP_SHIFT)))
+#define FbFullMask(n) ((n) == FB_UNIT ? FB_ALLONES : ((((FbBits) 1) << n) - 1))
+#if FB_SHIFT == 6
+#ifdef WIN32
+typedef unsigned __int64 FbBits;
+#else
+#if defined(__alpha__) || defined(__alpha) || \
+ defined(ia64) || defined(__ia64__) || \
+ defined(__sparc64__) || defined(_LP64) || \
+ defined(__s390x__) || \
+ defined(amd64) || defined (__amd64__) || \
+ defined (__powerpc64__)
+typedef unsigned long FbBits;
+#else
+typedef unsigned long long FbBits;
+#endif
+#endif
+#endif
+
+#if FB_SHIFT == 5
+typedef CARD32 FbBits;
+#endif
+
+#if FB_SHIFT == 4
+typedef CARD16 FbBits;
+#endif
+
+#if LOG2_BITMAP_PAD == FB_SHIFT
+typedef FbBits FbStip;
+#else
+#if LOG2_BITMAP_PAD == 5
+typedef CARD32 FbStip;
+#endif
+#endif
+
+typedef int FbStride;
+
+#ifdef FB_DEBUG
+extern _X_EXPORT void fbValidateDrawable(DrawablePtr d);
+extern _X_EXPORT void fbInitializeDrawable(DrawablePtr d);
+extern _X_EXPORT void fbSetBits(FbStip * bits, int stride, FbStip data);
+
+#define FB_HEAD_BITS (FbStip) (0xbaadf00d)
+#define FB_TAIL_BITS (FbStip) (0xbaddf0ad)
+#else
+#define fbValidateDrawable(d)
+#define fdInitializeDrawable(d)
+#endif
+
+#include "fbrop.h"
+
+#if BITMAP_BIT_ORDER == LSBFirst
+#define FbScrLeft(x,n) ((x) >> (n))
+#define FbScrRight(x,n) ((x) << (n))
+/* #define FbLeftBits(x,n) ((x) & ((((FbBits) 1) << (n)) - 1)) */
+#define FbLeftStipBits(x,n) ((x) & ((((FbStip) 1) << (n)) - 1))
+#define FbStipMoveLsb(x,s,n) (FbStipRight (x,(s)-(n)))
+#define FbPatternOffsetBits 0
+#else
+#define FbScrLeft(x,n) ((x) << (n))
+#define FbScrRight(x,n) ((x) >> (n))
+/* #define FbLeftBits(x,n) ((x) >> (FB_UNIT - (n))) */
+#define FbLeftStipBits(x,n) ((x) >> (FB_STIP_UNIT - (n)))
+#define FbStipMoveLsb(x,s,n) (x)
+#define FbPatternOffsetBits (sizeof (FbBits) - 1)
+#endif
+
+#include "micoord.h"
+
+#define FbStipLeft(x,n) FbScrLeft(x,n)
+#define FbStipRight(x,n) FbScrRight(x,n)
+
+#define FbRotLeft(x,n) FbScrLeft(x,n) | (n ? FbScrRight(x,FB_UNIT-n) : 0)
+#define FbRotRight(x,n) FbScrRight(x,n) | (n ? FbScrLeft(x,FB_UNIT-n) : 0)
+
+#define FbRotStipLeft(x,n) FbStipLeft(x,n) | (n ? FbStipRight(x,FB_STIP_UNIT-n) : 0)
+#define FbRotStipRight(x,n) FbStipRight(x,n) | (n ? FbStipLeft(x,FB_STIP_UNIT-n) : 0)
+
+#define FbLeftMask(x) ( ((x) & FB_MASK) ? \
+ FbScrRight(FB_ALLONES,(x) & FB_MASK) : 0)
+#define FbRightMask(x) ( ((FB_UNIT - (x)) & FB_MASK) ? \
+ FbScrLeft(FB_ALLONES,(FB_UNIT - (x)) & FB_MASK) : 0)
+
+#define FbLeftStipMask(x) ( ((x) & FB_STIP_MASK) ? \
+ FbStipRight(FB_STIP_ALLONES,(x) & FB_STIP_MASK) : 0)
+#define FbRightStipMask(x) ( ((FB_STIP_UNIT - (x)) & FB_STIP_MASK) ? \
+ FbScrLeft(FB_STIP_ALLONES,(FB_STIP_UNIT - (x)) & FB_STIP_MASK) : 0)
+
+#define FbBitsMask(x,w) (FbScrRight(FB_ALLONES,(x) & FB_MASK) & \
+ FbScrLeft(FB_ALLONES,(FB_UNIT - ((x) + (w))) & FB_MASK))
+
+#define FbStipMask(x,w) (FbStipRight(FB_STIP_ALLONES,(x) & FB_STIP_MASK) & \
+ FbStipLeft(FB_STIP_ALLONES,(FB_STIP_UNIT - ((x)+(w))) & FB_STIP_MASK))
+
+#define FbMaskBits(x,w,l,n,r) { \
+ n = (w); \
+ r = FbRightMask((x)+n); \
+ l = FbLeftMask(x); \
+ if (l) { \
+ n -= FB_UNIT - ((x) & FB_MASK); \
+ if (n < 0) { \
+ n = 0; \
+ l &= r; \
+ r = 0; \
+ } \
+ } \
+ n >>= FB_SHIFT; \
+}
+
+#define FbByteMaskInvalid 0x10
+
+#define FbPatternOffset(o,t) ((o) ^ (FbPatternOffsetBits & ~(sizeof (t) - 1)))
+
+#define FbPtrOffset(p,o,t) ((t *) ((CARD8 *) (p) + (o)))
+#define FbSelectPatternPart(xor,o,t) ((xor) >> (FbPatternOffset (o,t) << 3))
+#define FbStorePart(dst,off,t,xor) (WRITE(FbPtrOffset(dst,off,t), \
+ FbSelectPart(xor,off,t)))
+#ifndef FbSelectPart
+#define FbSelectPart(x,o,t) FbSelectPatternPart(x,o,t)
+#endif
+
+#define FbMaskBitsBytes(x,w,copy,l,lb,n,r,rb) { \
+ n = (w); \
+ lb = 0; \
+ rb = 0; \
+ r = FbRightMask((x)+n); \
+ if (r) { \
+ /* compute right byte length */ \
+ if ((copy) && (((x) + n) & 7) == 0) { \
+ rb = (((x) + n) & FB_MASK) >> 3; \
+ } else { \
+ rb = FbByteMaskInvalid; \
+ } \
+ } \
+ l = FbLeftMask(x); \
+ if (l) { \
+ /* compute left byte length */ \
+ if ((copy) && ((x) & 7) == 0) { \
+ lb = ((x) & FB_MASK) >> 3; \
+ } else { \
+ lb = FbByteMaskInvalid; \
+ } \
+ /* subtract out the portion painted by leftMask */ \
+ n -= FB_UNIT - ((x) & FB_MASK); \
+ if (n < 0) { \
+ if (lb != FbByteMaskInvalid) { \
+ if (rb == FbByteMaskInvalid) { \
+ lb = FbByteMaskInvalid; \
+ } else if (rb) { \
+ lb |= (rb - lb) << (FB_SHIFT - 3); \
+ rb = 0; \
+ } \
+ } \
+ n = 0; \
+ l &= r; \
+ r = 0; \
+ }\
+ } \
+ n >>= FB_SHIFT; \
+}
+
+#if FB_SHIFT == 6
+#define FbDoLeftMaskByteRRop6Cases(dst,xor) \
+ case (sizeof (FbBits) - 7) | (1 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
+ break; \
+ case (sizeof (FbBits) - 7) | (2 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 6,CARD8,xor); \
+ break; \
+ case (sizeof (FbBits) - 7) | (3 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
+ break; \
+ case (sizeof (FbBits) - 7) | (4 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
+ break; \
+ case (sizeof (FbBits) - 7) | (5 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
+ break; \
+ case (sizeof (FbBits) - 7) | (6 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
+ break; \
+ case (sizeof (FbBits) - 7): \
+ FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
+ break; \
+ case (sizeof (FbBits) - 6) | (1 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 6,CARD8,xor); \
+ break; \
+ case (sizeof (FbBits) - 6) | (2 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
+ break; \
+ case (sizeof (FbBits) - 6) | (3 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
+ break; \
+ case (sizeof (FbBits) - 6) | (4 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
+ break; \
+ case (sizeof (FbBits) - 6) | (5 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
+ break; \
+ case (sizeof (FbBits) - 6): \
+ FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
+ break; \
+ case (sizeof (FbBits) - 5) | (1 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
+ break; \
+ case (sizeof (FbBits) - 5) | (2 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
+ break; \
+ case (sizeof (FbBits) - 5) | (3 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
+ break; \
+ case (sizeof (FbBits) - 5) | (4 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
+ break; \
+ case (sizeof (FbBits) - 5): \
+ FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
+ break; \
+ case (sizeof (FbBits) - 4) | (1 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
+ break; \
+ case (sizeof (FbBits) - 4) | (2 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
+ break; \
+ case (sizeof (FbBits) - 4) | (3 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
+ break; \
+ case (sizeof (FbBits) - 4): \
+ FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
+ break;
+
+#define FbDoRightMaskByteRRop6Cases(dst,xor) \
+ case 4: \
+ FbStorePart(dst,0,CARD32,xor); \
+ break; \
+ case 5: \
+ FbStorePart(dst,0,CARD32,xor); \
+ FbStorePart(dst,4,CARD8,xor); \
+ break; \
+ case 6: \
+ FbStorePart(dst,0,CARD32,xor); \
+ FbStorePart(dst,4,CARD16,xor); \
+ break; \
+ case 7: \
+ FbStorePart(dst,0,CARD32,xor); \
+ FbStorePart(dst,4,CARD16,xor); \
+ FbStorePart(dst,6,CARD8,xor); \
+ break;
+#else
+#define FbDoLeftMaskByteRRop6Cases(dst,xor)
+#define FbDoRightMaskByteRRop6Cases(dst,xor)
+#endif
+
+#define FbDoLeftMaskByteRRop(dst,lb,l,and,xor) { \
+ switch (lb) { \
+ FbDoLeftMaskByteRRop6Cases(dst,xor) \
+ case (sizeof (FbBits) - 3) | (1 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
+ break; \
+ case (sizeof (FbBits) - 3) | (2 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
+ FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
+ break; \
+ case (sizeof (FbBits) - 2) | (1 << (FB_SHIFT - 3)): \
+ FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
+ break; \
+ case sizeof (FbBits) - 3: \
+ FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
+ case sizeof (FbBits) - 2: \
+ FbStorePart(dst,sizeof (FbBits) - 2,CARD16,xor); \
+ break; \
+ case sizeof (FbBits) - 1: \
+ FbStorePart(dst,sizeof (FbBits) - 1,CARD8,xor); \
+ break; \
+ default: \
+ WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, l)); \
+ break; \
+ } \
+}
+
+#define FbDoRightMaskByteRRop(dst,rb,r,and,xor) { \
+ switch (rb) { \
+ case 1: \
+ FbStorePart(dst,0,CARD8,xor); \
+ break; \
+ case 2: \
+ FbStorePart(dst,0,CARD16,xor); \
+ break; \
+ case 3: \
+ FbStorePart(dst,0,CARD16,xor); \
+ FbStorePart(dst,2,CARD8,xor); \
+ break; \
+ FbDoRightMaskByteRRop6Cases(dst,xor) \
+ default: \
+ WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, r)); \
+ } \
+}
+
+#define FbMaskStip(x,w,l,n,r) { \
+ n = (w); \
+ r = FbRightStipMask((x)+n); \
+ l = FbLeftStipMask(x); \
+ if (l) { \
+ n -= FB_STIP_UNIT - ((x) & FB_STIP_MASK); \
+ if (n < 0) { \
+ n = 0; \
+ l &= r; \
+ r = 0; \
+ } \
+ } \
+ n >>= FB_STIP_SHIFT; \
+}
+
+/*
+ * These macros are used to transparently stipple
+ * in copy mode; the expected usage is with 'n' constant
+ * so all of the conditional parts collapse into a minimal
+ * sequence of partial word writes
+ *
+ * 'n' is the bytemask of which bytes to store, 'a' is the address
+ * of the FbBits base unit, 'o' is the offset within that unit
+ *
+ * The term "lane" comes from the hardware term "byte-lane" which
+ */
+
+#define FbLaneCase1(n,a,o) \
+ if ((n) == 0x01) { \
+ WRITE((CARD8 *) ((a)+FbPatternOffset(o,CARD8)), fgxor); \
+ }
+
+#define FbLaneCase2(n,a,o) \
+ if ((n) == 0x03) { \
+ WRITE((CARD16 *) ((a)+FbPatternOffset(o,CARD16)), fgxor); \
+ } else { \
+ FbLaneCase1((n)&1,a,o) \
+ FbLaneCase1((n)>>1,a,(o)+1) \
+ }
+
+#define FbLaneCase4(n,a,o) \
+ if ((n) == 0x0f) { \
+ WRITE((CARD32 *) ((a)+FbPatternOffset(o,CARD32)), fgxor); \
+ } else { \
+ FbLaneCase2((n)&3,a,o) \
+ FbLaneCase2((n)>>2,a,(o)+2) \
+ }
+
+#define FbLaneCase8(n,a,o) \
+ if ((n) == 0x0ff) { \
+ *(FbBits *) ((a)+(o)) = fgxor; \
+ } else { \
+ FbLaneCase4((n)&15,a,o) \
+ FbLaneCase4((n)>>4,a,(o)+4) \
+ }
+
+#if FB_SHIFT == 6
+#define FbLaneCase(n,a) FbLaneCase8(n,(CARD8 *) (a),0)
+#endif
+
+#if FB_SHIFT == 5
+#define FbLaneCase(n,a) FbLaneCase4(n,(CARD8 *) (a),0)
+#endif
+
+/* Rotate a filled pixel value to the specified alignement */
+#define FbRot24(p,b) (FbScrRight(p,b) | FbScrLeft(p,24-(b)))
+#define FbRot24Stip(p,b) (FbStipRight(p,b) | FbStipLeft(p,24-(b)))
+
+/* step a filled pixel value to the next/previous FB_UNIT alignment */
+#define FbNext24Pix(p) (FbRot24(p,(24-FB_UNIT%24)))
+#define FbPrev24Pix(p) (FbRot24(p,FB_UNIT%24))
+#define FbNext24Stip(p) (FbRot24(p,(24-FB_STIP_UNIT%24)))
+#define FbPrev24Stip(p) (FbRot24(p,FB_STIP_UNIT%24))
+
+/* step a rotation value to the next/previous rotation value */
+#if FB_UNIT == 64
+#define FbNext24Rot(r) ((r) == 16 ? 0 : (r) + 8)
+#define FbPrev24Rot(r) ((r) == 0 ? 16 : (r) - 8)
+
+#if IMAGE_BYTE_ORDER == MSBFirst
+#define FbFirst24Rot(x) (((x) + 8) % 24)
+#else
+#define FbFirst24Rot(x) ((x) % 24)
+#endif
+
+#endif
+
+#if FB_UNIT == 32
+#define FbNext24Rot(r) ((r) == 0 ? 16 : (r) - 8)
+#define FbPrev24Rot(r) ((r) == 16 ? 0 : (r) + 8)
+
+#if IMAGE_BYTE_ORDER == MSBFirst
+#define FbFirst24Rot(x) (((x) + 16) % 24)
+#else
+#define FbFirst24Rot(x) ((x) % 24)
+#endif
+#endif
+
+#define FbNext24RotStip(r) ((r) == 0 ? 16 : (r) - 8)
+#define FbPrev24RotStip(r) ((r) == 16 ? 0 : (r) + 8)
+
+/* Whether 24-bit specific code is needed for this filled pixel value */
+#define FbCheck24Pix(p) ((p) == FbNext24Pix(p))
+
+/* Macros for dealing with dashing */
+
+#define FbDashDeclare \
+ unsigned char *__dash, *__firstDash, *__lastDash
+
+#define FbDashInit(pGC,pPriv,dashOffset,dashlen,even) { \
+ (even) = TRUE; \
+ __firstDash = (pGC)->dash; \
+ __lastDash = __firstDash + (pGC)->numInDashList; \
+ (dashOffset) %= (pPriv)->dashLength; \
+ \
+ __dash = __firstDash; \
+ while ((dashOffset) >= ((dashlen) = *__dash)) \
+ { \
+ (dashOffset) -= (dashlen); \
+ (even) = 1-(even); \
+ if (++__dash == __lastDash) \
+ __dash = __firstDash; \
+ } \
+ (dashlen) -= (dashOffset); \
+}
+
+#define FbDashNext(dashlen) { \
+ if (++__dash == __lastDash) \
+ __dash = __firstDash; \
+ (dashlen) = *__dash; \
+}
+
+/* as numInDashList is always even, this case can skip a test */
+
+#define FbDashNextEven(dashlen) { \
+ (dashlen) = *++__dash; \
+}
+
+#define FbDashNextOdd(dashlen) FbDashNext(dashlen)
+
+#define FbDashStep(dashlen,even) { \
+ if (!--(dashlen)) { \
+ FbDashNext(dashlen); \
+ (even) = 1-(even); \
+ } \
+}
+
+extern _X_EXPORT const GCOps fbGCOps;
+extern _X_EXPORT const GCFuncs fbGCFuncs;
+
+/* Framebuffer access wrapper */
+typedef FbBits(*ReadMemoryProcPtr) (const void *src, int size);
+typedef void (*WriteMemoryProcPtr) (void *dst, FbBits value, int size);
+typedef void (*SetupWrapProcPtr) (ReadMemoryProcPtr * pRead,
+ WriteMemoryProcPtr * pWrite,
+ DrawablePtr pDraw);
+typedef void (*FinishWrapProcPtr) (DrawablePtr pDraw);
+
+#ifdef FB_ACCESS_WRAPPER
+
+#define fbPrepareAccess(pDraw) \
+ fbGetScreenPrivate((pDraw)->pScreen)->setupWrap( \
+ &wfbReadMemory, \
+ &wfbWriteMemory, \
+ (pDraw))
+#define fbFinishAccess(pDraw) \
+ fbGetScreenPrivate((pDraw)->pScreen)->finishWrap(pDraw)
+
+#else
+
+#define fbPrepareAccess(pPix)
+#define fbFinishAccess(pDraw)
+
+#endif
+
+extern _X_EXPORT DevPrivateKey
+fbGetScreenPrivateKey(void);
+
+/* private field of a screen */
+typedef struct {
+ unsigned char win32bpp; /* window bpp for 32-bpp images */
+ unsigned char pix32bpp; /* pixmap bpp for 32-bpp images */
+#ifdef FB_ACCESS_WRAPPER
+ SetupWrapProcPtr setupWrap; /* driver hook to set pixmap access wrapping */
+ FinishWrapProcPtr finishWrap; /* driver hook to clean up pixmap access wrapping */
+#endif
+ DevPrivateKeyRec gcPrivateKeyRec;
+ DevPrivateKeyRec winPrivateKeyRec;
+} FbScreenPrivRec, *FbScreenPrivPtr;
+
+#define fbGetScreenPrivate(pScreen) ((FbScreenPrivPtr) \
+ dixLookupPrivate(&(pScreen)->devPrivates, fbGetScreenPrivateKey()))
+
+/* private field of GC */
+typedef struct {
+ FbBits and, xor; /* reduced rop values */
+ FbBits bgand, bgxor; /* for stipples */
+ FbBits fg, bg, pm; /* expanded and filled */
+ unsigned int dashLength; /* total of all dash elements */
+ unsigned char evenStipple; /* stipple is even */
+ unsigned char bpp; /* current drawable bpp */
+} FbGCPrivRec, *FbGCPrivPtr;
+
+#define fbGetGCPrivateKey(pGC) (&fbGetScreenPrivate((pGC)->pScreen)->gcPrivateKeyRec)
+
+#define fbGetGCPrivate(pGC) ((FbGCPrivPtr)\
+ dixLookupPrivate(&(pGC)->devPrivates, fbGetGCPrivateKey(pGC)))
+
+#define fbGetCompositeClip(pGC) ((pGC)->pCompositeClip)
+#define fbGetExpose(pGC) ((pGC)->fExpose)
+#define fbGetFreeCompClip(pGC) ((pGC)->freeCompClip)
+#define fbGetRotatedPixmap(pGC) ((pGC)->pRotatedPixmap)
+
+#define fbGetScreenPixmap(s) ((PixmapPtr) (s)->devPrivate)
+
+#define fbGetWinPrivateKey(pWin) (&fbGetScreenPrivate(((DrawablePtr) (pWin))->pScreen)->winPrivateKeyRec)
+
+#define fbGetWindowPixmap(pWin) ((PixmapPtr)\
+ dixLookupPrivate(&((WindowPtr)(pWin))->devPrivates, fbGetWinPrivateKey(pWin)))
+
+#ifdef ROOTLESS
+#define __fbPixDrawableX(pPix) ((pPix)->drawable.x)
+#define __fbPixDrawableY(pPix) ((pPix)->drawable.y)
+#else
+#define __fbPixDrawableX(pPix) 0
+#define __fbPixDrawableY(pPix) 0
+#endif
+
+#ifdef COMPOSITE
+#define __fbPixOffXWin(pPix) (__fbPixDrawableX(pPix) - (pPix)->screen_x)
+#define __fbPixOffYWin(pPix) (__fbPixDrawableY(pPix) - (pPix)->screen_y)
+#else
+#define __fbPixOffXWin(pPix) (__fbPixDrawableX(pPix))
+#define __fbPixOffYWin(pPix) (__fbPixDrawableY(pPix))
+#endif
+#define __fbPixOffXPix(pPix) (__fbPixDrawableX(pPix))
+#define __fbPixOffYPix(pPix) (__fbPixDrawableY(pPix))
+
+#define fbGetDrawablePixmap(pDrawable, pixmap, xoff, yoff) { \
+ if ((pDrawable)->type != DRAWABLE_PIXMAP) { \
+ (pixmap) = fbGetWindowPixmap(pDrawable); \
+ (xoff) = __fbPixOffXWin(pixmap); \
+ (yoff) = __fbPixOffYWin(pixmap); \
+ } else { \
+ (pixmap) = (PixmapPtr) (pDrawable); \
+ (xoff) = __fbPixOffXPix(pixmap); \
+ (yoff) = __fbPixOffYPix(pixmap); \
+ } \
+ fbPrepareAccess(pDrawable); \
+}
+
+#define fbGetPixmapBitsData(pixmap, pointer, stride, bpp) { \
+ (pointer) = (FbBits *) (pixmap)->devPrivate.ptr; \
+ (stride) = ((int) (pixmap)->devKind) / sizeof (FbBits); (void)(stride); \
+ (bpp) = (pixmap)->drawable.bitsPerPixel; (void)(bpp); \
+}
+
+#define fbGetPixmapStipData(pixmap, pointer, stride, bpp) { \
+ (pointer) = (FbStip *) (pixmap)->devPrivate.ptr; \
+ (stride) = ((int) (pixmap)->devKind) / sizeof (FbStip); (void)(stride); \
+ (bpp) = (pixmap)->drawable.bitsPerPixel; (void)(bpp); \
+}
+
+#define fbGetDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \
+ PixmapPtr _pPix; \
+ fbGetDrawablePixmap(pDrawable, _pPix, xoff, yoff); \
+ fbGetPixmapBitsData(_pPix, pointer, stride, bpp); \
+}
+
+#define fbGetStipDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \
+ PixmapPtr _pPix; \
+ fbGetDrawablePixmap(pDrawable, _pPix, xoff, yoff); \
+ fbGetPixmapStipData(_pPix, pointer, stride, bpp); \
+}
+
+/*
+ * XFree86 empties the root BorderClip when the VT is inactive,
+ * here's a macro which uses that to disable GetImage and GetSpans
+ */
+
+#define fbWindowEnabled(pWin) \
+ RegionNotEmpty(&(pWin)->drawable.pScreen->root->borderClip)
+
+#define fbDrawableEnabled(pDrawable) \
+ ((pDrawable)->type == DRAWABLE_PIXMAP ? \
+ TRUE : fbWindowEnabled((WindowPtr) pDrawable))
+
+#define FbPowerOfTwo(w) (((w) & ((w) - 1)) == 0)
+/*
+ * Accelerated tiles are power of 2 width <= FB_UNIT
+ */
+#define FbEvenTile(w) ((w) <= FB_UNIT && FbPowerOfTwo(w))
+/*
+ * Accelerated stipples are power of 2 width and <= FB_UNIT/dstBpp
+ * with dstBpp a power of 2 as well
+ */
+#define FbEvenStip(w,bpp) ((w) * (bpp) <= FB_UNIT && FbPowerOfTwo(w) && FbPowerOfTwo(bpp))
+
+/*
+ * fb24_32.c
+ */
+extern _X_EXPORT void
+
+fb24_32GetSpans(DrawablePtr pDrawable,
+ int wMax,
+ DDXPointPtr ppt, int *pwidth, int nspans, char *pchardstStart);
+
+extern _X_EXPORT void
+
+fb24_32SetSpans(DrawablePtr pDrawable,
+ GCPtr pGC,
+ char *src,
+ DDXPointPtr ppt, int *pwidth, int nspans, int fSorted);
+
+extern _X_EXPORT void
+
+fb24_32PutZImage(DrawablePtr pDrawable,
+ RegionPtr pClip,
+ int alu,
+ FbBits pm,
+ int x,
+ int y, int width, int height, CARD8 *src, FbStride srcStride);
+
+extern _X_EXPORT void
+
+fb24_32GetImage(DrawablePtr pDrawable,
+ int x,
+ int y,
+ int w,
+ int h, unsigned int format, unsigned long planeMask, char *d);
+
+extern _X_EXPORT void
+
+fb24_32CopyMtoN(DrawablePtr pSrcDrawable,
+ DrawablePtr pDstDrawable,
+ GCPtr pGC,
+ BoxPtr pbox,
+ int nbox,
+ int dx,
+ int dy,
+ Bool reverse, Bool upsidedown, Pixel bitplane, void *closure);
+
+extern _X_EXPORT PixmapPtr
+ fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel);
+
+extern _X_EXPORT Bool
+ fb24_32CreateScreenResources(ScreenPtr pScreen);
+
+extern _X_EXPORT Bool
+
+fb24_32ModifyPixmapHeader(PixmapPtr pPixmap,
+ int width,
+ int height,
+ int depth,
+ int bitsPerPixel, int devKind, void *pPixData);
+
+/*
+ * fballpriv.c
+ */
+extern _X_EXPORT Bool
+fbAllocatePrivates(ScreenPtr pScreen);
+
+/*
+ * fbarc.c
+ */
+
+extern _X_EXPORT void
+fbPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc * parcs);
+
+/*
+ * fbbits.c
+ */
+
+extern _X_EXPORT void
+
+fbBresSolid8(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int dashOffset,
+ int signdx,
+ int signdy,
+ int axis, int x, int y, int e, int e1, int e3, int len);
+
+extern _X_EXPORT void
+
+fbBresDash8(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int dashOffset,
+ int signdx,
+ int signdy, int axis, int x, int y, int e, int e1, int e3, int len);
+
+extern _X_EXPORT void
+
+fbDots8(FbBits * dst,
+ FbStride dstStride,
+ int dstBpp,
+ BoxPtr pBox,
+ xPoint * pts,
+ int npt,
+ int xorg, int yorg, int xoff, int yoff, FbBits and, FbBits xor);
+
+extern _X_EXPORT void
+
+fbArc8(FbBits * dst,
+ FbStride dstStride,
+ int dstBpp, xArc * arc, int dx, int dy, FbBits and, FbBits xor);
+
+extern _X_EXPORT void
+
+fbGlyph8(FbBits * dstLine,
+ FbStride dstStride,
+ int dstBpp, FbStip * stipple, FbBits fg, int height, int shift);
+
+extern _X_EXPORT void
+
+fbPolyline8(DrawablePtr pDrawable,
+ GCPtr pGC, int mode, int npt, DDXPointPtr ptsOrig);
+
+extern _X_EXPORT void
+ fbPolySegment8(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pseg);
+
+extern _X_EXPORT void
+
+fbBresSolid16(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int dashOffset,
+ int signdx,
+ int signdy,
+ int axis, int x, int y, int e, int e1, int e3, int len);
+
+extern _X_EXPORT void
+
+fbBresDash16(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int dashOffset,
+ int signdx,
+ int signdy,
+ int axis, int x, int y, int e, int e1, int e3, int len);
+
+extern _X_EXPORT void
+
+fbDots16(FbBits * dst,
+ FbStride dstStride,
+ int dstBpp,
+ BoxPtr pBox,
+ xPoint * pts,
+ int npt,
+ int xorg, int yorg, int xoff, int yoff, FbBits and, FbBits xor);
+
+extern _X_EXPORT void
+
+fbArc16(FbBits * dst,
+ FbStride dstStride,
+ int dstBpp, xArc * arc, int dx, int dy, FbBits and, FbBits xor);
+
+extern _X_EXPORT void
+
+fbGlyph16(FbBits * dstLine,
+ FbStride dstStride,
+ int dstBpp, FbStip * stipple, FbBits fg, int height, int shift);
+
+extern _X_EXPORT void
+
+fbPolyline16(DrawablePtr pDrawable,
+ GCPtr pGC, int mode, int npt, DDXPointPtr ptsOrig);
+
+extern _X_EXPORT void
+ fbPolySegment16(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pseg);
+
+extern _X_EXPORT void
+
+fbBresSolid24(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int dashOffset,
+ int signdx,
+ int signdy,
+ int axis, int x, int y, int e, int e1, int e3, int len);
+
+extern _X_EXPORT void
+
+fbBresDash24(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int dashOffset,
+ int signdx,
+ int signdy,
+ int axis, int x, int y, int e, int e1, int e3, int len);
+
+extern _X_EXPORT void
+
+fbDots24(FbBits * dst,
+ FbStride dstStride,
+ int dstBpp,
+ BoxPtr pBox,
+ xPoint * pts,
+ int npt,
+ int xorg, int yorg, int xoff, int yoff, FbBits and, FbBits xor);
+
+extern _X_EXPORT void
+
+fbArc24(FbBits * dst,
+ FbStride dstStride,
+ int dstBpp, xArc * arc, int dx, int dy, FbBits and, FbBits xor);
+
+extern _X_EXPORT void
+
+fbGlyph24(FbBits * dstLine,
+ FbStride dstStride,
+ int dstBpp, FbStip * stipple, FbBits fg, int height, int shift);
+
+extern _X_EXPORT void
+
+fbPolyline24(DrawablePtr pDrawable,
+ GCPtr pGC, int mode, int npt, DDXPointPtr ptsOrig);
+
+extern _X_EXPORT void
+ fbPolySegment24(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pseg);
+
+extern _X_EXPORT void
+
+fbBresSolid32(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int dashOffset,
+ int signdx,
+ int signdy,
+ int axis, int x, int y, int e, int e1, int e3, int len);
+
+extern _X_EXPORT void
+
+fbBresDash32(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int dashOffset,
+ int signdx,
+ int signdy,
+ int axis, int x, int y, int e, int e1, int e3, int len);
+
+extern _X_EXPORT void
+
+fbDots32(FbBits * dst,
+ FbStride dstStride,
+ int dstBpp,
+ BoxPtr pBox,
+ xPoint * pts,
+ int npt,
+ int xorg, int yorg, int xoff, int yoff, FbBits and, FbBits xor);
+
+extern _X_EXPORT void
+
+fbArc32(FbBits * dst,
+ FbStride dstStride,
+ int dstBpp, xArc * arc, int dx, int dy, FbBits and, FbBits xor);
+
+extern _X_EXPORT void
+
+fbGlyph32(FbBits * dstLine,
+ FbStride dstStride,
+ int dstBpp, FbStip * stipple, FbBits fg, int height, int shift);
+extern _X_EXPORT void
+
+fbPolyline32(DrawablePtr pDrawable,
+ GCPtr pGC, int mode, int npt, DDXPointPtr ptsOrig);
+
+extern _X_EXPORT void
+ fbPolySegment32(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pseg);
+
+/*
+ * fbblt.c
+ */
+extern _X_EXPORT void
+
+fbBlt(FbBits * src,
+ FbStride srcStride,
+ int srcX,
+ FbBits * dst,
+ FbStride dstStride,
+ int dstX,
+ int width,
+ int height, int alu, FbBits pm, int bpp, Bool reverse, Bool upsidedown);
+
+extern _X_EXPORT void
+
+fbBlt24(FbBits * srcLine,
+ FbStride srcStride,
+ int srcX,
+ FbBits * dstLine,
+ FbStride dstStride,
+ int dstX,
+ int width,
+ int height, int alu, FbBits pm, Bool reverse, Bool upsidedown);
+
+extern _X_EXPORT void
+ fbBltStip(FbStip * src, FbStride srcStride, /* in FbStip units, not FbBits units */
+ int srcX, FbStip * dst, FbStride dstStride, /* in FbStip units, not FbBits units */
+ int dstX, int width, int height, int alu, FbBits pm, int bpp);
+
+/*
+ * fbbltone.c
+ */
+extern _X_EXPORT void
+
+fbBltOne(FbStip * src,
+ FbStride srcStride,
+ int srcX,
+ FbBits * dst,
+ FbStride dstStride,
+ int dstX,
+ int dstBpp,
+ int width,
+ int height, FbBits fgand, FbBits fbxor, FbBits bgand, FbBits bgxor);
+
+extern _X_EXPORT void
+ fbBltOne24(FbStip * src, FbStride srcStride, /* FbStip units per scanline */
+ int srcX, /* bit position of source */
+ FbBits * dst, FbStride dstStride, /* FbBits units per scanline */
+ int dstX, /* bit position of dest */
+ int dstBpp, /* bits per destination unit */
+ int width, /* width in bits of destination */
+ int height, /* height in scanlines */
+ FbBits fgand, /* rrop values */
+ FbBits fgxor, FbBits bgand, FbBits bgxor);
+
+extern _X_EXPORT void
+
+fbBltPlane(FbBits * src,
+ FbStride srcStride,
+ int srcX,
+ int srcBpp,
+ FbStip * dst,
+ FbStride dstStride,
+ int dstX,
+ int width,
+ int height,
+ FbStip fgand,
+ FbStip fgxor, FbStip bgand, FbStip bgxor, Pixel planeMask);
+
+/*
+ * fbcmap_mi.c
+ */
+extern _X_EXPORT int
+ fbListInstalledColormaps(ScreenPtr pScreen, Colormap * pmaps);
+
+extern _X_EXPORT void
+ fbInstallColormap(ColormapPtr pmap);
+
+extern _X_EXPORT void
+ fbUninstallColormap(ColormapPtr pmap);
+
+extern _X_EXPORT void
+
+fbResolveColor(unsigned short *pred,
+ unsigned short *pgreen,
+ unsigned short *pblue, VisualPtr pVisual);
+
+extern _X_EXPORT Bool
+ fbInitializeColormap(ColormapPtr pmap);
+
+extern _X_EXPORT int
+
+fbExpandDirectColors(ColormapPtr pmap,
+ int ndef, xColorItem * indefs, xColorItem * outdefs);
+
+extern _X_EXPORT Bool
+ fbCreateDefColormap(ScreenPtr pScreen);
+
+extern _X_EXPORT void
+ fbClearVisualTypes(void);
+
+extern _X_EXPORT Bool
+ fbHasVisualTypes(int depth);
+
+extern _X_EXPORT Bool
+ fbSetVisualTypes(int depth, int visuals, int bitsPerRGB);
+
+extern _X_EXPORT Bool
+
+fbSetVisualTypesAndMasks(int depth, int visuals, int bitsPerRGB,
+ Pixel redMask, Pixel greenMask, Pixel blueMask);
+
+extern _X_EXPORT Bool
+
+fbInitVisuals(VisualPtr * visualp,
+ DepthPtr * depthp,
+ int *nvisualp,
+ int *ndepthp,
+ int *rootDepthp,
+ VisualID * defaultVisp, unsigned long sizes, int bitsPerRGB);
+
+/*
+ * fbcopy.c
+ */
+
+extern _X_EXPORT void
+
+fbCopyNtoN(DrawablePtr pSrcDrawable,
+ DrawablePtr pDstDrawable,
+ GCPtr pGC,
+ BoxPtr pbox,
+ int nbox,
+ int dx,
+ int dy,
+ Bool reverse, Bool upsidedown, Pixel bitplane, void *closure);
+
+extern _X_EXPORT void
+
+fbCopy1toN(DrawablePtr pSrcDrawable,
+ DrawablePtr pDstDrawable,
+ GCPtr pGC,
+ BoxPtr pbox,
+ int nbox,
+ int dx,
+ int dy,
+ Bool reverse, Bool upsidedown, Pixel bitplane, void *closure);
+
+extern _X_EXPORT void
+
+fbCopyNto1(DrawablePtr pSrcDrawable,
+ DrawablePtr pDstDrawable,
+ GCPtr pGC,
+ BoxPtr pbox,
+ int nbox,
+ int dx,
+ int dy,
+ Bool reverse, Bool upsidedown, Pixel bitplane, void *closure);
+
+extern _X_EXPORT RegionPtr
+
+fbCopyArea(DrawablePtr pSrcDrawable,
+ DrawablePtr pDstDrawable,
+ GCPtr pGC,
+ int xIn, int yIn, int widthSrc, int heightSrc, int xOut, int yOut);
+
+extern _X_EXPORT RegionPtr
+
+fbCopyPlane(DrawablePtr pSrcDrawable,
+ DrawablePtr pDstDrawable,
+ GCPtr pGC,
+ int xIn,
+ int yIn,
+ int widthSrc,
+ int heightSrc, int xOut, int yOut, unsigned long bitplane);
+
+/*
+ * fbfill.c
+ */
+extern _X_EXPORT void
+ fbFill(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int width, int height);
+
+extern _X_EXPORT void
+
+fbSolidBoxClipped(DrawablePtr pDrawable,
+ RegionPtr pClip,
+ int xa, int ya, int xb, int yb, FbBits and, FbBits xor);
+
+/*
+ * fbfillrect.c
+ */
+extern _X_EXPORT void
+
+fbPolyFillRect(DrawablePtr pDrawable,
+ GCPtr pGC, int nrectInit, xRectangle *prectInit);
+
+#define fbPolyFillArc miPolyFillArc
+
+#define fbFillPolygon miFillPolygon
+
+/*
+ * fbfillsp.c
+ */
+extern _X_EXPORT void
+
+fbFillSpans(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int nInit, DDXPointPtr pptInit, int *pwidthInit, int fSorted);
+
+/*
+ * fbgc.c
+ */
+
+extern _X_EXPORT Bool
+ fbCreateGC(GCPtr pGC);
+
+extern _X_EXPORT void
+ fbPadPixmap(PixmapPtr pPixmap);
+
+extern _X_EXPORT void
+ fbValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable);
+
+/*
+ * fbgetsp.c
+ */
+extern _X_EXPORT void
+
+fbGetSpans(DrawablePtr pDrawable,
+ int wMax,
+ DDXPointPtr ppt, int *pwidth, int nspans, char *pchardstStart);
+
+/*
+ * fbglyph.c
+ */
+
+extern _X_EXPORT Bool
+ fbGlyphIn(RegionPtr pRegion, int x, int y, int width, int height);
+
+extern _X_EXPORT void
+
+fbPolyGlyphBlt(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int x,
+ int y,
+ unsigned int nglyph, CharInfoPtr * ppci, void *pglyphBase);
+
+extern _X_EXPORT void
+
+fbImageGlyphBlt(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int x,
+ int y,
+ unsigned int nglyph, CharInfoPtr * ppci, void *pglyphBase);
+
+/*
+ * fbimage.c
+ */
+
+extern _X_EXPORT void
+
+fbPutImage(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int depth,
+ int x, int y, int w, int h, int leftPad, int format, char *pImage);
+
+extern _X_EXPORT void
+
+fbPutZImage(DrawablePtr pDrawable,
+ RegionPtr pClip,
+ int alu,
+ FbBits pm,
+ int x,
+ int y, int width, int height, FbStip * src, FbStride srcStride);
+
+extern _X_EXPORT void
+
+fbPutXYImage(DrawablePtr pDrawable,
+ RegionPtr pClip,
+ FbBits fg,
+ FbBits bg,
+ FbBits pm,
+ int alu,
+ Bool opaque,
+ int x,
+ int y,
+ int width, int height, FbStip * src, FbStride srcStride, int srcX);
+
+extern _X_EXPORT void
+
+fbGetImage(DrawablePtr pDrawable,
+ int x,
+ int y,
+ int w, int h, unsigned int format, unsigned long planeMask, char *d);
+/*
+ * fbline.c
+ */
+
+extern _X_EXPORT void
+
+fbZeroLine(DrawablePtr pDrawable,
+ GCPtr pGC, int mode, int npt, DDXPointPtr ppt);
+
+extern _X_EXPORT void
+ fbZeroSegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pSegs);
+
+extern _X_EXPORT void
+
+fbPolyLine(DrawablePtr pDrawable,
+ GCPtr pGC, int mode, int npt, DDXPointPtr ppt);
+
+extern _X_EXPORT void
+ fbFixCoordModePrevious(int npt, DDXPointPtr ppt);
+
+extern _X_EXPORT void
+ fbPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pseg);
+
+#define fbPolyRectangle miPolyRectangle
+
+/*
+ * fbpict.c
+ */
+
+extern _X_EXPORT Bool
+ fbPictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats);
+
+extern _X_EXPORT void
+fbDestroyGlyphCache(void);
+
+/*
+ * fbpixmap.c
+ */
+
+extern _X_EXPORT PixmapPtr
+
+fbCreatePixmapBpp(ScreenPtr pScreen, int width, int height, int depth, int bpp,
+ unsigned usage_hint);
+
+extern _X_EXPORT PixmapPtr
+
+fbCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
+ unsigned usage_hint);
+
+extern _X_EXPORT Bool
+ fbDestroyPixmap(PixmapPtr pPixmap);
+
+extern _X_EXPORT RegionPtr
+ fbPixmapToRegion(PixmapPtr pPix);
+
+/*
+ * fbpoint.c
+ */
+
+extern _X_EXPORT void
+
+fbDots(FbBits * dstOrig,
+ FbStride dstStride,
+ int dstBpp,
+ BoxPtr pBox,
+ xPoint * pts,
+ int npt,
+ int xorg, int yorg, int xoff, int yoff, FbBits andOrig, FbBits xorOrig);
+
+extern _X_EXPORT void
+
+fbPolyPoint(DrawablePtr pDrawable,
+ GCPtr pGC, int mode, int npt, xPoint * pptInit);
+
+/*
+ * fbpush.c
+ */
+extern _X_EXPORT void
+
+fbPushPattern(DrawablePtr pDrawable,
+ GCPtr pGC,
+ FbStip * src,
+ FbStride srcStride,
+ int srcX, int x, int y, int width, int height);
+
+extern _X_EXPORT void
+
+fbPushFill(DrawablePtr pDrawable,
+ GCPtr pGC,
+ FbStip * src,
+ FbStride srcStride, int srcX, int x, int y, int width, int height);
+
+extern _X_EXPORT void
+
+fbPushImage(DrawablePtr pDrawable,
+ GCPtr pGC,
+ FbStip * src,
+ FbStride srcStride, int srcX, int x, int y, int width, int height);
+
+extern _X_EXPORT void
+
+fbPushPixels(GCPtr pGC,
+ PixmapPtr pBitmap,
+ DrawablePtr pDrawable, int dx, int dy, int xOrg, int yOrg);
+
+/*
+ * fbscreen.c
+ */
+
+extern _X_EXPORT Bool
+ fbCloseScreen(ScreenPtr pScreen);
+
+extern _X_EXPORT Bool
+ fbRealizeFont(ScreenPtr pScreen, FontPtr pFont);
+
+extern _X_EXPORT Bool
+ fbUnrealizeFont(ScreenPtr pScreen, FontPtr pFont);
+
+extern _X_EXPORT void
+
+fbQueryBestSize(int class,
+ unsigned short *width, unsigned short *height,
+ ScreenPtr pScreen);
+
+extern _X_EXPORT PixmapPtr
+ _fbGetWindowPixmap(WindowPtr pWindow);
+
+extern _X_EXPORT void
+ _fbSetWindowPixmap(WindowPtr pWindow, PixmapPtr pPixmap);
+
+extern _X_EXPORT Bool
+ fbSetupScreen(ScreenPtr pScreen, void *pbits, /* pointer to screen bitmap */
+ int xsize, /* in pixels */
+ int ysize, int dpix, /* dots per inch */
+ int dpiy, int width, /* pixel width of frame buffer */
+ int bpp); /* bits per pixel of frame buffer */
+
+extern _X_EXPORT Bool
+
+wfbFinishScreenInit(ScreenPtr pScreen,
+ void *pbits,
+ int xsize,
+ int ysize,
+ int dpix,
+ int dpiy,
+ int width,
+ int bpp,
+ SetupWrapProcPtr setupWrap, FinishWrapProcPtr finishWrap);
+
+extern _X_EXPORT Bool
+
+wfbScreenInit(ScreenPtr pScreen,
+ void *pbits,
+ int xsize,
+ int ysize,
+ int dpix,
+ int dpiy,
+ int width,
+ int bpp,
+ SetupWrapProcPtr setupWrap, FinishWrapProcPtr finishWrap);
+
+extern _X_EXPORT Bool
+
+fbFinishScreenInit(ScreenPtr pScreen,
+ void *pbits,
+ int xsize,
+ int ysize, int dpix, int dpiy, int width, int bpp);
+
+extern _X_EXPORT Bool
+
+fbScreenInit(ScreenPtr pScreen,
+ void *pbits,
+ int xsize, int ysize, int dpix, int dpiy, int width, int bpp);
+
+/*
+ * fbseg.c
+ */
+typedef void FbBres(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int dashOffset,
+ int signdx,
+ int signdy,
+ int axis, int x, int y, int e, int e1, int e3, int len);
+
+extern _X_EXPORT FbBres fbBresSolid, fbBresDash, fbBresFill, fbBresFillDash;
+
+/*
+ * fbsetsp.c
+ */
+
+extern _X_EXPORT void
+
+fbSetSpans(DrawablePtr pDrawable,
+ GCPtr pGC,
+ char *src, DDXPointPtr ppt, int *pwidth, int nspans, int fSorted);
+
+extern _X_EXPORT FbBres *fbSelectBres(DrawablePtr pDrawable, GCPtr pGC);
+
+extern _X_EXPORT void
+
+fbBres(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int dashOffset,
+ int signdx,
+ int signdy, int axis, int x, int y, int e, int e1, int e3, int len);
+
+extern _X_EXPORT void
+
+fbSegment(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int xa, int ya, int xb, int yb, Bool drawLast, int *dashOffset);
+
+/*
+ * fbsolid.c
+ */
+
+extern _X_EXPORT void
+
+fbSolid(FbBits * dst,
+ FbStride dstStride,
+ int dstX, int bpp, int width, int height, FbBits and, FbBits xor);
+
+extern _X_EXPORT void
+
+fbSolid24(FbBits * dst,
+ FbStride dstStride,
+ int dstX, int width, int height, FbBits and, FbBits xor);
+
+/*
+ * fbstipple.c
+ */
+
+extern _X_EXPORT void
+ fbTransparentSpan(FbBits * dst, FbBits stip, FbBits fgxor, int n);
+
+extern _X_EXPORT void
+
+fbEvenStipple(FbBits * dst,
+ FbStride dstStride,
+ int dstX,
+ int dstBpp,
+ int width,
+ int height,
+ FbStip * stip,
+ FbStride stipStride,
+ int stipHeight,
+ FbBits fgand,
+ FbBits fgxor, FbBits bgand, FbBits bgxor, int xRot, int yRot);
+
+extern _X_EXPORT void
+
+fbOddStipple(FbBits * dst,
+ FbStride dstStride,
+ int dstX,
+ int dstBpp,
+ int width,
+ int height,
+ FbStip * stip,
+ FbStride stipStride,
+ int stipWidth,
+ int stipHeight,
+ FbBits fgand,
+ FbBits fgxor, FbBits bgand, FbBits bgxor, int xRot, int yRot);
+
+extern _X_EXPORT void
+
+fbStipple(FbBits * dst,
+ FbStride dstStride,
+ int dstX,
+ int dstBpp,
+ int width,
+ int height,
+ FbStip * stip,
+ FbStride stipStride,
+ int stipWidth,
+ int stipHeight,
+ Bool even,
+ FbBits fgand,
+ FbBits fgxor, FbBits bgand, FbBits bgxor, int xRot, int yRot);
+
+/*
+ * fbtile.c
+ */
+
+extern _X_EXPORT void
+
+fbEvenTile(FbBits * dst,
+ FbStride dstStride,
+ int dstX,
+ int width,
+ int height,
+ FbBits * tile,
+ FbStride tileStride,
+ int tileHeight, int alu, FbBits pm, int xRot, int yRot);
+
+extern _X_EXPORT void
+
+fbOddTile(FbBits * dst,
+ FbStride dstStride,
+ int dstX,
+ int width,
+ int height,
+ FbBits * tile,
+ FbStride tileStride,
+ int tileWidth,
+ int tileHeight, int alu, FbBits pm, int bpp, int xRot, int yRot);
+
+extern _X_EXPORT void
+
+fbTile(FbBits * dst,
+ FbStride dstStride,
+ int dstX,
+ int width,
+ int height,
+ FbBits * tile,
+ FbStride tileStride,
+ int tileWidth,
+ int tileHeight, int alu, FbBits pm, int bpp, int xRot, int yRot);
+
+/*
+ * fbutil.c
+ */
+extern _X_EXPORT FbBits fbReplicatePixel(Pixel p, int bpp);
+
+extern _X_EXPORT void
+ fbReduceRasterOp(int rop, FbBits fg, FbBits pm, FbBits * andp, FbBits * xorp);
+
+#ifdef FB_ACCESS_WRAPPER
+extern _X_EXPORT ReadMemoryProcPtr wfbReadMemory;
+extern _X_EXPORT WriteMemoryProcPtr wfbWriteMemory;
+#endif
+
+/*
+ * fbwindow.c
+ */
+
+extern _X_EXPORT Bool
+ fbCreateWindow(WindowPtr pWin);
+
+extern _X_EXPORT Bool
+ fbDestroyWindow(WindowPtr pWin);
+
+extern _X_EXPORT Bool
+ fbMapWindow(WindowPtr pWindow);
+
+extern _X_EXPORT Bool
+ fbPositionWindow(WindowPtr pWin, int x, int y);
+
+extern _X_EXPORT Bool
+ fbUnmapWindow(WindowPtr pWindow);
+
+extern _X_EXPORT void
+
+fbCopyWindowProc(DrawablePtr pSrcDrawable,
+ DrawablePtr pDstDrawable,
+ GCPtr pGC,
+ BoxPtr pbox,
+ int nbox,
+ int dx,
+ int dy,
+ Bool reverse, Bool upsidedown, Pixel bitplane, void *closure);
+
+extern _X_EXPORT void
+ fbCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
+
+extern _X_EXPORT Bool
+ fbChangeWindowAttributes(WindowPtr pWin, unsigned long mask);
+
+extern _X_EXPORT void
+
+fbFillRegionSolid(DrawablePtr pDrawable,
+ RegionPtr pRegion, FbBits and, FbBits xor);
+
+extern _X_EXPORT pixman_image_t *image_from_pict(PicturePtr pict,
+ Bool has_clip,
+ int *xoff, int *yoff);
+
+extern _X_EXPORT void free_pixman_pict(PicturePtr, pixman_image_t *);
+
+#endif /* _FB_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/fbdevhw.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/fbdevhw.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/fbdevhw.h (working copy)
@@ -0,0 +1,66 @@
+
+#ifndef _FBDEVHW_H_
+#define _FBDEVHW_H_
+
+#include "xf86str.h"
+#include "colormapst.h"
+
+#define FBDEVHW_PACKED_PIXELS 0 /* Packed Pixels */
+#define FBDEVHW_PLANES 1 /* Non interleaved planes */
+#define FBDEVHW_INTERLEAVED_PLANES 2 /* Interleaved planes */
+#define FBDEVHW_TEXT 3 /* Text/attributes */
+#define FBDEVHW_VGA_PLANES 4 /* EGA/VGA planes */
+
+extern _X_EXPORT Bool fbdevHWGetRec(ScrnInfoPtr pScrn);
+extern _X_EXPORT void fbdevHWFreeRec(ScrnInfoPtr pScrn);
+
+extern _X_EXPORT int fbdevHWGetFD(ScrnInfoPtr pScrn);
+
+extern _X_EXPORT Bool fbdevHWProbe(struct pci_device *pPci, char *device,
+ char **namep);
+extern _X_EXPORT Bool fbdevHWInit(ScrnInfoPtr pScrn, struct pci_device *pPci,
+ char *device);
+
+extern _X_EXPORT char *fbdevHWGetName(ScrnInfoPtr pScrn);
+extern _X_EXPORT int fbdevHWGetDepth(ScrnInfoPtr pScrn, int *fbbpp);
+extern _X_EXPORT int fbdevHWGetLineLength(ScrnInfoPtr pScrn);
+extern _X_EXPORT int fbdevHWGetType(ScrnInfoPtr pScrn);
+extern _X_EXPORT int fbdevHWGetVidmem(ScrnInfoPtr pScrn);
+
+extern _X_EXPORT void *fbdevHWMapVidmem(ScrnInfoPtr pScrn);
+extern _X_EXPORT int fbdevHWLinearOffset(ScrnInfoPtr pScrn);
+extern _X_EXPORT Bool fbdevHWUnmapVidmem(ScrnInfoPtr pScrn);
+extern _X_EXPORT void *fbdevHWMapMMIO(ScrnInfoPtr pScrn);
+extern _X_EXPORT Bool fbdevHWUnmapMMIO(ScrnInfoPtr pScrn);
+
+extern _X_EXPORT void fbdevHWSetVideoModes(ScrnInfoPtr pScrn);
+extern _X_EXPORT DisplayModePtr fbdevHWGetBuildinMode(ScrnInfoPtr pScrn);
+extern _X_EXPORT void fbdevHWUseBuildinMode(ScrnInfoPtr pScrn);
+extern _X_EXPORT Bool fbdevHWModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode);
+extern _X_EXPORT void fbdevHWSave(ScrnInfoPtr pScrn);
+extern _X_EXPORT void fbdevHWRestore(ScrnInfoPtr pScrn);
+
+extern _X_EXPORT void fbdevHWLoadPalette(ScrnInfoPtr pScrn, int numColors,
+ int *indices, LOCO * colors,
+ VisualPtr pVisual);
+
+extern _X_EXPORT ModeStatus fbdevHWValidMode(ScrnInfoPtr pScrn, DisplayModePtr mode,
+ Bool verbose, int flags);
+extern _X_EXPORT Bool fbdevHWSwitchMode(ScrnInfoPtr pScrn, DisplayModePtr mode);
+extern _X_EXPORT void fbdevHWAdjustFrame(ScrnInfoPtr pScrn, int x, int y);
+extern _X_EXPORT Bool fbdevHWEnterVT(ScrnInfoPtr pScrn);
+extern _X_EXPORT void fbdevHWLeaveVT(ScrnInfoPtr pScrn);
+extern _X_EXPORT void fbdevHWDPMSSet(ScrnInfoPtr pScrn, int mode, int flags);
+
+extern _X_EXPORT Bool fbdevHWSaveScreen(ScreenPtr pScreen, int mode);
+
+extern _X_EXPORT xf86SwitchModeProc *fbdevHWSwitchModeWeak(void);
+extern _X_EXPORT xf86AdjustFrameProc *fbdevHWAdjustFrameWeak(void);
+extern _X_EXPORT xf86EnterVTProc *fbdevHWEnterVTWeak(void);
+extern _X_EXPORT xf86LeaveVTProc *fbdevHWLeaveVTWeak(void);
+extern _X_EXPORT xf86ValidModeProc *fbdevHWValidModeWeak(void);
+extern _X_EXPORT xf86DPMSSetProc *fbdevHWDPMSSetWeak(void);
+extern _X_EXPORT xf86LoadPaletteProc *fbdevHWLoadPaletteWeak(void);
+extern _X_EXPORT SaveScreenProcPtr fbdevHWSaveScreenWeak(void);
+
+#endif
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/fboverlay.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/fboverlay.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/fboverlay.h (working copy)
@@ -0,0 +1,112 @@
+/*
+ *
+ * Copyright © 2000 SuSE, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of SuSE not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. SuSE makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
+ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Author: Keith Packard, SuSE, Inc.
+ */
+
+#ifndef _FBOVERLAY_H_
+#define _FBOVERLAY_H_
+
+#include "privates.h"
+
+extern _X_EXPORT DevPrivateKey fbOverlayGetScreenPrivateKey(void);
+
+#ifndef FB_OVERLAY_MAX
+#define FB_OVERLAY_MAX 2
+#endif
+
+typedef void (*fbOverlayPaintKeyProc) (DrawablePtr, RegionPtr, CARD32, int);
+
+typedef struct _fbOverlayLayer {
+ union {
+ struct {
+ void *pbits;
+ int width;
+ int depth;
+ } init;
+ struct {
+ PixmapPtr pixmap;
+ RegionRec region;
+ } run;
+ } u;
+ CARD32 key; /* special pixel value */
+} FbOverlayLayer;
+
+typedef struct _fbOverlayScrPriv {
+ int nlayers;
+ fbOverlayPaintKeyProc PaintKey;
+ miCopyProc CopyWindow;
+ FbOverlayLayer layer[FB_OVERLAY_MAX];
+} FbOverlayScrPrivRec, *FbOverlayScrPrivPtr;
+
+#define fbOverlayGetScrPriv(s) \
+ dixLookupPrivate(&(s)->devPrivates, fbOverlayGetScreenPrivateKey())
+extern _X_EXPORT Bool
+ fbOverlayCreateWindow(WindowPtr pWin);
+
+extern _X_EXPORT Bool
+ fbOverlayCloseScreen(ScreenPtr pScreen);
+
+extern _X_EXPORT int
+ fbOverlayWindowLayer(WindowPtr pWin);
+
+extern _X_EXPORT Bool
+ fbOverlayCreateScreenResources(ScreenPtr pScreen);
+
+extern _X_EXPORT void
+
+fbOverlayPaintKey(DrawablePtr pDrawable,
+ RegionPtr pRegion, CARD32 pixel, int layer);
+extern _X_EXPORT void
+ fbOverlayUpdateLayerRegion(ScreenPtr pScreen, int layer, RegionPtr prgn);
+
+extern _X_EXPORT void
+ fbOverlayCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
+
+extern _X_EXPORT void
+
+fbOverlayWindowExposures(WindowPtr pWin,
+ RegionPtr prgn, RegionPtr other_exposed);
+
+extern _X_EXPORT Bool
+
+fbOverlaySetupScreen(ScreenPtr pScreen,
+ void *pbits1,
+ void *pbits2,
+ int xsize,
+ int ysize,
+ int dpix,
+ int dpiy, int width1, int width2, int bpp1, int bpp2);
+
+extern _X_EXPORT Bool
+
+fbOverlayFinishScreenInit(ScreenPtr pScreen,
+ void *pbits1,
+ void *pbits2,
+ int xsize,
+ int ysize,
+ int dpix,
+ int dpiy,
+ int width1,
+ int width2,
+ int bpp1, int bpp2, int depth1, int depth2);
+
+#endif /* _FBOVERLAY_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/fbpict.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/fbpict.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/fbpict.h (working copy)
@@ -0,0 +1,75 @@
+/*
+ *
+ * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifndef _FBPICT_H_
+#define _FBPICT_H_
+
+/* fbpict.c */
+extern _X_EXPORT void
+
+fbComposite(CARD8 op,
+ PicturePtr pSrc,
+ PicturePtr pMask,
+ PicturePtr pDst,
+ INT16 xSrc,
+ INT16 ySrc,
+ INT16 xMask,
+ INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height);
+
+/* fbtrap.c */
+
+extern _X_EXPORT void
+
+fbAddTraps(PicturePtr pPicture,
+ INT16 xOff, INT16 yOff, int ntrap, xTrap * traps);
+
+extern _X_EXPORT void
+
+fbRasterizeTrapezoid(PicturePtr alpha, xTrapezoid * trap, int x_off, int y_off);
+
+extern _X_EXPORT void
+
+fbAddTriangles(PicturePtr pPicture,
+ INT16 xOff, INT16 yOff, int ntri, xTriangle * tris);
+
+extern _X_EXPORT void
+
+fbTrapezoids(CARD8 op,
+ PicturePtr pSrc,
+ PicturePtr pDst,
+ PictFormatPtr maskFormat,
+ INT16 xSrc, INT16 ySrc, int ntrap, xTrapezoid * traps);
+
+extern _X_EXPORT void
+
+fbTriangles(CARD8 op,
+ PicturePtr pSrc,
+ PicturePtr pDst,
+ PictFormatPtr maskFormat,
+ INT16 xSrc, INT16 ySrc, int ntris, xTriangle * tris);
+
+#endif /* _FBPICT_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/fbrop.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/fbrop.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/fbrop.h (working copy)
@@ -0,0 +1,137 @@
+/*
+ * Copyright © 1998 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _FBROP_H_
+#define _FBROP_H_
+
+typedef struct _mergeRopBits {
+ FbBits ca1, cx1, ca2, cx2;
+} FbMergeRopRec, *FbMergeRopPtr;
+
+extern _X_EXPORT const FbMergeRopRec FbMergeRopBits[16];
+
+#define FbDeclareMergeRop() FbBits _ca1, _cx1, _ca2, _cx2;
+#define FbDeclarePrebuiltMergeRop() FbBits _cca, _ccx;
+
+#define FbInitializeMergeRop(alu,pm) {\
+ const FbMergeRopRec *_bits; \
+ _bits = &FbMergeRopBits[alu]; \
+ _ca1 = _bits->ca1 & pm; \
+ _cx1 = _bits->cx1 | ~pm; \
+ _ca2 = _bits->ca2 & pm; \
+ _cx2 = _bits->cx2 & pm; \
+}
+
+#define FbDestInvarientRop(alu,pm) ((pm) == FB_ALLONES && \
+ (((alu) >> 1 & 5) == ((alu) & 5)))
+
+#define FbDestInvarientMergeRop() (_ca1 == 0 && _cx1 == 0)
+
+/* AND has higher precedence than XOR */
+
+#define FbDoMergeRop(src, dst) \
+ (((dst) & (((src) & _ca1) ^ _cx1)) ^ (((src) & _ca2) ^ _cx2))
+
+#define FbDoDestInvarientMergeRop(src) (((src) & _ca2) ^ _cx2)
+
+#define FbDoMaskMergeRop(src, dst, mask) \
+ (((dst) & ((((src) & _ca1) ^ _cx1) | ~(mask))) ^ ((((src) & _ca2) ^ _cx2) & (mask)))
+
+#define FbDoLeftMaskByteMergeRop(dst, src, lb, l) { \
+ FbBits __xor = ((src) & _ca2) ^ _cx2; \
+ FbDoLeftMaskByteRRop(dst,lb,l,((src) & _ca1) ^ _cx1,__xor); \
+}
+
+#define FbDoRightMaskByteMergeRop(dst, src, rb, r) { \
+ FbBits __xor = ((src) & _ca2) ^ _cx2; \
+ FbDoRightMaskByteRRop(dst,rb,r,((src) & _ca1) ^ _cx1,__xor); \
+}
+
+#define FbDoRRop(dst, and, xor) (((dst) & (and)) ^ (xor))
+
+#define FbDoMaskRRop(dst, and, xor, mask) \
+ (((dst) & ((and) | ~(mask))) ^ (xor & mask))
+
+/*
+ * Take a single bit (0 or 1) and generate a full mask
+ */
+#define fbFillFromBit(b,t) (~((t) ((b) & 1)-1))
+
+#define fbXorT(rop,fg,pm,t) ((((fg) & fbFillFromBit((rop) >> 1,t)) | \
+ (~(fg) & fbFillFromBit((rop) >> 3,t))) & (pm))
+
+#define fbAndT(rop,fg,pm,t) ((((fg) & fbFillFromBit (rop ^ (rop>>1),t)) | \
+ (~(fg) & fbFillFromBit((rop>>2) ^ (rop>>3),t))) | \
+ ~(pm))
+
+#define fbXor(rop,fg,pm) fbXorT(rop,fg,pm,FbBits)
+
+#define fbAnd(rop,fg,pm) fbAndT(rop,fg,pm,FbBits)
+
+#define fbXorStip(rop,fg,pm) fbXorT(rop,fg,pm,FbStip)
+
+#define fbAndStip(rop,fg,pm) fbAndT(rop,fg,pm,FbStip)
+
+/*
+ * Stippling operations;
+ */
+
+extern _X_EXPORT const FbBits fbStipple16Bits[256]; /* half of table */
+
+#define FbStipple16Bits(b) \
+ (fbStipple16Bits[(b)&0xff] | fbStipple16Bits[(b) >> 8] << FB_HALFUNIT)
+extern _X_EXPORT const FbBits fbStipple8Bits[256];
+extern _X_EXPORT const FbBits fbStipple4Bits[16];
+extern _X_EXPORT const FbBits fbStipple2Bits[4];
+extern _X_EXPORT const FbBits fbStipple1Bits[2];
+extern _X_EXPORT const FbBits *const fbStippleTable[];
+
+#define FbStippleRRop(dst, b, fa, fx, ba, bx) \
+ (FbDoRRop(dst, fa, fx) & b) | (FbDoRRop(dst, ba, bx) & ~b)
+
+#define FbStippleRRopMask(dst, b, fa, fx, ba, bx, m) \
+ (FbDoMaskRRop(dst, fa, fx, m) & (b)) | (FbDoMaskRRop(dst, ba, bx, m) & ~(b))
+
+#define FbDoLeftMaskByteStippleRRop(dst, b, fa, fx, ba, bx, lb, l) { \
+ FbBits __xor = ((fx) & (b)) | ((bx) & ~(b)); \
+ FbDoLeftMaskByteRRop(dst, lb, l, ((fa) & (b)) | ((ba) & ~(b)), __xor); \
+}
+
+#define FbDoRightMaskByteStippleRRop(dst, b, fa, fx, ba, bx, rb, r) { \
+ FbBits __xor = ((fx) & (b)) | ((bx) & ~(b)); \
+ FbDoRightMaskByteRRop(dst, rb, r, ((fa) & (b)) | ((ba) & ~(b)), __xor); \
+}
+
+#define FbOpaqueStipple(b, fg, bg) (((fg) & (b)) | ((bg) & ~(b)))
+
+/*
+ * Compute rop for using tile code for 1-bit dest stipples; modifies
+ * existing rop to flip depending on pixel values
+ */
+#define FbStipple1RopPick(alu,b) (((alu) >> (2 - (((b) & 1) << 1))) & 3)
+
+#define FbOpaqueStipple1Rop(alu,fg,bg) (FbStipple1RopPick(alu,fg) | \
+ (FbStipple1RopPick(alu,bg) << 2))
+
+#define FbStipple1Rop(alu,fg) (FbStipple1RopPick(alu,fg) | 4)
+
+#endif
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/fi1236.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/fi1236.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/fi1236.h (working copy)
@@ -0,0 +1,113 @@
+#ifndef __FI1236_H__
+#define __FI1236_H__
+
+#include "xf86i2c.h"
+
+/* why someone has defined NUM someplace else is beyoung me.. */
+#undef NUM
+
+typedef struct {
+ CARD32 fcar; /* 16 * fcar_Mhz */
+ CARD32 min_freq; /* 16 * min_freq_Mhz */
+ CARD32 max_freq; /* 16 * max_freq_Mhz */
+
+ CARD32 threshold1; /* 16 * Value_Mhz */
+ CARD32 threshold2; /* 16 * Value_Mhz */
+
+ CARD8 band_low;
+ CARD8 band_mid;
+ CARD8 band_high;
+ CARD8 control;
+} FI1236_parameters;
+
+typedef struct {
+ /* what we want */
+ /* all frequencies are in Mhz */
+ double f_rf; /* frequency to tune to */
+ double f_if1; /* first intermediate frequency */
+ double f_if2; /* second intermediate frequency */
+ double f_ref; /* reference frequency */
+ double f_ifbw; /* bandwidth */
+ double f_step; /* step */
+
+ /* what we compute */
+ double f_lo1;
+ double f_lo2;
+ int LO1I;
+ int LO2I;
+ int SEL;
+ int STEP;
+ int NUM;
+} MT2032_parameters;
+
+typedef struct {
+ I2CDevRec d;
+ int type;
+
+ void *afc_source; /* The AFC source may be another chip like TDA988x */
+
+ int afc_delta;
+ CARD32 original_frequency;
+ Bool afc_timer_installed;
+ int afc_count;
+ int last_afc_hint;
+
+ double video_if;
+ FI1236_parameters parm;
+ int xogc; /* for MT2032 */
+
+ struct {
+ CARD8 div1;
+ CARD8 div2;
+ CARD8 control;
+ CARD8 band;
+ CARD8 aux; /* this is for MK3 tuners */
+ } tuner_data;
+} FI1236Rec, *FI1236Ptr;
+
+#define TUNER_TYPE_FI1236 0
+#define TUNER_TYPE_FI1216 1
+#define TUNER_TYPE_TEMIC_FN5AL 2
+#define TUNER_TYPE_MT2032 3
+#define TUNER_TYPE_FI1246 4
+#define TUNER_TYPE_FI1256 5
+#define TUNER_TYPE_FI1236W 6
+#define TUNER_TYPE_FM1216ME 7
+
+#define FI1236_ADDR(a) ((a)->d.SlaveAddr)
+
+#define FI1236_ADDR_1 0xC6
+#define FI1236_ADDR_2 0xC0
+
+#define TUNER_TUNED 0
+#define TUNER_JUST_BELOW 1
+#define TUNER_JUST_ABOVE -1
+#define TUNER_OFF 4
+#define TUNER_STILL_TUNING 5
+
+void FI1236_tune(FI1236Ptr f, CARD32 frequency);
+
+#define FI1236SymbolsList \
+ "Detect_FI1236", \
+ "FI1236_set_tuner_type", \
+ "TUNER_set_frequency"
+
+#define xf86_Detect_FI1236 Detect_FI1236
+extern _X_EXPORT FI1236Ptr Detect_FI1236(I2CBusPtr b, I2CSlaveAddr addr);
+
+#define xf86_FI1236_set_tuner_type FI1236_set_tuner_type
+extern _X_EXPORT void FI1236_set_tuner_type(FI1236Ptr f, int type);
+
+#define xf86_TUNER_set_frequency TUNER_set_frequency
+extern _X_EXPORT void TUNER_set_frequency(FI1236Ptr f, CARD32 frequency);
+
+#define xf86_FI1236_AFC FI1236_AFC
+extern _X_EXPORT int FI1236_AFC(FI1236Ptr f);
+
+#define xf86_TUNER_get_afc_hint TUNER_get_afc_hint
+extern _X_EXPORT int TUNER_get_afc_hint(FI1236Ptr f);
+
+#define xf86_fi1236_dump_status fi1236_dump_status
+extern _X_EXPORT void fi1236_dump_status(FI1236Ptr f);
+
+#endif
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/fourcc.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/fourcc.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/fourcc.h (working copy)
@@ -0,0 +1,159 @@
+
+/*
+ * Copyright (c) 2000-2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+/*
+ This header file contains listings of STANDARD guids for video formats.
+ Please do not place non-registered, or incomplete entries in this file.
+ A list of some popular fourcc's are at: http://www.webartz.com/fourcc/
+ For an explanation of fourcc <-> guid mappings see RFC2361.
+*/
+
+#ifndef _XF86_FOURCC_H_
+#define _XF86_FOURCC_H_ 1
+
+#define FOURCC_YUY2 0x32595559
+#define XVIMAGE_YUY2 \
+ { \
+ FOURCC_YUY2, \
+ XvYUV, \
+ LSBFirst, \
+ {'Y','U','Y','2', \
+ 0x00,0x00,0x00,0x10,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71}, \
+ 16, \
+ XvPacked, \
+ 1, \
+ 0, 0, 0, 0, \
+ 8, 8, 8, \
+ 1, 2, 2, \
+ 1, 1, 1, \
+ {'Y','U','Y','V', \
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, \
+ XvTopToBottom \
+ }
+
+#define FOURCC_YV12 0x32315659
+#define XVIMAGE_YV12 \
+ { \
+ FOURCC_YV12, \
+ XvYUV, \
+ LSBFirst, \
+ {'Y','V','1','2', \
+ 0x00,0x00,0x00,0x10,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71}, \
+ 12, \
+ XvPlanar, \
+ 3, \
+ 0, 0, 0, 0, \
+ 8, 8, 8, \
+ 1, 2, 2, \
+ 1, 2, 2, \
+ {'Y','V','U', \
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, \
+ XvTopToBottom \
+ }
+
+#define FOURCC_I420 0x30323449
+#define XVIMAGE_I420 \
+ { \
+ FOURCC_I420, \
+ XvYUV, \
+ LSBFirst, \
+ {'I','4','2','0', \
+ 0x00,0x00,0x00,0x10,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71}, \
+ 12, \
+ XvPlanar, \
+ 3, \
+ 0, 0, 0, 0, \
+ 8, 8, 8, \
+ 1, 2, 2, \
+ 1, 2, 2, \
+ {'Y','U','V', \
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, \
+ XvTopToBottom \
+ }
+
+#define FOURCC_UYVY 0x59565955
+#define XVIMAGE_UYVY \
+ { \
+ FOURCC_UYVY, \
+ XvYUV, \
+ LSBFirst, \
+ {'U','Y','V','Y', \
+ 0x00,0x00,0x00,0x10,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71}, \
+ 16, \
+ XvPacked, \
+ 1, \
+ 0, 0, 0, 0, \
+ 8, 8, 8, \
+ 1, 2, 2, \
+ 1, 1, 1, \
+ {'U','Y','V','Y', \
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, \
+ XvTopToBottom \
+ }
+
+#define FOURCC_IA44 0x34344149
+#define XVIMAGE_IA44 \
+ { \
+ FOURCC_IA44, \
+ XvYUV, \
+ LSBFirst, \
+ {'I','A','4','4', \
+ 0x00,0x00,0x00,0x10,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71}, \
+ 8, \
+ XvPacked, \
+ 1, \
+ 0, 0, 0, 0, \
+ 8, 8, 8, \
+ 1, 1, 1, \
+ 1, 1, 1, \
+ {'A','I', \
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, \
+ XvTopToBottom \
+ }
+
+#define FOURCC_AI44 0x34344941
+#define XVIMAGE_AI44 \
+ { \
+ FOURCC_AI44, \
+ XvYUV, \
+ LSBFirst, \
+ {'A','I','4','4', \
+ 0x00,0x00,0x00,0x10,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71}, \
+ 8, \
+ XvPacked, \
+ 1, \
+ 0, 0, 0, 0, \
+ 8, 8, 8, \
+ 1, 1, 1, \
+ 1, 1, 1, \
+ {'I','A', \
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, \
+ XvTopToBottom \
+ }
+
+#endif /* _XF86_FOURCC_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/gc.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/gc.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/gc.h (working copy)
@@ -0,0 +1,147 @@
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef GC_H
+#define GC_H
+
+#include <X11/X.h> /* for GContext, Mask */
+#include <X11/Xdefs.h> /* for Bool */
+#include <X11/Xproto.h>
+#include "screenint.h" /* for ScreenPtr */
+#include "pixmap.h" /* for DrawablePtr */
+
+/* clientClipType field in GC */
+#define CT_NONE 0
+#define CT_PIXMAP 1
+#define CT_REGION 2
+#define CT_UNSORTED 6
+#define CT_YSORTED 10
+#define CT_YXSORTED 14
+#define CT_YXBANDED 18
+
+#define GCQREASON_VALIDATE 1
+#define GCQREASON_CHANGE 2
+#define GCQREASON_COPY_SRC 3
+#define GCQREASON_COPY_DST 4
+#define GCQREASON_DESTROY 5
+
+#define GC_CHANGE_SERIAL_BIT (((unsigned long)1)<<31)
+#define GC_CALL_VALIDATE_BIT (1L<<30)
+#define GCExtensionInterest (1L<<29)
+
+#define DRAWABLE_SERIAL_BITS (~(GC_CHANGE_SERIAL_BIT))
+
+#define MAX_SERIAL_NUM (1L<<28)
+
+#define NEXT_SERIAL_NUMBER ((++globalSerialNumber) > MAX_SERIAL_NUM ? \
+ (globalSerialNumber = 1): globalSerialNumber)
+
+typedef struct _GCInterest *GCInterestPtr;
+typedef struct _GC *GCPtr;
+typedef struct _GCOps *GCOpsPtr;
+
+extern _X_EXPORT void ValidateGC(DrawablePtr /*pDraw */ ,
+ GCPtr /*pGC */ );
+
+typedef union {
+ CARD32 val;
+ void *ptr;
+} ChangeGCVal, *ChangeGCValPtr;
+
+extern int ChangeGCXIDs(ClientPtr /*client */ ,
+ GCPtr /*pGC */ ,
+ BITS32 /*mask */ ,
+ CARD32 * /*pval */ );
+
+extern _X_EXPORT int ChangeGC(ClientPtr /*client */ ,
+ GCPtr /*pGC */ ,
+ BITS32 /*mask */ ,
+ ChangeGCValPtr /*pCGCV */ );
+
+extern _X_EXPORT GCPtr CreateGC(DrawablePtr /*pDrawable */ ,
+ BITS32 /*mask */ ,
+ XID * /*pval */ ,
+ int * /*pStatus */ ,
+ XID /*gcid */ ,
+ ClientPtr /*client */ );
+
+extern _X_EXPORT int CopyGC(GCPtr /*pgcSrc */ ,
+ GCPtr /*pgcDst */ ,
+ BITS32 /*mask */ );
+
+extern _X_EXPORT int FreeGC(void */*pGC */ ,
+ XID /*gid */ );
+
+extern _X_EXPORT void FreeGCperDepth(int /*screenNum */ );
+
+extern _X_EXPORT Bool CreateGCperDepth(int /*screenNum */ );
+
+extern _X_EXPORT Bool CreateDefaultStipple(int /*screenNum */ );
+
+extern _X_EXPORT void FreeDefaultStipple(int /*screenNum */ );
+
+extern _X_EXPORT int SetDashes(GCPtr /*pGC */ ,
+ unsigned /*offset */ ,
+ unsigned /*ndash */ ,
+ unsigned char * /*pdash */ );
+
+extern _X_EXPORT int VerifyRectOrder(int /*nrects */ ,
+ xRectangle * /*prects */ ,
+ int /*ordering */ );
+
+extern _X_EXPORT int SetClipRects(GCPtr /*pGC */ ,
+ int /*xOrigin */ ,
+ int /*yOrigin */ ,
+ int /*nrects */ ,
+ xRectangle * /*prects */ ,
+ int /*ordering */ );
+
+extern _X_EXPORT GCPtr GetScratchGC(unsigned /*depth */ ,
+ ScreenPtr /*pScreen */ );
+
+extern _X_EXPORT void FreeScratchGC(GCPtr /*pGC */ );
+
+#endif /* GC_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/gcstruct.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/gcstruct.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/gcstruct.h (working copy)
@@ -0,0 +1,292 @@
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef GCSTRUCT_H
+#define GCSTRUCT_H
+
+#include "gc.h"
+
+#include "regionstr.h"
+#include "region.h"
+#include "pixmap.h"
+#include "screenint.h"
+#include "privates.h"
+#include <X11/Xprotostr.h>
+
+#define GCAllBits ((1 << (GCLastBit + 1)) - 1)
+
+/*
+ * functions which modify the state of the GC
+ */
+
+typedef struct _GCFuncs {
+ void (*ValidateGC) (GCPtr /*pGC */ ,
+ unsigned long /*stateChanges */ ,
+ DrawablePtr /*pDrawable */ );
+
+ void (*ChangeGC) (GCPtr /*pGC */ ,
+ unsigned long /*mask */ );
+
+ void (*CopyGC) (GCPtr /*pGCSrc */ ,
+ unsigned long /*mask */ ,
+ GCPtr /*pGCDst */ );
+
+ void (*DestroyGC) (GCPtr /*pGC */ );
+
+ void (*ChangeClip) (GCPtr /*pGC */ ,
+ int /*type */ ,
+ void */*pvalue */ ,
+ int /*nrects */ );
+
+ void (*DestroyClip) (GCPtr /*pGC */ );
+
+ void (*CopyClip) (GCPtr /*pgcDst */ ,
+ GCPtr /*pgcSrc */ );
+} GCFuncs;
+
+/*
+ * graphics operations invoked through a GC
+ */
+
+typedef struct _GCOps {
+ void (*FillSpans) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*nInit */ ,
+ DDXPointPtr /*pptInit */ ,
+ int * /*pwidthInit */ ,
+ int /*fSorted */ );
+
+ void (*SetSpans) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ char * /*psrc */ ,
+ DDXPointPtr /*ppt */ ,
+ int * /*pwidth */ ,
+ int /*nspans */ ,
+ int /*fSorted */ );
+
+ void (*PutImage) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*depth */ ,
+ int /*x */ ,
+ int /*y */ ,
+ int /*w */ ,
+ int /*h */ ,
+ int /*leftPad */ ,
+ int /*format */ ,
+ char * /*pBits */ );
+
+ RegionPtr (*CopyArea) (DrawablePtr /*pSrc */ ,
+ DrawablePtr /*pDst */ ,
+ GCPtr /*pGC */ ,
+ int /*srcx */ ,
+ int /*srcy */ ,
+ int /*w */ ,
+ int /*h */ ,
+ int /*dstx */ ,
+ int /*dsty */ );
+
+ RegionPtr (*CopyPlane) (DrawablePtr /*pSrcDrawable */ ,
+ DrawablePtr /*pDstDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*srcx */ ,
+ int /*srcy */ ,
+ int /*width */ ,
+ int /*height */ ,
+ int /*dstx */ ,
+ int /*dsty */ ,
+ unsigned long /*bitPlane */ );
+ void (*PolyPoint) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*mode */ ,
+ int /*npt */ ,
+ DDXPointPtr /*pptInit */ );
+
+ void (*Polylines) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*mode */ ,
+ int /*npt */ ,
+ DDXPointPtr /*pptInit */ );
+
+ void (*PolySegment) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*nseg */ ,
+ xSegment * /*pSegs */ );
+
+ void (*PolyRectangle) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*nrects */ ,
+ xRectangle * /*pRects */ );
+
+ void (*PolyArc) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*narcs */ ,
+ xArc * /*parcs */ );
+
+ void (*FillPolygon) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*shape */ ,
+ int /*mode */ ,
+ int /*count */ ,
+ DDXPointPtr /*pPts */ );
+
+ void (*PolyFillRect) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*nrectFill */ ,
+ xRectangle * /*prectInit */ );
+
+ void (*PolyFillArc) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*narcs */ ,
+ xArc * /*parcs */ );
+
+ int (*PolyText8) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*x */ ,
+ int /*y */ ,
+ int /*count */ ,
+ char * /*chars */ );
+
+ int (*PolyText16) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*x */ ,
+ int /*y */ ,
+ int /*count */ ,
+ unsigned short * /*chars */ );
+
+ void (*ImageText8) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*x */ ,
+ int /*y */ ,
+ int /*count */ ,
+ char * /*chars */ );
+
+ void (*ImageText16) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*x */ ,
+ int /*y */ ,
+ int /*count */ ,
+ unsigned short * /*chars */ );
+
+ void (*ImageGlyphBlt) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*x */ ,
+ int /*y */ ,
+ unsigned int /*nglyph */ ,
+ CharInfoPtr * /*ppci */ ,
+ void */*pglyphBase */ );
+
+ void (*PolyGlyphBlt) (DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*x */ ,
+ int /*y */ ,
+ unsigned int /*nglyph */ ,
+ CharInfoPtr * /*ppci */ ,
+ void */*pglyphBase */ );
+
+ void (*PushPixels) (GCPtr /*pGC */ ,
+ PixmapPtr /*pBitMap */ ,
+ DrawablePtr /*pDst */ ,
+ int /*w */ ,
+ int /*h */ ,
+ int /*x */ ,
+ int /*y */ );
+} GCOps;
+
+/* there is padding in the bit fields because the Sun compiler doesn't
+ * force alignment to 32-bit boundaries. losers.
+ */
+typedef struct _GC {
+ ScreenPtr pScreen;
+ unsigned char depth;
+ unsigned char alu;
+ unsigned short lineWidth;
+ unsigned short dashOffset;
+ unsigned short numInDashList;
+ unsigned char *dash;
+ unsigned int lineStyle:2;
+ unsigned int capStyle:2;
+ unsigned int joinStyle:2;
+ unsigned int fillStyle:2;
+ unsigned int fillRule:1;
+ unsigned int arcMode:1;
+ unsigned int subWindowMode:1;
+ unsigned int graphicsExposures:1;
+ unsigned int clientClipType:2; /* CT_<kind> */
+ unsigned int miTranslate:1; /* should mi things translate? */
+ unsigned int tileIsPixel:1; /* tile is solid pixel */
+ unsigned int fExpose:1; /* Call exposure handling */
+ unsigned int freeCompClip:1; /* Free composite clip */
+ unsigned int scratch_inuse:1; /* is this GC in a pool for reuse? */
+ unsigned int unused:13; /* see comment above */
+ unsigned long planemask;
+ unsigned long fgPixel;
+ unsigned long bgPixel;
+ /*
+ * alas -- both tile and stipple must be here as they
+ * are independently specifiable
+ */
+ PixUnion tile;
+ PixmapPtr stipple;
+ DDXPointRec patOrg; /* origin for (tile, stipple) */
+ struct _Font *font;
+ DDXPointRec clipOrg;
+ void *clientClip;
+ unsigned long stateChanges; /* masked with GC_<kind> */
+ unsigned long serialNumber;
+ const GCFuncs *funcs;
+ const GCOps *ops;
+ PrivateRec *devPrivates;
+ /*
+ * The following were moved here from private storage to allow device-
+ * independent access to them from screen wrappers.
+ * --- 1997.11.03 Marc Aurele La France (tsi@xfree86.org)
+ */
+ PixmapPtr pRotatedPixmap; /* tile/stipple rotated for alignment */
+ RegionPtr pCompositeClip;
+ /* fExpose & freeCompClip defined above */
+} GC;
+
+#endif /* GCSTRUCT_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/geext.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/geext.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/geext.h (working copy)
@@ -0,0 +1,81 @@
+/*
+
+Copyright 2007 Peter Hutterer <peter@cs.unisa.edu.au>
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the author shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from the author.
+
+*/
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifndef _GEEXT_H_
+#define _GEEXT_H_
+#include <X11/extensions/geproto.h>
+
+/** Struct to keep information about registered extensions */
+typedef struct _GEExtension {
+ /** Event swapping routine */
+ void (*evswap) (xGenericEvent *from, xGenericEvent *to);
+} GEExtension, *GEExtensionPtr;
+
+/* All registered extensions and their handling functions. */
+extern _X_EXPORT GEExtension GEExtensions[MAXEXTENSIONS];
+
+/* Typecast to generic event */
+#define GEV(ev) ((xGenericEvent*)(ev))
+/* Returns the extension offset from the event */
+#define GEEXT(ev) (GEV(ev)->extension)
+
+/* Return zero-based extension offset (offset - 128). Only for use in arrays */
+#define GEEXTIDX(ev) (GEEXT(ev) & 0x7F)
+/* True if mask is set for extension on window */
+#define GEMaskIsSet(pWin, extension, mask) \
+ ((pWin)->optional && \
+ (pWin)->optional->geMasks && \
+ ((pWin)->optional->geMasks->eventMasks[(extension) & 0x7F] & (mask)))
+
+/* Returns first client */
+#define GECLIENT(pWin) \
+ (((pWin)->optional) ? (pWin)->optional->geMasks->geClients : NULL)
+
+/* Returns the event_fill for the given event */
+#define GEEventFill(ev) \
+ GEExtensions[GEEXTIDX(ev)].evfill
+
+#define GEIsType(ev, ext, ev_type) \
+ ((GEV(ev)->type == GenericEvent) && \
+ GEEXT(ev) == (ext) && \
+ GEV(ev)->evtype == (ev_type))
+
+/* Interface for other extensions */
+extern _X_EXPORT void GERegisterExtension(int extension,
+ void (*ev_dispatch) (xGenericEvent
+ *from,
+ xGenericEvent
+ *to));
+
+extern _X_EXPORT void GEInitEvent(xGenericEvent *ev, int extension);
+
+#endif /* _GEEXT_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/geint.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/geint.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/geint.h (working copy)
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2007-2008 Peter Hutterer
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Author: Peter Hutterer, University of South Australia, NICTA
+ */
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifndef _GEINT_H_
+#define _GEINT_H_
+
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#include "misc.h"
+#include "os.h"
+#include "dixstruct.h"
+#include "extnsionst.h"
+#include <X11/extensions/geproto.h>
+
+extern _X_EXPORT DevPrivateKeyRec GEClientPrivateKeyRec;
+
+#define GEClientPrivateKey (&GEClientPrivateKeyRec)
+
+typedef struct _GEClientInfo {
+ CARD32 major_version;
+ CARD32 minor_version;
+} GEClientInfoRec, *GEClientInfoPtr;
+
+#define GEGetClient(pClient) ((GEClientInfoPtr)(dixLookupPrivate(&((pClient)->devPrivates), GEClientPrivateKey)))
+
+extern _X_EXPORT int (*ProcGEVector[ /*GENumRequests */ ]) (ClientPtr);
+extern _X_EXPORT int (*SProcGEVector[ /*GENumRequests */ ]) (ClientPtr);
+
+#endif /* _GEINT_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/globals.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/globals.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/globals.h (working copy)
@@ -0,0 +1,53 @@
+
+#ifndef _XSERV_GLOBAL_H_
+#define _XSERV_GLOBAL_H_
+
+#include <signal.h>
+
+#include "window.h" /* for WindowPtr */
+#include "extinit.h"
+
+/* Global X server variables that are visible to mi, dix, os, and ddx */
+
+extern _X_EXPORT CARD32 defaultScreenSaverTime;
+extern _X_EXPORT CARD32 defaultScreenSaverInterval;
+extern _X_EXPORT CARD32 ScreenSaverTime;
+extern _X_EXPORT CARD32 ScreenSaverInterval;
+
+#ifdef SCREENSAVER
+extern _X_EXPORT Bool screenSaverSuspended;
+#endif
+
+extern _X_EXPORT const char *defaultFontPath;
+extern _X_EXPORT int monitorResolution;
+extern _X_EXPORT int defaultColorVisualClass;
+
+extern _X_EXPORT int GrabInProgress;
+extern _X_EXPORT Bool noTestExtensions;
+extern _X_EXPORT char *SeatId;
+extern _X_EXPORT char *ConnectionInfo;
+extern _X_EXPORT sig_atomic_t inSignalContext;
+
+#ifdef DPMSExtension
+extern _X_EXPORT CARD32 DPMSStandbyTime;
+extern _X_EXPORT CARD32 DPMSSuspendTime;
+extern _X_EXPORT CARD32 DPMSOffTime;
+extern _X_EXPORT CARD16 DPMSPowerLevel;
+extern _X_EXPORT Bool DPMSEnabled;
+extern _X_EXPORT Bool DPMSDisabledSwitch;
+extern _X_EXPORT Bool DPMSCapableFlag;
+#endif
+
+#ifdef PANORAMIX
+extern _X_EXPORT Bool PanoramiXExtensionDisabledHack;
+#endif
+
+#ifdef XSELINUX
+#define SELINUX_MODE_DEFAULT 0
+#define SELINUX_MODE_DISABLED 1
+#define SELINUX_MODE_PERMISSIVE 2
+#define SELINUX_MODE_ENFORCING 3
+extern _X_EXPORT int selinuxEnforcingState;
+#endif
+
+#endif /* !_XSERV_GLOBAL_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/glx_extinit.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/glx_extinit.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/glx_extinit.h (working copy)
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 1994-2003 The XFree86 Project, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is furnished to do
+ * so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
+ * NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the XFree86 Project shall not
+ * be used in advertising or otherwise to promote the sale, use or other dealings
+ * in this Software without prior written authorization from the XFree86 Project.
+ */
+
+#ifndef GLX_EXT_INIT_H
+#define GLX_EXT_INIT_H
+
+/* this is separate due to sdksyms pulling in extinit.h */
+#ifdef GLXEXT
+extern void GlxExtensionInit(void);
+#endif
+
+#endif
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/glyphstr.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/glyphstr.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/glyphstr.h (working copy)
@@ -0,0 +1,142 @@
+/*
+ *
+ * Copyright © 2000 SuSE, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of SuSE not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. SuSE makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
+ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Author: Keith Packard, SuSE, Inc.
+ */
+
+#ifndef _GLYPHSTR_H_
+#define _GLYPHSTR_H_
+
+#include <X11/extensions/renderproto.h>
+#include "picture.h"
+#include "screenint.h"
+#include "regionstr.h"
+#include "miscstruct.h"
+#include "privates.h"
+
+#define GlyphFormat1 0
+#define GlyphFormat4 1
+#define GlyphFormat8 2
+#define GlyphFormat16 3
+#define GlyphFormat32 4
+#define GlyphFormatNum 5
+
+typedef struct _Glyph {
+ CARD32 refcnt;
+ PrivateRec *devPrivates;
+ unsigned char sha1[20];
+ CARD32 size; /* info + bitmap */
+ xGlyphInfo info;
+ /* per-screen pixmaps follow */
+} GlyphRec, *GlyphPtr;
+
+#define GlyphPicture(glyph) ((PicturePtr *) ((glyph) + 1))
+
+typedef struct _GlyphRef {
+ CARD32 signature;
+ GlyphPtr glyph;
+} GlyphRefRec, *GlyphRefPtr;
+
+#define DeletedGlyph ((GlyphPtr) 1)
+
+typedef struct _GlyphHashSet {
+ CARD32 entries;
+ CARD32 size;
+ CARD32 rehash;
+} GlyphHashSetRec, *GlyphHashSetPtr;
+
+typedef struct _GlyphHash {
+ GlyphRefPtr table;
+ GlyphHashSetPtr hashSet;
+ CARD32 tableEntries;
+} GlyphHashRec, *GlyphHashPtr;
+
+typedef struct _GlyphSet {
+ CARD32 refcnt;
+ int fdepth;
+ PictFormatPtr format;
+ GlyphHashRec hash;
+ PrivateRec *devPrivates;
+} GlyphSetRec, *GlyphSetPtr;
+
+#define GlyphSetGetPrivate(pGlyphSet,k) \
+ dixLookupPrivate(&(pGlyphSet)->devPrivates, k)
+
+#define GlyphSetSetPrivate(pGlyphSet,k,ptr) \
+ dixSetPrivate(&(pGlyphSet)->devPrivates, k, ptr)
+
+typedef struct _GlyphList {
+ INT16 xOff;
+ INT16 yOff;
+ CARD8 len;
+ PictFormatPtr format;
+} GlyphListRec, *GlyphListPtr;
+
+extern _X_EXPORT void
+ GlyphUninit(ScreenPtr pScreen);
+
+extern _X_EXPORT GlyphHashSetPtr FindGlyphHashSet(CARD32 filled);
+
+extern _X_EXPORT GlyphRefPtr
+FindGlyphRef(GlyphHashPtr hash,
+ CARD32 signature, Bool match, unsigned char sha1[20]);
+
+extern _X_EXPORT GlyphPtr FindGlyphByHash(unsigned char sha1[20], int format);
+
+extern _X_EXPORT int
+
+HashGlyph(xGlyphInfo * gi,
+ CARD8 *bits, unsigned long size, unsigned char sha1[20]);
+
+extern _X_EXPORT void
+ FreeGlyph(GlyphPtr glyph, int format);
+
+extern _X_EXPORT void
+ AddGlyph(GlyphSetPtr glyphSet, GlyphPtr glyph, Glyph id);
+
+extern _X_EXPORT Bool
+ DeleteGlyph(GlyphSetPtr glyphSet, Glyph id);
+
+extern _X_EXPORT GlyphPtr FindGlyph(GlyphSetPtr glyphSet, Glyph id);
+
+extern _X_EXPORT GlyphPtr AllocateGlyph(xGlyphInfo * gi, int format);
+
+extern _X_EXPORT Bool
+ AllocateGlyphHash(GlyphHashPtr hash, GlyphHashSetPtr hashSet);
+
+extern _X_EXPORT Bool
+ ResizeGlyphHash(GlyphHashPtr hash, CARD32 change, Bool global);
+
+extern _X_EXPORT Bool
+ ResizeGlyphSet(GlyphSetPtr glyphSet, CARD32 change);
+
+extern _X_EXPORT GlyphSetPtr AllocateGlyphSet(int fdepth, PictFormatPtr format);
+
+extern _X_EXPORT int
+ FreeGlyphSet(void *value, XID gid);
+
+#define GLYPH_HAS_GLYPH_PICTURE_ACCESSOR 1 /* used for api compat */
+extern _X_EXPORT PicturePtr
+ GetGlyphPicture(GlyphPtr glyph, ScreenPtr pScreen);
+extern _X_EXPORT void
+ SetGlyphPicture(GlyphPtr glyph, ScreenPtr pScreen, PicturePtr picture);
+
+#endif /* _GLYPHSTR_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/hotplug.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/hotplug.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/hotplug.h (working copy)
@@ -0,0 +1,75 @@
+/*
+ * Copyright © 2006-2007 Daniel Stone
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Author: Daniel Stone <daniel@fooishbar.org>
+ */
+
+#ifndef HOTPLUG_H
+#define HOTPLUG_H
+
+#include "list.h"
+
+extern _X_EXPORT void config_pre_init(void);
+extern _X_EXPORT void config_init(void);
+extern _X_EXPORT void config_fini(void);
+
+struct OdevAttribute {
+ struct xorg_list member;
+ int attrib_id;
+ char *attrib_name;
+};
+
+struct OdevAttributes {
+ struct xorg_list list;
+ Bool unowned;
+};
+
+struct OdevAttributes *
+config_odev_allocate_attribute_list(void);
+
+void
+config_odev_free_attribute_list(struct OdevAttributes *attribs);
+
+Bool
+config_odev_add_attribute(struct OdevAttributes *attribs, int attrib,
+ const char *attrib_name);
+
+void
+config_odev_free_attributes(struct OdevAttributes *attribs);
+
+/* path to kernel device node - Linux e.g. /dev/dri/card0 */
+#define ODEV_ATTRIB_PATH 1
+/* system device path - Linux e.g. /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1 */
+#define ODEV_ATTRIB_SYSPATH 2
+/* DRI-style bus id */
+#define ODEV_ATTRIB_BUSID 3
+
+typedef void (*config_odev_probe_proc_ptr)(struct OdevAttributes *attribs);
+void config_odev_probe(config_odev_probe_proc_ptr probe_callback);
+
+#ifdef CONFIG_UDEV_KMS
+void NewGPUDeviceRequest(struct OdevAttributes *attribs);
+void DeleteGPUDeviceRequest(struct OdevAttributes *attribs);
+#endif
+
+#define ServerIsNotSeat0() (SeatId && strcmp(SeatId, "seat0"))
+#endif /* HOTPLUG_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/i2c_def.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/i2c_def.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/i2c_def.h (working copy)
@@ -0,0 +1,6 @@
+#ifndef __I2C_DEF_H__
+#define __I2C_DEF_H__
+
+#include "xf86i2c.h"
+
+#endif
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/input.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/input.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/input.h (working copy)
@@ -0,0 +1,697 @@
+/************************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+********************************************************/
+
+#ifndef INPUT_H
+#define INPUT_H
+
+#include "misc.h"
+#include "screenint.h"
+#include <X11/Xmd.h>
+#include <X11/Xproto.h>
+#include <stdint.h>
+#include "window.h" /* for WindowPtr */
+#include "xkbrules.h"
+#include "events.h"
+#include "list.h"
+#include <X11/extensions/XI2.h>
+
+#define DEVICE_INIT 0
+#define DEVICE_ON 1
+#define DEVICE_OFF 2
+#define DEVICE_CLOSE 3
+#define DEVICE_ABORT 4
+
+#define POINTER_RELATIVE (1 << 1)
+#define POINTER_ABSOLUTE (1 << 2)
+#define POINTER_ACCELERATE (1 << 3)
+#define POINTER_SCREEN (1 << 4) /* Data in screen coordinates */
+#define POINTER_NORAW (1 << 5) /* Don't generate RawEvents */
+#define POINTER_EMULATED (1 << 6) /* Event was emulated from another event */
+#define POINTER_DESKTOP (1 << 7) /* Data in desktop coordinates */
+
+/* GetTouchEvent flags */
+#define TOUCH_ACCEPT (1 << 0)
+#define TOUCH_REJECT (1 << 1)
+#define TOUCH_PENDING_END (1 << 2)
+#define TOUCH_CLIENT_ID (1 << 3) /* touch ID is the client-visible id */
+#define TOUCH_REPLAYING (1 << 4) /* event is being replayed */
+#define TOUCH_POINTER_EMULATED (1 << 5) /* touch event may be pointer emulated */
+#define TOUCH_END (1 << 6) /* really end this touch now */
+
+/*int constants for pointer acceleration schemes*/
+#define PtrAccelNoOp 0
+#define PtrAccelPredictable 1
+#define PtrAccelLightweight 2
+#define PtrAccelDefault PtrAccelPredictable
+
+#define MAX_VALUATORS 36
+/* Maximum number of valuators, divided by six, rounded up, to get number
+ * of events. */
+#define MAX_VALUATOR_EVENTS 6
+#define MAX_BUTTONS 256 /* completely arbitrarily chosen */
+
+#define NO_AXIS_LIMITS -1
+
+#define MAP_LENGTH MAX_BUTTONS
+#define DOWN_LENGTH (MAX_BUTTONS/8) /* 256/8 => number of bytes to hold 256 bits */
+#define NullGrab ((GrabPtr)NULL)
+#define PointerRootWin ((WindowPtr)PointerRoot)
+#define NoneWin ((WindowPtr)None)
+#define NullDevice ((DevicePtr)NULL)
+
+#ifndef FollowKeyboard
+#define FollowKeyboard 3
+#endif
+#ifndef FollowKeyboardWin
+#define FollowKeyboardWin ((WindowPtr) FollowKeyboard)
+#endif
+#ifndef RevertToFollowKeyboard
+#define RevertToFollowKeyboard 3
+#endif
+
+enum InputLevel {
+ CORE = 1,
+ XI = 2,
+ XI2 = 3,
+};
+
+typedef unsigned long Leds;
+typedef struct _OtherClients *OtherClientsPtr;
+typedef struct _InputClients *InputClientsPtr;
+typedef struct _DeviceIntRec *DeviceIntPtr;
+typedef struct _ValuatorClassRec *ValuatorClassPtr;
+typedef struct _ClassesRec *ClassesPtr;
+typedef struct _SpriteRec *SpritePtr;
+typedef struct _TouchClassRec *TouchClassPtr;
+typedef struct _TouchPointInfo *TouchPointInfoPtr;
+typedef struct _DDXTouchPointInfo *DDXTouchPointInfoPtr;
+typedef union _GrabMask GrabMask;
+
+typedef struct _ValuatorMask ValuatorMask;
+
+/* The DIX stores incoming input events in this list */
+extern InternalEvent *InputEventList;
+
+typedef int (*DeviceProc) (DeviceIntPtr /*device */ ,
+ int /*what */ );
+
+typedef void (*ProcessInputProc) (InternalEvent * /*event */ ,
+ DeviceIntPtr /*device */ );
+
+typedef Bool (*DeviceHandleProc) (DeviceIntPtr /*device */ ,
+ void * /*data */
+ );
+
+typedef void (*DeviceUnwrapProc) (DeviceIntPtr /*device */ ,
+ DeviceHandleProc /*proc */ ,
+ void * /*data */
+ );
+
+/* pointer acceleration handling */
+typedef void (*PointerAccelSchemeProc) (DeviceIntPtr /*device */ ,
+ ValuatorMask * /*valuators */ ,
+ CARD32 /*evtime */ );
+
+typedef void (*DeviceCallbackProc) (DeviceIntPtr /*pDev */ );
+
+struct _ValuatorAccelerationRec;
+typedef Bool (*PointerAccelSchemeInitProc) (DeviceIntPtr /*dev */ ,
+ struct _ValuatorAccelerationRec *
+ /*protoScheme */ );
+
+typedef struct _DeviceRec {
+ void *devicePrivate;
+ ProcessInputProc processInputProc; /* current */
+ ProcessInputProc realInputProc; /* deliver */
+ ProcessInputProc enqueueInputProc; /* enqueue */
+ Bool on; /* used by DDX to keep state */
+} DeviceRec, *DevicePtr;
+
+typedef struct {
+ int click, bell, bell_pitch, bell_duration;
+ Bool autoRepeat;
+ unsigned char autoRepeats[32];
+ Leds leds;
+ unsigned char id;
+} KeybdCtrl;
+
+typedef struct {
+ KeySym *map;
+ KeyCode minKeyCode, maxKeyCode;
+ int mapWidth;
+} KeySymsRec, *KeySymsPtr;
+
+typedef struct {
+ int num, den, threshold;
+ unsigned char id;
+} PtrCtrl;
+
+typedef struct {
+ int resolution, min_value, max_value;
+ int integer_displayed;
+ unsigned char id;
+} IntegerCtrl;
+
+typedef struct {
+ int max_symbols, num_symbols_supported;
+ int num_symbols_displayed;
+ KeySym *symbols_supported;
+ KeySym *symbols_displayed;
+ unsigned char id;
+} StringCtrl;
+
+typedef struct {
+ int percent, pitch, duration;
+ unsigned char id;
+} BellCtrl;
+
+typedef struct {
+ Leds led_values;
+ Mask led_mask;
+ unsigned char id;
+} LedCtrl;
+
+extern _X_EXPORT KeybdCtrl defaultKeyboardControl;
+extern _X_EXPORT PtrCtrl defaultPointerControl;
+
+typedef struct _InputOption InputOption;
+typedef struct _XI2Mask XI2Mask;
+
+typedef struct _InputAttributes {
+ char *product;
+ char *vendor;
+ char *device;
+ char *pnp_id;
+ char *usb_id;
+ char **tags; /* null-terminated */
+ uint32_t flags;
+} InputAttributes;
+
+#define ATTR_KEYBOARD (1<<0)
+#define ATTR_POINTER (1<<1)
+#define ATTR_JOYSTICK (1<<2)
+#define ATTR_TABLET (1<<3)
+#define ATTR_TOUCHPAD (1<<4)
+#define ATTR_TOUCHSCREEN (1<<5)
+
+/* Key/Button has been run through all input processing and events sent to clients. */
+#define KEY_PROCESSED 1
+#define BUTTON_PROCESSED 1
+/* Key/Button has not been fully processed, no events have been sent. */
+#define KEY_POSTED 2
+#define BUTTON_POSTED 2
+
+extern _X_EXPORT void set_key_down(DeviceIntPtr pDev, int key_code, int type);
+extern _X_EXPORT void set_key_up(DeviceIntPtr pDev, int key_code, int type);
+extern _X_EXPORT int key_is_down(DeviceIntPtr pDev, int key_code, int type);
+extern _X_EXPORT void set_button_down(DeviceIntPtr pDev, int button, int type);
+extern _X_EXPORT void set_button_up(DeviceIntPtr pDev, int button, int type);
+extern _X_EXPORT int button_is_down(DeviceIntPtr pDev, int button, int type);
+
+extern void InitCoreDevices(void);
+extern void InitXTestDevices(void);
+
+extern _X_EXPORT DeviceIntPtr AddInputDevice(ClientPtr /*client */ ,
+ DeviceProc /*deviceProc */ ,
+ Bool /*autoStart */ );
+
+extern _X_EXPORT Bool EnableDevice(DeviceIntPtr /*device */ ,
+ BOOL /* sendevent */ );
+
+extern _X_EXPORT Bool ActivateDevice(DeviceIntPtr /*device */ ,
+ BOOL /* sendevent */ );
+
+extern _X_EXPORT Bool DisableDevice(DeviceIntPtr /*device */ ,
+ BOOL /* sendevent */ );
+extern void DisableAllDevices(void);
+extern int InitAndStartDevices(void);
+
+extern void CloseDownDevices(void);
+extern void AbortDevices(void);
+
+extern void UndisplayDevices(void);
+
+extern _X_EXPORT int RemoveDevice(DeviceIntPtr /*dev */ ,
+ BOOL /* sendevent */ );
+
+extern _X_EXPORT int NumMotionEvents(void);
+
+extern _X_EXPORT int dixLookupDevice(DeviceIntPtr * /* dev */ ,
+ int /* id */ ,
+ ClientPtr /* client */ ,
+ Mask /* access_mode */ );
+
+extern _X_EXPORT void QueryMinMaxKeyCodes(KeyCode * /*minCode */ ,
+ KeyCode * /*maxCode */ );
+
+extern _X_EXPORT Bool SetKeySymsMap(KeySymsPtr /*dst */ ,
+ KeySymsPtr /*src */ );
+
+extern _X_EXPORT Bool InitButtonClassDeviceStruct(DeviceIntPtr /*device */ ,
+ int /*numButtons */ ,
+ Atom * /* labels */ ,
+ CARD8 * /*map */ );
+
+extern _X_INTERNAL ValuatorClassPtr AllocValuatorClass(ValuatorClassPtr src,
+ int numAxes);
+
+extern _X_EXPORT Bool InitValuatorClassDeviceStruct(DeviceIntPtr /*device */ ,
+ int /*numAxes */ ,
+ Atom * /* labels */ ,
+ int /*numMotionEvents */ ,
+ int /*mode */ );
+
+extern _X_EXPORT Bool InitPointerAccelerationScheme(DeviceIntPtr /*dev */ ,
+ int /*scheme */ );
+
+extern _X_EXPORT Bool InitFocusClassDeviceStruct(DeviceIntPtr /*device */ );
+
+extern _X_EXPORT Bool InitTouchClassDeviceStruct(DeviceIntPtr /*device */ ,
+ unsigned int /*max_touches */ ,
+ unsigned int /*mode */ ,
+ unsigned int /*numAxes */ );
+
+typedef void (*BellProcPtr) (int /*percent */ ,
+ DeviceIntPtr /*device */ ,
+ void */*ctrl */ ,
+ int);
+
+typedef void (*KbdCtrlProcPtr) (DeviceIntPtr /*device */ ,
+ KeybdCtrl * /*ctrl */ );
+
+typedef void (*PtrCtrlProcPtr) (DeviceIntPtr /*device */ ,
+ PtrCtrl * /*ctrl */ );
+
+extern _X_EXPORT Bool InitPtrFeedbackClassDeviceStruct(DeviceIntPtr /*device */
+ ,
+ PtrCtrlProcPtr
+ /*controlProc */ );
+
+typedef void (*StringCtrlProcPtr) (DeviceIntPtr /*device */ ,
+ StringCtrl * /*ctrl */ );
+
+extern _X_EXPORT Bool InitStringFeedbackClassDeviceStruct(DeviceIntPtr
+ /*device */ ,
+ StringCtrlProcPtr
+ /*controlProc */ ,
+ int /*max_symbols */ ,
+ int
+ /*num_symbols_supported */
+ ,
+ KeySym * /*symbols */
+ );
+
+typedef void (*BellCtrlProcPtr) (DeviceIntPtr /*device */ ,
+ BellCtrl * /*ctrl */ );
+
+extern _X_EXPORT Bool InitBellFeedbackClassDeviceStruct(DeviceIntPtr /*device */
+ ,
+ BellProcPtr
+ /*bellProc */ ,
+ BellCtrlProcPtr
+ /*controlProc */ );
+
+typedef void (*LedCtrlProcPtr) (DeviceIntPtr /*device */ ,
+ LedCtrl * /*ctrl */ );
+
+extern _X_EXPORT Bool InitLedFeedbackClassDeviceStruct(DeviceIntPtr /*device */
+ ,
+ LedCtrlProcPtr
+ /*controlProc */ );
+
+typedef void (*IntegerCtrlProcPtr) (DeviceIntPtr /*device */ ,
+ IntegerCtrl * /*ctrl */ );
+
+extern _X_EXPORT Bool InitIntegerFeedbackClassDeviceStruct(DeviceIntPtr
+ /*device */ ,
+ IntegerCtrlProcPtr
+ /*controlProc */ );
+
+extern _X_EXPORT Bool InitPointerDeviceStruct(DevicePtr /*device */ ,
+ CARD8 * /*map */ ,
+ int /*numButtons */ ,
+ Atom * /* btn_labels */ ,
+ PtrCtrlProcPtr /*controlProc */ ,
+ int /*numMotionEvents */ ,
+ int /*numAxes */ ,
+ Atom * /* axes_labels */ );
+
+extern _X_EXPORT Bool InitKeyboardDeviceStruct(DeviceIntPtr /*device */ ,
+ XkbRMLVOSet * /*rmlvo */ ,
+ BellProcPtr /*bellProc */ ,
+ KbdCtrlProcPtr /*controlProc */
+ );
+
+extern int ApplyPointerMapping(DeviceIntPtr /* pDev */ ,
+ CARD8 * /* map */ ,
+ int /* len */ ,
+ ClientPtr /* client */ );
+
+extern Bool BadDeviceMap(BYTE * /*buff */ ,
+ int /*length */ ,
+ unsigned /*low */ ,
+ unsigned /*high */ ,
+ XID * /*errval */ );
+
+extern void NoteLedState(DeviceIntPtr /*keybd */ ,
+ int /*led */ ,
+ Bool /*on */ );
+
+extern void MaybeStopHint(DeviceIntPtr /*device */ ,
+ ClientPtr /*client */ );
+
+extern void ProcessPointerEvent(InternalEvent * /* ev */ ,
+ DeviceIntPtr /*mouse */ );
+
+extern void ProcessKeyboardEvent(InternalEvent * /*ev */ ,
+ DeviceIntPtr /*keybd */ );
+
+extern Bool LegalModifier(unsigned int /*key */ ,
+ DeviceIntPtr /*pDev */ );
+
+extern _X_EXPORT void ProcessInputEvents(void);
+
+extern _X_EXPORT void InitInput(int /*argc */ ,
+ char ** /*argv */ );
+extern _X_EXPORT void CloseInput(void);
+
+extern _X_EXPORT int GetMaximumEventsNum(void);
+
+extern _X_EXPORT InternalEvent *InitEventList(int num_events);
+extern _X_EXPORT void FreeEventList(InternalEvent *list, int num_events);
+
+extern void CreateClassesChangedEvent(InternalEvent *event,
+ DeviceIntPtr master,
+ DeviceIntPtr slave, int flags);
+
+extern InternalEvent *UpdateFromMaster(InternalEvent *events,
+ DeviceIntPtr pDev,
+ int type, int *num_events);
+
+extern _X_EXPORT int GetPointerEvents(InternalEvent *events,
+ DeviceIntPtr pDev,
+ int type,
+ int buttons,
+ int flags, const ValuatorMask *mask);
+
+extern _X_EXPORT void QueuePointerEvents(DeviceIntPtr pDev,
+ int type,
+ int buttons,
+ int flags, const ValuatorMask *mask);
+
+extern _X_EXPORT int GetKeyboardEvents(InternalEvent *events,
+ DeviceIntPtr pDev,
+ int type,
+ int key_code, const ValuatorMask *mask);
+
+extern _X_EXPORT void QueueKeyboardEvents(DeviceIntPtr pDev,
+ int type,
+ int key_code,
+ const ValuatorMask *mask);
+
+extern int GetTouchEvents(InternalEvent *events,
+ DeviceIntPtr pDev,
+ uint32_t ddx_touchid,
+ uint16_t type,
+ uint32_t flags, const ValuatorMask *mask);
+
+void QueueTouchEvents(DeviceIntPtr device,
+ int type,
+ uint32_t ddx_touchid,
+ int flags, const ValuatorMask *mask);
+
+extern int GetTouchOwnershipEvents(InternalEvent *events,
+ DeviceIntPtr pDev,
+ TouchPointInfoPtr ti,
+ uint8_t mode, XID resource, uint32_t flags);
+
+extern void GetDixTouchEnd(InternalEvent *ievent,
+ DeviceIntPtr dev,
+ TouchPointInfoPtr ti,
+ uint32_t flags);
+
+extern _X_EXPORT int GetProximityEvents(InternalEvent *events,
+ DeviceIntPtr pDev,
+ int type, const ValuatorMask *mask);
+
+extern _X_EXPORT void QueueProximityEvents(DeviceIntPtr pDev,
+ int type, const ValuatorMask *mask);
+
+#ifdef PANORAMIX
+_X_EXPORT
+#endif
+extern void PostSyntheticMotion(DeviceIntPtr pDev,
+ int x, int y, int screen, unsigned long time);
+
+extern _X_EXPORT int GetMotionHistorySize(void);
+
+extern _X_EXPORT void AllocateMotionHistory(DeviceIntPtr pDev);
+
+extern _X_EXPORT int GetMotionHistory(DeviceIntPtr pDev,
+ xTimecoord ** buff,
+ unsigned long start,
+ unsigned long stop,
+ ScreenPtr pScreen, BOOL core);
+
+extern void ReleaseButtonsAndKeys(DeviceIntPtr dev);
+
+extern int AttachDevice(ClientPtr client,
+ DeviceIntPtr slave, DeviceIntPtr master);
+
+extern _X_EXPORT DeviceIntPtr GetPairedDevice(DeviceIntPtr kbd);
+extern DeviceIntPtr GetMaster(DeviceIntPtr dev, int type);
+
+extern _X_EXPORT int AllocDevicePair(ClientPtr client,
+ const char *name,
+ DeviceIntPtr *ptr,
+ DeviceIntPtr *keybd,
+ DeviceProc ptr_proc,
+ DeviceProc keybd_proc, Bool master);
+extern void DeepCopyDeviceClasses(DeviceIntPtr from,
+ DeviceIntPtr to, DeviceChangedEvent *dce);
+
+/* Helper functions. */
+extern _X_EXPORT int generate_modkeymap(ClientPtr client, DeviceIntPtr dev,
+ KeyCode **modkeymap,
+ int *max_keys_per_mod);
+extern int change_modmap(ClientPtr client, DeviceIntPtr dev, KeyCode *map,
+ int max_keys_per_mod);
+extern int AllocXTestDevice(ClientPtr client, const char *name,
+ DeviceIntPtr *ptr, DeviceIntPtr *keybd,
+ DeviceIntPtr master_ptr, DeviceIntPtr master_keybd);
+extern BOOL IsXTestDevice(DeviceIntPtr dev, DeviceIntPtr master);
+extern DeviceIntPtr GetXTestDevice(DeviceIntPtr master);
+extern void SendDevicePresenceEvent(int deviceid, int type);
+extern _X_EXPORT InputAttributes *DuplicateInputAttributes(InputAttributes *
+ attrs);
+extern _X_EXPORT void FreeInputAttributes(InputAttributes * attrs);
+
+enum TouchListenerState {
+ LISTENER_AWAITING_BEGIN = 0, /**< Waiting for a TouchBegin event */
+ LISTENER_AWAITING_OWNER, /**< Waiting for a TouchOwnership event */
+ LISTENER_EARLY_ACCEPT, /**< Waiting for ownership, has already
+ accepted */
+ LISTENER_IS_OWNER, /**< Is the current owner, hasn't accepted */
+ LISTENER_HAS_ACCEPTED, /**< Is the current owner, has accepted */
+ LISTENER_HAS_END, /**< Has already received the end event */
+};
+
+enum TouchListenerType {
+ LISTENER_GRAB,
+ LISTENER_POINTER_GRAB,
+ LISTENER_REGULAR,
+ LISTENER_POINTER_REGULAR,
+};
+
+extern void TouchInitDDXTouchPoint(DeviceIntPtr dev,
+ DDXTouchPointInfoPtr ddxtouch);
+extern DDXTouchPointInfoPtr TouchBeginDDXTouch(DeviceIntPtr dev,
+ uint32_t ddx_id);
+extern void TouchEndDDXTouch(DeviceIntPtr dev, DDXTouchPointInfoPtr ti);
+extern DDXTouchPointInfoPtr TouchFindByDDXID(DeviceIntPtr dev,
+ uint32_t ddx_id, Bool create);
+extern Bool TouchInitTouchPoint(TouchClassPtr touch, ValuatorClassPtr v,
+ int index);
+extern void TouchFreeTouchPoint(DeviceIntPtr dev, int index);
+extern TouchPointInfoPtr TouchBeginTouch(DeviceIntPtr dev, int sourceid,
+ uint32_t touchid,
+ Bool emulate_pointer);
+extern TouchPointInfoPtr TouchFindByClientID(DeviceIntPtr dev,
+ uint32_t client_id);
+extern void TouchEndTouch(DeviceIntPtr dev, TouchPointInfoPtr ti);
+extern Bool TouchEventHistoryAllocate(TouchPointInfoPtr ti);
+extern void TouchEventHistoryFree(TouchPointInfoPtr ti);
+extern void TouchEventHistoryPush(TouchPointInfoPtr ti, const DeviceEvent *ev);
+extern void TouchEventHistoryReplay(TouchPointInfoPtr ti, DeviceIntPtr dev,
+ XID resource);
+extern Bool TouchResourceIsOwner(TouchPointInfoPtr ti, XID resource);
+extern void TouchAddListener(TouchPointInfoPtr ti, XID resource, int resource_type,
+ enum InputLevel level, enum TouchListenerType type,
+ enum TouchListenerState state, WindowPtr window, GrabPtr grab);
+extern Bool TouchRemoveListener(TouchPointInfoPtr ti, XID resource);
+extern void TouchSetupListeners(DeviceIntPtr dev, TouchPointInfoPtr ti,
+ InternalEvent *ev);
+extern Bool TouchBuildSprite(DeviceIntPtr sourcedev, TouchPointInfoPtr ti,
+ InternalEvent *ev);
+extern Bool TouchBuildDependentSpriteTrace(DeviceIntPtr dev, SpritePtr sprite);
+extern int TouchConvertToPointerEvent(const InternalEvent *ev,
+ InternalEvent *motion,
+ InternalEvent *button);
+extern int TouchGetPointerEventType(const InternalEvent *ev);
+extern void TouchRemovePointerGrab(DeviceIntPtr dev);
+extern void TouchListenerGone(XID resource);
+extern int TouchListenerAcceptReject(DeviceIntPtr dev, TouchPointInfoPtr ti,
+ int listener, int mode);
+extern int TouchAcceptReject(ClientPtr client, DeviceIntPtr dev, int mode,
+ uint32_t touchid, Window grab_window, XID *error);
+extern void TouchEndPhysicallyActiveTouches(DeviceIntPtr dev);
+extern void TouchDeliverDeviceClassesChangedEvent(TouchPointInfoPtr ti,
+ Time time, XID resource);
+extern void TouchEmitTouchEnd(DeviceIntPtr dev, TouchPointInfoPtr ti, int flags, XID resource);
+extern void TouchAcceptAndEnd(DeviceIntPtr dev, int touchid);
+
+/* misc event helpers */
+extern Mask GetEventMask(DeviceIntPtr dev, xEvent *ev, InputClientsPtr clients);
+extern Mask GetEventFilter(DeviceIntPtr dev, xEvent *event);
+extern Bool WindowXI2MaskIsset(DeviceIntPtr dev, WindowPtr win, xEvent *ev);
+extern int GetXI2MaskByte(XI2Mask *mask, DeviceIntPtr dev, int event_type);
+void FixUpEventFromWindow(SpritePtr pSprite,
+ xEvent *xE,
+ WindowPtr pWin, Window child, Bool calcChild);
+extern WindowPtr XYToWindow(SpritePtr pSprite, int x, int y);
+extern int EventIsDeliverable(DeviceIntPtr dev, int evtype, WindowPtr win);
+extern Bool ActivatePassiveGrab(DeviceIntPtr dev, GrabPtr grab,
+ InternalEvent *ev, InternalEvent *real_event);
+/**
+ * Masks specifying the type of event to deliver for an InternalEvent; used
+ * by EventIsDeliverable.
+ * @defgroup EventIsDeliverable return flags
+ * @{
+ */
+#define EVENT_XI1_MASK (1 << 0) /**< XI1.x event */
+#define EVENT_CORE_MASK (1 << 1) /**< Core event */
+#define EVENT_DONT_PROPAGATE_MASK (1 << 2) /**< DontPropagate mask set */
+#define EVENT_XI2_MASK (1 << 3) /**< XI2 mask set on window */
+/* @} */
+
+enum EventDeliveryState {
+ EVENT_DELIVERED, /**< Event has been delivered to a client */
+ EVENT_NOT_DELIVERED, /**< Event was not delivered to any client */
+ EVENT_SKIP, /**< Event can be discarded by the caller */
+ EVENT_REJECTED, /**< Event was rejected for delivery to the client */
+};
+
+/* Implemented by the DDX. */
+extern _X_EXPORT int NewInputDeviceRequest(InputOption *options,
+ InputAttributes * attrs,
+ DeviceIntPtr *dev);
+extern _X_EXPORT void DeleteInputDeviceRequest(DeviceIntPtr dev);
+
+extern _X_EXPORT void DDXRingBell(int volume, int pitch, int duration);
+
+#define VALUATOR_MODE_ALL_AXES -1
+extern _X_HIDDEN int valuator_get_mode(DeviceIntPtr dev, int axis);
+extern _X_HIDDEN void valuator_set_mode(DeviceIntPtr dev, int axis, int mode);
+
+/* Set to TRUE by default - os/utils.c sets it to FALSE on user request,
+ xfixes/cursor.c uses it to determine if the cursor is enabled */
+extern Bool EnableCursor;
+
+/* Set to FALSE by default - ChangeWindowAttributes sets it to TRUE on
+ * CWCursor, xfixes/cursor.c uses it to determine if the cursor is enabled
+ */
+extern Bool CursorVisible;
+
+extern _X_EXPORT ValuatorMask *valuator_mask_new(int num_valuators);
+extern _X_EXPORT void valuator_mask_free(ValuatorMask **mask);
+extern _X_EXPORT void valuator_mask_set_range(ValuatorMask *mask,
+ int first_valuator,
+ int num_valuators,
+ const int *valuators);
+extern _X_EXPORT void valuator_mask_set(ValuatorMask *mask, int valuator,
+ int data);
+extern _X_EXPORT void valuator_mask_set_double(ValuatorMask *mask, int valuator,
+ double data);
+extern _X_EXPORT void valuator_mask_zero(ValuatorMask *mask);
+extern _X_EXPORT int valuator_mask_size(const ValuatorMask *mask);
+extern _X_EXPORT int valuator_mask_isset(const ValuatorMask *mask, int bit);
+extern _X_EXPORT void valuator_mask_unset(ValuatorMask *mask, int bit);
+extern _X_EXPORT int valuator_mask_num_valuators(const ValuatorMask *mask);
+extern _X_EXPORT void valuator_mask_copy(ValuatorMask *dest,
+ const ValuatorMask *src);
+extern _X_EXPORT int valuator_mask_get(const ValuatorMask *mask, int valnum);
+extern _X_EXPORT double valuator_mask_get_double(const ValuatorMask *mask,
+ int valnum);
+extern _X_EXPORT Bool valuator_mask_fetch(const ValuatorMask *mask,
+ int valnum, int *val);
+extern _X_EXPORT Bool valuator_mask_fetch_double(const ValuatorMask *mask,
+ int valnum, double *val);
+
+/* InputOption handling interface */
+extern _X_EXPORT InputOption *input_option_new(InputOption *list,
+ const char *key,
+ const char *value);
+extern _X_EXPORT void input_option_free_list(InputOption **opt);
+extern _X_EXPORT InputOption *input_option_free_element(InputOption *opt,
+ const char *key);
+extern _X_EXPORT InputOption *input_option_find(InputOption *list,
+ const char *key);
+extern _X_EXPORT const char *input_option_get_key(const InputOption *opt);
+extern _X_EXPORT const char *input_option_get_value(const InputOption *opt);
+extern _X_EXPORT void input_option_set_key(InputOption *opt, const char *key);
+extern _X_EXPORT void input_option_set_value(InputOption *opt,
+ const char *value);
+
+extern _X_HIDDEN Bool point_on_screen(ScreenPtr pScreen, int x, int y);
+extern _X_HIDDEN void update_desktop_dimensions(void);
+
+extern _X_HIDDEN void input_constrain_cursor(DeviceIntPtr pDev, ScreenPtr screen,
+ int current_x, int current_y,
+ int dest_x, int dest_y,
+ int *out_x, int *out_y,
+ int *nevents, InternalEvent* events);
+
+#endif /* INPUT_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/inputstr.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/inputstr.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/inputstr.h (working copy)
@@ -0,0 +1,673 @@
+/************************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+********************************************************/
+
+#ifndef INPUTSTRUCT_H
+#define INPUTSTRUCT_H
+
+#include <X11/extensions/XI2proto.h>
+
+#include <pixman.h>
+#include "input.h"
+#include "window.h"
+#include "dixstruct.h"
+#include "cursorstr.h"
+#include "geext.h"
+#include "privates.h"
+
+#define BitIsOn(ptr, bit) (!!(((const BYTE *) (ptr))[(bit)>>3] & (1 << ((bit) & 7))))
+#define SetBit(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] |= (1 << ((bit) & 7)))
+#define ClearBit(ptr, bit) (((BYTE *)(ptr))[(bit)>>3] &= ~(1 << ((bit) & 7)))
+extern _X_EXPORT int CountBits(const uint8_t * mask, int len);
+
+#define SameClient(obj,client) \
+ (CLIENT_BITS((obj)->resource) == (client)->clientAsMask)
+
+#define EMASKSIZE (MAXDEVICES + 2)
+
+/* This is the last XI2 event supported by the server. If you add
+ * events to the protocol, the server will not support these events until
+ * this number here is bumped.
+ */
+#define XI2LASTEVENT XI_BarrierLeave
+#define XI2MASKSIZE ((XI2LASTEVENT >> 3) + 1) /* no of bytes for masks */
+
+/**
+ * Scroll types for ::SetScrollValuator and the scroll type in the
+ * ::ScrollInfoPtr.
+ */
+enum ScrollType {
+ SCROLL_TYPE_NONE = 0, /**< Not a scrolling valuator */
+ SCROLL_TYPE_VERTICAL = 8,
+ SCROLL_TYPE_HORIZONTAL = 9,
+};
+
+/**
+ * This struct stores the core event mask for each client except the client
+ * that created the window.
+ *
+ * Each window that has events selected from other clients has at least one of
+ * these masks. If multiple clients selected for events on the same window,
+ * these masks are in a linked list.
+ *
+ * The event mask for the client that created the window is stored in
+ * win->eventMask instead.
+ *
+ * The resource id is simply a fake client ID to associate this mask with a
+ * client.
+ *
+ * Kludge: OtherClients and InputClients must be compatible, see code.
+ */
+typedef struct _OtherClients {
+ OtherClientsPtr next; /**< Pointer to the next mask */
+ XID resource; /**< id for putting into resource manager */
+ Mask mask; /**< Core event mask */
+} OtherClients;
+
+/**
+ * This struct stores the XI event mask for each client.
+ *
+ * Each window that has events selected has at least one of these masks. If
+ * multiple client selected for events on the same window, these masks are in
+ * a linked list.
+ */
+typedef struct _InputClients {
+ InputClientsPtr next; /**< Pointer to the next mask */
+ XID resource; /**< id for putting into resource manager */
+ Mask mask[EMASKSIZE]; /**< Actual XI event mask, deviceid is index */
+ /** XI2 event masks. One per device, each bit is a mask of (1 << type) */
+ struct _XI2Mask *xi2mask;
+} InputClients;
+
+/**
+ * Combined XI event masks from all devices.
+ *
+ * This is the XI equivalent of the deliverableEvents, eventMask and
+ * dontPropagate mask of the WindowRec (or WindowOptRec).
+ *
+ * A window that has an XI client selecting for events has exactly one
+ * OtherInputMasks struct and exactly one InputClients struct hanging off
+ * inputClients. Each further client appends to the inputClients list.
+ * Each Mask field is per-device, with the device id as the index.
+ * Exception: for non-device events (Presence events), the MAXDEVICES
+ * deviceid is used.
+ */
+typedef struct _OtherInputMasks {
+ /**
+ * Bitwise OR of all masks by all clients and the window's parent's masks.
+ */
+ Mask deliverableEvents[EMASKSIZE];
+ /**
+ * Bitwise OR of all masks by all clients on this window.
+ */
+ Mask inputEvents[EMASKSIZE];
+ /** The do-not-propagate masks for each device. */
+ Mask dontPropagateMask[EMASKSIZE];
+ /** The clients that selected for events */
+ InputClientsPtr inputClients;
+ /* XI2 event masks. One per device, each bit is a mask of (1 << type) */
+ struct _XI2Mask *xi2mask;
+} OtherInputMasks;
+
+/*
+ * The following structure gets used for both active and passive grabs. For
+ * active grabs some of the fields (e.g. modifiers) are not used. However,
+ * that is not much waste since there aren't many active grabs (one per
+ * keyboard/pointer device) going at once in the server.
+ */
+
+#define MasksPerDetailMask 8 /* 256 keycodes and 256 possible
+ modifier combinations, but only
+ 3 buttons. */
+
+typedef struct _DetailRec { /* Grab details may be bit masks */
+ unsigned int exact;
+ Mask *pMask;
+} DetailRec;
+
+union _GrabMask {
+ Mask core;
+ Mask xi;
+ struct _XI2Mask *xi2mask;
+};
+
+/**
+ * Central struct for device grabs.
+ * The same struct is used for both core grabs and device grabs, with
+ * different fields being set.
+ * If the grab is a core grab (GrabPointer/GrabKeyboard), then the eventMask
+ * is a combination of standard event masks (i.e. PointerMotionMask |
+ * ButtonPressMask).
+ * If the grab is a device grab (GrabDevice), then the eventMask is a
+ * combination of event masks for a given XI event type (see SetEventInfo).
+ *
+ * If the grab is a result of a ButtonPress, then eventMask is the core mask
+ * and deviceMask is set to the XI event mask for the grab.
+ */
+typedef struct _GrabRec {
+ GrabPtr next; /* for chain of passive grabs */
+ XID resource;
+ DeviceIntPtr device;
+ WindowPtr window;
+ unsigned ownerEvents:1;
+ unsigned keyboardMode:1;
+ unsigned pointerMode:1;
+ enum InputLevel grabtype;
+ CARD8 type; /* event type for passive grabs, 0 for active grabs */
+ DetailRec modifiersDetail;
+ DeviceIntPtr modifierDevice;
+ DetailRec detail; /* key or button */
+ WindowPtr confineTo; /* always NULL for keyboards */
+ CursorPtr cursor; /* always NULL for keyboards */
+ Mask eventMask;
+ Mask deviceMask;
+ /* XI2 event masks. One per device, each bit is a mask of (1 << type) */
+ struct _XI2Mask *xi2mask;
+} GrabRec;
+
+/**
+ * Sprite information for a device.
+ */
+typedef struct _SpriteRec {
+ CursorPtr current;
+ BoxRec hotLimits; /* logical constraints of hot spot */
+ Bool confined; /* confined to screen */
+ RegionPtr hotShape; /* additional logical shape constraint */
+ BoxRec physLimits; /* physical constraints of hot spot */
+ WindowPtr win; /* window of logical position */
+ HotSpot hot; /* logical pointer position */
+ HotSpot hotPhys; /* physical pointer position */
+#ifdef PANORAMIX
+ ScreenPtr screen; /* all others are in Screen 0 coordinates */
+ RegionRec Reg1; /* Region 1 for confining motion */
+ RegionRec Reg2; /* Region 2 for confining virtual motion */
+ WindowPtr windows[MAXSCREENS];
+ WindowPtr confineWin; /* confine window */
+#endif
+ /* The window trace information is used at dix/events.c to avoid having
+ * to compute all the windows between the root and the current pointer
+ * window each time a button or key goes down. The grabs on each of those
+ * windows must be checked.
+ * spriteTraces should only be used at dix/events.c! */
+ WindowPtr *spriteTrace;
+ int spriteTraceSize;
+ int spriteTraceGood;
+
+ /* Due to delays between event generation and event processing, it is
+ * possible that the pointer has crossed screen boundaries between the
+ * time in which it begins generating events and the time when
+ * those events are processed.
+ *
+ * pEnqueueScreen: screen the pointer was on when the event was generated
+ * pDequeueScreen: screen the pointer was on when the event is processed
+ */
+ ScreenPtr pEnqueueScreen;
+ ScreenPtr pDequeueScreen;
+
+} SpriteRec;
+
+typedef struct _KeyClassRec {
+ int sourceid;
+ CARD8 down[DOWN_LENGTH];
+ CARD8 postdown[DOWN_LENGTH];
+ int modifierKeyCount[8];
+ struct _XkbSrvInfo *xkbInfo;
+} KeyClassRec, *KeyClassPtr;
+
+typedef struct _ScrollInfo {
+ enum ScrollType type;
+ double increment;
+ int flags;
+} ScrollInfo, *ScrollInfoPtr;
+
+typedef struct _AxisInfo {
+ int resolution;
+ int min_resolution;
+ int max_resolution;
+ int min_value;
+ int max_value;
+ Atom label;
+ CARD8 mode;
+ ScrollInfo scroll;
+} AxisInfo, *AxisInfoPtr;
+
+typedef struct _ValuatorAccelerationRec {
+ int number;
+ PointerAccelSchemeProc AccelSchemeProc;
+ void *accelData; /* at disposal of AccelScheme */
+ PointerAccelSchemeInitProc AccelInitProc;
+ DeviceCallbackProc AccelCleanupProc;
+} ValuatorAccelerationRec, *ValuatorAccelerationPtr;
+
+typedef struct _ValuatorClassRec {
+ int sourceid;
+ int numMotionEvents;
+ int first_motion;
+ int last_motion;
+ void *motion; /* motion history buffer. Different layout
+ for MDs and SDs! */
+ WindowPtr motionHintWindow;
+
+ AxisInfoPtr axes;
+ unsigned short numAxes;
+ double *axisVal; /* always absolute, but device-coord system */
+ ValuatorAccelerationRec accelScheme;
+ int h_scroll_axis; /* horiz smooth-scrolling axis */
+ int v_scroll_axis; /* vert smooth-scrolling axis */
+} ValuatorClassRec;
+
+typedef struct _TouchListener {
+ XID listener; /* grabs/event selection IDs receiving
+ * events for this touch */
+ int resource_type; /* listener's resource type */
+ enum TouchListenerType type;
+ enum TouchListenerState state;
+ enum InputLevel level; /* matters only for emulating touches */
+ WindowPtr window;
+ GrabPtr grab;
+} TouchListener;
+
+typedef struct _TouchPointInfo {
+ uint32_t client_id; /* touch ID as seen in client events */
+ int sourceid; /* Source device's ID for this touchpoint */
+ Bool active; /* whether or not the touch is active */
+ Bool pending_finish; /* true if the touch is physically inactive
+ * but still owned by a grab */
+ SpriteRec sprite; /* window trace for delivery */
+ ValuatorMask *valuators; /* last recorded axis values */
+ TouchListener *listeners; /* set of listeners */
+ int num_listeners;
+ int num_grabs; /* number of open grabs on this touch
+ * which have not accepted or rejected */
+ Bool emulate_pointer;
+ DeviceEvent *history; /* History of events on this touchpoint */
+ size_t history_elements; /* Number of current elements in history */
+ size_t history_size; /* Size of history in elements */
+} TouchPointInfoRec;
+
+typedef struct _DDXTouchPointInfo {
+ uint32_t client_id; /* touch ID as seen in client events */
+ Bool active; /* whether or not the touch is active */
+ uint32_t ddx_id; /* touch ID given by the DDX */
+ Bool emulate_pointer;
+
+ ValuatorMask *valuators; /* last axis values as posted, pre-transform */
+} DDXTouchPointInfoRec;
+
+typedef struct _TouchClassRec {
+ int sourceid;
+ TouchPointInfoPtr touches;
+ unsigned short num_touches; /* number of allocated touches */
+ unsigned short max_touches; /* maximum number of touches, may be 0 */
+ CARD8 mode; /* ::XIDirectTouch, XIDependentTouch */
+ /* for pointer-emulation */
+ CARD8 buttonsDown; /* number of buttons down */
+ unsigned short state; /* logical button state */
+ Mask motionMask;
+} TouchClassRec;
+
+typedef struct _ButtonClassRec {
+ int sourceid;
+ CARD8 numButtons;
+ CARD8 buttonsDown; /* number of buttons currently down
+ This counts logical buttons, not
+ physical ones, i.e if some buttons
+ are mapped to 0, they're not counted
+ here */
+ unsigned short state;
+ Mask motionMask;
+ CARD8 down[DOWN_LENGTH];
+ CARD8 postdown[DOWN_LENGTH];
+ CARD8 map[MAP_LENGTH];
+ union _XkbAction *xkb_acts;
+ Atom labels[MAX_BUTTONS];
+} ButtonClassRec, *ButtonClassPtr;
+
+typedef struct _FocusClassRec {
+ int sourceid;
+ WindowPtr win; /* May be set to a int constant (e.g. PointerRootWin)! */
+ int revert;
+ TimeStamp time;
+ WindowPtr *trace;
+ int traceSize;
+ int traceGood;
+} FocusClassRec, *FocusClassPtr;
+
+typedef struct _ProximityClassRec {
+ int sourceid;
+ char in_proximity;
+} ProximityClassRec, *ProximityClassPtr;
+
+typedef struct _KbdFeedbackClassRec *KbdFeedbackPtr;
+typedef struct _PtrFeedbackClassRec *PtrFeedbackPtr;
+typedef struct _IntegerFeedbackClassRec *IntegerFeedbackPtr;
+typedef struct _StringFeedbackClassRec *StringFeedbackPtr;
+typedef struct _BellFeedbackClassRec *BellFeedbackPtr;
+typedef struct _LedFeedbackClassRec *LedFeedbackPtr;
+
+typedef struct _KbdFeedbackClassRec {
+ BellProcPtr BellProc;
+ KbdCtrlProcPtr CtrlProc;
+ KeybdCtrl ctrl;
+ KbdFeedbackPtr next;
+ struct _XkbSrvLedInfo *xkb_sli;
+} KbdFeedbackClassRec;
+
+typedef struct _PtrFeedbackClassRec {
+ PtrCtrlProcPtr CtrlProc;
+ PtrCtrl ctrl;
+ PtrFeedbackPtr next;
+} PtrFeedbackClassRec;
+
+typedef struct _IntegerFeedbackClassRec {
+ IntegerCtrlProcPtr CtrlProc;
+ IntegerCtrl ctrl;
+ IntegerFeedbackPtr next;
+} IntegerFeedbackClassRec;
+
+typedef struct _StringFeedbackClassRec {
+ StringCtrlProcPtr CtrlProc;
+ StringCtrl ctrl;
+ StringFeedbackPtr next;
+} StringFeedbackClassRec;
+
+typedef struct _BellFeedbackClassRec {
+ BellProcPtr BellProc;
+ BellCtrlProcPtr CtrlProc;
+ BellCtrl ctrl;
+ BellFeedbackPtr next;
+} BellFeedbackClassRec;
+
+typedef struct _LedFeedbackClassRec {
+ LedCtrlProcPtr CtrlProc;
+ LedCtrl ctrl;
+ LedFeedbackPtr next;
+ struct _XkbSrvLedInfo *xkb_sli;
+} LedFeedbackClassRec;
+
+typedef struct _ClassesRec {
+ KeyClassPtr key;
+ ValuatorClassPtr valuator;
+ TouchClassPtr touch;
+ ButtonClassPtr button;
+ FocusClassPtr focus;
+ ProximityClassPtr proximity;
+ KbdFeedbackPtr kbdfeed;
+ PtrFeedbackPtr ptrfeed;
+ IntegerFeedbackPtr intfeed;
+ StringFeedbackPtr stringfeed;
+ BellFeedbackPtr bell;
+ LedFeedbackPtr leds;
+} ClassesRec;
+
+/* Device properties */
+typedef struct _XIPropertyValue {
+ Atom type; /* ignored by server */
+ short format; /* format of data for swapping - 8,16,32 */
+ long size; /* size of data in (format/8) bytes */
+ void *data; /* private to client */
+} XIPropertyValueRec;
+
+typedef struct _XIProperty {
+ struct _XIProperty *next;
+ Atom propertyName;
+ BOOL deletable; /* clients can delete this prop? */
+ XIPropertyValueRec value;
+} XIPropertyRec;
+
+typedef XIPropertyRec *XIPropertyPtr;
+typedef XIPropertyValueRec *XIPropertyValuePtr;
+
+typedef struct _XIPropertyHandler {
+ struct _XIPropertyHandler *next;
+ long id;
+ int (*SetProperty) (DeviceIntPtr dev,
+ Atom property, XIPropertyValuePtr prop, BOOL checkonly);
+ int (*GetProperty) (DeviceIntPtr dev, Atom property);
+ int (*DeleteProperty) (DeviceIntPtr dev, Atom property);
+} XIPropertyHandler, *XIPropertyHandlerPtr;
+
+/* states for devices */
+
+#define NOT_GRABBED 0
+#define THAWED 1
+#define THAWED_BOTH 2 /* not a real state */
+#define FREEZE_NEXT_EVENT 3
+#define FREEZE_BOTH_NEXT_EVENT 4
+#define FROZEN 5 /* any state >= has device frozen */
+#define FROZEN_NO_EVENT 5
+#define FROZEN_WITH_EVENT 6
+#define THAW_OTHERS 7
+
+typedef struct _GrabInfoRec {
+ TimeStamp grabTime;
+ Bool fromPassiveGrab; /* true if from passive grab */
+ Bool implicitGrab; /* implicit from ButtonPress */
+ GrabPtr unused; /* Kept for ABI stability, remove soon */
+ GrabPtr grab;
+ CARD8 activatingKey;
+ void (*ActivateGrab) (DeviceIntPtr /*device */ ,
+ GrabPtr /*grab */ ,
+ TimeStamp /*time */ ,
+ Bool /*autoGrab */ );
+ void (*DeactivateGrab) (DeviceIntPtr /*device */ );
+ struct {
+ Bool frozen;
+ int state;
+ GrabPtr other; /* if other grab has this frozen */
+ DeviceEvent *event; /* saved to be replayed */
+ } sync;
+} GrabInfoRec, *GrabInfoPtr;
+
+typedef struct _SpriteInfoRec {
+ /* sprite must always point to a valid sprite. For devices sharing the
+ * sprite, let sprite point to a paired spriteOwner's sprite. */
+ SpritePtr sprite; /* sprite information */
+ Bool spriteOwner; /* True if device owns the sprite */
+ DeviceIntPtr paired; /* The paired device. Keyboard if
+ spriteOwner is TRUE, otherwise the
+ pointer that owns the sprite. */
+
+ /* keep states for animated cursor */
+ struct {
+ CursorPtr pCursor;
+ ScreenPtr pScreen;
+ int elt;
+ CARD32 time;
+ } anim;
+} SpriteInfoRec, *SpriteInfoPtr;
+
+/* device types */
+#define MASTER_POINTER 1
+#define MASTER_KEYBOARD 2
+#define SLAVE 3
+/* special types for GetMaster */
+#define MASTER_ATTACHED 4 /* Master for this device */
+#define KEYBOARD_OR_FLOAT 5 /* Keyboard master for this device or this device if floating */
+#define POINTER_OR_FLOAT 6 /* Pointer master for this device or this device if floating */
+
+typedef struct _DeviceIntRec {
+ DeviceRec public;
+ DeviceIntPtr next;
+ Bool startup; /* true if needs to be turned on at
+ server initialization time */
+ DeviceProc deviceProc; /* proc(DevicePtr, DEVICE_xx). It is
+ used to initialize, turn on, or
+ turn off the device */
+ Bool inited; /* TRUE if INIT returns Success */
+ Bool enabled; /* TRUE if ON returns Success */
+ Bool coreEvents; /* TRUE if device also sends core */
+ GrabInfoRec deviceGrab; /* grab on the device */
+ int type; /* MASTER_POINTER, MASTER_KEYBOARD, SLAVE */
+ Atom xinput_type;
+ char *name;
+ int id;
+ KeyClassPtr key;
+ ValuatorClassPtr valuator;
+ TouchClassPtr touch;
+ ButtonClassPtr button;
+ FocusClassPtr focus;
+ ProximityClassPtr proximity;
+ KbdFeedbackPtr kbdfeed;
+ PtrFeedbackPtr ptrfeed;
+ IntegerFeedbackPtr intfeed;
+ StringFeedbackPtr stringfeed;
+ BellFeedbackPtr bell;
+ LedFeedbackPtr leds;
+ struct _XkbInterest *xkb_interest;
+ char *config_info; /* used by the hotplug layer */
+ ClassesPtr unused_classes; /* for master devices */
+ int saved_master_id; /* for slaves while grabbed */
+ PrivateRec *devPrivates;
+ DeviceUnwrapProc unwrapProc;
+ SpriteInfoPtr spriteInfo;
+ DeviceIntPtr master; /* master device */
+ DeviceIntPtr lastSlave; /* last slave device used */
+
+ /* last valuator values recorded, not posted to client;
+ * for slave devices, valuators is in device coordinates, mapped to the
+ * desktop
+ * for master devices, valuators is in desktop coordinates.
+ * see dix/getevents.c
+ * remainder supports acceleration
+ */
+ struct {
+ double valuators[MAX_VALUATORS];
+ int numValuators;
+ DeviceIntPtr slave;
+ ValuatorMask *scroll;
+ int num_touches; /* size of the touches array */
+ DDXTouchPointInfoPtr touches;
+ } last;
+
+ /* Input device property handling. */
+ struct {
+ XIPropertyPtr properties;
+ XIPropertyHandlerPtr handlers; /* NULL-terminated */
+ } properties;
+
+ /* coordinate transformation matrix for relative movement. Matrix with
+ * the translation component dropped */
+ struct pixman_f_transform relative_transform;
+ /* scale matrix for absolute devices, this is the combined matrix of
+ [1/scale] . [transform] . [scale]. See DeviceSetTransform */
+ struct pixman_f_transform scale_and_transform;
+
+ /* XTest related master device id */
+ int xtest_master_id;
+
+ struct _SyncCounter *idle_counter;
+} DeviceIntRec;
+
+typedef struct {
+ int numDevices; /* total number of devices */
+ DeviceIntPtr devices; /* all devices turned on */
+ DeviceIntPtr off_devices; /* all devices turned off */
+ DeviceIntPtr keyboard; /* the main one for the server */
+ DeviceIntPtr pointer;
+ DeviceIntPtr all_devices;
+ DeviceIntPtr all_master_devices;
+} InputInfo;
+
+extern _X_EXPORT InputInfo inputInfo;
+
+/* for keeping the events for devices grabbed synchronously */
+typedef struct _QdEvent *QdEventPtr;
+typedef struct _QdEvent {
+ struct xorg_list next;
+ DeviceIntPtr device;
+ ScreenPtr pScreen; /* what screen the pointer was on */
+ unsigned long months; /* milliseconds is in the event */
+ InternalEvent *event;
+} QdEventRec;
+
+/**
+ * syncEvents is the global structure for queued events.
+ *
+ * Devices can be frozen through GrabModeSync pointer grabs. If this is the
+ * case, events from these devices are added to "pending" instead of being
+ * processed normally. When the device is unfrozen, events in "pending" are
+ * replayed and processed as if they would come from the device directly.
+ */
+typedef struct _EventSyncInfo {
+ struct xorg_list pending;
+
+ /** The device to replay events for. Only set in AllowEvents(), in which
+ * case it is set to the device specified in the request. */
+ DeviceIntPtr replayDev; /* kludgy rock to put flag for */
+
+ /**
+ * The window the events are supposed to be replayed on.
+ * This window may be set to the grab's window (but only when
+ * Replay{Pointer|Keyboard} is given in the XAllowEvents()
+ * request. */
+ WindowPtr replayWin; /* ComputeFreezes */
+ /**
+ * Flag to indicate whether we're in the process of
+ * replaying events. Only set in ComputeFreezes(). */
+ Bool playingEvents;
+ TimeStamp time;
+} EventSyncInfoRec, *EventSyncInfoPtr;
+
+extern EventSyncInfoRec syncEvents;
+
+/**
+ * Given a sprite, returns the window at the bottom of the trace (i.e. the
+ * furthest window from the root).
+ */
+static inline WindowPtr
+DeepestSpriteWin(SpritePtr sprite)
+{
+ assert(sprite->spriteTraceGood > 0);
+ return sprite->spriteTrace[sprite->spriteTraceGood - 1];
+}
+
+struct _XI2Mask {
+ unsigned char **masks; /* event mask in masks[deviceid][event type byte] */
+ size_t nmasks; /* number of masks */
+ size_t mask_size; /* size of each mask in bytes */
+};
+
+#endif /* INPUTSTRUCT_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/list.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/list.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/list.h (working copy)
@@ -0,0 +1,492 @@
+/*
+ * Copyright © 2010 Intel Corporation
+ * Copyright © 2010 Francisco Jerez <currojerez@riseup.net>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ */
+
+#ifndef _XORG_LIST_H_
+#define _XORG_LIST_H_
+
+#include <stddef.h> /* offsetof() */
+
+/**
+ * @file Classic doubly-link circular list implementation.
+ * For real usage examples of the linked list, see the file test/list.c
+ *
+ * Example:
+ * We need to keep a list of struct foo in the parent struct bar, i.e. what
+ * we want is something like this.
+ *
+ * struct bar {
+ * ...
+ * struct foo *list_of_foos; -----> struct foo {}, struct foo {}, struct foo{}
+ * ...
+ * }
+ *
+ * We need one list head in bar and a list element in all list_of_foos (both are of
+ * data type 'struct xorg_list').
+ *
+ * struct bar {
+ * ...
+ * struct xorg_list list_of_foos;
+ * ...
+ * }
+ *
+ * struct foo {
+ * ...
+ * struct xorg_list entry;
+ * ...
+ * }
+ *
+ * Now we initialize the list head:
+ *
+ * struct bar bar;
+ * ...
+ * xorg_list_init(&bar.list_of_foos);
+ *
+ * Then we create the first element and add it to this list:
+ *
+ * struct foo *foo = malloc(...);
+ * ....
+ * xorg_list_add(&foo->entry, &bar.list_of_foos);
+ *
+ * Repeat the above for each element you want to add to the list. Deleting
+ * works with the element itself.
+ * xorg_list_del(&foo->entry);
+ * free(foo);
+ *
+ * Note: calling xorg_list_del(&bar.list_of_foos) will set bar.list_of_foos to an empty
+ * list again.
+ *
+ * Looping through the list requires a 'struct foo' as iterator and the
+ * name of the field the subnodes use.
+ *
+ * struct foo *iterator;
+ * xorg_list_for_each_entry(iterator, &bar.list_of_foos, entry) {
+ * if (iterator->something == ...)
+ * ...
+ * }
+ *
+ * Note: You must not call xorg_list_del() on the iterator if you continue the
+ * loop. You need to run the safe for-each loop instead:
+ *
+ * struct foo *iterator, *next;
+ * xorg_list_for_each_entry_safe(iterator, next, &bar.list_of_foos, entry) {
+ * if (...)
+ * xorg_list_del(&iterator->entry);
+ * }
+ *
+ */
+
+/**
+ * The linkage struct for list nodes. This struct must be part of your
+ * to-be-linked struct. struct xorg_list is required for both the head of the
+ * list and for each list node.
+ *
+ * Position and name of the struct xorg_list field is irrelevant.
+ * There are no requirements that elements of a list are of the same type.
+ * There are no requirements for a list head, any struct xorg_list can be a list
+ * head.
+ */
+struct xorg_list {
+ struct xorg_list *next, *prev;
+};
+
+/**
+ * Initialize the list as an empty list.
+ *
+ * Example:
+ * xorg_list_init(&bar->list_of_foos);
+ *
+ * @param The list to initialized.
+ */
+static inline void
+xorg_list_init(struct xorg_list *list)
+{
+ list->next = list->prev = list;
+}
+
+static inline void
+__xorg_list_add(struct xorg_list *entry,
+ struct xorg_list *prev, struct xorg_list *next)
+{
+ next->prev = entry;
+ entry->next = next;
+ entry->prev = prev;
+ prev->next = entry;
+}
+
+/**
+ * Insert a new element after the given list head. The new element does not
+ * need to be initialised as empty list.
+ * The list changes from:
+ * head → some element → ...
+ * to
+ * head → new element → older element → ...
+ *
+ * Example:
+ * struct foo *newfoo = malloc(...);
+ * xorg_list_add(&newfoo->entry, &bar->list_of_foos);
+ *
+ * @param entry The new element to prepend to the list.
+ * @param head The existing list.
+ */
+static inline void
+xorg_list_add(struct xorg_list *entry, struct xorg_list *head)
+{
+ __xorg_list_add(entry, head, head->next);
+}
+
+/**
+ * Append a new element to the end of the list given with this list head.
+ *
+ * The list changes from:
+ * head → some element → ... → lastelement
+ * to
+ * head → some element → ... → lastelement → new element
+ *
+ * Example:
+ * struct foo *newfoo = malloc(...);
+ * xorg_list_append(&newfoo->entry, &bar->list_of_foos);
+ *
+ * @param entry The new element to prepend to the list.
+ * @param head The existing list.
+ */
+static inline void
+xorg_list_append(struct xorg_list *entry, struct xorg_list *head)
+{
+ __xorg_list_add(entry, head->prev, head);
+}
+
+static inline void
+__xorg_list_del(struct xorg_list *prev, struct xorg_list *next)
+{
+ next->prev = prev;
+ prev->next = next;
+}
+
+/**
+ * Remove the element from the list it is in. Using this function will reset
+ * the pointers to/from this element so it is removed from the list. It does
+ * NOT free the element itself or manipulate it otherwise.
+ *
+ * Using xorg_list_del on a pure list head (like in the example at the top of
+ * this file) will NOT remove the first element from
+ * the list but rather reset the list as empty list.
+ *
+ * Example:
+ * xorg_list_del(&foo->entry);
+ *
+ * @param entry The element to remove.
+ */
+static inline void
+xorg_list_del(struct xorg_list *entry)
+{
+ __xorg_list_del(entry->prev, entry->next);
+ xorg_list_init(entry);
+}
+
+/**
+ * Check if the list is empty.
+ *
+ * Example:
+ * xorg_list_is_empty(&bar->list_of_foos);
+ *
+ * @return True if the list contains one or more elements or False otherwise.
+ */
+static inline int
+xorg_list_is_empty(struct xorg_list *head)
+{
+ return head->next == head;
+}
+
+/**
+ * Returns a pointer to the container of this list element.
+ *
+ * Example:
+ * struct foo* f;
+ * f = container_of(&foo->entry, struct foo, entry);
+ * assert(f == foo);
+ *
+ * @param ptr Pointer to the struct xorg_list.
+ * @param type Data type of the list element.
+ * @param member Member name of the struct xorg_list field in the list element.
+ * @return A pointer to the data struct containing the list head.
+ */
+#ifndef container_of
+#define container_of(ptr, type, member) \
+ (type *)((char *)(ptr) - offsetof(type, member))
+#endif
+
+/**
+ * Alias of container_of
+ */
+#define xorg_list_entry(ptr, type, member) \
+ container_of(ptr, type, member)
+
+/**
+ * Retrieve the first list entry for the given list pointer.
+ *
+ * Example:
+ * struct foo *first;
+ * first = xorg_list_first_entry(&bar->list_of_foos, struct foo, list_of_foos);
+ *
+ * @param ptr The list head
+ * @param type Data type of the list element to retrieve
+ * @param member Member name of the struct xorg_list field in the list element.
+ * @return A pointer to the first list element.
+ */
+#define xorg_list_first_entry(ptr, type, member) \
+ xorg_list_entry((ptr)->next, type, member)
+
+/**
+ * Retrieve the last list entry for the given listpointer.
+ *
+ * Example:
+ * struct foo *first;
+ * first = xorg_list_last_entry(&bar->list_of_foos, struct foo, list_of_foos);
+ *
+ * @param ptr The list head
+ * @param type Data type of the list element to retrieve
+ * @param member Member name of the struct xorg_list field in the list element.
+ * @return A pointer to the last list element.
+ */
+#define xorg_list_last_entry(ptr, type, member) \
+ xorg_list_entry((ptr)->prev, type, member)
+
+#ifdef HAVE_TYPEOF
+#define __container_of(ptr, sample, member) \
+ container_of(ptr, typeof(*sample), member)
+#else
+/* This implementation of __container_of has undefined behavior according
+ * to the C standard, but it works in many cases. If your compiler doesn't
+ * support typeof() and fails with this implementation, please try a newer
+ * compiler.
+ */
+#define __container_of(ptr, sample, member) \
+ (void *)((char *)(ptr) \
+ - ((char *)&(sample)->member - (char *)(sample)))
+#endif
+
+/**
+ * Loop through the list given by head and set pos to struct in the list.
+ *
+ * Example:
+ * struct foo *iterator;
+ * xorg_list_for_each_entry(iterator, &bar->list_of_foos, entry) {
+ * [modify iterator]
+ * }
+ *
+ * This macro is not safe for node deletion. Use xorg_list_for_each_entry_safe
+ * instead.
+ *
+ * @param pos Iterator variable of the type of the list elements.
+ * @param head List head
+ * @param member Member name of the struct xorg_list in the list elements.
+ *
+ */
+#define xorg_list_for_each_entry(pos, head, member) \
+ for (pos = __container_of((head)->next, pos, member); \
+ &pos->member != (head); \
+ pos = __container_of(pos->member.next, pos, member))
+
+/**
+ * Loop through the list, keeping a backup pointer to the element. This
+ * macro allows for the deletion of a list element while looping through the
+ * list.
+ *
+ * See xorg_list_for_each_entry for more details.
+ */
+#define xorg_list_for_each_entry_safe(pos, tmp, head, member) \
+ for (pos = __container_of((head)->next, pos, member), \
+ tmp = __container_of(pos->member.next, pos, member); \
+ &pos->member != (head); \
+ pos = tmp, tmp = __container_of(pos->member.next, tmp, member))
+
+/* NULL-Terminated List Interface
+ *
+ * The interface below does _not_ use the struct xorg_list as described above.
+ * It is mainly for legacy structures that cannot easily be switched to
+ * struct xorg_list.
+ *
+ * This interface is for structs like
+ * struct foo {
+ * [...]
+ * struct foo *next;
+ * [...]
+ * };
+ *
+ * The position and field name of "next" are arbitrary.
+ */
+
+/**
+ * Init the element as null-terminated list.
+ *
+ * Example:
+ * struct foo *list = malloc();
+ * nt_list_init(list, next);
+ *
+ * @param list The list element that will be the start of the list
+ * @param member Member name of the field pointing to next struct
+ */
+#define nt_list_init(_list, _member) \
+ (_list)->_member = NULL
+
+/**
+ * Returns the next element in the list or NULL on termination.
+ *
+ * Example:
+ * struct foo *element = list;
+ * while ((element = nt_list_next(element, next)) { }
+ *
+ * This macro is not safe for node deletion. Use nt_list_for_each_entry_safe
+ * instead.
+ *
+ * @param list The list or current element.
+ * @param member Member name of the field pointing to next struct.
+ */
+#define nt_list_next(_list, _member) \
+ (_list)->_member
+
+/**
+ * Iterate through each element in the list.
+ *
+ * Example:
+ * struct foo *iterator;
+ * nt_list_for_each_entry(iterator, list, next) {
+ * [modify iterator]
+ * }
+ *
+ * @param entry Assigned to the current list element
+ * @param list The list to iterate through.
+ * @param member Member name of the field pointing to next struct.
+ */
+#define nt_list_for_each_entry(_entry, _list, _member) \
+ for (_entry = _list; _entry; _entry = (_entry)->_member)
+
+/**
+ * Iterate through each element in the list, keeping a backup pointer to the
+ * element. This macro allows for the deletion of a list element while
+ * looping through the list.
+ *
+ * See nt_list_for_each_entry for more details.
+ *
+ * @param entry Assigned to the current list element
+ * @param tmp The pointer to the next element
+ * @param list The list to iterate through.
+ * @param member Member name of the field pointing to next struct.
+ */
+#define nt_list_for_each_entry_safe(_entry, _tmp, _list, _member) \
+ for (_entry = _list, _tmp = (_entry) ? (_entry)->_member : NULL;\
+ _entry; \
+ _entry = _tmp, _tmp = (_tmp) ? (_tmp)->_member: NULL)
+
+/**
+ * Append the element to the end of the list. This macro may be used to
+ * merge two lists.
+ *
+ * Example:
+ * struct foo *elem = malloc(...);
+ * nt_list_init(elem, next)
+ * nt_list_append(elem, list, struct foo, next);
+ *
+ * Resulting list order:
+ * list_item_0 -> list_item_1 -> ... -> elem_item_0 -> elem_item_1 ...
+ *
+ * @param entry An entry (or list) to append to the list
+ * @param list The list to append to. This list must be a valid list, not
+ * NULL.
+ * @param type The list type
+ * @param member Member name of the field pointing to next struct
+ */
+#define nt_list_append(_entry, _list, _type, _member) \
+ do { \
+ _type *__iterator = _list; \
+ while (__iterator->_member) { __iterator = __iterator->_member;}\
+ __iterator->_member = _entry; \
+ } while (0)
+
+/**
+ * Insert the element at the next position in the list. This macro may be
+ * used to insert a list into a list.
+ *
+ * struct foo *elem = malloc(...);
+ * nt_list_init(elem, next)
+ * nt_list_insert(elem, list, struct foo, next);
+ *
+ * Resulting list order:
+ * list_item_0 -> elem_item_0 -> elem_item_1 ... -> list_item_1 -> ...
+ *
+ * @param entry An entry (or list) to append to the list
+ * @param list The list to insert to. This list must be a valid list, not
+ * NULL.
+ * @param type The list type
+ * @param member Member name of the field pointing to next struct
+ */
+#define nt_list_insert(_entry, _list, _type, _member) \
+ do { \
+ nt_list_append((_list)->_member, _entry, _type, _member); \
+ (_list)->_member = _entry; \
+ } while (0)
+
+/**
+ * Delete the entry from the list by iterating through the list and
+ * removing any reference from the list to the entry.
+ *
+ * Example:
+ * struct foo *elem = <assign to right element>
+ * nt_list_del(elem, list, struct foo, next);
+ *
+ * @param entry The entry to delete from the list. entry is always
+ * re-initialized as a null-terminated list.
+ * @param list The list containing the entry, set to the new list without
+ * the removed entry.
+ * @param type The list type
+ * @param member Member name of the field pointing to the next entry
+ */
+#define nt_list_del(_entry, _list, _type, _member) \
+ do { \
+ _type *__e = _entry; \
+ if (__e == NULL || _list == NULL) break; \
+ if ((_list) == __e) { \
+ _list = __e->_member; \
+ } else { \
+ _type *__prev = _list; \
+ while (__prev->_member && __prev->_member != __e) \
+ __prev = nt_list_next(__prev, _member); \
+ if (__prev->_member) \
+ __prev->_member = __e->_member; \
+ } \
+ nt_list_init(__e, _member); \
+ } while(0)
+
+/**
+ * DO NOT USE THIS.
+ * This is a remainder of the xfree86 DDX attempt of having a set of generic
+ * list functions. Unfortunately, the xf86OptionRec uses it and we can't
+ * easily get rid of it. Do not use for new code.
+ */
+typedef struct generic_list_rec {
+ void *next;
+} GenericListRec, *GenericListPtr, *glp;
+
+#endif
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/mi.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/mi.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/mi.h (working copy)
@@ -0,0 +1,540 @@
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef MI_H
+#define MI_H
+#include <X11/X.h>
+#include "region.h"
+#include "validate.h"
+#include "window.h"
+#include "gc.h"
+#include <X11/fonts/font.h>
+#include "input.h"
+#include "cursor.h"
+#include "privates.h"
+#include "colormap.h"
+#include "events.h"
+
+#define MiBits CARD32
+
+typedef struct _miDash *miDashPtr;
+
+#define EVEN_DASH 0
+#define ODD_DASH ~0
+
+/* miarc.c */
+
+extern _X_EXPORT void miPolyArc(DrawablePtr /*pDraw */ ,
+ GCPtr /*pGC */ ,
+ int /*narcs */ ,
+ xArc * /*parcs */
+ );
+
+/* mibitblt.c */
+
+extern _X_EXPORT RegionPtr miCopyArea(DrawablePtr /*pSrcDrawable */ ,
+ DrawablePtr /*pDstDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*xIn */ ,
+ int /*yIn */ ,
+ int /*widthSrc */ ,
+ int /*heightSrc */ ,
+ int /*xOut */ ,
+ int /*yOut */
+ );
+
+extern _X_EXPORT RegionPtr miCopyPlane(DrawablePtr /*pSrcDrawable */ ,
+ DrawablePtr /*pDstDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*srcx */ ,
+ int /*srcy */ ,
+ int /*width */ ,
+ int /*height */ ,
+ int /*dstx */ ,
+ int /*dsty */ ,
+ unsigned long /*bitPlane */
+ );
+
+extern _X_EXPORT void miGetImage(DrawablePtr /*pDraw */ ,
+ int /*sx */ ,
+ int /*sy */ ,
+ int /*w */ ,
+ int /*h */ ,
+ unsigned int /*format */ ,
+ unsigned long /*planeMask */ ,
+ char * /*pdstLine */
+ );
+
+extern _X_EXPORT void miPutImage(DrawablePtr /*pDraw */ ,
+ GCPtr /*pGC */ ,
+ int /*depth */ ,
+ int /*x */ ,
+ int /*y */ ,
+ int /*w */ ,
+ int /*h */ ,
+ int /*leftPad */ ,
+ int /*format */ ,
+ char * /*pImage */
+ );
+
+/* micopy.c */
+
+#define miGetCompositeClip(pGC) ((pGC)->pCompositeClip)
+
+typedef void (*miCopyProc) (DrawablePtr pSrcDrawable,
+ DrawablePtr pDstDrawable,
+ GCPtr pGC,
+ BoxPtr pDstBox,
+ int nbox,
+ int dx,
+ int dy,
+ Bool reverse,
+ Bool upsidedown, Pixel bitplane, void *closure);
+
+extern _X_EXPORT void
+
+miCopyRegion(DrawablePtr pSrcDrawable,
+ DrawablePtr pDstDrawable,
+ GCPtr pGC,
+ RegionPtr pDstRegion,
+ int dx,
+ int dy, miCopyProc copyProc, Pixel bitPlane, void *closure);
+
+extern _X_EXPORT RegionPtr
+
+miDoCopy(DrawablePtr pSrcDrawable,
+ DrawablePtr pDstDrawable,
+ GCPtr pGC,
+ int xIn,
+ int yIn,
+ int widthSrc,
+ int heightSrc,
+ int xOut,
+ int yOut, miCopyProc copyProc, Pixel bitplane, void *closure);
+
+/* micursor.c */
+
+extern _X_EXPORT void miRecolorCursor(DeviceIntPtr /* pDev */ ,
+ ScreenPtr /*pScr */ ,
+ CursorPtr /*pCurs */ ,
+ Bool /*displayed */
+ );
+
+/* midash.c */
+
+extern _X_EXPORT void miStepDash(int /*dist */ ,
+ int * /*pDashIndex */ ,
+ unsigned char * /*pDash */ ,
+ int /*numInDashList */ ,
+ int * /*pDashOffset */
+ );
+
+/* mieq.c */
+
+#ifndef INPUT_H
+typedef struct _DeviceRec *DevicePtr;
+#endif
+
+extern _X_EXPORT Bool mieqInit(void
+ );
+
+extern _X_EXPORT void mieqFini(void);
+
+extern _X_EXPORT void mieqEnqueue(DeviceIntPtr /*pDev */ ,
+ InternalEvent * /*e */
+ );
+
+extern _X_EXPORT void mieqSwitchScreen(DeviceIntPtr /* pDev */ ,
+ ScreenPtr /*pScreen */ ,
+ Bool /*set_dequeue_screen */
+ );
+
+extern _X_EXPORT void mieqProcessDeviceEvent(DeviceIntPtr /* dev */ ,
+ InternalEvent * /* event */ ,
+ ScreenPtr /* screen */
+ );
+
+extern _X_EXPORT void mieqProcessInputEvents(void
+ );
+
+extern DeviceIntPtr CopyGetMasterEvent(DeviceIntPtr /* sdev */ ,
+ InternalEvent * /* original */ ,
+ InternalEvent * /* copy */
+ );
+
+/**
+ * Custom input event handler. If you need to process input events in some
+ * other way than the default path, register an input event handler for the
+ * given internal event type.
+ */
+typedef void (*mieqHandler) (int screen, InternalEvent *event,
+ DeviceIntPtr dev);
+void _X_EXPORT mieqSetHandler(int event, mieqHandler handler);
+
+/* miexpose.c */
+
+extern _X_EXPORT RegionPtr miHandleExposures(DrawablePtr /*pSrcDrawable */ ,
+ DrawablePtr /*pDstDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*srcx */ ,
+ int /*srcy */ ,
+ int /*width */ ,
+ int /*height */ ,
+ int /*dstx */ ,
+ int /*dsty */ ,
+ unsigned long /*plane */
+ );
+
+extern _X_EXPORT void miSendGraphicsExpose(ClientPtr /*client */ ,
+ RegionPtr /*pRgn */ ,
+ XID /*drawable */ ,
+ int /*major */ ,
+ int /*minor */
+ );
+
+extern _X_EXPORT void miSendExposures(WindowPtr /*pWin */ ,
+ RegionPtr /*pRgn */ ,
+ int /*dx */ ,
+ int /*dy */
+ );
+
+extern _X_EXPORT void miWindowExposures(WindowPtr /*pWin */ ,
+ RegionPtr /*prgn */ ,
+ RegionPtr /*other_exposed */
+ );
+
+extern _X_EXPORT void miPaintWindow(WindowPtr /*pWin */ ,
+ RegionPtr /*prgn */ ,
+ int /*what */
+ );
+
+extern _X_EXPORT void miClearDrawable(DrawablePtr /*pDraw */ ,
+ GCPtr /*pGC */
+ );
+
+/* mifillrct.c */
+
+extern _X_EXPORT void miPolyFillRect(DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*nrectFill */ ,
+ xRectangle * /*prectInit */
+ );
+
+/* miglblt.c */
+
+extern _X_EXPORT void miPolyGlyphBlt(DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*x */ ,
+ int /*y */ ,
+ unsigned int /*nglyph */ ,
+ CharInfoPtr * /*ppci */ ,
+ void */*pglyphBase */
+ );
+
+extern _X_EXPORT void miImageGlyphBlt(DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*x */ ,
+ int /*y */ ,
+ unsigned int /*nglyph */ ,
+ CharInfoPtr * /*ppci */ ,
+ void */*pglyphBase */
+ );
+
+/* mipoly.c */
+
+extern _X_EXPORT void miFillPolygon(DrawablePtr /*dst */ ,
+ GCPtr /*pgc */ ,
+ int /*shape */ ,
+ int /*mode */ ,
+ int /*count */ ,
+ DDXPointPtr /*pPts */
+ );
+
+/* mipolycon.c */
+
+extern _X_EXPORT Bool miFillConvexPoly(DrawablePtr /*dst */ ,
+ GCPtr /*pgc */ ,
+ int /*count */ ,
+ DDXPointPtr /*ptsIn */
+ );
+
+/* mipolygen.c */
+
+extern _X_EXPORT Bool miFillGeneralPoly(DrawablePtr /*dst */ ,
+ GCPtr /*pgc */ ,
+ int /*count */ ,
+ DDXPointPtr /*ptsIn */
+ );
+
+/* mipolypnt.c */
+
+extern _X_EXPORT void miPolyPoint(DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*mode */ ,
+ int /*npt */ ,
+ xPoint * /*pptInit */
+ );
+
+/* mipolyrect.c */
+
+extern _X_EXPORT void miPolyRectangle(DrawablePtr /*pDraw */ ,
+ GCPtr /*pGC */ ,
+ int /*nrects */ ,
+ xRectangle * /*pRects */
+ );
+
+/* mipolyseg.c */
+
+extern _X_EXPORT void miPolySegment(DrawablePtr /*pDraw */ ,
+ GCPtr /*pGC */ ,
+ int /*nseg */ ,
+ xSegment * /*pSegs */
+ );
+
+/* mipolytext.c */
+
+extern _X_EXPORT int miPolyText8(DrawablePtr /*pDraw */ ,
+ GCPtr /*pGC */ ,
+ int /*x */ ,
+ int /*y */ ,
+ int /*count */ ,
+ char * /*chars */
+ );
+
+extern _X_EXPORT int miPolyText16(DrawablePtr /*pDraw */ ,
+ GCPtr /*pGC */ ,
+ int /*x */ ,
+ int /*y */ ,
+ int /*count */ ,
+ unsigned short * /*chars */
+ );
+
+extern _X_EXPORT void miImageText8(DrawablePtr /*pDraw */ ,
+ GCPtr /*pGC */ ,
+ int /*x */ ,
+ int /*y */ ,
+ int /*count */ ,
+ char * /*chars */
+ );
+
+extern _X_EXPORT void miImageText16(DrawablePtr /*pDraw */ ,
+ GCPtr /*pGC */ ,
+ int /*x */ ,
+ int /*y */ ,
+ int /*count */ ,
+ unsigned short * /*chars */
+ );
+
+/* mipushpxl.c */
+
+extern _X_EXPORT void miPushPixels(GCPtr /*pGC */ ,
+ PixmapPtr /*pBitMap */ ,
+ DrawablePtr /*pDrawable */ ,
+ int /*dx */ ,
+ int /*dy */ ,
+ int /*xOrg */ ,
+ int /*yOrg */
+ );
+
+/* miscrinit.c */
+
+extern _X_EXPORT Bool miModifyPixmapHeader(PixmapPtr /*pPixmap */ ,
+ int /*width */ ,
+ int /*height */ ,
+ int /*depth */ ,
+ int /*bitsPerPixel */ ,
+ int /*devKind */ ,
+ void */*pPixData */
+ );
+
+extern _X_EXPORT Bool miCreateScreenResources(ScreenPtr /*pScreen */
+ );
+
+extern _X_EXPORT Bool miScreenDevPrivateInit(ScreenPtr /*pScreen */ ,
+ int /*width */ ,
+ void */*pbits */
+ );
+
+extern _X_EXPORT Bool miScreenInit(ScreenPtr /*pScreen */ ,
+ void */*pbits */ ,
+ int /*xsize */ ,
+ int /*ysize */ ,
+ int /*dpix */ ,
+ int /*dpiy */ ,
+ int /*width */ ,
+ int /*rootDepth */ ,
+ int /*numDepths */ ,
+ DepthPtr /*depths */ ,
+ VisualID /*rootVisual */ ,
+ int /*numVisuals */ ,
+ VisualPtr /*visuals */
+ );
+
+/* mivaltree.c */
+
+extern _X_EXPORT int miShapedWindowIn(RegionPtr /*universe */ ,
+ RegionPtr /*bounding */ ,
+ BoxPtr /*rect */ ,
+ int /*x */ ,
+ int /*y */
+ );
+
+typedef void
+ (*SetRedirectBorderClipProcPtr) (WindowPtr pWindow, RegionPtr pRegion);
+
+typedef RegionPtr
+ (*GetRedirectBorderClipProcPtr) (WindowPtr pWindow);
+
+extern _X_EXPORT void
+
+miRegisterRedirectBorderClipProc(SetRedirectBorderClipProcPtr setBorderClip,
+ GetRedirectBorderClipProcPtr getBorderClip);
+
+extern _X_EXPORT int miValidateTree(WindowPtr /*pParent */ ,
+ WindowPtr /*pChild */ ,
+ VTKind /*kind */
+ );
+
+extern _X_EXPORT void miWideLine(DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*mode */ ,
+ int /*npt */ ,
+ DDXPointPtr /*pPts */
+ );
+
+extern _X_EXPORT void miWideDash(DrawablePtr /*pDrawable */ ,
+ GCPtr /*pGC */ ,
+ int /*mode */ ,
+ int /*npt */ ,
+ DDXPointPtr /*pPts */
+ );
+
+/* miwindow.c */
+
+extern _X_EXPORT void miClearToBackground(WindowPtr /*pWin */ ,
+ int /*x */ ,
+ int /*y */ ,
+ int /*w */ ,
+ int /*h */ ,
+ Bool /*generateExposures */
+ );
+
+extern _X_EXPORT void miMarkWindow(WindowPtr /*pWin */
+ );
+
+extern _X_EXPORT Bool miMarkOverlappedWindows(WindowPtr /*pWin */ ,
+ WindowPtr /*pFirst */ ,
+ WindowPtr * /*ppLayerWin */
+ );
+
+extern _X_EXPORT void miHandleValidateExposures(WindowPtr /*pWin */
+ );
+
+extern _X_EXPORT void miMoveWindow(WindowPtr /*pWin */ ,
+ int /*x */ ,
+ int /*y */ ,
+ WindowPtr /*pNextSib */ ,
+ VTKind /*kind */
+ );
+
+extern _X_EXPORT void miSlideAndSizeWindow(WindowPtr /*pWin */ ,
+ int /*x */ ,
+ int /*y */ ,
+ unsigned int /*w */ ,
+ unsigned int /*h */ ,
+ WindowPtr /*pSib */
+ );
+
+extern _X_EXPORT WindowPtr miGetLayerWindow(WindowPtr /*pWin */
+ );
+
+extern _X_EXPORT void miSetShape(WindowPtr /*pWin */ ,
+ int /*kind */
+ );
+
+extern _X_EXPORT void miChangeBorderWidth(WindowPtr /*pWin */ ,
+ unsigned int /*width */
+ );
+
+extern _X_EXPORT void miMarkUnrealizedWindow(WindowPtr /*pChild */ ,
+ WindowPtr /*pWin */ ,
+ Bool /*fromConfigure */
+ );
+
+extern _X_EXPORT void miSegregateChildren(WindowPtr pWin, RegionPtr pReg,
+ int depth);
+
+/* mizerarc.c */
+
+extern _X_EXPORT void miZeroPolyArc(DrawablePtr /*pDraw */ ,
+ GCPtr /*pGC */ ,
+ int /*narcs */ ,
+ xArc * /*parcs */
+ );
+
+/* mizerline.c */
+
+extern _X_EXPORT void miZeroLine(DrawablePtr /*dst */ ,
+ GCPtr /*pgc */ ,
+ int /*mode */ ,
+ int /*nptInit */ ,
+ DDXPointRec * /*pptInit */
+ );
+
+extern _X_EXPORT void miZeroDashLine(DrawablePtr /*dst */ ,
+ GCPtr /*pgc */ ,
+ int /*mode */ ,
+ int /*nptInit */ ,
+ DDXPointRec * /*pptInit */
+ );
+
+extern _X_EXPORT void miPolyFillArc(DrawablePtr /*pDraw */ ,
+ GCPtr /*pGC */ ,
+ int /*narcs */ ,
+ xArc * /*parcs */
+ );
+
+#endif /* MI_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/micmap.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/micmap.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/micmap.h (working copy)
@@ -0,0 +1,67 @@
+
+#include "colormapst.h"
+
+#ifndef _MICMAP_H_
+#define _MICMAP_H_
+
+#define GetInstalledmiColormap(s) \
+ ((ColormapPtr) dixLookupPrivate(&(s)->devPrivates, micmapScrPrivateKey))
+#define SetInstalledmiColormap(s,c) \
+ (dixSetPrivate(&(s)->devPrivates, micmapScrPrivateKey, c))
+
+extern _X_EXPORT DevPrivateKeyRec micmapScrPrivateKeyRec;
+
+#define micmapScrPrivateKey (&micmapScrPrivateKeyRec)
+
+typedef Bool (*miInitVisualsProcPtr) (VisualPtr *, DepthPtr *, int *, int *,
+ int *, VisualID *, unsigned long, int,
+ int);
+
+extern _X_EXPORT int miListInstalledColormaps(ScreenPtr pScreen,
+ Colormap * pmaps);
+extern _X_EXPORT void miInstallColormap(ColormapPtr pmap);
+extern _X_EXPORT void miUninstallColormap(ColormapPtr pmap);
+
+extern _X_EXPORT void miResolveColor(unsigned short *, unsigned short *,
+ unsigned short *, VisualPtr);
+extern _X_EXPORT Bool miInitializeColormap(ColormapPtr);
+extern _X_EXPORT int miExpandDirectColors(ColormapPtr, int, xColorItem *,
+ xColorItem *);
+extern _X_EXPORT Bool miCreateDefColormap(ScreenPtr);
+extern _X_EXPORT void miClearVisualTypes(void);
+extern _X_EXPORT Bool miSetVisualTypes(int, int, int, int);
+extern _X_EXPORT Bool miSetPixmapDepths(void);
+extern _X_EXPORT Bool miSetVisualTypesAndMasks(int depth, int visuals,
+ int bitsPerRGB, int preferredCVC,
+ Pixel redMask, Pixel greenMask,
+ Pixel blueMask);
+extern _X_EXPORT int miGetDefaultVisualMask(int);
+extern _X_EXPORT Bool miInitVisuals(VisualPtr *, DepthPtr *, int *, int *,
+ int *, VisualID *, unsigned long, int, int);
+
+#define MAX_PSEUDO_DEPTH 10
+#define MIN_TRUE_DEPTH 6
+
+#define StaticGrayMask (1 << StaticGray)
+#define GrayScaleMask (1 << GrayScale)
+#define StaticColorMask (1 << StaticColor)
+#define PseudoColorMask (1 << PseudoColor)
+#define TrueColorMask (1 << TrueColor)
+#define DirectColorMask (1 << DirectColor)
+
+#define ALL_VISUALS (StaticGrayMask|\
+ GrayScaleMask|\
+ StaticColorMask|\
+ PseudoColorMask|\
+ TrueColorMask|\
+ DirectColorMask)
+
+#define LARGE_VISUALS (TrueColorMask|\
+ DirectColorMask)
+
+#define SMALL_VISUALS (StaticGrayMask|\
+ GrayScaleMask|\
+ StaticColorMask|\
+ PseudoColorMask)
+
+#endif /* _MICMAP_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/micoord.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/micoord.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/micoord.h (working copy)
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2000 The XFree86 Project, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the XFree86 Project shall
+ * not be used in advertising or otherwise to promote the sale, use or other
+ * dealings in this Software without prior written authorization from the
+ * XFree86 Project.
+ *
+ */
+
+#ifndef _MICOORD_H_
+#define _MICOORD_H_ 1
+
+#include "servermd.h"
+
+/* Macros which handle a coordinate in a single register */
+
+/*
+ * Most compilers will convert divisions by 65536 into shifts, if signed
+ * shifts exist. If your machine does arithmetic shifts and your compiler
+ * can't get it right, add to this line.
+ */
+
+/*
+ * mips compiler - what a joke - it CSEs the 65536 constant into a reg
+ * forcing as to use div instead of shift. Let's be explicit.
+ */
+
+#if defined(mips) || \
+ defined(sparc) || defined(__sparc64__) || \
+ defined(__alpha) || defined(__alpha__) || \
+ defined(__i386__) || defined(__i386) || defined(__ia64__) || \
+ defined(__s390x__) || defined(__s390__) || \
+ defined(__amd64__) || defined(amd64) || defined(__amd64)
+#define GetHighWord(x) (((int) (x)) >> 16)
+#else
+#define GetHighWord(x) (((int) (x)) / 65536)
+#endif
+
+#if IMAGE_BYTE_ORDER == MSBFirst
+#define intToCoord(i,x,y) (((x) = GetHighWord(i)), ((y) = (int) ((short) (i))))
+#define coordToInt(x,y) (((x) << 16) | ((y) & 0xffff))
+#define intToX(i) (GetHighWord(i))
+#define intToY(i) ((int) ((short) i))
+#else
+#define intToCoord(i,x,y) (((x) = (int) ((short) (i))), ((y) = GetHighWord(i)))
+#define coordToInt(x,y) (((y) << 16) | ((x) & 0xffff))
+#define intToX(i) ((int) ((short) (i)))
+#define intToY(i) (GetHighWord(i))
+#endif
+
+#endif /* _MICOORD_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/mifillarc.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/mifillarc.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/mifillarc.h (working copy)
@@ -0,0 +1,187 @@
+/************************************************************
+
+Copyright 1989, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+********************************************************/
+
+#ifndef __MIFILLARC_H__
+#define __MIFILLARC_H__
+
+#define FULLCIRCLE (360 * 64)
+
+typedef struct _miFillArc {
+ int xorg, yorg;
+ int y;
+ int dx, dy;
+ int e;
+ int ym, yk, xm, xk;
+} miFillArcRec;
+
+/* could use 64-bit integers */
+typedef struct _miFillArcD {
+ int xorg, yorg;
+ int y;
+ int dx, dy;
+ double e;
+ double ym, yk, xm, xk;
+} miFillArcDRec;
+
+#define miFillArcEmpty(arc) (!(arc)->angle2 || \
+ !(arc)->width || !(arc)->height || \
+ (((arc)->width == 1) && ((arc)->height & 1)))
+
+#define miCanFillArc(arc) (((arc)->width == (arc)->height) || \
+ (((arc)->width <= 800) && ((arc)->height <= 800)))
+
+#define MIFILLARCSETUP() \
+ x = 0; \
+ y = info.y; \
+ e = info.e; \
+ xk = info.xk; \
+ xm = info.xm; \
+ yk = info.yk; \
+ ym = info.ym; \
+ dx = info.dx; \
+ dy = info.dy; \
+ xorg = info.xorg; \
+ yorg = info.yorg
+
+#define MIFILLARCSTEP(slw) \
+ e += yk; \
+ while (e >= 0) \
+ { \
+ x++; \
+ xk -= xm; \
+ e += xk; \
+ } \
+ y--; \
+ yk -= ym; \
+ slw = (x << 1) + dx; \
+ if ((e == xk) && (slw > 1)) \
+ slw--
+
+#define MIFILLCIRCSTEP(slw) MIFILLARCSTEP(slw)
+#define MIFILLELLSTEP(slw) MIFILLARCSTEP(slw)
+
+#define miFillArcLower(slw) (((y + dy) != 0) && ((slw > 1) || (e != xk)))
+
+typedef struct _miSliceEdge {
+ int x;
+ int stepx;
+ int deltax;
+ int e;
+ int dy;
+ int dx;
+} miSliceEdgeRec, *miSliceEdgePtr;
+
+typedef struct _miArcSlice {
+ miSliceEdgeRec edge1, edge2;
+ int min_top_y, max_top_y;
+ int min_bot_y, max_bot_y;
+ Bool edge1_top, edge2_top;
+ Bool flip_top, flip_bot;
+} miArcSliceRec;
+
+#define MIARCSLICESTEP(edge) \
+ edge.x -= edge.stepx; \
+ edge.e -= edge.dx; \
+ if (edge.e <= 0) \
+ { \
+ edge.x -= edge.deltax; \
+ edge.e += edge.dy; \
+ }
+
+#define miFillSliceUpper(slice) \
+ ((y >= slice.min_top_y) && (y <= slice.max_top_y))
+
+#define miFillSliceLower(slice) \
+ ((y >= slice.min_bot_y) && (y <= slice.max_bot_y))
+
+#define MIARCSLICEUPPER(xl,xr,slice,slw) \
+ xl = xorg - x; \
+ xr = xl + slw - 1; \
+ if (slice.edge1_top && (slice.edge1.x < xr)) \
+ xr = slice.edge1.x; \
+ if (slice.edge2_top && (slice.edge2.x > xl)) \
+ xl = slice.edge2.x;
+
+#define MIARCSLICELOWER(xl,xr,slice,slw) \
+ xl = xorg - x; \
+ xr = xl + slw - 1; \
+ if (!slice.edge1_top && (slice.edge1.x > xl)) \
+ xl = slice.edge1.x; \
+ if (!slice.edge2_top && (slice.edge2.x < xr)) \
+ xr = slice.edge2.x;
+
+#define MIWIDEARCSETUP(x,y,dy,slw,e,xk,xm,yk,ym) \
+ x = 0; \
+ y = slw >> 1; \
+ yk = y << 3; \
+ xm = 8; \
+ ym = 8; \
+ if (dy) \
+ { \
+ xk = 0; \
+ if (slw & 1) \
+ e = -1; \
+ else \
+ e = -(y << 2) - 2; \
+ } \
+ else \
+ { \
+ y++; \
+ yk += 4; \
+ xk = -4; \
+ if (slw & 1) \
+ e = -(y << 2) - 3; \
+ else \
+ e = - (y << 3); \
+ }
+
+#define MIFILLINARCSTEP(slw) \
+ ine += inyk; \
+ while (ine >= 0) \
+ { \
+ inx++; \
+ inxk -= inxm; \
+ ine += inxk; \
+ } \
+ iny--; \
+ inyk -= inym; \
+ slw = (inx << 1) + dx; \
+ if ((ine == inxk) && (slw > 1)) \
+ slw--
+
+#define miFillInArcLower(slw) (((iny + dy) != 0) && \
+ ((slw > 1) || (ine != inxk)))
+
+extern _X_EXPORT void miFillArcSetup(xArc * /*arc */ ,
+ miFillArcRec * /*info */
+ );
+
+extern _X_EXPORT void miFillArcSliceSetup(xArc * /*arc */ ,
+ miArcSliceRec * /*slice */ ,
+ GCPtr /*pGC */
+ );
+
+#endif /* __MIFILLARC_H__ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/mifpoly.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/mifpoly.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/mifpoly.h (working copy)
@@ -0,0 +1,102 @@
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef __MIFPOLY_H__
+#define __MIFPOLY_H__
+
+#include <X11/Xfuncproto.h>
+
+#define EPSILON 0.000001
+#define ISEQUAL(a,b) (fabs((a) - (b)) <= EPSILON)
+#define UNEQUAL(a,b) (fabs((a) - (b)) > EPSILON)
+#define WITHINHALF(a, b) (((a) - (b) > 0.0) ? (a) - (b) < 0.5 : \
+ (b) - (a) <= 0.5)
+#define ROUNDTOINT(x) ((int) (((x) > 0.0) ? ((x) + 0.5) : ((x) - 0.5)))
+#define ISZERO(x) (fabs((x)) <= EPSILON)
+#define PTISEQUAL(a,b) (ISEQUAL(a.x,b.x) && ISEQUAL(a.y,b.y))
+#define PTUNEQUAL(a,b) (UNEQUAL(a.x,b.x) || UNEQUAL(a.y,b.y))
+#define PtEqual(a, b) (((a).x == (b).x) && ((a).y == (b).y))
+
+#define NotEnd 0
+#define FirstEnd 1
+#define SecondEnd 2
+
+#define SQSECANT 108.856472512142 /* 1/sin^2(11/2) - for 11o miter cutoff */
+#define D2SECANT 5.21671526231167 /* 1/2*sin(11/2) - max extension per width */
+
+static _X_INLINE int
+ICEIL(double x)
+{
+ int _cTmp = x;
+
+ return ((x == _cTmp) || (x < 0.0)) ? _cTmp : _cTmp + 1;
+}
+
+/* Point with sub-pixel positioning. In this case we use doubles, but
+ * see mifpolycon.c for other suggestions
+ */
+typedef struct _SppPoint {
+ double x, y;
+} SppPointRec, *SppPointPtr;
+
+typedef struct _SppArc {
+ double x, y, width, height;
+ double angle1, angle2;
+} SppArcRec, *SppArcPtr;
+
+/* mifpolycon.c */
+
+extern _X_EXPORT void miFillSppPoly(DrawablePtr /*dst */ ,
+ GCPtr /*pgc */ ,
+ int /*count */ ,
+ SppPointPtr /*ptsIn */ ,
+ int /*xTrans */ ,
+ int /*yTrans */ ,
+ double /*xFtrans */ ,
+ double /*yFtrans */
+ );
+
+#endif /* __MIFPOLY_H__ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/migc.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/migc.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/migc.h (working copy)
@@ -0,0 +1,49 @@
+/*
+
+Copyright 1993, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+*/
+
+extern _X_EXPORT void miChangeGC(GCPtr pGC,
+ unsigned long mask);
+
+extern _X_EXPORT void miDestroyGC(GCPtr pGC);
+
+extern _X_EXPORT void miDestroyClip(GCPtr pGC);
+
+extern _X_EXPORT void miChangeClip(GCPtr pGC,
+ int type,
+ void *pvalue,
+ int nrects);
+
+extern _X_EXPORT void miCopyClip(GCPtr pgcDst,
+ GCPtr pgcSrc);
+
+extern _X_EXPORT void miCopyGC(GCPtr pGCSrc,
+ unsigned long changes,
+ GCPtr pGCDst);
+
+extern _X_EXPORT void miComputeCompositeClip(GCPtr pGC,
+ DrawablePtr pDrawable);
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/miline.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/miline.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/miline.h (working copy)
@@ -0,0 +1,172 @@
+
+/*
+
+Copyright 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+
+#ifndef MILINE_H
+
+#include "screenint.h"
+#include "privates.h"
+
+/*
+ * Public definitions used for configuring basic pixelization aspects
+ * of the sample implementation line-drawing routines provided in
+ * {mfb,mi,cfb*} at run-time.
+ */
+
+#define XDECREASING 4
+#define YDECREASING 2
+#define YMAJOR 1
+
+#define OCTANT1 (1 << (YDECREASING))
+#define OCTANT2 (1 << (YDECREASING|YMAJOR))
+#define OCTANT3 (1 << (XDECREASING|YDECREASING|YMAJOR))
+#define OCTANT4 (1 << (XDECREASING|YDECREASING))
+#define OCTANT5 (1 << (XDECREASING))
+#define OCTANT6 (1 << (XDECREASING|YMAJOR))
+#define OCTANT7 (1 << (YMAJOR))
+#define OCTANT8 (1 << (0))
+
+#define XMAJOROCTANTS (OCTANT1 | OCTANT4 | OCTANT5 | OCTANT8)
+
+#define DEFAULTZEROLINEBIAS (OCTANT2 | OCTANT3 | OCTANT4 | OCTANT5)
+
+/*
+ * Devices can configure the rendering of routines in mi, mfb, and cfb*
+ * by specifying a thin line bias to be applied to a particular screen
+ * using the following function. The bias parameter is an OR'ing of
+ * the appropriate OCTANT constants defined above to indicate which
+ * octants to bias a line to prefer an axial step when the Bresenham
+ * error term is exactly zero. The octants are mapped as follows:
+ *
+ * \ | /
+ * \ 3 | 2 /
+ * \ | /
+ * 4 \ | / 1
+ * \|/
+ * -----------
+ * /|\
+ * 5 / | \ 8
+ * / | \
+ * / 6 | 7 \
+ * / | \
+ *
+ * For more information, see "Ambiguities in Incremental Line Rastering,"
+ * Jack E. Bresenham, IEEE CG&A, May 1987.
+ */
+
+extern _X_EXPORT void miSetZeroLineBias(ScreenPtr /* pScreen */ ,
+ unsigned int /* bias */
+ );
+
+/*
+ * Private definitions needed for drawing thin (zero width) lines
+ * Used by the mi, mfb, and all cfb* components.
+ */
+
+#define X_AXIS 0
+#define Y_AXIS 1
+
+#define OUT_LEFT 0x08
+#define OUT_RIGHT 0x04
+#define OUT_ABOVE 0x02
+#define OUT_BELOW 0x01
+
+#define OUTCODES(_result, _x, _y, _pbox) \
+ if ( (_x) < (_pbox)->x1) (_result) |= OUT_LEFT; \
+ else if ( (_x) >= (_pbox)->x2) (_result) |= OUT_RIGHT; \
+ if ( (_y) < (_pbox)->y1) (_result) |= OUT_ABOVE; \
+ else if ( (_y) >= (_pbox)->y2) (_result) |= OUT_BELOW;
+
+#define MIOUTCODES(outcode, x, y, xmin, ymin, xmax, ymax) \
+{\
+ if (x < xmin) outcode |= OUT_LEFT;\
+ if (x > xmax) outcode |= OUT_RIGHT;\
+ if (y < ymin) outcode |= OUT_ABOVE;\
+ if (y > ymax) outcode |= OUT_BELOW;\
+}
+
+#define SWAPINT(i, j) \
+{ int _t = i; i = j; j = _t; }
+
+#define SWAPPT(i, j) \
+{ DDXPointRec _t; _t = i; i = j; j = _t; }
+
+#define SWAPINT_PAIR(x1, y1, x2, y2)\
+{ int t = x1; x1 = x2; x2 = t;\
+ t = y1; y1 = y2; y2 = t;\
+}
+
+#define miGetZeroLineBias(_pScreen) ((unsigned long) (unsigned long*)\
+ dixLookupPrivate(&(_pScreen)->devPrivates, miZeroLineScreenKey))
+
+#define CalcLineDeltas(_x1,_y1,_x2,_y2,_adx,_ady,_sx,_sy,_SX,_SY,_octant) \
+ (_octant) = 0; \
+ (_sx) = (_SX); \
+ if (((_adx) = (_x2) - (_x1)) < 0) { \
+ (_adx) = -(_adx); \
+ (_sx = -(_sx)); \
+ (_octant) |= XDECREASING; \
+ } \
+ (_sy) = (_SY); \
+ if (((_ady) = (_y2) - (_y1)) < 0) { \
+ (_ady) = -(_ady); \
+ (_sy = -(_sy)); \
+ (_octant) |= YDECREASING; \
+ }
+
+#define SetYMajorOctant(_octant) ((_octant) |= YMAJOR)
+
+#define FIXUP_ERROR(_e, _octant, _bias) \
+ (_e) -= (((_bias) >> (_octant)) & 1)
+
+#define IsXMajorOctant(_octant) (!((_octant) & YMAJOR))
+#define IsYMajorOctant(_octant) ((_octant) & YMAJOR)
+#define IsXDecreasingOctant(_octant) ((_octant) & XDECREASING)
+#define IsYDecreasingOctant(_octant) ((_octant) & YDECREASING)
+
+extern _X_EXPORT DevPrivateKeyRec miZeroLineScreenKeyRec;
+
+#define miZeroLineScreenKey (&miZeroLineScreenKeyRec)
+
+extern _X_EXPORT int miZeroClipLine(int /*xmin */ ,
+ int /*ymin */ ,
+ int /*xmax */ ,
+ int /*ymax */ ,
+ int * /*new_x1 */ ,
+ int * /*new_y1 */ ,
+ int * /*new_x2 */ ,
+ int * /*new_y2 */ ,
+ unsigned int /*adx */ ,
+ unsigned int /*ady */ ,
+ int * /*pt1_clipped */ ,
+ int * /*pt2_clipped */ ,
+ int /*octant */ ,
+ unsigned int /*bias */ ,
+ int /*oc1 */ ,
+ int /*oc2 */
+ );
+
+#endif /* MILINE_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/mioverlay.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/mioverlay.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/mioverlay.h (working copy)
@@ -0,0 +1,28 @@
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifndef __MIOVERLAY_H
+#define __MIOVERLAY_H
+
+typedef void (*miOverlayTransFunc) (ScreenPtr, int, BoxPtr);
+typedef Bool (*miOverlayInOverlayFunc) (WindowPtr);
+
+extern _X_EXPORT Bool
+
+miInitOverlay(ScreenPtr pScreen,
+ miOverlayInOverlayFunc inOverlay, miOverlayTransFunc trans);
+
+extern _X_EXPORT Bool
+
+miOverlayGetPrivateClips(WindowPtr pWin,
+ RegionPtr *borderClip, RegionPtr *clipList);
+
+extern _X_EXPORT Bool miOverlayCollectUnderlayRegions(WindowPtr, RegionPtr *);
+extern _X_EXPORT void miOverlayComputeCompositeClip(GCPtr, WindowPtr);
+extern _X_EXPORT Bool miOverlayCopyUnderlay(ScreenPtr);
+extern _X_EXPORT void miOverlaySetTransFunction(ScreenPtr, miOverlayTransFunc);
+extern _X_EXPORT void miOverlaySetRootClip(ScreenPtr, Bool);
+
+#endif /* __MIOVERLAY_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/mipict.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/mipict.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/mipict.h (working copy)
@@ -0,0 +1,160 @@
+/*
+ *
+ * Copyright © 2000 SuSE, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of SuSE not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. SuSE makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
+ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Author: Keith Packard, SuSE, Inc.
+ */
+
+#ifndef _MIPICT_H_
+#define _MIPICT_H_
+
+#include "picturestr.h"
+
+#define MI_MAX_INDEXED 256 /* XXX depth must be <= 8 */
+
+#if MI_MAX_INDEXED <= 256
+typedef CARD8 miIndexType;
+#endif
+
+typedef struct _miIndexed {
+ Bool color;
+ CARD32 rgba[MI_MAX_INDEXED];
+ miIndexType ent[32768];
+} miIndexedRec, *miIndexedPtr;
+
+#define miCvtR8G8B8to15(s) ((((s) >> 3) & 0x001f) | \
+ (((s) >> 6) & 0x03e0) | \
+ (((s) >> 9) & 0x7c00))
+#define miIndexToEnt15(mif,rgb15) ((mif)->ent[rgb15])
+#define miIndexToEnt24(mif,rgb24) miIndexToEnt15(mif,miCvtR8G8B8to15(rgb24))
+
+#define miIndexToEntY24(mif,rgb24) ((mif)->ent[CvtR8G8B8toY15(rgb24)])
+
+extern _X_EXPORT int
+ miCreatePicture(PicturePtr pPicture);
+
+extern _X_EXPORT void
+ miDestroyPicture(PicturePtr pPicture);
+
+extern _X_EXPORT void
+ miDestroyPictureClip(PicturePtr pPicture);
+
+extern _X_EXPORT int
+ miChangePictureClip(PicturePtr pPicture, int type, void *value, int n);
+
+extern _X_EXPORT void
+ miChangePicture(PicturePtr pPicture, Mask mask);
+
+extern _X_EXPORT void
+ miValidatePicture(PicturePtr pPicture, Mask mask);
+
+extern _X_EXPORT int
+ miChangePictureTransform(PicturePtr pPicture, PictTransform * transform);
+
+extern _X_EXPORT int
+
+miChangePictureFilter(PicturePtr pPicture,
+ int filter, xFixed * params, int nparams);
+
+extern _X_EXPORT void
+ miCompositeSourceValidate(PicturePtr pPicture);
+
+extern _X_EXPORT Bool
+
+miComputeCompositeRegion(RegionPtr pRegion,
+ PicturePtr pSrc,
+ PicturePtr pMask,
+ PicturePtr pDst,
+ INT16 xSrc,
+ INT16 ySrc,
+ INT16 xMask,
+ INT16 yMask,
+ INT16 xDst, INT16 yDst, CARD16 width, CARD16 height);
+
+extern _X_EXPORT Bool
+ miPictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats);
+
+extern _X_EXPORT Bool
+ miRealizeGlyph(ScreenPtr pScreen, GlyphPtr glyph);
+
+extern _X_EXPORT void
+ miUnrealizeGlyph(ScreenPtr pScreen, GlyphPtr glyph);
+
+extern _X_EXPORT void
+
+miGlyphs(CARD8 op,
+ PicturePtr pSrc,
+ PicturePtr pDst,
+ PictFormatPtr maskFormat,
+ INT16 xSrc,
+ INT16 ySrc, int nlist, GlyphListPtr list, GlyphPtr * glyphs);
+
+extern _X_EXPORT void
+ miRenderColorToPixel(PictFormatPtr pPict, xRenderColor * color, CARD32 *pixel);
+
+extern _X_EXPORT void
+ miRenderPixelToColor(PictFormatPtr pPict, CARD32 pixel, xRenderColor * color);
+
+extern _X_EXPORT Bool
+ miIsSolidAlpha(PicturePtr pSrc);
+
+extern _X_EXPORT void
+
+miCompositeRects(CARD8 op,
+ PicturePtr pDst,
+ xRenderColor * color, int nRect, xRectangle *rects);
+
+extern _X_EXPORT void
+
+miTriStrip(CARD8 op,
+ PicturePtr pSrc,
+ PicturePtr pDst,
+ PictFormatPtr maskFormat,
+ INT16 xSrc, INT16 ySrc, int npoints, xPointFixed * points);
+
+extern _X_EXPORT void
+
+miTriFan(CARD8 op,
+ PicturePtr pSrc,
+ PicturePtr pDst,
+ PictFormatPtr maskFormat,
+ INT16 xSrc, INT16 ySrc, int npoints, xPointFixed * points);
+
+extern _X_EXPORT void
+ miTrapezoidBounds(int ntrap, xTrapezoid * traps, BoxPtr box);
+
+extern _X_EXPORT void
+ miPointFixedBounds(int npoint, xPointFixed * points, BoxPtr bounds);
+
+extern _X_EXPORT void
+ miTriangleBounds(int ntri, xTriangle * tris, BoxPtr bounds);
+
+extern _X_EXPORT Bool
+ miInitIndexed(ScreenPtr pScreen, PictFormatPtr pFormat);
+
+extern _X_EXPORT void
+ miCloseIndexed(ScreenPtr pScreen, PictFormatPtr pFormat);
+
+extern _X_EXPORT void
+
+miUpdateIndexed(ScreenPtr pScreen,
+ PictFormatPtr pFormat, int ndef, xColorItem * pdef);
+
+#endif /* _MIPICT_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/mipointer.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/mipointer.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/mipointer.h (working copy)
@@ -0,0 +1,124 @@
+/*
+
+Copyright 1989, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+*/
+
+#ifndef MIPOINTER_H
+#define MIPOINTER_H
+
+#include "cursor.h"
+#include "input.h"
+#include "privates.h"
+
+typedef struct _miPointerSpriteFuncRec {
+ Bool (*RealizeCursor) (DeviceIntPtr /* pDev */ ,
+ ScreenPtr /* pScr */ ,
+ CursorPtr /* pCurs */
+ );
+ Bool (*UnrealizeCursor) (DeviceIntPtr /* pDev */ ,
+ ScreenPtr /* pScr */ ,
+ CursorPtr /* pCurs */
+ );
+ void (*SetCursor) (DeviceIntPtr /* pDev */ ,
+ ScreenPtr /* pScr */ ,
+ CursorPtr /* pCurs */ ,
+ int /* x */ ,
+ int /* y */
+ );
+ void (*MoveCursor) (DeviceIntPtr /* pDev */ ,
+ ScreenPtr /* pScr */ ,
+ int /* x */ ,
+ int /* y */
+ );
+ Bool (*DeviceCursorInitialize) (DeviceIntPtr /* pDev */ ,
+ ScreenPtr /* pScr */
+ );
+ void (*DeviceCursorCleanup) (DeviceIntPtr /* pDev */ ,
+ ScreenPtr /* pScr */
+ );
+} miPointerSpriteFuncRec, *miPointerSpriteFuncPtr;
+
+typedef struct _miPointerScreenFuncRec {
+ Bool (*CursorOffScreen) (ScreenPtr * /* ppScr */ ,
+ int * /* px */ ,
+ int * /* py */
+ );
+ void (*CrossScreen) (ScreenPtr /* pScr */ ,
+ int /* entering */
+ );
+ void (*WarpCursor) (DeviceIntPtr /*pDev */ ,
+ ScreenPtr /* pScr */ ,
+ int /* x */ ,
+ int /* y */
+ );
+} miPointerScreenFuncRec, *miPointerScreenFuncPtr;
+
+extern _X_EXPORT Bool miDCInitialize(ScreenPtr /*pScreen */ ,
+ miPointerScreenFuncPtr /*screenFuncs */
+ );
+
+extern _X_EXPORT Bool miPointerInitialize(ScreenPtr /*pScreen */ ,
+ miPointerSpriteFuncPtr
+ /*spriteFuncs */ ,
+ miPointerScreenFuncPtr
+ /*screenFuncs */ ,
+ Bool /*waitForUpdate */
+ );
+
+extern _X_EXPORT void miPointerWarpCursor(DeviceIntPtr /*pDev */ ,
+ ScreenPtr /*pScreen */ ,
+ int /*x */ ,
+ int /*y */
+ );
+
+extern _X_EXPORT ScreenPtr
+miPointerGetScreen(DeviceIntPtr pDev);
+extern _X_EXPORT void
+miPointerSetScreen(DeviceIntPtr pDev, int screen_num, int x, int y);
+
+/* Returns the current cursor position. */
+extern _X_EXPORT void
+miPointerGetPosition(DeviceIntPtr pDev, int *x, int *y);
+
+/* Moves the cursor to the specified position. May clip the co-ordinates:
+ * x and y are modified in-place. */
+extern _X_EXPORT ScreenPtr
+miPointerSetPosition(DeviceIntPtr pDev, int mode, double *x, double *y,
+ int *nevents, InternalEvent *events);
+
+extern _X_EXPORT void
+miPointerUpdateSprite(DeviceIntPtr pDev);
+
+/* Sets whether the sprite should be updated immediately on pointer moves */
+extern _X_EXPORT Bool
+miPointerSetWaitForUpdate(ScreenPtr pScreen, Bool wait);
+
+extern _X_EXPORT DevPrivateKeyRec miPointerPrivKeyRec;
+
+#define miPointerPrivKey (&miPointerPrivKeyRec)
+
+extern _X_EXPORT DevPrivateKeyRec miPointerScreenKeyRec;
+
+#define miPointerScreenKey (&miPointerScreenKeyRec)
+
+#endif /* MIPOINTER_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/mipointrst.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/mipointrst.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/mipointrst.h (working copy)
@@ -0,0 +1,56 @@
+/*
+ * mipointrst.h
+ *
+ */
+
+/*
+
+Copyright 1989, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+*/
+
+#ifndef MIPOINTRST_H
+#define MIPOINTRST_H
+
+#include "mipointer.h"
+#include "scrnintstr.h"
+
+typedef struct {
+ ScreenPtr pScreen; /* current screen */
+ ScreenPtr pSpriteScreen; /* screen containing current sprite */
+ CursorPtr pCursor; /* current cursor */
+ CursorPtr pSpriteCursor; /* cursor on screen */
+ BoxRec limits; /* current constraints */
+ Bool confined; /* pointer can't change screens */
+ int x, y; /* hot spot location */
+ int devx, devy; /* sprite position */
+ Bool generateEvent; /* generate an event during warping? */
+} miPointerRec, *miPointerPtr;
+
+typedef struct {
+ miPointerSpriteFuncPtr spriteFuncs; /* sprite-specific methods */
+ miPointerScreenFuncPtr screenFuncs; /* screen-specific methods */
+ CloseScreenProcPtr CloseScreen;
+ Bool waitForUpdate; /* don't move cursor in SIGIO */
+ Bool showTransparent; /* show empty cursors */
+} miPointerScreenRec, *miPointerScreenPtr;
+#endif /* MIPOINTRST_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/misc.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/misc.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/misc.h (working copy)
@@ -0,0 +1,447 @@
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+Copyright 1992, 1993 Data General Corporation;
+Copyright 1992, 1993 OMRON Corporation
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that the
+above copyright notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting documentation, and that
+neither the name OMRON or DATA GENERAL be used in advertising or publicity
+pertaining to distribution of the software without specific, written prior
+permission of the party whose name is to be used. Neither OMRON or
+DATA GENERAL make any representation about the suitability of this software
+for any purpose. It is provided "as is" without express or implied warranty.
+
+OMRON AND DATA GENERAL EACH DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
+IN NO EVENT SHALL OMRON OR DATA GENERAL BE LIABLE FOR ANY SPECIAL, INDIRECT
+OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+OF THIS SOFTWARE.
+
+******************************************************************/
+#ifndef MISC_H
+#define MISC_H 1
+/*
+ * X internal definitions
+ *
+ */
+
+#include <X11/Xosdefs.h>
+#include <X11/Xfuncproto.h>
+#include <X11/Xmd.h>
+#include <X11/X.h>
+#include <X11/Xdefs.h>
+
+#include <stddef.h>
+#include <stdint.h>
+
+#ifndef MAXSCREENS
+#define MAXSCREENS 16
+#endif
+#ifndef MAXGPUSCREENS
+#define MAXGPUSCREENS 16
+#endif
+#define MAXCLIENTS 256
+#define MAXEXTENSIONS 128
+#define MAXFORMATS 8
+#define MAXDEVICES 40 /* input devices */
+#define GPU_SCREEN_OFFSET 256
+
+/* 128 event opcodes for core + extension events, excluding GE */
+#define MAXEVENTS 128
+#define EXTENSION_EVENT_BASE 64
+#define EXTENSION_BASE 128
+
+typedef uint32_t ATOM;
+
+#ifndef TRUE
+#define TRUE 1
+#define FALSE 0
+#endif
+
+#ifndef _XTYPEDEF_CALLBACKLISTPTR
+typedef struct _CallbackList *CallbackListPtr; /* also in dix.h */
+
+#define _XTYPEDEF_CALLBACKLISTPTR
+#endif
+
+typedef struct _xReq *xReqPtr;
+
+#include "os.h" /* for ALLOCATE_LOCAL and DEALLOCATE_LOCAL */
+#include <X11/Xfuncs.h> /* for bcopy, bzero, and bcmp */
+
+#define NullBox ((BoxPtr)0)
+#define MILLI_PER_MIN (1000 * 60)
+#define MILLI_PER_SECOND (1000)
+
+ /* this next is used with None and ParentRelative to tell
+ PaintWin() what to use to paint the background. Also used
+ in the macro IS_VALID_PIXMAP */
+
+#define USE_BACKGROUND_PIXEL 3
+#define USE_BORDER_PIXEL 3
+
+/* byte swap a 32-bit literal */
+static inline uint32_t
+lswapl(uint32_t x)
+{
+ return ((x & 0xff) << 24) |
+ ((x & 0xff00) << 8) | ((x & 0xff0000) >> 8) | ((x >> 24) & 0xff);
+}
+
+/* byte swap a 16-bit literal */
+static inline uint16_t
+lswaps(uint16_t x)
+{
+ return ((x & 0xff) << 8) | ((x >> 8) & 0xff);
+}
+
+#undef min
+#undef max
+
+#define min(a, b) (((a) < (b)) ? (a) : (b))
+#define max(a, b) (((a) > (b)) ? (a) : (b))
+/* abs() is a function, not a macro; include the file declaring
+ * it in case we haven't done that yet.
+ */
+#include <stdlib.h>
+#define sign(x) ((x) < 0 ? -1 : ((x) > 0 ? 1 : 0))
+/* this assumes b > 0 */
+#define modulus(a, b, d) if (((d) = (a) % (b)) < 0) (d) += (b)
+/*
+ * return the least significant bit in x which is set
+ *
+ * This works on 1's complement and 2's complement machines.
+ * If you care about the extra instruction on 2's complement
+ * machines, change to ((x) & (-(x)))
+ */
+#define lowbit(x) ((x) & (~(x) + 1))
+
+/* XXX Not for modules */
+#include <limits.h>
+#if !defined(MAXSHORT) || !defined(MINSHORT) || \
+ !defined(MAXINT) || !defined(MININT)
+/*
+ * Some implementations #define these through <math.h>, so preclude
+ * #include'ing it later.
+ */
+
+#include <math.h>
+#undef MAXSHORT
+#define MAXSHORT SHRT_MAX
+#undef MINSHORT
+#define MINSHORT SHRT_MIN
+#undef MAXINT
+#define MAXINT INT_MAX
+#undef MININT
+#define MININT INT_MIN
+
+#include <assert.h>
+#include <ctype.h>
+#include <stdio.h> /* for fopen, etc... */
+
+#endif
+
+#ifndef PATH_MAX
+#include <sys/param.h>
+#ifndef PATH_MAX
+#ifdef MAXPATHLEN
+#define PATH_MAX MAXPATHLEN
+#else
+#define PATH_MAX 1024
+#endif
+#endif
+#endif
+
+/**
+ * Calculate the number of bytes needed to hold bits.
+ * @param bits The minimum number of bits needed.
+ * @return The number of bytes needed to hold bits.
+ */
+static inline int
+bits_to_bytes(const int bits)
+{
+ return ((bits + 7) >> 3);
+}
+
+/**
+ * Calculate the number of 4-byte units needed to hold the given number of
+ * bytes.
+ * @param bytes The minimum number of bytes needed.
+ * @return The number of 4-byte units needed to hold bytes.
+ */
+static inline int
+bytes_to_int32(const int bytes)
+{
+ return (((bytes) + 3) >> 2);
+}
+
+/**
+ * Calculate the number of bytes (in multiples of 4) needed to hold bytes.
+ * @param bytes The minimum number of bytes needed.
+ * @return The closest multiple of 4 that is equal or higher than bytes.
+ */
+static inline int
+pad_to_int32(const int bytes)
+{
+ return (((bytes) + 3) & ~3);
+}
+
+/**
+ * Calculate padding needed to bring the number of bytes to an even
+ * multiple of 4.
+ * @param bytes The minimum number of bytes needed.
+ * @return The bytes of padding needed to arrive at the closest multiple of 4
+ * that is equal or higher than bytes.
+ */
+static inline int
+padding_for_int32(const int bytes)
+{
+ return ((-bytes) & 3);
+}
+
+
+extern char **xstrtokenize(const char *str, const char *separators);
+extern void FormatInt64(int64_t num, char *string);
+extern void FormatUInt64(uint64_t num, char *string);
+extern void FormatUInt64Hex(uint64_t num, char *string);
+extern void FormatDouble(double dbl, char *string);
+
+/**
+ * Compare the two version numbers comprising of major.minor.
+ *
+ * @return A value less than 0 if a is less than b, 0 if a is equal to b,
+ * or a value greater than 0
+ */
+static inline int
+version_compare(uint16_t a_major, uint16_t a_minor,
+ uint16_t b_major, uint16_t b_minor)
+{
+ int a, b;
+
+ a = a_major << 16 | a_minor;
+ b = b_major << 16 | b_minor;
+
+ return (a - b);
+}
+
+/* some macros to help swap requests, replies, and events */
+
+#define LengthRestB(stuff) \
+ ((client->req_len << 2) - sizeof(*stuff))
+
+#define LengthRestS(stuff) \
+ ((client->req_len << 1) - (sizeof(*stuff) >> 1))
+
+#define LengthRestL(stuff) \
+ (client->req_len - (sizeof(*stuff) >> 2))
+
+#define SwapRestS(stuff) \
+ SwapShorts((short *)(stuff + 1), LengthRestS(stuff))
+
+#define SwapRestL(stuff) \
+ SwapLongs((CARD32 *)(stuff + 1), LengthRestL(stuff))
+
+#if defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
+void __attribute__ ((error("wrong sized variable passed to swap")))
+wrong_size(void);
+#else
+static inline void
+wrong_size(void)
+{
+}
+#endif
+
+#if !(defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)))
+static inline int
+__builtin_constant_p(int x)
+{
+ return 0;
+}
+#endif
+
+/* byte swap a 64-bit value */
+static inline void
+swap_uint64(uint64_t *x)
+{
+ char n;
+
+ n = ((char *) x)[0];
+ ((char *) x)[0] = ((char *) x)[7];
+ ((char *) x)[7] = n;
+
+ n = ((char *) x)[1];
+ ((char *) x)[1] = ((char *) x)[6];
+ ((char *) x)[6] = n;
+
+ n = ((char *) x)[2];
+ ((char *) x)[2] = ((char *) x)[5];
+ ((char *) x)[5] = n;
+
+ n = ((char *) x)[3];
+ ((char *) x)[3] = ((char *) x)[4];
+ ((char *) x)[4] = n;
+}
+
+#define swapll(x) do { \
+ if (sizeof(*(x)) != 8) \
+ wrong_size(); \
+ swap_uint64((uint64_t *)(x)); \
+ } while (0)
+
+/* byte swap a 32-bit value */
+static inline void
+swap_uint32(uint32_t * x)
+{
+ char n = ((char *) x)[0];
+
+ ((char *) x)[0] = ((char *) x)[3];
+ ((char *) x)[3] = n;
+ n = ((char *) x)[1];
+ ((char *) x)[1] = ((char *) x)[2];
+ ((char *) x)[2] = n;
+}
+
+#define swapl(x) do { \
+ if (sizeof(*(x)) != 4) \
+ wrong_size(); \
+ if (__builtin_constant_p((uintptr_t)(x) & 3) && ((uintptr_t)(x) & 3) == 0) \
+ *(x) = lswapl(*(x)); \
+ else \
+ swap_uint32((uint32_t *)(x)); \
+ } while (0)
+
+/* byte swap a 16-bit value */
+static inline void
+swap_uint16(uint16_t * x)
+{
+ char n = ((char *) x)[0];
+
+ ((char *) x)[0] = ((char *) x)[1];
+ ((char *) x)[1] = n;
+}
+
+#define swaps(x) do { \
+ if (sizeof(*(x)) != 2) \
+ wrong_size(); \
+ if (__builtin_constant_p((uintptr_t)(x) & 1) && ((uintptr_t)(x) & 1) == 0) \
+ *(x) = lswaps(*(x)); \
+ else \
+ swap_uint16((uint16_t *)(x)); \
+ } while (0)
+
+/* copy 32-bit value from src to dst byteswapping on the way */
+#define cpswapl(src, dst) do { \
+ if (sizeof((src)) != 4 || sizeof((dst)) != 4) \
+ wrong_size(); \
+ (dst) = lswapl((src)); \
+ } while (0)
+
+/* copy short from src to dst byteswapping on the way */
+#define cpswaps(src, dst) do { \
+ if (sizeof((src)) != 2 || sizeof((dst)) != 2) \
+ wrong_size(); \
+ (dst) = lswaps((src)); \
+ } while (0)
+
+extern _X_EXPORT void SwapLongs(CARD32 *list, unsigned long count);
+
+extern _X_EXPORT void SwapShorts(short *list, unsigned long count);
+
+extern _X_EXPORT void MakePredeclaredAtoms(void);
+
+extern _X_EXPORT int Ones(unsigned long /*mask */ );
+
+typedef struct _xPoint *DDXPointPtr;
+typedef struct pixman_box16 *BoxPtr;
+typedef struct _xEvent *xEventPtr;
+typedef struct _xRectangle *xRectanglePtr;
+typedef struct _GrabRec *GrabPtr;
+
+/* typedefs from other places - duplicated here to minimize the amount
+ * of unnecessary junk that one would normally have to include to get
+ * these symbols defined
+ */
+
+#ifndef _XTYPEDEF_CHARINFOPTR
+typedef struct _CharInfo *CharInfoPtr; /* also in fonts/include/font.h */
+
+#define _XTYPEDEF_CHARINFOPTR
+#endif
+
+extern _X_EXPORT unsigned long globalSerialNumber;
+extern _X_EXPORT unsigned long serverGeneration;
+
+/* Don't use this directly, use BUG_WARN or BUG_WARN_MSG instead */
+#define __BUG_WARN_MSG(cond, with_msg, ...) \
+ do { if (cond) { \
+ ErrorFSigSafe("BUG: triggered 'if (" #cond ")'\n"); \
+ ErrorFSigSafe("BUG: %s:%u in %s()\n", \
+ __FILE__, __LINE__, __func__); \
+ if (with_msg) ErrorFSigSafe(__VA_ARGS__); \
+ xorg_backtrace(); \
+ } } while(0)
+
+#define BUG_WARN_MSG(cond, ...) \
+ __BUG_WARN_MSG(cond, 1, __VA_ARGS__)
+
+#define BUG_WARN(cond) __BUG_WARN_MSG(cond, 0, NULL)
+
+#define BUG_RETURN(cond) \
+ do { if (cond) { __BUG_WARN_MSG(cond, 0, NULL); return; } } while(0)
+
+#define BUG_RETURN_MSG(cond, ...) \
+ do { if (cond) { __BUG_WARN_MSG(cond, 1, __VA_ARGS__); return; } } while(0)
+
+#define BUG_RETURN_VAL(cond, val) \
+ do { if (cond) { __BUG_WARN_MSG(cond, 0, NULL); return (val); } } while(0)
+
+#define BUG_RETURN_VAL_MSG(cond, val, ...) \
+ do { if (cond) { __BUG_WARN_MSG(cond, 1, __VA_ARGS__); return (val); } } while(0)
+
+#endif /* MISC_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/miscstruct.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/miscstruct.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/miscstruct.h (working copy)
@@ -0,0 +1,65 @@
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef MISCSTRUCT_H
+#define MISCSTRUCT_H 1
+
+#include "misc.h"
+#include <X11/Xprotostr.h>
+#include <pixman.h>
+
+typedef xPoint DDXPointRec;
+
+typedef struct pixman_box16 BoxRec;
+
+typedef union _DevUnion {
+ void *ptr;
+ long val;
+ unsigned long uval;
+ void *(*fptr) (void);
+} DevUnion;
+
+#endif /* MISCSTRUCT_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/mispans.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/mispans.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/mispans.h (working copy)
@@ -0,0 +1,87 @@
+/***********************************************************
+
+Copyright 1989, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1989 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef MISPANS_H
+#define MISPANS_H
+
+typedef struct {
+ int count; /* number of spans */
+ DDXPointPtr points; /* pointer to list of start points */
+ int *widths; /* pointer to list of widths */
+} Spans;
+
+typedef struct {
+ int size; /* Total number of *Spans allocated */
+ int count; /* Number of *Spans actually in group */
+ Spans *group; /* List of Spans */
+ int ymin, ymax; /* Min, max y values encountered */
+} SpanGroup;
+
+/* Initialize SpanGroup. MUST BE DONE before use. */
+extern _X_EXPORT void miInitSpanGroup(SpanGroup * /*spanGroup */
+ );
+
+/* Add a Spans to a SpanGroup. The spans MUST BE in y-sorted order */
+extern _X_EXPORT void miAppendSpans(SpanGroup * /*spanGroup */ ,
+ SpanGroup * /*otherGroup */ ,
+ Spans * /*spans */
+ );
+
+/* Paint a span group, insuring that each pixel is painted at most once */
+extern _X_EXPORT void miFillUniqueSpanGroup(DrawablePtr /*pDraw */ ,
+ GCPtr /*pGC */ ,
+ SpanGroup * /*spanGroup */
+ );
+
+/* Free up data in a span group. MUST BE DONE or you'll suffer memory leaks */
+extern _X_EXPORT void miFreeSpanGroup(SpanGroup * /*spanGroup */
+ );
+
+/* Rops which must use span groups */
+#define miSpansCarefulRop(rop) (((rop) & 0xc) == 0x8 || ((rop) & 0x3) == 0x2)
+#define miSpansEasyRop(rop) (!miSpansCarefulRop(rop))
+
+#endif /* MISPANS_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/mistruct.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/mistruct.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/mistruct.h (working copy)
@@ -0,0 +1,62 @@
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef MISTRUCT_H
+#define MISTRUCT_H
+
+#include "mi.h"
+#include "regionstr.h"
+
+/* information about dashes */
+typedef struct _miDash {
+ DDXPointRec pt;
+ int e1, e2; /* keep these, so we don't have to do it again */
+ int e; /* bresenham error term for this point on line */
+ int which;
+ int newLine; /* 0 if part of same original line as previous dash */
+} miDashRec;
+
+#endif /* MISTRUCT_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/misync.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/misync.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/misync.h (working copy)
@@ -0,0 +1,100 @@
+/*
+ * Copyright © 2010 NVIDIA Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifndef _MISYNC_H_
+#define _MISYNC_H_
+
+typedef struct _SyncFence SyncFence;
+typedef struct _SyncTrigger SyncTrigger;
+
+typedef void (*SyncScreenCreateFenceFunc) (ScreenPtr pScreen,
+ SyncFence * pFence,
+ Bool initially_triggered);
+typedef void (*SyncScreenDestroyFenceFunc) (ScreenPtr pScreen,
+ SyncFence * pFence);
+
+typedef struct _syncScreenFuncs {
+ SyncScreenCreateFenceFunc CreateFence;
+ SyncScreenDestroyFenceFunc DestroyFence;
+} SyncScreenFuncsRec, *SyncScreenFuncsPtr;
+
+
+extern _X_EXPORT void
+miSyncScreenCreateFence(ScreenPtr pScreen, SyncFence * pFence,
+ Bool initially_triggered);
+extern _X_EXPORT void
+ miSyncScreenDestroyFence(ScreenPtr pScreen, SyncFence * pFence);
+
+typedef void (*SyncFenceSetTriggeredFunc) (SyncFence * pFence);
+typedef void (*SyncFenceResetFunc) (SyncFence * pFence);
+typedef Bool (*SyncFenceCheckTriggeredFunc) (SyncFence * pFence);
+typedef void (*SyncFenceAddTriggerFunc) (SyncTrigger * pTrigger);
+typedef void (*SyncFenceDeleteTriggerFunc) (SyncTrigger * pTrigger);
+
+typedef struct _syncFenceFuncs {
+ SyncFenceSetTriggeredFunc SetTriggered;
+ SyncFenceResetFunc Reset;
+ SyncFenceCheckTriggeredFunc CheckTriggered;
+ SyncFenceAddTriggerFunc AddTrigger;
+ SyncFenceDeleteTriggerFunc DeleteTrigger;
+} SyncFenceFuncsRec, *SyncFenceFuncsPtr;
+
+extern _X_EXPORT void
+
+miSyncInitFence(ScreenPtr pScreen, SyncFence * pFence,
+ Bool initially_triggered);
+extern _X_EXPORT void
+ miSyncDestroyFence(SyncFence * pFence);
+extern _X_EXPORT void
+ miSyncTriggerFence(SyncFence * pFence);
+
+extern _X_EXPORT SyncScreenFuncsPtr miSyncGetScreenFuncs(ScreenPtr pScreen);
+extern _X_EXPORT Bool
+ miSyncSetup(ScreenPtr pScreen);
+
+Bool
+miSyncFenceCheckTriggered(SyncFence * pFence);
+
+void
+miSyncFenceSetTriggered(SyncFence * pFence);
+
+void
+miSyncFenceReset(SyncFence * pFence);
+
+void
+miSyncFenceAddTrigger(SyncTrigger * pTrigger);
+
+void
+miSyncFenceDeleteTrigger(SyncTrigger * pTrigger);
+
+int
+miSyncInitFenceFromFD(DrawablePtr pDraw, SyncFence *pFence, int fd, BOOL initially_triggered);
+
+int
+miSyncFDFromFence(DrawablePtr pDraw, SyncFence *pFence);
+
+#endif /* _MISYNC_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/misyncfd.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/misyncfd.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/misyncfd.h (working copy)
@@ -0,0 +1,45 @@
+/*
+ * Copyright © 2013 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no representations
+ * about the suitability of this software for any purpose. It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+#ifndef _MISYNCFD_H_
+#define _MISYNCFD_H_
+
+typedef int (*SyncScreenCreateFenceFromFdFunc) (ScreenPtr screen,
+ SyncFence *fence,
+ int fd,
+ Bool initially_triggered);
+
+typedef int (*SyncScreenGetFenceFdFunc) (ScreenPtr screen,
+ SyncFence *fence);
+
+#define SYNC_FD_SCREEN_FUNCS_VERSION 1
+
+typedef struct _syncFdScreenFuncs {
+ int version;
+ SyncScreenCreateFenceFromFdFunc CreateFenceFromFd;
+ SyncScreenGetFenceFdFunc GetFenceFd;
+} SyncFdScreenFuncsRec, *SyncFdScreenFuncsPtr;
+
+extern _X_EXPORT Bool miSyncFdScreenInit(ScreenPtr pScreen,
+ const SyncFdScreenFuncsRec *funcs);
+
+#endif /* _MISYNCFD_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/misyncshm.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/misyncshm.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/misyncshm.h (working copy)
@@ -0,0 +1,28 @@
+/*
+ * Copyright © 2013 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no representations
+ * about the suitability of this software for any purpose. It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+#ifndef _MISYNCSHM_H_
+#define _MISYNCSHM_H_
+
+extern _X_EXPORT Bool miSyncShmScreenInit(ScreenPtr pScreen);
+
+#endif /* _MISYNCSHM_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/misyncstr.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/misyncstr.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/misyncstr.h (working copy)
@@ -0,0 +1,97 @@
+/*
+ * Copyright © 2010 NVIDIA Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifndef _MISYNCSTR_H_
+#define _MISYNCSTR_H_
+
+#include "dix.h"
+#include "scrnintstr.h"
+#include <X11/extensions/syncconst.h>
+
+#define CARD64 XSyncValue /* XXX temporary! need real 64 bit values for Alpha */
+
+/* Sync object types */
+#define SYNC_COUNTER 0
+#define SYNC_FENCE 1
+
+typedef struct _SyncObject {
+ ClientPtr client; /* Owning client. 0 for system counters */
+ struct _SyncTriggerList *pTriglist; /* list of triggers */
+ XID id; /* resource ID */
+ unsigned char type; /* SYNC_* */
+ Bool beingDestroyed; /* in process of going away */
+} SyncObject;
+
+typedef struct _SyncCounter {
+ SyncObject sync; /* Common sync object data */
+ CARD64 value; /* counter value */
+ struct _SysCounterInfo *pSysCounterInfo; /* NULL if not a system counter */
+} SyncCounter;
+
+struct _SyncFence {
+ SyncObject sync; /* Common sync object data */
+ ScreenPtr pScreen; /* Screen of this fence object */
+ SyncFenceFuncsRec funcs; /* Funcs for performing ops on fence */
+ Bool triggered; /* fence state */
+ PrivateRec *devPrivates; /* driver-specific per-fence data */
+};
+
+struct _SyncTrigger {
+ SyncObject *pSync;
+ CARD64 wait_value; /* wait value */
+ unsigned int value_type; /* Absolute or Relative */
+ unsigned int test_type; /* transition or Comparision type */
+ CARD64 test_value; /* trigger event threshold value */
+ Bool (*CheckTrigger) (struct _SyncTrigger * /*pTrigger */ ,
+ CARD64 /*newval */
+ );
+ void (*TriggerFired) (struct _SyncTrigger * /*pTrigger */
+ );
+ void (*CounterDestroyed) (struct _SyncTrigger * /*pTrigger */
+ );
+};
+
+typedef struct _SyncTriggerList {
+ SyncTrigger *pTrigger;
+ struct _SyncTriggerList *next;
+} SyncTriggerList;
+
+extern DevPrivateKeyRec miSyncScreenPrivateKey;
+
+#define SYNC_SCREEN_PRIV(pScreen) \
+ (SyncScreenPrivPtr) dixLookupPrivate(&pScreen->devPrivates, \
+ &miSyncScreenPrivateKey)
+
+typedef struct _syncScreenPriv {
+ /* Wrappable sync-specific screen functions */
+ SyncScreenFuncsRec funcs;
+
+ /* Wrapped screen functions */
+ CloseScreenProcPtr CloseScreen;
+} SyncScreenPrivRec, *SyncScreenPrivPtr;
+
+#endif /* _MISYNCSTR_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/miwideline.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/miwideline.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/miwideline.h (working copy)
@@ -0,0 +1,119 @@
+/*
+
+Copyright 1988, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+*/
+
+/* Author: Keith Packard, MIT X Consortium */
+
+#include "mispans.h"
+#include "mifpoly.h" /* for ICEIL */
+
+/*
+ * Polygon edge description for integer wide-line routines
+ */
+
+typedef struct _PolyEdge {
+ int height; /* number of scanlines to process */
+ int x; /* starting x coordinate */
+ int stepx; /* fixed integral dx */
+ int signdx; /* variable dx sign */
+ int e; /* initial error term */
+ int dy;
+ int dx;
+} PolyEdgeRec, *PolyEdgePtr;
+
+#define SQSECANT 108.856472512142 /* 1/sin^2(11/2) - miter limit constant */
+
+/*
+ * types for general polygon routines
+ */
+
+typedef struct _PolyVertex {
+ double x, y;
+} PolyVertexRec, *PolyVertexPtr;
+
+typedef struct _PolySlope {
+ int dx, dy;
+ double k; /* x0 * dy - y0 * dx */
+} PolySlopeRec, *PolySlopePtr;
+
+/*
+ * Line face description for caps/joins
+ */
+
+typedef struct _LineFace {
+ double xa, ya;
+ int dx, dy;
+ int x, y;
+ double k;
+} LineFaceRec, *LineFacePtr;
+
+/*
+ * macros for polygon fillers
+ */
+
+#define MILINESETPIXEL(pDrawable, pGC, pixel, oldPixel) { \
+ oldPixel = pGC->fgPixel; \
+ if (pixel != oldPixel) { \
+ ChangeGCVal gcval; \
+ gcval.val = pixel; \
+ ChangeGC (NullClient, pGC, GCForeground, &gcval); \
+ ValidateGC (pDrawable, pGC); \
+ } \
+}
+#define MILINERESETPIXEL(pDrawable, pGC, pixel, oldPixel) { \
+ if (pixel != oldPixel) { \
+ ChangeGCVal gcval; \
+ gcval.val = oldPixel; \
+ ChangeGC (NullClient, pGC, GCForeground, &gcval); \
+ ValidateGC (pDrawable, pGC); \
+ } \
+}
+
+extern _X_EXPORT void miRoundJoinClip(LineFacePtr /*pLeft */ ,
+ LineFacePtr /*pRight */ ,
+ PolyEdgePtr /*edge1 */ ,
+ PolyEdgePtr /*edge2 */ ,
+ int * /*y1 */ ,
+ int * /*y2 */ ,
+ Bool * /*left1 */ ,
+ Bool * /*left2 */
+ );
+
+extern _X_EXPORT int miRoundCapClip(LineFacePtr /*face */ ,
+ Bool /*isInt */ ,
+ PolyEdgePtr /*edge */ ,
+ Bool * /*leftEdge */
+ );
+
+extern _X_EXPORT int miPolyBuildEdge(double x0, double y0, double k, int dx,
+ int dy, int xi, int yi, int left,
+ PolyEdgePtr edge);
+extern _X_EXPORT int miPolyBuildPoly(PolyVertexPtr vertices,
+ PolySlopePtr slopes, int count, int xi,
+ int yi, PolyEdgePtr left,
+ PolyEdgePtr right, int *pnleft,
+ int *pnright, int *h);
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/mizerarc.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/mizerarc.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/mizerarc.h (working copy)
@@ -0,0 +1,124 @@
+/************************************************************
+
+Copyright 1989, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+********************************************************/
+
+typedef struct {
+ int x;
+ int y;
+ int mask;
+} miZeroArcPtRec;
+
+typedef struct {
+ int x, y, k1, k3, a, b, d, dx, dy;
+ int alpha, beta;
+ int xorg, yorg;
+ int xorgo, yorgo;
+ int w, h;
+ int initialMask;
+ miZeroArcPtRec start, altstart, end, altend;
+ int firstx, firsty;
+ int startAngle, endAngle;
+} miZeroArcRec;
+
+#define miCanZeroArc(arc) (((arc)->width == (arc)->height) || \
+ (((arc)->width <= 800) && ((arc)->height <= 800)))
+
+#define MIARCSETUP() \
+ x = info.x; \
+ y = info.y; \
+ k1 = info.k1; \
+ k3 = info.k3; \
+ a = info.a; \
+ b = info.b; \
+ d = info.d; \
+ dx = info.dx; \
+ dy = info.dy
+
+#define MIARCOCTANTSHIFT(clause) \
+ if (a < 0) \
+ { \
+ if (y == info.h) \
+ { \
+ d = -1; \
+ a = b = k1 = 0; \
+ } \
+ else \
+ { \
+ dx = (k1 << 1) - k3; \
+ k1 = dx - k1; \
+ k3 = -k3; \
+ b = b + a - (k1 >> 1); \
+ d = b + ((-a) >> 1) - d + (k3 >> 3); \
+ if (dx < 0) \
+ a = -((-dx) >> 1) - a; \
+ else \
+ a = (dx >> 1) - a; \
+ dx = 0; \
+ dy = 1; \
+ clause \
+ } \
+ }
+
+#define MIARCSTEP(move1,move2) \
+ b -= k1; \
+ if (d < 0) \
+ { \
+ x += dx; \
+ y += dy; \
+ a += k1; \
+ d += b; \
+ move1 \
+ } \
+ else \
+ { \
+ x++; \
+ y++; \
+ a += k3; \
+ d -= a; \
+ move2 \
+ }
+
+#define MIARCCIRCLESTEP(clause) \
+ b -= k1; \
+ x++; \
+ if (d < 0) \
+ { \
+ a += k1; \
+ d += b; \
+ } \
+ else \
+ { \
+ y++; \
+ a += k3; \
+ d -= a; \
+ clause \
+ }
+
+/* mizerarc.c */
+
+extern _X_EXPORT Bool miZeroArcSetup(xArc * /*arc */ ,
+ miZeroArcRec * /*info */ ,
+ Bool /*ok360 */
+ );
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/msp3430.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/msp3430.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/msp3430.h (working copy)
@@ -0,0 +1,116 @@
+#ifndef __MSP3430_H__
+#define __MSP3430_H__
+
+#include "xf86i2c.h"
+
+typedef struct {
+ I2CDevRec d;
+
+ int standard;
+ int connector;
+ int mode;
+
+ CARD8 hardware_version, major_revision, product_code, rom_version;
+#ifdef MSP_DEBUG
+ CARD8 registers_present[256];
+#endif
+
+ CARD16 chip_id;
+ CARD8 chip_family;
+ Bool recheck; /*reinitialization needed after channel change */
+ CARD8 c_format; /*current state of audio format */
+ CARD16 c_standard; /*current state of standard register */
+ CARD8 c_source; /*current state of source register */
+ CARD8 c_matrix; /*current state of matrix register */
+ CARD8 c_fmmatrix; /*current state of fmmatrix register */
+ int c_mode; /* current state of mode for autoswitchimg */
+ CARD8 volume;
+} MSP3430Rec, *MSP3430Ptr;
+
+#define MSP3430_ADDR_1 0x80
+#define MSP3430_ADDR_2 0x84
+#define MSP3430_ADDR_3 0x88
+
+#define MSP3430_PAL 1
+#define MSP3430_NTSC 2
+#define MSP3430_PAL_DK1 (0x100 | MSP3430_PAL)
+#define MSP3430_SECAM 3
+
+#define MSP3430_CONNECTOR_1 1 /* tuner on AIW cards */
+#define MSP3430_CONNECTOR_2 2 /* SVideo on AIW cards */
+#define MSP3430_CONNECTOR_3 3 /* composite on AIW cards */
+
+#define MSP3430_ADDR(a) ((a)->d.SlaveAddr)
+
+#define MSP3430_FAST_MUTE 0xFF
+/* a handy volume transform function, -1000..1000 -> 0x01..0x7F */
+#define MSP3430_VOLUME(value) (0x01+(0x7F-0x01)*log(value+1001)/log(2001))
+
+/*----------------------------------------------------------*/
+
+/* MSP chip families */
+#define MSPFAMILY_UNKNOWN 0
+#define MSPFAMILY_34x0D 1
+#define MSPFAMILY_34x5D 2
+#define MSPFAMILY_34x0G 3
+#define MSPFAMILY_34x5G 4
+
+/* values for MSP standard */
+#define MSPSTANDARD_UNKNOWN 0x00
+#define MSPSTANDARD_AUTO 0x01
+#define MSPSTANDARD_FM_M 0x02
+#define MSPSTANDARD_FM_BG 0x03
+#define MSPSTANDARD_FM_DK1 0x04
+#define MSPSTANDARD_FM_DK2 0x04
+#define MSPSTANDARD_NICAM_BG 0x08
+#define MSPSTANDARD_NICAM_L 0x09
+#define MSPSTANDARD_NICAM_I 0x0A
+#define MSPSTANDARD_NICAM_DK 0x0B
+
+/* values for MSP format */
+#define MSPFORMAT_UNKNOWN 0x00
+#define MSPFORMAT_FM 0x10
+#define MSPFORMAT_1xFM 0x00|MSPFORMAT_FM
+#define MSPFORMAT_2xFM 0x01|MSPFORMAT_FM
+#define MSPFORMAT_NICAM 0x20
+#define MSPFORMAT_NICAM_FM 0x00|MSPFORMAT_NICAM
+#define MSPFORMAT_NICAM_AM 0x01|MSPFORMAT_NICAM
+#define MSPFORMAT_SCART 0x30
+
+/* values for MSP mode */
+#define MSPMODE_UNKNOWN 0
+/* automatic modes */
+#define MSPMODE_STEREO_AB 1
+#define MSPMODE_STEREO_A 2
+#define MSPMODE_STEREO_B 3
+/* forced modes */
+#define MSPMODE_MONO 4
+#define MSPMODE_STEREO 5
+#define MSPMODE_AB 6
+#define MSPMODE_A 7
+#define MSPMODE_B 8
+/*----------------------------------------------------------*/
+
+#define xf86_InitMSP3430 InitMSP3430
+extern _X_EXPORT void InitMSP3430(MSP3430Ptr m);
+
+#define xf86_DetectMSP3430 DetectMSP3430
+extern _X_EXPORT MSP3430Ptr DetectMSP3430(I2CBusPtr b, I2CSlaveAddr addr);
+
+#define xf86_ResetMSP3430 ResetMSP3430
+extern _X_EXPORT void ResetMSP3430(MSP3430Ptr m);
+
+#define xf86_MSP3430SetVolume MSP3430SetVolume
+extern _X_EXPORT void MSP3430SetVolume(MSP3430Ptr m, CARD8 value);
+
+#define xf86_MSP3430SetSAP MSP3430SetSAP
+extern _X_EXPORT void MSP3430SetSAP(MSP3430Ptr m, int mode);
+
+#define MSP3430SymbolsList \
+ "InitMSP3430", \
+ "DetectMSP3430", \
+ "ResetMSP3430", \
+ "MSP3430SetVolume", \
+ "MSP3430SetSAP"
+
+#endif
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/opaque.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/opaque.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/opaque.h (working copy)
@@ -0,0 +1,78 @@
+/*
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+*/
+
+#ifndef OPAQUE_H
+#define OPAQUE_H
+
+#include <X11/Xmd.h>
+
+#include "globals.h"
+
+extern _X_EXPORT const char *defaultTextFont;
+extern _X_EXPORT const char *defaultCursorFont;
+extern _X_EXPORT int MaxClients;
+extern _X_EXPORT volatile char isItTimeToYield;
+extern _X_EXPORT volatile char dispatchException;
+
+/* bit values for dispatchException */
+#define DE_RESET 1
+#define DE_TERMINATE 2
+#define DE_PRIORITYCHANGE 4 /* set when a client's priority changes */
+
+extern _X_EXPORT CARD32 TimeOutValue;
+extern _X_EXPORT int ScreenSaverBlanking;
+extern _X_EXPORT int ScreenSaverAllowExposures;
+extern _X_EXPORT int defaultScreenSaverBlanking;
+extern _X_EXPORT int defaultScreenSaverAllowExposures;
+extern _X_EXPORT const char *display;
+extern _X_EXPORT int displayfd;
+
+extern _X_EXPORT int defaultBackingStore;
+extern _X_EXPORT Bool disableBackingStore;
+extern _X_EXPORT Bool enableBackingStore;
+extern _X_EXPORT Bool PartialNetwork;
+extern _X_EXPORT Bool RunFromSigStopParent;
+
+#ifdef RLIMIT_DATA
+extern _X_EXPORT int limitDataSpace;
+#endif
+#ifdef RLIMIT_STACK
+extern _X_EXPORT int limitStackSpace;
+#endif
+#ifdef RLIMIT_NOFILE
+extern _X_EXPORT int limitNoFile;
+#endif
+extern _X_EXPORT Bool defeatAccessControl;
+extern _X_EXPORT long maxBigRequestSize;
+extern _X_EXPORT Bool party_like_its_1989;
+extern _X_EXPORT Bool whiteRoot;
+extern _X_EXPORT Bool bgNoneRoot;
+
+extern _X_EXPORT Bool CoreDump;
+
+#endif /* OPAQUE_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/optionstr.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/optionstr.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/optionstr.h (working copy)
@@ -0,0 +1,13 @@
+#ifndef OPTIONSTR_H_
+#define OPTIONSTR_H_
+#include "list.h"
+
+struct _InputOption {
+ GenericListRec list;
+ char *opt_name;
+ char *opt_val;
+ int opt_used;
+ char *opt_comment;
+};
+
+#endif /* INPUTSTRUCT_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/os.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/os.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/os.h (working copy)
@@ -0,0 +1,692 @@
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef OS_H
+#define OS_H
+
+#include "misc.h"
+#include <stdarg.h>
+#include <stdint.h>
+#include <string.h>
+
+#define SCREEN_SAVER_ON 0
+#define SCREEN_SAVER_OFF 1
+#define SCREEN_SAVER_FORCER 2
+#define SCREEN_SAVER_CYCLE 3
+
+#ifndef MAX_REQUEST_SIZE
+#define MAX_REQUEST_SIZE 65535
+#endif
+#ifndef MAX_BIG_REQUEST_SIZE
+#define MAX_BIG_REQUEST_SIZE 4194303
+#endif
+
+typedef struct _FontPathRec *FontPathPtr;
+typedef struct _NewClientRec *NewClientPtr;
+
+#ifndef xalloc
+#define xnfalloc(size) XNFalloc((unsigned long)(size))
+#define xnfcalloc(_num, _size) XNFcalloc((unsigned long)(_num)*(unsigned long)(_size))
+#define xnfrealloc(ptr, size) XNFrealloc((void *)(ptr), (unsigned long)(size))
+
+#define xalloc(size) Xalloc((unsigned long)(size))
+#define xcalloc(_num, _size) Xcalloc((unsigned long)(_num)*(unsigned long)(_size))
+#define xrealloc(ptr, size) Xrealloc((void *)(ptr), (unsigned long)(size))
+#define xfree(ptr) Xfree((void *)(ptr))
+#define xstrdup(s) Xstrdup(s)
+#define xnfstrdup(s) XNFstrdup(s)
+#endif
+
+#include <stdio.h>
+#include <stdarg.h>
+
+#ifdef DDXBEFORERESET
+extern void ddxBeforeReset(void);
+#endif
+
+#ifdef DDXOSVERRORF
+extern _X_EXPORT void (*OsVendorVErrorFProc) (const char *,
+ va_list args)
+_X_ATTRIBUTE_PRINTF(1, 0);
+#endif
+
+extern _X_EXPORT int WaitForSomething(int * /*pClientsReady */
+ );
+
+extern _X_EXPORT int ReadRequestFromClient(ClientPtr /*client */ );
+
+#if XTRANS_SEND_FDS
+extern _X_EXPORT int ReadFdFromClient(ClientPtr client);
+
+extern _X_EXPORT int WriteFdToClient(ClientPtr client, int fd, Bool do_close);
+#endif
+
+extern _X_EXPORT Bool InsertFakeRequest(ClientPtr /*client */ ,
+ char * /*data */ ,
+ int /*count */ );
+
+extern _X_EXPORT void ResetCurrentRequest(ClientPtr /*client */ );
+
+extern _X_EXPORT void FlushAllOutput(void);
+
+extern _X_EXPORT void FlushIfCriticalOutputPending(void);
+
+extern _X_EXPORT void SetCriticalOutputPending(void);
+
+extern _X_EXPORT int WriteToClient(ClientPtr /*who */ , int /*count */ ,
+ const void * /*buf */ );
+
+extern _X_EXPORT void ResetOsBuffers(void);
+
+extern _X_EXPORT void InitConnectionLimits(void);
+
+extern _X_EXPORT void NotifyParentProcess(void);
+
+extern _X_EXPORT void CreateWellKnownSockets(void);
+
+extern _X_EXPORT void ResetWellKnownSockets(void);
+
+extern _X_EXPORT void CloseWellKnownConnections(void);
+
+extern _X_EXPORT XID AuthorizationIDOfClient(ClientPtr /*client */ );
+
+extern _X_EXPORT const char *ClientAuthorized(ClientPtr /*client */ ,
+ unsigned int /*proto_n */ ,
+ char * /*auth_proto */ ,
+ unsigned int /*string_n */ ,
+ char * /*auth_string */ );
+
+extern _X_EXPORT Bool EstablishNewConnections(ClientPtr /*clientUnused */ ,
+ void */*closure */ );
+
+extern _X_EXPORT void CheckConnections(void);
+
+extern _X_EXPORT void CloseDownConnection(ClientPtr /*client */ );
+
+extern _X_EXPORT void AddGeneralSocket(int /*fd */ );
+
+extern _X_EXPORT void RemoveGeneralSocket(int /*fd */ );
+
+extern _X_EXPORT void AddEnabledDevice(int /*fd */ );
+
+extern _X_EXPORT void RemoveEnabledDevice(int /*fd */ );
+
+extern _X_EXPORT int OnlyListenToOneClient(ClientPtr /*client */ );
+
+extern _X_EXPORT void ListenToAllClients(void);
+
+extern _X_EXPORT void IgnoreClient(ClientPtr /*client */ );
+
+extern _X_EXPORT void AttendClient(ClientPtr /*client */ );
+
+extern _X_EXPORT void MakeClientGrabImpervious(ClientPtr /*client */ );
+
+extern _X_EXPORT void MakeClientGrabPervious(ClientPtr /*client */ );
+
+#ifdef XQUARTZ
+extern void ListenOnOpenFD(int /* fd */ , int /* noxauth */ );
+#endif
+
+extern _X_EXPORT CARD32 GetTimeInMillis(void);
+extern _X_EXPORT CARD64 GetTimeInMicros(void);
+
+extern _X_EXPORT void AdjustWaitForDelay(void */*waitTime */ ,
+ unsigned long /*newdelay */ );
+
+typedef struct _OsTimerRec *OsTimerPtr;
+
+typedef CARD32 (*OsTimerCallback) (OsTimerPtr /* timer */ ,
+ CARD32 /* time */ ,
+ void */* arg */ );
+
+extern _X_EXPORT void TimerInit(void);
+
+extern _X_EXPORT Bool TimerForce(OsTimerPtr /* timer */ );
+
+#define TimerAbsolute (1<<0)
+#define TimerForceOld (1<<1)
+
+extern _X_EXPORT OsTimerPtr TimerSet(OsTimerPtr /* timer */ ,
+ int /* flags */ ,
+ CARD32 /* millis */ ,
+ OsTimerCallback /* func */ ,
+ void */* arg */ );
+
+extern _X_EXPORT void TimerCheck(void);
+extern _X_EXPORT void TimerCancel(OsTimerPtr /* pTimer */ );
+extern _X_EXPORT void TimerFree(OsTimerPtr /* pTimer */ );
+
+extern _X_EXPORT void SetScreenSaverTimer(void);
+extern _X_EXPORT void FreeScreenSaverTimer(void);
+
+extern _X_EXPORT void AutoResetServer(int /*sig */ );
+
+extern _X_EXPORT void GiveUp(int /*sig */ );
+
+extern _X_EXPORT void UseMsg(void);
+
+extern _X_EXPORT void ProcessCommandLine(int /*argc */ , char * /*argv */ []);
+
+extern _X_EXPORT int set_font_authorizations(char ** /* authorizations */ ,
+ int * /*authlen */ ,
+ void */* client */ );
+
+#ifndef _HAVE_XALLOC_DECLS
+#define _HAVE_XALLOC_DECLS
+
+/*
+ * Use malloc(3) instead.
+ */
+extern _X_EXPORT void *
+Xalloc(unsigned long /*amount */ ) _X_DEPRECATED;
+
+/*
+ * Use calloc(3) instead
+ */
+extern _X_EXPORT void *
+Xcalloc(unsigned long /*amount */ ) _X_DEPRECATED;
+
+/*
+ * Use realloc(3) instead
+ */
+extern _X_EXPORT void *
+Xrealloc(void * /*ptr */ , unsigned long /*amount */ )
+ _X_DEPRECATED;
+
+/*
+ * Use free(3) instead
+ */
+extern _X_EXPORT void
+Xfree(void * /*ptr */ )
+ _X_DEPRECATED;
+
+#endif
+
+/*
+ * This function malloc(3)s buffer, terminating the server if there is not
+ * enough memory.
+ */
+extern _X_EXPORT void *
+XNFalloc(unsigned long /*amount */ );
+
+/*
+ * This function calloc(3)s buffer, terminating the server if there is not
+ * enough memory.
+ */
+extern _X_EXPORT void *
+XNFcalloc(unsigned long /*amount */ );
+
+/*
+ * This function realloc(3)s passed buffer, terminating the server if there is
+ * not enough memory.
+ */
+extern _X_EXPORT void *
+XNFrealloc(void * /*ptr */ , unsigned long /*amount */ );
+
+/*
+ * This function strdup(3)s passed string. The only difference from the library
+ * function that it is safe to pass NULL, as NULL will be returned.
+ */
+extern _X_EXPORT char *
+Xstrdup(const char *s);
+
+/*
+ * This function strdup(3)s passed string, terminating the server if there is
+ * not enough memory. If NULL is passed to this function, NULL is returned.
+ */
+extern _X_EXPORT char *
+XNFstrdup(const char *s);
+
+/* Include new X*asprintf API */
+#include "Xprintf.h"
+
+/* Older api deprecated in favor of the asprintf versions */
+extern _X_EXPORT char *
+Xprintf(const char *fmt, ...)
+_X_ATTRIBUTE_PRINTF(1, 2)
+ _X_DEPRECATED;
+extern _X_EXPORT char *
+Xvprintf(const char *fmt, va_list va)
+_X_ATTRIBUTE_PRINTF(1, 0)
+ _X_DEPRECATED;
+extern _X_EXPORT char *
+XNFprintf(const char *fmt, ...)
+_X_ATTRIBUTE_PRINTF(1, 2)
+ _X_DEPRECATED;
+extern _X_EXPORT char *
+XNFvprintf(const char *fmt, va_list va)
+_X_ATTRIBUTE_PRINTF(1, 0)
+ _X_DEPRECATED;
+
+typedef void (*OsSigHandlerPtr) (int /* sig */ );
+typedef int (*OsSigWrapperPtr) (int /* sig */ );
+
+extern _X_EXPORT OsSigHandlerPtr
+OsSignal(int /* sig */ , OsSigHandlerPtr /* handler */ );
+extern _X_EXPORT OsSigWrapperPtr
+OsRegisterSigWrapper(OsSigWrapperPtr newWrap);
+
+extern _X_EXPORT int auditTrailLevel;
+
+extern _X_EXPORT void
+LockServer(void);
+extern _X_EXPORT void
+UnlockServer(void);
+
+extern _X_EXPORT int
+OsLookupColor(int /*screen */ ,
+ char * /*name */ ,
+ unsigned /*len */ ,
+ unsigned short * /*pred */ ,
+ unsigned short * /*pgreen */ ,
+ unsigned short * /*pblue */ );
+
+extern _X_EXPORT void
+OsInit(void);
+
+extern _X_EXPORT void
+OsCleanup(Bool);
+
+extern _X_EXPORT void
+OsVendorFatalError(const char *f, va_list args)
+_X_ATTRIBUTE_PRINTF(1, 0);
+
+extern _X_EXPORT void
+OsVendorInit(void);
+
+extern _X_EXPORT void
+OsBlockSignals(void);
+
+extern _X_EXPORT void
+OsReleaseSignals(void);
+
+extern _X_EXPORT int
+OsBlockSIGIO(void);
+
+extern _X_EXPORT void
+OsReleaseSIGIO(void);
+
+extern void
+OsResetSignals(void);
+
+extern _X_EXPORT void
+OsAbort(void)
+ _X_NORETURN;
+
+#if !defined(WIN32)
+extern _X_EXPORT int
+System(const char *);
+extern _X_EXPORT void *
+Popen(const char *, const char *);
+extern _X_EXPORT int
+Pclose(void *);
+extern _X_EXPORT void *
+Fopen(const char *, const char *);
+extern _X_EXPORT int
+Fclose(void *);
+#else
+
+extern const char *
+Win32TempDir(void);
+
+extern int
+System(const char *cmdline);
+
+#define Fopen(a,b) fopen(a,b)
+#define Fclose(a) fclose(a)
+#endif
+
+extern _X_EXPORT void
+CheckUserParameters(int argc, char **argv, char **envp);
+extern _X_EXPORT void
+CheckUserAuthorization(void);
+
+extern _X_EXPORT int
+AddHost(ClientPtr /*client */ ,
+ int /*family */ ,
+ unsigned /*length */ ,
+ const void * /*pAddr */ );
+
+extern _X_EXPORT Bool
+ForEachHostInFamily(int /*family */ ,
+ Bool (* /*func */ )(
+ unsigned char * /* addr */ ,
+ short /* len */ ,
+ void */* closure */ ),
+ void */*closure */ );
+
+extern _X_EXPORT int
+RemoveHost(ClientPtr /*client */ ,
+ int /*family */ ,
+ unsigned /*length */ ,
+ void */*pAddr */ );
+
+extern _X_EXPORT int
+GetHosts(void ** /*data */ ,
+ int * /*pnHosts */ ,
+ int * /*pLen */ ,
+ BOOL * /*pEnabled */ );
+
+typedef struct sockaddr *sockaddrPtr;
+
+extern _X_EXPORT int
+InvalidHost(sockaddrPtr /*saddr */ , int /*len */ , ClientPtr client);
+
+extern _X_EXPORT int
+LocalClientCred(ClientPtr, int *, int *);
+
+#define LCC_UID_SET (1 << 0)
+#define LCC_GID_SET (1 << 1)
+#define LCC_PID_SET (1 << 2)
+#define LCC_ZID_SET (1 << 3)
+
+typedef struct {
+ int fieldsSet; /* Bit mask of fields set */
+ int euid; /* Effective uid */
+ int egid; /* Primary effective group id */
+ int nSuppGids; /* Number of supplementary group ids */
+ int *pSuppGids; /* Array of supplementary group ids */
+ int pid; /* Process id */
+ int zoneid; /* Only set on Solaris 10 & later */
+} LocalClientCredRec;
+
+extern _X_EXPORT int
+GetLocalClientCreds(ClientPtr, LocalClientCredRec **);
+extern _X_EXPORT void
+FreeLocalClientCreds(LocalClientCredRec *);
+
+extern _X_EXPORT int
+ChangeAccessControl(ClientPtr /*client */ , int /*fEnabled */ );
+
+extern _X_EXPORT int
+GetAccessControl(void);
+
+extern _X_EXPORT void
+AddLocalHosts(void);
+
+extern _X_EXPORT void
+ResetHosts(const char *display);
+
+extern _X_EXPORT void
+EnableLocalHost(void);
+
+extern _X_EXPORT void
+DisableLocalHost(void);
+
+extern _X_EXPORT void
+AccessUsingXdmcp(void);
+
+extern _X_EXPORT void
+DefineSelf(int /*fd */ );
+
+#if XDMCP
+extern _X_EXPORT void
+AugmentSelf(void */*from */ , int /*len */ );
+
+extern _X_EXPORT void
+RegisterAuthorizations(void);
+#endif
+
+extern _X_EXPORT void
+InitAuthorization(const char * /*filename */ );
+
+/* extern int LoadAuthorization(void); */
+
+extern _X_EXPORT int
+AuthorizationFromID(XID id,
+ unsigned short *name_lenp,
+ const char **namep,
+ unsigned short *data_lenp, char **datap);
+
+extern _X_EXPORT XID
+CheckAuthorization(unsigned int /*namelength */ ,
+ const char * /*name */ ,
+ unsigned int /*datalength */ ,
+ const char * /*data */ ,
+ ClientPtr /*client */ ,
+ const char ** /*reason */
+ );
+
+extern _X_EXPORT void
+ResetAuthorization(void);
+
+extern _X_EXPORT int
+RemoveAuthorization(unsigned short name_length,
+ const char *name,
+ unsigned short data_length, const char *data);
+
+extern _X_EXPORT int
+AddAuthorization(unsigned int /*name_length */ ,
+ const char * /*name */ ,
+ unsigned int /*data_length */ ,
+ char * /*data */ );
+
+#ifdef XCSECURITY
+extern _X_EXPORT XID
+GenerateAuthorization(unsigned int /* name_length */ ,
+ const char * /* name */ ,
+ unsigned int /* data_length */ ,
+ const char * /* data */ ,
+ unsigned int * /* data_length_return */ ,
+ char ** /* data_return */ );
+#endif
+
+extern _X_EXPORT int
+ddxProcessArgument(int /*argc */ , char * /*argv */ [], int /*i */ );
+
+extern _X_EXPORT void
+ddxUseMsg(void);
+
+/* stuff for ReplyCallback */
+extern _X_EXPORT CallbackListPtr ReplyCallback;
+typedef struct {
+ ClientPtr client;
+ const void *replyData;
+ unsigned long dataLenBytes; /* actual bytes from replyData + pad bytes */
+ unsigned long bytesRemaining;
+ Bool startOfReply;
+ unsigned long padBytes; /* pad bytes from zeroed array */
+} ReplyInfoRec;
+
+/* stuff for FlushCallback */
+extern _X_EXPORT CallbackListPtr FlushCallback;
+
+enum ExitCode {
+ EXIT_NO_ERROR = 0,
+ EXIT_ERR_ABORT = 1,
+ EXIT_ERR_CONFIGURE = 2,
+ EXIT_ERR_DRIVERS = 3,
+};
+
+extern _X_EXPORT void
+AbortDDX(enum ExitCode error);
+extern _X_EXPORT void
+ddxGiveUp(enum ExitCode error);
+extern _X_EXPORT int
+TimeSinceLastInputEvent(void);
+
+/* strcasecmp.c */
+#ifndef HAVE_STRCASECMP
+#define strcasecmp xstrcasecmp
+extern _X_EXPORT int
+xstrcasecmp(const char *s1, const char *s2);
+#endif
+
+#ifndef HAVE_STRNCASECMP
+#define strncasecmp xstrncasecmp
+extern _X_EXPORT int
+xstrncasecmp(const char *s1, const char *s2, size_t n);
+#endif
+
+#ifndef HAVE_STRCASESTR
+#define strcasestr xstrcasestr
+extern _X_EXPORT char *
+xstrcasestr(const char *s, const char *find);
+#endif
+
+#ifndef HAVE_STRLCPY
+extern _X_EXPORT size_t
+strlcpy(char *dst, const char *src, size_t siz);
+extern _X_EXPORT size_t
+strlcat(char *dst, const char *src, size_t siz);
+#endif
+
+#ifndef HAVE_STRNDUP
+extern _X_EXPORT char *
+strndup(const char *str, size_t n);
+#endif
+
+/* Logging. */
+typedef enum _LogParameter {
+ XLOG_FLUSH,
+ XLOG_SYNC,
+ XLOG_VERBOSITY,
+ XLOG_FILE_VERBOSITY
+} LogParameter;
+
+/* Flags for log messages. */
+typedef enum {
+ X_PROBED, /* Value was probed */
+ X_CONFIG, /* Value was given in the config file */
+ X_DEFAULT, /* Value is a default */
+ X_CMDLINE, /* Value was given on the command line */
+ X_NOTICE, /* Notice */
+ X_ERROR, /* Error message */
+ X_WARNING, /* Warning message */
+ X_INFO, /* Informational message */
+ X_NONE, /* No prefix */
+ X_NOT_IMPLEMENTED, /* Not implemented */
+ X_DEBUG, /* Debug message */
+ X_UNKNOWN = -1 /* unknown -- this must always be last */
+} MessageType;
+
+extern _X_EXPORT const char *
+LogInit(const char *fname, const char *backup);
+extern _X_EXPORT void
+LogClose(enum ExitCode error);
+extern _X_EXPORT Bool
+LogSetParameter(LogParameter param, int value);
+extern _X_EXPORT void
+LogVWrite(int verb, const char *f, va_list args)
+_X_ATTRIBUTE_PRINTF(2, 0);
+extern _X_EXPORT void
+LogWrite(int verb, const char *f, ...)
+_X_ATTRIBUTE_PRINTF(2, 3);
+extern _X_EXPORT void
+LogVMessageVerb(MessageType type, int verb, const char *format, va_list args)
+_X_ATTRIBUTE_PRINTF(3, 0);
+extern _X_EXPORT void
+LogMessageVerb(MessageType type, int verb, const char *format, ...)
+_X_ATTRIBUTE_PRINTF(3, 4);
+extern _X_EXPORT void
+LogMessage(MessageType type, const char *format, ...)
+_X_ATTRIBUTE_PRINTF(2, 3);
+extern _X_EXPORT void
+LogMessageVerbSigSafe(MessageType type, int verb, const char *format, ...)
+_X_ATTRIBUTE_PRINTF(3, 4);
+extern _X_EXPORT void
+LogVMessageVerbSigSafe(MessageType type, int verb, const char *format, va_list args)
+_X_ATTRIBUTE_PRINTF(3, 0);
+
+extern _X_EXPORT void
+LogVHdrMessageVerb(MessageType type, int verb,
+ const char *msg_format, va_list msg_args,
+ const char *hdr_format, va_list hdr_args)
+_X_ATTRIBUTE_PRINTF(3, 0)
+_X_ATTRIBUTE_PRINTF(5, 0);
+extern _X_EXPORT void
+LogHdrMessageVerb(MessageType type, int verb,
+ const char *msg_format, va_list msg_args,
+ const char *hdr_format, ...)
+_X_ATTRIBUTE_PRINTF(3, 0)
+_X_ATTRIBUTE_PRINTF(5, 6);
+extern _X_EXPORT void
+LogHdrMessage(MessageType type, const char *msg_format,
+ va_list msg_args, const char *hdr_format, ...)
+_X_ATTRIBUTE_PRINTF(2, 0)
+_X_ATTRIBUTE_PRINTF(4, 5);
+
+extern _X_EXPORT void
+FreeAuditTimer(void);
+extern _X_EXPORT void
+AuditF(const char *f, ...)
+_X_ATTRIBUTE_PRINTF(1, 2);
+extern _X_EXPORT void
+VAuditF(const char *f, va_list args)
+_X_ATTRIBUTE_PRINTF(1, 0);
+extern _X_EXPORT void
+FatalError(const char *f, ...)
+_X_ATTRIBUTE_PRINTF(1, 2)
+ _X_NORETURN;
+
+#ifdef DEBUG
+#define DebugF ErrorF
+#else
+#define DebugF(...) /* */
+#endif
+
+extern _X_EXPORT void
+VErrorF(const char *f, va_list args)
+_X_ATTRIBUTE_PRINTF(1, 0);
+extern _X_EXPORT void
+ErrorF(const char *f, ...)
+_X_ATTRIBUTE_PRINTF(1, 2);
+extern _X_EXPORT void
+VErrorFSigSafe(const char *f, va_list args)
+_X_ATTRIBUTE_PRINTF(1, 0);
+extern _X_EXPORT void
+ErrorFSigSafe(const char *f, ...)
+_X_ATTRIBUTE_PRINTF(1, 2);
+extern _X_EXPORT void
+LogPrintMarkers(void);
+
+extern _X_EXPORT void
+xorg_backtrace(void);
+
+extern _X_EXPORT int
+os_move_fd(int fd);
+
+#endif /* OS_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/panoramiX.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/panoramiX.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/panoramiX.h (working copy)
@@ -0,0 +1,79 @@
+/*****************************************************************
+
+Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
+BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of Digital Equipment Corporation
+shall not be used in advertising or otherwise to promote the sale, use or other
+dealings in this Software without prior written authorization from Digital
+Equipment Corporation.
+
+******************************************************************/
+
+/* THIS IS NOT AN X PROJECT TEAM SPECIFICATION */
+
+/*
+ * PanoramiX definitions
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifndef _PANORAMIX_H_
+#define _PANORAMIX_H_
+
+#define _PANORAMIX_SERVER
+#include <X11/extensions/panoramiXproto.h>
+#undef _PANORAMIX_SERVER
+#include "gcstruct.h"
+#include "dixstruct.h"
+
+typedef struct _PanoramiXInfo {
+ XID id;
+} PanoramiXInfo;
+
+typedef struct {
+ PanoramiXInfo info[MAXSCREENS];
+ RESTYPE type;
+ union {
+ struct {
+ char visibility;
+ char class;
+ char root;
+ } win;
+ struct {
+ Bool shared;
+ } pix;
+ struct {
+ Bool root;
+ } pict;
+ char raw_data[4];
+ } u;
+} PanoramiXRes;
+
+#define FOR_NSCREENS_FORWARD(j) for(j = 0; j < PanoramiXNumScreens; j++)
+#define FOR_NSCREENS_FORWARD_SKIP(j) for(j = 1; j < PanoramiXNumScreens; j++)
+#define FOR_NSCREENS_BACKWARD(j) for(j = PanoramiXNumScreens - 1; j >= 0; j--)
+#define FOR_NSCREENS(j) FOR_NSCREENS_FORWARD(j)
+
+#define IS_SHARED_PIXMAP(r) (((r)->type == XRT_PIXMAP) && (r)->u.pix.shared)
+
+#define IS_ROOT_DRAWABLE(d) (((d)->type == XRT_WINDOW) && (d)->u.win.root)
+#endif /* _PANORAMIX_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/panoramiXsrv.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/panoramiXsrv.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/panoramiXsrv.h (working copy)
@@ -0,0 +1,63 @@
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifndef _PANORAMIXSRV_H_
+#define _PANORAMIXSRV_H_
+
+#include "panoramiX.h"
+
+extern _X_EXPORT int PanoramiXNumScreens;
+extern _X_EXPORT int PanoramiXPixWidth;
+extern _X_EXPORT int PanoramiXPixHeight;
+extern _X_EXPORT RegionRec PanoramiXScreenRegion;
+
+extern _X_EXPORT VisualID PanoramiXTranslateVisualID(int screen, VisualID orig);
+extern _X_EXPORT void PanoramiXConsolidate(void);
+extern _X_EXPORT Bool PanoramiXCreateConnectionBlock(void);
+extern _X_EXPORT PanoramiXRes *PanoramiXFindIDByScrnum(RESTYPE, XID, int);
+extern _X_EXPORT Bool
+XineramaRegisterConnectionBlockCallback(void (*func) (void));
+extern _X_EXPORT int XineramaDeleteResource(void *, XID);
+
+extern _X_EXPORT void XineramaReinitData(void);
+
+extern _X_EXPORT RESTYPE XRC_DRAWABLE;
+extern _X_EXPORT RESTYPE XRT_WINDOW;
+extern _X_EXPORT RESTYPE XRT_PIXMAP;
+extern _X_EXPORT RESTYPE XRT_GC;
+extern _X_EXPORT RESTYPE XRT_COLORMAP;
+extern _X_EXPORT RESTYPE XRT_PICTURE;
+
+/*
+ * Drivers are allowed to wrap this function. Each wrapper can decide that the
+ * two visuals are unequal, but if they are deemed equal, the wrapper must call
+ * down and return FALSE if the wrapped function does. This ensures that all
+ * layers agree that the visuals are equal. The first visual is always from
+ * screen 0.
+ */
+typedef Bool (*XineramaVisualsEqualProcPtr) (VisualPtr, ScreenPtr, VisualPtr);
+extern _X_EXPORT XineramaVisualsEqualProcPtr XineramaVisualsEqualPtr;
+
+extern _X_EXPORT void XineramaGetImageData(DrawablePtr *pDrawables,
+ int left,
+ int top,
+ int width,
+ int height,
+ unsigned int format,
+ unsigned long planemask,
+ char *data, int pitch, Bool isRoot);
+
+static inline void
+panoramix_setup_ids(PanoramiXRes * resource, ClientPtr client, XID base_id)
+{
+ int j;
+
+ resource->info[0].id = base_id;
+ FOR_NSCREENS_FORWARD_SKIP(j) {
+ resource->info[j].id = FakeClientID(client->index);
+ }
+}
+
+#endif /* _PANORAMIXSRV_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/picture.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/picture.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/picture.h (working copy)
@@ -0,0 +1,232 @@
+/*
+ *
+ * Copyright © 2000 SuSE, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of SuSE not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. SuSE makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
+ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Author: Keith Packard, SuSE, Inc.
+ */
+
+#ifndef _PICTURE_H_
+#define _PICTURE_H_
+
+#include "privates.h"
+
+#include <pixman.h>
+
+typedef struct _DirectFormat *DirectFormatPtr;
+typedef struct _PictFormat *PictFormatPtr;
+typedef struct _Picture *PicturePtr;
+
+/*
+ * While the protocol is generous in format support, the
+ * sample implementation allows only packed RGB and GBR
+ * representations for data to simplify software rendering,
+ */
+#define PICT_FORMAT(bpp,type,a,r,g,b) PIXMAN_FORMAT(bpp, type, a, r, g, b)
+
+/*
+ * gray/color formats use a visual index instead of argb
+ */
+#define PICT_VISFORMAT(bpp,type,vi) (((bpp) << 24) | \
+ ((type) << 16) | \
+ ((vi)))
+
+#define PICT_FORMAT_BPP(f) PIXMAN_FORMAT_BPP(f)
+#define PICT_FORMAT_TYPE(f) PIXMAN_FORMAT_TYPE(f)
+#define PICT_FORMAT_A(f) PIXMAN_FORMAT_A(f)
+#define PICT_FORMAT_R(f) PIXMAN_FORMAT_R(f)
+#define PICT_FORMAT_G(f) PIXMAN_FORMAT_G(f)
+#define PICT_FORMAT_B(f) PIXMAN_FORMAT_B(f)
+#define PICT_FORMAT_RGB(f) PIXMAN_FORMAT_RGB(f)
+#define PICT_FORMAT_VIS(f) PIXMAN_FORMAT_VIS(f)
+
+#define PICT_TYPE_OTHER PIXMAN_TYPE_OTHER
+#define PICT_TYPE_A PIXMAN_TYPE_A
+#define PICT_TYPE_ARGB PIXMAN_TYPE_ARGB
+#define PICT_TYPE_ABGR PIXMAN_TYPE_ABGR
+#define PICT_TYPE_COLOR PIXMAN_TYPE_COLOR
+#define PICT_TYPE_GRAY PIXMAN_TYPE_GRAY
+#define PICT_TYPE_BGRA PIXMAN_TYPE_BGRA
+
+#define PICT_FORMAT_COLOR(f) PIXMAN_FORMAT_COLOR(f)
+
+/* 32bpp formats */
+typedef enum _PictFormatShort {
+ PICT_a2r10g10b10 = PIXMAN_a2r10g10b10,
+ PICT_x2r10g10b10 = PIXMAN_x2r10g10b10,
+ PICT_a2b10g10r10 = PIXMAN_a2b10g10r10,
+ PICT_x2b10g10r10 = PIXMAN_x2b10g10r10,
+
+ PICT_a8r8g8b8 = PIXMAN_a8r8g8b8,
+ PICT_x8r8g8b8 = PIXMAN_x8r8g8b8,
+ PICT_a8b8g8r8 = PIXMAN_a8b8g8r8,
+ PICT_x8b8g8r8 = PIXMAN_x8b8g8r8,
+ PICT_b8g8r8a8 = PIXMAN_b8g8r8a8,
+ PICT_b8g8r8x8 = PIXMAN_b8g8r8x8,
+
+/* 24bpp formats */
+ PICT_r8g8b8 = PIXMAN_r8g8b8,
+ PICT_b8g8r8 = PIXMAN_b8g8r8,
+
+/* 16bpp formats */
+ PICT_r5g6b5 = PIXMAN_r5g6b5,
+ PICT_b5g6r5 = PIXMAN_b5g6r5,
+
+ PICT_a1r5g5b5 = PIXMAN_a1r5g5b5,
+ PICT_x1r5g5b5 = PIXMAN_x1r5g5b5,
+ PICT_a1b5g5r5 = PIXMAN_a1b5g5r5,
+ PICT_x1b5g5r5 = PIXMAN_x1b5g5r5,
+ PICT_a4r4g4b4 = PIXMAN_a4r4g4b4,
+ PICT_x4r4g4b4 = PIXMAN_x4r4g4b4,
+ PICT_a4b4g4r4 = PIXMAN_a4b4g4r4,
+ PICT_x4b4g4r4 = PIXMAN_x4b4g4r4,
+
+/* 8bpp formats */
+ PICT_a8 = PIXMAN_a8,
+ PICT_r3g3b2 = PIXMAN_r3g3b2,
+ PICT_b2g3r3 = PIXMAN_b2g3r3,
+ PICT_a2r2g2b2 = PIXMAN_a2r2g2b2,
+ PICT_a2b2g2r2 = PIXMAN_a2b2g2r2,
+
+ PICT_c8 = PIXMAN_c8,
+ PICT_g8 = PIXMAN_g8,
+
+ PICT_x4a4 = PIXMAN_x4a4,
+
+ PICT_x4c4 = PIXMAN_x4c4,
+ PICT_x4g4 = PIXMAN_x4g4,
+
+/* 4bpp formats */
+ PICT_a4 = PIXMAN_a4,
+ PICT_r1g2b1 = PIXMAN_r1g2b1,
+ PICT_b1g2r1 = PIXMAN_b1g2r1,
+ PICT_a1r1g1b1 = PIXMAN_a1r1g1b1,
+ PICT_a1b1g1r1 = PIXMAN_a1b1g1r1,
+
+ PICT_c4 = PIXMAN_c4,
+ PICT_g4 = PIXMAN_g4,
+
+/* 1bpp formats */
+ PICT_a1 = PIXMAN_a1,
+
+ PICT_g1 = PIXMAN_g1
+} PictFormatShort;
+
+/*
+ * For dynamic indexed visuals (GrayScale and PseudoColor), these control the
+ * selection of colors allocated for drawing to Pictures. The default
+ * policy depends on the size of the colormap:
+ *
+ * Size Default Policy
+ * ----------------------------
+ * < 64 PolicyMono
+ * < 256 PolicyGray
+ * 256 PolicyColor (only on PseudoColor)
+ *
+ * The actual allocation code lives in miindex.c, and so is
+ * austensibly server dependent, but that code does:
+ *
+ * PolicyMono Allocate no additional colors, use black and white
+ * PolicyGray Allocate 13 gray levels (11 cells used)
+ * PolicyColor Allocate a 4x4x4 cube and 13 gray levels (71 cells used)
+ * PolicyAll Allocate as big a cube as possible, fill with gray (all)
+ *
+ * Here's a picture to help understand how many colors are
+ * actually allocated (this is just the gray ramp):
+ *
+ * gray level
+ * all 0000 1555 2aaa 4000 5555 6aaa 8000 9555 aaaa bfff d555 eaaa ffff
+ * b/w 0000 ffff
+ * 4x4x4 5555 aaaa
+ * extra 1555 2aaa 4000 6aaa 8000 9555 bfff d555 eaaa
+ *
+ * The default colormap supplies two gray levels (black/white), the
+ * 4x4x4 cube allocates another two and nine more are allocated to fill
+ * in the 13 levels. When the 4x4x4 cube is not allocated, a total of
+ * 11 cells are allocated.
+ */
+
+#define PictureCmapPolicyInvalid -1
+#define PictureCmapPolicyDefault 0
+#define PictureCmapPolicyMono 1
+#define PictureCmapPolicyGray 2
+#define PictureCmapPolicyColor 3
+#define PictureCmapPolicyAll 4
+
+extern _X_EXPORT int PictureCmapPolicy;
+
+extern _X_EXPORT int PictureParseCmapPolicy(const char *name);
+
+extern _X_EXPORT int RenderErrBase;
+
+/* Fixed point updates from Carl Worth, USC, Information Sciences Institute */
+
+typedef pixman_fixed_32_32_t xFixed_32_32;
+
+typedef pixman_fixed_48_16_t xFixed_48_16;
+
+#define MAX_FIXED_48_16 pixman_max_fixed_48_16
+#define MIN_FIXED_48_16 pixman_min_fixed_48_16
+
+typedef pixman_fixed_1_31_t xFixed_1_31;
+typedef pixman_fixed_1_16_t xFixed_1_16;
+typedef pixman_fixed_16_16_t xFixed_16_16;
+
+/*
+ * An unadorned "xFixed" is the same as xFixed_16_16,
+ * (since it's quite common in the code)
+ */
+typedef pixman_fixed_t xFixed;
+
+#define XFIXED_BITS 16
+
+#define xFixedToInt(f) pixman_fixed_to_int(f)
+#define IntToxFixed(i) pixman_int_to_fixed(i)
+#define xFixedE pixman_fixed_e
+#define xFixed1 pixman_fixed_1
+#define xFixed1MinusE pixman_fixed_1_minus_e
+#define xFixedFrac(f) pixman_fixed_frac(f)
+#define xFixedFloor(f) pixman_fixed_floor(f)
+#define xFixedCeil(f) pixman_fixed_ceil(f)
+
+#define xFixedFraction(f) pixman_fixed_fraction(f)
+#define xFixedMod2(f) pixman_fixed_mod2(f)
+
+/* whether 't' is a well defined not obviously empty trapezoid */
+#define xTrapezoidValid(t) ((t)->left.p1.y != (t)->left.p2.y && \
+ (t)->right.p1.y != (t)->right.p2.y && \
+ (int) ((t)->bottom - (t)->top) > 0)
+
+/*
+ * Standard NTSC luminance conversions:
+ *
+ * y = r * 0.299 + g * 0.587 + b * 0.114
+ *
+ * Approximate this for a bit more speed:
+ *
+ * y = (r * 153 + g * 301 + b * 58) / 512
+ *
+ * This gives 17 bits of luminance; to get 15 bits, lop the low two
+ */
+
+#define CvtR8G8B8toY15(s) (((((s) >> 16) & 0xff) * 153 + \
+ (((s) >> 8) & 0xff) * 301 + \
+ (((s) ) & 0xff) * 58) >> 2)
+
+#endif /* _PICTURE_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/picturestr.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/picturestr.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/picturestr.h (working copy)
@@ -0,0 +1,614 @@
+/*
+ * Copyright © 2000 SuSE, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of SuSE not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. SuSE makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
+ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Author: Keith Packard, SuSE, Inc.
+ */
+
+#ifndef _PICTURESTR_H_
+#define _PICTURESTR_H_
+
+#include "scrnintstr.h"
+#include "glyphstr.h"
+#include "resource.h"
+#include "privates.h"
+
+typedef struct _DirectFormat {
+ CARD16 red, redMask;
+ CARD16 green, greenMask;
+ CARD16 blue, blueMask;
+ CARD16 alpha, alphaMask;
+} DirectFormatRec;
+
+typedef struct _IndexFormat {
+ VisualID vid;
+ ColormapPtr pColormap;
+ int nvalues;
+ xIndexValue *pValues;
+ void *devPrivate;
+} IndexFormatRec;
+
+typedef struct _PictFormat {
+ CARD32 id;
+ CARD32 format; /* except bpp */
+ unsigned char type;
+ unsigned char depth;
+ DirectFormatRec direct;
+ IndexFormatRec index;
+} PictFormatRec;
+
+typedef struct pixman_vector PictVector, *PictVectorPtr;
+typedef struct pixman_transform PictTransform, *PictTransformPtr;
+
+#define pict_f_vector pixman_f_vector
+#define pict_f_transform pixman_f_transform
+
+#define PICT_GRADIENT_STOPTABLE_SIZE 1024
+#define SourcePictTypeSolidFill 0
+#define SourcePictTypeLinear 1
+#define SourcePictTypeRadial 2
+#define SourcePictTypeConical 3
+
+typedef struct _PictSolidFill {
+ unsigned int type;
+ CARD32 color;
+} PictSolidFill, *PictSolidFillPtr;
+
+typedef struct _PictGradientStop {
+ xFixed x;
+ xRenderColor color;
+} PictGradientStop, *PictGradientStopPtr;
+
+typedef struct _PictGradient {
+ unsigned int type;
+ int nstops;
+ PictGradientStopPtr stops;
+} PictGradient, *PictGradientPtr;
+
+typedef struct _PictLinearGradient {
+ unsigned int type;
+ int nstops;
+ PictGradientStopPtr stops;
+ xPointFixed p1;
+ xPointFixed p2;
+} PictLinearGradient, *PictLinearGradientPtr;
+
+typedef struct _PictCircle {
+ xFixed x;
+ xFixed y;
+ xFixed radius;
+} PictCircle, *PictCirclePtr;
+
+typedef struct _PictRadialGradient {
+ unsigned int type;
+ int nstops;
+ PictGradientStopPtr stops;
+ PictCircle c1;
+ PictCircle c2;
+} PictRadialGradient, *PictRadialGradientPtr;
+
+typedef struct _PictConicalGradient {
+ unsigned int type;
+ int nstops;
+ PictGradientStopPtr stops;
+ xPointFixed center;
+ xFixed angle;
+} PictConicalGradient, *PictConicalGradientPtr;
+
+typedef union _SourcePict {
+ unsigned int type;
+ PictSolidFill solidFill;
+ PictGradient gradient;
+ PictLinearGradient linear;
+ PictRadialGradient radial;
+ PictConicalGradient conical;
+} SourcePict, *SourcePictPtr;
+
+typedef struct _Picture {
+ DrawablePtr pDrawable;
+ PictFormatPtr pFormat;
+ PictFormatShort format; /* PICT_FORMAT */
+ int refcnt;
+ CARD32 id;
+ unsigned int repeat:1;
+ unsigned int graphicsExposures:1;
+ unsigned int subWindowMode:1;
+ unsigned int polyEdge:1;
+ unsigned int polyMode:1;
+ unsigned int freeCompClip:1;
+ unsigned int clientClipType:2;
+ unsigned int componentAlpha:1;
+ unsigned int repeatType:2;
+ unsigned int filter:3;
+ unsigned int stateChanges:CPLastBit;
+ unsigned int unused:18 - CPLastBit;
+
+ PicturePtr pNext; /* chain on same drawable */
+
+ PicturePtr alphaMap;
+ DDXPointRec alphaOrigin;
+
+ DDXPointRec clipOrigin;
+ void *clientClip;
+
+ unsigned long serialNumber;
+
+ RegionPtr pCompositeClip;
+
+ PrivateRec *devPrivates;
+
+ PictTransform *transform;
+
+ SourcePictPtr pSourcePict;
+ xFixed *filter_params;
+ int filter_nparams;
+} PictureRec;
+
+typedef Bool (*PictFilterValidateParamsProcPtr) (ScreenPtr pScreen, int id,
+ xFixed * params, int nparams,
+ int *width, int *height);
+typedef struct {
+ char *name;
+ int id;
+ PictFilterValidateParamsProcPtr ValidateParams;
+ int width, height;
+} PictFilterRec, *PictFilterPtr;
+
+#define PictFilterNearest 0
+#define PictFilterBilinear 1
+
+#define PictFilterFast 2
+#define PictFilterGood 3
+#define PictFilterBest 4
+
+#define PictFilterConvolution 5
+/* if you add an 8th filter, expand the filter bitfield above */
+
+typedef struct {
+ char *alias;
+ int alias_id;
+ int filter_id;
+} PictFilterAliasRec, *PictFilterAliasPtr;
+
+typedef int (*CreatePictureProcPtr) (PicturePtr pPicture);
+typedef void (*DestroyPictureProcPtr) (PicturePtr pPicture);
+typedef int (*ChangePictureClipProcPtr) (PicturePtr pPicture,
+ int clipType, void *value, int n);
+typedef void (*DestroyPictureClipProcPtr) (PicturePtr pPicture);
+
+typedef int (*ChangePictureTransformProcPtr) (PicturePtr pPicture,
+ PictTransform * transform);
+
+typedef int (*ChangePictureFilterProcPtr) (PicturePtr pPicture,
+ int filter,
+ xFixed * params, int nparams);
+
+typedef void (*DestroyPictureFilterProcPtr) (PicturePtr pPicture);
+
+typedef void (*ChangePictureProcPtr) (PicturePtr pPicture, Mask mask);
+typedef void (*ValidatePictureProcPtr) (PicturePtr pPicture, Mask mask);
+typedef void (*CompositeProcPtr) (CARD8 op,
+ PicturePtr pSrc,
+ PicturePtr pMask,
+ PicturePtr pDst,
+ INT16 xSrc,
+ INT16 ySrc,
+ INT16 xMask,
+ INT16 yMask,
+ INT16 xDst,
+ INT16 yDst, CARD16 width, CARD16 height);
+
+typedef void (*GlyphsProcPtr) (CARD8 op,
+ PicturePtr pSrc,
+ PicturePtr pDst,
+ PictFormatPtr maskFormat,
+ INT16 xSrc,
+ INT16 ySrc,
+ int nlists,
+ GlyphListPtr lists, GlyphPtr * glyphs);
+
+typedef void (*CompositeRectsProcPtr) (CARD8 op,
+ PicturePtr pDst,
+ xRenderColor * color,
+ int nRect, xRectangle *rects);
+
+typedef void (*RasterizeTrapezoidProcPtr) (PicturePtr pMask,
+ xTrapezoid * trap,
+ int x_off, int y_off);
+
+typedef void (*TrapezoidsProcPtr) (CARD8 op,
+ PicturePtr pSrc,
+ PicturePtr pDst,
+ PictFormatPtr maskFormat,
+ INT16 xSrc,
+ INT16 ySrc, int ntrap, xTrapezoid * traps);
+
+typedef void (*TrianglesProcPtr) (CARD8 op,
+ PicturePtr pSrc,
+ PicturePtr pDst,
+ PictFormatPtr maskFormat,
+ INT16 xSrc,
+ INT16 ySrc, int ntri, xTriangle * tris);
+
+typedef void (*TriStripProcPtr) (CARD8 op,
+ PicturePtr pSrc,
+ PicturePtr pDst,
+ PictFormatPtr maskFormat,
+ INT16 xSrc,
+ INT16 ySrc, int npoint, xPointFixed * points);
+
+typedef void (*TriFanProcPtr) (CARD8 op,
+ PicturePtr pSrc,
+ PicturePtr pDst,
+ PictFormatPtr maskFormat,
+ INT16 xSrc,
+ INT16 ySrc, int npoint, xPointFixed * points);
+
+typedef Bool (*InitIndexedProcPtr) (ScreenPtr pScreen, PictFormatPtr pFormat);
+
+typedef void (*CloseIndexedProcPtr) (ScreenPtr pScreen, PictFormatPtr pFormat);
+
+typedef void (*UpdateIndexedProcPtr) (ScreenPtr pScreen,
+ PictFormatPtr pFormat,
+ int ndef, xColorItem * pdef);
+
+typedef void (*AddTrapsProcPtr) (PicturePtr pPicture,
+ INT16 xOff,
+ INT16 yOff, int ntrap, xTrap * traps);
+
+typedef void (*AddTrianglesProcPtr) (PicturePtr pPicture,
+ INT16 xOff,
+ INT16 yOff, int ntri, xTriangle * tris);
+
+typedef Bool (*RealizeGlyphProcPtr) (ScreenPtr pScreen, GlyphPtr glyph);
+
+typedef void (*UnrealizeGlyphProcPtr) (ScreenPtr pScreen, GlyphPtr glyph);
+
+typedef struct _PictureScreen {
+ PictFormatPtr formats;
+ PictFormatPtr fallback;
+ int nformats;
+
+ CreatePictureProcPtr CreatePicture;
+ DestroyPictureProcPtr DestroyPicture;
+ ChangePictureClipProcPtr ChangePictureClip;
+ DestroyPictureClipProcPtr DestroyPictureClip;
+
+ ChangePictureProcPtr ChangePicture;
+ ValidatePictureProcPtr ValidatePicture;
+
+ CompositeProcPtr Composite;
+ GlyphsProcPtr Glyphs; /* unused */
+ CompositeRectsProcPtr CompositeRects;
+
+ DestroyWindowProcPtr DestroyWindow;
+ CloseScreenProcPtr CloseScreen;
+
+ StoreColorsProcPtr StoreColors;
+
+ InitIndexedProcPtr InitIndexed;
+ CloseIndexedProcPtr CloseIndexed;
+ UpdateIndexedProcPtr UpdateIndexed;
+
+ int subpixel;
+
+ PictFilterPtr filters;
+ int nfilters;
+ PictFilterAliasPtr filterAliases;
+ int nfilterAliases;
+
+ /**
+ * Called immediately after a picture's transform is changed through the
+ * SetPictureTransform request. Not called for source-only pictures.
+ */
+ ChangePictureTransformProcPtr ChangePictureTransform;
+
+ /**
+ * Called immediately after a picture's transform is changed through the
+ * SetPictureFilter request. Not called for source-only pictures.
+ */
+ ChangePictureFilterProcPtr ChangePictureFilter;
+
+ DestroyPictureFilterProcPtr DestroyPictureFilter;
+
+ TrapezoidsProcPtr Trapezoids;
+ TrianglesProcPtr Triangles;
+
+ RasterizeTrapezoidProcPtr RasterizeTrapezoid;
+
+ AddTrianglesProcPtr AddTriangles;
+
+ AddTrapsProcPtr AddTraps;
+
+ RealizeGlyphProcPtr RealizeGlyph;
+ UnrealizeGlyphProcPtr UnrealizeGlyph;
+
+#define PICTURE_SCREEN_VERSION 2
+ TriStripProcPtr TriStrip;
+ TriFanProcPtr TriFan;
+} PictureScreenRec, *PictureScreenPtr;
+
+extern _X_EXPORT DevPrivateKeyRec PictureScreenPrivateKeyRec;
+
+#define PictureScreenPrivateKey (&PictureScreenPrivateKeyRec)
+
+extern _X_EXPORT DevPrivateKeyRec PictureWindowPrivateKeyRec;
+
+#define PictureWindowPrivateKey (&PictureWindowPrivateKeyRec)
+
+extern _X_EXPORT RESTYPE PictureType;
+extern _X_EXPORT RESTYPE PictFormatType;
+extern _X_EXPORT RESTYPE GlyphSetType;
+
+#define GetPictureScreen(s) ((PictureScreenPtr)dixLookupPrivate(&(s)->devPrivates, PictureScreenPrivateKey))
+#define GetPictureScreenIfSet(s) (dixPrivateKeyRegistered(PictureScreenPrivateKey) ? GetPictureScreen(s) : NULL)
+#define SetPictureScreen(s,p) dixSetPrivate(&(s)->devPrivates, PictureScreenPrivateKey, p)
+#define GetPictureWindow(w) ((PicturePtr)dixLookupPrivate(&(w)->devPrivates, PictureWindowPrivateKey))
+#define SetPictureWindow(w,p) dixSetPrivate(&(w)->devPrivates, PictureWindowPrivateKey, p)
+
+#define VERIFY_PICTURE(pPicture, pid, client, mode) {\
+ int tmprc = dixLookupResourceByType((void *)&(pPicture), pid,\
+ PictureType, client, mode);\
+ if (tmprc != Success)\
+ return tmprc;\
+}
+
+#define VERIFY_ALPHA(pPicture, pid, client, mode) {\
+ if (pid == None) \
+ pPicture = 0; \
+ else { \
+ VERIFY_PICTURE(pPicture, pid, client, mode); \
+ } \
+} \
+
+extern _X_EXPORT PictFormatPtr
+ PictureWindowFormat(WindowPtr pWindow);
+
+extern _X_EXPORT Bool
+ PictureDestroyWindow(WindowPtr pWindow);
+
+extern _X_EXPORT Bool
+ PictureCloseScreen(ScreenPtr pScreen);
+
+extern _X_EXPORT void
+ PictureStoreColors(ColormapPtr pColormap, int ndef, xColorItem * pdef);
+
+extern _X_EXPORT Bool
+ PictureInitIndexedFormat(ScreenPtr pScreen, PictFormatPtr format);
+
+extern _X_EXPORT Bool
+ PictureSetSubpixelOrder(ScreenPtr pScreen, int subpixel);
+
+extern _X_EXPORT int
+ PictureGetSubpixelOrder(ScreenPtr pScreen);
+
+extern _X_EXPORT PictFormatPtr
+PictureCreateDefaultFormats(ScreenPtr pScreen, int *nformatp);
+
+extern _X_EXPORT PictFormatPtr
+PictureMatchVisual(ScreenPtr pScreen, int depth, VisualPtr pVisual);
+
+extern _X_EXPORT PictFormatPtr
+PictureMatchFormat(ScreenPtr pScreen, int depth, CARD32 format);
+
+extern _X_EXPORT Bool
+ PictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats);
+
+extern _X_EXPORT int
+ PictureGetFilterId(const char *filter, int len, Bool makeit);
+
+extern _X_EXPORT char *PictureGetFilterName(int id);
+
+extern _X_EXPORT int
+
+PictureAddFilter(ScreenPtr pScreen,
+ const char *filter,
+ PictFilterValidateParamsProcPtr ValidateParams,
+ int width, int height);
+
+extern _X_EXPORT Bool
+
+PictureSetFilterAlias(ScreenPtr pScreen, const char *filter, const char *alias);
+
+extern _X_EXPORT Bool
+ PictureSetDefaultFilters(ScreenPtr pScreen);
+
+extern _X_EXPORT void
+ PictureResetFilters(ScreenPtr pScreen);
+
+extern _X_EXPORT PictFilterPtr
+PictureFindFilter(ScreenPtr pScreen, char *name, int len);
+
+extern _X_EXPORT int
+
+SetPicturePictFilter(PicturePtr pPicture, PictFilterPtr pFilter,
+ xFixed * params, int nparams);
+
+extern _X_EXPORT int
+
+SetPictureFilter(PicturePtr pPicture, char *name, int len,
+ xFixed * params, int nparams);
+
+extern _X_EXPORT Bool
+ PictureFinishInit(void);
+
+extern _X_EXPORT void
+ SetPictureToDefaults(PicturePtr pPicture);
+
+extern _X_EXPORT PicturePtr
+CreatePicture(Picture pid,
+ DrawablePtr pDrawable,
+ PictFormatPtr pFormat,
+ Mask mask, XID *list, ClientPtr client, int *error);
+
+extern _X_EXPORT int
+
+ChangePicture(PicturePtr pPicture,
+ Mask vmask, XID *vlist, DevUnion *ulist, ClientPtr client);
+
+extern _X_EXPORT int
+
+SetPictureClipRects(PicturePtr pPicture,
+ int xOrigin, int yOrigin, int nRect, xRectangle *rects);
+
+extern _X_EXPORT int
+
+SetPictureClipRegion(PicturePtr pPicture,
+ int xOrigin, int yOrigin, RegionPtr pRegion);
+
+extern _X_EXPORT int
+ SetPictureTransform(PicturePtr pPicture, PictTransform * transform);
+
+extern _X_EXPORT void
+ CopyPicture(PicturePtr pSrc, Mask mask, PicturePtr pDst);
+
+extern _X_EXPORT void
+ ValidatePicture(PicturePtr pPicture);
+
+extern _X_EXPORT int
+ FreePicture(void *pPicture, XID pid);
+
+extern _X_EXPORT int
+ FreePictFormat(void *pPictFormat, XID pid);
+
+extern _X_EXPORT void
+
+CompositePicture(CARD8 op,
+ PicturePtr pSrc,
+ PicturePtr pMask,
+ PicturePtr pDst,
+ INT16 xSrc,
+ INT16 ySrc,
+ INT16 xMask,
+ INT16 yMask,
+ INT16 xDst, INT16 yDst, CARD16 width, CARD16 height);
+
+extern _X_EXPORT void
+
+CompositeGlyphs(CARD8 op,
+ PicturePtr pSrc,
+ PicturePtr pDst,
+ PictFormatPtr maskFormat,
+ INT16 xSrc,
+ INT16 ySrc, int nlist, GlyphListPtr lists, GlyphPtr * glyphs);
+
+extern _X_EXPORT void
+
+CompositeRects(CARD8 op,
+ PicturePtr pDst,
+ xRenderColor * color, int nRect, xRectangle *rects);
+
+extern _X_EXPORT void
+
+CompositeTrapezoids(CARD8 op,
+ PicturePtr pSrc,
+ PicturePtr pDst,
+ PictFormatPtr maskFormat,
+ INT16 xSrc, INT16 ySrc, int ntrap, xTrapezoid * traps);
+
+extern _X_EXPORT void
+
+CompositeTriangles(CARD8 op,
+ PicturePtr pSrc,
+ PicturePtr pDst,
+ PictFormatPtr maskFormat,
+ INT16 xSrc,
+ INT16 ySrc, int ntriangles, xTriangle * triangles);
+
+extern _X_EXPORT void
+
+CompositeTriStrip(CARD8 op,
+ PicturePtr pSrc,
+ PicturePtr pDst,
+ PictFormatPtr maskFormat,
+ INT16 xSrc, INT16 ySrc, int npoints, xPointFixed * points);
+
+extern _X_EXPORT void
+
+CompositeTriFan(CARD8 op,
+ PicturePtr pSrc,
+ PicturePtr pDst,
+ PictFormatPtr maskFormat,
+ INT16 xSrc, INT16 ySrc, int npoints, xPointFixed * points);
+
+Bool
+ AnimCurInit(ScreenPtr pScreen);
+
+int
+
+AnimCursorCreate(CursorPtr *cursors, CARD32 *deltas, int ncursor,
+ CursorPtr *ppCursor, ClientPtr client, XID cid);
+
+extern _X_EXPORT void
+
+AddTraps(PicturePtr pPicture,
+ INT16 xOff, INT16 yOff, int ntraps, xTrap * traps);
+
+extern _X_EXPORT PicturePtr
+CreateSolidPicture(Picture pid, xRenderColor * color, int *error);
+
+extern _X_EXPORT PicturePtr
+CreateLinearGradientPicture(Picture pid,
+ xPointFixed * p1,
+ xPointFixed * p2,
+ int nStops,
+ xFixed * stops, xRenderColor * colors, int *error);
+
+extern _X_EXPORT PicturePtr
+CreateRadialGradientPicture(Picture pid,
+ xPointFixed * inner,
+ xPointFixed * outer,
+ xFixed innerRadius,
+ xFixed outerRadius,
+ int nStops,
+ xFixed * stops, xRenderColor * colors, int *error);
+
+extern _X_EXPORT PicturePtr
+CreateConicalGradientPicture(Picture pid,
+ xPointFixed * center,
+ xFixed angle,
+ int nStops,
+ xFixed * stops, xRenderColor * colors, int *error);
+
+#ifdef PANORAMIX
+extern _X_EXPORT void PanoramiXRenderInit(void);
+extern _X_EXPORT void PanoramiXRenderReset(void);
+#endif
+
+/*
+ * matrix.c
+ */
+
+extern _X_EXPORT void
+
+PictTransform_from_xRenderTransform(PictTransformPtr pict,
+ xRenderTransform * render);
+
+extern _X_EXPORT void
+
+xRenderTransform_from_PictTransform(xRenderTransform * render,
+ PictTransformPtr pict);
+
+extern _X_EXPORT Bool
+ PictureTransformPoint(PictTransformPtr transform, PictVectorPtr vector);
+
+extern _X_EXPORT Bool
+ PictureTransformPoint3d(PictTransformPtr transform, PictVectorPtr vector);
+
+#endif /* _PICTURESTR_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/pixmap.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/pixmap.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/pixmap.h (working copy)
@@ -0,0 +1,131 @@
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef PIXMAP_H
+#define PIXMAP_H
+
+#include "misc.h"
+#include "screenint.h"
+#include "regionstr.h"
+
+/* types for Drawable */
+#define DRAWABLE_WINDOW 0
+#define DRAWABLE_PIXMAP 1
+#define UNDRAWABLE_WINDOW 2
+
+/* corresponding type masks for dixLookupDrawable() */
+#define M_DRAWABLE_WINDOW (1<<0)
+#define M_DRAWABLE_PIXMAP (1<<1)
+#define M_UNDRAWABLE_WINDOW (1<<2)
+#define M_ANY (-1)
+#define M_WINDOW (M_DRAWABLE_WINDOW|M_UNDRAWABLE_WINDOW)
+#define M_DRAWABLE (M_DRAWABLE_WINDOW|M_DRAWABLE_PIXMAP)
+#define M_UNDRAWABLE (M_UNDRAWABLE_WINDOW)
+
+/* flags to PaintWindow() */
+#define PW_BACKGROUND 0
+#define PW_BORDER 1
+
+#define NullPixmap ((PixmapPtr)0)
+
+typedef struct _Drawable *DrawablePtr;
+typedef struct _Pixmap *PixmapPtr;
+
+typedef struct _PixmapDirtyUpdate *PixmapDirtyUpdatePtr;
+
+typedef union _PixUnion {
+ PixmapPtr pixmap;
+ unsigned long pixel;
+} PixUnion;
+
+#define SamePixUnion(a,b,isPixel)\
+ ((isPixel) ? (a).pixel == (b).pixel : (a).pixmap == (b).pixmap)
+
+#define EqualPixUnion(as, a, bs, b) \
+ ((as) == (bs) && (SamePixUnion (a, b, as)))
+
+#define OnScreenDrawable(type) \
+ (type == DRAWABLE_WINDOW)
+
+#define WindowDrawable(type) \
+ ((type == DRAWABLE_WINDOW) || (type == UNDRAWABLE_WINDOW))
+
+extern _X_EXPORT PixmapPtr GetScratchPixmapHeader(ScreenPtr /*pScreen */ ,
+ int /*width */ ,
+ int /*height */ ,
+ int /*depth */ ,
+ int /*bitsPerPixel */ ,
+ int /*devKind */ ,
+ void */*pPixData */ );
+
+extern _X_EXPORT void FreeScratchPixmapHeader(PixmapPtr /*pPixmap */ );
+
+extern _X_EXPORT Bool CreateScratchPixmapsForScreen(ScreenPtr /*pScreen */ );
+
+extern _X_EXPORT void FreeScratchPixmapsForScreen(ScreenPtr /*pScreen */ );
+
+extern _X_EXPORT PixmapPtr AllocatePixmap(ScreenPtr /*pScreen */ ,
+ int /*pixDataSize */ );
+
+extern _X_EXPORT void FreePixmap(PixmapPtr /*pPixmap */ );
+
+extern _X_EXPORT PixmapPtr
+PixmapShareToSlave(PixmapPtr pixmap, ScreenPtr slave);
+
+extern _X_EXPORT Bool
+PixmapStartDirtyTracking(PixmapPtr src,
+ PixmapPtr slave_dst,
+ int x, int y);
+
+extern _X_EXPORT Bool
+PixmapStopDirtyTracking(PixmapPtr src, PixmapPtr slave_dst);
+
+/* helper function, drivers can do this themselves if they can do it more
+ efficently */
+extern _X_EXPORT Bool
+PixmapSyncDirtyHelper(PixmapDirtyUpdatePtr dirty, RegionPtr dirty_region);
+
+#endif /* PIXMAP_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/pixmapstr.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/pixmapstr.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/pixmapstr.h (working copy)
@@ -0,0 +1,115 @@
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef PIXMAPSTRUCT_H
+#define PIXMAPSTRUCT_H
+#include "pixmap.h"
+#include "screenint.h"
+#include "regionstr.h"
+#include "privates.h"
+#include "damage.h"
+
+typedef struct _Drawable {
+ unsigned char type; /* DRAWABLE_<type> */
+ unsigned char class; /* specific to type */
+ unsigned char depth;
+ unsigned char bitsPerPixel;
+ XID id; /* resource id */
+ short x; /* window: screen absolute, pixmap: 0 */
+ short y; /* window: screen absolute, pixmap: 0 */
+ unsigned short width;
+ unsigned short height;
+ ScreenPtr pScreen;
+ unsigned long serialNumber;
+} DrawableRec;
+
+/*
+ * PIXMAP -- device dependent
+ */
+
+typedef struct _Pixmap {
+ DrawableRec drawable;
+ PrivateRec *devPrivates;
+ int refcnt;
+ int devKind; /* This is the pitch of the pixmap, typically width*bpp/8. */
+ DevUnion devPrivate; /* When !NULL, devPrivate.ptr points to the raw pixel data. */
+#ifdef COMPOSITE
+ short screen_x;
+ short screen_y;
+#endif
+ unsigned usage_hint; /* see CREATE_PIXMAP_USAGE_* */
+
+ PixmapPtr master_pixmap; /* pointer to master copy of pixmap for pixmap sharing */
+} PixmapRec;
+
+typedef struct _PixmapDirtyUpdate {
+ PixmapPtr src, slave_dst;
+ int x, y;
+ DamagePtr damage;
+ struct xorg_list ent;
+} PixmapDirtyUpdateRec;
+
+static inline void
+PixmapBox(BoxPtr box, PixmapPtr pixmap)
+{
+ box->x1 = 0;
+ box->x2 = pixmap->drawable.width;
+
+ box->y1 = 0;
+ box->y2 = pixmap->drawable.height;
+}
+
+
+static inline void
+PixmapRegionInit(RegionPtr region, PixmapPtr pixmap)
+{
+ BoxRec box;
+
+ PixmapBox(&box, pixmap);
+ RegionInit(region, &box, 1);
+}
+
+#endif /* PIXMAPSTRUCT_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/present.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/present.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/present.h (working copy)
@@ -0,0 +1,127 @@
+/*
+ * Copyright © 2013 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no representations
+ * about the suitability of this software for any purpose. It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+#ifndef _PRESENT_H_
+#define _PRESENT_H_
+
+#include <X11/extensions/presentproto.h>
+#include "randrstr.h"
+#include "presentext.h"
+
+typedef struct present_vblank present_vblank_rec, *present_vblank_ptr;
+
+/* Return the current CRTC for 'window'.
+ */
+typedef RRCrtcPtr (*present_get_crtc_ptr) (WindowPtr window);
+
+/* Return the current ust/msc for 'crtc'
+ */
+typedef int (*present_get_ust_msc_ptr) (RRCrtcPtr crtc, uint64_t *ust, uint64_t *msc);
+
+/* Queue callback on 'crtc' for time 'msc'. Call present_event_notify with 'event_id'
+ * at or after 'msc'. Return false if it didn't happen (which might occur if 'crtc'
+ * is not currently generating vblanks).
+ */
+typedef Bool (*present_queue_vblank_ptr) (RRCrtcPtr crtc,
+ uint64_t event_id,
+ uint64_t msc);
+
+/* Abort pending vblank. The extension is no longer interested in
+ * 'event_id' which was to be notified at 'msc'. If possible, the
+ * driver is free to de-queue the notification.
+ */
+typedef void (*present_abort_vblank_ptr) (RRCrtcPtr crtc, uint64_t event_id, uint64_t msc);
+
+/* Flush pending drawing on 'window' to the hardware.
+ */
+typedef void (*present_flush_ptr) (WindowPtr window);
+
+/* Check if 'pixmap' is suitable for flipping to 'window'.
+ */
+typedef Bool (*present_check_flip_ptr) (RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap, Bool sync_flip);
+
+/* Flip pixmap, return false if it didn't happen.
+ *
+ * 'crtc' is to be used for any necessary synchronization.
+ *
+ * 'sync_flip' requests that the flip be performed at the next
+ * vertical blank interval to avoid tearing artifacts. If false, the
+ * flip should be performed as soon as possible.
+ *
+ * present_event_notify should be called with 'event_id' when the flip
+ * occurs
+ */
+typedef Bool (*present_flip_ptr) (RRCrtcPtr crtc,
+ uint64_t event_id,
+ uint64_t target_msc,
+ PixmapPtr pixmap,
+ Bool sync_flip);
+
+/* "unflip" back to the regular screen scanout buffer
+ *
+ * present_event_notify should be called with 'event_id' when the unflip occurs.
+ */
+typedef void (*present_unflip_ptr) (ScreenPtr screen,
+ uint64_t event_id);
+
+#define PRESENT_SCREEN_INFO_VERSION 0
+
+typedef struct present_screen_info {
+ uint32_t version;
+
+ present_get_crtc_ptr get_crtc;
+ present_get_ust_msc_ptr get_ust_msc;
+ present_queue_vblank_ptr queue_vblank;
+ present_abort_vblank_ptr abort_vblank;
+ present_flush_ptr flush;
+ uint32_t capabilities;
+ present_check_flip_ptr check_flip;
+ present_flip_ptr flip;
+ present_unflip_ptr unflip;
+
+} present_screen_info_rec, *present_screen_info_ptr;
+
+/*
+ * Called when 'event_id' occurs. 'ust' and 'msc' indicate when the
+ * event actually happened
+ */
+extern _X_EXPORT void
+present_event_notify(uint64_t event_id, uint64_t ust, uint64_t msc);
+
+/* 'crtc' has been turned off, so any pending events will never occur.
+ */
+extern _X_EXPORT void
+present_event_abandon(RRCrtcPtr crtc);
+
+extern _X_EXPORT Bool
+present_screen_init(ScreenPtr screen, present_screen_info_ptr info);
+
+typedef void (*present_complete_notify_proc)(WindowPtr window,
+ CARD8 mode,
+ CARD32 serial,
+ uint64_t ust,
+ uint64_t msc);
+
+extern _X_EXPORT void
+present_register_complete_notify(present_complete_notify_proc proc);
+
+#endif /* _PRESENT_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/presentext.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/presentext.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/presentext.h (working copy)
@@ -0,0 +1,29 @@
+/*
+ * Copyright © 2013 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no representations
+ * about the suitability of this software for any purpose. It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+#ifndef _PRESENTEXT_H_
+#define _PRESENTEXT_H_
+
+extern _X_EXPORT void
+present_extension_init(void);
+
+#endif /* _PRESENTEXT_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/privates.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/privates.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/privates.h (working copy)
@@ -0,0 +1,361 @@
+/***********************************************************
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+******************************************************************/
+
+#ifndef PRIVATES_H
+#define PRIVATES_H 1
+
+#include <X11/Xdefs.h>
+#include <X11/Xosdefs.h>
+#include <X11/Xfuncproto.h>
+#include "misc.h"
+
+/*****************************************************************
+ * STUFF FOR PRIVATES
+ *****************************************************************/
+
+typedef struct _Private PrivateRec, *PrivatePtr;
+
+typedef enum {
+ /* XSELinux uses the same private keys for numerous objects */
+ PRIVATE_XSELINUX,
+
+ /* Otherwise, you get a private in just the requested structure
+ */
+ /* These can have objects created before all of the keys are registered */
+ PRIVATE_SCREEN,
+ PRIVATE_EXTENSION,
+ PRIVATE_COLORMAP,
+ PRIVATE_DEVICE,
+
+ /* These cannot have any objects before all relevant keys are registered */
+ PRIVATE_CLIENT,
+ PRIVATE_PROPERTY,
+ PRIVATE_SELECTION,
+ PRIVATE_WINDOW,
+ PRIVATE_PIXMAP,
+ PRIVATE_GC,
+ PRIVATE_CURSOR,
+ PRIVATE_CURSOR_BITS,
+
+ /* extension privates */
+ PRIVATE_DAMAGE,
+ PRIVATE_GLYPH,
+ PRIVATE_GLYPHSET,
+ PRIVATE_PICTURE,
+ PRIVATE_SYNC_FENCE,
+
+ /* last private type */
+ PRIVATE_LAST,
+} DevPrivateType;
+
+typedef struct _DevPrivateKeyRec {
+ int offset;
+ int size;
+ Bool initialized;
+ Bool allocated;
+ DevPrivateType type;
+ struct _DevPrivateKeyRec *next;
+} DevPrivateKeyRec, *DevPrivateKey;
+
+typedef struct _DevPrivateSetRec {
+ DevPrivateKey key;
+ unsigned offset;
+ int created;
+ int allocated;
+} DevPrivateSetRec, *DevPrivateSetPtr;
+
+typedef struct _DevScreenPrivateKeyRec {
+ DevPrivateKeyRec screenKey;
+} DevScreenPrivateKeyRec, *DevScreenPrivateKey;
+
+/*
+ * Let drivers know how to initialize private keys
+ */
+
+#define HAS_DEVPRIVATEKEYREC 1
+#define HAS_DIXREGISTERPRIVATEKEY 1
+
+/*
+ * Register a new private index for the private type.
+ *
+ * This initializes the specified key and optionally requests pre-allocated
+ * private space for your driver/module. If you request no extra space, you
+ * may set and get a single pointer value using this private key. Otherwise,
+ * you can get the address of the extra space and store whatever data you like
+ * there.
+ *
+ * You may call dixRegisterPrivateKey more than once on the same key, but the
+ * size and type must match or the server will abort.
+ *
+ * dixRegisterPrivateKey returns FALSE if it fails to allocate memory
+ * during its operation.
+ */
+extern _X_EXPORT Bool
+ dixRegisterPrivateKey(DevPrivateKey key, DevPrivateType type, unsigned size);
+
+/*
+ * Check whether a private key has been registered
+ */
+static inline Bool
+dixPrivateKeyRegistered(DevPrivateKey key)
+{
+ return key->initialized;
+}
+
+/*
+ * Get the address of the private storage.
+ *
+ * For keys with pre-defined storage, this gets the base of that storage
+ * Otherwise, it returns the place where the private pointer is stored.
+ */
+static inline void *
+dixGetPrivateAddr(PrivatePtr *privates, const DevPrivateKey key)
+{
+ assert(key->initialized);
+ return (char *) (*privates) + key->offset;
+}
+
+/*
+ * Fetch a private pointer stored in the object
+ *
+ * Returns the pointer stored with dixSetPrivate.
+ * This must only be used with keys that have
+ * no pre-defined storage
+ */
+static inline void *
+dixGetPrivate(PrivatePtr *privates, const DevPrivateKey key)
+{
+ assert(key->size == 0);
+ return *(void **) dixGetPrivateAddr(privates, key);
+}
+
+/*
+ * Associate 'val' with 'key' in 'privates' so that later calls to
+ * dixLookupPrivate(privates, key) will return 'val'.
+ */
+static inline void
+dixSetPrivate(PrivatePtr *privates, const DevPrivateKey key, void *val)
+{
+ assert(key->size == 0);
+ *(void **) dixGetPrivateAddr(privates, key) = val;
+}
+
+#include "dix.h"
+#include "resource.h"
+
+/*
+ * Lookup a pointer to the private record.
+ *
+ * For privates with defined storage, return the address of the
+ * storage. For privates without defined storage, return the pointer
+ * contents
+ */
+static inline void *
+dixLookupPrivate(PrivatePtr *privates, const DevPrivateKey key)
+{
+ if (key->size)
+ return dixGetPrivateAddr(privates, key);
+ else
+ return dixGetPrivate(privates, key);
+}
+
+/*
+ * Look up the address of the pointer to the storage
+ *
+ * This returns the place where the private pointer is stored,
+ * which is only valid for privates without predefined storage.
+ */
+static inline void **
+dixLookupPrivateAddr(PrivatePtr *privates, const DevPrivateKey key)
+{
+ assert(key->size == 0);
+ return (void **) dixGetPrivateAddr(privates, key);
+}
+
+extern _X_EXPORT Bool
+
+dixRegisterScreenPrivateKey(DevScreenPrivateKey key, ScreenPtr pScreen,
+ DevPrivateType type, unsigned size);
+
+extern _X_EXPORT DevPrivateKey
+ _dixGetScreenPrivateKey(const DevScreenPrivateKey key, ScreenPtr pScreen);
+
+static inline void *
+dixGetScreenPrivateAddr(PrivatePtr *privates, const DevScreenPrivateKey key,
+ ScreenPtr pScreen)
+{
+ return dixGetPrivateAddr(privates, _dixGetScreenPrivateKey(key, pScreen));
+}
+
+static inline void *
+dixGetScreenPrivate(PrivatePtr *privates, const DevScreenPrivateKey key,
+ ScreenPtr pScreen)
+{
+ return dixGetPrivate(privates, _dixGetScreenPrivateKey(key, pScreen));
+}
+
+static inline void
+dixSetScreenPrivate(PrivatePtr *privates, const DevScreenPrivateKey key,
+ ScreenPtr pScreen, void *val)
+{
+ dixSetPrivate(privates, _dixGetScreenPrivateKey(key, pScreen), val);
+}
+
+static inline void *
+dixLookupScreenPrivate(PrivatePtr *privates, const DevScreenPrivateKey key,
+ ScreenPtr pScreen)
+{
+ return dixLookupPrivate(privates, _dixGetScreenPrivateKey(key, pScreen));
+}
+
+static inline void **
+dixLookupScreenPrivateAddr(PrivatePtr *privates, const DevScreenPrivateKey key,
+ ScreenPtr pScreen)
+{
+ return dixLookupPrivateAddr(privates,
+ _dixGetScreenPrivateKey(key, pScreen));
+}
+
+/*
+ * These functions relate to allocations related to a specific screen;
+ * space will only be available for objects allocated for use on that
+ * screen. As such, only objects which are related directly to a specific
+ * screen are candidates for allocation this way, this includes
+ * windows, pixmaps, gcs, pictures and colormaps. This key is
+ * used just like any other key using dixGetPrivate and friends.
+ *
+ * This is distinctly different from the ScreenPrivateKeys above which
+ * allocate space in global objects like cursor bits for a specific
+ * screen, allowing multiple screen-related chunks of storage in a
+ * single global object.
+ */
+
+#define HAVE_SCREEN_SPECIFIC_PRIVATE_KEYS 1
+
+extern _X_EXPORT Bool
+dixRegisterScreenSpecificPrivateKey(ScreenPtr pScreen, DevPrivateKey key,
+ DevPrivateType type, unsigned size);
+
+/* Clean up screen-specific privates before CloseScreen */
+extern void
+dixFreeScreenSpecificPrivates(ScreenPtr pScreen);
+
+/* Initialize screen-specific privates in AddScreen */
+extern void
+dixInitScreenSpecificPrivates(ScreenPtr pScreen);
+
+extern _X_EXPORT void *
+_dixAllocateScreenObjectWithPrivates(ScreenPtr pScreen,
+ unsigned size,
+ unsigned clear,
+ unsigned offset,
+ DevPrivateType type);
+
+#define dixAllocateScreenObjectWithPrivates(s, t, type) _dixAllocateScreenObjectWithPrivates(s, sizeof(t), sizeof(t), offsetof(t, devPrivates), type)
+
+extern _X_EXPORT int
+dixScreenSpecificPrivatesSize(ScreenPtr pScreen, DevPrivateType type);
+
+extern _X_EXPORT void
+_dixInitScreenPrivates(ScreenPtr pScreen, PrivatePtr *privates, void *addr, DevPrivateType type);
+
+#define dixInitScreenPrivates(s, o, v, type) _dixInitScreenPrivates(s, &(o)->devPrivates, (v), type);
+
+/*
+ * Allocates private data separately from main object.
+ *
+ * For objects created during server initialization, this allows those
+ * privates to be re-allocated as new private keys are registered.
+ *
+ * This includes screens, the serverClient, default colormaps and
+ * extensions entries.
+ */
+extern _X_EXPORT Bool
+ dixAllocatePrivates(PrivatePtr *privates, DevPrivateType type);
+
+/*
+ * Frees separately allocated private data
+ */
+extern _X_EXPORT void
+ dixFreePrivates(PrivatePtr privates, DevPrivateType type);
+
+/*
+ * Initialize privates by zeroing them
+ */
+extern _X_EXPORT void
+_dixInitPrivates(PrivatePtr *privates, void *addr, DevPrivateType type);
+
+#define dixInitPrivates(o, v, type) _dixInitPrivates(&(o)->devPrivates, (v), type);
+
+/*
+ * Clean up privates
+ */
+extern _X_EXPORT void
+ _dixFiniPrivates(PrivatePtr privates, DevPrivateType type);
+
+#define dixFiniPrivates(o,t) _dixFiniPrivates((o)->devPrivates,t)
+
+/*
+ * Allocates private data at object creation time. Required
+ * for almost all objects, except for the list described
+ * above for dixAllocatePrivates.
+ */
+extern _X_EXPORT void *_dixAllocateObjectWithPrivates(unsigned size,
+ unsigned clear,
+ unsigned offset,
+ DevPrivateType type);
+
+#define dixAllocateObjectWithPrivates(t, type) (t *) _dixAllocateObjectWithPrivates(sizeof(t), sizeof(t), offsetof(t, devPrivates), type)
+
+extern _X_EXPORT void
+
+_dixFreeObjectWithPrivates(void *object, PrivatePtr privates,
+ DevPrivateType type);
+
+#define dixFreeObjectWithPrivates(o,t) _dixFreeObjectWithPrivates(o, (o)->devPrivates, t)
+
+/*
+ * Return size of privates for the specified type
+ */
+extern _X_EXPORT int
+ dixPrivatesSize(DevPrivateType type);
+
+/*
+ * Dump out private stats to ErrorF
+ */
+extern void
+ dixPrivateUsage(void);
+
+/*
+ * Resets the privates subsystem. dixResetPrivates is called from the main loop
+ * before each server generation. This function must only be called by main().
+ */
+extern _X_EXPORT void
+ dixResetPrivates(void);
+
+/*
+ * Looks up the offset where the devPrivates field is located.
+ *
+ * Returns -1 if the specified resource has no dev privates.
+ * The position of the devPrivates field varies by structure
+ * and calling code might only know the resource type, not the
+ * structure definition.
+ */
+extern _X_EXPORT int
+ dixLookupPrivateOffset(RESTYPE type);
+
+/*
+ * Convenience macro for adding an offset to an object pointer
+ * when making a call to one of the devPrivates functions
+ */
+#define DEVPRIV_AT(ptr, offset) ((PrivatePtr *)((char *)(ptr) + offset))
+
+#endif /* PRIVATES_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/property.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/property.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/property.h (working copy)
@@ -0,0 +1,85 @@
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef PROPERTY_H
+#define PROPERTY_H
+
+#include "window.h"
+
+typedef struct _Property *PropertyPtr;
+
+extern _X_EXPORT int dixLookupProperty(PropertyPtr * /*result */ ,
+ WindowPtr /*pWin */ ,
+ Atom /*proprty */ ,
+ ClientPtr /*pClient */ ,
+ Mask /*access_mode */ );
+
+extern _X_EXPORT int dixChangeWindowProperty(ClientPtr /*pClient */ ,
+ WindowPtr /*pWin */ ,
+ Atom /*property */ ,
+ Atom /*type */ ,
+ int /*format */ ,
+ int /*mode */ ,
+ unsigned long /*len */ ,
+ void */*value */ ,
+ Bool /*sendevent */ );
+
+extern _X_EXPORT int ChangeWindowProperty(WindowPtr /*pWin */ ,
+ Atom /*property */ ,
+ Atom /*type */ ,
+ int /*format */ ,
+ int /*mode */ ,
+ unsigned long /*len */ ,
+ void */*value */ ,
+ Bool /*sendevent */ );
+
+extern _X_EXPORT int DeleteProperty(ClientPtr /*client */ ,
+ WindowPtr /*pWin */ ,
+ Atom /*propName */ );
+
+extern _X_EXPORT void DeleteAllWindowProperties(WindowPtr /*pWin */ );
+
+#endif /* PROPERTY_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/propertyst.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/propertyst.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/propertyst.h (working copy)
@@ -0,0 +1,66 @@
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef PROPERTYSTRUCT_H
+#define PROPERTYSTRUCT_H
+#include "misc.h"
+#include "property.h"
+#include "privates.h"
+/*
+ * PROPERTY -- property element
+ */
+
+typedef struct _Property {
+ struct _Property *next;
+ ATOM propertyName;
+ ATOM type; /* ignored by server */
+ uint32_t format; /* format of data for swapping - 8,16,32 */
+ uint32_t size; /* size of data in (format/8) bytes */
+ void *data; /* private to client */
+ PrivateRec *devPrivates;
+} PropertyRec;
+
+#endif /* PROPERTYSTRUCT_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/ptrveloc.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/ptrveloc.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/ptrveloc.h (working copy)
@@ -0,0 +1,144 @@
+/*
+ *
+ * Copyright © 2006-2011 Simon Thum simon dot thum at gmx dot de
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef POINTERVELOCITY_H
+#define POINTERVELOCITY_H
+
+#include <input.h>
+
+/* constants for acceleration profiles */
+
+#define AccelProfileNone -1
+#define AccelProfileClassic 0
+#define AccelProfileDeviceSpecific 1
+#define AccelProfilePolynomial 2
+#define AccelProfileSmoothLinear 3
+#define AccelProfileSimple 4
+#define AccelProfilePower 5
+#define AccelProfileLinear 6
+#define AccelProfileSmoothLimited 7
+#define AccelProfileLAST AccelProfileSmoothLimited
+
+/* fwd */
+struct _DeviceVelocityRec;
+
+/**
+ * profile
+ * returns actual acceleration depending on velocity, acceleration control,...
+ */
+typedef double (*PointerAccelerationProfileFunc)
+ (DeviceIntPtr dev, struct _DeviceVelocityRec * vel,
+ double velocity, double threshold, double accelCoeff);
+
+/**
+ * a motion history, with just enough information to
+ * calc mean velocity and decide which motion was along
+ * a more or less straight line
+ */
+typedef struct _MotionTracker {
+ double dx, dy; /* accumulated delta for each axis */
+ int time; /* time of creation */
+ int dir; /* initial direction bitfield */
+} MotionTracker, *MotionTrackerPtr;
+
+/**
+ * Contains all data needed to implement mouse ballistics
+ */
+typedef struct _DeviceVelocityRec {
+ MotionTrackerPtr tracker;
+ int num_tracker;
+ int cur_tracker; /* current index */
+ double velocity; /* velocity as guessed by algorithm */
+ double last_velocity; /* previous velocity estimate */
+ double last_dx; /* last time-difference */
+ double last_dy; /* phase of last/current estimate */
+ double corr_mul; /* config: multiply this into velocity */
+ double const_acceleration; /* config: (recipr.) const deceleration */
+ double min_acceleration; /* config: minimum acceleration */
+ short reset_time; /* config: reset non-visible state after # ms */
+ short use_softening; /* config: use softening of mouse values */
+ double max_rel_diff; /* config: max. relative difference */
+ double max_diff; /* config: max. difference */
+ int initial_range; /* config: max. offset used as initial velocity */
+ Bool average_accel; /* config: average acceleration over velocity */
+ PointerAccelerationProfileFunc Profile;
+ PointerAccelerationProfileFunc deviceSpecificProfile;
+ void *profile_private; /* extended data, see SetAccelerationProfile() */
+ struct { /* to be able to query this information */
+ int profile_number;
+ } statistics;
+} DeviceVelocityRec, *DeviceVelocityPtr;
+
+/**
+ * contains the run-time data for the predictable scheme, that is, a
+ * DeviceVelocityPtr and the property handlers.
+ */
+typedef struct _PredictableAccelSchemeRec {
+ DeviceVelocityPtr vel;
+ long *prop_handlers;
+ int num_prop_handlers;
+} PredictableAccelSchemeRec, *PredictableAccelSchemePtr;
+
+extern _X_EXPORT void
+InitVelocityData(DeviceVelocityPtr vel);
+
+extern _X_EXPORT void
+InitTrackers(DeviceVelocityPtr vel, int ntracker);
+
+extern _X_EXPORT BOOL
+ProcessVelocityData2D(DeviceVelocityPtr vel, double dx, double dy, int time);
+
+extern _X_EXPORT double
+BasicComputeAcceleration(DeviceIntPtr dev, DeviceVelocityPtr vel,
+ double velocity, double threshold, double acc);
+
+extern _X_EXPORT void
+FreeVelocityData(DeviceVelocityPtr vel);
+
+extern _X_EXPORT int
+SetAccelerationProfile(DeviceVelocityPtr vel, int profile_num);
+
+extern _X_EXPORT DeviceVelocityPtr
+GetDevicePredictableAccelData(DeviceIntPtr dev);
+
+extern _X_EXPORT void
+SetDeviceSpecificAccelerationProfile(DeviceVelocityPtr vel,
+ PointerAccelerationProfileFunc profile);
+
+extern _X_INTERNAL void
+AccelerationDefaultCleanup(DeviceIntPtr dev);
+
+extern _X_INTERNAL Bool
+InitPredictableAccelerationScheme(DeviceIntPtr dev,
+ struct _ValuatorAccelerationRec *protoScheme);
+
+extern _X_INTERNAL void
+acceleratePointerPredictable(DeviceIntPtr dev, ValuatorMask *val,
+ CARD32 evtime);
+
+extern _X_INTERNAL void
+acceleratePointerLightweight(DeviceIntPtr dev, ValuatorMask *val,
+ CARD32 evtime);
+
+#endif /* POINTERVELOCITY_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/randrstr.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/randrstr.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/randrstr.h (working copy)
@@ -0,0 +1,1056 @@
+/*
+ * Copyright © 2000 Compaq Computer Corporation
+ * Copyright © 2002 Hewlett-Packard Company
+ * Copyright © 2006 Intel Corporation
+ * Copyright © 2008 Red Hat, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no representations
+ * about the suitability of this software for any purpose. It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ * Author: Jim Gettys, Hewlett-Packard Company, Inc.
+ * Keith Packard, Intel Corporation
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifndef _RANDRSTR_H_
+#define _RANDRSTR_H_
+
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#include "misc.h"
+#include "os.h"
+#include "dixstruct.h"
+#include "resource.h"
+#include "scrnintstr.h"
+#include "windowstr.h"
+#include "pixmapstr.h"
+#include "extnsionst.h"
+#include "servermd.h"
+#include "rrtransform.h"
+#include <X11/extensions/randr.h>
+#include <X11/extensions/randrproto.h>
+#include <X11/extensions/render.h> /* we share subpixel order information */
+#include "picturestr.h"
+#include <X11/Xfuncproto.h>
+
+/* required for ABI compatibility for now */
+#define RANDR_10_INTERFACE 1
+#define RANDR_12_INTERFACE 1
+#define RANDR_13_INTERFACE 1 /* requires RANDR_12_INTERFACE */
+#define RANDR_GET_CRTC_INTERFACE 1
+
+#define RANDR_INTERFACE_VERSION 0x0104
+
+typedef XID RRMode;
+typedef XID RROutput;
+typedef XID RRCrtc;
+typedef XID RRProvider;
+
+extern _X_EXPORT int RREventBase, RRErrorBase;
+
+extern _X_EXPORT int (*ProcRandrVector[RRNumberRequests]) (ClientPtr);
+extern _X_EXPORT int (*SProcRandrVector[RRNumberRequests]) (ClientPtr);
+
+/*
+ * Modeline for a monitor. Name follows directly after this struct
+ */
+
+#define RRModeName(pMode) ((char *) (pMode + 1))
+typedef struct _rrMode RRModeRec, *RRModePtr;
+typedef struct _rrPropertyValue RRPropertyValueRec, *RRPropertyValuePtr;
+typedef struct _rrProperty RRPropertyRec, *RRPropertyPtr;
+typedef struct _rrCrtc RRCrtcRec, *RRCrtcPtr;
+typedef struct _rrOutput RROutputRec, *RROutputPtr;
+typedef struct _rrProvider RRProviderRec, *RRProviderPtr;
+
+struct _rrMode {
+ int refcnt;
+ xRRModeInfo mode;
+ char *name;
+ ScreenPtr userScreen;
+};
+
+struct _rrPropertyValue {
+ Atom type; /* ignored by server */
+ short format; /* format of data for swapping - 8,16,32 */
+ long size; /* size of data in (format/8) bytes */
+ void *data; /* private to client */
+};
+
+struct _rrProperty {
+ RRPropertyPtr next;
+ ATOM propertyName;
+ Bool is_pending;
+ Bool range;
+ Bool immutable;
+ int num_valid;
+ INT32 *valid_values;
+ RRPropertyValueRec current, pending;
+};
+
+struct _rrCrtc {
+ RRCrtc id;
+ ScreenPtr pScreen;
+ RRModePtr mode;
+ int x, y;
+ Rotation rotation;
+ Rotation rotations;
+ Bool changed;
+ int numOutputs;
+ RROutputPtr *outputs;
+ int gammaSize;
+ CARD16 *gammaRed;
+ CARD16 *gammaBlue;
+ CARD16 *gammaGreen;
+ void *devPrivate;
+ Bool transforms;
+ RRTransformRec client_pending_transform;
+ RRTransformRec client_current_transform;
+ PictTransform transform;
+ struct pict_f_transform f_transform;
+ struct pict_f_transform f_inverse;
+
+ PixmapPtr scanout_pixmap;
+};
+
+struct _rrOutput {
+ RROutput id;
+ ScreenPtr pScreen;
+ char *name;
+ int nameLength;
+ CARD8 connection;
+ CARD8 subpixelOrder;
+ int mmWidth;
+ int mmHeight;
+ RRCrtcPtr crtc;
+ int numCrtcs;
+ RRCrtcPtr *crtcs;
+ int numClones;
+ RROutputPtr *clones;
+ int numModes;
+ int numPreferred;
+ RRModePtr *modes;
+ int numUserModes;
+ RRModePtr *userModes;
+ Bool changed;
+ RRPropertyPtr properties;
+ Bool pendingProperties;
+ void *devPrivate;
+};
+
+struct _rrProvider {
+ RRProvider id;
+ ScreenPtr pScreen;
+ uint32_t capabilities;
+ char *name;
+ int nameLength;
+ RRPropertyPtr properties;
+ Bool pendingProperties;
+ Bool changed;
+ struct _rrProvider *offload_sink;
+ struct _rrProvider *output_source;
+};
+
+#if RANDR_12_INTERFACE
+typedef Bool (*RRScreenSetSizeProcPtr) (ScreenPtr pScreen,
+ CARD16 width,
+ CARD16 height,
+ CARD32 mmWidth, CARD32 mmHeight);
+
+typedef Bool (*RRCrtcSetProcPtr) (ScreenPtr pScreen,
+ RRCrtcPtr crtc,
+ RRModePtr mode,
+ int x,
+ int y,
+ Rotation rotation,
+ int numOutputs, RROutputPtr * outputs);
+
+typedef Bool (*RRCrtcSetGammaProcPtr) (ScreenPtr pScreen, RRCrtcPtr crtc);
+
+typedef Bool (*RRCrtcGetGammaProcPtr) (ScreenPtr pScreen, RRCrtcPtr crtc);
+
+typedef Bool (*RROutputSetPropertyProcPtr) (ScreenPtr pScreen,
+ RROutputPtr output,
+ Atom property,
+ RRPropertyValuePtr value);
+
+typedef Bool (*RROutputValidateModeProcPtr) (ScreenPtr pScreen,
+ RROutputPtr output,
+ RRModePtr mode);
+
+typedef void (*RRModeDestroyProcPtr) (ScreenPtr pScreen, RRModePtr mode);
+
+#endif
+
+#if RANDR_13_INTERFACE
+typedef Bool (*RROutputGetPropertyProcPtr) (ScreenPtr pScreen,
+ RROutputPtr output, Atom property);
+typedef Bool (*RRGetPanningProcPtr) (ScreenPtr pScrn,
+ RRCrtcPtr crtc,
+ BoxPtr totalArea,
+ BoxPtr trackingArea, INT16 *border);
+typedef Bool (*RRSetPanningProcPtr) (ScreenPtr pScrn,
+ RRCrtcPtr crtc,
+ BoxPtr totalArea,
+ BoxPtr trackingArea, INT16 *border);
+
+#endif /* RANDR_13_INTERFACE */
+
+typedef Bool (*RRProviderGetPropertyProcPtr) (ScreenPtr pScreen,
+ RRProviderPtr provider, Atom property);
+typedef Bool (*RRProviderSetPropertyProcPtr) (ScreenPtr pScreen,
+ RRProviderPtr provider,
+ Atom property,
+ RRPropertyValuePtr value);
+
+typedef Bool (*RRGetInfoProcPtr) (ScreenPtr pScreen, Rotation * rotations);
+typedef Bool (*RRCloseScreenProcPtr) (ScreenPtr pscreen);
+
+typedef Bool (*RRProviderSetOutputSourceProcPtr)(ScreenPtr pScreen,
+ RRProviderPtr provider,
+ RRProviderPtr output_source);
+
+typedef Bool (*RRProviderSetOffloadSinkProcPtr)(ScreenPtr pScreen,
+ RRProviderPtr provider,
+ RRProviderPtr offload_sink);
+
+
+typedef void (*RRProviderDestroyProcPtr)(ScreenPtr pScreen,
+ RRProviderPtr provider);
+
+/* These are for 1.0 compatibility */
+
+typedef struct _rrRefresh {
+ CARD16 rate;
+ RRModePtr mode;
+} RRScreenRate, *RRScreenRatePtr;
+
+typedef struct _rrScreenSize {
+ int id;
+ short width, height;
+ short mmWidth, mmHeight;
+ int nRates;
+ RRScreenRatePtr pRates;
+} RRScreenSize, *RRScreenSizePtr;
+
+#ifdef RANDR_10_INTERFACE
+
+typedef Bool (*RRSetConfigProcPtr) (ScreenPtr pScreen,
+ Rotation rotation,
+ int rate, RRScreenSizePtr pSize);
+
+#endif
+
+typedef Bool (*RRCrtcSetScanoutPixmapProcPtr)(RRCrtcPtr crtc, PixmapPtr pixmap);
+
+typedef struct _rrScrPriv {
+ /*
+ * 'public' part of the structure; DDXen fill this in
+ * as they initialize
+ */
+#if RANDR_10_INTERFACE
+ RRSetConfigProcPtr rrSetConfig;
+#endif
+ RRGetInfoProcPtr rrGetInfo;
+#if RANDR_12_INTERFACE
+ RRScreenSetSizeProcPtr rrScreenSetSize;
+ RRCrtcSetProcPtr rrCrtcSet;
+ RRCrtcSetGammaProcPtr rrCrtcSetGamma;
+ RRCrtcGetGammaProcPtr rrCrtcGetGamma;
+ RROutputSetPropertyProcPtr rrOutputSetProperty;
+ RROutputValidateModeProcPtr rrOutputValidateMode;
+ RRModeDestroyProcPtr rrModeDestroy;
+#endif
+#if RANDR_13_INTERFACE
+ RROutputGetPropertyProcPtr rrOutputGetProperty;
+ RRGetPanningProcPtr rrGetPanning;
+ RRSetPanningProcPtr rrSetPanning;
+#endif
+ /* TODO #if RANDR_15_INTERFACE */
+ RRCrtcSetScanoutPixmapProcPtr rrCrtcSetScanoutPixmap;
+
+ RRProviderSetOutputSourceProcPtr rrProviderSetOutputSource;
+ RRProviderSetOffloadSinkProcPtr rrProviderSetOffloadSink;
+ RRProviderGetPropertyProcPtr rrProviderGetProperty;
+ RRProviderSetPropertyProcPtr rrProviderSetProperty;
+ /*
+ * Private part of the structure; not considered part of the ABI
+ */
+ TimeStamp lastSetTime; /* last changed by client */
+ TimeStamp lastConfigTime; /* possible configs changed */
+ RRCloseScreenProcPtr CloseScreen;
+
+ Bool changed; /* some config changed */
+ Bool configChanged; /* configuration changed */
+ Bool layoutChanged; /* screen layout changed */
+ Bool resourcesChanged; /* screen resources change */
+
+ CARD16 minWidth, minHeight;
+ CARD16 maxWidth, maxHeight;
+ CARD16 width, height; /* last known screen size */
+ CARD16 mmWidth, mmHeight; /* last known screen size */
+
+ int numOutputs;
+ RROutputPtr *outputs;
+ RROutputPtr primaryOutput;
+
+ int numCrtcs;
+ RRCrtcPtr *crtcs;
+
+ /* Last known pointer position */
+ RRCrtcPtr pointerCrtc;
+
+#ifdef RANDR_10_INTERFACE
+ /*
+ * Configuration information
+ */
+ Rotation rotations;
+ CARD16 reqWidth, reqHeight;
+
+ int nSizes;
+ RRScreenSizePtr pSizes;
+
+ Rotation rotation;
+ int rate;
+ int size;
+#endif
+ Bool discontiguous;
+
+ RRProviderPtr provider;
+
+ RRProviderDestroyProcPtr rrProviderDestroy;
+
+} rrScrPrivRec, *rrScrPrivPtr;
+
+extern _X_EXPORT DevPrivateKeyRec rrPrivKeyRec;
+
+#define rrPrivKey (&rrPrivKeyRec)
+
+#define rrGetScrPriv(pScr) ((rrScrPrivPtr)dixLookupPrivate(&(pScr)->devPrivates, rrPrivKey))
+#define rrScrPriv(pScr) rrScrPrivPtr pScrPriv = rrGetScrPriv(pScr)
+#define SetRRScreen(s,p) dixSetPrivate(&(s)->devPrivates, rrPrivKey, p)
+
+/*
+ * each window has a list of clients requesting
+ * RRNotify events. Each client has a resource
+ * for each window it selects RRNotify input for,
+ * this resource is used to delete the RRNotifyRec
+ * entry from the per-window queue.
+ */
+
+typedef struct _RREvent *RREventPtr;
+
+typedef struct _RREvent {
+ RREventPtr next;
+ ClientPtr client;
+ WindowPtr window;
+ XID clientResource;
+ int mask;
+} RREventRec;
+
+typedef struct _RRTimes {
+ TimeStamp setTime;
+ TimeStamp configTime;
+} RRTimesRec, *RRTimesPtr;
+
+typedef struct _RRClient {
+ int major_version;
+ int minor_version;
+/* RRTimesRec times[0]; */
+} RRClientRec, *RRClientPtr;
+
+extern _X_EXPORT RESTYPE RRClientType, RREventType; /* resource types for event masks */
+extern _X_EXPORT DevPrivateKeyRec RRClientPrivateKeyRec;
+
+#define RRClientPrivateKey (&RRClientPrivateKeyRec)
+extern _X_EXPORT RESTYPE RRCrtcType, RRModeType, RROutputType, RRProviderType;
+
+#define VERIFY_RR_OUTPUT(id, ptr, a)\
+ {\
+ int rc = dixLookupResourceByType((void **)&(ptr), id,\
+ RROutputType, client, a);\
+ if (rc != Success) {\
+ client->errorValue = id;\
+ return rc;\
+ }\
+ }
+
+#define VERIFY_RR_CRTC(id, ptr, a)\
+ {\
+ int rc = dixLookupResourceByType((void **)&(ptr), id,\
+ RRCrtcType, client, a);\
+ if (rc != Success) {\
+ client->errorValue = id;\
+ return rc;\
+ }\
+ }
+
+#define VERIFY_RR_MODE(id, ptr, a)\
+ {\
+ int rc = dixLookupResourceByType((void **)&(ptr), id,\
+ RRModeType, client, a);\
+ if (rc != Success) {\
+ client->errorValue = id;\
+ return rc;\
+ }\
+ }
+
+#define VERIFY_RR_PROVIDER(id, ptr, a)\
+ {\
+ int rc = dixLookupResourceByType((void **)&(ptr), id,\
+ RRProviderType, client, a);\
+ if (rc != Success) {\
+ client->errorValue = id;\
+ return rc;\
+ }\
+ }
+
+#define GetRRClient(pClient) ((RRClientPtr)dixLookupPrivate(&(pClient)->devPrivates, RRClientPrivateKey))
+#define rrClientPriv(pClient) RRClientPtr pRRClient = GetRRClient(pClient)
+
+#ifdef RANDR_12_INTERFACE
+/*
+ * Set the range of sizes for the screen
+ */
+extern _X_EXPORT void
+
+RRScreenSetSizeRange(ScreenPtr pScreen,
+ CARD16 minWidth,
+ CARD16 minHeight, CARD16 maxWidth, CARD16 maxHeight);
+#endif
+
+/* rrscreen.c */
+/*
+ * Notify the extension that the screen size has been changed.
+ * The driver is responsible for calling this whenever it has changed
+ * the size of the screen
+ */
+extern _X_EXPORT void
+ RRScreenSizeNotify(ScreenPtr pScreen);
+
+/*
+ * Request that the screen be resized
+ */
+extern _X_EXPORT Bool
+
+RRScreenSizeSet(ScreenPtr pScreen,
+ CARD16 width, CARD16 height, CARD32 mmWidth, CARD32 mmHeight);
+
+/*
+ * Send ConfigureNotify event to root window when 'something' happens
+ */
+extern _X_EXPORT void
+ RRSendConfigNotify(ScreenPtr pScreen);
+
+/*
+ * screen dispatch
+ */
+extern _X_EXPORT int
+ ProcRRGetScreenSizeRange(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRSetScreenSize(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRGetScreenResources(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRGetScreenResourcesCurrent(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRSetScreenConfig(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRGetScreenInfo(ClientPtr client);
+
+/*
+ * Deliver a ScreenNotify event
+ */
+extern _X_EXPORT void
+ RRDeliverScreenEvent(ClientPtr client, WindowPtr pWin, ScreenPtr pScreen);
+
+extern _X_EXPORT void
+ RRResourcesChanged(ScreenPtr pScreen);
+
+/* randr.c */
+/* set a screen change on the primary screen */
+extern _X_EXPORT void
+RRSetChanged(ScreenPtr pScreen);
+
+/*
+ * Send all pending events
+ */
+extern _X_EXPORT void
+ RRTellChanged(ScreenPtr pScreen);
+
+/*
+ * Poll the driver for changed information
+ */
+extern _X_EXPORT Bool
+ RRGetInfo(ScreenPtr pScreen, Bool force_query);
+
+extern _X_EXPORT Bool RRInit(void);
+
+extern _X_EXPORT Bool RRScreenInit(ScreenPtr pScreen);
+
+extern _X_EXPORT RROutputPtr RRFirstOutput(ScreenPtr pScreen);
+
+extern _X_EXPORT CARD16
+ RRVerticalRefresh(xRRModeInfo * mode);
+
+#ifdef RANDR_10_INTERFACE
+/*
+ * This is the old interface, deprecated but left
+ * around for compatibility
+ */
+
+/*
+ * Then, register the specific size with the screen
+ */
+
+extern _X_EXPORT RRScreenSizePtr
+RRRegisterSize(ScreenPtr pScreen,
+ short width, short height, short mmWidth, short mmHeight);
+
+extern _X_EXPORT Bool
+ RRRegisterRate(ScreenPtr pScreen, RRScreenSizePtr pSize, int rate);
+
+/*
+ * Finally, set the current configuration of the screen
+ */
+
+extern _X_EXPORT void
+
+RRSetCurrentConfig(ScreenPtr pScreen,
+ Rotation rotation, int rate, RRScreenSizePtr pSize);
+
+extern _X_EXPORT Rotation RRGetRotation(ScreenPtr pScreen);
+
+#endif
+
+/* rrcrtc.c */
+
+/*
+ * Notify the CRTC of some change; layoutChanged indicates that
+ * some position or size element changed
+ */
+extern _X_EXPORT void
+ RRCrtcChanged(RRCrtcPtr crtc, Bool layoutChanged);
+
+/*
+ * Create a CRTC
+ */
+extern _X_EXPORT RRCrtcPtr RRCrtcCreate(ScreenPtr pScreen, void *devPrivate);
+
+/*
+ * Set the allowed rotations on a CRTC
+ */
+extern _X_EXPORT void
+ RRCrtcSetRotations(RRCrtcPtr crtc, Rotation rotations);
+
+/*
+ * Set whether transforms are allowed on a CRTC
+ */
+extern _X_EXPORT void
+ RRCrtcSetTransformSupport(RRCrtcPtr crtc, Bool transforms);
+
+/*
+ * Notify the extension that the Crtc has been reconfigured,
+ * the driver calls this whenever it has updated the mode
+ */
+extern _X_EXPORT Bool
+
+RRCrtcNotify(RRCrtcPtr crtc,
+ RRModePtr mode,
+ int x,
+ int y,
+ Rotation rotation,
+ RRTransformPtr transform, int numOutputs, RROutputPtr * outputs);
+
+extern _X_EXPORT void
+ RRDeliverCrtcEvent(ClientPtr client, WindowPtr pWin, RRCrtcPtr crtc);
+
+/*
+ * Request that the Crtc be reconfigured
+ */
+extern _X_EXPORT Bool
+
+RRCrtcSet(RRCrtcPtr crtc,
+ RRModePtr mode,
+ int x,
+ int y, Rotation rotation, int numOutput, RROutputPtr * outputs);
+
+/*
+ * Request that the Crtc gamma be changed
+ */
+
+extern _X_EXPORT Bool
+ RRCrtcGammaSet(RRCrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue);
+
+/*
+ * Request current gamma back from the DDX (if possible).
+ * This includes gamma size.
+ */
+
+extern _X_EXPORT Bool
+ RRCrtcGammaGet(RRCrtcPtr crtc);
+
+/*
+ * Notify the extension that the Crtc gamma has been changed
+ * The driver calls this whenever it has changed the gamma values
+ * in the RRCrtcRec
+ */
+
+extern _X_EXPORT Bool
+ RRCrtcGammaNotify(RRCrtcPtr crtc);
+
+/*
+ * Set the size of the gamma table at server startup time
+ */
+
+extern _X_EXPORT Bool
+ RRCrtcGammaSetSize(RRCrtcPtr crtc, int size);
+
+/*
+ * Return the area of the frame buffer scanned out by the crtc,
+ * taking into account the current mode and rotation
+ */
+
+extern _X_EXPORT void
+ RRCrtcGetScanoutSize(RRCrtcPtr crtc, int *width, int *height);
+
+/*
+ * Return crtc transform
+ */
+extern _X_EXPORT RRTransformPtr RRCrtcGetTransform(RRCrtcPtr crtc);
+
+/*
+ * Check whether the pending and current transforms are the same
+ */
+extern _X_EXPORT Bool
+ RRCrtcPendingTransform(RRCrtcPtr crtc);
+
+/*
+ * Destroy a Crtc at shutdown
+ */
+extern _X_EXPORT void
+ RRCrtcDestroy(RRCrtcPtr crtc);
+
+/*
+ * Set the pending CRTC transformation
+ */
+
+extern _X_EXPORT int
+
+RRCrtcTransformSet(RRCrtcPtr crtc,
+ PictTransformPtr transform,
+ struct pict_f_transform *f_transform,
+ struct pict_f_transform *f_inverse,
+ char *filter, int filter_len, xFixed * params, int nparams);
+
+/*
+ * Initialize crtc type
+ */
+extern _X_EXPORT Bool
+ RRCrtcInit(void);
+
+/*
+ * Initialize crtc type error value
+ */
+extern _X_EXPORT void
+ RRCrtcInitErrorValue(void);
+
+/*
+ * Detach and free a scanout pixmap
+ */
+extern _X_EXPORT void
+ RRCrtcDetachScanoutPixmap(RRCrtcPtr crtc);
+
+extern _X_EXPORT Bool
+ RRReplaceScanoutPixmap(DrawablePtr pDrawable, PixmapPtr pPixmap, Bool enable);
+
+/*
+ * Crtc dispatch
+ */
+
+extern _X_EXPORT int
+ ProcRRGetCrtcInfo(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRSetCrtcConfig(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRGetCrtcGammaSize(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRGetCrtcGamma(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRSetCrtcGamma(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRSetCrtcTransform(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRGetCrtcTransform(ClientPtr client);
+
+int
+ ProcRRGetPanning(ClientPtr client);
+
+int
+ ProcRRSetPanning(ClientPtr client);
+
+void
+ RRConstrainCursorHarder(DeviceIntPtr, ScreenPtr, int, int *, int *);
+
+/* rrdispatch.c */
+extern _X_EXPORT Bool
+ RRClientKnowsRates(ClientPtr pClient);
+
+/* rrmode.c */
+/*
+ * Find, and if necessary, create a mode
+ */
+
+extern _X_EXPORT RRModePtr RRModeGet(xRRModeInfo * modeInfo, const char *name);
+
+/*
+ * Destroy a mode.
+ */
+
+extern _X_EXPORT void
+ RRModeDestroy(RRModePtr mode);
+
+/*
+ * Return a list of modes that are valid for some output in pScreen
+ */
+extern _X_EXPORT RRModePtr *RRModesForScreen(ScreenPtr pScreen, int *num_ret);
+
+/*
+ * Initialize mode type
+ */
+extern _X_EXPORT Bool
+ RRModeInit(void);
+
+/*
+ * Initialize mode type error value
+ */
+extern _X_EXPORT void
+ RRModeInitErrorValue(void);
+
+extern _X_EXPORT int
+ ProcRRCreateMode(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRDestroyMode(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRAddOutputMode(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRDeleteOutputMode(ClientPtr client);
+
+/* rroutput.c */
+
+/*
+ * Notify the output of some change. configChanged indicates whether
+ * any external configuration (mode list, clones, connected status)
+ * has changed, or whether the change was strictly internal
+ * (which crtc is in use)
+ */
+extern _X_EXPORT void
+ RROutputChanged(RROutputPtr output, Bool configChanged);
+
+/*
+ * Create an output
+ */
+
+extern _X_EXPORT RROutputPtr
+RROutputCreate(ScreenPtr pScreen,
+ const char *name, int nameLength, void *devPrivate);
+
+/*
+ * Notify extension that output parameters have been changed
+ */
+extern _X_EXPORT Bool
+ RROutputSetClones(RROutputPtr output, RROutputPtr * clones, int numClones);
+
+extern _X_EXPORT Bool
+
+RROutputSetModes(RROutputPtr output,
+ RRModePtr * modes, int numModes, int numPreferred);
+
+extern _X_EXPORT int
+ RROutputAddUserMode(RROutputPtr output, RRModePtr mode);
+
+extern _X_EXPORT int
+ RROutputDeleteUserMode(RROutputPtr output, RRModePtr mode);
+
+extern _X_EXPORT Bool
+ RROutputSetCrtcs(RROutputPtr output, RRCrtcPtr * crtcs, int numCrtcs);
+
+extern _X_EXPORT Bool
+ RROutputSetConnection(RROutputPtr output, CARD8 connection);
+
+extern _X_EXPORT Bool
+ RROutputSetSubpixelOrder(RROutputPtr output, int subpixelOrder);
+
+extern _X_EXPORT Bool
+ RROutputSetPhysicalSize(RROutputPtr output, int mmWidth, int mmHeight);
+
+extern _X_EXPORT void
+ RRDeliverOutputEvent(ClientPtr client, WindowPtr pWin, RROutputPtr output);
+
+extern _X_EXPORT void
+ RROutputDestroy(RROutputPtr output);
+
+extern _X_EXPORT int
+ ProcRRGetOutputInfo(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRSetOutputPrimary(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRGetOutputPrimary(ClientPtr client);
+
+/*
+ * Initialize output type
+ */
+extern _X_EXPORT Bool
+ RROutputInit(void);
+
+/*
+ * Initialize output type error value
+ */
+extern _X_EXPORT void
+ RROutputInitErrorValue(void);
+
+/* rrpointer.c */
+extern _X_EXPORT void
+ RRPointerMoved(ScreenPtr pScreen, int x, int y);
+
+extern _X_EXPORT void
+ RRPointerScreenConfigured(ScreenPtr pScreen);
+
+/* rrproperty.c */
+
+extern _X_EXPORT void
+ RRDeleteAllOutputProperties(RROutputPtr output);
+
+extern _X_EXPORT RRPropertyValuePtr
+RRGetOutputProperty(RROutputPtr output, Atom property, Bool pending);
+
+extern _X_EXPORT RRPropertyPtr
+RRQueryOutputProperty(RROutputPtr output, Atom property);
+
+extern _X_EXPORT void
+ RRDeleteOutputProperty(RROutputPtr output, Atom property);
+
+extern _X_EXPORT Bool
+ RRPostPendingProperties(RROutputPtr output);
+
+extern _X_EXPORT int
+
+RRChangeOutputProperty(RROutputPtr output, Atom property, Atom type,
+ int format, int mode, unsigned long len,
+ void *value, Bool sendevent, Bool pending);
+
+extern _X_EXPORT int
+
+RRConfigureOutputProperty(RROutputPtr output, Atom property,
+ Bool pending, Bool range, Bool immutable,
+ int num_values, INT32 *values);
+extern _X_EXPORT int
+ ProcRRChangeOutputProperty(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRGetOutputProperty(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRListOutputProperties(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRQueryOutputProperty(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRConfigureOutputProperty(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRDeleteOutputProperty(ClientPtr client);
+
+/* rrprovider.c */
+extern _X_EXPORT void
+RRProviderInitErrorValue(void);
+
+extern _X_EXPORT int
+ProcRRGetProviders(ClientPtr client);
+
+extern _X_EXPORT int
+ProcRRGetProviderInfo(ClientPtr client);
+
+extern _X_EXPORT int
+ProcRRSetProviderOutputSource(ClientPtr client);
+
+extern _X_EXPORT int
+ProcRRSetProviderOffloadSink(ClientPtr client);
+
+extern _X_EXPORT Bool
+RRProviderInit(void);
+
+extern _X_EXPORT RRProviderPtr
+RRProviderCreate(ScreenPtr pScreen, const char *name,
+ int nameLength);
+
+extern _X_EXPORT void
+RRProviderDestroy (RRProviderPtr provider);
+
+extern _X_EXPORT void
+RRProviderSetCapabilities(RRProviderPtr provider, uint32_t capabilities);
+
+extern _X_EXPORT Bool
+RRProviderLookup(XID id, RRProviderPtr *provider_p);
+
+extern _X_EXPORT void
+RRDeliverProviderEvent(ClientPtr client, WindowPtr pWin, RRProviderPtr provider);
+
+/* rrproviderproperty.c */
+
+extern _X_EXPORT void
+ RRDeleteAllProviderProperties(RRProviderPtr provider);
+
+extern _X_EXPORT RRPropertyValuePtr
+ RRGetProviderProperty(RRProviderPtr provider, Atom property, Bool pending);
+
+extern _X_EXPORT RRPropertyPtr
+ RRQueryProviderProperty(RRProviderPtr provider, Atom property);
+
+extern _X_EXPORT void
+ RRDeleteProviderProperty(RRProviderPtr provider, Atom property);
+
+extern _X_EXPORT int
+RRChangeProviderProperty(RRProviderPtr provider, Atom property, Atom type,
+ int format, int mode, unsigned long len,
+ void *value, Bool sendevent, Bool pending);
+
+extern _X_EXPORT int
+ RRConfigureProviderProperty(RRProviderPtr provider, Atom property,
+ Bool pending, Bool range, Bool immutable,
+ int num_values, INT32 *values);
+
+extern _X_EXPORT Bool
+ RRPostProviderPendingProperties(RRProviderPtr provider);
+
+extern _X_EXPORT int
+ ProcRRGetProviderProperty(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRListProviderProperties(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRQueryProviderProperty(ClientPtr client);
+
+extern _X_EXPORT int
+ProcRRConfigureProviderProperty(ClientPtr client);
+
+extern _X_EXPORT int
+ProcRRChangeProviderProperty(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRDeleteProviderProperty(ClientPtr client);
+/* rrxinerama.c */
+#ifdef XINERAMA
+extern _X_EXPORT void
+ RRXineramaExtensionInit(void);
+#endif
+
+#endif /* _RANDRSTR_H_ */
+
+/*
+
+randr extension implementation structure
+
+Query state:
+ ProcRRGetScreenInfo/ProcRRGetScreenResources
+ RRGetInfo
+
+ • Request configuration from driver, either 1.0 or 1.2 style
+ • These functions only record state changes, all
+ other actions are pended until RRTellChanged is called
+
+ ->rrGetInfo
+ 1.0:
+ RRRegisterSize
+ RRRegisterRate
+ RRSetCurrentConfig
+ 1.2:
+ RRScreenSetSizeRange
+ RROutputSetCrtcs
+ RRModeGet
+ RROutputSetModes
+ RROutputSetConnection
+ RROutputSetSubpixelOrder
+ RROutputSetClones
+ RRCrtcNotify
+
+ • Must delay scanning configuration until after ->rrGetInfo returns
+ because some drivers will call SetCurrentConfig in the middle
+ of the ->rrGetInfo operation.
+
+ 1.0:
+
+ • Scan old configuration, mirror to new structures
+
+ RRScanOldConfig
+ RRCrtcCreate
+ RROutputCreate
+ RROutputSetCrtcs
+ RROutputSetConnection
+ RROutputSetSubpixelOrder
+ RROldModeAdd • This adds modes one-at-a-time
+ RRModeGet
+ RRCrtcNotify
+
+ • send events, reset pointer if necessary
+
+ RRTellChanged
+ WalkTree (sending events)
+
+ • when layout has changed:
+ RRPointerScreenConfigured
+ RRSendConfigNotify
+
+Asynchronous state setting (1.2 only)
+ When setting state asynchronously, the driver invokes the
+ ->rrGetInfo function and then calls RRTellChanged to flush
+ the changes to the clients and reset pointer if necessary
+
+Set state
+
+ ProcRRSetScreenConfig
+ RRCrtcSet
+ 1.2:
+ ->rrCrtcSet
+ RRCrtcNotify
+ 1.0:
+ ->rrSetConfig
+ RRCrtcNotify
+ RRTellChanged
+ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/region.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/region.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/region.h (working copy)
@@ -0,0 +1,52 @@
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef REGION_H
+#define REGION_H
+
+#include "regionstr.h"
+
+#endif /* REGION_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/regionstr.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/regionstr.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/regionstr.h (working copy)
@@ -0,0 +1,376 @@
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef REGIONSTRUCT_H
+#define REGIONSTRUCT_H
+
+typedef struct pixman_region16 RegionRec, *RegionPtr;
+
+#include "miscstruct.h"
+
+/* Return values from RectIn() */
+
+#define rgnOUT 0
+#define rgnIN 1
+#define rgnPART 2
+
+#define NullRegion ((RegionPtr)0)
+
+/*
+ * clip region
+ */
+
+typedef struct pixman_region16_data RegDataRec, *RegDataPtr;
+
+extern _X_EXPORT BoxRec RegionEmptyBox;
+extern _X_EXPORT RegDataRec RegionEmptyData;
+extern _X_EXPORT RegDataRec RegionBrokenData;
+static inline Bool
+RegionNil(RegionPtr reg)
+{
+ return ((reg)->data && !(reg)->data->numRects);
+}
+
+/* not a region */
+
+static inline Bool
+RegionNar(RegionPtr reg)
+{
+ return ((reg)->data == &RegionBrokenData);
+}
+
+static inline int
+RegionNumRects(RegionPtr reg)
+{
+ return ((reg)->data ? (reg)->data->numRects : 1);
+}
+
+static inline int
+RegionSize(RegionPtr reg)
+{
+ return ((reg)->data ? (reg)->data->size : 0);
+}
+
+static inline BoxPtr
+RegionRects(RegionPtr reg)
+{
+ return ((reg)->data ? (BoxPtr) ((reg)->data + 1) : &(reg)->extents);
+}
+
+static inline BoxPtr
+RegionBoxptr(RegionPtr reg)
+{
+ return ((BoxPtr) ((reg)->data + 1));
+}
+
+static inline BoxPtr
+RegionBox(RegionPtr reg, int i)
+{
+ return (&RegionBoxptr(reg)[i]);
+}
+
+static inline BoxPtr
+RegionTop(RegionPtr reg)
+{
+ return RegionBox(reg, (reg)->data->numRects);
+}
+
+static inline BoxPtr
+RegionEnd(RegionPtr reg)
+{
+ return RegionBox(reg, (reg)->data->numRects - 1);
+}
+
+static inline size_t
+RegionSizeof(int n)
+{
+ return (sizeof(RegDataRec) + ((n) * sizeof(BoxRec)));
+}
+
+static inline void
+RegionInit(RegionPtr _pReg, BoxPtr _rect, int _size)
+{
+ if ((_rect) != NULL) {
+ (_pReg)->extents = *(_rect);
+ (_pReg)->data = (RegDataPtr) NULL;
+ }
+ else {
+ (_pReg)->extents = RegionEmptyBox;
+ if (((_size) > 1) && ((_pReg)->data =
+ (RegDataPtr) malloc(RegionSizeof(_size)))) {
+ (_pReg)->data->size = (_size);
+ (_pReg)->data->numRects = 0;
+ }
+ else
+ (_pReg)->data = &RegionEmptyData;
+ }
+}
+
+static inline Bool
+RegionInitBoxes(RegionPtr pReg, BoxPtr boxes, int nBoxes)
+{
+ return pixman_region_init_rects(pReg, boxes, nBoxes);
+}
+
+static inline void
+RegionUninit(RegionPtr _pReg)
+{
+ if ((_pReg)->data && (_pReg)->data->size) {
+ free((_pReg)->data);
+ (_pReg)->data = NULL;
+ }
+}
+
+static inline void
+RegionReset(RegionPtr _pReg, BoxPtr _pBox)
+{
+ (_pReg)->extents = *(_pBox);
+ RegionUninit(_pReg);
+ (_pReg)->data = (RegDataPtr) NULL;
+}
+
+static inline Bool
+RegionNotEmpty(RegionPtr _pReg)
+{
+ return !RegionNil(_pReg);
+}
+
+static inline Bool
+RegionBroken(RegionPtr _pReg)
+{
+ return RegionNar(_pReg);
+}
+
+static inline void
+RegionEmpty(RegionPtr _pReg)
+{
+ RegionUninit(_pReg);
+ (_pReg)->extents.x2 = (_pReg)->extents.x1;
+ (_pReg)->extents.y2 = (_pReg)->extents.y1;
+ (_pReg)->data = &RegionEmptyData;
+}
+
+static inline BoxPtr
+RegionExtents(RegionPtr _pReg)
+{
+ return (&(_pReg)->extents);
+}
+
+static inline void
+RegionNull(RegionPtr _pReg)
+{
+ (_pReg)->extents = RegionEmptyBox;
+ (_pReg)->data = &RegionEmptyData;
+}
+
+extern _X_EXPORT void InitRegions(void);
+
+extern _X_EXPORT RegionPtr RegionCreate(BoxPtr /*rect */ ,
+ int /*size */ );
+
+extern _X_EXPORT void RegionDestroy(RegionPtr /*pReg */ );
+
+extern _X_EXPORT RegionPtr RegionDuplicate(RegionPtr /* pOld */);
+
+static inline Bool
+RegionCopy(RegionPtr dst, RegionPtr src)
+{
+ return pixman_region_copy(dst, src);
+}
+
+static inline Bool
+RegionIntersect(RegionPtr newReg, /* destination Region */
+ RegionPtr reg1, RegionPtr reg2 /* source regions */
+ )
+{
+ return pixman_region_intersect(newReg, reg1, reg2);
+}
+
+static inline Bool
+RegionUnion(RegionPtr newReg, /* destination Region */
+ RegionPtr reg1, RegionPtr reg2 /* source regions */
+ )
+{
+ return pixman_region_union(newReg, reg1, reg2);
+}
+
+extern _X_EXPORT Bool RegionAppend(RegionPtr /*dstrgn */ ,
+ RegionPtr /*rgn */ );
+
+extern _X_EXPORT Bool RegionValidate(RegionPtr /*badreg */ ,
+ Bool * /*pOverlap */ );
+
+extern _X_EXPORT RegionPtr RegionFromRects(int /*nrects */ ,
+ xRectanglePtr /*prect */ ,
+ int /*ctype */ );
+
+/*-
+ *-----------------------------------------------------------------------
+ * Subtract --
+ * Subtract regS from regM and leave the result in regD.
+ * S stands for subtrahend, M for minuend and D for difference.
+ *
+ * Results:
+ * TRUE if successful.
+ *
+ * Side Effects:
+ * regD is overwritten.
+ *
+ *-----------------------------------------------------------------------
+ */
+static inline Bool
+RegionSubtract(RegionPtr regD, RegionPtr regM, RegionPtr regS)
+{
+ return pixman_region_subtract(regD, regM, regS);
+}
+
+/*-
+ *-----------------------------------------------------------------------
+ * Inverse --
+ * Take a region and a box and return a region that is everything
+ * in the box but not in the region. The careful reader will note
+ * that this is the same as subtracting the region from the box...
+ *
+ * Results:
+ * TRUE.
+ *
+ * Side Effects:
+ * newReg is overwritten.
+ *
+ *-----------------------------------------------------------------------
+ */
+
+static inline Bool
+RegionInverse(RegionPtr newReg, /* Destination region */
+ RegionPtr reg1, /* Region to invert */
+ BoxPtr invRect /* Bounding box for inversion */
+ )
+{
+ return pixman_region_inverse(newReg, reg1, invRect);
+}
+
+static inline int
+RegionContainsRect(RegionPtr region, BoxPtr prect)
+{
+ return pixman_region_contains_rectangle(region, prect);
+}
+
+/* TranslateRegion(pReg, x, y)
+ translates in place
+*/
+
+static inline void
+RegionTranslate(RegionPtr pReg, int x, int y)
+{
+ pixman_region_translate(pReg, x, y);
+}
+
+extern _X_EXPORT Bool RegionBreak(RegionPtr /*pReg */ );
+
+static inline Bool
+RegionContainsPoint(RegionPtr pReg, int x, int y, BoxPtr box /* "return" value */
+ )
+{
+ return pixman_region_contains_point(pReg, x, y, box);
+}
+
+static inline Bool
+RegionEqual(RegionPtr reg1, RegionPtr reg2)
+{
+ return pixman_region_equal(reg1, reg2);
+}
+
+extern _X_EXPORT Bool RegionRectAlloc(RegionPtr /*pRgn */ ,
+ int /*n */
+ );
+
+#ifdef DEBUG
+extern _X_EXPORT Bool RegionIsValid(RegionPtr /*prgn */
+ );
+#endif
+
+extern _X_EXPORT void RegionPrint(RegionPtr /*pReg */ );
+
+#define INCLUDE_LEGACY_REGION_DEFINES
+#ifdef INCLUDE_LEGACY_REGION_DEFINES
+
+#define REGION_NIL RegionNil
+#define REGION_NAR RegionNar
+#define REGION_NUM_RECTS RegionNumRects
+#define REGION_SIZE RegionSize
+#define REGION_RECTS RegionRects
+#define REGION_BOXPTR RegionBoxptr
+#define REGION_BOX RegionBox
+#define REGION_TOP RegionTop
+#define REGION_END RegionEnd
+#define REGION_SZOF RegionSizeof
+#define BITMAP_TO_REGION BitmapToRegion
+#define REGION_CREATE(pScreen, r, s) RegionCreate(r,s)
+#define REGION_COPY(pScreen, d, r) RegionCopy(d, r)
+#define REGION_DESTROY(pScreen, r) RegionDestroy(r)
+#define REGION_INTERSECT(pScreen, res, r1, r2) RegionIntersect(res, r1, r2)
+#define REGION_UNION(pScreen, res, r1, r2) RegionUnion(res, r1, r2)
+#define REGION_SUBTRACT(pScreen, res, r1, r2) RegionSubtract(res, r1, r2)
+#define REGION_INVERSE(pScreen, n, r, b) RegionInverse(n, r, b)
+#define REGION_TRANSLATE(pScreen, r, x, y) RegionTranslate(r, x, y)
+#define RECT_IN_REGION(pScreen, r, b) RegionContainsRect(r, b)
+#define POINT_IN_REGION(pScreen, r, x, y, b) RegionContainsPoint(r, x, y, b)
+#define REGION_EQUAL(pScreen, r1, r2) RegionEqual(r1, r2)
+#define REGION_APPEND(pScreen, d, r) RegionAppend(d, r)
+#define REGION_VALIDATE(pScreen, r, o) RegionValidate(r, o)
+#define RECTS_TO_REGION(pScreen, n, r, c) RegionFromRects(n, r, c)
+#define REGION_BREAK(pScreen, r) RegionBreak(r)
+#define REGION_INIT(pScreen, r, b, s) RegionInit(r, b, s)
+#define REGION_UNINIT(pScreen, r) RegionUninit(r)
+#define REGION_RESET(pScreen, r, b) RegionReset(r, b)
+#define REGION_NOTEMPTY(pScreen, r) RegionNotEmpty(r)
+#define REGION_BROKEN(pScreen, r) RegionBroken(r)
+#define REGION_EMPTY(pScreen, r) RegionEmpty(r)
+#define REGION_EXTENTS(pScreen, r) RegionExtents(r)
+#define REGION_NULL(pScreen, r) RegionNull(r)
+
+#endif /* INCLUDE_LEGACY_REGION_DEFINES */
+#endif /* REGIONSTRUCT_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/registry.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/registry.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/registry.h (working copy)
@@ -0,0 +1,66 @@
+/***********************************************************
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+******************************************************************/
+
+#ifndef DIX_REGISTRY_H
+#define DIX_REGISTRY_H
+
+/*
+ * Result returned from any unsuccessful lookup
+ */
+#define XREGISTRY_UNKNOWN "<unknown>"
+
+#ifdef XREGISTRY
+
+#include "resource.h"
+#include "extnsionst.h"
+
+/* Internal string registry - for auditing, debugging, security, etc. */
+
+/*
+ * Registration functions. The name string is not copied, so it must
+ * not be a stack variable.
+ */
+extern _X_EXPORT void RegisterResourceName(RESTYPE type, const char *name);
+extern _X_EXPORT void RegisterExtensionNames(ExtensionEntry * ext);
+
+/*
+ * Lookup functions. The returned string must not be modified or freed.
+ */
+extern _X_EXPORT const char *LookupMajorName(int major);
+extern _X_EXPORT const char *LookupRequestName(int major, int minor);
+extern _X_EXPORT const char *LookupEventName(int event);
+extern _X_EXPORT const char *LookupErrorName(int error);
+extern _X_EXPORT const char *LookupResourceName(RESTYPE rtype);
+
+/*
+ * Setup and teardown
+ */
+extern _X_EXPORT void dixResetRegistry(void);
+extern _X_EXPORT void dixFreeRegistry(void);
+
+#else /* XREGISTRY */
+
+/* Define calls away when the registry is not being built. */
+
+#define RegisterResourceName(a, b) { ; }
+#define RegisterExtensionNames(a) { ; }
+
+#define LookupMajorName(a) XREGISTRY_UNKNOWN
+#define LookupRequestName(a, b) XREGISTRY_UNKNOWN
+#define LookupEventName(a) XREGISTRY_UNKNOWN
+#define LookupErrorName(a) XREGISTRY_UNKNOWN
+#define LookupResourceName(a) XREGISTRY_UNKNOWN
+
+#define dixResetRegistry() { ; }
+#define dixFreeRegistry() { ; }
+
+#endif /* XREGISTRY */
+#endif /* DIX_REGISTRY_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/resource.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/resource.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/resource.h (working copy)
@@ -0,0 +1,287 @@
+/***********************************************************
+
+Copyright 1987, 1989, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987, 1989 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef RESOURCE_H
+#define RESOURCE_H 1
+#include "misc.h"
+#include "dixaccess.h"
+
+/*****************************************************************
+ * STUFF FOR RESOURCES
+ *****************************************************************/
+
+/* classes for Resource routines */
+
+typedef uint32_t RESTYPE;
+
+#define RC_VANILLA ((RESTYPE)0)
+#define RC_CACHED ((RESTYPE)1<<31)
+#define RC_DRAWABLE ((RESTYPE)1<<30)
+/* Use class RC_NEVERRETAIN for resources that should not be retained
+ * regardless of the close down mode when the client dies. (A client's
+ * event selections on objects that it doesn't own are good candidates.)
+ * Extensions can use this too!
+ */
+#define RC_NEVERRETAIN ((RESTYPE)1<<29)
+#define RC_LASTPREDEF RC_NEVERRETAIN
+#define RC_ANY (~(RESTYPE)0)
+
+/* types for Resource routines */
+
+#define RT_WINDOW ((RESTYPE)1|RC_DRAWABLE)
+#define RT_PIXMAP ((RESTYPE)2|RC_DRAWABLE)
+#define RT_GC ((RESTYPE)3)
+#undef RT_FONT
+#undef RT_CURSOR
+#define RT_FONT ((RESTYPE)4)
+#define RT_CURSOR ((RESTYPE)5)
+#define RT_COLORMAP ((RESTYPE)6)
+#define RT_CMAPENTRY ((RESTYPE)7)
+#define RT_OTHERCLIENT ((RESTYPE)8|RC_NEVERRETAIN)
+#define RT_PASSIVEGRAB ((RESTYPE)9|RC_NEVERRETAIN)
+#define RT_LASTPREDEF ((RESTYPE)9)
+#define RT_NONE ((RESTYPE)0)
+
+/* bits and fields within a resource id */
+#define RESOURCE_AND_CLIENT_COUNT 29 /* 29 bits for XIDs */
+#if MAXCLIENTS == 64
+#define RESOURCE_CLIENT_BITS 6
+#endif
+#if MAXCLIENTS == 128
+#define RESOURCE_CLIENT_BITS 7
+#endif
+#if MAXCLIENTS == 256
+#define RESOURCE_CLIENT_BITS 8
+#endif
+#if MAXCLIENTS == 512
+#define RESOURCE_CLIENT_BITS 9
+#endif
+/* client field offset */
+#define CLIENTOFFSET (RESOURCE_AND_CLIENT_COUNT - RESOURCE_CLIENT_BITS)
+/* resource field */
+#define RESOURCE_ID_MASK ((1 << CLIENTOFFSET) - 1)
+/* client field */
+#define RESOURCE_CLIENT_MASK (((1 << RESOURCE_CLIENT_BITS) - 1) << CLIENTOFFSET)
+/* extract the client mask from an XID */
+#define CLIENT_BITS(id) ((id) & RESOURCE_CLIENT_MASK)
+/* extract the client id from an XID */
+#define CLIENT_ID(id) ((int)(CLIENT_BITS(id) >> CLIENTOFFSET))
+#define SERVER_BIT (Mask)0x40000000 /* use illegal bit */
+
+#ifdef INVALID
+#undef INVALID /* needed on HP/UX */
+#endif
+
+/* Invalid resource id */
+#define INVALID (0)
+
+#define BAD_RESOURCE 0xe0000000
+
+#define rClient(obj) (clients[CLIENT_ID((obj)->resource)])
+
+/* Resource state callback */
+extern _X_EXPORT CallbackListPtr ResourceStateCallback;
+
+typedef enum { ResourceStateAdding,
+ ResourceStateFreeing
+} ResourceState;
+
+typedef struct {
+ ResourceState state;
+ XID id;
+ RESTYPE type;
+ void *value;
+} ResourceStateInfoRec;
+
+typedef int (*DeleteType) (void */*value */ ,
+ XID /*id */ );
+
+typedef void (*FindResType) (void */*value */ ,
+ XID /*id */ ,
+ void */*cdata */ );
+
+typedef void (*FindAllRes) (void */*value */ ,
+ XID /*id */ ,
+ RESTYPE /*type */ ,
+ void */*cdata */ );
+
+typedef Bool (*FindComplexResType) (void */*value */ ,
+ XID /*id */ ,
+ void */*cdata */ );
+
+/* Structure for estimating resource memory usage. Memory usage
+ * consists of space allocated for the resource itself and of
+ * references to other resources. Currently the most important use for
+ * this structure is to estimate pixmap usage of different resources
+ * more accurately. */
+typedef struct {
+ /* Size of resource itself. Zero if not implemented. */
+ unsigned long resourceSize;
+ /* Size attributed to pixmap references from the resource. */
+ unsigned long pixmapRefSize;
+ /* Number of references to this resource; typically 1 */
+ unsigned long refCnt;
+} ResourceSizeRec, *ResourceSizePtr;
+
+typedef void (*SizeType)(void */*value*/,
+ XID /*id*/,
+ ResourceSizePtr /*size*/);
+
+extern _X_EXPORT RESTYPE CreateNewResourceType(DeleteType /*deleteFunc */ ,
+ const char * /*name */ );
+
+typedef void (*FindTypeSubResources)(void */* value */,
+ FindAllRes /* func */,
+ void */* cdata */);
+
+extern _X_EXPORT SizeType GetResourceTypeSizeFunc(
+ RESTYPE /*type*/);
+
+extern _X_EXPORT void SetResourceTypeFindSubResFunc(
+ RESTYPE /*type*/, FindTypeSubResources /*findFunc*/);
+
+extern _X_EXPORT void SetResourceTypeSizeFunc(
+ RESTYPE /*type*/, SizeType /*sizeFunc*/);
+
+extern _X_EXPORT void SetResourceTypeErrorValue(
+ RESTYPE /*type*/, int /*errorValue*/);
+
+extern _X_EXPORT RESTYPE CreateNewResourceClass(void);
+
+extern _X_EXPORT Bool InitClientResources(ClientPtr /*client */ );
+
+extern _X_EXPORT XID FakeClientID(int /*client */ );
+
+/* Quartz support on Mac OS X uses the CarbonCore
+ framework whose AddResource function conflicts here. */
+#ifdef __APPLE__
+#define AddResource Darwin_X_AddResource
+#endif
+extern _X_EXPORT Bool AddResource(XID /*id */ ,
+ RESTYPE /*type */ ,
+ void */*value */ );
+
+extern _X_EXPORT void FreeResource(XID /*id */ ,
+ RESTYPE /*skipDeleteFuncType */ );
+
+extern _X_EXPORT void FreeResourceByType(XID /*id */ ,
+ RESTYPE /*type */ ,
+ Bool /*skipFree */ );
+
+extern _X_EXPORT Bool ChangeResourceValue(XID /*id */ ,
+ RESTYPE /*rtype */ ,
+ void */*value */ );
+
+extern _X_EXPORT void FindClientResourcesByType(ClientPtr /*client */ ,
+ RESTYPE /*type */ ,
+ FindResType /*func */ ,
+ void */*cdata */ );
+
+extern _X_EXPORT void FindAllClientResources(ClientPtr /*client */ ,
+ FindAllRes /*func */ ,
+ void */*cdata */ );
+
+/** @brief Iterate through all subresources of a resource.
+
+ @note The XID argument provided to the FindAllRes function
+ may be 0 for subresources that don't have an XID */
+extern _X_EXPORT void FindSubResources(void */*resource*/,
+ RESTYPE /*type*/,
+ FindAllRes /*func*/,
+ void */*cdata*/);
+
+extern _X_EXPORT void FreeClientNeverRetainResources(ClientPtr /*client */ );
+
+extern _X_EXPORT void FreeClientResources(ClientPtr /*client */ );
+
+extern _X_EXPORT void FreeAllResources(void);
+
+extern _X_EXPORT Bool LegalNewID(XID /*id */ ,
+ ClientPtr /*client */ );
+
+extern _X_EXPORT void *LookupClientResourceComplex(ClientPtr client,
+ RESTYPE type,
+ FindComplexResType func,
+ void *cdata);
+
+extern _X_EXPORT int dixLookupResourceByType(void **result,
+ XID id,
+ RESTYPE rtype,
+ ClientPtr client,
+ Mask access_mode);
+
+extern _X_EXPORT int dixLookupResourceByClass(void **result,
+ XID id,
+ RESTYPE rclass,
+ ClientPtr client,
+ Mask access_mode);
+
+extern _X_EXPORT void GetXIDRange(int /*client */ ,
+ Bool /*server */ ,
+ XID * /*minp */ ,
+ XID * /*maxp */ );
+
+extern _X_EXPORT unsigned int GetXIDList(ClientPtr /*client */ ,
+ unsigned int /*count */ ,
+ XID * /*pids */ );
+
+extern _X_EXPORT RESTYPE lastResourceType;
+extern _X_EXPORT RESTYPE TypeMask;
+
+/** @brief A hashing function to be used for hashing resource IDs
+
+ @param id The resource ID to hash
+ @param numBits The number of bits in the resulting hash. Must be >=0.
+
+ @note This function is really only for handling
+ INITHASHSIZE..MAXHASHSIZE bit hashes, but will handle any number
+ of bits by either masking numBits lower bits of the ID or by
+ providing at most MAXHASHSIZE hashes.
+*/
+extern _X_EXPORT int HashResourceID(XID id,
+ int numBits);
+
+#endif /* RESOURCE_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/rgb.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/rgb.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/rgb.h (working copy)
@@ -0,0 +1,52 @@
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef RGB_H
+#define RGB_H
+typedef struct _RGB {
+ unsigned short red, green, blue;
+} RGB;
+#endif /* RGB_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/rrtransform.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/rrtransform.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/rrtransform.h (working copy)
@@ -0,0 +1,79 @@
+/*
+ * Copyright © 2007 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no representations
+ * about the suitability of this software for any purpose. It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+#ifndef _RRTRANSFORM_H_
+#define _RRTRANSFORM_H_
+
+#include <X11/extensions/randr.h>
+#include "picturestr.h"
+
+typedef struct _rrTransform RRTransformRec, *RRTransformPtr;
+
+struct _rrTransform {
+ PictTransform transform;
+ struct pict_f_transform f_transform;
+ struct pict_f_transform f_inverse;
+ PictFilterPtr filter;
+ xFixed *params;
+ int nparams;
+ int width;
+ int height;
+};
+
+extern _X_EXPORT void
+ RRTransformInit(RRTransformPtr transform);
+
+extern _X_EXPORT void
+ RRTransformFini(RRTransformPtr transform);
+
+extern _X_EXPORT Bool
+ RRTransformEqual(RRTransformPtr a, RRTransformPtr b);
+
+extern _X_EXPORT Bool
+
+RRTransformSetFilter(RRTransformPtr dst,
+ PictFilterPtr filter,
+ xFixed * params, int nparams, int width, int height);
+
+extern _X_EXPORT Bool
+ RRTransformCopy(RRTransformPtr dst, RRTransformPtr src);
+
+/*
+ * Compute the complete transformation matrix including
+ * client-specified transform, rotation/reflection values and the crtc
+ * offset.
+ *
+ * Return TRUE if the resulting transform is not a simple translation.
+ */
+extern _X_EXPORT Bool
+
+RRTransformCompute(int x,
+ int y,
+ int width,
+ int height,
+ Rotation rotation,
+ RRTransformPtr rr_transform,
+ PictTransformPtr transform,
+ struct pict_f_transform *f_transform,
+ struct pict_f_transform *f_inverse);
+
+#endif /* _RRTRANSFORM_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/sarea.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/sarea.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/sarea.h (working copy)
@@ -0,0 +1,96 @@
+/**
+ * \file sarea.h
+ * SAREA definitions.
+ *
+ * \author Kevin E. Martin <kevin@precisioninsight.com>
+ * \author Jens Owen <jens@tungstengraphics.com>
+ * \author Rickard E. (Rik) Faith <faith@valinux.com>
+ */
+
+/*
+ * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef _SAREA_H_
+#define _SAREA_H_
+
+#include "xf86drm.h"
+
+/* SAREA area needs to be at least a page */
+#if defined(__alpha__)
+#define SAREA_MAX 0x2000
+#elif defined(__ia64__)
+#define SAREA_MAX 0x10000 /* 64kB */
+#else
+/* Intel 830M driver needs at least 8k SAREA */
+#define SAREA_MAX 0x2000
+#endif
+
+#define SAREA_MAX_DRAWABLES 256
+
+#define SAREA_DRAWABLE_CLAIMED_ENTRY 0x80000000
+
+/**
+ * SAREA per drawable information.
+ *
+ * \sa _XF86DRISAREA.
+ */
+typedef struct _XF86DRISAREADrawable {
+ unsigned int stamp;
+ unsigned int flags;
+} XF86DRISAREADrawableRec, *XF86DRISAREADrawablePtr;
+
+/**
+ * SAREA frame information.
+ *
+ * \sa _XF86DRISAREA.
+ */
+typedef struct _XF86DRISAREAFrame {
+ unsigned int x;
+ unsigned int y;
+ unsigned int width;
+ unsigned int height;
+ unsigned int fullscreen;
+} XF86DRISAREAFrameRec, *XF86DRISAREAFramePtr;
+
+/**
+ * SAREA definition.
+ */
+typedef struct _XF86DRISAREA {
+ /** first thing is always the DRM locking structure */
+ drmLock lock;
+ /** \todo Use readers/writer lock for drawable_lock */
+ drmLock drawable_lock;
+ XF86DRISAREADrawableRec drawableTable[SAREA_MAX_DRAWABLES];
+ XF86DRISAREAFrameRec frame;
+ drm_context_t dummy_context;
+} XF86DRISAREARec, *XF86DRISAREAPtr;
+
+typedef struct _XF86DRILSAREA {
+ drmLock lock;
+ drmLock otherLocks[31];
+} XF86DRILSAREARec, *XF86DRILSAREAPtr;
+
+#endif
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/screenint.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/screenint.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/screenint.h (working copy)
@@ -0,0 +1,93 @@
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef SCREENINT_H
+#define SCREENINT_H
+
+#include "misc.h"
+
+typedef struct _PixmapFormat *PixmapFormatPtr;
+typedef struct _Visual *VisualPtr;
+typedef struct _Depth *DepthPtr;
+typedef struct _Screen *ScreenPtr;
+
+extern _X_EXPORT int AddScreen(Bool (* /*pfnInit */ )(
+ ScreenPtr /*pScreen */
+ ,
+ int /*argc */ ,
+ char ** /*argv */ ),
+ int /*argc */ ,
+ char ** /*argv */ );
+
+
+extern _X_EXPORT int AddGPUScreen(Bool (*pfnInit) (ScreenPtr /*pScreen */ ,
+ int /*argc */ ,
+ char ** /*argv */
+ ),
+ int argc, char **argv);
+
+extern _X_EXPORT void RemoveGPUScreen(ScreenPtr pScreen);
+
+extern _X_EXPORT void
+AttachUnboundGPU(ScreenPtr pScreen, ScreenPtr newScreen);
+extern _X_EXPORT void
+DetachUnboundGPU(ScreenPtr unbound);
+
+extern _X_EXPORT void
+AttachOutputGPU(ScreenPtr pScreen, ScreenPtr newScreen);
+
+extern _X_EXPORT void
+DetachOutputGPU(ScreenPtr output);
+
+extern _X_EXPORT void
+AttachOffloadGPU(ScreenPtr pScreen, ScreenPtr newScreen);
+
+extern _X_EXPORT void
+DetachOffloadGPU(ScreenPtr slave);
+
+typedef struct _ColormapRec *ColormapPtr;
+
+#endif /* SCREENINT_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/scrnintstr.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/scrnintstr.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/scrnintstr.h (working copy)
@@ -0,0 +1,547 @@
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef SCREENINTSTRUCT_H
+#define SCREENINTSTRUCT_H
+
+#include "screenint.h"
+#include "regionstr.h"
+#include "colormap.h"
+#include "cursor.h"
+#include "validate.h"
+#include <X11/Xproto.h>
+#include "dix.h"
+#include "privates.h"
+
+typedef struct _PixmapFormat {
+ unsigned char depth;
+ unsigned char bitsPerPixel;
+ unsigned char scanlinePad;
+} PixmapFormatRec;
+
+typedef struct _Visual {
+ VisualID vid;
+ short class;
+ short bitsPerRGBValue;
+ short ColormapEntries;
+ short nplanes; /* = log2 (ColormapEntries). This does not
+ * imply that the screen has this many planes.
+ * it may have more or fewer */
+ unsigned long redMask, greenMask, blueMask;
+ int offsetRed, offsetGreen, offsetBlue;
+} VisualRec;
+
+typedef struct _Depth {
+ unsigned char depth;
+ short numVids;
+ VisualID *vids; /* block of visual ids for this depth */
+} DepthRec;
+
+typedef struct _ScreenSaverStuff {
+ WindowPtr pWindow;
+ XID wid;
+ char blanked;
+ Bool (*ExternalScreenSaver) (ScreenPtr /*pScreen */ ,
+ int /*xstate */ ,
+ Bool /*force */ );
+} ScreenSaverStuffRec;
+
+/*
+ * There is a typedef for each screen function pointer so that code that
+ * needs to declare a screen function pointer (e.g. in a screen private
+ * or as a local variable) can easily do so and retain full type checking.
+ */
+
+typedef Bool (*CloseScreenProcPtr) (ScreenPtr /*pScreen */ );
+
+typedef void (*QueryBestSizeProcPtr) (int /*class */ ,
+ unsigned short * /*pwidth */ ,
+ unsigned short * /*pheight */ ,
+ ScreenPtr /*pScreen */ );
+
+typedef Bool (*SaveScreenProcPtr) (ScreenPtr /*pScreen */ ,
+ int /*on */ );
+
+typedef void (*GetImageProcPtr) (DrawablePtr /*pDrawable */ ,
+ int /*sx */ ,
+ int /*sy */ ,
+ int /*w */ ,
+ int /*h */ ,
+ unsigned int /*format */ ,
+ unsigned long /*planeMask */ ,
+ char * /*pdstLine */ );
+
+typedef void (*GetSpansProcPtr) (DrawablePtr /*pDrawable */ ,
+ int /*wMax */ ,
+ DDXPointPtr /*ppt */ ,
+ int * /*pwidth */ ,
+ int /*nspans */ ,
+ char * /*pdstStart */ );
+
+typedef void (*SourceValidateProcPtr) (DrawablePtr /*pDrawable */ ,
+ int /*x */ ,
+ int /*y */ ,
+ int /*width */ ,
+ int /*height */ ,
+ unsigned int /*subWindowMode */ );
+
+typedef Bool (*CreateWindowProcPtr) (WindowPtr /*pWindow */ );
+
+typedef Bool (*DestroyWindowProcPtr) (WindowPtr /*pWindow */ );
+
+typedef Bool (*PositionWindowProcPtr) (WindowPtr /*pWindow */ ,
+ int /*x */ ,
+ int /*y */ );
+
+typedef Bool (*ChangeWindowAttributesProcPtr) (WindowPtr /*pWindow */ ,
+ unsigned long /*mask */ );
+
+typedef Bool (*RealizeWindowProcPtr) (WindowPtr /*pWindow */ );
+
+typedef Bool (*UnrealizeWindowProcPtr) (WindowPtr /*pWindow */ );
+
+typedef void (*RestackWindowProcPtr) (WindowPtr /*pWindow */ ,
+ WindowPtr /*pOldNextSib */ );
+
+typedef int (*ValidateTreeProcPtr) (WindowPtr /*pParent */ ,
+ WindowPtr /*pChild */ ,
+ VTKind /*kind */ );
+
+typedef void (*PostValidateTreeProcPtr) (WindowPtr /*pParent */ ,
+ WindowPtr /*pChild */ ,
+ VTKind /*kind */ );
+
+typedef void (*WindowExposuresProcPtr) (WindowPtr /*pWindow */ ,
+ RegionPtr /*prgn */ ,
+ RegionPtr /*other_exposed */ );
+
+typedef void (*CopyWindowProcPtr) (WindowPtr /*pWindow */ ,
+ DDXPointRec /*ptOldOrg */ ,
+ RegionPtr /*prgnSrc */ );
+
+typedef void (*ClearToBackgroundProcPtr) (WindowPtr /*pWindow */ ,
+ int /*x */ ,
+ int /*y */ ,
+ int /*w */ ,
+ int /*h */ ,
+ Bool /*generateExposures */ );
+
+typedef void (*ClipNotifyProcPtr) (WindowPtr /*pWindow */ ,
+ int /*dx */ ,
+ int /*dy */ );
+
+/* pixmap will exist only for the duration of the current rendering operation */
+#define CREATE_PIXMAP_USAGE_SCRATCH 1
+/* pixmap will be the backing pixmap for a redirected window */
+#define CREATE_PIXMAP_USAGE_BACKING_PIXMAP 2
+/* pixmap will contain a glyph */
+#define CREATE_PIXMAP_USAGE_GLYPH_PICTURE 3
+/* pixmap will be shared */
+#define CREATE_PIXMAP_USAGE_SHARED 4
+
+typedef PixmapPtr (*CreatePixmapProcPtr) (ScreenPtr /*pScreen */ ,
+ int /*width */ ,
+ int /*height */ ,
+ int /*depth */ ,
+ unsigned /*usage_hint */ );
+
+typedef Bool (*DestroyPixmapProcPtr) (PixmapPtr /*pPixmap */ );
+
+typedef Bool (*RealizeFontProcPtr) (ScreenPtr /*pScreen */ ,
+ FontPtr /*pFont */ );
+
+typedef Bool (*UnrealizeFontProcPtr) (ScreenPtr /*pScreen */ ,
+ FontPtr /*pFont */ );
+
+typedef void (*ConstrainCursorProcPtr) (DeviceIntPtr /*pDev */ ,
+ ScreenPtr /*pScreen */ ,
+ BoxPtr /*pBox */ );
+
+typedef void (*CursorLimitsProcPtr) (DeviceIntPtr /* pDev */ ,
+ ScreenPtr /*pScreen */ ,
+ CursorPtr /*pCursor */ ,
+ BoxPtr /*pHotBox */ ,
+ BoxPtr /*pTopLeftBox */ );
+
+typedef Bool (*DisplayCursorProcPtr) (DeviceIntPtr /* pDev */ ,
+ ScreenPtr /*pScreen */ ,
+ CursorPtr /*pCursor */ );
+
+typedef Bool (*RealizeCursorProcPtr) (DeviceIntPtr /* pDev */ ,
+ ScreenPtr /*pScreen */ ,
+ CursorPtr /*pCursor */ );
+
+typedef Bool (*UnrealizeCursorProcPtr) (DeviceIntPtr /* pDev */ ,
+ ScreenPtr /*pScreen */ ,
+ CursorPtr /*pCursor */ );
+
+typedef void (*RecolorCursorProcPtr) (DeviceIntPtr /* pDev */ ,
+ ScreenPtr /*pScreen */ ,
+ CursorPtr /*pCursor */ ,
+ Bool /*displayed */ );
+
+typedef Bool (*SetCursorPositionProcPtr) (DeviceIntPtr /* pDev */ ,
+ ScreenPtr /*pScreen */ ,
+ int /*x */ ,
+ int /*y */ ,
+ Bool /*generateEvent */ );
+
+typedef Bool (*CreateGCProcPtr) (GCPtr /*pGC */ );
+
+typedef Bool (*CreateColormapProcPtr) (ColormapPtr /*pColormap */ );
+
+typedef void (*DestroyColormapProcPtr) (ColormapPtr /*pColormap */ );
+
+typedef void (*InstallColormapProcPtr) (ColormapPtr /*pColormap */ );
+
+typedef void (*UninstallColormapProcPtr) (ColormapPtr /*pColormap */ );
+
+typedef int (*ListInstalledColormapsProcPtr) (ScreenPtr /*pScreen */ ,
+ XID * /*pmaps */ );
+
+typedef void (*StoreColorsProcPtr) (ColormapPtr /*pColormap */ ,
+ int /*ndef */ ,
+ xColorItem * /*pdef */ );
+
+typedef void (*ResolveColorProcPtr) (unsigned short * /*pred */ ,
+ unsigned short * /*pgreen */ ,
+ unsigned short * /*pblue */ ,
+ VisualPtr /*pVisual */ );
+
+typedef RegionPtr (*BitmapToRegionProcPtr) (PixmapPtr /*pPix */ );
+
+typedef void (*SendGraphicsExposeProcPtr) (ClientPtr /*client */ ,
+ RegionPtr /*pRgn */ ,
+ XID /*drawable */ ,
+ int /*major */ ,
+ int /*minor */ );
+
+typedef void (*ScreenBlockHandlerProcPtr) (ScreenPtr /*pScreen*/ ,
+ void */*pTimeout */ ,
+ void */*pReadmask */ );
+
+typedef void (*ScreenWakeupHandlerProcPtr) (ScreenPtr /*pScreen*/ ,
+ unsigned long /*result */ ,
+ void */*pReadMask */ );
+
+typedef Bool (*CreateScreenResourcesProcPtr) (ScreenPtr /*pScreen */ );
+
+typedef Bool (*ModifyPixmapHeaderProcPtr) (PixmapPtr /*pPixmap */ ,
+ int /*width */ ,
+ int /*height */ ,
+ int /*depth */ ,
+ int /*bitsPerPixel */ ,
+ int /*devKind */ ,
+ void */*pPixData */ );
+
+typedef PixmapPtr (*GetWindowPixmapProcPtr) (WindowPtr /*pWin */ );
+
+typedef void (*SetWindowPixmapProcPtr) (WindowPtr /*pWin */ ,
+ PixmapPtr /*pPix */ );
+
+typedef PixmapPtr (*GetScreenPixmapProcPtr) (ScreenPtr /*pScreen */ );
+
+typedef void (*SetScreenPixmapProcPtr) (PixmapPtr /*pPix */ );
+
+typedef void (*MarkWindowProcPtr) (WindowPtr /*pWin */ );
+
+typedef Bool (*MarkOverlappedWindowsProcPtr) (WindowPtr /*parent */ ,
+ WindowPtr /*firstChild */ ,
+ WindowPtr * /*pLayerWin */ );
+
+typedef int (*ConfigNotifyProcPtr) (WindowPtr /*pWin */ ,
+ int /*x */ ,
+ int /*y */ ,
+ int /*w */ ,
+ int /*h */ ,
+ int /*bw */ ,
+ WindowPtr /*pSib */ );
+
+typedef void (*MoveWindowProcPtr) (WindowPtr /*pWin */ ,
+ int /*x */ ,
+ int /*y */ ,
+ WindowPtr /*pSib */ ,
+ VTKind /*kind */ );
+
+typedef void (*ResizeWindowProcPtr) (WindowPtr /*pWin */ ,
+ int /*x */ ,
+ int /*y */ ,
+ unsigned int /*w */ ,
+ unsigned int /*h */ ,
+ WindowPtr /*pSib */
+ );
+
+typedef WindowPtr (*GetLayerWindowProcPtr) (WindowPtr /*pWin */
+ );
+
+typedef void (*HandleExposuresProcPtr) (WindowPtr /*pWin */ );
+
+typedef void (*ReparentWindowProcPtr) (WindowPtr /*pWin */ ,
+ WindowPtr /*pPriorParent */ );
+
+typedef void (*SetShapeProcPtr) (WindowPtr /*pWin */ ,
+ int /* kind */ );
+
+typedef void (*ChangeBorderWidthProcPtr) (WindowPtr /*pWin */ ,
+ unsigned int /*width */ );
+
+typedef void (*MarkUnrealizedWindowProcPtr) (WindowPtr /*pChild */ ,
+ WindowPtr /*pWin */ ,
+ Bool /*fromConfigure */ );
+
+typedef Bool (*DeviceCursorInitializeProcPtr) (DeviceIntPtr /* pDev */ ,
+ ScreenPtr /* pScreen */ );
+
+typedef void (*DeviceCursorCleanupProcPtr) (DeviceIntPtr /* pDev */ ,
+ ScreenPtr /* pScreen */ );
+
+typedef void (*ConstrainCursorHarderProcPtr) (DeviceIntPtr, ScreenPtr, int,
+ int *, int *);
+
+
+typedef Bool (*SharePixmapBackingProcPtr)(PixmapPtr, ScreenPtr, void **);
+
+typedef Bool (*SetSharedPixmapBackingProcPtr)(PixmapPtr, void *);
+
+typedef Bool (*StartPixmapTrackingProcPtr)(PixmapPtr, PixmapPtr,
+ int x, int y);
+
+typedef Bool (*StopPixmapTrackingProcPtr)(PixmapPtr, PixmapPtr);
+
+typedef Bool (*ReplaceScanoutPixmapProcPtr)(DrawablePtr, PixmapPtr, Bool);
+
+typedef struct _Screen {
+ int myNum; /* index of this instance in Screens[] */
+ ATOM id;
+ short x, y, width, height;
+ short mmWidth, mmHeight;
+ short numDepths;
+ unsigned char rootDepth;
+ DepthPtr allowedDepths;
+ unsigned long rootVisual;
+ unsigned long defColormap;
+ short minInstalledCmaps, maxInstalledCmaps;
+ char backingStoreSupport, saveUnderSupport;
+ unsigned long whitePixel, blackPixel;
+ GCPtr GCperDepth[MAXFORMATS + 1];
+ /* next field is a stipple to use as default in
+ a GC. we don't build default tiles of all depths
+ because they are likely to be of a color
+ different from the default fg pixel, so
+ we don't win anything by building
+ a standard one.
+ */
+ PixmapPtr PixmapPerDepth[1];
+ void *devPrivate;
+ short numVisuals;
+ VisualPtr visuals;
+ WindowPtr root;
+ ScreenSaverStuffRec screensaver;
+
+ DevPrivateSetRec screenSpecificPrivates[PRIVATE_LAST];
+
+ /* Random screen procedures */
+
+ CloseScreenProcPtr CloseScreen;
+ QueryBestSizeProcPtr QueryBestSize;
+ SaveScreenProcPtr SaveScreen;
+ GetImageProcPtr GetImage;
+ GetSpansProcPtr GetSpans;
+ SourceValidateProcPtr SourceValidate;
+
+ /* Window Procedures */
+
+ CreateWindowProcPtr CreateWindow;
+ DestroyWindowProcPtr DestroyWindow;
+ PositionWindowProcPtr PositionWindow;
+ ChangeWindowAttributesProcPtr ChangeWindowAttributes;
+ RealizeWindowProcPtr RealizeWindow;
+ UnrealizeWindowProcPtr UnrealizeWindow;
+ ValidateTreeProcPtr ValidateTree;
+ PostValidateTreeProcPtr PostValidateTree;
+ WindowExposuresProcPtr WindowExposures;
+ CopyWindowProcPtr CopyWindow;
+ ClearToBackgroundProcPtr ClearToBackground;
+ ClipNotifyProcPtr ClipNotify;
+ RestackWindowProcPtr RestackWindow;
+
+ /* Pixmap procedures */
+
+ CreatePixmapProcPtr CreatePixmap;
+ DestroyPixmapProcPtr DestroyPixmap;
+
+ /* Font procedures */
+
+ RealizeFontProcPtr RealizeFont;
+ UnrealizeFontProcPtr UnrealizeFont;
+
+ /* Cursor Procedures */
+
+ ConstrainCursorProcPtr ConstrainCursor;
+ ConstrainCursorHarderProcPtr ConstrainCursorHarder;
+ CursorLimitsProcPtr CursorLimits;
+ DisplayCursorProcPtr DisplayCursor;
+ RealizeCursorProcPtr RealizeCursor;
+ UnrealizeCursorProcPtr UnrealizeCursor;
+ RecolorCursorProcPtr RecolorCursor;
+ SetCursorPositionProcPtr SetCursorPosition;
+
+ /* GC procedures */
+
+ CreateGCProcPtr CreateGC;
+
+ /* Colormap procedures */
+
+ CreateColormapProcPtr CreateColormap;
+ DestroyColormapProcPtr DestroyColormap;
+ InstallColormapProcPtr InstallColormap;
+ UninstallColormapProcPtr UninstallColormap;
+ ListInstalledColormapsProcPtr ListInstalledColormaps;
+ StoreColorsProcPtr StoreColors;
+ ResolveColorProcPtr ResolveColor;
+
+ /* Region procedures */
+
+ BitmapToRegionProcPtr BitmapToRegion;
+ SendGraphicsExposeProcPtr SendGraphicsExpose;
+
+ /* os layer procedures */
+
+ ScreenBlockHandlerProcPtr BlockHandler;
+ ScreenWakeupHandlerProcPtr WakeupHandler;
+
+ /* anybody can get a piece of this array */
+ PrivateRec *devPrivates;
+
+ CreateScreenResourcesProcPtr CreateScreenResources;
+ ModifyPixmapHeaderProcPtr ModifyPixmapHeader;
+
+ GetWindowPixmapProcPtr GetWindowPixmap;
+ SetWindowPixmapProcPtr SetWindowPixmap;
+ GetScreenPixmapProcPtr GetScreenPixmap;
+ SetScreenPixmapProcPtr SetScreenPixmap;
+
+ PixmapPtr pScratchPixmap; /* scratch pixmap "pool" */
+
+ unsigned int totalPixmapSize;
+
+ MarkWindowProcPtr MarkWindow;
+ MarkOverlappedWindowsProcPtr MarkOverlappedWindows;
+ ConfigNotifyProcPtr ConfigNotify;
+ MoveWindowProcPtr MoveWindow;
+ ResizeWindowProcPtr ResizeWindow;
+ GetLayerWindowProcPtr GetLayerWindow;
+ HandleExposuresProcPtr HandleExposures;
+ ReparentWindowProcPtr ReparentWindow;
+
+ SetShapeProcPtr SetShape;
+
+ ChangeBorderWidthProcPtr ChangeBorderWidth;
+ MarkUnrealizedWindowProcPtr MarkUnrealizedWindow;
+
+ /* Device cursor procedures */
+ DeviceCursorInitializeProcPtr DeviceCursorInitialize;
+ DeviceCursorCleanupProcPtr DeviceCursorCleanup;
+
+ /* set it in driver side if X server can copy the framebuffer content.
+ * Meant to be used together with '-background none' option, avoiding
+ * malicious users to steal framebuffer's content if that would be the
+ * default */
+ Bool canDoBGNoneRoot;
+
+ Bool isGPU;
+
+ struct xorg_list unattached_list;
+ struct xorg_list unattached_head;
+
+ ScreenPtr current_master;
+
+ struct xorg_list output_slave_list;
+ struct xorg_list output_head;
+
+ SharePixmapBackingProcPtr SharePixmapBacking;
+ SetSharedPixmapBackingProcPtr SetSharedPixmapBacking;
+
+ StartPixmapTrackingProcPtr StartPixmapTracking;
+ StopPixmapTrackingProcPtr StopPixmapTracking;
+
+ struct xorg_list pixmap_dirty_list;
+ struct xorg_list offload_slave_list;
+ struct xorg_list offload_head;
+
+ ReplaceScanoutPixmapProcPtr ReplaceScanoutPixmap;
+} ScreenRec;
+
+static inline RegionPtr
+BitmapToRegion(ScreenPtr _pScreen, PixmapPtr pPix)
+{
+ return (*(_pScreen)->BitmapToRegion) (pPix); /* no mi version?! */
+}
+
+typedef struct _ScreenInfo {
+ int imageByteOrder;
+ int bitmapScanlineUnit;
+ int bitmapScanlinePad;
+ int bitmapBitOrder;
+ int numPixmapFormats;
+ PixmapFormatRec formats[MAXFORMATS];
+ int numScreens;
+ ScreenPtr screens[MAXSCREENS];
+ int numGPUScreens;
+ ScreenPtr gpuscreens[MAXGPUSCREENS];
+ int x; /* origin */
+ int y; /* origin */
+ int width; /* total width of all screens together */
+ int height; /* total height of all screens together */
+} ScreenInfo;
+
+extern _X_EXPORT ScreenInfo screenInfo;
+
+extern _X_EXPORT void InitOutput(ScreenInfo * /*pScreenInfo */ ,
+ int /*argc */ ,
+ char ** /*argv */ );
+
+#endif /* SCREENINTSTRUCT_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/selection.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/selection.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/selection.h (working copy)
@@ -0,0 +1,100 @@
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef SELECTION_H
+#define SELECTION_H 1
+
+#include "dixstruct.h"
+#include "privates.h"
+
+/*
+ * Selection data structures
+ */
+
+typedef struct _Selection {
+ Atom selection;
+ TimeStamp lastTimeChanged;
+ Window window;
+ WindowPtr pWin;
+ ClientPtr client;
+ struct _Selection *next;
+ PrivateRec *devPrivates;
+} Selection;
+
+/*
+ * Selection API
+ */
+
+extern _X_EXPORT int dixLookupSelection(Selection ** result, Atom name,
+ ClientPtr client, Mask access_mode);
+
+extern _X_EXPORT Selection *CurrentSelections;
+
+extern _X_EXPORT CallbackListPtr SelectionCallback;
+
+typedef enum {
+ SelectionSetOwner,
+ SelectionWindowDestroy,
+ SelectionClientClose
+} SelectionCallbackKind;
+
+typedef struct {
+ struct _Selection *selection;
+ ClientPtr client;
+ SelectionCallbackKind kind;
+} SelectionInfoRec;
+
+/*
+ * Selection server internals
+ */
+
+extern _X_EXPORT void InitSelections(void);
+
+extern _X_EXPORT void DeleteWindowFromAnySelections(WindowPtr pWin);
+
+extern _X_EXPORT void DeleteClientFromAnySelections(ClientPtr client);
+
+#endif /* SELECTION_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/servermd.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/servermd.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/servermd.h (working copy)
@@ -0,0 +1,365 @@
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef SERVERMD_H
+#define SERVERMD_H 1
+
+/*
+ * Note: much of this is vestigial from mfb/cfb times. This should
+ * really be simplified even further.
+ */
+
+/*
+ * Machine dependent values:
+ * GLYPHPADBYTES should be chosen with consideration for the space-time
+ * trade-off. Padding to 0 bytes means that there is no wasted space
+ * in the font bitmaps (both on disk and in memory), but that access of
+ * the bitmaps will cause odd-address memory references. Padding to
+ * 2 bytes would ensure even address memory references and would
+ * be suitable for a 68010-class machine, but at the expense of wasted
+ * space in the font bitmaps. Padding to 4 bytes would be good
+ * for real 32 bit machines, etc. Be sure that you tell the font
+ * compiler what kind of padding you want because its defines are
+ * kept separate from this. See server/include/font.h for how
+ * GLYPHPADBYTES is used.
+ */
+
+#ifdef __avr32__
+
+#define IMAGE_BYTE_ORDER MSBFirst
+#define BITMAP_BIT_ORDER MSBFirst
+#define GLYPHPADBYTES 4
+
+#endif /* __avr32__ */
+
+#ifdef __arm32__
+
+#define IMAGE_BYTE_ORDER LSBFirst
+#define BITMAP_BIT_ORDER LSBFirst
+#define GLYPHPADBYTES 4
+
+#endif /* __arm32__ */
+
+#if defined(__nds32__)
+
+#define IMAGE_BYTE_ORDER LSBFirst
+
+#if defined(XF86MONOVGA) || defined(XF86VGA16) || defined(XF86MONO)
+#define BITMAP_BIT_ORDER MSBFirst
+#else
+#define BITMAP_BIT_ORDER LSBFirst
+#endif
+
+#if defined(XF86MONOVGA) || defined(XF86VGA16)
+#define BITMAP_SCANLINE_UNIT 8
+#endif
+
+#define GLYPHPADBYTES 4
+#define GETLEFTBITS_ALIGNMENT 1
+#define LARGE_INSTRUCTION_CACHE
+#define AVOID_MEMORY_READ
+
+#endif /* __nds32__ */
+
+#if defined __hppa__
+
+#define IMAGE_BYTE_ORDER MSBFirst
+#define BITMAP_BIT_ORDER MSBFirst
+#define GLYPHPADBYTES 4 /* to make fb work */
+ /* byte boundries */
+#endif /* hpux || __hppa__ */
+
+#if defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__)
+
+#define IMAGE_BYTE_ORDER MSBFirst
+#define BITMAP_BIT_ORDER MSBFirst
+#define GLYPHPADBYTES 4
+
+#endif /* PowerPC */
+
+#if defined(__sh__)
+
+#if defined(__BIG_ENDIAN__)
+#define IMAGE_BYTE_ORDER MSBFirst
+#define BITMAP_BIT_ORDER MSBFirst
+#define GLYPHPADBYTES 4
+#else
+#define IMAGE_BYTE_ORDER LSBFirst
+#define BITMAP_BIT_ORDER LSBFirst
+#define GLYPHPADBYTES 4
+#endif
+
+#endif /* SuperH */
+
+#if defined(__m32r__)
+
+#if defined(__BIG_ENDIAN__)
+#define IMAGE_BYTE_ORDER MSBFirst
+#define BITMAP_BIT_ORDER MSBFirst
+#define GLYPHPADBYTES 4
+#else
+#define IMAGE_BYTE_ORDER LSBFirst
+#define BITMAP_BIT_ORDER LSBFirst
+#define GLYPHPADBYTES 4
+#endif
+
+#endif /* __m32r__ */
+
+#if (defined(sun) && (defined(__sparc) || defined(sparc))) || \
+ (defined(__uxp__) && (defined(sparc) || defined(mc68000))) || \
+ defined(__sparc__) || defined(__mc68000__)
+
+#if defined(__sparc) || defined(__sparc__)
+#if !defined(sparc)
+#define sparc 1
+#endif
+#endif
+
+#if defined(sun386) || defined(sun5)
+#define IMAGE_BYTE_ORDER LSBFirst /* Values for the SUN only */
+#define BITMAP_BIT_ORDER LSBFirst
+#else
+#define IMAGE_BYTE_ORDER MSBFirst /* Values for the SUN only */
+#define BITMAP_BIT_ORDER MSBFirst
+#endif
+
+#define GLYPHPADBYTES 4
+
+#endif /* sun && !(i386 && SVR4) */
+
+#if defined(ibm032) || defined (ibm)
+
+#ifdef __i386__
+#define IMAGE_BYTE_ORDER LSBFirst /* Value for PS/2 only */
+#else
+#define IMAGE_BYTE_ORDER MSBFirst /* Values for the RT only */
+#endif
+#define BITMAP_BIT_ORDER MSBFirst
+#define GLYPHPADBYTES 1
+/* ibm pcc doesn't understand pragmas. */
+
+#ifdef __i386__
+#define BITMAP_SCANLINE_UNIT 8
+#endif
+
+#endif /* ibm */
+
+#if (defined(mips) || defined(__mips))
+
+#if defined(MIPSEL) || defined(__MIPSEL__)
+#define IMAGE_BYTE_ORDER LSBFirst /* Values for the PMAX only */
+#define BITMAP_BIT_ORDER LSBFirst
+#define GLYPHPADBYTES 4
+#else
+#define IMAGE_BYTE_ORDER MSBFirst /* Values for the MIPS only */
+#define BITMAP_BIT_ORDER MSBFirst
+#define GLYPHPADBYTES 4
+#endif
+
+#endif /* mips */
+
+#if defined(__alpha) || defined(__alpha__)
+#define IMAGE_BYTE_ORDER LSBFirst /* Values for the Alpha only */
+#define BITMAP_BIT_ORDER LSBFirst
+#define GLYPHPADBYTES 4
+
+#endif /* alpha */
+
+#if defined (linux) && defined (__s390__)
+
+#define IMAGE_BYTE_ORDER MSBFirst
+#define BITMAP_BIT_ORDER MSBFirst
+#define GLYPHPADBYTES 4
+
+#define BITMAP_SCANLINE_UNIT 8
+#define FAST_UNALIGNED_READ
+
+#endif /* linux/s390 */
+
+#if defined (linux) && defined (__s390x__)
+
+#define IMAGE_BYTE_ORDER MSBFirst
+#define BITMAP_BIT_ORDER MSBFirst
+#define GLYPHPADBYTES 4
+
+#define BITMAP_SCANLINE_UNIT 8
+#define FAST_UNALIGNED_READ
+
+#endif /* linux/s390x */
+
+#if defined(__ia64__) || defined(ia64)
+
+#define IMAGE_BYTE_ORDER LSBFirst
+#define BITMAP_BIT_ORDER LSBFirst
+#define GLYPHPADBYTES 4
+
+#endif /* ia64 */
+
+#if defined(__amd64__) || defined(amd64) || defined(__amd64)
+#define IMAGE_BYTE_ORDER LSBFirst
+#define BITMAP_BIT_ORDER LSBFirst
+#define GLYPHPADBYTES 4
+/* ???? */
+#endif /* AMD64 */
+
+#if defined(SVR4) && (defined(__i386__) || defined(__i386) ) || \
+ defined(__alpha__) || defined(__alpha) || \
+ defined(__i386__) || \
+ defined(__s390x__) || defined(__s390__)
+
+#ifndef IMAGE_BYTE_ORDER
+#define IMAGE_BYTE_ORDER LSBFirst
+#endif
+
+#ifndef BITMAP_BIT_ORDER
+#define BITMAP_BIT_ORDER LSBFirst
+#endif
+
+#ifndef GLYPHPADBYTES
+#define GLYPHPADBYTES 4
+#endif
+
+#endif /* SVR4 / BSD / i386 */
+
+#if defined (linux) && defined (__mc68000__)
+
+#define IMAGE_BYTE_ORDER MSBFirst
+#define BITMAP_BIT_ORDER MSBFirst
+#define GLYPHPADBYTES 4
+
+#endif /* linux/m68k */
+
+/* linux on ARM */
+#if defined(linux) && defined(__arm__)
+#define IMAGE_BYTE_ORDER LSBFirst
+#define BITMAP_BIT_ORDER LSBFirst
+#define GLYPHPADBYTES 4
+#endif
+
+/* linux on IBM S/390 */
+#if defined (linux) && defined (__s390__)
+#define IMAGE_BYTE_ORDER MSBFirst
+#define BITMAP_BIT_ORDER MSBFirst
+#define GLYPHPADBYTES 4
+#endif /* linux/s390 */
+
+#ifdef __aarch64__
+
+#ifdef __AARCH64EL__
+#define IMAGE_BYTE_ORDER LSBFirst
+#define BITMAP_BIT_ORDER LSBFirst
+#endif
+#ifdef __AARCH64EB__
+#define IMAGE_BYTE_ORDER MSBFirst
+#define BITMAP_BIT_ORDER MSBFirst
+#endif
+#define GLYPHPADBYTES 4
+
+#endif /* __aarch64__ */
+
+/* size of buffer to use with GetImage, measured in bytes. There's obviously
+ * a trade-off between the amount of heap used and the number of times the
+ * ddx routine has to be called.
+ */
+#ifndef IMAGE_BUFSIZE
+#define IMAGE_BUFSIZE (64*1024)
+#endif
+
+/* pad scanline to a longword */
+#ifndef BITMAP_SCANLINE_UNIT
+#define BITMAP_SCANLINE_UNIT 32
+#endif
+
+#ifndef BITMAP_SCANLINE_PAD
+#define BITMAP_SCANLINE_PAD 32
+#define LOG2_BITMAP_PAD 5
+#define LOG2_BYTES_PER_SCANLINE_PAD 2
+#endif
+
+#include <X11/Xfuncproto.h>
+/*
+ * This returns the number of padding units, for depth d and width w.
+ * For bitmaps this can be calculated with the macros above.
+ * Other depths require either grovelling over the formats field of the
+ * screenInfo or hardwired constants.
+ */
+
+typedef struct _PaddingInfo {
+ int padRoundUp; /* pixels per pad unit - 1 */
+ int padPixelsLog2; /* log 2 (pixels per pad unit) */
+ int padBytesLog2; /* log 2 (bytes per pad unit) */
+ int notPower2; /* bitsPerPixel not a power of 2 */
+ int bytesPerPixel; /* only set when notPower2 is TRUE */
+ int bitsPerPixel; /* bits per pixel */
+} PaddingInfo;
+extern _X_EXPORT PaddingInfo PixmapWidthPaddingInfo[];
+
+/* The only portable way to get the bpp from the depth is to look it up */
+#define BitsPerPixel(d) (PixmapWidthPaddingInfo[d].bitsPerPixel)
+
+#define PixmapWidthInPadUnits(w, d) \
+ (PixmapWidthPaddingInfo[d].notPower2 ? \
+ (((int)(w) * PixmapWidthPaddingInfo[d].bytesPerPixel + \
+ PixmapWidthPaddingInfo[d].bytesPerPixel) >> \
+ PixmapWidthPaddingInfo[d].padBytesLog2) : \
+ ((int)((w) + PixmapWidthPaddingInfo[d].padRoundUp) >> \
+ PixmapWidthPaddingInfo[d].padPixelsLog2))
+
+/*
+ * Return the number of bytes to which a scanline of the given
+ * depth and width will be padded.
+ */
+#define PixmapBytePad(w, d) \
+ (PixmapWidthInPadUnits(w, d) << PixmapWidthPaddingInfo[d].padBytesLog2)
+
+#define BitmapBytePad(w) \
+ (((int)((w) + BITMAP_SCANLINE_PAD - 1) >> LOG2_BITMAP_PAD) << LOG2_BYTES_PER_SCANLINE_PAD)
+
+#define PixmapWidthInPadUnitsProto(w, d) PixmapWidthInPadUnits(w, d)
+#define PixmapBytePadProto(w, d) PixmapBytePad(w, d)
+#define BitmapBytePadProto(w) BitmapBytePad(w)
+
+#endif /* SERVERMD_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/shadow.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/shadow.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/shadow.h (working copy)
@@ -0,0 +1,171 @@
+/*
+ *
+ * Copyright © 2000 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _SHADOW_H_
+#define _SHADOW_H_
+
+#include "scrnintstr.h"
+
+#include "picturestr.h"
+
+#include "damage.h"
+#include "damagestr.h"
+typedef struct _shadowBuf *shadowBufPtr;
+
+typedef void (*ShadowUpdateProc) (ScreenPtr pScreen, shadowBufPtr pBuf);
+
+#define SHADOW_WINDOW_RELOCATE 1
+#define SHADOW_WINDOW_READ 2
+#define SHADOW_WINDOW_WRITE 4
+
+typedef void *(*ShadowWindowProc) (ScreenPtr pScreen,
+ CARD32 row,
+ CARD32 offset,
+ int mode, CARD32 *size, void *closure);
+
+/* BC hack: do not move the damage member. see shadow.c for explanation. */
+typedef struct _shadowBuf {
+ DamagePtr pDamage;
+ ShadowUpdateProc update;
+ ShadowWindowProc window;
+ RegionRec damage;
+ PixmapPtr pPixmap;
+ void *closure;
+ int randr;
+
+ /* screen wrappers */
+ GetImageProcPtr GetImage;
+ CloseScreenProcPtr CloseScreen;
+} shadowBufRec;
+
+/* Match defines from randr extension */
+#define SHADOW_ROTATE_0 1
+#define SHADOW_ROTATE_90 2
+#define SHADOW_ROTATE_180 4
+#define SHADOW_ROTATE_270 8
+#define SHADOW_ROTATE_ALL (SHADOW_ROTATE_0|SHADOW_ROTATE_90|\
+ SHADOW_ROTATE_180|SHADOW_ROTATE_270)
+#define SHADOW_REFLECT_X 16
+#define SHADOW_REFLECT_Y 32
+#define SHADOW_REFLECT_ALL (SHADOW_REFLECT_X|SHADOW_REFLECT_Y)
+
+extern _X_EXPORT DevPrivateKey shadowScrPrivateKey;
+
+#define shadowGetBuf(pScr) ((shadowBufPtr) \
+ dixLookupPrivate(&(pScr)->devPrivates, shadowScrPrivateKey))
+#define shadowBuf(pScr) shadowBufPtr pBuf = shadowGetBuf(pScr)
+#define shadowDamage(pBuf) DamageRegion(pBuf->pDamage)
+
+extern _X_EXPORT Bool
+ shadowSetup(ScreenPtr pScreen);
+
+extern _X_EXPORT Bool
+
+shadowAdd(ScreenPtr pScreen,
+ PixmapPtr pPixmap,
+ ShadowUpdateProc update,
+ ShadowWindowProc window, int randr, void *closure);
+
+extern _X_EXPORT void
+ shadowRemove(ScreenPtr pScreen, PixmapPtr pPixmap);
+
+extern _X_EXPORT Bool
+
+shadowInit(ScreenPtr pScreen, ShadowUpdateProc update, ShadowWindowProc window);
+
+extern _X_EXPORT void *shadowAlloc(int width, int height, int bpp);
+
+extern _X_EXPORT void
+ shadowUpdateAfb4(ScreenPtr pScreen, shadowBufPtr pBuf);
+
+extern _X_EXPORT void
+ shadowUpdateAfb8(ScreenPtr pScreen, shadowBufPtr pBuf);
+
+extern _X_EXPORT void
+ shadowUpdateIplan2p4(ScreenPtr pScreen, shadowBufPtr pBuf);
+
+extern _X_EXPORT void
+ shadowUpdateIplan2p8(ScreenPtr pScreen, shadowBufPtr pBuf);
+
+extern _X_EXPORT void
+ shadowUpdatePacked(ScreenPtr pScreen, shadowBufPtr pBuf);
+
+extern _X_EXPORT void
+ shadowUpdatePlanar4(ScreenPtr pScreen, shadowBufPtr pBuf);
+
+extern _X_EXPORT void
+ shadowUpdatePlanar4x8(ScreenPtr pScreen, shadowBufPtr pBuf);
+
+extern _X_EXPORT void
+ shadowUpdateRotatePacked(ScreenPtr pScreen, shadowBufPtr pBuf);
+
+extern _X_EXPORT void
+ shadowUpdateRotate8_90(ScreenPtr pScreen, shadowBufPtr pBuf);
+
+extern _X_EXPORT void
+ shadowUpdateRotate16_90(ScreenPtr pScreen, shadowBufPtr pBuf);
+
+extern _X_EXPORT void
+ shadowUpdateRotate16_90YX(ScreenPtr pScreen, shadowBufPtr pBuf);
+
+extern _X_EXPORT void
+ shadowUpdateRotate32_90(ScreenPtr pScreen, shadowBufPtr pBuf);
+
+extern _X_EXPORT void
+ shadowUpdateRotate8_180(ScreenPtr pScreen, shadowBufPtr pBuf);
+
+extern _X_EXPORT void
+ shadowUpdateRotate16_180(ScreenPtr pScreen, shadowBufPtr pBuf);
+
+extern _X_EXPORT void
+ shadowUpdateRotate32_180(ScreenPtr pScreen, shadowBufPtr pBuf);
+
+extern _X_EXPORT void
+ shadowUpdateRotate8_270(ScreenPtr pScreen, shadowBufPtr pBuf);
+
+extern _X_EXPORT void
+ shadowUpdateRotate16_270(ScreenPtr pScreen, shadowBufPtr pBuf);
+
+extern _X_EXPORT void
+ shadowUpdateRotate16_270YX(ScreenPtr pScreen, shadowBufPtr pBuf);
+
+extern _X_EXPORT void
+ shadowUpdateRotate32_270(ScreenPtr pScreen, shadowBufPtr pBuf);
+
+extern _X_EXPORT void
+ shadowUpdateRotate8(ScreenPtr pScreen, shadowBufPtr pBuf);
+
+extern _X_EXPORT void
+ shadowUpdateRotate16(ScreenPtr pScreen, shadowBufPtr pBuf);
+
+extern _X_EXPORT void
+ shadowUpdateRotate32(ScreenPtr pScreen, shadowBufPtr pBuf);
+
+typedef void (*shadowUpdateProc) (ScreenPtr, shadowBufPtr);
+
+extern _X_EXPORT shadowUpdateProc shadowUpdatePackedWeak(void);
+extern _X_EXPORT shadowUpdateProc shadowUpdatePlanar4Weak(void);
+extern _X_EXPORT shadowUpdateProc shadowUpdatePlanar4x8Weak(void);
+extern _X_EXPORT shadowUpdateProc shadowUpdateRotatePackedWeak(void);
+
+#endif /* _SHADOW_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/shadowfb.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/shadowfb.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/shadowfb.h (working copy)
@@ -0,0 +1,39 @@
+
+#ifndef _SHADOWFB_H
+#define _SHADOWFB_H
+
+#include "xf86str.h"
+
+/*
+ * User defined callback function. Passed a pointer to the ScrnInfo struct,
+ * the number of dirty rectangles, and a pointer to the first dirty rectangle
+ * in the array.
+ */
+typedef void (*RefreshAreaFuncPtr) (ScrnInfoPtr, int, BoxPtr);
+
+/*
+ * ShadowFBInit initializes the shadowfb subsystem. refreshArea is a pointer
+ * to a user supplied callback function. This function will be called after
+ * any operation that modifies the framebuffer. The newly dirtied rectangles
+ * are passed to the callback.
+ *
+ * Returns FALSE in the event of an error.
+ */
+extern _X_EXPORT Bool
+ ShadowFBInit(ScreenPtr pScreen, RefreshAreaFuncPtr refreshArea);
+
+/*
+ * ShadowFBInit2 is a more featureful refinement of the original shadowfb.
+ * ShadowFBInit2 allows you to specify two callbacks, one to be called
+ * immediately before an operation that modifies the framebuffer, and another
+ * to be called immediately after.
+ *
+ * Returns FALSE in the event of an error
+ */
+extern _X_EXPORT Bool
+
+ShadowFBInit2(ScreenPtr pScreen,
+ RefreshAreaFuncPtr preRefreshArea,
+ RefreshAreaFuncPtr postRefreshArea);
+
+#endif /* _SHADOWFB_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/shmint.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/shmint.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/shmint.h (working copy)
@@ -0,0 +1,93 @@
+/*
+ * Copyright © 2003 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _SHMINT_H_
+#define _SHMINT_H_
+
+#include <X11/extensions/shmproto.h>
+
+#include "screenint.h"
+#include "pixmap.h"
+#include "gc.h"
+
+#define XSHM_PUT_IMAGE_ARGS \
+ DrawablePtr /* dst */, \
+ GCPtr /* pGC */, \
+ int /* depth */, \
+ unsigned int /* format */, \
+ int /* w */, \
+ int /* h */, \
+ int /* sx */, \
+ int /* sy */, \
+ int /* sw */, \
+ int /* sh */, \
+ int /* dx */, \
+ int /* dy */, \
+ char * /* data */
+
+#define XSHM_CREATE_PIXMAP_ARGS \
+ ScreenPtr /* pScreen */, \
+ int /* width */, \
+ int /* height */, \
+ int /* depth */, \
+ char * /* addr */
+
+typedef struct _ShmFuncs {
+ PixmapPtr (*CreatePixmap) (XSHM_CREATE_PIXMAP_ARGS);
+ void (*PutImage) (XSHM_PUT_IMAGE_ARGS);
+} ShmFuncs, *ShmFuncsPtr;
+
+#if XTRANS_SEND_FDS
+#define SHM_FD_PASSING 1
+#endif
+
+typedef struct _ShmDesc {
+ struct _ShmDesc *next;
+ int shmid;
+ int refcnt;
+ char *addr;
+ Bool writable;
+ unsigned long size;
+#ifdef SHM_FD_PASSING
+ Bool is_fd;
+ struct busfault *busfault;
+ XID resource;
+#endif
+} ShmDescRec, *ShmDescPtr;
+
+#ifdef SHM_FD_PASSING
+#define SHMDESC_IS_FD(shmdesc) ((shmdesc)->is_fd)
+#else
+#define SHMDESC_IS_FD(shmdesc) (0)
+#endif
+
+extern _X_EXPORT void
+ ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs);
+
+extern _X_EXPORT void
+ ShmRegisterFbFuncs(ScreenPtr pScreen);
+
+extern _X_EXPORT RESTYPE ShmSegType;
+extern _X_EXPORT int ShmCompletionCode;
+extern _X_EXPORT int BadShmSegCode;
+
+#endif /* _SHMINT_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/site.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/site.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/site.h (working copy)
@@ -0,0 +1,126 @@
+/************************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+********************************************************/
+
+#ifndef SITE_H
+#define SITE_H
+/*
+ * The vendor string identifies the vendor responsible for the
+ * server executable.
+ */
+#ifndef VENDOR_STRING
+#define VENDOR_STRING "The X.Org Foundation"
+#endif
+
+/*
+ * The vendor release number identifies, for the purpose of submitting
+ * traceable bug reports, the release number of software produced
+ * by the vendor.
+ */
+#ifndef VENDOR_RELEASE
+#define VENDOR_RELEASE 6600
+#endif
+
+/*
+ * The following constants are provided solely as a last line of defense. The
+ * normal build ALWAYS overrides them using a special rule given in
+ * server/dix/Imakefile. If you want to change either of these constants,
+ * you should set the DefaultFontPath or DefaultRGBDatabase configuration
+ * parameters.
+ * DO NOT CHANGE THESE VALUES OR THE DIX IMAKEFILE!
+ */
+#ifndef COMPILEDDEFAULTFONTPATH
+#define COMPILEDDEFAULTFONTPATH "/usr/share/fonts/X11/misc/"
+#endif
+
+/*
+ * The following constants contain default values for all of the variables
+ * that can be initialized on the server command line or in the environment.
+ */
+#define COMPILEDDEFAULTFONT "fixed"
+#define COMPILEDCURSORFONT "cursor"
+#ifndef COMPILEDDISPLAYCLASS
+#define COMPILEDDISPLAYCLASS "MIT-unspecified"
+#endif
+#define DEFAULT_TIMEOUT 60 /* seconds */
+#define DEFAULT_KEYBOARD_CLICK 0
+#define DEFAULT_BELL 50
+#define DEFAULT_BELL_PITCH 400
+#define DEFAULT_BELL_DURATION 100
+#define DEFAULT_AUTOREPEAT TRUE
+#define DEFAULT_AUTOREPEATS {\
+ 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,\
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,\
+ 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
+
+#define DEFAULT_LEDS 0x0 /* all off */
+#define DEFAULT_LEDS_MASK 0xffffffff /* 32 */
+#define DEFAULT_INT_RESOLUTION 1000
+#define DEFAULT_INT_MIN_VALUE 0
+#define DEFAULT_INT_MAX_VALUE 100
+#define DEFAULT_INT_DISPLAYED 0
+
+#define DEFAULT_PTR_NUMERATOR 2
+#define DEFAULT_PTR_DENOMINATOR 1
+#define DEFAULT_PTR_THRESHOLD 4
+
+#define DEFAULT_SCREEN_SAVER_TIME (10 * (60 * 1000))
+#define DEFAULT_SCREEN_SAVER_INTERVAL (10 * (60 * 1000))
+#define DEFAULT_SCREEN_SAVER_BLANKING PreferBlanking
+#define DEFAULT_SCREEN_SAVER_EXPOSURES AllowExposures
+#ifndef DEFAULT_ACCESS_CONTROL
+#define DEFAULT_ACCESS_CONTROL TRUE
+#endif
+
+/* Default logging parameters. */
+#ifndef DEFAULT_LOG_VERBOSITY
+#define DEFAULT_LOG_VERBOSITY 0
+#endif
+#ifndef DEFAULT_LOG_FILE_VERBOSITY
+#define DEFAULT_LOG_FILE_VERBOSITY 3
+#endif
+
+#endif /* SITE_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/swaprep.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/swaprep.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/swaprep.h (working copy)
@@ -0,0 +1,260 @@
+/************************************************************
+
+Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of the above listed
+copyright holder(s) not be used in advertising or publicity pertaining
+to distribution of the software without specific, written prior
+permission.
+
+THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD
+TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
+LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+#ifndef SWAPREP_H
+#define SWAPREP_H 1
+
+extern _X_EXPORT void Swap32Write(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ CARD32 * /* pbuf */ );
+
+extern _X_EXPORT void CopySwap32Write(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ CARD32 * /* pbuf */ );
+
+extern _X_EXPORT void CopySwap16Write(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ short * /* pbuf */ );
+
+extern _X_EXPORT void SGenericReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xGenericReply * /* pRep */ );
+
+extern _X_EXPORT void SGetWindowAttributesReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xGetWindowAttributesReply *
+ /* pRep */ );
+
+extern _X_EXPORT void SGetGeometryReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xGetGeometryReply * /* pRep */ );
+
+extern _X_EXPORT void SQueryTreeReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xQueryTreeReply * /* pRep */ );
+
+extern _X_EXPORT void SInternAtomReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xInternAtomReply * /* pRep */ );
+
+extern _X_EXPORT void SGetAtomNameReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xGetAtomNameReply * /* pRep */ );
+
+extern _X_EXPORT void SGetPropertyReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xGetPropertyReply * /* pRep */ );
+
+extern _X_EXPORT void SListPropertiesReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xListPropertiesReply * /* pRep */ );
+
+extern _X_EXPORT void SGetSelectionOwnerReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xGetSelectionOwnerReply *
+ /* pRep */ );
+
+extern _X_EXPORT void SQueryPointerReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xQueryPointerReply * /* pRep */ );
+
+extern _X_EXPORT void SwapTimeCoordWrite(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xTimecoord * /* pRep */ );
+
+extern _X_EXPORT void SGetMotionEventsReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xGetMotionEventsReply * /* pRep */
+ );
+
+extern _X_EXPORT void STranslateCoordsReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xTranslateCoordsReply * /* pRep */
+ );
+
+extern _X_EXPORT void SGetInputFocusReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xGetInputFocusReply * /* pRep */ );
+
+extern _X_EXPORT void SQueryKeymapReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xQueryKeymapReply * /* pRep */ );
+
+extern _X_EXPORT void SQueryFontReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xQueryFontReply * /* pRep */ );
+
+extern _X_EXPORT void SQueryTextExtentsReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xQueryTextExtentsReply * /* pRep */
+ );
+
+extern _X_EXPORT void SListFontsReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xListFontsReply * /* pRep */ );
+
+extern _X_EXPORT void SListFontsWithInfoReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xListFontsWithInfoReply *
+ /* pRep */ );
+
+extern _X_EXPORT void SGetFontPathReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xGetFontPathReply * /* pRep */ );
+
+extern _X_EXPORT void SGetImageReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xGetImageReply * /* pRep */ );
+
+extern _X_EXPORT void SListInstalledColormapsReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xListInstalledColormapsReply
+ * /* pRep */ );
+
+extern _X_EXPORT void SAllocColorReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xAllocColorReply * /* pRep */ );
+
+extern _X_EXPORT void SAllocNamedColorReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xAllocNamedColorReply * /* pRep */
+ );
+
+extern _X_EXPORT void SAllocColorCellsReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xAllocColorCellsReply * /* pRep */
+ );
+
+extern _X_EXPORT void SAllocColorPlanesReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xAllocColorPlanesReply * /* pRep */
+ );
+
+extern _X_EXPORT void SQColorsExtend(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xrgb * /* prgb */ );
+
+extern _X_EXPORT void SQueryColorsReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xQueryColorsReply * /* pRep */ );
+
+extern _X_EXPORT void SLookupColorReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xLookupColorReply * /* pRep */ );
+
+extern _X_EXPORT void SQueryBestSizeReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xQueryBestSizeReply * /* pRep */ );
+
+extern _X_EXPORT void SListExtensionsReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xListExtensionsReply * /* pRep */ );
+
+extern _X_EXPORT void SGetKeyboardMappingReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xGetKeyboardMappingReply *
+ /* pRep */ );
+
+extern _X_EXPORT void SGetPointerMappingReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xGetPointerMappingReply *
+ /* pRep */ );
+
+extern _X_EXPORT void SGetModifierMappingReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xGetModifierMappingReply *
+ /* pRep */ );
+
+extern _X_EXPORT void SGetKeyboardControlReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xGetKeyboardControlReply *
+ /* pRep */ );
+
+extern _X_EXPORT void SGetPointerControlReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xGetPointerControlReply *
+ /* pRep */ );
+
+extern _X_EXPORT void SGetScreenSaverReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xGetScreenSaverReply * /* pRep */ );
+
+extern _X_EXPORT void SLHostsExtend(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ char * /* buf */ );
+
+extern _X_EXPORT void SListHostsReply(ClientPtr /* pClient */ ,
+ int /* size */ ,
+ xListHostsReply * /* pRep */ );
+
+extern _X_EXPORT void SErrorEvent(xError * /* from */ ,
+ xError * /* to */ );
+
+extern _X_EXPORT void SwapConnSetupInfo(char * /* pInfo */ ,
+ char * /* pInfoTBase */ );
+
+extern _X_EXPORT void WriteSConnectionInfo(ClientPtr /* pClient */ ,
+ unsigned long /* size */ ,
+ char * /* pInfo */ );
+
+extern _X_EXPORT void SwapConnSetupPrefix(xConnSetupPrefix * /* pcspFrom */ ,
+ xConnSetupPrefix * /* pcspTo */ );
+
+extern _X_EXPORT void WriteSConnSetupPrefix(ClientPtr /* pClient */ ,
+ xConnSetupPrefix * /* pcsp */ );
+
+#undef SWAPREP_PROC
+#define SWAPREP_PROC(func) extern _X_EXPORT void func(xEvent * /* from */, xEvent * /* to */)
+
+SWAPREP_PROC(SCirculateEvent);
+SWAPREP_PROC(SClientMessageEvent);
+SWAPREP_PROC(SColormapEvent);
+SWAPREP_PROC(SConfigureNotifyEvent);
+SWAPREP_PROC(SConfigureRequestEvent);
+SWAPREP_PROC(SCreateNotifyEvent);
+SWAPREP_PROC(SDestroyNotifyEvent);
+SWAPREP_PROC(SEnterLeaveEvent);
+SWAPREP_PROC(SExposeEvent);
+SWAPREP_PROC(SFocusEvent);
+SWAPREP_PROC(SGraphicsExposureEvent);
+SWAPREP_PROC(SGravityEvent);
+SWAPREP_PROC(SKeyButtonPtrEvent);
+SWAPREP_PROC(SKeymapNotifyEvent);
+SWAPREP_PROC(SMapNotifyEvent);
+SWAPREP_PROC(SMapRequestEvent);
+SWAPREP_PROC(SMappingEvent);
+SWAPREP_PROC(SNoExposureEvent);
+SWAPREP_PROC(SPropertyEvent);
+SWAPREP_PROC(SReparentEvent);
+SWAPREP_PROC(SResizeRequestEvent);
+SWAPREP_PROC(SSelectionClearEvent);
+SWAPREP_PROC(SSelectionNotifyEvent);
+SWAPREP_PROC(SSelectionRequestEvent);
+SWAPREP_PROC(SUnmapNotifyEvent);
+SWAPREP_PROC(SVisibilityEvent);
+
+#undef SWAPREP_PROC
+
+#endif /* SWAPREP_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/swapreq.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/swapreq.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/swapreq.h (working copy)
@@ -0,0 +1,106 @@
+/************************************************************
+
+Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of the above listed
+copyright holder(s) not be used in advertising or publicity pertaining
+to distribution of the software without specific, written prior
+permission.
+
+THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD
+TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
+LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+#ifndef SWAPREQ_H
+#define SWAPREQ_H 1
+
+extern _X_EXPORT void SwapColorItem(xColorItem * /* pItem */ );
+
+extern _X_EXPORT void SwapConnClientPrefix(xConnClientPrefix * /* pCCP */ );
+
+#undef SWAPREQ_PROC
+
+#define SWAPREQ_PROC(func) extern _X_EXPORT int func(ClientPtr /* client */)
+
+SWAPREQ_PROC(SProcAllocColor);
+SWAPREQ_PROC(SProcAllocColorCells);
+SWAPREQ_PROC(SProcAllocColorPlanes);
+SWAPREQ_PROC(SProcAllocNamedColor);
+SWAPREQ_PROC(SProcChangeActivePointerGrab);
+SWAPREQ_PROC(SProcChangeGC);
+SWAPREQ_PROC(SProcChangeHosts);
+SWAPREQ_PROC(SProcChangeKeyboardControl);
+SWAPREQ_PROC(SProcChangeKeyboardMapping);
+SWAPREQ_PROC(SProcChangePointerControl);
+SWAPREQ_PROC(SProcChangeProperty);
+SWAPREQ_PROC(SProcChangeWindowAttributes);
+SWAPREQ_PROC(SProcClearToBackground);
+SWAPREQ_PROC(SProcConfigureWindow);
+SWAPREQ_PROC(SProcConvertSelection);
+SWAPREQ_PROC(SProcCopyArea);
+SWAPREQ_PROC(SProcCopyColormapAndFree);
+SWAPREQ_PROC(SProcCopyGC);
+SWAPREQ_PROC(SProcCopyPlane);
+SWAPREQ_PROC(SProcCreateColormap);
+SWAPREQ_PROC(SProcCreateCursor);
+SWAPREQ_PROC(SProcCreateGC);
+SWAPREQ_PROC(SProcCreateGlyphCursor);
+SWAPREQ_PROC(SProcCreatePixmap);
+SWAPREQ_PROC(SProcCreateWindow);
+SWAPREQ_PROC(SProcDeleteProperty);
+SWAPREQ_PROC(SProcFillPoly);
+SWAPREQ_PROC(SProcFreeColors);
+SWAPREQ_PROC(SProcGetImage);
+SWAPREQ_PROC(SProcGetMotionEvents);
+SWAPREQ_PROC(SProcGetProperty);
+SWAPREQ_PROC(SProcGrabButton);
+SWAPREQ_PROC(SProcGrabKey);
+SWAPREQ_PROC(SProcGrabKeyboard);
+SWAPREQ_PROC(SProcGrabPointer);
+SWAPREQ_PROC(SProcImageText);
+SWAPREQ_PROC(SProcInternAtom);
+SWAPREQ_PROC(SProcListFonts);
+SWAPREQ_PROC(SProcListFontsWithInfo);
+SWAPREQ_PROC(SProcLookupColor);
+SWAPREQ_PROC(SProcNoOperation);
+SWAPREQ_PROC(SProcOpenFont);
+SWAPREQ_PROC(SProcPoly);
+SWAPREQ_PROC(SProcPolyText);
+SWAPREQ_PROC(SProcPutImage);
+SWAPREQ_PROC(SProcQueryBestSize);
+SWAPREQ_PROC(SProcQueryColors);
+SWAPREQ_PROC(SProcQueryExtension);
+SWAPREQ_PROC(SProcRecolorCursor);
+SWAPREQ_PROC(SProcReparentWindow);
+SWAPREQ_PROC(SProcResourceReq);
+SWAPREQ_PROC(SProcRotateProperties);
+SWAPREQ_PROC(SProcSendEvent);
+SWAPREQ_PROC(SProcSetClipRectangles);
+SWAPREQ_PROC(SProcSetDashes);
+SWAPREQ_PROC(SProcSetFontPath);
+SWAPREQ_PROC(SProcSetInputFocus);
+SWAPREQ_PROC(SProcSetScreenSaver);
+SWAPREQ_PROC(SProcSetSelectionOwner);
+SWAPREQ_PROC(SProcSimpleReq);
+SWAPREQ_PROC(SProcStoreColors);
+SWAPREQ_PROC(SProcStoreNamedColor);
+SWAPREQ_PROC(SProcTranslateCoords);
+SWAPREQ_PROC(SProcUngrabButton);
+SWAPREQ_PROC(SProcUngrabKey);
+SWAPREQ_PROC(SProcWarpPointer);
+
+#undef SWAPREQ_PROC
+
+#endif /* SWAPREQ_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/syncsdk.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/syncsdk.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/syncsdk.h (working copy)
@@ -0,0 +1,46 @@
+/*
+ * Copyright © 2010 NVIDIA Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef _SYNCSDK_H_
+#define _SYNCSDK_H_
+
+#include "misync.h"
+
+extern _X_EXPORT int
+ SyncVerifyFence(SyncFence ** ppFence, XID fid, ClientPtr client, Mask mode);
+
+#define VERIFY_SYNC_FENCE(pFence, fid, client, mode) \
+ do { \
+ int rc; \
+ rc = SyncVerifyFence(&(pFence), (fid), (client), (mode)); \
+ if (Success != rc) return rc; \
+ } while (0)
+
+#define VERIFY_SYNC_FENCE_OR_NONE(pFence, fid, client, mode) \
+ do { \
+ pFence = 0; \
+ if (None != fid) \
+ VERIFY_SYNC_FENCE((pFence), (fid), (client), (mode)); \
+ } while (0)
+
+#endif /* _SYNCSDK_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/tda8425.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/tda8425.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/tda8425.h (working copy)
@@ -0,0 +1,44 @@
+#ifndef __TDA8425_H__
+#define __TDA8425_H__
+
+#include "xf86i2c.h"
+
+typedef struct {
+ I2CDevRec d;
+
+ int mux;
+ int stereo;
+ int v_left;
+ int v_right;
+ int bass;
+ int treble;
+ int src_sel;
+ Bool mute;
+} TDA8425Rec, *TDA8425Ptr;
+
+#define TDA8425_ADDR_1 0x82
+
+/* the third parameter is meant to force detection of tda8425.
+ This is because tda8425 is write-only and complete implementation
+ of I2C protocol is not always available. Besides address there is no good
+ way to autodetect it so we have to _know_ it is there anyway */
+
+#define xf86_Detect_tda8425 Detect_tda8425
+extern _X_EXPORT TDA8425Ptr Detect_tda8425(I2CBusPtr b, I2CSlaveAddr addr,
+ Bool force);
+#define xf86_tda8425_init tda8425_init
+extern _X_EXPORT Bool tda8425_init(TDA8425Ptr t);
+
+#define xf86_tda8425_setaudio tda8425_setaudio
+extern _X_EXPORT void tda8425_setaudio(TDA8425Ptr t);
+
+#define xf86_tda8425_mute tda8425_mute
+extern _X_EXPORT void tda8425_mute(TDA8425Ptr t, Bool mute);
+
+#define TDA8425SymbolsList \
+ "Detect_tda8425", \
+ "tda8425_init", \
+ "tda8425_setaudio", \
+ "tda8425_mute"
+
+#endif
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/tda9850.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/tda9850.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/tda9850.h (working copy)
@@ -0,0 +1,43 @@
+#ifndef __TDA9850_H__
+#define __TDA9850_H__
+
+#include "xf86i2c.h"
+
+typedef struct {
+ I2CDevRec d;
+
+ int mux;
+ int stereo;
+ int sap;
+ Bool mute;
+ Bool sap_mute;
+} TDA9850Rec, *TDA9850Ptr;
+
+#define TDA9850_ADDR_1 0xB4
+
+#define xf86_Detect_tda9850 Detect_tda9850
+extern _X_EXPORT TDA9850Ptr Detect_tda9850(I2CBusPtr b, I2CSlaveAddr addr);
+
+#define xf86_tda9850_init tda9850_init
+extern _X_EXPORT Bool tda9850_init(TDA9850Ptr t);
+
+#define xf86_tda9850_setaudio tda9850_setaudio
+extern _X_EXPORT void tda9850_setaudio(TDA9850Ptr t);
+
+#define xf86_tda9850_mute tda9850_mute
+extern _X_EXPORT void tda9850_mute(TDA9850Ptr t, Bool mute);
+
+#define xf86_tda9850_sap_mute tda9850_sap_mute
+extern _X_EXPORT void tda9850_sap_mute(TDA9850Ptr t, Bool sap_mute);
+
+#define xf86_tda9850_getstatus tda9850_getstatus
+extern _X_EXPORT CARD16 tda9850_getstatus(TDA9850Ptr t);
+
+#define TDA9850SymbolsList \
+ "Detect_tda9850", \
+ "tda9850_init", \
+ "tda9850_setaudio", \
+ "tda9850_mute", \
+ "tda9850_sap_mute"
+
+#endif
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/tda9885.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/tda9885.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/tda9885.h (working copy)
@@ -0,0 +1,63 @@
+#ifndef __TDA9885_H__
+#define __TDA9885_H__
+
+#include "xf86i2c.h"
+
+typedef struct {
+ I2CDevRec d;
+
+ /* write-only parameters */
+ /* B DATA */
+ CARD8 sound_trap;
+ CARD8 auto_mute_fm;
+ CARD8 carrier_mode;
+ CARD8 modulation;
+ CARD8 forced_mute_audio;
+ CARD8 port1;
+ CARD8 port2;
+ /* C DATA */
+ CARD8 top_adjustment;
+ CARD8 deemphasis;
+ CARD8 audio_gain;
+ /* E DATA */
+ CARD8 standard_sound_carrier;
+ CARD8 standard_video_if;
+ CARD8 minimum_gain;
+ CARD8 gating;
+ CARD8 vif_agc;
+ /* read-only values */
+
+ CARD8 after_reset;
+ CARD8 afc_status;
+ CARD8 vif_level;
+ CARD8 afc_win;
+ CARD8 fm_carrier;
+} TDA9885Rec, *TDA9885Ptr;
+
+#define TDA9885_ADDR_1 0x86
+#define TDA9885_ADDR_2 0x84
+#define TDA9885_ADDR_3 0x96
+#define TDA9885_ADDR_4 0x94
+
+#define xf86_Detect_tda9885 Detect_tda9885
+extern _X_EXPORT TDA9885Ptr Detect_tda9885(I2CBusPtr b, I2CSlaveAddr addr);
+
+#define xf86_tda9885_init tda9885_init
+extern _X_EXPORT Bool tda9885_init(TDA9885Ptr t);
+
+#define xf86_tda9885_setparameters tda9885_setparameters
+extern _X_EXPORT void tda9885_setparameters(TDA9885Ptr t);
+
+#define xf86_tda9885_getstatus tda9885_getstatus
+extern _X_EXPORT void tda9885_getstatus(TDA9885Ptr t);
+
+#define xf86_tda9885_dumpstatus tda9885_dumpstatus
+extern _X_EXPORT void tda9885_dumpstatus(TDA9885Ptr t);
+
+#define TDA9885SymbolsList \
+ "Detect_tda9885", \
+ "tda9885_init", \
+ "tda9885_setaudio", \
+ "tda9885_mute"
+
+#endif
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/uda1380.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/uda1380.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/uda1380.h (working copy)
@@ -0,0 +1,81 @@
+/*************************************************************************************
+ * Copyright (C) 2005 Bogdan D. bogdand@users.sourceforge.net
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this
+ * software and associated documentation files (the "Software"), to deal in the Software
+ * without restriction, including without limitation the rights to use, copy, modify,
+ * merge, publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or
+ * substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+ * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the author shall not be used in advertising or
+ * otherwise to promote the sale, use or other dealings in this Software without prior written
+ * authorization from the author.
+ *
+ * Revision 1.3 2005/09/24 21:56:00 bogdand
+ * Changed the license to a X/MIT one
+ *
+ * Revision 1.2 2005/07/01 22:43:11 daniels
+ * Change all misc.h and os.h references to <X11/foo.h>.
+ *
+ *
+ ************************************************************************************/
+
+#ifndef __UDA1380_H__
+#define __UDA1380_H__
+
+#include "xf86i2c.h"
+
+typedef struct {
+ I2CDevRec d;
+
+ CARD16 analog_mixer_settings; /* register 0x03 */
+
+} UDA1380Rec, *UDA1380Ptr;
+
+#define UDA1380_ADDR_1 0x30
+#define UDA1380_ADDR_2 0x34
+
+#define xf86_Detect_uda1380 Detect_uda1380
+extern _X_EXPORT UDA1380Ptr Detect_uda1380(I2CBusPtr b, I2CSlaveAddr addr);
+
+#define xf86_uda1380_init uda1380_init
+extern _X_EXPORT Bool uda1380_init(UDA1380Ptr t);
+
+#define xf86_uda1380_shutdown uda1380_shutdown
+extern _X_EXPORT void uda1380_shutdown(UDA1380Ptr t);
+
+#define xf86_uda1380_setvolume uda1380_setvolume
+extern _X_EXPORT void uda1380_setvolume(UDA1380Ptr t, INT32);
+
+#define xf86_uda1380_mute uda1380_mute
+extern _X_EXPORT void uda1380_mute(UDA1380Ptr t, Bool);
+
+#define xf86_uda1380_setparameters uda1380_setparameters
+extern _X_EXPORT void uda1380_setparameters(UDA1380Ptr t);
+
+#define xf86_uda1380_getstatus uda1380_getstatus
+extern _X_EXPORT void uda1380_getstatus(UDA1380Ptr t);
+
+#define xf86_uda1380_dumpstatus uda1380_dumpstatus
+extern _X_EXPORT void uda1380_dumpstatus(UDA1380Ptr t);
+
+#define UDA1380SymbolsList \
+ "Detect_uda1380", \
+ "uda1380_init", \
+ "uda1380_shutdown", \
+ "uda1380_setvolume", \
+ "uda1380_mute", \
+ "uda1380_setparameters", \
+ "uda1380_getstatus", \
+ "uda1380_dumpstatus"
+
+#endif
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/validate.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/validate.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/validate.h (working copy)
@@ -0,0 +1,40 @@
+
+/*
+
+Copyright 1989, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+*/
+
+#ifndef VALIDATE_H
+#define VALIDATE_H
+
+#include "miscstruct.h"
+#include "regionstr.h"
+
+typedef enum { VTOther, VTStack, VTMove, VTUnmap, VTMap, VTBroken } VTKind;
+
+/* union _Validate is now device dependent; see mivalidate.h for an example */
+typedef union _Validate *ValidatePtr;
+
+#define UnmapValData ((ValidatePtr)1)
+
+#endif /* VALIDATE_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/vbe.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/vbe.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/vbe.h (working copy)
@@ -0,0 +1,357 @@
+
+/*
+ * XFree86 vbe module
+ * Copyright 2000 Egbert Eich
+ *
+ * The mode query/save/set/restore functions from the vesa driver
+ * have been moved here.
+ * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com)
+ * Authors: Paulo César Pereira de Andrade <pcpa@conectiva.com.br>
+ */
+
+#ifndef _VBE_H
+#define _VBE_H
+#include "xf86int10.h"
+#include "xf86DDC.h"
+
+typedef enum {
+ DDC_UNCHECKED,
+ DDC_NONE,
+ DDC_1,
+ DDC_2,
+ DDC_1_2
+} ddc_lvl;
+
+typedef struct {
+ xf86Int10InfoPtr pInt10;
+ int version;
+ void *memory;
+ int real_mode_base;
+ int num_pages;
+ Bool init_int10;
+ ddc_lvl ddc;
+ Bool ddc_blank;
+} vbeInfoRec, *vbeInfoPtr;
+
+#define VBE_VERSION_MAJOR(x) *((CARD8*)(&x) + 1)
+#define VBE_VERSION_MINOR(x) (CARD8)(x)
+
+extern _X_EXPORT vbeInfoPtr VBEInit(xf86Int10InfoPtr pInt, int entityIndex);
+extern _X_EXPORT vbeInfoPtr VBEExtendedInit(xf86Int10InfoPtr pInt,
+ int entityIndex, int Flags);
+extern _X_EXPORT void vbeFree(vbeInfoPtr pVbe);
+extern _X_EXPORT xf86MonPtr vbeDoEDID(vbeInfoPtr pVbe, void *pDDCModule);
+
+#pragma pack(1)
+
+typedef struct vbeControllerInfoBlock {
+ CARD8 VbeSignature[4];
+ CARD16 VbeVersion;
+ CARD32 OemStringPtr;
+ CARD8 Capabilities[4];
+ CARD32 VideoModePtr;
+ CARD16 TotalMem;
+ CARD16 OemSoftwareRev;
+ CARD32 OemVendorNamePtr;
+ CARD32 OemProductNamePtr;
+ CARD32 OemProductRevPtr;
+ CARD8 Scratch[222];
+ CARD8 OemData[256];
+} vbeControllerInfoRec, *vbeControllerInfoPtr;
+
+#if defined(__GNUC__) || defined(__USLC__) || defined(__SUNPRO_C)
+#pragma pack() /* All GCC versions recognise this syntax */
+#else
+#pragma pack(0)
+#endif
+
+#if !( defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) )
+#define __attribute__(a)
+#endif
+
+typedef struct _VbeInfoBlock VbeInfoBlock;
+typedef struct _VbeModeInfoBlock VbeModeInfoBlock;
+typedef struct _VbeCRTCInfoBlock VbeCRTCInfoBlock;
+
+/*
+ * INT 0
+ */
+
+struct _VbeInfoBlock {
+ /* VESA 1.2 fields */
+ CARD8 VESASignature[4]; /* VESA */
+ CARD16 VESAVersion; /* Higher byte major, lower byte minor */
+ /*CARD32 */ char *OEMStringPtr;
+ /* Pointer to OEM string */
+ CARD8 Capabilities[4]; /* Capabilities of the video environment */
+
+ /*CARD32 */ CARD16 *VideoModePtr;
+ /* pointer to supported Super VGA modes */
+
+ CARD16 TotalMemory; /* Number of 64kb memory blocks on board */
+ /* if not VESA 2, 236 scratch bytes follow (256 bytes total size) */
+
+ /* VESA 2 fields */
+ CARD16 OemSoftwareRev; /* VBE implementation Software revision */
+ /*CARD32 */ char *OemVendorNamePtr;
+ /* Pointer to Vendor Name String */
+ /*CARD32 */ char *OemProductNamePtr;
+ /* Pointer to Product Name String */
+ /*CARD32 */ char *OemProductRevPtr;
+ /* Pointer to Product Revision String */
+ CARD8 Reserved[222]; /* Reserved for VBE implementation */
+ CARD8 OemData[256]; /* Data Area for OEM Strings */
+} __attribute__ ((packed));
+
+/* Return Super VGA Information */
+extern _X_EXPORT VbeInfoBlock *VBEGetVBEInfo(vbeInfoPtr pVbe);
+extern _X_EXPORT void VBEFreeVBEInfo(VbeInfoBlock * block);
+
+/*
+ * INT 1
+ */
+
+struct _VbeModeInfoBlock {
+ CARD16 ModeAttributes; /* mode attributes */
+ CARD8 WinAAttributes; /* window A attributes */
+ CARD8 WinBAttributes; /* window B attributes */
+ CARD16 WinGranularity; /* window granularity */
+ CARD16 WinSize; /* window size */
+ CARD16 WinASegment; /* window A start segment */
+ CARD16 WinBSegment; /* window B start segment */
+ CARD32 WinFuncPtr; /* real mode pointer to window function */
+ CARD16 BytesPerScanline; /* bytes per scanline */
+
+ /* Mandatory information for VBE 1.2 and above */
+ CARD16 XResolution; /* horizontal resolution in pixels or characters */
+ CARD16 YResolution; /* vertical resolution in pixels or characters */
+ CARD8 XCharSize; /* character cell width in pixels */
+ CARD8 YCharSize; /* character cell height in pixels */
+ CARD8 NumberOfPlanes; /* number of memory planes */
+ CARD8 BitsPerPixel; /* bits per pixel */
+ CARD8 NumberOfBanks; /* number of banks */
+ CARD8 MemoryModel; /* memory model type */
+ CARD8 BankSize; /* bank size in KB */
+ CARD8 NumberOfImages; /* number of images */
+ CARD8 Reserved; /* 1 *//* reserved for page function */
+
+ /* Direct color fields (required for direct/6 and YUV/7 memory models) */
+ CARD8 RedMaskSize; /* size of direct color red mask in bits */
+ CARD8 RedFieldPosition; /* bit position of lsb of red mask */
+ CARD8 GreenMaskSize; /* size of direct color green mask in bits */
+ CARD8 GreenFieldPosition; /* bit position of lsb of green mask */
+ CARD8 BlueMaskSize; /* size of direct color blue mask in bits */
+ CARD8 BlueFieldPosition; /* bit position of lsb of blue mask */
+ CARD8 RsvdMaskSize; /* size of direct color reserved mask in bits */
+ CARD8 RsvdFieldPosition; /* bit position of lsb of reserved mask */
+ CARD8 DirectColorModeInfo; /* direct color mode attributes */
+
+ /* Mandatory information for VBE 2.0 and above */
+ CARD32 PhysBasePtr; /* physical address for flat memory frame buffer */
+ CARD32 Reserved32; /* 0 *//* Reserved - always set to 0 */
+ CARD16 Reserved16; /* 0 *//* Reserved - always set to 0 */
+
+ /* Mandatory information for VBE 3.0 and above */
+ CARD16 LinBytesPerScanLine; /* bytes per scan line for linear modes */
+ CARD8 BnkNumberOfImagePages; /* number of images for banked modes */
+ CARD8 LinNumberOfImagePages; /* number of images for linear modes */
+ CARD8 LinRedMaskSize; /* size of direct color red mask (linear modes) */
+ CARD8 LinRedFieldPosition; /* bit position of lsb of red mask (linear modes) */
+ CARD8 LinGreenMaskSize; /* size of direct color green mask (linear modes) */
+ CARD8 LinGreenFieldPosition; /* bit position of lsb of green mask (linear modes) */
+ CARD8 LinBlueMaskSize; /* size of direct color blue mask (linear modes) */
+ CARD8 LinBlueFieldPosition; /* bit position of lsb of blue mask (linear modes) */
+ CARD8 LinRsvdMaskSize; /* size of direct color reserved mask (linear modes) */
+ CARD8 LinRsvdFieldPosition; /* bit position of lsb of reserved mask (linear modes) */
+ CARD32 MaxPixelClock; /* maximum pixel clock (in Hz) for graphics mode */
+ CARD8 Reserved2[189]; /* remainder of VbeModeInfoBlock */
+} __attribute__ ((packed));
+
+/* Return VBE Mode Information */
+extern _X_EXPORT VbeModeInfoBlock *VBEGetModeInfo(vbeInfoPtr pVbe, int mode);
+extern _X_EXPORT void VBEFreeModeInfo(VbeModeInfoBlock * block);
+
+/*
+ * INT2
+ */
+
+#define CRTC_DBLSCAN (1<<0)
+#define CRTC_INTERLACE (1<<1)
+#define CRTC_NHSYNC (1<<2)
+#define CRTC_NVSYNC (1<<3)
+
+struct _VbeCRTCInfoBlock {
+ CARD16 HorizontalTotal; /* Horizontal total in pixels */
+ CARD16 HorizontalSyncStart; /* Horizontal sync start in pixels */
+ CARD16 HorizontalSyncEnd; /* Horizontal sync end in pixels */
+ CARD16 VerticalTotal; /* Vertical total in lines */
+ CARD16 VerticalSyncStart; /* Vertical sync start in lines */
+ CARD16 VerticalSyncEnd; /* Vertical sync end in lines */
+ CARD8 Flags; /* Flags (Interlaced, Double Scan etc) */
+ CARD32 PixelClock; /* Pixel clock in units of Hz */
+ CARD16 RefreshRate; /* Refresh rate in units of 0.01 Hz */
+ CARD8 Reserved[40]; /* remainder of ModeInfoBlock */
+} __attribute__ ((packed));
+
+/* VbeCRTCInfoBlock is in the VESA 3.0 specs */
+
+extern _X_EXPORT Bool VBESetVBEMode(vbeInfoPtr pVbe, int mode,
+ VbeCRTCInfoBlock * crtc);
+
+/*
+ * INT 3
+ */
+
+extern _X_EXPORT Bool VBEGetVBEMode(vbeInfoPtr pVbe, int *mode);
+
+/*
+ * INT 4
+ */
+
+/* Save/Restore Super VGA video state */
+/* function values are (values stored in VESAPtr):
+ * 0 := query & allocate amount of memory to save state
+ * 1 := save state
+ * 2 := restore state
+ *
+ * function 0 called automatically if function 1 called without
+ * a previous call to function 0.
+ */
+
+typedef enum {
+ MODE_QUERY,
+ MODE_SAVE,
+ MODE_RESTORE
+} vbeSaveRestoreFunction;
+
+extern _X_EXPORT Bool
+
+VBESaveRestore(vbeInfoPtr pVbe, vbeSaveRestoreFunction fuction,
+ void **memory, int *size, int *real_mode_pages);
+
+/*
+ * INT 5
+ */
+
+extern _X_EXPORT Bool
+ VBEBankSwitch(vbeInfoPtr pVbe, unsigned int iBank, int window);
+
+/*
+ * INT 6
+ */
+
+typedef enum {
+ SCANWID_SET,
+ SCANWID_GET,
+ SCANWID_SET_BYTES,
+ SCANWID_GET_MAX
+} vbeScanwidthCommand;
+
+#define VBESetLogicalScanline(pVbe, width) \
+ VBESetGetLogicalScanlineLength(pVbe, SCANWID_SET, width, \
+ NULL, NULL, NULL)
+#define VBESetLogicalScanlineBytes(pVbe, width) \
+ VBESetGetLogicalScanlineLength(pVbe, SCANWID_SET_BYTES, width, \
+ NULL, NULL, NULL)
+#define VBEGetLogicalScanline(pVbe, pixels, bytes, max) \
+ VBESetGetLogicalScanlineLength(pVbe, SCANWID_GET, 0, \
+ pixels, bytes, max)
+#define VBEGetMaxLogicalScanline(pVbe, pixels, bytes, max) \
+ VBESetGetLogicalScanlineLength(pVbe, SCANWID_GET_MAX, 0, \
+ pixels, bytes, max)
+extern _X_EXPORT Bool VBESetGetLogicalScanlineLength(vbeInfoPtr pVbe,
+ vbeScanwidthCommand
+ command, int width,
+ int *pixels, int *bytes,
+ int *max);
+
+/*
+ * INT 7
+ */
+
+/* 16 bit code */
+extern _X_EXPORT Bool VBESetDisplayStart(vbeInfoPtr pVbe, int x, int y,
+ Bool wait_retrace);
+extern _X_EXPORT Bool VBEGetDisplayStart(vbeInfoPtr pVbe, int *x, int *y);
+
+/*
+ * INT 8
+ */
+
+/* if bits is 0, then it is a GET */
+extern _X_EXPORT int VBESetGetDACPaletteFormat(vbeInfoPtr pVbe, int bits);
+
+/*
+ * INT 9
+ */
+
+/*
+ * If getting a palette, the data argument is not used. It will return
+ * the data.
+ * If setting a palette, it will return the pointer received on success,
+ * NULL on failure.
+ */
+extern _X_EXPORT CARD32 *VBESetGetPaletteData(vbeInfoPtr pVbe, Bool set,
+ int first, int num, CARD32 *data,
+ Bool secondary,
+ Bool wait_retrace);
+#define VBEFreePaletteData(data) free(data)
+
+/*
+ * INT A
+ */
+
+typedef struct _VBEpmi {
+ int seg_tbl;
+ int tbl_off;
+ int tbl_len;
+} VBEpmi;
+
+extern _X_EXPORT VBEpmi *VBEGetVBEpmi(vbeInfoPtr pVbe);
+
+#define VESAFreeVBEpmi(pmi) free(pmi)
+
+/* high level helper functions */
+
+typedef struct _vbeModeInfoRec {
+ int width;
+ int height;
+ int bpp;
+ int n;
+ struct _vbeModeInfoRec *next;
+} vbeModeInfoRec, *vbeModeInfoPtr;
+
+typedef struct {
+ CARD8 *state;
+ CARD8 *pstate;
+ int statePage;
+ int stateSize;
+ int stateMode;
+} vbeSaveRestoreRec, *vbeSaveRestorePtr;
+
+extern _X_EXPORT void
+
+VBEVesaSaveRestore(vbeInfoPtr pVbe, vbeSaveRestorePtr vbe_sr,
+ vbeSaveRestoreFunction function);
+
+extern _X_EXPORT int VBEGetPixelClock(vbeInfoPtr pVbe, int mode, int Clock);
+extern _X_EXPORT Bool VBEDPMSSet(vbeInfoPtr pVbe, int mode);
+
+struct vbePanelID {
+ short hsize;
+ short vsize;
+ short fptype;
+ char redbpp;
+ char greenbpp;
+ char bluebpp;
+ char reservedbpp;
+ int reserved_offscreen_mem_size;
+ int reserved_offscreen_mem_pointer;
+ char reserved[14];
+};
+
+extern _X_EXPORT void VBEInterpretPanelID(ScrnInfoPtr pScrn,
+ struct vbePanelID *data);
+extern _X_EXPORT struct vbePanelID *VBEReadPanelID(vbeInfoPtr pVbe);
+
+#endif
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/vbeModes.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/vbeModes.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/vbeModes.h (working copy)
@@ -0,0 +1,94 @@
+/*
+ * Copyright © 2002 David Dawes
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the author(s) shall
+ * not be used in advertising or otherwise to promote the sale, use or other
+ * dealings in this Software without prior written authorization from
+ * the author(s).
+ *
+ * Authors: David Dawes <dawes@xfree86.org>
+ *
+ */
+
+#ifndef _VBE_MODES_H
+
+/*
+ * This is intended to be stored in the DisplayModeRec's private area.
+ * It includes all the information necessary to VBE information.
+ */
+typedef struct _VbeModeInfoData {
+ int mode;
+ VbeModeInfoBlock *data;
+ VbeCRTCInfoBlock *block;
+} VbeModeInfoData;
+
+#define V_DEPTH_1 0x001
+#define V_DEPTH_4 0x002
+#define V_DEPTH_8 0x004
+#define V_DEPTH_15 0x008
+#define V_DEPTH_16 0x010
+#define V_DEPTH_24_24 0x020
+#define V_DEPTH_24_32 0x040
+#define V_DEPTH_24 (V_DEPTH_24_24 | V_DEPTH_24_32)
+#define V_DEPTH_30 0x080
+#define V_DEPTH_32 0x100
+
+#define VBE_MODE_SUPPORTED(m) (((m)->ModeAttributes & 0x01) != 0)
+#define VBE_MODE_COLOR(m) (((m)->ModeAttributes & 0x08) != 0)
+#define VBE_MODE_GRAPHICS(m) (((m)->ModeAttributes & 0x10) != 0)
+#define VBE_MODE_VGA(m) (((m)->ModeAttributes & 0x40) == 0)
+#define VBE_MODE_LINEAR(m) (((m)->ModeAttributes & 0x80) != 0 && \
+ ((m)->PhysBasePtr != 0))
+
+#define VBE_MODE_USABLE(m, f) (VBE_MODE_SUPPORTED(m) || \
+ (f & V_MODETYPE_BAD)) && \
+ VBE_MODE_GRAPHICS(m) && \
+ (VBE_MODE_VGA(m) || VBE_MODE_LINEAR(m))
+
+#define V_MODETYPE_VBE 0x01
+#define V_MODETYPE_VGA 0x02
+#define V_MODETYPE_BAD 0x04
+
+extern _X_EXPORT int VBEFindSupportedDepths(vbeInfoPtr pVbe, VbeInfoBlock * vbe,
+ int *flags24, int modeTypes);
+extern _X_EXPORT DisplayModePtr VBEGetModePool(ScrnInfoPtr pScrn,
+ vbeInfoPtr pVbe,
+ VbeInfoBlock * vbe,
+ int modeTypes);
+extern _X_EXPORT void VBESetModeNames(DisplayModePtr pMode);
+extern _X_EXPORT void VBESetModeParameters(ScrnInfoPtr pScrn, vbeInfoPtr pVbe);
+
+/*
+ * Note: These are alternatives to the standard helpers. They should
+ * usually just wrap the standard helpers.
+ */
+extern _X_EXPORT int VBEValidateModes(ScrnInfoPtr scrp,
+ DisplayModePtr availModes,
+ const char **modeNames,
+ ClockRangePtr clockRanges,
+ int *linePitches, int minPitch,
+ int maxPitch, int pitchInc, int minHeight,
+ int maxHeight, int virtualX, int virtualY,
+ int apertureSize,
+ LookupModeFlags strategy);
+extern _X_EXPORT void VBEPrintModes(ScrnInfoPtr scrp);
+
+#endif /* VBE_MODES_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/vgaHW.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/vgaHW.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/vgaHW.h (working copy)
@@ -0,0 +1,237 @@
+
+/*
+ * Copyright (c) 1997,1998 The XFree86 Project, Inc.
+ *
+ * Loosely based on code bearing the following copyright:
+ *
+ * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
+ *
+ * Author: Dirk Hohndel
+ */
+
+#ifndef _VGAHW_H
+#define _VGAHW_H
+
+#include <X11/X.h>
+#include "misc.h"
+#include "input.h"
+#include "scrnintstr.h"
+#include "colormapst.h"
+
+#include "xf86str.h"
+#include "xf86Pci.h"
+
+#include "xf86DDC.h"
+
+#include "globals.h"
+#include <X11/extensions/dpmsconst.h>
+
+extern _X_EXPORT int vgaHWGetIndex(void);
+
+/*
+ * access macro
+ */
+#define VGAHWPTR(p) ((vgaHWPtr)((p)->privates[vgaHWGetIndex()].ptr))
+
+/* Standard VGA registers */
+#define VGA_ATTR_INDEX 0x3C0
+#define VGA_ATTR_DATA_W 0x3C0
+#define VGA_ATTR_DATA_R 0x3C1
+#define VGA_IN_STAT_0 0x3C2 /* read */
+#define VGA_MISC_OUT_W 0x3C2 /* write */
+#define VGA_ENABLE 0x3C3
+#define VGA_SEQ_INDEX 0x3C4
+#define VGA_SEQ_DATA 0x3C5
+#define VGA_DAC_MASK 0x3C6
+#define VGA_DAC_READ_ADDR 0x3C7
+#define VGA_DAC_WRITE_ADDR 0x3C8
+#define VGA_DAC_DATA 0x3C9
+#define VGA_FEATURE_R 0x3CA /* read */
+#define VGA_MISC_OUT_R 0x3CC /* read */
+#define VGA_GRAPH_INDEX 0x3CE
+#define VGA_GRAPH_DATA 0x3CF
+
+#define VGA_IOBASE_MONO 0x3B0
+#define VGA_IOBASE_COLOR 0x3D0
+
+#define VGA_CRTC_INDEX_OFFSET 0x04
+#define VGA_CRTC_DATA_OFFSET 0x05
+#define VGA_IN_STAT_1_OFFSET 0x0A /* read */
+#define VGA_FEATURE_W_OFFSET 0x0A /* write */
+
+/* default number of VGA registers stored internally */
+#define VGA_NUM_CRTC 25
+#define VGA_NUM_SEQ 5
+#define VGA_NUM_GFX 9
+#define VGA_NUM_ATTR 21
+
+/* Flags for vgaHWSave() and vgaHWRestore() */
+#define VGA_SR_MODE 0x01
+#define VGA_SR_FONTS 0x02
+#define VGA_SR_CMAP 0x04
+#define VGA_SR_ALL (VGA_SR_MODE | VGA_SR_FONTS | VGA_SR_CMAP)
+
+/* Defaults for the VGA memory window */
+#define VGA_DEFAULT_PHYS_ADDR 0xA0000
+#define VGA_DEFAULT_MEM_SIZE (64 * 1024)
+
+/*
+ * vgaRegRec contains settings of standard VGA registers.
+ */
+typedef struct {
+ unsigned char MiscOutReg; /* */
+ unsigned char *CRTC; /* Crtc Controller */
+ unsigned char *Sequencer; /* Video Sequencer */
+ unsigned char *Graphics; /* Video Graphics */
+ unsigned char *Attribute; /* Video Atribute */
+ unsigned char DAC[768]; /* Internal Colorlookuptable */
+ unsigned char numCRTC; /* number of CRTC registers, def=VGA_NUM_CRTC */
+ unsigned char numSequencer; /* number of seq registers, def=VGA_NUM_SEQ */
+ unsigned char numGraphics; /* number of gfx registers, def=VGA_NUM_GFX */
+ unsigned char numAttribute; /* number of attr registers, def=VGA_NUM_ATTR */
+} vgaRegRec, *vgaRegPtr;
+
+typedef struct _vgaHWRec *vgaHWPtr;
+
+typedef void (*vgaHWWriteIndexProcPtr) (vgaHWPtr hwp, CARD8 indx, CARD8 value);
+typedef CARD8 (*vgaHWReadIndexProcPtr) (vgaHWPtr hwp, CARD8 indx);
+typedef void (*vgaHWWriteProcPtr) (vgaHWPtr hwp, CARD8 value);
+typedef CARD8 (*vgaHWReadProcPtr) (vgaHWPtr hwp);
+typedef void (*vgaHWMiscProcPtr) (vgaHWPtr hwp);
+
+/*
+ * vgaHWRec contains per-screen information required by the vgahw module.
+ *
+ * Note, the palette referred to by the paletteEnabled, enablePalette and
+ * disablePalette is the 16-entry (+overscan) EGA-compatible palette accessed
+ * via the first 17 attribute registers and not the main 8-bit palette.
+ */
+typedef struct _vgaHWRec {
+ void *Base; /* Address of "VGA" memory */
+ int MapSize; /* Size of "VGA" memory */
+ unsigned long MapPhys; /* phys location of VGA mem */
+ int IOBase; /* I/O Base address */
+ CARD8 *MMIOBase; /* Pointer to MMIO start */
+ int MMIOOffset; /* base + offset + vgareg
+ = mmioreg */
+ void *FontInfo1; /* save area for fonts in
+ plane 2 */
+ void *FontInfo2; /* save area for fonts in
+ plane 3 */
+ void *TextInfo; /* save area for text */
+ vgaRegRec SavedReg; /* saved registers */
+ vgaRegRec ModeReg; /* register settings for
+ current mode */
+ Bool ShowOverscan;
+ Bool paletteEnabled;
+ Bool cmapSaved;
+ ScrnInfoPtr pScrn;
+ vgaHWWriteIndexProcPtr writeCrtc;
+ vgaHWReadIndexProcPtr readCrtc;
+ vgaHWWriteIndexProcPtr writeGr;
+ vgaHWReadIndexProcPtr readGr;
+ vgaHWReadProcPtr readST00;
+ vgaHWReadProcPtr readST01;
+ vgaHWReadProcPtr readFCR;
+ vgaHWWriteProcPtr writeFCR;
+ vgaHWWriteIndexProcPtr writeAttr;
+ vgaHWReadIndexProcPtr readAttr;
+ vgaHWWriteIndexProcPtr writeSeq;
+ vgaHWReadIndexProcPtr readSeq;
+ vgaHWWriteProcPtr writeMiscOut;
+ vgaHWReadProcPtr readMiscOut;
+ vgaHWMiscProcPtr enablePalette;
+ vgaHWMiscProcPtr disablePalette;
+ vgaHWWriteProcPtr writeDacMask;
+ vgaHWReadProcPtr readDacMask;
+ vgaHWWriteProcPtr writeDacWriteAddr;
+ vgaHWWriteProcPtr writeDacReadAddr;
+ vgaHWWriteProcPtr writeDacData;
+ vgaHWReadProcPtr readDacData;
+ void *ddc;
+ struct pci_io_handle *io;
+ vgaHWReadProcPtr readEnable;
+ vgaHWWriteProcPtr writeEnable;
+ struct pci_device *dev;
+} vgaHWRec;
+
+/* Some macros that VGA drivers can use in their ChipProbe() function */
+#define OVERSCAN 0x11 /* Index of OverScan register */
+
+/* Flags that define how overscan correction should take place */
+#define KGA_FIX_OVERSCAN 1 /* overcan correction required */
+#define KGA_ENABLE_ON_ZERO 2 /* if possible enable display at beginning */
+ /* of next scanline/frame */
+#define KGA_BE_TOT_DEC 4 /* always fix problem by setting blank end */
+ /* to total - 1 */
+#define BIT_PLANE 3 /* Which plane we write to in mono mode */
+#define BITS_PER_GUN 6
+#define COLORMAP_SIZE 256
+
+#define DACDelay(hw) \
+ do { \
+ (hw)->readST01((hw)); \
+ (hw)->readST01((hw)); \
+ } while (0)
+
+/* Function Prototypes */
+
+/* vgaHW.c */
+
+typedef void vgaHWProtectProc(ScrnInfoPtr, Bool);
+typedef void vgaHWBlankScreenProc(ScrnInfoPtr, Bool);
+
+extern _X_EXPORT void vgaHWSetStdFuncs(vgaHWPtr hwp);
+extern _X_EXPORT void vgaHWSetMmioFuncs(vgaHWPtr hwp, CARD8 *base, int offset);
+extern _X_EXPORT void vgaHWProtect(ScrnInfoPtr pScrn, Bool on);
+extern _X_EXPORT vgaHWProtectProc *vgaHWProtectWeak(void);
+extern _X_EXPORT Bool vgaHWSaveScreen(ScreenPtr pScreen, int mode);
+extern _X_EXPORT void vgaHWBlankScreen(ScrnInfoPtr pScrn, Bool on);
+extern _X_EXPORT vgaHWBlankScreenProc *vgaHWBlankScreenWeak(void);
+extern _X_EXPORT void vgaHWSeqReset(vgaHWPtr hwp, Bool start);
+extern _X_EXPORT void vgaHWRestoreFonts(ScrnInfoPtr scrninfp,
+ vgaRegPtr restore);
+extern _X_EXPORT void vgaHWRestoreMode(ScrnInfoPtr scrninfp, vgaRegPtr restore);
+extern _X_EXPORT void vgaHWRestoreColormap(ScrnInfoPtr scrninfp,
+ vgaRegPtr restore);
+extern _X_EXPORT void vgaHWRestore(ScrnInfoPtr scrninfp, vgaRegPtr restore,
+ int flags);
+extern _X_EXPORT void vgaHWSaveFonts(ScrnInfoPtr scrninfp, vgaRegPtr save);
+extern _X_EXPORT void vgaHWSaveMode(ScrnInfoPtr scrninfp, vgaRegPtr save);
+extern _X_EXPORT void vgaHWSaveColormap(ScrnInfoPtr scrninfp, vgaRegPtr save);
+extern _X_EXPORT void vgaHWSave(ScrnInfoPtr scrninfp, vgaRegPtr save,
+ int flags);
+extern _X_EXPORT Bool vgaHWInit(ScrnInfoPtr scrnp, DisplayModePtr mode);
+extern _X_EXPORT Bool vgaHWSetRegCounts(ScrnInfoPtr scrp, int numCRTC,
+ int numSequencer, int numGraphics,
+ int numAttribute);
+extern _X_EXPORT Bool vgaHWCopyReg(vgaRegPtr dst, vgaRegPtr src);
+extern _X_EXPORT Bool vgaHWGetHWRec(ScrnInfoPtr scrp);
+extern _X_EXPORT void vgaHWFreeHWRec(ScrnInfoPtr scrp);
+extern _X_EXPORT Bool vgaHWMapMem(ScrnInfoPtr scrp);
+extern _X_EXPORT void vgaHWUnmapMem(ScrnInfoPtr scrp);
+extern _X_EXPORT void vgaHWGetIOBase(vgaHWPtr hwp);
+extern _X_EXPORT void vgaHWLock(vgaHWPtr hwp);
+extern _X_EXPORT void vgaHWUnlock(vgaHWPtr hwp);
+extern _X_EXPORT void vgaHWEnable(vgaHWPtr hwp);
+extern _X_EXPORT void vgaHWDisable(vgaHWPtr hwp);
+extern _X_EXPORT void vgaHWDPMSSet(ScrnInfoPtr pScrn, int PowerManagementMode,
+ int flags);
+extern _X_EXPORT Bool vgaHWHandleColormaps(ScreenPtr pScreen);
+extern _X_EXPORT void vgaHWddc1SetSpeed(ScrnInfoPtr pScrn, xf86ddcSpeed speed);
+extern _X_EXPORT CARD32 vgaHWHBlankKGA(DisplayModePtr mode, vgaRegPtr regp,
+ int nBits, unsigned int Flags);
+extern _X_EXPORT CARD32 vgaHWVBlankKGA(DisplayModePtr mode, vgaRegPtr regp,
+ int nBits, unsigned int Flags);
+extern _X_EXPORT Bool vgaHWAllocDefaultRegs(vgaRegPtr regp);
+
+extern _X_EXPORT DDC1SetSpeedProc vgaHWddc1SetSpeedWeak(void);
+extern _X_EXPORT SaveScreenProcPtr vgaHWSaveScreenWeak(void);
+extern _X_EXPORT void xf86GetClocks(ScrnInfoPtr pScrn, int num,
+ Bool (*ClockFunc) (ScrnInfoPtr, int),
+ void (*ProtectRegs) (ScrnInfoPtr, Bool),
+ void (*BlankScreen) (ScrnInfoPtr, Bool),
+ unsigned long vertsyncreg, int maskval,
+ int knownclkindex, int knownclkvalue);
+
+#endif /* _VGAHW_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/vidmodeproc.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/vidmodeproc.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/vidmodeproc.h (working copy)
@@ -0,0 +1,84 @@
+
+/* Prototypes for DGA functions that the DDX must provide */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifndef _VIDMODEPROC_H_
+#define _VIDMODEPROC_H_
+
+typedef enum {
+ VIDMODE_H_DISPLAY,
+ VIDMODE_H_SYNCSTART,
+ VIDMODE_H_SYNCEND,
+ VIDMODE_H_TOTAL,
+ VIDMODE_H_SKEW,
+ VIDMODE_V_DISPLAY,
+ VIDMODE_V_SYNCSTART,
+ VIDMODE_V_SYNCEND,
+ VIDMODE_V_TOTAL,
+ VIDMODE_FLAGS,
+ VIDMODE_CLOCK
+} VidModeSelectMode;
+
+typedef enum {
+ VIDMODE_MON_VENDOR,
+ VIDMODE_MON_MODEL,
+ VIDMODE_MON_NHSYNC,
+ VIDMODE_MON_NVREFRESH,
+ VIDMODE_MON_HSYNC_LO,
+ VIDMODE_MON_HSYNC_HI,
+ VIDMODE_MON_VREFRESH_LO,
+ VIDMODE_MON_VREFRESH_HI
+} VidModeSelectMonitor;
+
+typedef union {
+ const void *ptr;
+ int i;
+ float f;
+} vidMonitorValue;
+
+extern Bool VidModeExtensionInit(ScreenPtr pScreen);
+
+extern _X_EXPORT Bool VidModeAvailable(int scrnIndex);
+extern _X_EXPORT Bool VidModeGetCurrentModeline(int scrnIndex, void **mode,
+ int *dotClock);
+extern _X_EXPORT Bool VidModeGetFirstModeline(int scrnIndex, void **mode,
+ int *dotClock);
+extern _X_EXPORT Bool VidModeGetNextModeline(int scrnIndex, void **mode,
+ int *dotClock);
+extern _X_EXPORT Bool VidModeDeleteModeline(int scrnIndex, void *mode);
+extern _X_EXPORT Bool VidModeZoomViewport(int scrnIndex, int zoom);
+extern _X_EXPORT Bool VidModeGetViewPort(int scrnIndex, int *x, int *y);
+extern _X_EXPORT Bool VidModeSetViewPort(int scrnIndex, int x, int y);
+extern _X_EXPORT Bool VidModeSwitchMode(int scrnIndex, void *mode);
+extern _X_EXPORT Bool VidModeLockZoom(int scrnIndex, Bool lock);
+extern _X_EXPORT Bool VidModeGetMonitor(int scrnIndex, void **monitor);
+extern _X_EXPORT int VidModeGetNumOfClocks(int scrnIndex, Bool *progClock);
+extern _X_EXPORT Bool VidModeGetClocks(int scrnIndex, int *Clocks);
+extern _X_EXPORT ModeStatus VidModeCheckModeForMonitor(int scrnIndex,
+ void *mode);
+extern _X_EXPORT ModeStatus VidModeCheckModeForDriver(int scrnIndex,
+ void *mode);
+extern _X_EXPORT void VidModeSetCrtcForMode(int scrnIndex, void *mode);
+extern _X_EXPORT Bool VidModeAddModeline(int scrnIndex, void *mode);
+extern _X_EXPORT int VidModeGetDotClock(int scrnIndex, int Clock);
+extern _X_EXPORT int VidModeGetNumOfModes(int scrnIndex);
+extern _X_EXPORT Bool VidModeSetGamma(int scrnIndex, float red, float green,
+ float blue);
+extern _X_EXPORT Bool VidModeGetGamma(int scrnIndex, float *red, float *green,
+ float *blue);
+extern _X_EXPORT void *VidModeCreateMode(void);
+extern _X_EXPORT void VidModeCopyMode(void *modefrom, void *modeto);
+extern _X_EXPORT int VidModeGetModeValue(void *mode, int valtyp);
+extern _X_EXPORT void VidModeSetModeValue(void *mode, int valtyp, int val);
+extern _X_EXPORT vidMonitorValue VidModeGetMonitorValue(void *monitor,
+ int valtyp, int indx);
+extern _X_EXPORT Bool VidModeSetGammaRamp(int, int, CARD16 *, CARD16 *,
+ CARD16 *);
+extern _X_EXPORT Bool VidModeGetGammaRamp(int, int, CARD16 *, CARD16 *,
+ CARD16 *);
+extern _X_EXPORT int VidModeGetGammaRampSize(int scrnIndex);
+
+#endif
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/wfbrename.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/wfbrename.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/wfbrename.h (working copy)
@@ -0,0 +1,170 @@
+#define fb16Lane wfb16Lane
+#define fb24_32CopyMtoN wfb24_32CopyMtoN
+#define fb24_32CreateScreenResources wfb24_32CreateScreenResources
+#define fb24_32GetImage wfb24_32GetImage
+#define fb24_32GetSpans wfb24_32GetSpans
+#define fb24_32ModifyPixmapHeader wfb24_32ModifyPixmapHeader
+#define fb24_32PutZImage wfb24_32PutZImage
+#define fb24_32ReformatTile wfb24_32ReformatTile
+#define fb24_32SetSpans wfb24_32SetSpans
+#define fb32Lane wfb32Lane
+#define fb8Lane wfb8Lane
+#define fbAddTraps wfbAddTraps
+#define fbAddTriangles wfbAddTriangles
+#define fbAllocatePrivates wfbAllocatePrivates
+#define fbArc16 wfbArc16
+#define fbArc24 wfbArc24
+#define fbArc32 wfbArc32
+#define fbArc8 wfbArc8
+#define fbBlt wfbBlt
+#define fbBlt24 wfbBlt24
+#define fbBltOne wfbBltOne
+#define fbBltOne24 wfbBltOne24
+#define fbBltPlane wfbBltPlane
+#define fbBltStip wfbBltStip
+#define fbBres wfbBres
+#define fbBresDash wfbBresDash
+#define fbBresDash16 wfbBresDash16
+#define fbBresDash24 wfbBresDash24
+#define fbBresDash32 wfbBresDash32
+#define fbBresDash8 wfbBresDash8
+#define fbBresFill wfbBresFill
+#define fbBresFillDash wfbBresFillDash
+#define fbBresSolid wfbBresSolid
+#define fbBresSolid16 wfbBresSolid16
+#define fbBresSolid24 wfbBresSolid24
+#define fbBresSolid32 wfbBresSolid32
+#define fbBresSolid8 wfbBresSolid8
+#define fbChangeWindowAttributes wfbChangeWindowAttributes
+#define fbClearVisualTypes wfbClearVisualTypes
+#define fbCloseScreen wfbCloseScreen
+#define fbComposite wfbComposite
+#define fbCopy1toN wfbCopy1toN
+#define fbCopyArea wfbCopyArea
+#define fbCopyNto1 wfbCopyNto1
+#define fbCopyNtoN wfbCopyNtoN
+#define fbCopyPlane wfbCopyPlane
+#define fbCopyRegion wfbCopyRegion
+#define fbCopyWindow wfbCopyWindow
+#define fbCopyWindowProc wfbCopyWindowProc
+#define fbCreateDefColormap wfbCreateDefColormap
+#define fbCreateGC wfbCreateGC
+#define fbCreatePixmap wfbCreatePixmap
+#define fbCreatePixmapBpp wfbCreatePixmapBpp
+#define fbCreateWindow wfbCreateWindow
+#define fbDestroyGlyphCache wfbDestroyGlyphCache
+#define fbDestroyPixmap wfbDestroyPixmap
+#define fbDestroyWindow wfbDestroyWindow
+#define fbDoCopy wfbDoCopy
+#define fbDots wfbDots
+#define fbDots16 wfbDots16
+#define fbDots24 wfbDots24
+#define fbDots32 wfbDots32
+#define fbDots8 wfbDots8
+#define fbEvenStipple wfbEvenStipple
+#define fbEvenTile wfbEvenTile
+#define fbExpandDirectColors wfbExpandDirectColors
+#define fbFill wfbFill
+#define fbFillRegionSolid wfbFillRegionSolid
+#define fbFillSpans wfbFillSpans
+#define fbFixCoordModePrevious wfbFixCoordModePrevious
+#define fbGCFuncs wfbGCFuncs
+#define fbGCOps wfbGCOps
+#define fbGeneration wfbGeneration
+#define fbGetImage wfbGetImage
+#define fbGetScreenPrivateKey wfbGetScreenPrivateKey
+#define fbGetSpans wfbGetSpans
+#define _fbGetWindowPixmap _wfbGetWindowPixmap
+#define fbGlyph16 wfbGlyph16
+#define fbGlyph24 wfbGlyph24
+#define fbGlyph32 wfbGlyph32
+#define fbGlyph8 wfbGlyph8
+#define fbGlyphIn wfbGlyphIn
+#define fbHasVisualTypes wfbHasVisualTypes
+#define fbImageGlyphBlt wfbImageGlyphBlt
+#define fbIn wfbIn
+#define fbInitializeColormap wfbInitializeColormap
+#define fbInitVisuals wfbInitVisuals
+#define fbInstallColormap wfbInstallColormap
+#define fbLaneTable wfbLaneTable
+#define fbListInstalledColormaps wfbListInstalledColormaps
+#define fbMapWindow wfbMapWindow
+#define FbMergeRopBits wFbMergeRopBits
+#define fbOddStipple wfbOddStipple
+#define fbOddTile wfbOddTile
+#define fbOver wfbOver
+#define fbOver24 wfbOver24
+#define fbOverlayCloseScreen wfbOverlayCloseScreen
+#define fbOverlayCopyWindow wfbOverlayCopyWindow
+#define fbOverlayCreateScreenResources wfbOverlayCreateScreenResources
+#define fbOverlayCreateWindow wfbOverlayCreateWindow
+#define fbOverlayFinishScreenInit wfbOverlayFinishScreenInit
+#define fbOverlayGeneration wfbOverlayGeneration
+#define fbOverlayGetScreenPrivateKey wfbOverlayGetScreenPrivateKey
+#define fbOverlayPaintKey wfbOverlayPaintKey
+#define fbOverlaySetupScreen wfbOverlaySetupScreen
+#define fbOverlayUpdateLayerRegion wfbOverlayUpdateLayerRegion
+#define fbOverlayWindowExposures wfbOverlayWindowExposures
+#define fbOverlayWindowLayer wfbOverlayWindowLayer
+#define fbPadPixmap wfbPadPixmap
+#define fbPictureInit wfbPictureInit
+#define fbPixmapToRegion wfbPixmapToRegion
+#define fbPolyArc wfbPolyArc
+#define fbPolyFillRect wfbPolyFillRect
+#define fbPolyGlyphBlt wfbPolyGlyphBlt
+#define fbPolyLine wfbPolyLine
+#define fbPolyline16 wfbPolyline16
+#define fbPolyline24 wfbPolyline24
+#define fbPolyline32 wfbPolyline32
+#define fbPolyline8 wfbPolyline8
+#define fbPolyPoint wfbPolyPoint
+#define fbPolySegment wfbPolySegment
+#define fbPolySegment16 wfbPolySegment16
+#define fbPolySegment24 wfbPolySegment24
+#define fbPolySegment32 wfbPolySegment32
+#define fbPolySegment8 wfbPolySegment8
+#define fbPositionWindow wfbPositionWindow
+#define fbPushFill wfbPushFill
+#define fbPushImage wfbPushImage
+#define fbPushPattern wfbPushPattern
+#define fbPushPixels wfbPushPixels
+#define fbPutImage wfbPutImage
+#define fbPutXYImage wfbPutXYImage
+#define fbPutZImage wfbPutZImage
+#define fbQueryBestSize wfbQueryBestSize
+#define fbRasterizeTrapezoid wfbRasterizeTrapezoid
+#define fbRealizeFont wfbRealizeFont
+#define fbReduceRasterOp wfbReduceRasterOp
+#define fbReplicatePixel wfbReplicatePixel
+#define fbResolveColor wfbResolveColor
+#define fbScreenPrivateKeyRec wfbScreenPrivateKeyRec
+#define fbSegment wfbSegment
+#define fbSelectBres wfbSelectBres
+#define fbSetSpans wfbSetSpans
+#define fbSetupScreen wfbSetupScreen
+#define fbSetVisualTypes wfbSetVisualTypes
+#define fbSetVisualTypesAndMasks wfbSetVisualTypesAndMasks
+#define _fbSetWindowPixmap _wfbSetWindowPixmap
+#define fbSolid wfbSolid
+#define fbSolid24 wfbSolid24
+#define fbSolidBoxClipped wfbSolidBoxClipped
+#define fbStipple wfbStipple
+#define fbStipple1Bits wfbStipple1Bits
+#define fbStipple24Bits wfbStipple24Bits
+#define fbStipple2Bits wfbStipple2Bits
+#define fbStipple4Bits wfbStipple4Bits
+#define fbStipple8Bits wfbStipple8Bits
+#define fbStippleTable wfbStippleTable
+#define fbTile wfbTile
+#define fbTransparentSpan wfbTransparentSpan
+#define fbTrapezoids wfbTrapezoids
+#define fbTriangles wfbTriangles
+#define fbUninstallColormap wfbUninstallColormap
+#define fbUnmapWindow wfbUnmapWindow
+#define fbUnrealizeFont wfbUnrealizeFont
+#define fbValidateGC wfbValidateGC
+#define fbWinPrivateKeyRec wfbWinPrivateKeyRec
+#define fbZeroLine wfbZeroLine
+#define fbZeroSegment wfbZeroSegment
+#define free_pixman_pict wfb_free_pixman_pict
+#define image_from_pict wfb_image_from_pict
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/window.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/window.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/window.h (working copy)
@@ -0,0 +1,228 @@
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include "misc.h"
+#include "region.h"
+#include "screenint.h"
+#include <X11/Xproto.h>
+
+#define TOTALLY_OBSCURED 0
+#define UNOBSCURED 1
+#define OBSCURED 2
+
+#define VisibilityNotViewable 3
+
+/* return values for tree-walking callback procedures */
+#define WT_STOPWALKING 0
+#define WT_WALKCHILDREN 1
+#define WT_DONTWALKCHILDREN 2
+#define WT_NOMATCH 3
+#define NullWindow ((WindowPtr) 0)
+
+/* Forward declaration, we can't include input.h here */
+struct _DeviceIntRec;
+struct _Cursor;
+
+typedef struct _BackingStore *BackingStorePtr;
+typedef struct _Window *WindowPtr;
+
+typedef int (*VisitWindowProcPtr) (WindowPtr /*pWin */ ,
+ void */*data */ );
+
+extern _X_EXPORT int TraverseTree(WindowPtr /*pWin */ ,
+ VisitWindowProcPtr /*func */ ,
+ void */*data */ );
+
+extern _X_EXPORT int WalkTree(ScreenPtr /*pScreen */ ,
+ VisitWindowProcPtr /*func */ ,
+ void */*data */ );
+
+extern _X_EXPORT Bool CreateRootWindow(ScreenPtr /*pScreen */ );
+
+extern _X_EXPORT void InitRootWindow(WindowPtr /*pWin */ );
+
+typedef WindowPtr (*RealChildHeadProc) (WindowPtr pWin);
+
+extern _X_EXPORT void RegisterRealChildHeadProc(RealChildHeadProc proc);
+
+extern _X_EXPORT WindowPtr RealChildHead(WindowPtr /*pWin */ );
+
+extern _X_EXPORT WindowPtr CreateWindow(Window /*wid */ ,
+ WindowPtr /*pParent */ ,
+ int /*x */ ,
+ int /*y */ ,
+ unsigned int /*w */ ,
+ unsigned int /*h */ ,
+ unsigned int /*bw */ ,
+ unsigned int /*class */ ,
+ Mask /*vmask */ ,
+ XID * /*vlist */ ,
+ int /*depth */ ,
+ ClientPtr /*client */ ,
+ VisualID /*visual */ ,
+ int * /*error */ );
+
+extern _X_EXPORT int DeleteWindow(void */*pWin */ ,
+ XID /*wid */ );
+
+extern _X_EXPORT int DestroySubwindows(WindowPtr /*pWin */ ,
+ ClientPtr /*client */ );
+
+/* Quartz support on Mac OS X uses the HIToolbox
+ framework whose ChangeWindowAttributes function conflicts here. */
+#ifdef __APPLE__
+#define ChangeWindowAttributes Darwin_X_ChangeWindowAttributes
+#endif
+extern _X_EXPORT int ChangeWindowAttributes(WindowPtr /*pWin */ ,
+ Mask /*vmask */ ,
+ XID * /*vlist */ ,
+ ClientPtr /*client */ );
+
+extern _X_EXPORT int ChangeWindowDeviceCursor(WindowPtr /*pWin */ ,
+ struct _DeviceIntRec * /*pDev */ ,
+ struct _Cursor * /*pCursor */ );
+
+extern _X_EXPORT struct _Cursor *WindowGetDeviceCursor(WindowPtr /*pWin */ ,
+ struct _DeviceIntRec *
+ /*pDev */ );
+
+/* Quartz support on Mac OS X uses the HIToolbox
+ framework whose GetWindowAttributes function conflicts here. */
+#ifdef __APPLE__
+#define GetWindowAttributes(w,c,x) Darwin_X_GetWindowAttributes(w,c,x)
+extern void Darwin_X_GetWindowAttributes(
+#else
+extern _X_EXPORT void GetWindowAttributes(
+#endif
+ WindowPtr /*pWin */ ,
+ ClientPtr /*client */ ,
+ xGetWindowAttributesReply *
+ /* wa */ );
+
+extern _X_EXPORT void GravityTranslate(int /*x */ ,
+ int /*y */ ,
+ int /*oldx */ ,
+ int /*oldy */ ,
+ int /*dw */ ,
+ int /*dh */ ,
+ unsigned /*gravity */ ,
+ int * /*destx */ ,
+ int * /*desty */ );
+
+extern _X_EXPORT int ConfigureWindow(WindowPtr /*pWin */ ,
+ Mask /*mask */ ,
+ XID * /*vlist */ ,
+ ClientPtr /*client */ );
+
+extern _X_EXPORT int CirculateWindow(WindowPtr /*pParent */ ,
+ int /*direction */ ,
+ ClientPtr /*client */ );
+
+extern _X_EXPORT int ReparentWindow(WindowPtr /*pWin */ ,
+ WindowPtr /*pParent */ ,
+ int /*x */ ,
+ int /*y */ ,
+ ClientPtr /*client */ );
+
+extern _X_EXPORT int MapWindow(WindowPtr /*pWin */ ,
+ ClientPtr /*client */ );
+
+extern _X_EXPORT void MapSubwindows(WindowPtr /*pParent */ ,
+ ClientPtr /*client */ );
+
+extern _X_EXPORT int UnmapWindow(WindowPtr /*pWin */ ,
+ Bool /*fromConfigure */ );
+
+extern _X_EXPORT void UnmapSubwindows(WindowPtr /*pWin */ );
+
+extern _X_EXPORT void HandleSaveSet(ClientPtr /*client */ );
+
+extern _X_EXPORT Bool PointInWindowIsVisible(WindowPtr /*pWin */ ,
+ int /*x */ ,
+ int /*y */ );
+
+extern _X_EXPORT RegionPtr NotClippedByChildren(WindowPtr /*pWin */ );
+
+extern _X_EXPORT void SendVisibilityNotify(WindowPtr /*pWin */ );
+
+extern _X_EXPORT int dixSaveScreens(ClientPtr client, int on, int mode);
+
+extern _X_EXPORT int SaveScreens(int on, int mode);
+
+extern _X_EXPORT WindowPtr FindWindowWithOptional(WindowPtr /*w */ );
+
+extern _X_EXPORT void CheckWindowOptionalNeed(WindowPtr /*w */ );
+
+extern _X_EXPORT Bool MakeWindowOptional(WindowPtr /*pWin */ );
+
+extern _X_EXPORT WindowPtr MoveWindowInStack(WindowPtr /*pWin */ ,
+ WindowPtr /*pNextSib */ );
+
+extern _X_EXPORT void SetWinSize(WindowPtr /*pWin */ );
+
+extern _X_EXPORT void SetBorderSize(WindowPtr /*pWin */ );
+
+extern _X_EXPORT void ResizeChildrenWinSize(WindowPtr /*pWin */ ,
+ int /*dx */ ,
+ int /*dy */ ,
+ int /*dw */ ,
+ int /*dh */ );
+
+extern _X_EXPORT void SendShapeNotify(WindowPtr /* pWin */ ,
+ int /* which */);
+
+extern _X_EXPORT RegionPtr CreateBoundingShape(WindowPtr /* pWin */ );
+
+extern _X_EXPORT RegionPtr CreateClipShape(WindowPtr /* pWin */ );
+
+extern _X_EXPORT void SetRootClip(ScreenPtr pScreen, Bool enable);
+extern _X_EXPORT void PrintWindowTree(void);
+
+extern _X_EXPORT VisualPtr WindowGetVisual(WindowPtr /*pWin*/);
+#endif /* WINDOW_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/windowstr.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/windowstr.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/windowstr.h (working copy)
@@ -0,0 +1,221 @@
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef WINDOWSTRUCT_H
+#define WINDOWSTRUCT_H
+
+#include "window.h"
+#include "pixmapstr.h"
+#include "regionstr.h"
+#include "cursor.h"
+#include "property.h"
+#include "resource.h" /* for ROOT_WINDOW_ID_BASE */
+#include "dix.h"
+#include "privates.h"
+#include "miscstruct.h"
+#include <X11/Xprotostr.h>
+#include "opaque.h"
+
+#define GuaranteeNothing 0
+#define GuaranteeVisBack 1
+
+#define SameBackground(as, a, bs, b) \
+ ((as) == (bs) && ((as) == None || \
+ (as) == ParentRelative || \
+ SamePixUnion(a,b,as == BackgroundPixel)))
+
+#define SameBorder(as, a, bs, b) \
+ EqualPixUnion(as, a, bs, b)
+
+/* used as NULL-terminated list */
+typedef struct _DevCursorNode {
+ CursorPtr cursor;
+ DeviceIntPtr dev;
+ struct _DevCursorNode *next;
+} DevCursNodeRec, *DevCursNodePtr, *DevCursorList;
+
+typedef struct _WindowOpt {
+ CursorPtr cursor; /* default: window.cursorNone */
+ VisualID visual; /* default: same as parent */
+ Colormap colormap; /* default: same as parent */
+ Mask dontPropagateMask; /* default: window.dontPropagate */
+ Mask otherEventMasks; /* default: 0 */
+ struct _OtherClients *otherClients; /* default: NULL */
+ struct _GrabRec *passiveGrabs; /* default: NULL */
+ PropertyPtr userProps; /* default: NULL */
+ CARD32 backingBitPlanes; /* default: ~0L */
+ CARD32 backingPixel; /* default: 0 */
+ RegionPtr boundingShape; /* default: NULL */
+ RegionPtr clipShape; /* default: NULL */
+ RegionPtr inputShape; /* default: NULL */
+ struct _OtherInputMasks *inputMasks; /* default: NULL */
+ DevCursorList deviceCursors; /* default: NULL */
+} WindowOptRec, *WindowOptPtr;
+
+#define BackgroundPixel 2L
+#define BackgroundPixmap 3L
+
+/*
+ * The redirectDraw field can have one of three values:
+ *
+ * RedirectDrawNone
+ * A normal window; painted into the same pixmap as the parent
+ * and clipping parent and siblings to its geometry. These
+ * windows get a clip list equal to the intersection of their
+ * geometry with the parent geometry, minus the geometry
+ * of overlapping None and Clipped siblings.
+ * RedirectDrawAutomatic
+ * A redirected window which clips parent and sibling drawing.
+ * Contents for these windows are manage inside the server.
+ * These windows get an internal clip list equal to their
+ * geometry.
+ * RedirectDrawManual
+ * A redirected window which does not clip parent and sibling
+ * drawing; the window must be represented within the parent
+ * geometry by the client performing the redirection management.
+ * Contents for these windows are managed outside the server.
+ * These windows get an internal clip list equal to their
+ * geometry.
+ */
+
+#define RedirectDrawNone 0
+#define RedirectDrawAutomatic 1
+#define RedirectDrawManual 2
+
+typedef struct _Window {
+ DrawableRec drawable;
+ PrivateRec *devPrivates;
+ WindowPtr parent; /* ancestor chain */
+ WindowPtr nextSib; /* next lower sibling */
+ WindowPtr prevSib; /* next higher sibling */
+ WindowPtr firstChild; /* top-most child */
+ WindowPtr lastChild; /* bottom-most child */
+ RegionRec clipList; /* clipping rectangle for output */
+ RegionRec borderClip; /* NotClippedByChildren + border */
+ union _Validate *valdata;
+ RegionRec winSize;
+ RegionRec borderSize;
+ DDXPointRec origin; /* position relative to parent */
+ unsigned short borderWidth;
+ unsigned short deliverableEvents; /* all masks from all clients */
+ Mask eventMask; /* mask from the creating client */
+ PixUnion background;
+ PixUnion border;
+ void *backStorage; /* null when BS disabled */
+ WindowOptPtr optional;
+ unsigned backgroundState:2; /* None, Relative, Pixel, Pixmap */
+ unsigned borderIsPixel:1;
+ unsigned cursorIsNone:1; /* else real cursor (might inherit) */
+ unsigned backingStore:2;
+ unsigned saveUnder:1;
+ unsigned DIXsaveUnder:1;
+ unsigned bitGravity:4;
+ unsigned winGravity:4;
+ unsigned overrideRedirect:1;
+ unsigned visibility:2;
+ unsigned mapped:1;
+ unsigned realized:1; /* ancestors are all mapped */
+ unsigned viewable:1; /* realized && InputOutput */
+ unsigned dontPropagate:3; /* index into DontPropagateMasks */
+ unsigned forcedBS:1; /* system-supplied backingStore */
+ unsigned redirectDraw:2; /* COMPOSITE rendering redirect */
+ unsigned forcedBG:1; /* must have an opaque background */
+#ifdef ROOTLESS
+ unsigned rootlessUnhittable:1; /* doesn't hit-test */
+#endif
+#ifdef COMPOSITE
+ unsigned damagedDescendants:1; /* some descendants are damaged */
+ unsigned inhibitBGPaint:1; /* paint the background? */
+#endif
+} WindowRec;
+
+/*
+ * Ok, a bunch of macros for accessing the optional record
+ * fields (or filling the appropriate default value)
+ */
+
+extern _X_EXPORT Mask DontPropagateMasks[];
+
+#define wTrackParent(w,field) ((w)->optional ? \
+ (w)->optional->field \
+ : FindWindowWithOptional(w)->optional->field)
+#define wUseDefault(w,field,def) ((w)->optional ? \
+ (w)->optional->field \
+ : def)
+
+#define wVisual(w) wTrackParent(w, visual)
+#define wCursor(w) ((w)->cursorIsNone ? None : wTrackParent(w, cursor))
+#define wColormap(w) ((w)->drawable.class == InputOnly ? None : wTrackParent(w, colormap))
+#define wDontPropagateMask(w) wUseDefault(w, dontPropagateMask, DontPropagateMasks[(w)->dontPropagate])
+#define wOtherEventMasks(w) wUseDefault(w, otherEventMasks, 0)
+#define wOtherClients(w) wUseDefault(w, otherClients, NULL)
+#define wOtherInputMasks(w) wUseDefault(w, inputMasks, NULL)
+#define wPassiveGrabs(w) wUseDefault(w, passiveGrabs, NULL)
+#define wUserProps(w) wUseDefault(w, userProps, NULL)
+#define wBackingBitPlanes(w) wUseDefault(w, backingBitPlanes, ~0L)
+#define wBackingPixel(w) wUseDefault(w, backingPixel, 0)
+#define wBoundingShape(w) wUseDefault(w, boundingShape, NULL)
+#define wClipShape(w) wUseDefault(w, clipShape, NULL)
+#define wInputShape(w) wUseDefault(w, inputShape, NULL)
+#define wClient(w) (clients[CLIENT_ID((w)->drawable.id)])
+#define wBorderWidth(w) ((int) (w)->borderWidth)
+
+/* true when w needs a border drawn. */
+
+#define HasBorder(w) ((w)->borderWidth || wClipShape(w))
+
+typedef struct _ScreenSaverStuff *ScreenSaverStuffPtr;
+
+#define SCREEN_IS_BLANKED 0
+#define SCREEN_ISNT_SAVED 1
+#define SCREEN_IS_TILED 2
+#define SCREEN_IS_BLACK 3
+
+#define HasSaverWindow(pScreen) (pScreen->screensaver.pWindow != NullWindow)
+
+extern _X_EXPORT int screenIsSaved;
+
+#endif /* WINDOWSTRUCT_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xaarop.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xaarop.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xaarop.h (working copy)
@@ -0,0 +1,268 @@
+#ifndef _XAAROP_H
+#define _XAAROP_H
+
+#define ROP_DST 0x00000001
+#define ROP_SRC 0x00000002
+#define ROP_PAT 0x00000004
+
+#define ROP_0 0x00
+#define ROP_DPSoon 0x01
+#define ROP_DPSona 0x02
+#define ROP_PSon 0x03
+#define ROP_SDPona 0x04
+#define ROP_DPon 0x05
+#define ROP_PDSxnon 0x06
+#define ROP_PDSaon 0x07
+#define ROP_SDPnaa 0x08
+#define ROP_PDSxon 0x09
+#define ROP_DPna 0x0A
+#define ROP_PSDnaon 0x0B
+#define ROP_SPna 0x0C
+#define ROP_PDSnaon 0x0D
+#define ROP_PDSonon 0x0E
+#define ROP_Pn 0x0F
+#define ROP_PDSona 0x10
+#define ROP_DSon 0x11
+#define ROP_SDPxnon 0x12
+#define ROP_SDPaon 0x13
+#define ROP_DPSxnon 0x14
+#define ROP_DPSaon 0x15
+#define ROP_PSDPSanaxx 0x16
+#define ROP_SSPxDSxaxn 0x17
+#define ROP_SPxPDxa 0x18
+#define ROP_SDPSanaxn 0x19
+#define ROP_PDSPaox 0x1A
+#define ROP_SDPSxaxn 0x1B
+#define ROP_PSDPaox 0x1C
+#define ROP_DSPDxaxn 0x1D
+#define ROP_PDSox 0x1E
+#define ROP_PDSoan 0x1F
+#define ROP_DPSnaa 0x20
+#define ROP_SDPxon 0x21
+#define ROP_DSna 0x22
+#define ROP_SPDnaon 0x23
+#define ROP_SPxDSxa 0x24
+#define ROP_PDSPanaxn 0x25
+#define ROP_SDPSaox 0x26
+#define ROP_SDPSxnox 0x27
+#define ROP_DPSxa 0x28
+#define ROP_PSDPSaoxxn 0x29
+#define ROP_DPSana 0x2A
+#define ROP_SSPxPDxaxn 0x2B
+#define ROP_SPDSoax 0x2C
+#define ROP_PSDnox 0x2D
+#define ROP_PSDPxox 0x2E
+#define ROP_PSDnoan 0x2F
+#define ROP_PSna 0x30
+#define ROP_SDPnaon 0x31
+#define ROP_SDPSoox 0x32
+#define ROP_Sn 0x33
+#define ROP_SPDSaox 0x34
+#define ROP_SPDSxnox 0x35
+#define ROP_SDPox 0x36
+#define ROP_SDPoan 0x37
+#define ROP_PSDPoax 0x38
+#define ROP_SPDnox 0x39
+#define ROP_SPDSxox 0x3A
+#define ROP_SPDnoan 0x3B
+#define ROP_PSx 0x3C
+#define ROP_SPDSonox 0x3D
+#define ROP_SPDSnaox 0x3E
+#define ROP_PSan 0x3F
+#define ROP_PSDnaa 0x40
+#define ROP_DPSxon 0x41
+#define ROP_SDxPDxa 0x42
+#define ROP_SPDSanaxn 0x43
+#define ROP_SDna 0x44
+#define ROP_DPSnaon 0x45
+#define ROP_DSPDaox 0x46
+#define ROP_PSDPxaxn 0x47
+#define ROP_SDPxa 0x48
+#define ROP_PDSPDaoxxn 0x49
+#define ROP_DPSDoax 0x4A
+#define ROP_PDSnox 0x4B
+#define ROP_SDPana 0x4C
+#define ROP_SSPxDSxoxn 0x4D
+#define ROP_PDSPxox 0x4E
+#define ROP_PDSnoan 0x4F
+#define ROP_PDna 0x50
+#define ROP_DSPnaon 0x51
+#define ROP_DPSDaox 0x52
+#define ROP_SPDSxaxn 0x53
+#define ROP_DPSonon 0x54
+#define ROP_Dn 0x55
+#define ROP_DPSox 0x56
+#define ROP_DPSoan 0x57
+#define ROP_PDSPoax 0x58
+#define ROP_DPSnox 0x59
+#define ROP_DPx 0x5A
+#define ROP_DPSDonox 0x5B
+#define ROP_DPSDxox 0x5C
+#define ROP_DPSnoan 0x5D
+#define ROP_DPSDnaox 0x5E
+#define ROP_DPan 0x5F
+#define ROP_PDSxa 0x60
+#define ROP_DSPDSaoxxn 0x61
+#define ROP_DSPDoax 0x62
+#define ROP_SDPnox 0x63
+#define ROP_SDPSoax 0x64
+#define ROP_DSPnox 0x65
+#define ROP_DSx 0x66
+#define ROP_SDPSonox 0x67
+#define ROP_DSPDSonoxxn 0x68
+#define ROP_PDSxxn 0x69
+#define ROP_DPSax 0x6A
+#define ROP_PSDPSoaxxn 0x6B
+#define ROP_SDPax 0x6C
+#define ROP_PDSPDoaxxn 0x6D
+#define ROP_SDPSnoax 0x6E
+#define ROP_PDSxnan 0x6F
+#define ROP_PDSana 0x70
+#define ROP_SSDxPDxaxn 0x71
+#define ROP_SDPSxox 0x72
+#define ROP_SDPnoan 0x73
+#define ROP_DSPDxox 0x74
+#define ROP_DSPnoan 0x75
+#define ROP_SDPSnaox 0x76
+#define ROP_DSan 0x77
+#define ROP_PDSax 0x78
+#define ROP_DSPDSoaxxn 0x79
+#define ROP_DPSDnoax 0x7A
+#define ROP_SDPxnan 0x7B
+#define ROP_SPDSnoax 0x7C
+#define ROP_DPSxnan 0x7D
+#define ROP_SPxDSxo 0x7E
+#define ROP_DPSaan 0x7F
+#define ROP_DPSaa 0x80
+#define ROP_SPxDSxon 0x81
+#define ROP_DPSxna 0x82
+#define ROP_SPDSnoaxn 0x83
+#define ROP_SDPxna 0x84
+#define ROP_PDSPnoaxn 0x85
+#define ROP_DSPDSoaxx 0x86
+#define ROP_PDSaxn 0x87
+#define ROP_DSa 0x88
+#define ROP_SDPSnaoxn 0x89
+#define ROP_DSPnoa 0x8A
+#define ROP_DSPDxoxn 0x8B
+#define ROP_SDPnoa 0x8C
+#define ROP_SDPSxoxn 0x8D
+#define ROP_SSDxPDxax 0x8E
+#define ROP_PDSanan 0x8F
+#define ROP_PDSxna 0x90
+#define ROP_SDPSnoaxn 0x91
+#define ROP_DPSDPoaxx 0x92
+#define ROP_SPDaxn 0x93
+#define ROP_PSDPSoaxx 0x94
+#define ROP_DPSaxn 0x95
+#define ROP_DPSxx 0x96
+#define ROP_PSDPSonoxx 0x97
+#define ROP_SDPSonoxn 0x98
+#define ROP_DSxn 0x99
+#define ROP_DPSnax 0x9A
+#define ROP_SDPSoaxn 0x9B
+#define ROP_SPDnax 0x9C
+#define ROP_DSPDoaxn 0x9D
+#define ROP_DSPDSaoxx 0x9E
+#define ROP_PDSxan 0x9F
+#define ROP_DPa 0xA0
+#define ROP_PDSPnaoxn 0xA1
+#define ROP_DPSnoa 0xA2
+#define ROP_DPSDxoxn 0xA3
+#define ROP_PDSPonoxn 0xA4
+#define ROP_PDxn 0xA5
+#define ROP_DSPnax 0xA6
+#define ROP_PDSPoaxn 0xA7
+#define ROP_DPSoa 0xA8
+#define ROP_DPSoxn 0xA9
+#define ROP_D 0xAA
+#define ROP_DPSono 0xAB
+#define ROP_SPDSxax 0xAC
+#define ROP_DPSDaoxn 0xAD
+#define ROP_DSPnao 0xAE
+#define ROP_DPno 0xAF
+#define ROP_PDSnoa 0xB0
+#define ROP_PDSPxoxn 0xB1
+#define ROP_SSPxDSxox 0xB2
+#define ROP_SDPanan 0xB3
+#define ROP_PSDnax 0xB4
+#define ROP_DPSDoaxn 0xB5
+#define ROP_DPSDPaoxx 0xB6
+#define ROP_SDPxan 0xB7
+#define ROP_PSDPxax 0xB8
+#define ROP_DSPDaoxn 0xB9
+#define ROP_DPSnao 0xBA
+#define ROP_DSno 0xBB
+#define ROP_SPDSanax 0xBC
+#define ROP_SDxPDxan 0xBD
+#define ROP_DPSxo 0xBE
+#define ROP_DPSano 0xBF
+#define ROP_Psa 0xC0
+#define ROP_SPDSnaoxn 0xC1
+#define ROP_SPDSonoxn 0xC2
+#define ROP_PSxn 0xC3
+#define ROP_SPDnoa 0xC4
+#define ROP_SPDSxoxn 0xC5
+#define ROP_SDPnax 0xC6
+#define ROP_PSDPoaxn 0xC7
+#define ROP_SDPoa 0xC8
+#define ROP_SPDoxn 0xC9
+#define ROP_DPSDxax 0xCA
+#define ROP_SPDSaoxn 0xCB
+#define ROP_S 0xCC
+#define ROP_SDPono 0xCD
+#define ROP_SDPnao 0xCE
+#define ROP_SPno 0xCF
+#define ROP_PSDnoa 0xD0
+#define ROP_PSDPxoxn 0xD1
+#define ROP_PDSnax 0xD2
+#define ROP_SPDSoaxn 0xD3
+#define ROP_SSPxPDxax 0xD4
+#define ROP_DPSanan 0xD5
+#define ROP_PSDPSaoxx 0xD6
+#define ROP_DPSxan 0xD7
+#define ROP_PDSPxax 0xD8
+#define ROP_SDPSaoxn 0xD9
+#define ROP_DPSDanax 0xDA
+#define ROP_SPxDSxan 0xDB
+#define ROP_SPDnao 0xDC
+#define ROP_SDno 0xDD
+#define ROP_SDPxo 0xDE
+#define ROP_SDPano 0xDF
+#define ROP_PDSoa 0xE0
+#define ROP_PDSoxn 0xE1
+#define ROP_DSPDxax 0xE2
+#define ROP_PSDPaoxn 0xE3
+#define ROP_SDPSxax 0xE4
+#define ROP_PDSPaoxn 0xE5
+#define ROP_SDPSanax 0xE6
+#define ROP_SPxPDxan 0xE7
+#define ROP_SSPxDSxax 0xE8
+#define ROP_DSPDSanaxxn 0xE9
+#define ROP_DPSao 0xEA
+#define ROP_DPSxno 0xEB
+#define ROP_SDPao 0xEC
+#define ROP_SDPxno 0xED
+#define ROP_DSo 0xEE
+#define ROP_SDPnoo 0xEF
+#define ROP_P 0xF0
+#define ROP_PDSono 0xF1
+#define ROP_PDSnao 0xF2
+#define ROP_PSno 0xF3
+#define ROP_PSDnao 0xF4
+#define ROP_PDno 0xF5
+#define ROP_PDSxo 0xF6
+#define ROP_PDSano 0xF7
+#define ROP_PDSao 0xF8
+#define ROP_PDSxno 0xF9
+#define ROP_DPo 0xFA
+#define ROP_DPSnoo 0xFB
+#define ROP_PSo 0xFC
+#define ROP_PSDnoo 0xFD
+#define ROP_DPSoo 0xFE
+#define ROP_1 0xFF
+
+#define NO_SRC_ROP(rop) \
+ ((rop == GXnoop) || (rop == GXset) || (rop == GXclear) || (rop == GXinvert))
+
+#endif /* _XAAROP_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xace.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xace.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xace.h (working copy)
@@ -0,0 +1,128 @@
+/************************************************************
+
+Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+this permission notice appear in supporting documentation. This permission
+notice shall be included in all copies or substantial portions of the
+Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+********************************************************/
+
+#ifndef _XACE_H
+#define _XACE_H
+
+#ifdef XACE
+
+#define XACE_MAJOR_VERSION 2
+#define XACE_MINOR_VERSION 0
+
+#include "pixmap.h"
+#include "region.h"
+#include "window.h"
+#include "property.h"
+#include "selection.h"
+
+/* Default window background */
+#define XaceBackgroundNoneState(w) ((w)->forcedBG ? BackgroundPixel : None)
+
+/* security hooks */
+/* Constants used to identify the available security hooks
+ */
+#define XACE_CORE_DISPATCH 0
+#define XACE_EXT_DISPATCH 1
+#define XACE_RESOURCE_ACCESS 2
+#define XACE_DEVICE_ACCESS 3
+#define XACE_PROPERTY_ACCESS 4
+#define XACE_SEND_ACCESS 5
+#define XACE_RECEIVE_ACCESS 6
+#define XACE_CLIENT_ACCESS 7
+#define XACE_EXT_ACCESS 8
+#define XACE_SERVER_ACCESS 9
+#define XACE_SELECTION_ACCESS 10
+#define XACE_SCREEN_ACCESS 11
+#define XACE_SCREENSAVER_ACCESS 12
+#define XACE_AUTH_AVAIL 13
+#define XACE_KEY_AVAIL 14
+#define XACE_AUDIT_BEGIN 15
+#define XACE_AUDIT_END 16
+#define XACE_NUM_HOOKS 17
+
+extern _X_EXPORT CallbackListPtr XaceHooks[XACE_NUM_HOOKS];
+
+/* Entry point for hook functions. Called by Xserver.
+ * Required by libdbe and libextmod
+ */
+extern _X_EXPORT int XaceHook(int /*hook */ ,
+ ... /*appropriate args for hook */
+ );
+
+/* Special-cased hook functions
+ */
+extern _X_EXPORT int XaceHookDispatch(ClientPtr ptr, int major);
+extern _X_EXPORT int XaceHookPropertyAccess(ClientPtr ptr, WindowPtr pWin,
+ PropertyPtr *ppProp,
+ Mask access_mode);
+extern _X_EXPORT int XaceHookSelectionAccess(ClientPtr ptr, Selection ** ppSel,
+ Mask access_mode);
+extern _X_EXPORT void XaceHookAuditEnd(ClientPtr ptr, int result);
+
+/* Register a callback for a given hook.
+ */
+#define XaceRegisterCallback(hook,callback,data) \
+ AddCallback(XaceHooks+(hook), callback, data)
+
+/* Unregister an existing callback for a given hook.
+ */
+#define XaceDeleteCallback(hook,callback,data) \
+ DeleteCallback(XaceHooks+(hook), callback, data)
+
+/* XTrans wrappers for use by security modules
+ */
+extern _X_EXPORT int XaceGetConnectionNumber(ClientPtr ptr);
+extern _X_EXPORT int XaceIsLocal(ClientPtr ptr);
+
+/* From the original Security extension...
+ */
+
+extern _X_EXPORT void XaceCensorImage(ClientPtr client,
+ RegionPtr pVisibleRegion,
+ long widthBytesLine,
+ DrawablePtr pDraw,
+ int x, int y, int w, int h,
+ unsigned int format, char *pBuf);
+
+#else /* XACE */
+
+/* Default window background */
+#define XaceBackgroundNoneState(w) None
+
+/* Define calls away when XACE is not being built. */
+
+#ifdef __GNUC__
+#define XaceHook(args...) Success
+#define XaceHookDispatch(args...) Success
+#define XaceHookPropertyAccess(args...) Success
+#define XaceHookSelectionAccess(args...) Success
+#define XaceHookAuditEnd(args...) { ; }
+#define XaceCensorImage(args...) { ; }
+#else
+#define XaceHook(...) Success
+#define XaceHookDispatch(...) Success
+#define XaceHookPropertyAccess(...) Success
+#define XaceHookSelectionAccess(...) Success
+#define XaceHookAuditEnd(...) { ; }
+#define XaceCensorImage(...) { ; }
+#endif
+
+#endif /* XACE */
+
+#endif /* _XACE_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xacestr.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xacestr.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xacestr.h (working copy)
@@ -0,0 +1,147 @@
+/************************************************************
+
+Author: Eamon Walsh <ewalsh@tycho.nsa.gov>
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+this permission notice appear in supporting documentation. This permission
+notice shall be included in all copies or substantial portions of the
+Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+********************************************************/
+
+#ifndef _XACESTR_H
+#define _XACESTR_H
+
+#include "dix.h"
+#include "resource.h"
+#include "extnsionst.h"
+#include "window.h"
+#include "input.h"
+#include "property.h"
+#include "selection.h"
+#include "xace.h"
+
+/* XACE_CORE_DISPATCH */
+typedef struct {
+ ClientPtr client;
+ int status;
+} XaceCoreDispatchRec;
+
+/* XACE_RESOURCE_ACCESS */
+typedef struct {
+ ClientPtr client;
+ XID id;
+ RESTYPE rtype;
+ void *res;
+ RESTYPE ptype;
+ void *parent;
+ Mask access_mode;
+ int status;
+} XaceResourceAccessRec;
+
+/* XACE_DEVICE_ACCESS */
+typedef struct {
+ ClientPtr client;
+ DeviceIntPtr dev;
+ Mask access_mode;
+ int status;
+} XaceDeviceAccessRec;
+
+/* XACE_PROPERTY_ACCESS */
+typedef struct {
+ ClientPtr client;
+ WindowPtr pWin;
+ PropertyPtr *ppProp;
+ Mask access_mode;
+ int status;
+} XacePropertyAccessRec;
+
+/* XACE_SEND_ACCESS */
+typedef struct {
+ ClientPtr client;
+ DeviceIntPtr dev;
+ WindowPtr pWin;
+ xEventPtr events;
+ int count;
+ int status;
+} XaceSendAccessRec;
+
+/* XACE_RECEIVE_ACCESS */
+typedef struct {
+ ClientPtr client;
+ WindowPtr pWin;
+ xEventPtr events;
+ int count;
+ int status;
+} XaceReceiveAccessRec;
+
+/* XACE_CLIENT_ACCESS */
+typedef struct {
+ ClientPtr client;
+ ClientPtr target;
+ Mask access_mode;
+ int status;
+} XaceClientAccessRec;
+
+/* XACE_EXT_DISPATCH */
+/* XACE_EXT_ACCESS */
+typedef struct {
+ ClientPtr client;
+ ExtensionEntry *ext;
+ Mask access_mode;
+ int status;
+} XaceExtAccessRec;
+
+/* XACE_SERVER_ACCESS */
+typedef struct {
+ ClientPtr client;
+ Mask access_mode;
+ int status;
+} XaceServerAccessRec;
+
+/* XACE_SELECTION_ACCESS */
+typedef struct {
+ ClientPtr client;
+ Selection **ppSel;
+ Mask access_mode;
+ int status;
+} XaceSelectionAccessRec;
+
+/* XACE_SCREEN_ACCESS */
+/* XACE_SCREENSAVER_ACCESS */
+typedef struct {
+ ClientPtr client;
+ ScreenPtr screen;
+ Mask access_mode;
+ int status;
+} XaceScreenAccessRec;
+
+/* XACE_AUTH_AVAIL */
+typedef struct {
+ ClientPtr client;
+ XID authId;
+} XaceAuthAvailRec;
+
+/* XACE_KEY_AVAIL */
+typedef struct {
+ xEventPtr event;
+ DeviceIntPtr keybd;
+ int count;
+} XaceKeyAvailRec;
+
+/* XACE_AUDIT_BEGIN */
+/* XACE_AUDIT_END */
+typedef struct {
+ ClientPtr client;
+ int requestResult;
+} XaceAuditRec;
+
+#endif /* _XACESTR_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86.h (working copy)
@@ -0,0 +1,453 @@
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+/*
+ * This file contains declarations for public XFree86 functions and variables,
+ * and definitions of public macros.
+ *
+ * "public" means available to video drivers.
+ */
+
+#ifndef _XF86_H
+#define _XF86_H
+
+#if HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#elif HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include "xf86str.h"
+#include "xf86Opt.h"
+#include <X11/Xfuncproto.h>
+#include <stdarg.h>
+#ifdef RANDR
+#include <X11/extensions/randr.h>
+#endif
+
+#include "propertyst.h"
+
+/* General parameters */
+extern _X_EXPORT int xf86DoConfigure;
+extern _X_EXPORT int xf86DoShowOptions;
+extern _X_EXPORT Bool xf86DoConfigurePass1;
+extern _X_EXPORT Bool xorgHWAccess;
+
+extern _X_EXPORT DevPrivateKeyRec xf86ScreenKeyRec;
+
+#define xf86ScreenKey (&xf86ScreenKeyRec)
+
+extern _X_EXPORT DevPrivateKeyRec xf86CreateRootWindowKeyRec;
+
+#define xf86CreateRootWindowKey (&xf86CreateRootWindowKeyRec)
+
+extern _X_EXPORT ScrnInfoPtr *xf86Screens; /* List of pointers to ScrnInfoRecs */
+extern _X_EXPORT const unsigned char byte_reversed[256];
+extern _X_EXPORT Bool fbSlotClaimed;
+
+#if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__)
+extern _X_EXPORT Bool sbusSlotClaimed;
+#endif
+
+#if defined(XSERVER_PLATFORM_BUS)
+extern _X_EXPORT int platformSlotClaimed;
+#endif
+
+extern _X_EXPORT confDRIRec xf86ConfigDRI;
+extern _X_EXPORT Bool xf86DRI2Enabled(void);
+
+extern _X_EXPORT Bool VTSwitchEnabled; /* kbd driver */
+
+#define XF86SCRNINFO(p) xf86ScreenToScrn(p)
+
+#define XF86FLIP_PIXELS() \
+ do { \
+ if (xf86GetFlipPixels()) { \
+ pScreen->whitePixel = (pScreen->whitePixel) ? 0 : 1; \
+ pScreen->blackPixel = (pScreen->blackPixel) ? 0 : 1; \
+ } \
+ while (0)
+
+#define BOOLTOSTRING(b) ((b) ? "TRUE" : "FALSE")
+
+#define PIX24TOBPP(p) (((p) == Pix24Use24) ? 24 : \
+ (((p) == Pix24Use32) ? 32 : 0))
+
+/* Function Prototypes */
+#ifndef _NO_XF86_PROTOTYPES
+
+/* PCI related */
+#ifdef XSERVER_LIBPCIACCESS
+#include <pciaccess.h>
+extern _X_EXPORT int pciSlotClaimed;
+
+extern _X_EXPORT Bool xf86CheckPciSlot(const struct pci_device *);
+extern _X_EXPORT int xf86ClaimPciSlot(struct pci_device *, DriverPtr drvp,
+ int chipset, GDevPtr dev, Bool active);
+extern _X_EXPORT void xf86UnclaimPciSlot(struct pci_device *, GDevPtr dev);
+extern _X_EXPORT Bool xf86ParsePciBusString(const char *busID, int *bus,
+ int *device, int *func);
+extern _X_EXPORT Bool xf86ComparePciBusString(const char *busID, int bus,
+ int device, int func);
+extern _X_EXPORT Bool xf86IsPrimaryPci(struct pci_device *pPci);
+extern _X_EXPORT Bool xf86CheckPciMemBase(struct pci_device *pPci,
+ memType base);
+extern _X_EXPORT struct pci_device *xf86GetPciInfoForEntity(int entityIndex);
+extern _X_EXPORT int xf86MatchPciInstances(const char *driverName,
+ int vendorID, SymTabPtr chipsets,
+ PciChipsets * PCIchipsets,
+ GDevPtr * devList, int numDevs,
+ DriverPtr drvp, int **foundEntities);
+extern _X_EXPORT ScrnInfoPtr xf86ConfigPciEntity(ScrnInfoPtr pScrn,
+ int scrnFlag, int entityIndex,
+ PciChipsets * p_chip,
+ void *dummy, EntityProc init,
+ EntityProc enter,
+ EntityProc leave,
+ void *private);
+/* Obsolete! don't use */
+extern _X_EXPORT Bool xf86ConfigActivePciEntity(ScrnInfoPtr pScrn,
+ int entityIndex,
+ PciChipsets * p_chip,
+ void *dummy, EntityProc init,
+ EntityProc enter,
+ EntityProc leave,
+ void *private);
+#else
+#define xf86VGAarbiterInit() do {} while (0)
+#define xf86VGAarbiterFini() do {} while (0)
+#define xf86VGAarbiterLock(x) do {} while (0)
+#define xf86VGAarbiterUnlock(x) do {} while (0)
+#define xf86VGAarbiterScrnInit(x) do {} while (0)
+#define xf86VGAarbiterDeviceDecodes() do {} while (0)
+#define xf86VGAarbiterWrapFunctions() do {} while (0)
+#endif
+
+/* xf86Bus.c */
+
+extern _X_EXPORT int xf86GetFbInfoForScreen(int scrnIndex);
+extern _X_EXPORT int xf86ClaimFbSlot(DriverPtr drvp, int chipset, GDevPtr dev,
+ Bool active);
+extern _X_EXPORT int xf86ClaimNoSlot(DriverPtr drvp, int chipset, GDevPtr dev,
+ Bool active);
+extern _X_EXPORT Bool xf86DriverHasEntities(DriverPtr drvp);
+extern _X_EXPORT void xf86AddEntityToScreen(ScrnInfoPtr pScrn, int entityIndex);
+extern _X_EXPORT void xf86SetEntityInstanceForScreen(ScrnInfoPtr pScrn,
+ int entityIndex,
+ int instance);
+extern _X_EXPORT int xf86GetNumEntityInstances(int entityIndex);
+extern _X_EXPORT GDevPtr xf86GetDevFromEntity(int entityIndex, int instance);
+extern _X_EXPORT void xf86RemoveEntityFromScreen(ScrnInfoPtr pScrn,
+ int entityIndex);
+extern _X_EXPORT EntityInfoPtr xf86GetEntityInfo(int entityIndex);
+extern _X_EXPORT Bool xf86SetEntityFuncs(int entityIndex, EntityProc init,
+ EntityProc enter, EntityProc leave,
+ void *);
+extern _X_EXPORT Bool xf86IsEntityPrimary(int entityIndex);
+extern _X_EXPORT ScrnInfoPtr xf86FindScreenForEntity(int entityIndex);
+
+extern _X_EXPORT int xf86GetLastScrnFlag(int entityIndex);
+extern _X_EXPORT void xf86SetLastScrnFlag(int entityIndex, int scrnIndex);
+extern _X_EXPORT Bool xf86IsEntityShared(int entityIndex);
+extern _X_EXPORT void xf86SetEntityShared(int entityIndex);
+extern _X_EXPORT Bool xf86IsEntitySharable(int entityIndex);
+extern _X_EXPORT void xf86SetEntitySharable(int entityIndex);
+extern _X_EXPORT Bool xf86IsPrimInitDone(int entityIndex);
+extern _X_EXPORT void xf86SetPrimInitDone(int entityIndex);
+extern _X_EXPORT void xf86ClearPrimInitDone(int entityIndex);
+extern _X_EXPORT int xf86AllocateEntityPrivateIndex(void);
+extern _X_EXPORT DevUnion *xf86GetEntityPrivate(int entityIndex, int privIndex);
+
+/* xf86Configure.c */
+extern _X_EXPORT GDevPtr xf86AddBusDeviceToConfigure(const char *driver,
+ BusType bus, void *busData,
+ int chipset);
+
+/* xf86Cursor.c */
+
+extern _X_EXPORT void xf86LockZoom(ScreenPtr pScreen, int lock);
+extern _X_EXPORT void xf86InitViewport(ScrnInfoPtr pScr);
+extern _X_EXPORT void xf86SetViewport(ScreenPtr pScreen, int x, int y);
+extern _X_EXPORT void xf86ZoomViewport(ScreenPtr pScreen, int zoom);
+extern _X_EXPORT Bool xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode);
+extern _X_EXPORT void *xf86GetPointerScreenFuncs(void);
+extern _X_EXPORT void xf86InitOrigins(void);
+extern _X_EXPORT void xf86ReconfigureLayout(void);
+
+/* xf86DPMS.c */
+
+extern _X_EXPORT Bool xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set,
+ int flags);
+
+/* xf86DGA.c */
+
+#ifdef XFreeXDGA
+extern _X_EXPORT Bool DGAInit(ScreenPtr pScreen, DGAFunctionPtr funcs,
+ DGAModePtr modes, int num);
+extern _X_EXPORT Bool DGAReInitModes(ScreenPtr pScreen, DGAModePtr modes,
+ int num);
+extern _X_EXPORT xf86SetDGAModeProc xf86SetDGAMode;
+#endif
+
+/* xf86Events.c */
+
+typedef struct _InputInfoRec *InputInfoPtr;
+
+extern _X_EXPORT void SetTimeSinceLastInputEvent(void);
+extern _X_EXPORT void *xf86AddInputHandler(int fd, InputHandlerProc proc,
+ void *data);
+extern _X_EXPORT int xf86RemoveInputHandler(void *handler);
+extern _X_EXPORT void xf86DisableInputHandler(void *handler);
+extern _X_EXPORT void xf86EnableInputHandler(void *handler);
+extern _X_EXPORT void *xf86AddGeneralHandler(int fd, InputHandlerProc proc,
+ void *data);
+extern _X_EXPORT int xf86RemoveGeneralHandler(void *handler);
+extern _X_EXPORT void xf86DisableGeneralHandler(void *handler);
+extern _X_EXPORT void xf86EnableGeneralHandler(void *handler);
+extern _X_EXPORT InputHandlerProc xf86SetConsoleHandler(InputHandlerProc
+ handler, void *data);
+extern _X_EXPORT void xf86InterceptSignals(int *signo);
+extern _X_EXPORT void xf86InterceptSigIll(void (*sigillhandler) (void));
+extern _X_EXPORT Bool xf86EnableVTSwitch(Bool new);
+extern _X_EXPORT void xf86ProcessActionEvent(ActionEvent action, void *arg);
+extern _X_EXPORT void xf86PrintBacktrace(void);
+extern _X_EXPORT Bool xf86VTOwner(void);
+extern _X_EXPORT void xf86VTLeave(void);
+extern _X_EXPORT void xf86VTEnter(void);
+extern _X_EXPORT void xf86EnableInputDeviceForVTSwitch(InputInfoPtr pInfo);
+extern _X_EXPORT void xf86DisableInputDeviceForVTSwitch(InputInfoPtr pInfo);
+
+/* xf86Helper.c */
+
+extern _X_EXPORT void xf86AddDriver(DriverPtr driver, void *module,
+ int flags);
+extern _X_EXPORT void xf86DeleteDriver(int drvIndex);
+extern _X_EXPORT ScrnInfoPtr xf86AllocateScreen(DriverPtr drv, int flags);
+extern _X_EXPORT void xf86DeleteScreen(ScrnInfoPtr pScrn);
+extern _X_EXPORT int xf86AllocateScrnInfoPrivateIndex(void);
+extern _X_EXPORT Bool xf86AddPixFormat(ScrnInfoPtr pScrn, int depth, int bpp,
+ int pad);
+extern _X_EXPORT Bool xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int bpp,
+ int fbbpp, int depth24flags);
+extern _X_EXPORT void xf86PrintDepthBpp(ScrnInfoPtr scrp);
+extern _X_EXPORT Bool xf86SetWeight(ScrnInfoPtr scrp, rgb weight, rgb mask);
+extern _X_EXPORT Bool xf86SetDefaultVisual(ScrnInfoPtr scrp, int visual);
+extern _X_EXPORT Bool xf86SetGamma(ScrnInfoPtr scrp, Gamma newGamma);
+extern _X_EXPORT void xf86SetDpi(ScrnInfoPtr pScrn, int x, int y);
+extern _X_EXPORT void xf86SetBlackWhitePixels(ScreenPtr pScreen);
+extern _X_EXPORT void xf86EnableDisableFBAccess(ScrnInfoPtr pScrn, Bool enable);
+extern _X_EXPORT void
+xf86VDrvMsgVerb(int scrnIndex, MessageType type, int verb,
+ const char *format, va_list args)
+_X_ATTRIBUTE_PRINTF(4, 0);
+extern _X_EXPORT void
+xf86DrvMsgVerb(int scrnIndex, MessageType type, int verb,
+ const char *format, ...)
+_X_ATTRIBUTE_PRINTF(4, 5);
+extern _X_EXPORT void
+xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...)
+_X_ATTRIBUTE_PRINTF(3, 4);
+extern _X_EXPORT void
+xf86MsgVerb(MessageType type, int verb, const char *format, ...)
+_X_ATTRIBUTE_PRINTF(3, 4);
+extern _X_EXPORT void
+xf86Msg(MessageType type, const char *format, ...)
+_X_ATTRIBUTE_PRINTF(2, 3);
+extern _X_EXPORT void
+xf86ErrorFVerb(int verb, const char *format, ...)
+_X_ATTRIBUTE_PRINTF(2, 3);
+extern _X_EXPORT void
+xf86ErrorF(const char *format, ...)
+_X_ATTRIBUTE_PRINTF(1, 2);
+extern _X_EXPORT const char *
+xf86TokenToString(SymTabPtr table, int token);
+extern _X_EXPORT int
+xf86StringToToken(SymTabPtr table, const char *string);
+extern _X_EXPORT void
+xf86ShowClocks(ScrnInfoPtr scrp, MessageType from);
+extern _X_EXPORT void
+xf86PrintChipsets(const char *drvname, const char *drvmsg, SymTabPtr chips);
+extern _X_EXPORT int
+xf86MatchDevice(const char *drivername, GDevPtr ** driversectlist);
+extern _X_EXPORT const char *
+xf86GetVisualName(int visual);
+extern _X_EXPORT int
+xf86GetVerbosity(void);
+extern _X_EXPORT Pix24Flags
+xf86GetPix24(void);
+extern _X_EXPORT int
+xf86GetDepth(void);
+extern _X_EXPORT rgb
+xf86GetWeight(void);
+extern _X_EXPORT Gamma
+xf86GetGamma(void);
+extern _X_EXPORT Bool
+xf86GetFlipPixels(void);
+extern _X_EXPORT const char *
+xf86GetServerName(void);
+extern _X_EXPORT Bool
+xf86ServerIsExiting(void);
+extern _X_EXPORT Bool
+xf86ServerIsResetting(void);
+extern _X_EXPORT Bool
+xf86ServerIsInitialising(void);
+extern _X_EXPORT Bool
+xf86ServerIsOnlyDetecting(void);
+extern _X_EXPORT Bool
+xf86CaughtSignal(void);
+extern _X_EXPORT Bool
+xf86GetVidModeAllowNonLocal(void);
+extern _X_EXPORT Bool
+xf86GetVidModeEnabled(void);
+extern _X_EXPORT Bool
+xf86GetModInDevAllowNonLocal(void);
+extern _X_EXPORT Bool
+xf86GetModInDevEnabled(void);
+extern _X_EXPORT Bool
+xf86GetAllowMouseOpenFail(void);
+extern _X_EXPORT void
+xf86DisableRandR(void);
+extern _X_EXPORT CARD32
+xorgGetVersion(void);
+extern _X_EXPORT CARD32
+xf86GetModuleVersion(void *module);
+extern _X_EXPORT void *
+xf86LoadDrvSubModule(DriverPtr drv, const char *name);
+extern _X_EXPORT void *
+xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name);
+extern _X_EXPORT void *
+xf86LoadOneModule(const char *name, void *optlist);
+extern _X_EXPORT void
+xf86UnloadSubModule(void *mod);
+extern _X_EXPORT Bool
+xf86LoaderCheckSymbol(const char *name);
+extern _X_EXPORT void
+xf86SetBackingStore(ScreenPtr pScreen);
+extern _X_EXPORT void
+xf86SetSilkenMouse(ScreenPtr pScreen);
+extern _X_EXPORT void *
+xf86FindXvOptions(ScrnInfoPtr pScrn, int adapt_index, const char *port_name,
+ const char **adaptor_name, void **adaptor_options);
+extern _X_EXPORT void
+xf86GetOS(const char **name, int *major, int *minor, int *teeny);
+extern _X_EXPORT ScrnInfoPtr
+xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag,
+ int entityIndex, EntityProc init,
+ EntityProc enter, EntityProc leave, void *private);
+
+extern _X_EXPORT Bool
+xf86IsScreenPrimary(ScrnInfoPtr pScrn);
+extern _X_EXPORT int
+xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type,
+ int format, unsigned long len, void *value);
+extern _X_EXPORT Bool
+xf86IsUnblank(int mode);
+
+/* xf86Init.c */
+
+extern _X_EXPORT PixmapFormatPtr
+xf86GetPixFormat(ScrnInfoPtr pScrn, int depth);
+extern _X_EXPORT int
+xf86GetBppFromDepth(ScrnInfoPtr pScrn, int depth);
+
+/* xf86Mode.c */
+
+extern _X_EXPORT int
+xf86GetNearestClock(ScrnInfoPtr scrp, int freq, Bool allowDiv2,
+ int DivFactor, int MulFactor, int *divider);
+extern _X_EXPORT const char *
+xf86ModeStatusToString(ModeStatus status);
+extern _X_EXPORT ModeStatus
+xf86LookupMode(ScrnInfoPtr scrp, DisplayModePtr modep,
+ ClockRangePtr clockRanges, LookupModeFlags strategy);
+extern _X_EXPORT ModeStatus
+xf86CheckModeForMonitor(DisplayModePtr mode, MonPtr monitor);
+extern _X_EXPORT ModeStatus
+xf86InitialCheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode,
+ ClockRangePtr clockRanges,
+ LookupModeFlags strategy,
+ int maxPitch, int virtualX, int virtualY);
+extern _X_EXPORT ModeStatus
+xf86CheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, int flags);
+extern _X_EXPORT int
+xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
+ const char **modeNames, ClockRangePtr clockRanges,
+ int *linePitches, int minPitch, int maxPitch,
+ int minHeight, int maxHeight, int pitchInc,
+ int virtualX, int virtualY, int apertureSize,
+ LookupModeFlags strategy);
+extern _X_EXPORT void
+xf86DeleteMode(DisplayModePtr * modeList, DisplayModePtr mode);
+extern _X_EXPORT void
+xf86PruneDriverModes(ScrnInfoPtr scrp);
+extern _X_EXPORT void
+xf86SetCrtcForModes(ScrnInfoPtr scrp, int adjustFlags);
+extern _X_EXPORT void
+xf86PrintModes(ScrnInfoPtr scrp);
+extern _X_EXPORT void
+xf86ShowClockRanges(ScrnInfoPtr scrp, ClockRangePtr clockRanges);
+
+/* xf86Option.c */
+
+extern _X_EXPORT void
+xf86CollectOptions(ScrnInfoPtr pScrn, XF86OptionPtr extraOpts);
+
+/* xf86RandR.c */
+#ifdef RANDR
+extern _X_EXPORT Bool
+xf86RandRInit(ScreenPtr pScreen);
+extern _X_EXPORT Rotation
+xf86GetRotation(ScreenPtr pScreen);
+extern _X_EXPORT Bool
+xf86RandRSetNewVirtualAndDimensions(ScreenPtr pScreen,
+ int newvirtX, int newvirtY,
+ int newmmWidth, int newmmHeight,
+ Bool resetMode);
+#endif
+
+/* xf86Extensions.c */
+extern void xf86ExtensionInit(void);
+
+/* convert ScreenPtr to ScrnInfoPtr */
+extern _X_EXPORT ScrnInfoPtr xf86ScreenToScrn(ScreenPtr pScreen);
+/* convert ScrnInfoPtr to ScreenPtr */
+extern _X_EXPORT ScreenPtr xf86ScrnToScreen(ScrnInfoPtr pScrn);
+
+#endif /* _NO_XF86_PROTOTYPES */
+
+#define XF86_HAS_SCRN_CONV 1 /* define for drivers to use in api compat */
+
+#define XF86_SCRN_INTERFACE 1 /* define for drivers to use in api compat */
+
+/* flags passed to xf86 allocate screen */
+#define XF86_ALLOCATE_GPU_SCREEN 1
+
+/* Update the internal total dimensions of all ScreenRecs together */
+extern _X_EXPORT void
+xf86UpdateDesktopDimensions(void);
+
+#endif /* _XF86_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Crtc.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Crtc.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Crtc.h (working copy)
@@ -0,0 +1,1021 @@
+/*
+ * Copyright © 2006 Keith Packard
+ * Copyright © 2011 Aaron Plattner
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no representations
+ * about the suitability of this software for any purpose. It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+#ifndef _XF86CRTC_H_
+#define _XF86CRTC_H_
+
+#include <edid.h>
+#include "randrstr.h"
+#include "xf86Modes.h"
+#include "xf86Cursor.h"
+#include "xf86i2c.h"
+#include "damage.h"
+#include "picturestr.h"
+
+/* Compat definitions for older X Servers. */
+#ifndef M_T_PREFERRED
+#define M_T_PREFERRED 0x08
+#endif
+#ifndef M_T_DRIVER
+#define M_T_DRIVER 0x40
+#endif
+#ifndef M_T_USERPREF
+#define M_T_USERPREF 0x80
+#endif
+#ifndef HARDWARE_CURSOR_ARGB
+#define HARDWARE_CURSOR_ARGB 0x00004000
+#endif
+
+typedef struct _xf86Crtc xf86CrtcRec, *xf86CrtcPtr;
+typedef struct _xf86Output xf86OutputRec, *xf86OutputPtr;
+
+/* define a standard for connector types */
+typedef enum _xf86ConnectorType {
+ XF86ConnectorNone,
+ XF86ConnectorVGA,
+ XF86ConnectorDVI_I,
+ XF86ConnectorDVI_D,
+ XF86ConnectorDVI_A,
+ XF86ConnectorComposite,
+ XF86ConnectorSvideo,
+ XF86ConnectorComponent,
+ XF86ConnectorLFP,
+ XF86ConnectorProprietary,
+ XF86ConnectorHDMI,
+ XF86ConnectorDisplayPort,
+} xf86ConnectorType;
+
+typedef enum _xf86OutputStatus {
+ XF86OutputStatusConnected,
+ XF86OutputStatusDisconnected,
+ XF86OutputStatusUnknown
+} xf86OutputStatus;
+
+typedef struct _xf86CrtcFuncs {
+ /**
+ * Turns the crtc on/off, or sets intermediate power levels if available.
+ *
+ * Unsupported intermediate modes drop to the lower power setting. If the
+ * mode is DPMSModeOff, the crtc must be disabled sufficiently for it to
+ * be safe to call mode_set.
+ */
+ void
+ (*dpms) (xf86CrtcPtr crtc, int mode);
+
+ /**
+ * Saves the crtc's state for restoration on VT switch.
+ */
+ void
+ (*save) (xf86CrtcPtr crtc);
+
+ /**
+ * Restore's the crtc's state at VT switch.
+ */
+ void
+ (*restore) (xf86CrtcPtr crtc);
+
+ /**
+ * Lock CRTC prior to mode setting, mostly for DRI.
+ * Returns whether unlock is needed
+ */
+ Bool
+ (*lock) (xf86CrtcPtr crtc);
+
+ /**
+ * Unlock CRTC after mode setting, mostly for DRI
+ */
+ void
+ (*unlock) (xf86CrtcPtr crtc);
+
+ /**
+ * Callback to adjust the mode to be set in the CRTC.
+ *
+ * This allows a CRTC to adjust the clock or even the entire set of
+ * timings, which is used for panels with fixed timings or for
+ * buses with clock limitations.
+ */
+ Bool
+ (*mode_fixup) (xf86CrtcPtr crtc,
+ DisplayModePtr mode, DisplayModePtr adjusted_mode);
+
+ /**
+ * Prepare CRTC for an upcoming mode set.
+ */
+ void
+ (*prepare) (xf86CrtcPtr crtc);
+
+ /**
+ * Callback for setting up a video mode after fixups have been made.
+ */
+ void
+ (*mode_set) (xf86CrtcPtr crtc,
+ DisplayModePtr mode,
+ DisplayModePtr adjusted_mode, int x, int y);
+
+ /**
+ * Commit mode changes to a CRTC
+ */
+ void
+ (*commit) (xf86CrtcPtr crtc);
+
+ /* Set the color ramps for the CRTC to the given values. */
+ void
+ (*gamma_set) (xf86CrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue,
+ int size);
+
+ /**
+ * Allocate the shadow area, delay the pixmap creation until needed
+ */
+ void *(*shadow_allocate) (xf86CrtcPtr crtc, int width, int height);
+
+ /**
+ * Create shadow pixmap for rotation support
+ */
+ PixmapPtr
+ (*shadow_create) (xf86CrtcPtr crtc, void *data, int width, int height);
+
+ /**
+ * Destroy shadow pixmap
+ */
+ void
+ (*shadow_destroy) (xf86CrtcPtr crtc, PixmapPtr pPixmap, void *data);
+
+ /**
+ * Set cursor colors
+ */
+ void
+ (*set_cursor_colors) (xf86CrtcPtr crtc, int bg, int fg);
+
+ /**
+ * Set cursor position
+ */
+ void
+ (*set_cursor_position) (xf86CrtcPtr crtc, int x, int y);
+
+ /**
+ * Show cursor
+ */
+ void
+ (*show_cursor) (xf86CrtcPtr crtc);
+
+ /**
+ * Hide cursor
+ */
+ void
+ (*hide_cursor) (xf86CrtcPtr crtc);
+
+ /**
+ * Load monochrome image
+ */
+ void
+ (*load_cursor_image) (xf86CrtcPtr crtc, CARD8 *image);
+
+ /**
+ * Load ARGB image
+ */
+ void
+ (*load_cursor_argb) (xf86CrtcPtr crtc, CARD32 *image);
+
+ /**
+ * Clean up driver-specific bits of the crtc
+ */
+ void
+ (*destroy) (xf86CrtcPtr crtc);
+
+ /**
+ * Less fine-grained mode setting entry point for kernel modesetting
+ */
+ Bool
+ (*set_mode_major) (xf86CrtcPtr crtc, DisplayModePtr mode,
+ Rotation rotation, int x, int y);
+
+ /**
+ * Callback for panning. Doesn't change the mode.
+ * Added in ABI version 2
+ */
+ void
+ (*set_origin) (xf86CrtcPtr crtc, int x, int y);
+
+ /**
+ */
+ Bool
+ (*set_scanout_pixmap)(xf86CrtcPtr crtc, PixmapPtr pixmap);
+
+} xf86CrtcFuncsRec, *xf86CrtcFuncsPtr;
+
+#define XF86_CRTC_VERSION 5
+
+struct _xf86Crtc {
+ /**
+ * ABI versioning
+ */
+ int version;
+
+ /**
+ * Associated ScrnInfo
+ */
+ ScrnInfoPtr scrn;
+
+ /**
+ * Desired state of this CRTC
+ *
+ * Set when this CRTC should be driving one or more outputs
+ */
+ Bool enabled;
+
+ /**
+ * Active mode
+ *
+ * This reflects the mode as set in the CRTC currently
+ * It will be cleared when the VT is not active or
+ * during server startup
+ */
+ DisplayModeRec mode;
+ Rotation rotation;
+ PixmapPtr rotatedPixmap;
+ void *rotatedData;
+
+ /**
+ * Position on screen
+ *
+ * Locates this CRTC within the frame buffer
+ */
+ int x, y;
+
+ /**
+ * Desired mode
+ *
+ * This is set to the requested mode, independent of
+ * whether the VT is active. In particular, it receives
+ * the startup configured mode and saves the active mode
+ * on VT switch.
+ */
+ DisplayModeRec desiredMode;
+ Rotation desiredRotation;
+ int desiredX, desiredY;
+
+ /** crtc-specific functions */
+ const xf86CrtcFuncsRec *funcs;
+
+ /**
+ * Driver private
+ *
+ * Holds driver-private information
+ */
+ void *driver_private;
+
+#ifdef RANDR_12_INTERFACE
+ /**
+ * RandR crtc
+ *
+ * When RandR 1.2 is available, this
+ * points at the associated crtc object
+ */
+ RRCrtcPtr randr_crtc;
+#else
+ void *randr_crtc;
+#endif
+
+ /**
+ * Current cursor is ARGB
+ */
+ Bool cursor_argb;
+ /**
+ * Track whether cursor is within CRTC range
+ */
+ Bool cursor_in_range;
+ /**
+ * Track state of cursor associated with this CRTC
+ */
+ Bool cursor_shown;
+
+ /**
+ * Current transformation matrix
+ */
+ PictTransform crtc_to_framebuffer;
+ /* framebuffer_to_crtc was removed in ABI 2 */
+ struct pict_f_transform f_crtc_to_framebuffer; /* ABI 2 */
+ struct pict_f_transform f_framebuffer_to_crtc; /* ABI 2 */
+ PictFilterPtr filter; /* ABI 2 */
+ xFixed *params; /* ABI 2 */
+ int nparams; /* ABI 2 */
+ int filter_width; /* ABI 2 */
+ int filter_height; /* ABI 2 */
+ Bool transform_in_use;
+ RRTransformRec transform; /* ABI 2 */
+ Bool transformPresent; /* ABI 2 */
+ RRTransformRec desiredTransform; /* ABI 2 */
+ Bool desiredTransformPresent; /* ABI 2 */
+ /**
+ * Bounding box in screen space
+ */
+ BoxRec bounds;
+ /**
+ * Panning:
+ * TotalArea: total panning area, larger than CRTC's size
+ * TrackingArea: Area of the pointer for which the CRTC is panned
+ * border: Borders of the displayed CRTC area which induces panning if the pointer reaches them
+ * Added in ABI version 2
+ */
+ BoxRec panningTotalArea;
+ BoxRec panningTrackingArea;
+ INT16 panningBorder[4];
+
+ /**
+ * Current gamma, especially useful after initial config.
+ * Added in ABI version 3
+ */
+ CARD16 *gamma_red;
+ CARD16 *gamma_green;
+ CARD16 *gamma_blue;
+ int gamma_size;
+
+ /**
+ * Actual state of this CRTC
+ *
+ * Set to TRUE after modesetting, set to FALSE if no outputs are connected
+ * Added in ABI version 3
+ */
+ Bool active;
+ /**
+ * Clear the shadow
+ */
+ Bool shadowClear;
+
+ /**
+ * Indicates that the driver is handling the transform, so the shadow
+ * surface should be disabled. The driver writes this field before calling
+ * xf86CrtcRotate to indicate that it is handling the transform (including
+ * rotation and reflection).
+ *
+ * Setting this flag also causes the server to stop adjusting the cursor
+ * image and position.
+ *
+ * Added in ABI version 4
+ */
+ Bool driverIsPerformingTransform;
+
+ /* Added in ABI version 5
+ */
+ PixmapPtr current_scanout;
+};
+
+typedef struct _xf86OutputFuncs {
+ /**
+ * Called to allow the output a chance to create properties after the
+ * RandR objects have been created.
+ */
+ void
+ (*create_resources) (xf86OutputPtr output);
+
+ /**
+ * Turns the output on/off, or sets intermediate power levels if available.
+ *
+ * Unsupported intermediate modes drop to the lower power setting. If the
+ * mode is DPMSModeOff, the output must be disabled, as the DPLL may be
+ * disabled afterwards.
+ */
+ void
+ (*dpms) (xf86OutputPtr output, int mode);
+
+ /**
+ * Saves the output's state for restoration on VT switch.
+ */
+ void
+ (*save) (xf86OutputPtr output);
+
+ /**
+ * Restore's the output's state at VT switch.
+ */
+ void
+ (*restore) (xf86OutputPtr output);
+
+ /**
+ * Callback for testing a video mode for a given output.
+ *
+ * This function should only check for cases where a mode can't be supported
+ * on the output specifically, and not represent generic CRTC limitations.
+ *
+ * \return MODE_OK if the mode is valid, or another MODE_* otherwise.
+ */
+ int
+ (*mode_valid) (xf86OutputPtr output, DisplayModePtr pMode);
+
+ /**
+ * Callback to adjust the mode to be set in the CRTC.
+ *
+ * This allows an output to adjust the clock or even the entire set of
+ * timings, which is used for panels with fixed timings or for
+ * buses with clock limitations.
+ */
+ Bool
+ (*mode_fixup) (xf86OutputPtr output,
+ DisplayModePtr mode, DisplayModePtr adjusted_mode);
+
+ /**
+ * Callback for preparing mode changes on an output
+ */
+ void
+ (*prepare) (xf86OutputPtr output);
+
+ /**
+ * Callback for committing mode changes on an output
+ */
+ void
+ (*commit) (xf86OutputPtr output);
+
+ /**
+ * Callback for setting up a video mode after fixups have been made.
+ *
+ * This is only called while the output is disabled. The dpms callback
+ * must be all that's necessary for the output, to turn the output on
+ * after this function is called.
+ */
+ void
+ (*mode_set) (xf86OutputPtr output,
+ DisplayModePtr mode, DisplayModePtr adjusted_mode);
+
+ /**
+ * Probe for a connected output, and return detect_status.
+ */
+ xf86OutputStatus(*detect) (xf86OutputPtr output);
+
+ /**
+ * Query the device for the modes it provides.
+ *
+ * This function may also update MonInfo, mm_width, and mm_height.
+ *
+ * \return singly-linked list of modes or NULL if no modes found.
+ */
+ DisplayModePtr(*get_modes) (xf86OutputPtr output);
+
+#ifdef RANDR_12_INTERFACE
+ /**
+ * Callback when an output's property has changed.
+ */
+ Bool
+ (*set_property) (xf86OutputPtr output,
+ Atom property, RRPropertyValuePtr value);
+#endif
+#ifdef RANDR_13_INTERFACE
+ /**
+ * Callback to get an updated property value
+ */
+ Bool
+ (*get_property) (xf86OutputPtr output, Atom property);
+#endif
+#ifdef RANDR_GET_CRTC_INTERFACE
+ /**
+ * Callback to get current CRTC for a given output
+ */
+ xf86CrtcPtr(*get_crtc) (xf86OutputPtr output);
+#endif
+ /**
+ * Clean up driver-specific bits of the output
+ */
+ void
+ (*destroy) (xf86OutputPtr output);
+} xf86OutputFuncsRec, *xf86OutputFuncsPtr;
+
+#define XF86_OUTPUT_VERSION 2
+
+struct _xf86Output {
+ /**
+ * ABI versioning
+ */
+ int version;
+
+ /**
+ * Associated ScrnInfo
+ */
+ ScrnInfoPtr scrn;
+
+ /**
+ * Currently connected crtc (if any)
+ *
+ * If this output is not in use, this field will be NULL.
+ */
+ xf86CrtcPtr crtc;
+
+ /**
+ * Possible CRTCs for this output as a mask of crtc indices
+ */
+ CARD32 possible_crtcs;
+
+ /**
+ * Possible outputs to share the same CRTC as a mask of output indices
+ */
+ CARD32 possible_clones;
+
+ /**
+ * Whether this output can support interlaced modes
+ */
+ Bool interlaceAllowed;
+
+ /**
+ * Whether this output can support double scan modes
+ */
+ Bool doubleScanAllowed;
+
+ /**
+ * List of available modes on this output.
+ *
+ * This should be the list from get_modes(), plus perhaps additional
+ * compatible modes added later.
+ */
+ DisplayModePtr probed_modes;
+
+ /**
+ * Options parsed from the related monitor section
+ */
+ OptionInfoPtr options;
+
+ /**
+ * Configured monitor section
+ */
+ XF86ConfMonitorPtr conf_monitor;
+
+ /**
+ * Desired initial position
+ */
+ int initial_x, initial_y;
+
+ /**
+ * Desired initial rotation
+ */
+ Rotation initial_rotation;
+
+ /**
+ * Current connection status
+ *
+ * This indicates whether a monitor is known to be connected
+ * to this output or not, or whether there is no way to tell
+ */
+ xf86OutputStatus status;
+
+ /** EDID monitor information */
+ xf86MonPtr MonInfo;
+
+ /** subpixel order */
+ int subpixel_order;
+
+ /** Physical size of the currently attached output device. */
+ int mm_width, mm_height;
+
+ /** Output name */
+ char *name;
+
+ /** output-specific functions */
+ const xf86OutputFuncsRec *funcs;
+
+ /** driver private information */
+ void *driver_private;
+
+ /** Whether to use the old per-screen Monitor config section */
+ Bool use_screen_monitor;
+
+#ifdef RANDR_12_INTERFACE
+ /**
+ * RandR 1.2 output structure.
+ *
+ * When RandR 1.2 is available, this points at the associated
+ * RandR output structure and is created when this output is created
+ */
+ RROutputPtr randr_output;
+#else
+ void *randr_output;
+#endif
+ /**
+ * Desired initial panning
+ * Added in ABI version 2
+ */
+ BoxRec initialTotalArea;
+ BoxRec initialTrackingArea;
+ INT16 initialBorder[4];
+};
+
+typedef struct _xf86ProviderFuncs {
+ /**
+ * Called to allow the provider a chance to create properties after the
+ * RandR objects have been created.
+ */
+ void
+ (*create_resources) (ScrnInfoPtr scrn);
+
+ /**
+ * Callback when an provider's property has changed.
+ */
+ Bool
+ (*set_property) (ScrnInfoPtr scrn,
+ Atom property, RRPropertyValuePtr value);
+
+ /**
+ * Callback to get an updated property value
+ */
+ Bool
+ (*get_property) (ScrnInfoPtr provider, Atom property);
+
+} xf86ProviderFuncsRec, *xf86ProviderFuncsPtr;
+
+typedef struct _xf86CrtcConfigFuncs {
+ /**
+ * Requests that the driver resize the screen.
+ *
+ * The driver is responsible for updating scrn->virtualX and scrn->virtualY.
+ * If the requested size cannot be set, the driver should leave those values
+ * alone and return FALSE.
+ *
+ * A naive driver that cannot reallocate the screen may simply change
+ * virtual[XY]. A more advanced driver will want to also change the
+ * devPrivate.ptr and devKind of the screen pixmap, update any offscreen
+ * pixmaps it may have moved, and change pScrn->displayWidth.
+ */
+ Bool
+ (*resize) (ScrnInfoPtr scrn, int width, int height);
+} xf86CrtcConfigFuncsRec, *xf86CrtcConfigFuncsPtr;
+
+typedef void (*xf86_crtc_notify_proc_ptr) (ScreenPtr pScreen);
+
+typedef struct _xf86CrtcConfig {
+ int num_output;
+ xf86OutputPtr *output;
+ /**
+ * compat_output is used whenever we deal
+ * with legacy code that only understands a single
+ * output. pScrn->modes will be loaded from this output,
+ * adjust frame will whack this output, etc.
+ */
+ int compat_output;
+
+ int num_crtc;
+ xf86CrtcPtr *crtc;
+
+ int minWidth, minHeight;
+ int maxWidth, maxHeight;
+
+ /* For crtc-based rotation */
+ DamagePtr rotation_damage;
+ Bool rotation_damage_registered;
+
+ /* DGA */
+ unsigned int dga_flags;
+ unsigned long dga_address;
+ DGAModePtr dga_modes;
+ int dga_nmode;
+ int dga_width, dga_height, dga_stride;
+ DisplayModePtr dga_save_mode;
+
+ const xf86CrtcConfigFuncsRec *funcs;
+
+ CreateScreenResourcesProcPtr CreateScreenResources;
+
+ CloseScreenProcPtr CloseScreen;
+
+ /* Cursor information */
+ xf86CursorInfoPtr cursor_info;
+ CursorPtr cursor;
+ CARD8 *cursor_image;
+ Bool cursor_on;
+ CARD32 cursor_fg, cursor_bg;
+
+ /**
+ * Options parsed from the related device section
+ */
+ OptionInfoPtr options;
+
+ Bool debug_modes;
+
+ /* wrap screen BlockHandler for rotation */
+ ScreenBlockHandlerProcPtr BlockHandler;
+
+ /* callback when crtc configuration changes */
+ xf86_crtc_notify_proc_ptr xf86_crtc_notify;
+
+ char *name;
+ const xf86ProviderFuncsRec *provider_funcs;
+#ifdef RANDR_12_INTERFACE
+ RRProviderPtr randr_provider;
+#else
+ void *randr_provider;
+#endif
+} xf86CrtcConfigRec, *xf86CrtcConfigPtr;
+
+extern _X_EXPORT int xf86CrtcConfigPrivateIndex;
+
+#define XF86_CRTC_CONFIG_PTR(p) ((xf86CrtcConfigPtr) ((p)->privates[xf86CrtcConfigPrivateIndex].ptr))
+
+static _X_INLINE xf86OutputPtr
+xf86CompatOutput(ScrnInfoPtr pScrn)
+{
+ xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
+
+ return config->output[config->compat_output];
+}
+
+static _X_INLINE xf86CrtcPtr
+xf86CompatCrtc(ScrnInfoPtr pScrn)
+{
+ xf86OutputPtr compat_output = xf86CompatOutput(pScrn);
+
+ if (!compat_output)
+ return NULL;
+ return compat_output->crtc;
+}
+
+static _X_INLINE RRCrtcPtr
+xf86CompatRRCrtc(ScrnInfoPtr pScrn)
+{
+ xf86CrtcPtr compat_crtc = xf86CompatCrtc(pScrn);
+
+ if (!compat_crtc)
+ return NULL;
+ return compat_crtc->randr_crtc;
+}
+
+/*
+ * Initialize xf86CrtcConfig structure
+ */
+
+extern _X_EXPORT void
+ xf86CrtcConfigInit(ScrnInfoPtr scrn, const xf86CrtcConfigFuncsRec * funcs);
+
+extern _X_EXPORT void
+
+xf86CrtcSetSizeRange(ScrnInfoPtr scrn,
+ int minWidth, int minHeight, int maxWidth, int maxHeight);
+
+/*
+ * Crtc functions
+ */
+extern _X_EXPORT xf86CrtcPtr
+xf86CrtcCreate(ScrnInfoPtr scrn, const xf86CrtcFuncsRec * funcs);
+
+extern _X_EXPORT void
+ xf86CrtcDestroy(xf86CrtcPtr crtc);
+
+/**
+ * Sets the given video mode on the given crtc
+ */
+
+extern _X_EXPORT Bool
+
+xf86CrtcSetModeTransform(xf86CrtcPtr crtc, DisplayModePtr mode,
+ Rotation rotation, RRTransformPtr transform, int x,
+ int y);
+
+extern _X_EXPORT Bool
+
+xf86CrtcSetMode(xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation,
+ int x, int y);
+
+extern _X_EXPORT void
+ xf86CrtcSetOrigin(xf86CrtcPtr crtc, int x, int y);
+
+/*
+ * Assign crtc rotation during mode set
+ */
+extern _X_EXPORT Bool
+ xf86CrtcRotate(xf86CrtcPtr crtc);
+
+/*
+ * Clean up any rotation data, used when a crtc is turned off
+ * as well as when rotation is disabled.
+ */
+extern _X_EXPORT void
+ xf86RotateDestroy(xf86CrtcPtr crtc);
+
+/*
+ * free shadow memory allocated for all crtcs
+ */
+extern _X_EXPORT void
+ xf86RotateFreeShadow(ScrnInfoPtr pScrn);
+
+/*
+ * Clean up rotation during CloseScreen
+ */
+extern _X_EXPORT void
+ xf86RotateCloseScreen(ScreenPtr pScreen);
+
+/**
+ * Return whether any output is assigned to the crtc
+ */
+extern _X_EXPORT Bool
+ xf86CrtcInUse(xf86CrtcPtr crtc);
+
+/*
+ * Output functions
+ */
+extern _X_EXPORT xf86OutputPtr
+xf86OutputCreate(ScrnInfoPtr scrn,
+ const xf86OutputFuncsRec * funcs, const char *name);
+
+extern _X_EXPORT void
+ xf86OutputUseScreenMonitor(xf86OutputPtr output, Bool use_screen_monitor);
+
+extern _X_EXPORT Bool
+ xf86OutputRename(xf86OutputPtr output, const char *name);
+
+extern _X_EXPORT void
+ xf86OutputDestroy(xf86OutputPtr output);
+
+extern _X_EXPORT void
+ xf86ProbeOutputModes(ScrnInfoPtr pScrn, int maxX, int maxY);
+
+extern _X_EXPORT void
+ xf86SetScrnInfoModes(ScrnInfoPtr pScrn);
+
+#ifdef RANDR_13_INTERFACE
+#define ScreenInitRetType int
+#else
+#define ScreenInitRetType Bool
+#endif
+
+extern _X_EXPORT ScreenInitRetType xf86CrtcScreenInit(ScreenPtr pScreen);
+
+extern _X_EXPORT Bool
+ xf86InitialConfiguration(ScrnInfoPtr pScrn, Bool canGrow);
+
+extern _X_EXPORT void
+ xf86DPMSSet(ScrnInfoPtr pScrn, int PowerManagementMode, int flags);
+
+extern _X_EXPORT Bool
+ xf86SaveScreen(ScreenPtr pScreen, int mode);
+
+extern _X_EXPORT void
+ xf86DisableUnusedFunctions(ScrnInfoPtr pScrn);
+
+extern _X_EXPORT DisplayModePtr
+xf86OutputFindClosestMode(xf86OutputPtr output, DisplayModePtr desired);
+
+extern _X_EXPORT Bool
+
+xf86SetSingleMode(ScrnInfoPtr pScrn, DisplayModePtr desired, Rotation rotation);
+
+/**
+ * Set the EDID information for the specified output
+ */
+extern _X_EXPORT void
+ xf86OutputSetEDID(xf86OutputPtr output, xf86MonPtr edid_mon);
+
+/**
+ * Return the list of modes supported by the EDID information
+ * stored in 'output'
+ */
+extern _X_EXPORT DisplayModePtr xf86OutputGetEDIDModes(xf86OutputPtr output);
+
+extern _X_EXPORT xf86MonPtr
+xf86OutputGetEDID(xf86OutputPtr output, I2CBusPtr pDDCBus);
+
+/**
+ * Initialize dga for this screen
+ */
+
+#ifdef XFreeXDGA
+extern _X_EXPORT Bool
+ xf86DiDGAInit(ScreenPtr pScreen, unsigned long dga_address);
+
+/* this is the real function, used only internally */
+_X_INTERNAL Bool
+ _xf86_di_dga_init_internal(ScreenPtr pScreen);
+
+/**
+ * Re-initialize dga for this screen (as when the set of modes changes)
+ */
+
+extern _X_EXPORT Bool
+ xf86DiDGAReInit(ScreenPtr pScreen);
+#endif
+
+/* This is the real function, used only internally */
+_X_INTERNAL Bool
+ _xf86_di_dga_reinit_internal(ScreenPtr pScreen);
+
+/*
+ * Set the subpixel order reported for the screen using
+ * the information from the outputs
+ */
+
+extern _X_EXPORT void
+ xf86CrtcSetScreenSubpixelOrder(ScreenPtr pScreen);
+
+/*
+ * Get a standard string name for a connector type
+ */
+extern _X_EXPORT const char *xf86ConnectorGetName(xf86ConnectorType connector);
+
+/*
+ * Using the desired mode information in each crtc, set
+ * modes (used in EnterVT functions, or at server startup)
+ */
+
+extern _X_EXPORT Bool
+ xf86SetDesiredModes(ScrnInfoPtr pScrn);
+
+/**
+ * Initialize the CRTC-based cursor code. CRTC function vectors must
+ * contain relevant cursor setting functions.
+ *
+ * Driver should call this from ScreenInit function
+ */
+extern _X_EXPORT Bool
+ xf86_cursors_init(ScreenPtr screen, int max_width, int max_height, int flags);
+
+/**
+ * Called when anything on the screen is reconfigured.
+ *
+ * Reloads cursor images as needed, then adjusts cursor positions.
+ *
+ * Driver should call this from crtc commit function.
+ */
+extern _X_EXPORT void
+ xf86_reload_cursors(ScreenPtr screen);
+
+/**
+ * Called from EnterVT to turn the cursors back on
+ */
+extern _X_EXPORT void
+ xf86_show_cursors(ScrnInfoPtr scrn);
+
+/**
+ * Called by the driver to turn cursors off
+ */
+extern _X_EXPORT void
+ xf86_hide_cursors(ScrnInfoPtr scrn);
+
+/**
+ * Clean up CRTC-based cursor code. Driver must call this at CloseScreen time.
+ */
+extern _X_EXPORT void
+ xf86_cursors_fini(ScreenPtr screen);
+
+/**
+ * Transform the cursor's coordinates based on the crtc transform. Normally
+ * this is done by the server, but if crtc->driverIsPerformingTransform is TRUE,
+ * then the server does not transform the cursor position automatically.
+ */
+extern _X_EXPORT void
+ xf86CrtcTransformCursorPos(xf86CrtcPtr crtc, int *x, int *y);
+
+#ifdef XV
+/*
+ * For overlay video, compute the relevant CRTC and
+ * clip video to that.
+ * wraps xf86XVClipVideoHelper()
+ */
+
+extern _X_EXPORT Bool
+
+xf86_crtc_clip_video_helper(ScrnInfoPtr pScrn,
+ xf86CrtcPtr * crtc_ret,
+ xf86CrtcPtr desired_crtc,
+ BoxPtr dst,
+ INT32 *xa,
+ INT32 *xb,
+ INT32 *ya,
+ INT32 *yb,
+ RegionPtr reg, INT32 width, INT32 height);
+#endif
+
+extern _X_EXPORT xf86_crtc_notify_proc_ptr
+xf86_wrap_crtc_notify(ScreenPtr pScreen, xf86_crtc_notify_proc_ptr new);
+
+extern _X_EXPORT void
+ xf86_unwrap_crtc_notify(ScreenPtr pScreen, xf86_crtc_notify_proc_ptr old);
+
+extern _X_EXPORT void
+ xf86_crtc_notify(ScreenPtr pScreen);
+
+/**
+ * Gamma
+ */
+
+extern _X_EXPORT Bool
+ xf86_crtc_supports_gamma(ScrnInfoPtr pScrn);
+
+extern _X_EXPORT void
+xf86ProviderSetup(ScrnInfoPtr scrn,
+ const xf86ProviderFuncsRec * funcs, const char *name);
+
+extern _X_EXPORT void
+xf86DetachAllCrtc(ScrnInfoPtr scrn);
+
+#endif /* _XF86CRTC_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Cursor.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Cursor.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Cursor.h (working copy)
@@ -0,0 +1,52 @@
+
+#ifndef _XF86CURSOR_H
+#define _XF86CURSOR_H
+
+#include "xf86str.h"
+#include "mipointer.h"
+
+typedef struct _xf86CursorInfoRec {
+ ScrnInfoPtr pScrn;
+ int Flags;
+ int MaxWidth;
+ int MaxHeight;
+ void (*SetCursorColors) (ScrnInfoPtr pScrn, int bg, int fg);
+ void (*SetCursorPosition) (ScrnInfoPtr pScrn, int x, int y);
+ void (*LoadCursorImage) (ScrnInfoPtr pScrn, unsigned char *bits);
+ void (*HideCursor) (ScrnInfoPtr pScrn);
+ void (*ShowCursor) (ScrnInfoPtr pScrn);
+ unsigned char *(*RealizeCursor) (struct _xf86CursorInfoRec *, CursorPtr);
+ Bool (*UseHWCursor) (ScreenPtr, CursorPtr);
+
+#ifdef ARGB_CURSOR
+ Bool (*UseHWCursorARGB) (ScreenPtr, CursorPtr);
+ void (*LoadCursorARGB) (ScrnInfoPtr, CursorPtr);
+#endif
+
+} xf86CursorInfoRec, *xf86CursorInfoPtr;
+
+extern _X_EXPORT Bool xf86InitCursor(ScreenPtr pScreen,
+ xf86CursorInfoPtr infoPtr);
+extern _X_EXPORT xf86CursorInfoPtr xf86CreateCursorInfoRec(void);
+extern _X_EXPORT void xf86DestroyCursorInfoRec(xf86CursorInfoPtr);
+extern _X_EXPORT void xf86ForceHWCursor(ScreenPtr pScreen, Bool on);
+
+#define HARDWARE_CURSOR_INVERT_MASK 0x00000001
+#define HARDWARE_CURSOR_AND_SOURCE_WITH_MASK 0x00000002
+#define HARDWARE_CURSOR_SWAP_SOURCE_AND_MASK 0x00000004
+#define HARDWARE_CURSOR_SOURCE_MASK_NOT_INTERLEAVED 0x00000008
+#define HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1 0x00000010
+#define HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_8 0x00000020
+#define HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_16 0x00000040
+#define HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_32 0x00000080
+#define HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_64 0x00000100
+#define HARDWARE_CURSOR_TRUECOLOR_AT_8BPP 0x00000200
+#define HARDWARE_CURSOR_BIT_ORDER_MSBFIRST 0x00000400
+#define HARDWARE_CURSOR_NIBBLE_SWAPPED 0x00000800
+#define HARDWARE_CURSOR_SHOW_TRANSPARENT 0x00001000
+#define HARDWARE_CURSOR_UPDATE_UNHIDDEN 0x00002000
+#ifdef ARGB_CURSOR
+#define HARDWARE_CURSOR_ARGB 0x00004000
+#endif
+
+#endif /* _XF86CURSOR_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86DDC.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86DDC.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86DDC.h (working copy)
@@ -0,0 +1,103 @@
+
+/* xf86DDC.h
+ *
+ * This file contains all information to interpret a standard EDIC block
+ * transmitted by a display device via DDC (Display Data Channel). So far
+ * there is no information to deal with optional EDID blocks.
+ * DDC is a Trademark of VESA (Video Electronics Standard Association).
+ *
+ * Copyright 1998 by Egbert Eich <Egbert.Eich@Physik.TU-Darmstadt.DE>
+ */
+
+#ifndef XF86_DDC_H
+#define XF86_DDC_H
+
+#include "edid.h"
+#include "xf86i2c.h"
+#include "xf86str.h"
+
+/* speed up / slow down */
+typedef enum {
+ DDC_SLOW,
+ DDC_FAST
+} xf86ddcSpeed;
+
+typedef void (*DDC1SetSpeedProc) (ScrnInfoPtr, xf86ddcSpeed);
+
+extern _X_EXPORT xf86MonPtr xf86DoEDID_DDC1(ScrnInfoPtr pScrn,
+ DDC1SetSpeedProc DDC1SetSpeed,
+ unsigned
+ int (*DDC1Read) (ScrnInfoPtr)
+ );
+
+extern _X_EXPORT xf86MonPtr xf86DoEDID_DDC2(ScrnInfoPtr pScrn, I2CBusPtr pBus);
+
+extern _X_EXPORT xf86MonPtr xf86DoEEDID(ScrnInfoPtr pScrn, I2CBusPtr pBus, Bool);
+
+extern _X_EXPORT xf86MonPtr xf86PrintEDID(xf86MonPtr monPtr);
+
+extern _X_EXPORT xf86MonPtr xf86InterpretEDID(int screenIndex, Uchar * block);
+
+extern _X_EXPORT xf86MonPtr xf86InterpretEEDID(int screenIndex, Uchar * block);
+
+extern _X_EXPORT void
+ xf86EdidMonitorSet(int scrnIndex, MonPtr Monitor, xf86MonPtr DDC);
+
+extern _X_EXPORT Bool xf86SetDDCproperties(ScrnInfoPtr pScreen, xf86MonPtr DDC);
+
+extern _X_EXPORT Bool
+ xf86MonitorIsHDMI(xf86MonPtr mon);
+
+extern _X_EXPORT xf86MonPtr xf86DoDisplayID(ScrnInfoPtr pScrn, I2CBusPtr pBus);
+
+extern _X_EXPORT void
+ xf86DisplayIDMonitorSet(int scrnIndex, MonPtr mon, xf86MonPtr DDC);
+
+extern _X_EXPORT DisplayModePtr
+FindDMTMode(int hsize, int vsize, int refresh, Bool rb);
+
+extern _X_EXPORT const DisplayModeRec DMTModes[];
+
+/*
+ * Quirks to work around broken EDID data from various monitors.
+ */
+typedef enum {
+ DDC_QUIRK_NONE = 0,
+ /* First detailed mode is bogus, prefer largest mode at 60hz */
+ DDC_QUIRK_PREFER_LARGE_60 = 1 << 0,
+ /* 135MHz clock is too high, drop a bit */
+ DDC_QUIRK_135_CLOCK_TOO_HIGH = 1 << 1,
+ /* Prefer the largest mode at 75 Hz */
+ DDC_QUIRK_PREFER_LARGE_75 = 1 << 2,
+ /* Convert detailed timing's horizontal from units of cm to mm */
+ DDC_QUIRK_DETAILED_H_IN_CM = 1 << 3,
+ /* Convert detailed timing's vertical from units of cm to mm */
+ DDC_QUIRK_DETAILED_V_IN_CM = 1 << 4,
+ /* Detailed timing descriptors have bogus size values, so just take the
+ * maximum size and use that.
+ */
+ DDC_QUIRK_DETAILED_USE_MAXIMUM_SIZE = 1 << 5,
+ /* Monitor forgot to set the first detailed is preferred bit. */
+ DDC_QUIRK_FIRST_DETAILED_PREFERRED = 1 << 6,
+ /* use +hsync +vsync for detailed mode */
+ DDC_QUIRK_DETAILED_SYNC_PP = 1 << 7,
+ /* Force single-link DVI bandwidth limit */
+ DDC_QUIRK_DVI_SINGLE_LINK = 1 << 8,
+} ddc_quirk_t;
+
+typedef void (*handle_detailed_fn) (struct detailed_monitor_section *, void *);
+
+void xf86ForEachDetailedBlock(xf86MonPtr mon, handle_detailed_fn, void *data);
+
+ddc_quirk_t xf86DDCDetectQuirks(int scrnIndex, xf86MonPtr DDC, Bool verbose);
+
+void xf86DetTimingApplyQuirks(struct detailed_monitor_section *det_mon,
+ ddc_quirk_t quirks, int hsize, int vsize);
+
+typedef void (*handle_video_fn) (struct cea_video_block *, void *);
+
+void xf86ForEachVideoBlock(xf86MonPtr, handle_video_fn, void *);
+
+struct cea_data_block *xf86MonitorFindHDMIBlock(xf86MonPtr mon);
+
+#endif
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Modes.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Modes.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Modes.h (working copy)
@@ -0,0 +1,117 @@
+/*
+ * Copyright © 2006 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Authors:
+ * Eric Anholt <eric@anholt.net>
+ *
+ */
+
+#ifndef _XF86MODES_H_
+#define _XF86MODES_H_
+
+#include <stddef.h>
+#include <string.h>
+#include <stdio.h>
+
+#include "xf86.h"
+#include "xorgVersion.h"
+#include "edid.h"
+#include "xf86Parser.h"
+
+extern _X_EXPORT double xf86ModeHSync(const DisplayModeRec * mode);
+extern _X_EXPORT double xf86ModeVRefresh(const DisplayModeRec * mode);
+extern _X_EXPORT unsigned int xf86ModeBandwidth(DisplayModePtr mode, int depth);
+
+extern _X_EXPORT int
+ xf86ModeWidth(const DisplayModeRec * mode, Rotation rotation);
+
+extern _X_EXPORT int
+ xf86ModeHeight(const DisplayModeRec * mode, Rotation rotation);
+
+extern _X_EXPORT DisplayModePtr xf86DuplicateMode(const DisplayModeRec * pMode);
+extern _X_EXPORT DisplayModePtr xf86DuplicateModes(ScrnInfoPtr pScrn,
+ DisplayModePtr modeList);
+extern _X_EXPORT void xf86SetModeDefaultName(DisplayModePtr mode);
+extern _X_EXPORT void xf86SetModeCrtc(DisplayModePtr p, int adjustFlags);
+extern _X_EXPORT Bool xf86ModesEqual(const DisplayModeRec * pMode1,
+ const DisplayModeRec * pMode2);
+extern _X_EXPORT void xf86PrintModeline(int scrnIndex, DisplayModePtr mode);
+extern _X_EXPORT DisplayModePtr xf86ModesAdd(DisplayModePtr modes,
+ DisplayModePtr new);
+
+extern _X_EXPORT DisplayModePtr xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC);
+extern _X_EXPORT DisplayModePtr xf86CVTMode(int HDisplay, int VDisplay,
+ float VRefresh, Bool Reduced,
+ Bool Interlaced);
+extern _X_EXPORT DisplayModePtr xf86GTFMode(int h_pixels, int v_lines,
+ float freq, int interlaced,
+ int margins);
+
+extern _X_EXPORT Bool
+ xf86ModeIsReduced(const DisplayModeRec * mode);
+
+extern _X_EXPORT void
+ xf86ValidateModesFlags(ScrnInfoPtr pScrn, DisplayModePtr modeList, int flags);
+
+extern _X_EXPORT void
+
+xf86ValidateModesClocks(ScrnInfoPtr pScrn, DisplayModePtr modeList,
+ int *min, int *max, int n_ranges);
+
+extern _X_EXPORT void
+
+xf86ValidateModesSize(ScrnInfoPtr pScrn, DisplayModePtr modeList,
+ int maxX, int maxY, int maxPitch);
+
+extern _X_EXPORT void
+ xf86ValidateModesSync(ScrnInfoPtr pScrn, DisplayModePtr modeList, MonPtr mon);
+
+extern _X_EXPORT void
+
+xf86ValidateModesBandwidth(ScrnInfoPtr pScrn, DisplayModePtr modeList,
+ unsigned int bandwidth, int depth);
+
+extern _X_EXPORT void
+ xf86ValidateModesReducedBlanking(ScrnInfoPtr pScrn, DisplayModePtr modeList);
+
+extern _X_EXPORT void
+
+xf86PruneInvalidModes(ScrnInfoPtr pScrn, DisplayModePtr * modeList,
+ Bool verbose);
+
+extern _X_EXPORT DisplayModePtr xf86PruneDuplicateModes(DisplayModePtr modes);
+
+extern _X_EXPORT void
+ xf86ValidateModesUserConfig(ScrnInfoPtr pScrn, DisplayModePtr modeList);
+
+extern _X_EXPORT DisplayModePtr
+xf86GetMonitorModes(ScrnInfoPtr pScrn, XF86ConfMonitorPtr conf_monitor);
+
+extern _X_EXPORT DisplayModePtr xf86GetDefaultModes(void);
+
+extern _X_EXPORT void
+xf86SaveModeContents(DisplayModePtr intern, const DisplayModeRec *mode);
+
+extern _X_EXPORT void
+ xf86DDCApplyQuirks(int scrnIndex, xf86MonPtr DDC);
+
+#endif /* _XF86MODES_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Module.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Module.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Module.h (working copy)
@@ -0,0 +1,199 @@
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+/*
+ * This file contains the parts of the loader interface that are visible
+ * to modules. This is the only loader-related header that modules should
+ * include.
+ *
+ * It should include a bare minimum of other headers.
+ *
+ * Longer term, the module/loader code should probably live directly under
+ * Xserver/.
+ *
+ * XXX This file arguably belongs in xfree86/loader/.
+ */
+
+#ifndef _XF86MODULE_H
+#define _XF86MODULE_H
+
+#include "misc.h"
+#include "extension.h"
+#ifndef NULL
+#define NULL ((void *)0)
+#endif
+
+typedef enum {
+ LD_RESOLV_IFDONE = 0, /* only check if no more
+ delays pending */
+ LD_RESOLV_NOW = 1, /* finish one delay step */
+ LD_RESOLV_FORCE = 2 /* force checking... */
+} LoaderResolveOptions;
+
+#define DEFAULT_LIST ((char *)-1)
+
+/* Built-in ABI classes. These definitions must not be changed. */
+#define ABI_CLASS_NONE NULL
+#define ABI_CLASS_ANSIC "X.Org ANSI C Emulation"
+#define ABI_CLASS_VIDEODRV "X.Org Video Driver"
+#define ABI_CLASS_XINPUT "X.Org XInput driver"
+#define ABI_CLASS_EXTENSION "X.Org Server Extension"
+#define ABI_CLASS_FONT "X.Org Font Renderer"
+
+#define ABI_MINOR_MASK 0x0000FFFF
+#define ABI_MAJOR_MASK 0xFFFF0000
+#define GET_ABI_MINOR(v) ((v) & ABI_MINOR_MASK)
+#define GET_ABI_MAJOR(v) (((v) & ABI_MAJOR_MASK) >> 16)
+#define SET_ABI_VERSION(maj, min) \
+ ((((maj) << 16) & ABI_MAJOR_MASK) | ((min) & ABI_MINOR_MASK))
+
+/*
+ * ABI versions. Each version has a major and minor revision. Modules
+ * using lower minor revisions must work with servers of a higher minor
+ * revision. There is no compatibility between different major revisions.
+ * Whenever the ABI_ANSIC_VERSION is changed, the others must also be
+ * changed. The minor revision mask is 0x0000FFFF and the major revision
+ * mask is 0xFFFF0000.
+ */
+#define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4)
+#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(16, 0)
+#define ABI_XINPUT_VERSION SET_ABI_VERSION(20, 0)
+#define ABI_EXTENSION_VERSION SET_ABI_VERSION(8, 0)
+#define ABI_FONT_VERSION SET_ABI_VERSION(0, 6)
+
+#define MODINFOSTRING1 0xef23fdc5
+#define MODINFOSTRING2 0x10dc023a
+
+#ifndef MODULEVENDORSTRING
+#define MODULEVENDORSTRING "X.Org Foundation"
+#endif
+
+/* Error return codes for errmaj. New codes must only be added at the end. */
+typedef enum {
+ LDR_NOERROR = 0,
+ LDR_NOMEM, /* memory allocation failed */
+ LDR_NOENT, /* Module file does not exist */
+ LDR_NOSUBENT, /* pre-requsite file to be sub-loaded does not exist */
+ LDR_NOSPACE, /* internal module array full */
+ LDR_NOMODOPEN, /* module file could not be opened (check errmin) */
+ LDR_UNKTYPE, /* file is not a recognized module type */
+ LDR_NOLOAD, /* type specific loader failed */
+ LDR_ONCEONLY, /* Module should only be loaded once (not an error) */
+ LDR_NOPORTOPEN, /* could not open port (check errmin) */
+ LDR_NOHARDWARE, /* could not query/initialize the hardware device */
+ LDR_MISMATCH, /* the module didn't match the spec'd requirments */
+ LDR_BADUSAGE, /* LoadModule is called with bad arguments */
+ LDR_INVALID, /* The module doesn't have a valid ModuleData object */
+ LDR_BADOS, /* The module doesn't support the OS */
+ LDR_MODSPECIFIC /* A module-specific error in the SetupProc */
+} LoaderErrorCode;
+
+/*
+ * Some common module classes. The moduleclass can be used to identify
+ * that modules loaded are of the correct type. This is a finer
+ * classification than the ABI classes even though the default set of
+ * classes have the same names. For example, not all modules that require
+ * the video driver ABI are themselves video drivers.
+ */
+#define MOD_CLASS_NONE NULL
+#define MOD_CLASS_VIDEODRV "X.Org Video Driver"
+#define MOD_CLASS_XINPUT "X.Org XInput Driver"
+#define MOD_CLASS_FONT "X.Org Font Renderer"
+#define MOD_CLASS_EXTENSION "X.Org Server Extension"
+
+/* This structure is expected to be returned by the initfunc */
+typedef struct {
+ const char *modname; /* name of module, e.g. "foo" */
+ const char *vendor; /* vendor specific string */
+ CARD32 _modinfo1_; /* constant MODINFOSTRING1/2 to find */
+ CARD32 _modinfo2_; /* infoarea with a binary editor or sign tool */
+ CARD32 xf86version; /* contains XF86_VERSION_CURRENT */
+ CARD8 majorversion; /* module-specific major version */
+ CARD8 minorversion; /* module-specific minor version */
+ CARD16 patchlevel; /* module-specific patch level */
+ const char *abiclass; /* ABI class that the module uses */
+ CARD32 abiversion; /* ABI version */
+ const char *moduleclass; /* module class description */
+ CARD32 checksum[4]; /* contains a digital signature of the */
+ /* version info structure */
+} XF86ModuleVersionInfo;
+
+/*
+ * This structure can be used to callers of LoadModule and LoadSubModule to
+ * specify version and/or ABI requirements.
+ */
+typedef struct {
+ CARD8 majorversion; /* module-specific major version */
+ CARD8 minorversion; /* moudle-specific minor version */
+ CARD16 patchlevel; /* module-specific patch level */
+ const char *abiclass; /* ABI class that the module uses */
+ CARD32 abiversion; /* ABI version */
+ const char *moduleclass; /* module class */
+} XF86ModReqInfo;
+
+/* values to indicate unspecified fields in XF86ModReqInfo. */
+#define MAJOR_UNSPEC 0xFF
+#define MINOR_UNSPEC 0xFF
+#define PATCH_UNSPEC 0xFFFF
+#define ABI_VERS_UNSPEC 0xFFFFFFFF
+
+#define MODULE_VERSION_NUMERIC(maj, min, patch) \
+ ((((maj) & 0xFF) << 24) | (((min) & 0xFF) << 16) | (patch & 0xFFFF))
+#define GET_MODULE_MAJOR_VERSION(vers) (((vers) >> 24) & 0xFF)
+#define GET_MODULE_MINOR_VERSION(vers) (((vers) >> 16) & 0xFF)
+#define GET_MODULE_PATCHLEVEL(vers) ((vers) & 0xFFFF)
+
+#define INITARGS void
+
+/* Prototypes for Loader functions that are exported to modules */
+extern _X_EXPORT void *LoadSubModule(void *, const char *, const char **,
+ const char **, void *,
+ const XF86ModReqInfo *, int *, int *);
+extern _X_EXPORT void UnloadSubModule(void *);
+extern _X_EXPORT void UnloadModule(void *);
+extern _X_EXPORT void *LoaderSymbol(const char *);
+extern _X_EXPORT const char **LoaderListDirs(const char **, const char **);
+extern _X_EXPORT void LoaderFreeDirList(char **);
+extern _X_EXPORT void LoaderErrorMsg(const char *, const char *, int, int);
+extern _X_EXPORT void LoaderGetOS(const char **name, int *major, int *minor,
+ int *teeny);
+extern _X_EXPORT Bool LoaderShouldIgnoreABI(void);
+extern _X_EXPORT int LoaderGetABIVersion(const char *abiclass);
+
+typedef void *(*ModuleSetupProc) (void *, void *, int *, int *);
+typedef void (*ModuleTearDownProc) (void *);
+
+#define MODULESETUPPROTO(func) void *func(void *, void *, int*, int*)
+#define MODULETEARDOWNPROTO(func) void func(void *)
+
+typedef struct {
+ XF86ModuleVersionInfo *vers;
+ ModuleSetupProc setup;
+ ModuleTearDownProc teardown;
+} XF86ModuleData;
+
+#endif /* _XF86STR_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Opt.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Opt.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Opt.h (working copy)
@@ -0,0 +1,158 @@
+
+/*
+ * Copyright (c) 1998-2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+/* Option handling things that ModuleSetup procs can use */
+
+#ifndef _XF86_OPT_H_
+#define _XF86_OPT_H_
+#include "xf86Optionstr.h"
+
+typedef struct {
+ double freq;
+ int units;
+} OptFrequency;
+
+typedef union {
+ unsigned long num;
+ const char *str;
+ double realnum;
+ Bool bool;
+ OptFrequency freq;
+} ValueUnion;
+
+typedef enum {
+ OPTV_NONE = 0,
+ OPTV_INTEGER,
+ OPTV_STRING, /* a non-empty string */
+ OPTV_ANYSTR, /* Any string, including an empty one */
+ OPTV_REAL,
+ OPTV_BOOLEAN,
+ OPTV_PERCENT,
+ OPTV_FREQ
+} OptionValueType;
+
+typedef enum {
+ OPTUNITS_HZ = 1,
+ OPTUNITS_KHZ,
+ OPTUNITS_MHZ
+} OptFreqUnits;
+
+typedef struct {
+ int token;
+ const char *name;
+ OptionValueType type;
+ ValueUnion value;
+ Bool found;
+} OptionInfoRec, *OptionInfoPtr;
+
+extern _X_EXPORT int xf86SetIntOption(XF86OptionPtr optlist, const char *name,
+ int deflt);
+extern _X_EXPORT double xf86SetRealOption(XF86OptionPtr optlist,
+ const char *name, double deflt);
+extern _X_EXPORT char *xf86SetStrOption(XF86OptionPtr optlist, const char *name,
+ const char *deflt);
+extern _X_EXPORT int xf86SetBoolOption(XF86OptionPtr list, const char *name,
+ int deflt);
+extern _X_EXPORT double xf86SetPercentOption(XF86OptionPtr list,
+ const char *name, double deflt);
+extern _X_EXPORT int xf86CheckIntOption(XF86OptionPtr optlist, const char *name,
+ int deflt);
+extern _X_EXPORT double xf86CheckRealOption(XF86OptionPtr optlist,
+ const char *name, double deflt);
+extern _X_EXPORT char *xf86CheckStrOption(XF86OptionPtr optlist,
+ const char *name, const char *deflt);
+extern _X_EXPORT int xf86CheckBoolOption(XF86OptionPtr list, const char *name,
+ int deflt);
+extern _X_EXPORT double xf86CheckPercentOption(XF86OptionPtr list,
+ const char *name, double deflt);
+extern _X_EXPORT XF86OptionPtr xf86AddNewOption(XF86OptionPtr head,
+ const char *name,
+ const char *val);
+extern _X_EXPORT XF86OptionPtr xf86NewOption(char *name, char *value);
+extern _X_EXPORT XF86OptionPtr xf86NextOption(XF86OptionPtr list);
+extern _X_EXPORT XF86OptionPtr xf86OptionListCreate(const char **options,
+ int count, int used);
+extern _X_EXPORT XF86OptionPtr xf86OptionListMerge(XF86OptionPtr head,
+ XF86OptionPtr tail);
+extern _X_EXPORT XF86OptionPtr xf86OptionListDuplicate(XF86OptionPtr list);
+extern _X_EXPORT void xf86OptionListFree(XF86OptionPtr opt);
+extern _X_EXPORT char *xf86OptionName(XF86OptionPtr opt);
+extern _X_EXPORT char *xf86OptionValue(XF86OptionPtr opt);
+extern _X_EXPORT void xf86OptionListReport(XF86OptionPtr parm);
+extern _X_EXPORT XF86OptionPtr xf86FindOption(XF86OptionPtr options,
+ const char *name);
+extern _X_EXPORT const char *xf86FindOptionValue(XF86OptionPtr options,
+ const char *name);
+extern _X_EXPORT void xf86MarkOptionUsed(XF86OptionPtr option);
+extern _X_EXPORT void xf86MarkOptionUsedByName(XF86OptionPtr options,
+ const char *name);
+extern _X_EXPORT Bool xf86CheckIfOptionUsed(XF86OptionPtr option);
+extern _X_EXPORT Bool xf86CheckIfOptionUsedByName(XF86OptionPtr options,
+ const char *name);
+extern _X_EXPORT void xf86ShowUnusedOptions(int scrnIndex,
+ XF86OptionPtr options);
+extern _X_EXPORT void xf86ProcessOptions(int scrnIndex, XF86OptionPtr options,
+ OptionInfoPtr optinfo);
+extern _X_EXPORT OptionInfoPtr xf86TokenToOptinfo(const OptionInfoRec * table,
+ int token);
+extern _X_EXPORT const char *xf86TokenToOptName(const OptionInfoRec * table,
+ int token);
+extern _X_EXPORT Bool xf86IsOptionSet(const OptionInfoRec * table, int token);
+extern _X_EXPORT const char *xf86GetOptValString(const OptionInfoRec * table,
+ int token);
+extern _X_EXPORT Bool xf86GetOptValInteger(const OptionInfoRec * table,
+ int token, int *value);
+extern _X_EXPORT Bool xf86GetOptValULong(const OptionInfoRec * table, int token,
+ unsigned long *value);
+extern _X_EXPORT Bool xf86GetOptValReal(const OptionInfoRec * table, int token,
+ double *value);
+extern _X_EXPORT Bool xf86GetOptValFreq(const OptionInfoRec * table, int token,
+ OptFreqUnits expectedUnits,
+ double *value);
+extern _X_EXPORT Bool xf86GetOptValBool(const OptionInfoRec * table, int token,
+ Bool *value);
+extern _X_EXPORT Bool xf86ReturnOptValBool(const OptionInfoRec * table,
+ int token, Bool def);
+extern _X_EXPORT int xf86NameCmp(const char *s1, const char *s2);
+extern _X_EXPORT char *xf86NormalizeName(const char *s);
+extern _X_EXPORT XF86OptionPtr xf86ReplaceIntOption(XF86OptionPtr optlist,
+ const char *name,
+ const int val);
+extern _X_EXPORT XF86OptionPtr xf86ReplaceRealOption(XF86OptionPtr optlist,
+ const char *name,
+ const double val);
+extern _X_EXPORT XF86OptionPtr xf86ReplaceBoolOption(XF86OptionPtr optlist,
+ const char *name,
+ const Bool val);
+extern _X_EXPORT XF86OptionPtr xf86ReplacePercentOption(XF86OptionPtr optlist,
+ const char *name,
+ const double val);
+extern _X_EXPORT XF86OptionPtr xf86ReplaceStrOption(XF86OptionPtr optlist,
+ const char *name,
+ const char *val);
+#endif
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Optionstr.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Optionstr.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Optionstr.h (working copy)
@@ -0,0 +1,42 @@
+/*
+ * Copyright © 2011 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef XF86OPTIONSTR_H
+#define XF86OPTIONSTR_H
+#include "list.h"
+
+/*
+ * All options are stored using this data type.
+ */
+typedef struct _XF86OptionRec {
+ GenericListRec list;
+ const char *opt_name;
+ const char *opt_val;
+ int opt_used;
+ const char *opt_comment;
+} XF86OptionRec;
+
+typedef struct _InputOption *XF86OptionPtr;
+
+#endif
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Optrec.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Optrec.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Optrec.h (working copy)
@@ -0,0 +1,93 @@
+/*
+ *
+ * Copyright (c) 1997 Metro Link Incorporated
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the Metro Link shall not be
+ * used in advertising or otherwise to promote the sale, use or other dealings
+ * in this Software without prior written authorization from Metro Link.
+ *
+ */
+/*
+ * Copyright (c) 1997-2001 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+/*
+ * This file contains the Option Record that is passed between the Parser,
+ * and Module setup procs.
+ */
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#ifndef _xf86Optrec_h_
+#define _xf86Optrec_h_
+#include <stdio.h>
+#include <string.h>
+#include "xf86Optionstr.h"
+
+#include <X11/Xfuncproto.h>
+
+extern _X_EXPORT XF86OptionPtr xf86addNewOption(XF86OptionPtr head, char *name,
+ char *val);
+extern _X_EXPORT XF86OptionPtr xf86optionListDup(XF86OptionPtr opt);
+extern _X_EXPORT void xf86optionListFree(XF86OptionPtr opt);
+extern _X_EXPORT char *xf86optionName(XF86OptionPtr opt);
+extern _X_EXPORT char *xf86optionValue(XF86OptionPtr opt);
+extern _X_EXPORT XF86OptionPtr xf86newOption(char *name, char *value);
+extern _X_EXPORT XF86OptionPtr xf86nextOption(XF86OptionPtr list);
+extern _X_EXPORT XF86OptionPtr xf86findOption(XF86OptionPtr list,
+ const char *name);
+extern _X_EXPORT const char *xf86findOptionValue(XF86OptionPtr list,
+ const char *name);
+extern _X_EXPORT XF86OptionPtr xf86optionListCreate(const char **options,
+ int count, int used);
+extern _X_EXPORT XF86OptionPtr xf86optionListMerge(XF86OptionPtr head,
+ XF86OptionPtr tail);
+extern _X_EXPORT int xf86nameCompare(const char *s1, const char *s2);
+extern _X_EXPORT char *xf86uLongToString(unsigned long i);
+extern _X_EXPORT XF86OptionPtr xf86parseOption(XF86OptionPtr head);
+extern _X_EXPORT void xf86printOptionList(FILE * fp, XF86OptionPtr list,
+ int tabs);
+
+#endif /* _xf86Optrec_h_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Parser.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Parser.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Parser.h (working copy)
@@ -0,0 +1,468 @@
+/*
+ *
+ * Copyright (c) 1997 Metro Link Incorporated
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the Metro Link shall not be
+ * used in advertising or otherwise to promote the sale, use or other dealings
+ * in this Software without prior written authorization from Metro Link.
+ *
+ */
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+/*
+ * This file contains the external interfaces for the XFree86 configuration
+ * file parser.
+ */
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#ifndef _xf86Parser_h_
+#define _xf86Parser_h_
+
+#include <X11/Xdefs.h>
+#include "xf86Optrec.h"
+#include "list.h"
+
+#define HAVE_PARSER_DECLS
+
+typedef struct {
+ char *file_logfile;
+ char *file_modulepath;
+ char *file_fontpath;
+ char *file_comment;
+ char *file_xkbdir;
+} XF86ConfFilesRec, *XF86ConfFilesPtr;
+
+/* Values for load_type */
+#define XF86_LOAD_MODULE 0
+#define XF86_LOAD_DRIVER 1
+#define XF86_DISABLE_MODULE 2
+
+typedef struct {
+ GenericListRec list;
+ int load_type;
+ const char *load_name;
+ XF86OptionPtr load_opt;
+ char *load_comment;
+ int ignore;
+} XF86LoadRec, *XF86LoadPtr;
+
+typedef struct {
+ XF86LoadPtr mod_load_lst;
+ XF86LoadPtr mod_disable_lst;
+ char *mod_comment;
+} XF86ConfModuleRec, *XF86ConfModulePtr;
+
+#define CONF_IMPLICIT_KEYBOARD "Implicit Core Keyboard"
+
+#define CONF_IMPLICIT_POINTER "Implicit Core Pointer"
+
+#define XF86CONF_PHSYNC 0x0001
+#define XF86CONF_NHSYNC 0x0002
+#define XF86CONF_PVSYNC 0x0004
+#define XF86CONF_NVSYNC 0x0008
+#define XF86CONF_INTERLACE 0x0010
+#define XF86CONF_DBLSCAN 0x0020
+#define XF86CONF_CSYNC 0x0040
+#define XF86CONF_PCSYNC 0x0080
+#define XF86CONF_NCSYNC 0x0100
+#define XF86CONF_HSKEW 0x0200 /* hskew provided */
+#define XF86CONF_BCAST 0x0400
+#define XF86CONF_VSCAN 0x1000
+
+typedef struct {
+ GenericListRec list;
+ const char *ml_identifier;
+ int ml_clock;
+ int ml_hdisplay;
+ int ml_hsyncstart;
+ int ml_hsyncend;
+ int ml_htotal;
+ int ml_vdisplay;
+ int ml_vsyncstart;
+ int ml_vsyncend;
+ int ml_vtotal;
+ int ml_vscan;
+ int ml_flags;
+ int ml_hskew;
+ char *ml_comment;
+} XF86ConfModeLineRec, *XF86ConfModeLinePtr;
+
+typedef struct {
+ GenericListRec list;
+ const char *vp_identifier;
+ XF86OptionPtr vp_option_lst;
+ char *vp_comment;
+} XF86ConfVideoPortRec, *XF86ConfVideoPortPtr;
+
+typedef struct {
+ GenericListRec list;
+ const char *va_identifier;
+ const char *va_vendor;
+ const char *va_board;
+ const char *va_busid;
+ const char *va_driver;
+ XF86OptionPtr va_option_lst;
+ XF86ConfVideoPortPtr va_port_lst;
+ const char *va_fwdref;
+ char *va_comment;
+} XF86ConfVideoAdaptorRec, *XF86ConfVideoAdaptorPtr;
+
+#define CONF_MAX_HSYNC 8
+#define CONF_MAX_VREFRESH 8
+
+typedef struct {
+ float hi, lo;
+} parser_range;
+
+typedef struct {
+ int red, green, blue;
+} parser_rgb;
+
+typedef struct {
+ GenericListRec list;
+ const char *modes_identifier;
+ XF86ConfModeLinePtr mon_modeline_lst;
+ char *modes_comment;
+} XF86ConfModesRec, *XF86ConfModesPtr;
+
+typedef struct {
+ GenericListRec list;
+ const char *ml_modes_str;
+ XF86ConfModesPtr ml_modes;
+} XF86ConfModesLinkRec, *XF86ConfModesLinkPtr;
+
+typedef struct {
+ GenericListRec list;
+ const char *mon_identifier;
+ const char *mon_vendor;
+ char *mon_modelname;
+ int mon_width; /* in mm */
+ int mon_height; /* in mm */
+ XF86ConfModeLinePtr mon_modeline_lst;
+ int mon_n_hsync;
+ parser_range mon_hsync[CONF_MAX_HSYNC];
+ int mon_n_vrefresh;
+ parser_range mon_vrefresh[CONF_MAX_VREFRESH];
+ float mon_gamma_red;
+ float mon_gamma_green;
+ float mon_gamma_blue;
+ XF86OptionPtr mon_option_lst;
+ XF86ConfModesLinkPtr mon_modes_sect_lst;
+ char *mon_comment;
+} XF86ConfMonitorRec, *XF86ConfMonitorPtr;
+
+#define CONF_MAXDACSPEEDS 4
+#define CONF_MAXCLOCKS 128
+
+typedef struct {
+ GenericListRec list;
+ const char *dev_identifier;
+ const char *dev_vendor;
+ const char *dev_board;
+ const char *dev_chipset;
+ const char *dev_busid;
+ const char *dev_card;
+ const char *dev_driver;
+ const char *dev_ramdac;
+ int dev_dacSpeeds[CONF_MAXDACSPEEDS];
+ int dev_videoram;
+ int dev_textclockfreq;
+ unsigned long dev_bios_base;
+ unsigned long dev_mem_base;
+ unsigned long dev_io_base;
+ const char *dev_clockchip;
+ int dev_clocks;
+ int dev_clock[CONF_MAXCLOCKS];
+ int dev_chipid;
+ int dev_chiprev;
+ int dev_irq;
+ int dev_screen;
+ XF86OptionPtr dev_option_lst;
+ char *dev_comment;
+} XF86ConfDeviceRec, *XF86ConfDevicePtr;
+
+typedef struct {
+ GenericListRec list;
+ const char *mode_name;
+} XF86ModeRec, *XF86ModePtr;
+
+typedef struct {
+ GenericListRec list;
+ int disp_frameX0;
+ int disp_frameY0;
+ int disp_virtualX;
+ int disp_virtualY;
+ int disp_depth;
+ int disp_bpp;
+ const char *disp_visual;
+ parser_rgb disp_weight;
+ parser_rgb disp_black;
+ parser_rgb disp_white;
+ XF86ModePtr disp_mode_lst;
+ XF86OptionPtr disp_option_lst;
+ char *disp_comment;
+} XF86ConfDisplayRec, *XF86ConfDisplayPtr;
+
+typedef struct {
+ XF86OptionPtr flg_option_lst;
+ char *flg_comment;
+} XF86ConfFlagsRec, *XF86ConfFlagsPtr;
+
+typedef struct {
+ GenericListRec list;
+ const char *al_adaptor_str;
+ XF86ConfVideoAdaptorPtr al_adaptor;
+} XF86ConfAdaptorLinkRec, *XF86ConfAdaptorLinkPtr;
+
+typedef struct {
+ GenericListRec list;
+ const char *scrn_identifier;
+ const char *scrn_obso_driver;
+ int scrn_defaultdepth;
+ int scrn_defaultbpp;
+ int scrn_defaultfbbpp;
+ const char *scrn_monitor_str;
+ XF86ConfMonitorPtr scrn_monitor;
+ const char *scrn_device_str;
+ XF86ConfDevicePtr scrn_device;
+ XF86ConfAdaptorLinkPtr scrn_adaptor_lst;
+ XF86ConfDisplayPtr scrn_display_lst;
+ XF86OptionPtr scrn_option_lst;
+ char *scrn_comment;
+ int scrn_virtualX, scrn_virtualY;
+} XF86ConfScreenRec, *XF86ConfScreenPtr;
+
+typedef struct {
+ GenericListRec list;
+ char *inp_identifier;
+ char *inp_driver;
+ XF86OptionPtr inp_option_lst;
+ char *inp_comment;
+} XF86ConfInputRec, *XF86ConfInputPtr;
+
+typedef struct {
+ GenericListRec list;
+ XF86ConfInputPtr iref_inputdev;
+ char *iref_inputdev_str;
+ XF86OptionPtr iref_option_lst;
+} XF86ConfInputrefRec, *XF86ConfInputrefPtr;
+
+typedef struct {
+ Bool set;
+ Bool val;
+} xf86TriState;
+
+typedef struct {
+ struct xorg_list entry;
+ char **values;
+} xf86MatchGroup;
+
+typedef struct {
+ GenericListRec list;
+ char *identifier;
+ char *driver;
+ struct xorg_list match_product;
+ struct xorg_list match_vendor;
+ struct xorg_list match_device;
+ struct xorg_list match_os;
+ struct xorg_list match_pnpid;
+ struct xorg_list match_usbid;
+ struct xorg_list match_driver;
+ struct xorg_list match_tag;
+ struct xorg_list match_layout;
+ xf86TriState is_keyboard;
+ xf86TriState is_pointer;
+ xf86TriState is_joystick;
+ xf86TriState is_tablet;
+ xf86TriState is_touchpad;
+ xf86TriState is_touchscreen;
+ XF86OptionPtr option_lst;
+ char *comment;
+} XF86ConfInputClassRec, *XF86ConfInputClassPtr;
+
+/* Values for adj_where */
+#define CONF_ADJ_OBSOLETE -1
+#define CONF_ADJ_ABSOLUTE 0
+#define CONF_ADJ_RIGHTOF 1
+#define CONF_ADJ_LEFTOF 2
+#define CONF_ADJ_ABOVE 3
+#define CONF_ADJ_BELOW 4
+#define CONF_ADJ_RELATIVE 5
+
+typedef struct {
+ GenericListRec list;
+ int adj_scrnum;
+ XF86ConfScreenPtr adj_screen;
+ const char *adj_screen_str;
+ XF86ConfScreenPtr adj_top;
+ const char *adj_top_str;
+ XF86ConfScreenPtr adj_bottom;
+ const char *adj_bottom_str;
+ XF86ConfScreenPtr adj_left;
+ const char *adj_left_str;
+ XF86ConfScreenPtr adj_right;
+ const char *adj_right_str;
+ int adj_where;
+ int adj_x;
+ int adj_y;
+ const char *adj_refscreen;
+} XF86ConfAdjacencyRec, *XF86ConfAdjacencyPtr;
+
+typedef struct {
+ GenericListRec list;
+ const char *inactive_device_str;
+ XF86ConfDevicePtr inactive_device;
+} XF86ConfInactiveRec, *XF86ConfInactivePtr;
+
+typedef struct {
+ GenericListRec list;
+ const char *lay_identifier;
+ XF86ConfAdjacencyPtr lay_adjacency_lst;
+ XF86ConfInactivePtr lay_inactive_lst;
+ XF86ConfInputrefPtr lay_input_lst;
+ XF86OptionPtr lay_option_lst;
+ char *lay_comment;
+} XF86ConfLayoutRec, *XF86ConfLayoutPtr;
+
+typedef struct {
+ GenericListRec list;
+ const char *vs_name;
+ const char *vs_identifier;
+ XF86OptionPtr vs_option_lst;
+ char *vs_comment;
+} XF86ConfVendSubRec, *XF86ConfVendSubPtr;
+
+typedef struct {
+ GenericListRec list;
+ const char *vnd_identifier;
+ XF86OptionPtr vnd_option_lst;
+ XF86ConfVendSubPtr vnd_sub_lst;
+ char *vnd_comment;
+} XF86ConfVendorRec, *XF86ConfVendorPtr;
+
+typedef struct {
+ const char *dri_group_name;
+ int dri_group;
+ int dri_mode;
+ char *dri_comment;
+} XF86ConfDRIRec, *XF86ConfDRIPtr;
+
+typedef struct {
+ XF86OptionPtr ext_option_lst;
+ char *extensions_comment;
+} XF86ConfExtensionsRec, *XF86ConfExtensionsPtr;
+
+typedef struct {
+ XF86ConfFilesPtr conf_files;
+ XF86ConfModulePtr conf_modules;
+ XF86ConfFlagsPtr conf_flags;
+ XF86ConfVideoAdaptorPtr conf_videoadaptor_lst;
+ XF86ConfModesPtr conf_modes_lst;
+ XF86ConfMonitorPtr conf_monitor_lst;
+ XF86ConfDevicePtr conf_device_lst;
+ XF86ConfScreenPtr conf_screen_lst;
+ XF86ConfInputPtr conf_input_lst;
+ XF86ConfInputClassPtr conf_inputclass_lst;
+ XF86ConfLayoutPtr conf_layout_lst;
+ XF86ConfVendorPtr conf_vendor_lst;
+ XF86ConfDRIPtr conf_dri;
+ XF86ConfExtensionsPtr conf_extensions;
+ char *conf_comment;
+} XF86ConfigRec, *XF86ConfigPtr;
+
+typedef struct {
+ int token; /* id of the token */
+ const char *name; /* pointer to the LOWERCASED name */
+} xf86ConfigSymTabRec, *xf86ConfigSymTabPtr;
+
+/*
+ * prototypes for public functions
+ */
+extern void xf86initConfigFiles(void);
+extern char *xf86openConfigFile(const char *path, const char *cmdline,
+ const char *projroot);
+extern char *xf86openConfigDirFiles(const char *path, const char *cmdline,
+ const char *projroot);
+extern void xf86setBuiltinConfig(const char *config[]);
+extern XF86ConfigPtr xf86readConfigFile(void);
+extern void xf86closeConfigFile(void);
+extern void xf86freeConfig(XF86ConfigPtr p);
+extern int xf86writeConfigFile(const char *, XF86ConfigPtr);
+extern _X_EXPORT XF86ConfDevicePtr xf86findDevice(const char *ident,
+ XF86ConfDevicePtr p);
+extern _X_EXPORT XF86ConfLayoutPtr xf86findLayout(const char *name,
+ XF86ConfLayoutPtr list);
+extern _X_EXPORT XF86ConfMonitorPtr xf86findMonitor(const char *ident,
+ XF86ConfMonitorPtr p);
+extern _X_EXPORT XF86ConfModesPtr xf86findModes(const char *ident,
+ XF86ConfModesPtr p);
+extern _X_EXPORT XF86ConfModeLinePtr xf86findModeLine(const char *ident,
+ XF86ConfModeLinePtr p);
+extern _X_EXPORT XF86ConfScreenPtr xf86findScreen(const char *ident,
+ XF86ConfScreenPtr p);
+extern _X_EXPORT XF86ConfInputPtr xf86findInput(const char *ident,
+ XF86ConfInputPtr p);
+extern _X_EXPORT XF86ConfInputPtr xf86findInputByDriver(const char *driver,
+ XF86ConfInputPtr p);
+extern _X_EXPORT XF86ConfVideoAdaptorPtr xf86findVideoAdaptor(const char *ident,
+ XF86ConfVideoAdaptorPtr
+ p);
+extern int xf86layoutAddInputDevices(XF86ConfigPtr config,
+ XF86ConfLayoutPtr layout);
+
+extern _X_EXPORT GenericListPtr xf86addListItem(GenericListPtr head,
+ GenericListPtr c_new);
+extern _X_EXPORT int xf86itemNotSublist(GenericListPtr list_1,
+ GenericListPtr list_2);
+
+extern _X_EXPORT int xf86pathIsAbsolute(const char *path);
+extern _X_EXPORT int xf86pathIsSafe(const char *path);
+extern _X_EXPORT char *xf86addComment(char *cur, const char *add);
+extern _X_EXPORT Bool xf86getBoolValue(Bool *val, const char *str);
+
+#endif /* _xf86Parser_h_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Pci.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Pci.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Pci.h (working copy)
@@ -0,0 +1,259 @@
+/*
+ * Copyright 1998 by Concurrent Computer Corporation
+ *
+ * Permission to use, copy, modify, distribute, and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and that
+ * both that copyright notice and this permission notice appear in
+ * supporting documentation, and that the name of Concurrent Computer
+ * Corporation not be used in advertising or publicity pertaining to
+ * distribution of the software without specific, written prior
+ * permission. Concurrent Computer Corporation makes no representations
+ * about the suitability of this software for any purpose. It is
+ * provided "as is" without express or implied warranty.
+ *
+ * CONCURRENT COMPUTER CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD
+ * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CONCURRENT COMPUTER CORPORATION BE
+ * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ *
+ * Copyright 1998 by Metro Link Incorporated
+ *
+ * Permission to use, copy, modify, distribute, and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and that
+ * both that copyright notice and this permission notice appear in
+ * supporting documentation, and that the name of Metro Link
+ * Incorporated not be used in advertising or publicity pertaining to
+ * distribution of the software without specific, written prior
+ * permission. Metro Link Incorporated makes no representations
+ * about the suitability of this software for any purpose. It is
+ * provided "as is" without express or implied warranty.
+ *
+ * METRO LINK INCORPORATED DISCLAIMS ALL WARRANTIES WITH REGARD
+ * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL METRO LINK INCORPORATED BE
+ * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ *
+ * This file is derived in part from the original xf86_PCI.h that included
+ * following copyright message:
+ *
+ * Copyright 1995 by Robin Cutshaw <robin@XFree86.Org>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the names of the above listed copyright holder(s)
+ * not be used in advertising or publicity pertaining to distribution of
+ * the software without specific, written prior permission. The above listed
+ * copyright holder(s) make(s) no representations about the suitability of this
+ * software for any purpose. It is provided "as is" without express or
+ * implied warranty.
+ *
+ * THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM(S) ALL WARRANTIES WITH REGARD
+ * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
+ * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
+ * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/*
+ * Copyright (c) 1999-2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+/*
+ * This file contains just the public interface to the PCI code.
+ * Drivers should use this file rather than Pci.h.
+ */
+
+#ifndef _XF86PCI_H
+#define _XF86PCI_H 1
+#include <X11/Xarch.h>
+#include <X11/Xfuncproto.h>
+#include "misc.h"
+#include <pciaccess.h>
+
+/*
+ * PCI cfg space definitions (e.g. stuff right out of the PCI spec)
+ */
+
+/* Device identification register */
+#define PCI_ID_REG 0x00
+
+/* Command and status register */
+#define PCI_CMD_STAT_REG 0x04
+#define PCI_CMD_BASE_REG 0x10
+#define PCI_CMD_BIOS_REG 0x30
+#define PCI_CMD_MASK 0xffff
+#define PCI_CMD_IO_ENABLE 0x01
+#define PCI_CMD_MEM_ENABLE 0x02
+#define PCI_CMD_MASTER_ENABLE 0x04
+#define PCI_CMD_SPECIAL_ENABLE 0x08
+#define PCI_CMD_INVALIDATE_ENABLE 0x10
+#define PCI_CMD_PALETTE_ENABLE 0x20
+#define PCI_CMD_PARITY_ENABLE 0x40
+#define PCI_CMD_STEPPING_ENABLE 0x80
+#define PCI_CMD_SERR_ENABLE 0x100
+#define PCI_CMD_BACKTOBACK_ENABLE 0x200
+#define PCI_CMD_BIOS_ENABLE 0x01
+
+/* base class */
+#define PCI_CLASS_REG 0x08
+#define PCI_CLASS_MASK 0xff000000
+#define PCI_CLASS_SHIFT 24
+#define PCI_CLASS_EXTRACT(x) \
+ (((x) & PCI_CLASS_MASK) >> PCI_CLASS_SHIFT)
+
+/* base class values */
+#define PCI_CLASS_PREHISTORIC 0x00
+#define PCI_CLASS_MASS_STORAGE 0x01
+#define PCI_CLASS_NETWORK 0x02
+#define PCI_CLASS_DISPLAY 0x03
+#define PCI_CLASS_MULTIMEDIA 0x04
+#define PCI_CLASS_MEMORY 0x05
+#define PCI_CLASS_BRIDGE 0x06
+#define PCI_CLASS_COMMUNICATIONS 0x07
+#define PCI_CLASS_SYSPERIPH 0x08
+#define PCI_CLASS_INPUT 0x09
+#define PCI_CLASS_DOCKING 0x0a
+#define PCI_CLASS_PROCESSOR 0x0b
+#define PCI_CLASS_SERIALBUS 0x0c
+#define PCI_CLASS_WIRELESS 0x0d
+#define PCI_CLASS_I2O 0x0e
+#define PCI_CLASS_SATELLITE 0x0f
+#define PCI_CLASS_CRYPT 0x10
+#define PCI_CLASS_DATA_ACQUISTION 0x11
+#define PCI_CLASS_UNDEFINED 0xff
+
+/* sub class */
+#define PCI_SUBCLASS_MASK 0x00ff0000
+#define PCI_SUBCLASS_SHIFT 16
+#define PCI_SUBCLASS_EXTRACT(x) \
+ (((x) & PCI_SUBCLASS_MASK) >> PCI_SUBCLASS_SHIFT)
+
+/* Sub class values */
+/* 0x00 prehistoric subclasses */
+#define PCI_SUBCLASS_PREHISTORIC_MISC 0x00
+#define PCI_SUBCLASS_PREHISTORIC_VGA 0x01
+
+/* 0x03 display subclasses */
+#define PCI_SUBCLASS_DISPLAY_VGA 0x00
+#define PCI_SUBCLASS_DISPLAY_XGA 0x01
+#define PCI_SUBCLASS_DISPLAY_MISC 0x80
+
+/* 0x04 multimedia subclasses */
+#define PCI_SUBCLASS_MULTIMEDIA_VIDEO 0x00
+#define PCI_SUBCLASS_MULTIMEDIA_AUDIO 0x01
+#define PCI_SUBCLASS_MULTIMEDIA_MISC 0x80
+
+/* 0x06 bridge subclasses */
+#define PCI_SUBCLASS_BRIDGE_HOST 0x00
+#define PCI_SUBCLASS_BRIDGE_ISA 0x01
+#define PCI_SUBCLASS_BRIDGE_EISA 0x02
+#define PCI_SUBCLASS_BRIDGE_MC 0x03
+#define PCI_SUBCLASS_BRIDGE_PCI 0x04
+#define PCI_SUBCLASS_BRIDGE_PCMCIA 0x05
+#define PCI_SUBCLASS_BRIDGE_NUBUS 0x06
+#define PCI_SUBCLASS_BRIDGE_CARDBUS 0x07
+#define PCI_SUBCLASS_BRIDGE_RACEWAY 0x08
+#define PCI_SUBCLASS_BRIDGE_MISC 0x80
+#define PCI_IF_BRIDGE_PCI_SUBTRACTIVE 0x01
+
+/* 0x0b processor subclasses */
+#define PCI_SUBCLASS_PROCESSOR_386 0x00
+#define PCI_SUBCLASS_PROCESSOR_486 0x01
+#define PCI_SUBCLASS_PROCESSOR_PENTIUM 0x02
+#define PCI_SUBCLASS_PROCESSOR_ALPHA 0x10
+#define PCI_SUBCLASS_PROCESSOR_POWERPC 0x20
+#define PCI_SUBCLASS_PROCESSOR_MIPS 0x30
+#define PCI_SUBCLASS_PROCESSOR_COPROC 0x40
+
+/* PCI-PCI bridge mapping registers */
+#define PCI_PCI_BRIDGE_BUS_REG 0x18
+#define PCI_SUBORDINATE_BUS_MASK 0x00ff0000
+#define PCI_SECONDARY_BUS_MASK 0x0000ff00
+#define PCI_PRIMARY_BUS_MASK 0x000000ff
+
+#define PCI_PCI_BRIDGE_IO_REG 0x1c
+#define PCI_PCI_BRIDGE_MEM_REG 0x20
+#define PCI_PCI_BRIDGE_PMEM_REG 0x24
+
+#define PCI_PCI_BRIDGE_CONTROL_REG 0x3E
+#define PCI_PCI_BRIDGE_PARITY_EN 0x01
+#define PCI_PCI_BRIDGE_SERR_EN 0x02
+#define PCI_PCI_BRIDGE_ISA_EN 0x04
+#define PCI_PCI_BRIDGE_VGA_EN 0x08
+#define PCI_PCI_BRIDGE_MASTER_ABORT_EN 0x20
+#define PCI_PCI_BRIDGE_SECONDARY_RESET 0x40
+#define PCI_PCI_BRIDGE_FAST_B2B_EN 0x80
+
+/* Subsystem identification register */
+#define PCI_SUBSYSTEM_ID_REG 0x2c
+
+/* User defined cfg space regs */
+#define PCI_REG_USERCONFIG 0x40
+#define PCI_OPTION_REG 0x40
+
+/*
+ * Typedefs, etc...
+ */
+
+/* Primitive Types */
+typedef unsigned long ADDRESS; /* Memory/PCI address */
+typedef unsigned long IOADDRESS _X_DEPRECATED; /* Must be large enough for a pointer */
+typedef CARD32 PCITAG _X_DEPRECATED;
+
+typedef enum {
+ PCI_MEM,
+ PCI_MEM_SIZE,
+ PCI_MEM_SPARSE_BASE,
+ PCI_MEM_SPARSE_MASK,
+ PCI_IO,
+ PCI_IO_SIZE,
+ PCI_IO_SPARSE_BASE,
+ PCI_IO_SPARSE_MASK
+} PciAddrType;
+
+/* Public PCI access functions */
+extern _X_EXPORT Bool xf86scanpci(void);
+
+/* Domain access functions. Some of these probably shouldn't be public */
+extern _X_EXPORT struct pci_io_handle *xf86MapLegacyIO(struct pci_device *dev);
+extern _X_EXPORT void xf86UnmapLegacyIO(struct pci_device *,
+ struct pci_io_handle *);
+
+#endif /* _XF86PCI_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86PciInfo.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86PciInfo.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86PciInfo.h (working copy)
@@ -0,0 +1,732 @@
+
+/*
+ * Copyright (c) 1995-2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+/*
+ * This file contains macros for the PCI Vendor and Device IDs for video
+ * cards plus a few other things that are needed in drivers or elsewhere.
+ * This information is used in several ways:
+ * 1. It is used by drivers and/or other code.
+ * 2. It is used by the pciid2c.pl script to determine what vendor data to
+ * include in the pcidata module that the X server loads.
+ * 3. A side-effect of 2. affects how config-generation works for
+ * otherwise "unknown" cards.
+ *
+ * Don't add entries here for vendors that don't make video cards,
+ * or for non-video devices unless they're needed by a driver or elsewhere.
+ * A comprehensive set of PCI vendor, device and subsystem data is
+ * auto-generated from the ../etc/pci.ids file using the pciids2c.pl script,
+ * and is used in scanpci utility. Don't modify the pci.ids file. If
+ * new/corrected entries are required, add them to ../etc/extrapci.ids.
+ */
+
+#ifndef _XF86_PCIINFO_H
+#define _XF86_PCIINFO_H
+
+#warning "xf86PciInfo.h is deprecated. For greater compatibility, drivers should include necessary PCI IDs locally rather than relying on this file from xorg-server."
+
+/* PCI Pseudo Vendor */
+#define PCI_VENDOR_GENERIC 0x00FF
+
+#define PCI_VENDOR_REAL3D 0x003D
+#define PCI_VENDOR_COMPAQ 0x0E11
+#define PCI_VENDOR_ATI 0x1002
+#define PCI_VENDOR_AVANCE 0x1005
+#define PCI_VENDOR_TSENG 0x100C
+#define PCI_VENDOR_NS 0x100B
+#define PCI_VENDOR_WEITEK 0x100E
+#define PCI_VENDOR_VIDEOLOGIC 0x1010
+#define PCI_VENDOR_DIGITAL 0x1011
+#define PCI_VENDOR_CIRRUS 0x1013
+#define PCI_VENDOR_AMD 0x1022
+#define PCI_VENDOR_TRIDENT 0x1023
+#define PCI_VENDOR_ALI 0x1025
+#define PCI_VENDOR_DELL 0x1028
+#define PCI_VENDOR_MATROX 0x102B
+#define PCI_VENDOR_CHIPSTECH 0x102C
+#define PCI_VENDOR_MIRO 0x1031
+#define PCI_VENDOR_NEC 0x1033
+#define PCI_VENDOR_SIS 0x1039
+#define PCI_VENDOR_HP 0x103C
+#define PCI_VENDOR_SGS 0x104A
+#define PCI_VENDOR_TI 0x104C
+#define PCI_VENDOR_SONY 0x104D
+#define PCI_VENDOR_OAK 0x104E
+#define PCI_VENDOR_MOTOROLA 0x1057
+#define PCI_VENDOR_NUMNINE 0x105D
+#define PCI_VENDOR_CYRIX 0x1078
+#define PCI_VENDOR_SUN 0x108E
+#define PCI_VENDOR_DIAMOND 0x1092
+#define PCI_VENDOR_BROOKTREE 0x109E
+#define PCI_VENDOR_NEOMAGIC 0x10C8
+#define PCI_VENDOR_NVIDIA 0x10DE
+#define PCI_VENDOR_IMS 0x10E0
+#define PCI_VENDOR_INTEGRAPHICS 0x10EA
+#define PCI_VENDOR_ALLIANCE 0x1142
+#define PCI_VENDOR_RENDITION 0x1163
+#define PCI_VENDOR_3DFX 0x121A
+#define PCI_VENDOR_SMI 0x126F
+#define PCI_VENDOR_TRITECH 0x1292
+#define PCI_VENDOR_NVIDIA_SGS 0x12D2
+#define PCI_VENDOR_VMWARE 0x15AD
+#define PCI_VENDOR_AST 0x1A03
+#define PCI_VENDOR_3DLABS 0x3D3D
+#define PCI_VENDOR_AVANCE_2 0x4005
+#define PCI_VENDOR_HERCULES 0x4843
+#define PCI_VENDOR_S3 0x5333
+#define PCI_VENDOR_INTEL 0x8086
+#define PCI_VENDOR_ARK 0xEDD8
+
+/* Generic */
+#define PCI_CHIP_VGA 0x0000
+#define PCI_CHIP_8514 0x0001
+
+/* Real 3D */
+#define PCI_CHIP_I740_PCI 0x00D1
+
+/* Compaq */
+#define PCI_CHIP_QV1280 0x3033
+
+/* ATI */
+#define PCI_CHIP_RV380_3150 0x3150
+#define PCI_CHIP_RV380_3151 0x3151
+#define PCI_CHIP_RV380_3152 0x3152
+#define PCI_CHIP_RV380_3153 0x3153
+#define PCI_CHIP_RV380_3154 0x3154
+#define PCI_CHIP_RV380_3156 0x3156
+#define PCI_CHIP_RV380_3E50 0x3E50
+#define PCI_CHIP_RV380_3E51 0x3E51
+#define PCI_CHIP_RV380_3E52 0x3E52
+#define PCI_CHIP_RV380_3E53 0x3E53
+#define PCI_CHIP_RV380_3E54 0x3E54
+#define PCI_CHIP_RV380_3E56 0x3E56
+#define PCI_CHIP_RS100_4136 0x4136
+#define PCI_CHIP_RS200_4137 0x4137
+#define PCI_CHIP_R300_AD 0x4144
+#define PCI_CHIP_R300_AE 0x4145
+#define PCI_CHIP_R300_AF 0x4146
+#define PCI_CHIP_R300_AG 0x4147
+#define PCI_CHIP_R350_AH 0x4148
+#define PCI_CHIP_R350_AI 0x4149
+#define PCI_CHIP_R350_AJ 0x414A
+#define PCI_CHIP_R350_AK 0x414B
+#define PCI_CHIP_RV350_AP 0x4150
+#define PCI_CHIP_RV350_AQ 0x4151
+#define PCI_CHIP_RV360_AR 0x4152
+#define PCI_CHIP_RV350_AS 0x4153
+#define PCI_CHIP_RV350_AT 0x4154
+#define PCI_CHIP_RV350_4155 0x4155
+#define PCI_CHIP_RV350_AV 0x4156
+#define PCI_CHIP_MACH32 0x4158
+#define PCI_CHIP_RS250_4237 0x4237
+#define PCI_CHIP_R200_BB 0x4242
+#define PCI_CHIP_R200_BC 0x4243
+#define PCI_CHIP_RS100_4336 0x4336
+#define PCI_CHIP_RS200_4337 0x4337
+#define PCI_CHIP_MACH64CT 0x4354
+#define PCI_CHIP_MACH64CX 0x4358
+#define PCI_CHIP_RS250_4437 0x4437
+#define PCI_CHIP_MACH64ET 0x4554
+#define PCI_CHIP_MACH64GB 0x4742
+#define PCI_CHIP_MACH64GD 0x4744
+#define PCI_CHIP_MACH64GI 0x4749
+#define PCI_CHIP_MACH64GL 0x474C
+#define PCI_CHIP_MACH64GM 0x474D
+#define PCI_CHIP_MACH64GN 0x474E
+#define PCI_CHIP_MACH64GO 0x474F
+#define PCI_CHIP_MACH64GP 0x4750
+#define PCI_CHIP_MACH64GQ 0x4751
+#define PCI_CHIP_MACH64GR 0x4752
+#define PCI_CHIP_MACH64GS 0x4753
+#define PCI_CHIP_MACH64GT 0x4754
+#define PCI_CHIP_MACH64GU 0x4755
+#define PCI_CHIP_MACH64GV 0x4756
+#define PCI_CHIP_MACH64GW 0x4757
+#define PCI_CHIP_MACH64GX 0x4758
+#define PCI_CHIP_MACH64GY 0x4759
+#define PCI_CHIP_MACH64GZ 0x475A
+#define PCI_CHIP_RV250_Id 0x4964
+#define PCI_CHIP_RV250_Ie 0x4965
+#define PCI_CHIP_RV250_If 0x4966
+#define PCI_CHIP_RV250_Ig 0x4967
+#define PCI_CHIP_R420_JH 0x4A48
+#define PCI_CHIP_R420_JI 0x4A49
+#define PCI_CHIP_R420_JJ 0x4A4A
+#define PCI_CHIP_R420_JK 0x4A4B
+#define PCI_CHIP_R420_JL 0x4A4C
+#define PCI_CHIP_R420_JM 0x4A4D
+#define PCI_CHIP_R420_JN 0x4A4E
+#define PCI_CHIP_R420_4A4F 0x4A4F
+#define PCI_CHIP_R420_JP 0x4A50
+#define PCI_CHIP_R420_4A54 0x4A54
+#define PCI_CHIP_R481_4B49 0x4B49
+#define PCI_CHIP_R481_4B4A 0x4B4A
+#define PCI_CHIP_R481_4B4B 0x4B4B
+#define PCI_CHIP_R481_4B4C 0x4B4C
+#define PCI_CHIP_MACH64LB 0x4C42
+#define PCI_CHIP_MACH64LD 0x4C44
+#define PCI_CHIP_RAGE128LE 0x4C45
+#define PCI_CHIP_RAGE128LF 0x4C46
+#define PCI_CHIP_MACH64LG 0x4C47
+#define PCI_CHIP_MACH64LI 0x4C49
+#define PCI_CHIP_MACH64LM 0x4C4D
+#define PCI_CHIP_MACH64LN 0x4C4E
+#define PCI_CHIP_MACH64LP 0x4C50
+#define PCI_CHIP_MACH64LQ 0x4C51
+#define PCI_CHIP_MACH64LR 0x4C52
+#define PCI_CHIP_MACH64LS 0x4C53
+#define PCI_CHIP_RADEON_LW 0x4C57
+#define PCI_CHIP_RADEON_LX 0x4C58
+#define PCI_CHIP_RADEON_LY 0x4C59
+#define PCI_CHIP_RADEON_LZ 0x4C5A
+#define PCI_CHIP_RV250_Ld 0x4C64
+#define PCI_CHIP_RV250_Le 0x4C65
+#define PCI_CHIP_RV250_Lf 0x4C66
+#define PCI_CHIP_RV250_Lg 0x4C67
+#define PCI_CHIP_RV250_Ln 0x4C6E
+#define PCI_CHIP_RAGE128MF 0x4D46
+#define PCI_CHIP_RAGE128ML 0x4D4C
+#define PCI_CHIP_R300_ND 0x4E44
+#define PCI_CHIP_R300_NE 0x4E45
+#define PCI_CHIP_R300_NF 0x4E46
+#define PCI_CHIP_R300_NG 0x4E47
+#define PCI_CHIP_R350_NH 0x4E48
+#define PCI_CHIP_R350_NI 0x4E49
+#define PCI_CHIP_R360_NJ 0x4E4A
+#define PCI_CHIP_R350_NK 0x4E4B
+#define PCI_CHIP_RV350_NP 0x4E50
+#define PCI_CHIP_RV350_NQ 0x4E51
+#define PCI_CHIP_RV350_NR 0x4E52
+#define PCI_CHIP_RV350_NS 0x4E53
+#define PCI_CHIP_RV350_NT 0x4E54
+#define PCI_CHIP_RV350_NV 0x4E56
+#define PCI_CHIP_RAGE128PA 0x5041
+#define PCI_CHIP_RAGE128PB 0x5042
+#define PCI_CHIP_RAGE128PC 0x5043
+#define PCI_CHIP_RAGE128PD 0x5044
+#define PCI_CHIP_RAGE128PE 0x5045
+#define PCI_CHIP_RAGE128PF 0x5046
+#define PCI_CHIP_RAGE128PG 0x5047
+#define PCI_CHIP_RAGE128PH 0x5048
+#define PCI_CHIP_RAGE128PI 0x5049
+#define PCI_CHIP_RAGE128PJ 0x504A
+#define PCI_CHIP_RAGE128PK 0x504B
+#define PCI_CHIP_RAGE128PL 0x504C
+#define PCI_CHIP_RAGE128PM 0x504D
+#define PCI_CHIP_RAGE128PN 0x504E
+#define PCI_CHIP_RAGE128PO 0x504F
+#define PCI_CHIP_RAGE128PP 0x5050
+#define PCI_CHIP_RAGE128PQ 0x5051
+#define PCI_CHIP_RAGE128PR 0x5052
+#define PCI_CHIP_RAGE128PS 0x5053
+#define PCI_CHIP_RAGE128PT 0x5054
+#define PCI_CHIP_RAGE128PU 0x5055
+#define PCI_CHIP_RAGE128PV 0x5056
+#define PCI_CHIP_RAGE128PW 0x5057
+#define PCI_CHIP_RAGE128PX 0x5058
+#define PCI_CHIP_RADEON_QD 0x5144
+#define PCI_CHIP_RADEON_QE 0x5145
+#define PCI_CHIP_RADEON_QF 0x5146
+#define PCI_CHIP_RADEON_QG 0x5147
+#define PCI_CHIP_R200_QH 0x5148
+#define PCI_CHIP_R200_QI 0x5149
+#define PCI_CHIP_R200_QJ 0x514A
+#define PCI_CHIP_R200_QK 0x514B
+#define PCI_CHIP_R200_QL 0x514C
+#define PCI_CHIP_R200_QM 0x514D
+#define PCI_CHIP_R200_QN 0x514E
+#define PCI_CHIP_R200_QO 0x514F
+#define PCI_CHIP_RV200_QW 0x5157
+#define PCI_CHIP_RV200_QX 0x5158
+#define PCI_CHIP_RV100_QY 0x5159
+#define PCI_CHIP_RV100_QZ 0x515A
+#define PCI_CHIP_RN50_515E 0x515E
+#define PCI_CHIP_RAGE128RE 0x5245
+#define PCI_CHIP_RAGE128RF 0x5246
+#define PCI_CHIP_RAGE128RG 0x5247
+#define PCI_CHIP_RAGE128RK 0x524B
+#define PCI_CHIP_RAGE128RL 0x524C
+#define PCI_CHIP_RAGE128SE 0x5345
+#define PCI_CHIP_RAGE128SF 0x5346
+#define PCI_CHIP_RAGE128SG 0x5347
+#define PCI_CHIP_RAGE128SH 0x5348
+#define PCI_CHIP_RAGE128SK 0x534B
+#define PCI_CHIP_RAGE128SL 0x534C
+#define PCI_CHIP_RAGE128SM 0x534D
+#define PCI_CHIP_RAGE128SN 0x534E
+#define PCI_CHIP_RAGE128TF 0x5446
+#define PCI_CHIP_RAGE128TL 0x544C
+#define PCI_CHIP_RAGE128TR 0x5452
+#define PCI_CHIP_RAGE128TS 0x5453
+#define PCI_CHIP_RAGE128TT 0x5454
+#define PCI_CHIP_RAGE128TU 0x5455
+#define PCI_CHIP_RV370_5460 0x5460
+#define PCI_CHIP_RV370_5461 0x5461
+#define PCI_CHIP_RV370_5462 0x5462
+#define PCI_CHIP_RV370_5463 0x5463
+#define PCI_CHIP_RV370_5464 0x5464
+#define PCI_CHIP_RV370_5465 0x5465
+#define PCI_CHIP_RV370_5466 0x5466
+#define PCI_CHIP_RV370_5467 0x5467
+#define PCI_CHIP_R423_UH 0x5548
+#define PCI_CHIP_R423_UI 0x5549
+#define PCI_CHIP_R423_UJ 0x554A
+#define PCI_CHIP_R423_UK 0x554B
+#define PCI_CHIP_R430_554C 0x554C
+#define PCI_CHIP_R430_554D 0x554D
+#define PCI_CHIP_R430_554E 0x554E
+#define PCI_CHIP_R430_554F 0x554F
+#define PCI_CHIP_R423_5550 0x5550
+#define PCI_CHIP_R423_UQ 0x5551
+#define PCI_CHIP_R423_UR 0x5552
+#define PCI_CHIP_R423_UT 0x5554
+#define PCI_CHIP_RV410_564A 0x564A
+#define PCI_CHIP_RV410_564B 0x564B
+#define PCI_CHIP_RV410_564F 0x564F
+#define PCI_CHIP_RV410_5652 0x5652
+#define PCI_CHIP_RV410_5653 0x5653
+#define PCI_CHIP_MACH64VT 0x5654
+#define PCI_CHIP_MACH64VU 0x5655
+#define PCI_CHIP_MACH64VV 0x5656
+#define PCI_CHIP_RS300_5834 0x5834
+#define PCI_CHIP_RS300_5835 0x5835
+#define PCI_CHIP_RS300_5836 0x5836
+#define PCI_CHIP_RS300_5837 0x5837
+#define PCI_CHIP_RS480_5954 0x5954
+#define PCI_CHIP_RS480_5955 0x5955
+#define PCI_CHIP_RV280_5960 0x5960
+#define PCI_CHIP_RV280_5961 0x5961
+#define PCI_CHIP_RV280_5962 0x5962
+#define PCI_CHIP_RV280_5964 0x5964
+#define PCI_CHIP_RV280_5965 0x5965
+#define PCI_CHIP_RN50_5969 0x5969
+#define PCI_CHIP_RS482_5974 0x5974
+#define PCI_CHIP_RS482_5975 0x5975
+#define PCI_CHIP_RS400_5A41 0x5A41
+#define PCI_CHIP_RS400_5A42 0x5A42
+#define PCI_CHIP_RC410_5A61 0x5A61
+#define PCI_CHIP_RC410_5A62 0x5A62
+#define PCI_CHIP_RV370_5B60 0x5B60
+#define PCI_CHIP_RV370_5B61 0x5B61
+#define PCI_CHIP_RV370_5B62 0x5B62
+#define PCI_CHIP_RV370_5B63 0x5B63
+#define PCI_CHIP_RV370_5B64 0x5B64
+#define PCI_CHIP_RV370_5B65 0x5B65
+#define PCI_CHIP_RV370_5B66 0x5B66
+#define PCI_CHIP_RV370_5B67 0x5B67
+#define PCI_CHIP_RV280_5C61 0x5C61
+#define PCI_CHIP_RV280_5C63 0x5C63
+#define PCI_CHIP_R430_5D48 0x5D48
+#define PCI_CHIP_R430_5D49 0x5D49
+#define PCI_CHIP_R430_5D4A 0x5D4A
+#define PCI_CHIP_R480_5D4C 0x5D4C
+#define PCI_CHIP_R480_5D4D 0x5D4D
+#define PCI_CHIP_R480_5D4E 0x5D4E
+#define PCI_CHIP_R480_5D4F 0x5D4F
+#define PCI_CHIP_R480_5D50 0x5D50
+#define PCI_CHIP_R480_5D52 0x5D52
+#define PCI_CHIP_R423_5D57 0x5D57
+#define PCI_CHIP_RV410_5E48 0x5E48
+#define PCI_CHIP_RV410_5E4A 0x5E4A
+#define PCI_CHIP_RV410_5E4B 0x5E4B
+#define PCI_CHIP_RV410_5E4C 0x5E4C
+#define PCI_CHIP_RV410_5E4D 0x5E4D
+#define PCI_CHIP_RV410_5E4F 0x5E4F
+#define PCI_CHIP_RS350_7834 0x7834
+#define PCI_CHIP_RS350_7835 0x7835
+
+/* ASPEED Technology (AST) */
+#define PCI_CHIP_AST2000 0x2000
+
+/* Avance Logic */
+#define PCI_CHIP_ALG2064 0x2064
+#define PCI_CHIP_ALG2301 0x2301
+#define PCI_CHIP_ALG2501 0x2501
+
+/* Tseng */
+#define PCI_CHIP_ET4000_W32P_A 0x3202
+#define PCI_CHIP_ET4000_W32P_B 0x3205
+#define PCI_CHIP_ET4000_W32P_D 0x3206
+#define PCI_CHIP_ET4000_W32P_C 0x3207
+#define PCI_CHIP_ET6000 0x3208
+#define PCI_CHIP_ET6300 0x4702
+
+/* Weitek */
+#define PCI_CHIP_P9000 0x9001
+#define PCI_CHIP_P9100 0x9100
+
+/* Digital */
+#define PCI_CHIP_DC21050 0x0001
+#define PCI_CHIP_DEC21030 0x0004
+#define PCI_CHIP_TGA2 0x000D
+
+/* Cirrus Logic */
+#define PCI_CHIP_GD7548 0x0038
+#define PCI_CHIP_GD7555 0x0040
+#define PCI_CHIP_GD5430 0x00A0
+#define PCI_CHIP_GD5434_4 0x00A4
+#define PCI_CHIP_GD5434_8 0x00A8
+#define PCI_CHIP_GD5436 0x00AC
+#define PCI_CHIP_GD5446 0x00B8
+#define PCI_CHIP_GD5480 0x00BC
+#define PCI_CHIP_GD5462 0x00D0
+#define PCI_CHIP_GD5464 0x00D4
+#define PCI_CHIP_GD5464BD 0x00D5
+#define PCI_CHIP_GD5465 0x00D6
+#define PCI_CHIP_6729 0x1100
+#define PCI_CHIP_6832 0x1110
+#define PCI_CHIP_GD7542 0x1200
+#define PCI_CHIP_GD7543 0x1202
+#define PCI_CHIP_GD7541 0x1204
+
+/* AMD */
+#define PCI_CHIP_AMD761 0x700E
+
+/* Trident */
+#define PCI_CHIP_2100 0x2100
+#define PCI_CHIP_8400 0x8400
+#define PCI_CHIP_8420 0x8420
+#define PCI_CHIP_8500 0x8500
+#define PCI_CHIP_8520 0x8520
+#define PCI_CHIP_8600 0x8600
+#define PCI_CHIP_8620 0x8620
+#define PCI_CHIP_8820 0x8820
+#define PCI_CHIP_9320 0x9320
+#define PCI_CHIP_9388 0x9388
+#define PCI_CHIP_9397 0x9397
+#define PCI_CHIP_939A 0x939A
+#define PCI_CHIP_9420 0x9420
+#define PCI_CHIP_9440 0x9440
+#define PCI_CHIP_9520 0x9520
+#define PCI_CHIP_9525 0x9525
+#define PCI_CHIP_9540 0x9540
+#define PCI_CHIP_9660 0x9660
+#define PCI_CHIP_9750 0x9750
+#define PCI_CHIP_9850 0x9850
+#define PCI_CHIP_9880 0x9880
+#define PCI_CHIP_9910 0x9910
+
+/* ALI */
+#define PCI_CHIP_M1435 0x1435
+
+/* Matrox */
+#define PCI_CHIP_MGA2085 0x0518
+#define PCI_CHIP_MGA2064 0x0519
+#define PCI_CHIP_MGA1064 0x051A
+#define PCI_CHIP_MGA2164 0x051B
+#define PCI_CHIP_MGA2164_AGP 0x051F
+#define PCI_CHIP_MGAG200_PCI 0x0520
+#define PCI_CHIP_MGAG200 0x0521
+#define PCI_CHIP_MGAG400 0x0525
+#define PCI_CHIP_MGAG550 0x2527
+#define PCI_CHIP_IMPRESSION 0x0D10
+#define PCI_CHIP_MGAG100_PCI 0x1000
+#define PCI_CHIP_MGAG100 0x1001
+
+#define PCI_CARD_G400_TH 0x2179
+#define PCI_CARD_MILL_G200_SD 0xFF00
+#define PCI_CARD_PROD_G100_SD 0xFF01
+#define PCI_CARD_MYST_G200_SD 0xFF02
+#define PCI_CARD_MILL_G200_SG 0xFF03
+#define PCI_CARD_MARV_G200_SD 0xFF04
+
+/* Chips & Tech */
+#define PCI_CHIP_65545 0x00D8
+#define PCI_CHIP_65548 0x00DC
+#define PCI_CHIP_65550 0x00E0
+#define PCI_CHIP_65554 0x00E4
+#define PCI_CHIP_65555 0x00E5
+#define PCI_CHIP_68554 0x00F4
+#define PCI_CHIP_69000 0x00C0
+#define PCI_CHIP_69030 0x0C30
+
+/* Miro */
+#define PCI_CHIP_ZR36050 0x5601
+
+/* NEC */
+#define PCI_CHIP_POWER_VR 0x0046
+
+/* SiS */
+#define PCI_CHIP_SG86C201 0x0001
+#define PCI_CHIP_SG86C202 0x0002
+#define PCI_CHIP_SG85C503 0x0008
+#define PCI_CHIP_SIS5597 0x0200
+/* Agregado por Carlos Duclos & Manuel Jander */
+#define PCI_CHIP_SIS82C204 0x0204
+#define PCI_CHIP_SG86C205 0x0205
+#define PCI_CHIP_SG86C215 0x0215
+#define PCI_CHIP_SG86C225 0x0225
+#define PCI_CHIP_85C501 0x0406
+#define PCI_CHIP_85C496 0x0496
+#define PCI_CHIP_85C601 0x0601
+#define PCI_CHIP_85C5107 0x5107
+#define PCI_CHIP_85C5511 0x5511
+#define PCI_CHIP_85C5513 0x5513
+#define PCI_CHIP_SIS5571 0x5571
+#define PCI_CHIP_SIS5597_2 0x5597
+#define PCI_CHIP_SIS530 0x6306
+#define PCI_CHIP_SIS6326 0x6326
+#define PCI_CHIP_SIS7001 0x7001
+#define PCI_CHIP_SIS300 0x0300
+#define PCI_CHIP_SIS315H 0x0310
+#define PCI_CHIP_SIS315PRO 0x0325
+#define PCI_CHIP_SIS330 0x0330
+#define PCI_CHIP_SIS630 0x6300
+#define PCI_CHIP_SIS540 0x5300
+#define PCI_CHIP_SIS550 0x5315
+#define PCI_CHIP_SIS650 0x6325
+#define PCI_CHIP_SIS730 0x7300
+
+/* Hewlett-Packard */
+#define PCI_CHIP_ELROY 0x1054
+#define PCI_CHIP_ZX1_SBA 0x1229
+#define PCI_CHIP_ZX1_IOC 0x122A
+#define PCI_CHIP_ZX1_LBA 0x122E /* a.k.a. Mercury */
+#define PCI_CHIP_ZX1_AGP8 0x12B4 /* a.k.a. QuickSilver */
+#define PCI_CHIP_ZX2_LBA 0x12EE
+#define PCI_CHIP_ZX2_SBA 0x4030
+#define PCI_CHIP_ZX2_IOC 0x4031
+#define PCI_CHIP_ZX2_PCIE 0x4037
+
+/* SGS */
+#define PCI_CHIP_STG2000 0x0008
+#define PCI_CHIP_STG1764 0x0009
+#define PCI_CHIP_KYROII 0x0010
+
+/* Texas Instruments */
+#define PCI_CHIP_TI_PERMEDIA 0x3D04
+#define PCI_CHIP_TI_PERMEDIA2 0x3D07
+
+/* Oak */
+#define PCI_CHIP_OTI107 0x0107
+
+/* Number Nine */
+#define PCI_CHIP_I128 0x2309
+#define PCI_CHIP_I128_2 0x2339
+#define PCI_CHIP_I128_T2R 0x493D
+#define PCI_CHIP_I128_T2R4 0x5348
+
+/* Sun */
+#define PCI_CHIP_EBUS 0x1000
+#define PCI_CHIP_HAPPY_MEAL 0x1001
+#define PCI_CHIP_SIMBA 0x5000
+#define PCI_CHIP_PSYCHO 0x8000
+#define PCI_CHIP_SCHIZO 0x8001
+#define PCI_CHIP_SABRE 0xA000
+#define PCI_CHIP_HUMMINGBIRD 0xA001
+
+/* BrookTree */
+#define PCI_CHIP_BT848 0x0350
+#define PCI_CHIP_BT849 0x0351
+
+/* NVIDIA */
+#define PCI_CHIP_NV1 0x0008
+#define PCI_CHIP_DAC64 0x0009
+#define PCI_CHIP_TNT 0x0020
+#define PCI_CHIP_TNT2 0x0028
+#define PCI_CHIP_UTNT2 0x0029
+#define PCI_CHIP_VTNT2 0x002C
+#define PCI_CHIP_UVTNT2 0x002D
+#define PCI_CHIP_ITNT2 0x00A0
+#define PCI_CHIP_GEFORCE_256 0x0100
+#define PCI_CHIP_GEFORCE_DDR 0x0101
+#define PCI_CHIP_QUADRO 0x0103
+#define PCI_CHIP_GEFORCE2_MX 0x0110
+#define PCI_CHIP_GEFORCE2_MX_100 0x0111
+#define PCI_CHIP_GEFORCE2_GO 0x0112
+#define PCI_CHIP_QUADRO2_MXR 0x0113
+#define PCI_CHIP_GEFORCE2_GTS 0x0150
+#define PCI_CHIP_GEFORCE2_TI 0x0151
+#define PCI_CHIP_GEFORCE2_ULTRA 0x0152
+#define PCI_CHIP_QUADRO2_PRO 0x0153
+#define PCI_CHIP_GEFORCE4_MX_460 0x0170
+#define PCI_CHIP_GEFORCE4_MX_440 0x0171
+#define PCI_CHIP_GEFORCE4_MX_420 0x0172
+#define PCI_CHIP_GEFORCE4_440_GO 0x0174
+#define PCI_CHIP_GEFORCE4_420_GO 0x0175
+#define PCI_CHIP_GEFORCE4_420_GO_M32 0x0176
+#define PCI_CHIP_QUADRO4_500XGL 0x0178
+#define PCI_CHIP_GEFORCE4_440_GO_M64 0x0179
+#define PCI_CHIP_QUADRO4_200 0x017A
+#define PCI_CHIP_QUADRO4_550XGL 0x017B
+#define PCI_CHIP_QUADRO4_500_GOGL 0x017C
+#define PCI_CHIP_IGEFORCE2 0x01A0
+#define PCI_CHIP_GEFORCE3 0x0200
+#define PCI_CHIP_GEFORCE3_TI_200 0x0201
+#define PCI_CHIP_GEFORCE3_TI_500 0x0202
+#define PCI_CHIP_QUADRO_DCC 0x0203
+#define PCI_CHIP_GEFORCE4_TI_4600 0x0250
+#define PCI_CHIP_GEFORCE4_TI_4400 0x0251
+#define PCI_CHIP_GEFORCE4_TI_4200 0x0253
+#define PCI_CHIP_QUADRO4_900XGL 0x0258
+#define PCI_CHIP_QUADRO4_750XGL 0x0259
+#define PCI_CHIP_QUADRO4_700XGL 0x025B
+
+/* NVIDIA & SGS */
+#define PCI_CHIP_RIVA128 0x0018
+
+/* IMS */
+#define PCI_CHIP_IMSTT128 0x9128
+#define PCI_CHIP_IMSTT3D 0x9135
+
+/* Alliance Semiconductor */
+#define PCI_CHIP_AP6410 0x3210
+#define PCI_CHIP_AP6422 0x6422
+#define PCI_CHIP_AT24 0x6424
+#define PCI_CHIP_AT3D 0x643D
+
+/* 3dfx Interactive */
+#define PCI_CHIP_VOODOO_GRAPHICS 0x0001
+#define PCI_CHIP_VOODOO2 0x0002
+#define PCI_CHIP_BANSHEE 0x0003
+#define PCI_CHIP_VOODOO3 0x0005
+#define PCI_CHIP_VOODOO5 0x0009
+
+#define PCI_CARD_VOODOO3_2000 0x0036
+#define PCI_CARD_VOODOO3_3000 0x003A
+
+/* Rendition */
+#define PCI_CHIP_V1000 0x0001
+#define PCI_CHIP_V2x00 0x2000
+
+/* 3Dlabs */
+#define PCI_CHIP_300SX 0x0001
+#define PCI_CHIP_500TX 0x0002
+#define PCI_CHIP_DELTA 0x0003
+#define PCI_CHIP_PERMEDIA 0x0004
+#define PCI_CHIP_MX 0x0006
+#define PCI_CHIP_PERMEDIA2 0x0007
+#define PCI_CHIP_GAMMA 0x0008
+#define PCI_CHIP_PERMEDIA2V 0x0009
+#define PCI_CHIP_PERMEDIA3 0x000A
+#define PCI_CHIP_PERMEDIA4 0x000C
+#define PCI_CHIP_R4 0x000D
+#define PCI_CHIP_GAMMA2 0x000E
+#define PCI_CHIP_R4ALT 0x0011
+
+/* S3 */
+#define PCI_CHIP_PLATO 0x0551
+#define PCI_CHIP_VIRGE 0x5631
+#define PCI_CHIP_TRIO 0x8811
+#define PCI_CHIP_AURORA64VP 0x8812
+#define PCI_CHIP_TRIO64UVP 0x8814
+#define PCI_CHIP_VIRGE_VX 0x883D
+#define PCI_CHIP_868 0x8880
+#define PCI_CHIP_928 0x88B0
+#define PCI_CHIP_864_0 0x88C0
+#define PCI_CHIP_864_1 0x88C1
+#define PCI_CHIP_964_0 0x88D0
+#define PCI_CHIP_964_1 0x88D1
+#define PCI_CHIP_968 0x88F0
+#define PCI_CHIP_TRIO64V2_DXGX 0x8901
+#define PCI_CHIP_PLATO_PX 0x8902
+#define PCI_CHIP_Trio3D 0x8904
+#define PCI_CHIP_VIRGE_DXGX 0x8A01
+#define PCI_CHIP_VIRGE_GX2 0x8A10
+#define PCI_CHIP_Trio3D_2X 0x8A13
+#define PCI_CHIP_SAVAGE3D 0x8A20
+#define PCI_CHIP_SAVAGE3D_MV 0x8A21
+#define PCI_CHIP_SAVAGE4 0x8A22
+#define PCI_CHIP_PROSAVAGE_PM 0x8A25
+#define PCI_CHIP_PROSAVAGE_KM 0x8A26
+#define PCI_CHIP_VIRGE_MX 0x8C01
+#define PCI_CHIP_VIRGE_MXPLUS 0x8C02
+#define PCI_CHIP_VIRGE_MXP 0x8C03
+#define PCI_CHIP_SAVAGE_MX_MV 0x8C10
+#define PCI_CHIP_SAVAGE_MX 0x8C11
+#define PCI_CHIP_SAVAGE_IX_MV 0x8C12
+#define PCI_CHIP_SAVAGE_IX 0x8C13
+#define PCI_CHIP_SUPSAV_MX128 0x8C22
+#define PCI_CHIP_SUPSAV_MX64 0x8C24
+#define PCI_CHIP_SUPSAV_MX64C 0x8C26
+#define PCI_CHIP_SUPSAV_IX128SDR 0x8C2A
+#define PCI_CHIP_SUPSAV_IX128DDR 0x8C2B
+#define PCI_CHIP_SUPSAV_IX64SDR 0x8C2C
+#define PCI_CHIP_SUPSAV_IX64DDR 0x8C2D
+#define PCI_CHIP_SUPSAV_IXCSDR 0x8C2E
+#define PCI_CHIP_SUPSAV_IXCDDR 0x8C2F
+#define PCI_CHIP_S3TWISTER_P 0x8D01
+#define PCI_CHIP_S3TWISTER_K 0x8D02
+#define PCI_CHIP_PROSAVAGE_DDR 0x8D03
+#define PCI_CHIP_PROSAVAGE_DDRK 0x8D04
+#define PCI_CHIP_SAVAGE2000 0x9102
+
+/* ARK Logic */
+#define PCI_CHIP_1000PV 0xA091
+#define PCI_CHIP_2000PV 0xA099
+#define PCI_CHIP_2000MT 0xA0A1
+#define PCI_CHIP_2000MI 0xA0A9
+
+/* Tritech Microelectronics */
+#define PCI_CHIP_TR25202 0xFC02
+
+/* Neomagic */
+#define PCI_CHIP_NM2070 0x0001
+#define PCI_CHIP_NM2090 0x0002
+#define PCI_CHIP_NM2093 0x0003
+#define PCI_CHIP_NM2097 0x0083
+#define PCI_CHIP_NM2160 0x0004
+#define PCI_CHIP_NM2200 0x0005
+#define PCI_CHIP_NM2230 0x0025
+#define PCI_CHIP_NM2360 0x0006
+#define PCI_CHIP_NM2380 0x0016
+
+/* Intel */
+#define PCI_CHIP_I815_BRIDGE 0x1130
+#define PCI_CHIP_I815 0x1132
+#define PCI_CHIP_82801_P2P 0x244E
+#define PCI_CHIP_845_G_BRIDGE 0x2560
+#define PCI_CHIP_845_G 0x2562
+#define PCI_CHIP_I830_M_BRIDGE 0x3575
+#define PCI_CHIP_I830_M 0x3577
+#define PCI_CHIP_I810_BRIDGE 0x7120
+#define PCI_CHIP_I810 0x7121
+#define PCI_CHIP_I810_DC100_BRIDGE 0x7122
+#define PCI_CHIP_I810_DC100 0x7123
+#define PCI_CHIP_I810_E_BRIDGE 0x7124
+#define PCI_CHIP_I810_E 0x7125
+#define PCI_CHIP_I740_AGP 0x7800
+#define PCI_CHIP_460GX_PXB 0x84CB
+#define PCI_CHIP_460GX_SAC 0x84E0
+#define PCI_CHIP_460GX_GXB_2 0x84E2 /* PCI function 2 */
+#define PCI_CHIP_460GX_WXB 0x84E6
+#define PCI_CHIP_460GX_GXB_1 0x84EA /* PCI function 1 */
+
+/* Silicon Motion Inc. */
+#define PCI_CHIP_SMI910 0x0910
+#define PCI_CHIP_SMI810 0x0810
+#define PCI_CHIP_SMI820 0x0820
+#define PCI_CHIP_SMI710 0x0710
+#define PCI_CHIP_SMI712 0x0712
+#define PCI_CHIP_SMI720 0x0720
+#define PCI_CHIP_SMI731 0x0730
+
+/* VMware */
+#define PCI_CHIP_VMWARE0405 0x0405
+#define PCI_CHIP_VMWARE0710 0x0710
+
+#endif /* _XF86_PCIINFO_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Priv.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Priv.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Priv.h (working copy)
@@ -0,0 +1,171 @@
+/*
+ * Copyright (c) 1997-2002 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+/*
+ * This file contains declarations for private XFree86 functions and variables,
+ * and definitions of private macros.
+ *
+ * "private" means not available to video drivers.
+ */
+
+#ifndef _XF86PRIV_H
+#define _XF86PRIV_H
+
+#include "xf86Privstr.h"
+#include "propertyst.h"
+#include "input.h"
+
+/*
+ * Parameters set ONLY from the command line options
+ * The global state of these things is held in xf86InfoRec (when appropriate).
+ */
+extern _X_EXPORT const char *xf86ConfigFile;
+extern _X_EXPORT const char *xf86ConfigDir;
+extern _X_EXPORT Bool xf86AllowMouseOpenFail;
+
+#ifdef XF86VIDMODE
+extern _X_EXPORT Bool xf86VidModeDisabled;
+extern _X_EXPORT Bool xf86VidModeAllowNonLocal;
+#endif
+extern _X_EXPORT Bool xf86fpFlag;
+extern _X_EXPORT Bool xf86sFlag;
+extern _X_EXPORT Bool xf86bsEnableFlag;
+extern _X_EXPORT Bool xf86bsDisableFlag;
+extern _X_EXPORT Bool xf86silkenMouseDisableFlag;
+extern _X_EXPORT Bool xf86xkbdirFlag;
+
+#ifdef HAVE_ACPI
+extern _X_EXPORT Bool xf86acpiDisableFlag;
+#endif
+extern _X_EXPORT char *xf86LayoutName;
+extern _X_EXPORT char *xf86ScreenName;
+extern _X_EXPORT char *xf86PointerName;
+extern _X_EXPORT char *xf86KeyboardName;
+extern _X_EXPORT int xf86FbBpp;
+extern _X_EXPORT int xf86Depth;
+extern _X_EXPORT Pix24Flags xf86Pix24;
+extern _X_EXPORT rgb xf86Weight;
+extern _X_EXPORT Bool xf86FlipPixels;
+extern _X_EXPORT Gamma xf86Gamma;
+extern _X_EXPORT const char *xf86ServerName;
+
+/* Other parameters */
+
+extern _X_EXPORT xf86InfoRec xf86Info;
+extern _X_EXPORT const char *xf86ModulePath;
+extern _X_EXPORT MessageType xf86ModPathFrom;
+extern _X_EXPORT const char *xf86LogFile;
+extern _X_EXPORT MessageType xf86LogFileFrom;
+extern _X_EXPORT Bool xf86LogFileWasOpened;
+extern _X_EXPORT serverLayoutRec xf86ConfigLayout;
+
+extern _X_EXPORT DriverPtr *xf86DriverList;
+extern _X_EXPORT int xf86NumDrivers;
+extern _X_EXPORT Bool xf86Resetting;
+extern _X_EXPORT Bool xf86Initialising;
+extern _X_EXPORT int xf86NumScreens;
+extern _X_EXPORT const char *xf86VisualNames[];
+extern _X_EXPORT int xf86Verbose; /* verbosity level */
+extern _X_EXPORT int xf86LogVerbose; /* log file verbosity level */
+
+extern _X_EXPORT RootWinPropPtr *xf86RegisteredPropertiesTable;
+
+extern ScrnInfoPtr *xf86GPUScreens; /* List of pointers to ScrnInfoRecs */
+extern int xf86NumGPUScreens;
+#ifndef DEFAULT_VERBOSE
+#define DEFAULT_VERBOSE 0
+#endif
+#ifndef DEFAULT_LOG_VERBOSE
+#define DEFAULT_LOG_VERBOSE 3
+#endif
+#ifndef DEFAULT_DPI
+#define DEFAULT_DPI 96
+#endif
+
+/* Function Prototypes */
+#ifndef _NO_XF86_PROTOTYPES
+
+/* xf86Bus.c */
+extern _X_EXPORT Bool xf86BusConfig(void);
+extern _X_EXPORT void xf86BusProbe(void);
+extern _X_EXPORT void xf86AccessEnter(void);
+extern _X_EXPORT void xf86AccessLeave(void);
+extern _X_EXPORT void xf86PostProbe(void);
+extern _X_EXPORT void xf86ClearEntityListForScreen(ScrnInfoPtr pScrn);
+extern _X_EXPORT void xf86AddDevToEntity(int entityIndex, GDevPtr dev);
+extern _X_EXPORT void xf86RemoveDevFromEntity(int entityIndex, GDevPtr dev);
+
+/* xf86Config.c */
+
+extern _X_EXPORT Bool xf86PathIsSafe(const char *path);
+
+/* xf86DefaultModes */
+
+extern _X_EXPORT const DisplayModeRec xf86DefaultModes[];
+extern _X_EXPORT const int xf86NumDefaultModes;
+
+/* xf86Configure.c */
+extern _X_EXPORT void
+DoConfigure(void)
+ _X_NORETURN;
+extern _X_EXPORT void
+DoShowOptions(void)
+ _X_NORETURN;
+
+/* xf86Events.c */
+
+extern _X_EXPORT void
+xf86Wakeup(void *blockData, int err, void *pReadmask);
+extern _X_HIDDEN int
+xf86SigWrapper(int signo);
+extern _X_EXPORT void
+xf86HandlePMEvents(int fd, void *data);
+extern _X_EXPORT int (*xf86PMGetEventFromOs) (int fd, pmEvent * events,
+ int num);
+extern _X_EXPORT pmWait (*xf86PMConfirmEventToOs) (int fd, pmEvent event);
+
+/* xf86Helper.c */
+extern _X_EXPORT void
+xf86LogInit(void);
+extern _X_EXPORT void
+xf86CloseLog(enum ExitCode error);
+
+/* xf86Init.c */
+extern _X_EXPORT Bool
+xf86LoadModules(const char **list, void **optlist);
+extern _X_EXPORT int
+xf86SetVerbosity(int verb);
+extern _X_EXPORT int
+xf86SetLogVerbosity(int verb);
+extern _X_EXPORT Bool
+xf86CallDriverProbe(struct _DriverRec *drv, Bool detect_only);
+extern _X_EXPORT Bool
+xf86PrivsElevated(void);
+
+#endif /* _NO_XF86_PROTOTYPES */
+
+#endif /* _XF86PRIV_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Privstr.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Privstr.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Privstr.h (working copy)
@@ -0,0 +1,166 @@
+
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+/*
+ * This file contains definitions of the private XFree86 data structures/types.
+ * None of the data structures here should be used by video drivers.
+ */
+
+#ifndef _XF86PRIVSTR_H
+#define _XF86PRIVSTR_H
+
+#include "xf86str.h"
+
+typedef enum {
+ LogNone,
+ LogFlush,
+ LogSync
+} Log;
+
+typedef enum {
+ XF86_GlxVisualsMinimal,
+ XF86_GlxVisualsTypical,
+ XF86_GlxVisualsAll,
+} XF86_GlxVisuals;
+
+/*
+ * xf86InfoRec contains global parameters which the video drivers never
+ * need to access. Global parameters which the video drivers do need
+ * should be individual globals.
+ */
+
+typedef struct {
+ int consoleFd;
+ int vtno;
+
+ /* event handler part */
+ int lastEventTime;
+ Bool vtRequestsPending;
+#ifdef sun
+ int vtPendingNum;
+#endif
+ Bool dontVTSwitch;
+ Bool autoVTSwitch;
+ Bool ShareVTs;
+ Bool dontZap;
+ Bool dontZoom;
+ Bool notrapSignals; /* don't exit cleanly - die at fault */
+ Bool caughtSignal;
+
+ /* graphics part */
+ ScreenPtr currentScreen;
+#if defined(CSRG_BASED) || defined(__FreeBSD_kernel__)
+ int consType; /* Which console driver? */
+#endif
+
+ /* Other things */
+ Bool allowMouseOpenFail;
+ Bool vidModeEnabled; /* VidMode extension enabled */
+ Bool vidModeAllowNonLocal; /* allow non-local VidMode
+ * connections */
+ Bool miscModInDevEnabled; /* Allow input devices to be
+ * changed */
+ Bool miscModInDevAllowNonLocal;
+ Bool useSIGIO; /* Use SIGIO for handling
+ input device events */
+ Pix24Flags pixmap24;
+ MessageType pix24From;
+ Bool pmFlag;
+ Log log;
+ Bool disableRandR;
+ MessageType randRFrom;
+ Bool aiglx;
+ MessageType aiglxFrom;
+ XF86_GlxVisuals glxVisuals;
+ MessageType glxVisualsFrom;
+
+ Bool useDefaultFontPath;
+ MessageType useDefaultFontPathFrom;
+ Bool ignoreABI;
+
+ Bool forceInputDevices; /* force xorg.conf or built-in input devices */
+ Bool autoAddDevices; /* Whether to succeed NIDR, or ignore. */
+ Bool autoEnableDevices; /* Whether to enable, or let the client
+ * control. */
+
+ Bool dri2;
+ MessageType dri2From;
+
+ Bool autoAddGPU;
+} xf86InfoRec, *xf86InfoPtr;
+
+#ifdef DPMSExtension
+/* Private info for DPMS */
+typedef struct {
+ CloseScreenProcPtr CloseScreen;
+ Bool Enabled;
+ int Flags;
+} DPMSRec, *DPMSPtr;
+#endif
+
+#ifdef XF86VIDMODE
+/* Private info for Video Mode Extentsion */
+typedef struct {
+ DisplayModePtr First;
+ DisplayModePtr Next;
+ int Flags;
+ CloseScreenProcPtr CloseScreen;
+} VidModeRec, *VidModePtr;
+#endif
+
+/* Information for root window properties. */
+typedef struct _RootWinProp {
+ struct _RootWinProp *next;
+ const char *name;
+ Atom type;
+ short format;
+ long size;
+ void *data;
+} RootWinProp, *RootWinPropPtr;
+
+/* ISC's cc can't handle ~ of UL constants, so explicitly type cast them. */
+#define XLED1 ((unsigned long) 0x00000001)
+#define XLED2 ((unsigned long) 0x00000002)
+#define XLED3 ((unsigned long) 0x00000004)
+#define XLED4 ((unsigned long) 0x00000008)
+#define XCAPS ((unsigned long) 0x20000000)
+#define XNUM ((unsigned long) 0x40000000)
+#define XSCR ((unsigned long) 0x80000000)
+#define XCOMP ((unsigned long) 0x00008000)
+
+/* BSD console driver types (consType) */
+#if defined(CSRG_BASED) || defined(__FreeBSD_kernel__)
+#define PCCONS 0
+#define CODRV011 1
+#define CODRV01X 2
+#define SYSCONS 8
+#define PCVT 16
+#define WSCONS 32
+#endif
+
+#endif /* _XF86PRIVSTR_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86RamDac.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86RamDac.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86RamDac.h (working copy)
@@ -0,0 +1,88 @@
+
+#ifndef _XF86RAMDAC_H
+#define _XF86RAMDAC_H 1
+
+#include "colormapst.h"
+#include "xf86Cursor.h"
+
+/* Define unique vendor codes for RAMDAC's */
+#define VENDOR_IBM 0x0000
+#define VENDOR_BT 0x0001
+#define VENDOR_TI 0x0002
+
+typedef struct _RamDacRegRec {
+/* This is probably the nastiest assumption, we allocate 1024 slots for
+ * ramdac registers, should be enough. I've checked IBM and TVP series
+ * and they seem o.k
+ * Then we allocate 768 entries for the DAC too. IBM640 needs 1024 -FIXME
+ */
+ unsigned short DacRegs[0x400]; /* register set */
+ unsigned char DAC[0x300]; /* colour map */
+ Bool Overlay;
+} RamDacRegRec, *RamDacRegRecPtr;
+
+typedef struct _RamDacHWRegRec {
+ RamDacRegRec SavedReg;
+ RamDacRegRec ModeReg;
+} RamDacHWRec, *RamDacHWRecPtr;
+
+typedef struct _RamDacRec {
+ CARD32 RamDacType;
+
+ void (*LoadPalette) (ScrnInfoPtr pScrn,
+ int numColors,
+ int *indices, LOCO * colors, VisualPtr pVisual);
+
+ unsigned char (*ReadDAC) (ScrnInfoPtr pScrn, CARD32);
+
+ void (*WriteDAC) (ScrnInfoPtr pScrn, CARD32, unsigned char, unsigned char);
+
+ void (*WriteAddress) (ScrnInfoPtr pScrn, CARD32);
+
+ void (*WriteData) (ScrnInfoPtr pScrn, unsigned char);
+
+ void (*ReadAddress) (ScrnInfoPtr pScrn, CARD32);
+
+ unsigned char (*ReadData) (ScrnInfoPtr pScrn);
+} RamDacRec, *RamDacRecPtr;
+
+typedef struct _RamDacHelperRec {
+ CARD32 RamDacType;
+
+ void (*Restore) (ScrnInfoPtr pScrn,
+ RamDacRecPtr ramdacPtr, RamDacRegRecPtr ramdacReg);
+
+ void (*Save) (ScrnInfoPtr pScrn,
+ RamDacRecPtr ramdacPtr, RamDacRegRecPtr ramdacReg);
+
+ void (*SetBpp) (ScrnInfoPtr pScrn, RamDacRegRecPtr ramdacReg);
+
+ void (*HWCursorInit) (xf86CursorInfoPtr infoPtr);
+} RamDacHelperRec, *RamDacHelperRecPtr;
+
+#define RAMDACHWPTR(p) ((RamDacHWRecPtr)((p)->privates[RamDacGetHWIndex()].ptr))
+
+typedef struct _RamdacScreenRec {
+ RamDacRecPtr RamDacRec;
+} RamDacScreenRec, *RamDacScreenRecPtr;
+
+#define RAMDACSCRPTR(p) ((RamDacScreenRecPtr)((p)->privates[RamDacGetScreenIndex()].ptr))->RamDacRec
+
+extern _X_EXPORT int RamDacHWPrivateIndex;
+extern _X_EXPORT int RamDacScreenPrivateIndex;
+
+typedef struct {
+ int token;
+} RamDacSupportedInfoRec, *RamDacSupportedInfoRecPtr;
+
+extern _X_EXPORT RamDacRecPtr RamDacCreateInfoRec(void);
+extern _X_EXPORT RamDacHelperRecPtr RamDacHelperCreateInfoRec(void);
+extern _X_EXPORT void RamDacDestroyInfoRec(RamDacRecPtr RamDacRec);
+extern _X_EXPORT void RamDacHelperDestroyInfoRec(RamDacHelperRecPtr RamDacRec);
+extern _X_EXPORT Bool RamDacInit(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec);
+extern _X_EXPORT Bool RamDacHandleColormaps(ScreenPtr pScreen, int maxColors,
+ int sigRGBbits, unsigned int flags);
+extern _X_EXPORT void RamDacFreeRec(ScrnInfoPtr pScrn);
+extern _X_EXPORT int RamDacGetHWIndex(void);
+
+#endif /* _XF86RAMDAC_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86RandR12.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86RandR12.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86RandR12.h (working copy)
@@ -0,0 +1,43 @@
+/*
+ * Copyright © 2006 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no representations
+ * about the suitability of this software for any purpose. It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+#ifndef _XF86_RANDR_H_
+#define _XF86_RANDR_H_
+#include <randrstr.h>
+#include <X11/extensions/render.h>
+
+extern _X_EXPORT Bool xf86RandR12CreateScreenResources(ScreenPtr pScreen);
+extern _X_EXPORT Bool xf86RandR12Init(ScreenPtr pScreen);
+extern _X_EXPORT void xf86RandR12CloseScreen(ScreenPtr pScreen);
+extern _X_EXPORT void xf86RandR12SetRotations(ScreenPtr pScreen,
+ Rotation rotation);
+extern _X_EXPORT void xf86RandR12SetTransformSupport(ScreenPtr pScreen,
+ Bool transforms);
+extern _X_EXPORT Bool xf86RandR12SetConfig(ScreenPtr pScreen, Rotation rotation,
+ int rate, RRScreenSizePtr pSize);
+extern _X_EXPORT Rotation xf86RandR12GetRotation(ScreenPtr pScreen);
+extern _X_EXPORT void xf86RandR12GetOriginalVirtualSize(ScrnInfoPtr pScrn,
+ int *x, int *y);
+extern _X_EXPORT Bool xf86RandR12PreInit(ScrnInfoPtr pScrn);
+extern _X_EXPORT void xf86RandR12TellChanged(ScreenPtr pScreen);
+
+#endif /* _XF86_RANDR_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86VGAarbiter.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86VGAarbiter.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86VGAarbiter.h (working copy)
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2009 Tiago Vignatti
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef __XF86VGAARBITER_H
+#define __XF86VGAARBITER_H
+
+#include "screenint.h"
+#include "misc.h"
+#include "xf86.h"
+
+/* Functions */
+extern void xf86VGAarbiterInit(void);
+extern void xf86VGAarbiterFini(void);
+void xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn);
+extern Bool xf86VGAarbiterWrapFunctions(void);
+extern void xf86VGAarbiterLock(ScrnInfoPtr pScrn);
+extern void xf86VGAarbiterUnlock(ScrnInfoPtr pScrn);
+
+/* allow a driver to remove itself from arbiter - really should be
+ * done in the kernel though */
+extern _X_EXPORT void xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn, int rsrc);
+
+/* DRI and arbiter are really not possible together,
+ * you really want to remove the card from arbitration if you can */
+extern _X_EXPORT Bool xf86VGAarbiterAllowDRI(ScreenPtr pScreen);
+
+#endif /* __XF86VGAARBITER_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Xinput.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Xinput.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86Xinput.h (working copy)
@@ -0,0 +1,204 @@
+/*
+ * Copyright 1995-1999 by Frederic Lepied, France. <Lepied@XFree86.org>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Frederic Lepied not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Frederic Lepied makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * FREDERIC LEPIED DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL FREDERIC LEPIED BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/*
+ * Copyright (c) 2000-2002 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+#ifndef _xf86Xinput_h
+#define _xf86Xinput_h
+
+#include "xf86str.h"
+#include "inputstr.h"
+#include <X11/extensions/XI.h>
+#include <X11/extensions/XIproto.h>
+#include "XIstubs.h"
+
+/* Input device flags */
+#define XI86_ALWAYS_CORE 0x04 /* device always controls the pointer */
+/* the device sends Xinput and core pointer events */
+#define XI86_SEND_CORE_EVENTS XI86_ALWAYS_CORE
+/* 0x08 is reserved for legacy XI86_SEND_DRAG_EVENTS, do not use for now */
+/* server-internal only */
+#define XI86_DEVICE_DISABLED 0x10 /* device was disabled before vt switch */
+
+/* This holds the input driver entry and module information. */
+typedef struct _InputDriverRec {
+ int driverVersion;
+ const char *driverName;
+ void (*Identify) (int flags);
+ int (*PreInit) (struct _InputDriverRec * drv,
+ struct _InputInfoRec * pInfo, int flags);
+ void (*UnInit) (struct _InputDriverRec * drv,
+ struct _InputInfoRec * pInfo, int flags);
+ void *module;
+ const char **default_options;
+} InputDriverRec, *InputDriverPtr;
+
+/* This is to input devices what the ScrnInfoRec is to screens. */
+
+typedef struct _InputInfoRec {
+ struct _InputInfoRec *next;
+ char *name;
+ char *driver;
+
+ int flags;
+
+ Bool (*device_control) (DeviceIntPtr device, int what);
+ void (*read_input) (struct _InputInfoRec * local);
+ int (*control_proc) (struct _InputInfoRec * local, xDeviceCtl * control);
+ int (*switch_mode) (ClientPtr client, DeviceIntPtr dev, int mode);
+ int (*set_device_valuators)
+ (struct _InputInfoRec * local,
+ int *valuators, int first_valuator, int num_valuators);
+
+ int fd;
+ DeviceIntPtr dev;
+ void *private;
+ const char *type_name;
+ InputDriverPtr drv;
+ void *module;
+ XF86OptionPtr options;
+ InputAttributes *attrs;
+} *InputInfoPtr;
+
+/* xf86Globals.c */
+extern InputInfoPtr xf86InputDevs;
+
+/* xf86Xinput.c */
+extern _X_EXPORT void xf86PostMotionEvent(DeviceIntPtr device, int is_absolute,
+ int first_valuator, int num_valuators,
+ ...);
+extern _X_EXPORT void xf86PostMotionEventP(DeviceIntPtr device, int is_absolute,
+ int first_valuator,
+ int num_valuators,
+ const int *valuators);
+extern _X_EXPORT void xf86PostMotionEventM(DeviceIntPtr device, int is_absolute,
+ const ValuatorMask *mask);
+extern _X_EXPORT void xf86PostProximityEvent(DeviceIntPtr device, int is_in,
+ int first_valuator,
+ int num_valuators, ...);
+extern _X_EXPORT void xf86PostProximityEventP(DeviceIntPtr device, int is_in,
+ int first_valuator,
+ int num_valuators,
+ const int *valuators);
+extern _X_EXPORT void xf86PostProximityEventM(DeviceIntPtr device, int is_in,
+ const ValuatorMask *mask);
+extern _X_EXPORT void xf86PostButtonEvent(DeviceIntPtr device, int is_absolute,
+ int button, int is_down,
+ int first_valuator, int num_valuators,
+ ...);
+extern _X_EXPORT void xf86PostButtonEventP(DeviceIntPtr device, int is_absolute,
+ int button, int is_down,
+ int first_valuator,
+ int num_valuators,
+ const int *valuators);
+extern _X_EXPORT void xf86PostButtonEventM(DeviceIntPtr device, int is_absolute,
+ int button, int is_down,
+ const ValuatorMask *mask);
+extern _X_EXPORT void xf86PostKeyEvent(DeviceIntPtr device,
+ unsigned int key_code, int is_down,
+ int is_absolute, int first_valuator,
+ int num_valuators, ...);
+extern _X_EXPORT void xf86PostKeyEventM(DeviceIntPtr device,
+ unsigned int key_code, int is_down,
+ int is_absolute,
+ const ValuatorMask *mask);
+extern _X_EXPORT void xf86PostKeyEventP(DeviceIntPtr device,
+ unsigned int key_code, int is_down,
+ int is_absolute, int first_valuator,
+ int num_valuators,
+ const int *valuators);
+extern _X_EXPORT void xf86PostKeyboardEvent(DeviceIntPtr device,
+ unsigned int key_code, int is_down);
+extern _X_EXPORT void xf86PostTouchEvent(DeviceIntPtr dev, uint32_t touchid,
+ uint16_t type, uint32_t flags,
+ const ValuatorMask *mask);
+extern _X_EXPORT InputInfoPtr xf86FirstLocalDevice(void);
+extern _X_EXPORT int xf86ScaleAxis(int Cx, int to_max, int to_min, int from_max,
+ int from_min);
+extern _X_EXPORT void xf86ProcessCommonOptions(InputInfoPtr pInfo,
+ XF86OptionPtr options);
+extern _X_EXPORT Bool xf86InitValuatorAxisStruct(DeviceIntPtr dev, int axnum,
+ Atom label, int minval,
+ int maxval, int resolution,
+ int min_res, int max_res,
+ int mode);
+extern _X_EXPORT void xf86InitValuatorDefaults(DeviceIntPtr dev, int axnum);
+extern _X_EXPORT void xf86AddEnabledDevice(InputInfoPtr pInfo);
+extern _X_EXPORT void xf86RemoveEnabledDevice(InputInfoPtr pInfo);
+extern _X_EXPORT void xf86DisableDevice(DeviceIntPtr dev, Bool panic);
+extern _X_EXPORT void xf86EnableDevice(DeviceIntPtr dev);
+
+/* not exported */
+int xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL is_auto);
+InputInfoPtr xf86AllocateInput(void);
+
+/* xf86Helper.c */
+extern _X_EXPORT void xf86AddInputDriver(InputDriverPtr driver, void *module,
+ int flags);
+extern _X_EXPORT void xf86DeleteInputDriver(int drvIndex);
+extern _X_EXPORT InputDriverPtr xf86LookupInputDriver(const char *name);
+extern _X_EXPORT InputInfoPtr xf86LookupInput(const char *name);
+extern _X_EXPORT void xf86DeleteInput(InputInfoPtr pInp, int flags);
+extern _X_EXPORT void xf86MotionHistoryAllocate(InputInfoPtr pInfo);
+extern _X_EXPORT void
+xf86IDrvMsgVerb(InputInfoPtr dev,
+ MessageType type, int verb, const char *format, ...)
+_X_ATTRIBUTE_PRINTF(4, 5);
+extern _X_EXPORT void
+xf86IDrvMsg(InputInfoPtr dev, MessageType type, const char *format, ...)
+_X_ATTRIBUTE_PRINTF(3, 4);
+extern _X_EXPORT void
+xf86VIDrvMsgVerb(InputInfoPtr dev,
+ MessageType type, int verb, const char *format, va_list args)
+_X_ATTRIBUTE_PRINTF(4, 0);
+
+/* xf86Option.c */
+extern _X_EXPORT void
+xf86CollectInputOptions(InputInfoPtr pInfo, const char **defaultOpts);
+
+#endif /* _xf86Xinput_h */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86_OSlib.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86_OSlib.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86_OSlib.h (working copy)
@@ -0,0 +1,371 @@
+/*
+ * Copyright 1990, 1991 by Thomas Roell, Dinkelscherben, Germany
+ * Copyright 1992 by David Dawes <dawes@XFree86.org>
+ * Copyright 1992 by Jim Tsillas <jtsilla@damon.ccs.northeastern.edu>
+ * Copyright 1992 by Rich Murphey <Rich@Rice.edu>
+ * Copyright 1992 by Robert Baron <Robert.Baron@ernst.mach.cs.cmu.edu>
+ * Copyright 1992 by Orest Zborowski <obz@eskimo.com>
+ * Copyright 1993 by Vrije Universiteit, The Netherlands
+ * Copyright 1993 by David Wexelblat <dwex@XFree86.org>
+ * Copyright 1994, 1996 by Holger Veit <Holger.Veit@gmd.de>
+ * Copyright 1997 by Takis Psarogiannakopoulos <takis@dpmms.cam.ac.uk>
+ * Copyright 1994-2003 by The XFree86 Project, Inc
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the names of the above listed copyright holders
+ * not be used in advertising or publicity pertaining to distribution of
+ * the software without specific, written prior permission. The above listed
+ * copyright holders make no representations about the suitability of this
+ * software for any purpose. It is provided "as is" without express or
+ * implied warranty.
+ *
+ * THE ABOVE LISTED COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD
+ * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
+ * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/*
+ * The ARM32 code here carries the following copyright:
+ *
+ * Copyright 1997
+ * Digital Equipment Corporation. All rights reserved.
+ * This software is furnished under license and may be used and copied only in
+ * accordance with the following terms and conditions. Subject to these
+ * conditions, you may download, copy, install, use, modify and distribute
+ * this software in source and/or binary form. No title or ownership is
+ * transferred hereby.
+ *
+ * 1) Any source code used, modified or distributed must reproduce and retain
+ * this copyright notice and list of conditions as they appear in the
+ * source file.
+ *
+ * 2) No right is granted to use any trade name, trademark, or logo of Digital
+ * Equipment Corporation. Neither the "Digital Equipment Corporation"
+ * name nor any trademark or logo of Digital Equipment Corporation may be
+ * used to endorse or promote products derived from this software without
+ * the prior written permission of Digital Equipment Corporation.
+ *
+ * 3) This software is provided "AS-IS" and any express or implied warranties,
+ * including but not limited to, any implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement are disclaimed.
+ * In no event shall DIGITAL be liable for any damages whatsoever, and in
+ * particular, DIGITAL shall not be liable for special, indirect,
+ * consequential, or incidental damages or damages for lost profits, loss
+ * of revenue or loss of use, whether such damages arise in contract,
+ * negligence, tort, under statute, in equity, at law or otherwise, even
+ * if advised of the possibility of such damage.
+ *
+ */
+
+/*
+ * This is private, and should not be included by any drivers. Drivers
+ * may include xf86_OSproc.h to get prototypes for public interfaces.
+ */
+
+#ifndef _XF86_OSLIB_H
+#define _XF86_OSLIB_H
+
+#include <X11/Xos.h>
+#include <X11/Xfuncproto.h>
+
+#include <stdio.h>
+#include <ctype.h>
+#include <stddef.h>
+
+/**************************************************************************/
+/* SYSV386 (SVR3, SVR4), including Solaris */
+/**************************************************************************/
+#if (defined(SYSV) || defined(SVR4)) && \
+ (defined(sun) || defined(__i386__))
+#include <sys/ioctl.h>
+#include <signal.h>
+#include <termio.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+#include <errno.h>
+
+#if defined(_NEED_SYSI86)
+#if !(defined (sun) && defined (SVR4))
+#include <sys/immu.h>
+#include <sys/region.h>
+#include <sys/proc.h>
+#endif
+#include <sys/tss.h>
+#include <sys/sysi86.h>
+#if defined(SVR4) && !defined(sun)
+#include <sys/seg.h>
+#endif /* SVR4 && !sun */
+/* V86SC_IOPL was moved to <sys/sysi86.h> on Solaris 7 and later */
+#if !defined(V86SC_IOPL) /* Solaris 7 or later? */
+#include <sys/v86.h> /* Nope */
+#endif
+#if defined(sun) && (defined (__i386__) || defined(__i386) || defined(__x86)) && defined (SVR4)
+#include <sys/psw.h>
+#endif
+#endif /* _NEED_SYSI86 */
+
+#if defined(HAS_SVR3_MMAPDRV)
+#include <sys/sysmacros.h>
+#if !defined(_NEED_SYSI86)
+#include <sys/immu.h>
+#include <sys/region.h>
+#endif
+#include <sys/mmap.h> /* MMAP driver header */
+#endif
+
+#if !defined(sun) || defined(HAVE_SYS_VT_H)
+#define HAS_USL_VTS
+#endif
+#if !defined(sun)
+#include <sys/emap.h>
+#endif
+#if defined(HAS_USL_VTS)
+#if !defined(sun)
+#include <sys/at_ansi.h>
+#endif
+#include <sys/kd.h>
+#include <sys/vt.h>
+#endif
+
+#if defined(sun)
+#include <sys/fbio.h>
+#include <sys/kbd.h>
+#include <sys/kbio.h>
+
+/* undefine symbols from <sys/kbd.h> we don't need that conflict with enum
+ definitions in parser/xf86tokens.h */
+#undef STRING
+#undef LEFTALT
+#undef RIGHTALT
+
+#define LED_CAP LED_CAPS_LOCK
+#define LED_NUM LED_NUM_LOCK
+#define LED_SCR LED_SCROLL_LOCK
+#define LED_COMP LED_COMPOSE
+#endif /* sun */
+
+#if !defined(VT_ACKACQ)
+#define VT_ACKACQ 2
+#endif /* !VT_ACKACQ */
+
+#if defined(SVR4)
+#include <sys/mman.h>
+#if !(defined(sun) && defined (SVR4))
+#define DEV_MEM "/dev/pmem"
+#endif
+#define CLEARDTR_SUPPORT
+#define POSIX_TTY
+#endif /* SVR4 */
+
+#endif /* (SYSV || SVR4) */
+
+/**************************************************************************/
+/* Linux or Glibc-based system */
+/**************************************************************************/
+#if defined(__linux__) || defined(__GLIBC__) || defined(__CYGWIN__)
+#include <sys/ioctl.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <assert.h>
+
+#ifdef __linux__
+#include <termio.h>
+#else /* __GLIBC__ */
+#include <termios.h>
+#endif
+#ifdef __sparc__
+#include <sys/param.h>
+#endif
+
+#include <errno.h>
+
+#include <sys/stat.h>
+
+#include <sys/mman.h>
+#ifdef __linux__
+#define HAS_USL_VTS
+#include <sys/kd.h>
+#include <sys/vt.h>
+#define LDGMAP GIO_SCRNMAP
+#define LDSMAP PIO_SCRNMAP
+#define LDNMAP LDSMAP
+#define CLEARDTR_SUPPORT
+#endif
+
+#define POSIX_TTY
+
+#endif /* __linux__ || __GLIBC__ */
+
+/**************************************************************************/
+/* 386BSD and derivatives, BSD/386 */
+/**************************************************************************/
+
+#if defined(__386BSD__) && (defined(__FreeBSD__) || defined(__NetBSD__))
+#undef __386BSD__
+#endif
+
+#ifdef CSRG_BASED
+#include <sys/ioctl.h>
+#include <signal.h>
+
+#include <termios.h>
+#define termio termios
+#define POSIX_TTY
+
+#include <errno.h>
+
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+
+#endif /* CSRG_BASED */
+
+/**************************************************************************/
+/* Kernel of *BSD */
+/**************************************************************************/
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \
+ defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
+
+#include <sys/param.h>
+#if defined(__FreeBSD_version) && !defined(__FreeBSD_kernel_version)
+#define __FreeBSD_kernel_version __FreeBSD_version
+#endif
+
+#if !defined(LINKKIT)
+ /* Don't need this stuff for the Link Kit */
+#ifdef SYSCONS_SUPPORT
+#define COMPAT_SYSCONS
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+#if defined(__DragonFly__) || (__FreeBSD_kernel_version >= 410000)
+#include <sys/consio.h>
+#include <sys/kbio.h>
+#else
+#include <machine/console.h>
+#endif /* FreeBSD 4.1 RELEASE or lator */
+#else
+#include <sys/console.h>
+#endif
+#endif /* SYSCONS_SUPPORT */
+#if defined(PCVT_SUPPORT) && !defined(__NetBSD__) && !defined(__OpenBSD__)
+#if !defined(SYSCONS_SUPPORT)
+ /* no syscons, so include pcvt specific header file */
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#include <machine/pcvt_ioctl.h>
+#else
+#include <sys/pcvt_ioctl.h>
+#endif /* __FreeBSD_kernel__ */
+#else /* pcvt and syscons: hard-code the ID magic */
+#define VGAPCVTID _IOWR('V',113, struct pcvtid)
+struct pcvtid {
+ char name[16];
+ int rmajor, rminor;
+};
+#endif /* PCVT_SUPPORT && SYSCONS_SUPPORT */
+#endif /* PCVT_SUPPORT */
+#ifdef WSCONS_SUPPORT
+#include <dev/wscons/wsconsio.h>
+#include <dev/wscons/wsdisplay_usl_io.h>
+#endif /* WSCONS_SUPPORT */
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+#include <sys/mouse.h>
+#endif
+ /* Include these definitions in case ioctl_pc.h didn't get included */
+#ifndef CONSOLE_X_MODE_ON
+#define CONSOLE_X_MODE_ON _IO('t',121)
+#endif
+#ifndef CONSOLE_X_MODE_OFF
+#define CONSOLE_X_MODE_OFF _IO('t',122)
+#endif
+#ifndef CONSOLE_X_BELL
+#define CONSOLE_X_BELL _IOW('t',123,int[2])
+#endif
+#ifndef CONSOLE_X_TV_ON
+#define CONSOLE_X_TV_ON _IOW('t',155,int)
+#define XMODE_RGB 0
+#define XMODE_NTSC 1
+#define XMODE_PAL 2
+#define XMODE_SECAM 3
+#endif
+#ifndef CONSOLE_X_TV_OFF
+#define CONSOLE_X_TV_OFF _IO('t',156)
+#endif
+#ifndef CONSOLE_GET_LINEAR_INFO
+#define CONSOLE_GET_LINEAR_INFO _IOR('t',157,struct map_info)
+#endif
+#ifndef CONSOLE_GET_IO_INFO
+#define CONSOLE_GET_IO_INFO _IOR('t',158,struct map_info)
+#endif
+#ifndef CONSOLE_GET_MEM_INFO
+#define CONSOLE_GET_MEM_INFO _IOR('t',159,struct map_info)
+#endif
+#endif /* !LINKKIT */
+
+#if defined(USE_I386_IOPL) || defined(USE_AMD64_IOPL)
+#include <machine/sysarch.h>
+#endif
+
+#define CLEARDTR_SUPPORT
+
+#endif /* __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __DragonFly__ */
+
+/**************************************************************************/
+/* IRIX */
+/**************************************************************************/
+
+/**************************************************************************/
+/* Generic */
+/**************************************************************************/
+
+#include <sys/wait.h> /* May need to adjust this for other OSs */
+
+/* For PATH_MAX */
+#include "misc.h"
+
+/*
+ * Hack originally for ISC 2.2 POSIX headers, but may apply elsewhere,
+ * and it's safe, so just do it.
+ */
+#if !defined(O_NDELAY) && defined(O_NONBLOCK)
+#define O_NDELAY O_NONBLOCK
+#endif /* !O_NDELAY && O_NONBLOCK */
+
+#if !defined(MAXHOSTNAMELEN)
+#define MAXHOSTNAMELEN 32
+#endif /* !MAXHOSTNAMELEN */
+
+#if defined(_POSIX_SOURCE)
+#include <limits.h>
+#else
+#define _POSIX_SOURCE
+#include <limits.h>
+#undef _POSIX_SOURCE
+#endif /* _POSIX_SOURCE */
+
+#ifndef DEV_MEM
+#define DEV_MEM "/dev/mem"
+#endif
+
+#ifndef MAP_FAILED
+#define MAP_FAILED ((void *)-1)
+#endif
+
+#define SYSCALL(call) while(((call) == -1) && (errno == EINTR))
+
+#define XF86_OS_PRIVS
+#include "xf86_OSproc.h"
+
+#ifndef NO_COMPILER_H
+#include "compiler.h"
+#endif
+
+#endif /* _XF86_OSLIB_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86_OSproc.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86_OSproc.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86_OSproc.h (working copy)
@@ -0,0 +1,231 @@
+/*
+ * Copyright 1990, 1991 by Thomas Roell, Dinkelscherben, Germany
+ * Copyright 1992 by David Dawes <dawes@XFree86.org>
+ * Copyright 1992 by Jim Tsillas <jtsilla@damon.ccs.northeastern.edu>
+ * Copyright 1992 by Rich Murphey <Rich@Rice.edu>
+ * Copyright 1992 by Robert Baron <Robert.Baron@ernst.mach.cs.cmu.edu>
+ * Copyright 1992 by Orest Zborowski <obz@eskimo.com>
+ * Copyright 1993 by Vrije Universiteit, The Netherlands
+ * Copyright 1993 by David Wexelblat <dwex@XFree86.org>
+ * Copyright 1994, 1996 by Holger Veit <Holger.Veit@gmd.de>
+ * Copyright 1994-2003 by The XFree86 Project, Inc
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the names of the above listed copyright holders
+ * not be used in advertising or publicity pertaining to distribution of
+ * the software without specific, written prior permission. The above listed
+ * copyright holders make no representations about the suitability of this
+ * software for any purpose. It is provided "as is" without express or
+ * implied warranty.
+ *
+ * THE ABOVE LISTED COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD
+ * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
+ * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/*
+ * The ARM32 code here carries the following copyright:
+ *
+ * Copyright 1997
+ * Digital Equipment Corporation. All rights reserved.
+ * This software is furnished under license and may be used and copied only in
+ * accordance with the following terms and conditions. Subject to these
+ * conditions, you may download, copy, install, use, modify and distribute
+ * this software in source and/or binary form. No title or ownership is
+ * transferred hereby.
+ *
+ * 1) Any source code used, modified or distributed must reproduce and retain
+ * this copyright notice and list of conditions as they appear in the
+ * source file.
+ *
+ * 2) No right is granted to use any trade name, trademark, or logo of Digital
+ * Equipment Corporation. Neither the "Digital Equipment Corporation"
+ * name nor any trademark or logo of Digital Equipment Corporation may be
+ * used to endorse or promote products derived from this software without
+ * the prior written permission of Digital Equipment Corporation.
+ *
+ * 3) This software is provided "AS-IS" and any express or implied warranties,
+ * including but not limited to, any implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement are disclaimed.
+ * In no event shall DIGITAL be liable for any damages whatsoever, and in
+ * particular, DIGITAL shall not be liable for special, indirect,
+ * consequential, or incidental damages or damages for lost profits, loss
+ * of revenue or loss of use, whether such damages arise in contract,
+ * negligence, tort, under statute, in equity, at law or otherwise, even
+ * if advised of the possibility of such damage.
+ *
+ */
+
+#ifndef _XF86_OSPROC_H
+#define _XF86_OSPROC_H
+
+/*
+ * The actual prototypes have been pulled into this seperate file so
+ * that they can can be used without pulling in all of the OS specific
+ * stuff like sys/stat.h, etc. This casues problem for loadable modules.
+ */
+
+/*
+ * Flags for xf86MapVidMem(). Multiple flags can be or'd together. The
+ * flags may be used as hints. For example it would be permissible to
+ * enable write combining for memory marked only for framebuffer use.
+ */
+
+#define VIDMEM_FRAMEBUFFER 0x01 /* memory for framebuffer use */
+#define VIDMEM_MMIO 0x02 /* memory for I/O use */
+#define VIDMEM_MMIO_32BIT 0x04 /* memory accesses >= 32bit */
+#define VIDMEM_READSIDEEFFECT 0x08 /* reads can have side-effects */
+#define VIDMEM_SPARSE 0x10 /* sparse mapping required
+ * assumed when VIDMEM_MMIO is
+ * set. May be used with
+ * VIDMEM_FRAMEBUFFER) */
+#define VIDMEM_READONLY 0x20 /* read-only mapping
+ * used when reading BIOS images
+ * through xf86MapVidMem() */
+
+/*
+ * OS-independent modem state flags for xf86SetSerialModemState() and
+ * xf86GetSerialModemState().
+ */
+#define XF86_M_LE 0x001 /* line enable */
+#define XF86_M_DTR 0x002 /* data terminal ready */
+#define XF86_M_RTS 0x004 /* request to send */
+#define XF86_M_ST 0x008 /* secondary transmit */
+#define XF86_M_SR 0x010 /* secondary receive */
+#define XF86_M_CTS 0x020 /* clear to send */
+#define XF86_M_CAR 0x040 /* carrier detect */
+#define XF86_M_RNG 0x080 /* ring */
+#define XF86_M_DSR 0x100 /* data set ready */
+
+#ifndef NO_OSLIB_PROTOTYPES
+/*
+ * This is to prevent re-entrancy to FatalError() when aborting.
+ * Anything that can be called as a result of AbortDDX() should use this
+ * instead of FatalError().
+ */
+
+#define xf86FatalError(a, b) \
+ if (dispatchException & DE_TERMINATE) { \
+ ErrorF(a, b); \
+ ErrorF("\n"); \
+ return; \
+ } else FatalError(a, b)
+
+/***************************************************************************/
+/* Prototypes */
+/***************************************************************************/
+
+#include <X11/Xfuncproto.h>
+#include "opaque.h"
+#include "xf86Optionstr.h"
+
+_XFUNCPROTOBEGIN
+
+/* public functions */
+extern _X_EXPORT Bool xf86LinearVidMem(void);
+extern _X_EXPORT _X_DEPRECATED Bool xf86CheckMTRR(int);
+extern _X_EXPORT _X_DEPRECATED void *xf86MapVidMem(int, int, unsigned long,
+ unsigned long);
+extern _X_EXPORT _X_DEPRECATED void xf86UnMapVidMem(int, void *,
+ unsigned long);
+extern _X_EXPORT int xf86ReadBIOS(unsigned long, unsigned long, unsigned char *,
+ int);
+extern _X_EXPORT Bool xf86EnableIO(void);
+extern _X_EXPORT void xf86DisableIO(void);
+
+#ifdef __NetBSD__
+extern _X_EXPORT void xf86SetTVOut(int);
+extern _X_EXPORT void xf86SetRGBOut(void);
+#endif
+extern _X_EXPORT void xf86OSRingBell(int, int, int);
+extern _X_EXPORT void xf86SetReallySlowBcopy(void);
+extern _X_EXPORT void xf86SlowBcopy(unsigned char *, unsigned char *, int);
+extern _X_EXPORT int xf86OpenSerial(XF86OptionPtr options);
+extern _X_EXPORT int xf86SetSerial(int fd, XF86OptionPtr options);
+extern _X_EXPORT int xf86SetSerialSpeed(int fd, int speed);
+extern _X_EXPORT int xf86ReadSerial(int fd, void *buf, int count);
+extern _X_EXPORT int xf86WriteSerial(int fd, const void *buf, int count);
+extern _X_EXPORT int xf86CloseSerial(int fd);
+extern _X_EXPORT int xf86FlushInput(int fd);
+extern _X_EXPORT int xf86WaitForInput(int fd, int timeout);
+extern _X_EXPORT int xf86SerialSendBreak(int fd, int duration);
+extern _X_EXPORT int xf86SetSerialModemState(int fd, int state);
+extern _X_EXPORT int xf86GetSerialModemState(int fd);
+extern _X_EXPORT int xf86SerialModemSetBits(int fd, int bits);
+extern _X_EXPORT int xf86SerialModemClearBits(int fd, int bits);
+extern _X_EXPORT int xf86LoadKernelModule(const char *pathname);
+
+/* AGP GART interface */
+
+typedef struct _AgpInfo {
+ CARD32 bridgeId;
+ CARD32 agpMode;
+ unsigned long base;
+ unsigned long size;
+ unsigned long totalPages;
+ unsigned long systemPages;
+ unsigned long usedPages;
+} AgpInfo, *AgpInfoPtr;
+
+extern _X_EXPORT Bool xf86AgpGARTSupported(void);
+extern _X_EXPORT AgpInfoPtr xf86GetAGPInfo(int screenNum);
+extern _X_EXPORT Bool xf86AcquireGART(int screenNum);
+extern _X_EXPORT Bool xf86ReleaseGART(int screenNum);
+extern _X_EXPORT int xf86AllocateGARTMemory(int screenNum, unsigned long size,
+ int type, unsigned long *physical);
+extern _X_EXPORT Bool xf86DeallocateGARTMemory(int screenNum, int key);
+extern _X_EXPORT Bool xf86BindGARTMemory(int screenNum, int key,
+ unsigned long offset);
+extern _X_EXPORT Bool xf86UnbindGARTMemory(int screenNum, int key);
+extern _X_EXPORT Bool xf86EnableAGP(int screenNum, CARD32 mode);
+extern _X_EXPORT Bool xf86GARTCloseScreen(int screenNum);
+
+/* These routines are in shared/sigio.c and are not loaded as part of the
+ module. These routines are small, and the code if very POSIX-signal (or
+ OS-signal) specific, so it seemed better to provide more complex
+ wrappers than to wrap each individual function called. */
+extern _X_EXPORT int xf86InstallSIGIOHandler(int fd, void (*f) (int, void *),
+ void *);
+extern _X_EXPORT int xf86RemoveSIGIOHandler(int fd);
+extern _X_EXPORT int xf86BlockSIGIO(void);
+extern _X_EXPORT void xf86UnblockSIGIO(int);
+extern _X_EXPORT void xf86AssertBlockedSIGIO(char *);
+extern _X_EXPORT Bool xf86SIGIOSupported(void);
+
+#ifdef XF86_OS_PRIVS
+typedef void (*PMClose) (void);
+extern _X_EXPORT void xf86OpenConsole(void);
+extern _X_EXPORT void xf86CloseConsole(void);
+extern _X_HIDDEN Bool xf86VTActivate(int vtno);
+extern _X_EXPORT Bool xf86VTSwitchPending(void);
+extern _X_EXPORT Bool xf86VTSwitchAway(void);
+extern _X_EXPORT Bool xf86VTSwitchTo(void);
+extern _X_EXPORT void xf86VTRequest(int sig);
+extern _X_EXPORT int xf86ProcessArgument(int, char **, int);
+extern _X_EXPORT void xf86UseMsg(void);
+extern _X_EXPORT PMClose xf86OSPMOpen(void);
+
+extern _X_EXPORT void xf86InitVidMem(void);
+
+#endif /* XF86_OS_PRIVS */
+
+#ifdef XSERVER_PLATFORM_BUS
+#include "hotplug.h"
+void
+xf86PlatformDeviceProbe(struct OdevAttributes *attribs);
+
+void
+xf86PlatformReprobeDevice(int index, struct OdevAttributes *attribs);
+#endif
+
+_XFUNCPROTOEND
+#endif /* NO_OSLIB_PROTOTYPES */
+#endif /* _XF86_OSPROC_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86cmap.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86cmap.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86cmap.h (working copy)
@@ -0,0 +1,67 @@
+
+/*
+ * Copyright (c) 1998-2001 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+#ifndef _XF86CMAP_H
+#define _XF86CMAP_H
+
+#include "xf86str.h"
+#include "colormapst.h"
+
+#define CMAP_PALETTED_TRUECOLOR 0x0000001
+#define CMAP_RELOAD_ON_MODE_SWITCH 0x0000002
+#define CMAP_LOAD_EVEN_IF_OFFSCREEN 0x0000004
+
+extern _X_EXPORT Bool xf86HandleColormaps(ScreenPtr pScreen,
+ int maxCol,
+ int sigRGBbits,
+ xf86LoadPaletteProc * loadPalette,
+ xf86SetOverscanProc * setOverscan,
+ unsigned int flags);
+
+extern _X_EXPORT Bool xf86ColormapAllocatePrivates(ScrnInfoPtr pScrn);
+
+extern _X_EXPORT int
+ xf86ChangeGamma(ScreenPtr pScreen, Gamma newGamma);
+
+extern _X_EXPORT int
+
+xf86ChangeGammaRamp(ScreenPtr pScreen,
+ int size,
+ unsigned short *red,
+ unsigned short *green, unsigned short *blue);
+
+extern _X_EXPORT int xf86GetGammaRampSize(ScreenPtr pScreen);
+
+extern _X_EXPORT int
+
+xf86GetGammaRamp(ScreenPtr pScreen,
+ int size,
+ unsigned short *red,
+ unsigned short *green, unsigned short *blue);
+
+#endif /* _XF86CMAP_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86fbman.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86fbman.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86fbman.h (working copy)
@@ -0,0 +1,171 @@
+
+/*
+ * Copyright (c) 1998-2001 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+#ifndef _XF86FBMAN_H
+#define _XF86FBMAN_H
+
+#include "scrnintstr.h"
+#include "regionstr.h"
+
+#define FAVOR_AREA_THEN_WIDTH 0
+#define FAVOR_AREA_THEN_HEIGHT 1
+#define FAVOR_WIDTH_THEN_AREA 2
+#define FAVOR_HEIGHT_THEN_AREA 3
+
+#define PRIORITY_LOW 0
+#define PRIORITY_NORMAL 1
+#define PRIORITY_EXTREME 2
+
+typedef struct _FBArea {
+ ScreenPtr pScreen;
+ BoxRec box;
+ int granularity;
+ void (*MoveAreaCallback) (struct _FBArea *, struct _FBArea *);
+ void (*RemoveAreaCallback) (struct _FBArea *);
+ DevUnion devPrivate;
+} FBArea, *FBAreaPtr;
+
+typedef struct _FBLinear {
+ ScreenPtr pScreen;
+ int size;
+ int offset;
+ int granularity;
+ void (*MoveLinearCallback) (struct _FBLinear *, struct _FBLinear *);
+ void (*RemoveLinearCallback) (struct _FBLinear *);
+ DevUnion devPrivate;
+} FBLinear, *FBLinearPtr;
+
+typedef void (*FreeBoxCallbackProcPtr) (ScreenPtr, RegionPtr, void *);
+typedef void (*MoveAreaCallbackProcPtr) (FBAreaPtr, FBAreaPtr);
+typedef void (*RemoveAreaCallbackProcPtr) (FBAreaPtr);
+
+typedef void (*MoveLinearCallbackProcPtr) (FBLinearPtr, FBLinearPtr);
+typedef void (*RemoveLinearCallbackProcPtr) (FBLinearPtr);
+
+typedef struct {
+ FBAreaPtr(*AllocateOffscreenArea) (ScreenPtr pScreen,
+ int w, int h,
+ int granularity,
+ MoveAreaCallbackProcPtr moveCB,
+ RemoveAreaCallbackProcPtr removeCB,
+ void *privData);
+ void (*FreeOffscreenArea) (FBAreaPtr area);
+ Bool (*ResizeOffscreenArea) (FBAreaPtr area, int w, int h);
+ Bool (*QueryLargestOffscreenArea) (ScreenPtr pScreen,
+ int *width, int *height,
+ int granularity,
+ int preferences, int priority);
+ Bool (*RegisterFreeBoxCallback) (ScreenPtr pScreen,
+ FreeBoxCallbackProcPtr FreeBoxCallback,
+ void *devPriv);
+/* linear functions */
+ FBLinearPtr(*AllocateOffscreenLinear) (ScreenPtr pScreen,
+ int size,
+ int granularity,
+ MoveLinearCallbackProcPtr moveCB,
+ RemoveLinearCallbackProcPtr
+ removeCB, void *privData);
+ void (*FreeOffscreenLinear) (FBLinearPtr area);
+ Bool (*ResizeOffscreenLinear) (FBLinearPtr area, int size);
+ Bool (*QueryLargestOffscreenLinear) (ScreenPtr pScreen,
+ int *size,
+ int granularity, int priority);
+ Bool (*PurgeOffscreenAreas) (ScreenPtr);
+} FBManagerFuncs, *FBManagerFuncsPtr;
+
+extern _X_EXPORT Bool xf86RegisterOffscreenManager(ScreenPtr pScreen,
+ FBManagerFuncsPtr funcs);
+
+extern _X_EXPORT Bool
+ xf86InitFBManagerRegion(ScreenPtr pScreen, RegionPtr ScreenRegion);
+
+extern _X_EXPORT Bool
+ xf86InitFBManagerArea(ScreenPtr pScreen, int PixalArea, int Verbosity);
+
+extern _X_EXPORT Bool
+ xf86InitFBManager(ScreenPtr pScreen, BoxPtr FullBox);
+
+extern _X_EXPORT Bool
+ xf86InitFBManagerLinear(ScreenPtr pScreen, int offset, int size);
+
+extern _X_EXPORT Bool
+ xf86FBManagerRunning(ScreenPtr pScreen);
+
+extern _X_EXPORT FBAreaPtr
+xf86AllocateOffscreenArea(ScreenPtr pScreen,
+ int w, int h,
+ int granularity,
+ MoveAreaCallbackProcPtr moveCB,
+ RemoveAreaCallbackProcPtr removeCB, void *privData);
+
+extern _X_EXPORT FBAreaPtr
+xf86AllocateLinearOffscreenArea(ScreenPtr pScreen,
+ int length,
+ int granularity,
+ MoveAreaCallbackProcPtr moveCB,
+ RemoveAreaCallbackProcPtr removeCB,
+ void *privData);
+
+extern _X_EXPORT FBLinearPtr
+xf86AllocateOffscreenLinear(ScreenPtr pScreen,
+ int length,
+ int granularity,
+ MoveLinearCallbackProcPtr moveCB,
+ RemoveLinearCallbackProcPtr removeCB,
+ void *privData);
+
+extern _X_EXPORT void xf86FreeOffscreenArea(FBAreaPtr area);
+extern _X_EXPORT void xf86FreeOffscreenLinear(FBLinearPtr area);
+
+extern _X_EXPORT Bool
+ xf86ResizeOffscreenArea(FBAreaPtr resize, int w, int h);
+
+extern _X_EXPORT Bool
+ xf86ResizeOffscreenLinear(FBLinearPtr resize, int size);
+
+extern _X_EXPORT Bool
+
+xf86RegisterFreeBoxCallback(ScreenPtr pScreen,
+ FreeBoxCallbackProcPtr FreeBoxCallback,
+ void *devPriv);
+
+extern _X_EXPORT Bool
+ xf86PurgeUnlockedOffscreenAreas(ScreenPtr pScreen);
+
+extern _X_EXPORT Bool
+
+xf86QueryLargestOffscreenArea(ScreenPtr pScreen,
+ int *width, int *height,
+ int granularity, int preferences, int priority);
+
+extern _X_EXPORT Bool
+
+xf86QueryLargestOffscreenLinear(ScreenPtr pScreen,
+ int *size, int granularity, int priority);
+
+#endif /* _XF86FBMAN_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86i2c.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86i2c.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86i2c.h (working copy)
@@ -0,0 +1,117 @@
+/*
+ * Copyright (C) 1998 Itai Nahshon, Michael Schimek
+ */
+
+#ifndef _XF86I2C_H
+#define _XF86I2C_H
+
+#include "regionstr.h"
+#include "xf86.h"
+
+typedef unsigned char I2CByte;
+typedef unsigned short I2CSlaveAddr;
+
+typedef struct _I2CBusRec *I2CBusPtr;
+typedef struct _I2CDevRec *I2CDevPtr;
+
+/* I2C masters have to register themselves */
+
+typedef struct _I2CBusRec {
+ char *BusName;
+ int scrnIndex;
+ ScrnInfoPtr pScrn;
+
+ void (*I2CUDelay) (I2CBusPtr b, int usec);
+
+ void (*I2CPutBits) (I2CBusPtr b, int scl, int sda);
+ void (*I2CGetBits) (I2CBusPtr b, int *scl, int *sda);
+
+ /* Look at the generic routines to see how these functions should behave. */
+
+ Bool (*I2CStart) (I2CBusPtr b, int timeout);
+ Bool (*I2CAddress) (I2CDevPtr d, I2CSlaveAddr);
+ void (*I2CStop) (I2CDevPtr d);
+ Bool (*I2CPutByte) (I2CDevPtr d, I2CByte data);
+ Bool (*I2CGetByte) (I2CDevPtr d, I2CByte * data, Bool);
+
+ DevUnion DriverPrivate;
+
+ int HoldTime; /* 1 / bus clock frequency, 5 or 2 usec */
+
+ int BitTimeout; /* usec */
+ int ByteTimeout; /* usec */
+ int AcknTimeout; /* usec */
+ int StartTimeout; /* usec */
+ int RiseFallTime; /* usec */
+
+ I2CDevPtr FirstDev;
+ I2CBusPtr NextBus;
+ Bool (*I2CWriteRead) (I2CDevPtr d, I2CByte * WriteBuffer, int nWrite,
+ I2CByte * ReadBuffer, int nRead);
+} I2CBusRec;
+
+#define CreateI2CBusRec xf86CreateI2CBusRec
+extern _X_EXPORT I2CBusPtr xf86CreateI2CBusRec(void);
+
+#define DestroyI2CBusRec xf86DestroyI2CBusRec
+extern _X_EXPORT void xf86DestroyI2CBusRec(I2CBusPtr pI2CBus, Bool unalloc,
+ Bool devs_too);
+#define I2CBusInit xf86I2CBusInit
+extern _X_EXPORT Bool xf86I2CBusInit(I2CBusPtr pI2CBus);
+
+extern _X_EXPORT I2CBusPtr xf86I2CFindBus(int scrnIndex, char *name);
+extern _X_EXPORT int xf86I2CGetScreenBuses(int scrnIndex,
+ I2CBusPtr ** pppI2CBus);
+
+/* I2C slave devices */
+
+typedef struct _I2CDevRec {
+ const char *DevName;
+
+ int BitTimeout; /* usec */
+ int ByteTimeout; /* usec */
+ int AcknTimeout; /* usec */
+ int StartTimeout; /* usec */
+
+ I2CSlaveAddr SlaveAddr;
+ I2CBusPtr pI2CBus;
+ I2CDevPtr NextDev;
+ DevUnion DriverPrivate;
+} I2CDevRec;
+
+#define CreateI2CDevRec xf86CreateI2CDevRec
+extern _X_EXPORT I2CDevPtr xf86CreateI2CDevRec(void);
+extern _X_EXPORT void xf86DestroyI2CDevRec(I2CDevPtr pI2CDev, Bool unalloc);
+
+#define I2CDevInit xf86I2CDevInit
+extern _X_EXPORT Bool xf86I2CDevInit(I2CDevPtr pI2CDev);
+extern _X_EXPORT I2CDevPtr xf86I2CFindDev(I2CBusPtr, I2CSlaveAddr);
+
+/* See descriptions of these functions in xf86i2c.c */
+
+#define I2CProbeAddress xf86I2CProbeAddress
+extern _X_EXPORT Bool xf86I2CProbeAddress(I2CBusPtr pI2CBus, I2CSlaveAddr);
+
+#define I2C_WriteRead xf86I2CWriteRead
+extern _X_EXPORT Bool xf86I2CWriteRead(I2CDevPtr d, I2CByte * WriteBuffer,
+ int nWrite, I2CByte * ReadBuffer,
+ int nRead);
+#define xf86I2CRead(d, rb, nr) xf86I2CWriteRead(d, NULL, 0, rb, nr)
+
+extern _X_EXPORT Bool xf86I2CReadStatus(I2CDevPtr d, I2CByte * pbyte);
+extern _X_EXPORT Bool xf86I2CReadByte(I2CDevPtr d, I2CByte subaddr,
+ I2CByte * pbyte);
+extern _X_EXPORT Bool xf86I2CReadBytes(I2CDevPtr d, I2CByte subaddr,
+ I2CByte * pbyte, int n);
+extern _X_EXPORT Bool xf86I2CReadWord(I2CDevPtr d, I2CByte subaddr,
+ unsigned short *pword);
+#define xf86I2CWrite(d, wb, nw) xf86I2CWriteRead(d, wb, nw, NULL, 0)
+extern _X_EXPORT Bool xf86I2CWriteByte(I2CDevPtr d, I2CByte subaddr,
+ I2CByte byte);
+extern _X_EXPORT Bool xf86I2CWriteBytes(I2CDevPtr d, I2CByte subaddr,
+ I2CByte * WriteBuffer, int nWrite);
+extern _X_EXPORT Bool xf86I2CWriteWord(I2CDevPtr d, I2CByte subaddr,
+ unsigned short word);
+extern _X_EXPORT Bool xf86I2CWriteVec(I2CDevPtr d, I2CByte * vec, int nValues);
+
+#endif /*_XF86I2C_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86int10.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86int10.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86int10.h (working copy)
@@ -0,0 +1,191 @@
+
+/*
+ * XFree86 int10 module
+ * execute BIOS int 10h calls in x86 real mode environment
+ * Copyright 1999 Egbert Eich
+ */
+
+#ifndef _XF86INT10_H
+#define _XF86INT10_H
+
+#include <X11/Xmd.h>
+#include <X11/Xdefs.h>
+#include "xf86Pci.h"
+
+#define SEG_ADDR(x) (((x) >> 4) & 0x00F000)
+#define SEG_OFF(x) ((x) & 0x0FFFF)
+
+#define SET_BIOS_SCRATCH 0x1
+#define RESTORE_BIOS_SCRATCH 0x2
+
+/* int10 info structure */
+typedef struct {
+ int entityIndex;
+ uint16_t BIOSseg;
+ uint16_t inb40time;
+ ScrnInfoPtr pScrn;
+ void *cpuRegs;
+ char *BIOSScratch;
+ int Flags;
+ void *private;
+ struct _int10Mem *mem;
+ int num;
+ int ax;
+ int bx;
+ int cx;
+ int dx;
+ int si;
+ int di;
+ int es;
+ int bp;
+ int flags;
+ int stackseg;
+ struct pci_device *dev;
+ struct pci_io_handle *io;
+} xf86Int10InfoRec, *xf86Int10InfoPtr;
+
+typedef struct _int10Mem {
+ uint8_t (*rb) (xf86Int10InfoPtr, int);
+ uint16_t (*rw) (xf86Int10InfoPtr, int);
+ uint32_t (*rl) (xf86Int10InfoPtr, int);
+ void (*wb) (xf86Int10InfoPtr, int, uint8_t);
+ void (*ww) (xf86Int10InfoPtr, int, uint16_t);
+ void (*wl) (xf86Int10InfoPtr, int, uint32_t);
+} int10MemRec, *int10MemPtr;
+
+typedef struct {
+ uint8_t save_msr;
+ uint8_t save_pos102;
+ uint8_t save_vse;
+ uint8_t save_46e8;
+} legacyVGARec, *legacyVGAPtr;
+
+/* OS dependent functions */
+extern _X_EXPORT xf86Int10InfoPtr xf86InitInt10(int entityIndex);
+extern _X_EXPORT xf86Int10InfoPtr xf86ExtendedInitInt10(int entityIndex,
+ int Flags);
+extern _X_EXPORT void xf86FreeInt10(xf86Int10InfoPtr pInt);
+extern _X_EXPORT void *xf86Int10AllocPages(xf86Int10InfoPtr pInt, int num,
+ int *off);
+extern _X_EXPORT void xf86Int10FreePages(xf86Int10InfoPtr pInt, void *pbase,
+ int num);
+extern _X_EXPORT void *xf86int10Addr(xf86Int10InfoPtr pInt, uint32_t addr);
+
+/* x86 executor related functions */
+extern _X_EXPORT void xf86ExecX86int10(xf86Int10InfoPtr pInt);
+
+#ifdef _INT10_PRIVATE
+
+#define I_S_DEFAULT_INT_VECT 0xFF065
+#define SYS_SIZE 0x100000
+#define SYS_BIOS 0xF0000
+#if 1
+#define BIOS_SIZE 0x10000
+#else /* a bug in DGUX requires this - let's try it */
+#define BIOS_SIZE (0x10000 - 1)
+#endif
+#define LOW_PAGE_SIZE 0x600
+#define V_RAM 0xA0000
+#define VRAM_SIZE 0x20000
+#define V_BIOS_SIZE 0x10000
+#define V_BIOS 0xC0000
+#define BIOS_SCRATCH_OFF 0x449
+#define BIOS_SCRATCH_END 0x466
+#define BIOS_SCRATCH_LEN (BIOS_SCRATCH_END - BIOS_SCRATCH_OFF + 1)
+#define HIGH_MEM V_BIOS
+#define HIGH_MEM_SIZE (SYS_BIOS - HIGH_MEM)
+#define SEG_ADR(type, seg, reg) type((seg << 4) + (X86_##reg))
+#define SEG_EADR(type, seg, reg) type((seg << 4) + (X86_E##reg))
+
+#define X86_TF_MASK 0x00000100
+#define X86_IF_MASK 0x00000200
+#define X86_IOPL_MASK 0x00003000
+#define X86_NT_MASK 0x00004000
+#define X86_VM_MASK 0x00020000
+#define X86_AC_MASK 0x00040000
+#define X86_VIF_MASK 0x00080000 /* virtual interrupt flag */
+#define X86_VIP_MASK 0x00100000 /* virtual interrupt pending */
+#define X86_ID_MASK 0x00200000
+
+#define MEM_RB(name, addr) (*name->mem->rb)(name, addr)
+#define MEM_RW(name, addr) (*name->mem->rw)(name, addr)
+#define MEM_RL(name, addr) (*name->mem->rl)(name, addr)
+#define MEM_WB(name, addr, val) (*name->mem->wb)(name, addr, val)
+#define MEM_WW(name, addr, val) (*name->mem->ww)(name, addr, val)
+#define MEM_WL(name, addr, val) (*name->mem->wl)(name, addr, val)
+
+/* OS dependent functions */
+extern _X_EXPORT Bool MapCurrentInt10(xf86Int10InfoPtr pInt);
+
+/* x86 executor related functions */
+extern _X_EXPORT Bool xf86Int10ExecSetup(xf86Int10InfoPtr pInt);
+
+/* int.c */
+extern _X_EXPORT xf86Int10InfoPtr Int10Current;
+int int_handler(xf86Int10InfoPtr pInt);
+
+/* helper_exec.c */
+int setup_int(xf86Int10InfoPtr pInt);
+void finish_int(xf86Int10InfoPtr, int sig);
+uint32_t getIntVect(xf86Int10InfoPtr pInt, int num);
+void pushw(xf86Int10InfoPtr pInt, uint16_t val);
+int run_bios_int(int num, xf86Int10InfoPtr pInt);
+void dump_code(xf86Int10InfoPtr pInt);
+void dump_registers(xf86Int10InfoPtr pInt);
+void stack_trace(xf86Int10InfoPtr pInt);
+uint8_t bios_checksum(const uint8_t *start, int size);
+void LockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga);
+void UnlockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga);
+
+#if defined (_PC)
+extern _X_EXPORT void xf86Int10SaveRestoreBIOSVars(xf86Int10InfoPtr pInt,
+ Bool save);
+#endif
+int port_rep_inb(xf86Int10InfoPtr pInt,
+ uint16_t port, uint32_t base, int d_f, uint32_t count);
+int port_rep_inw(xf86Int10InfoPtr pInt,
+ uint16_t port, uint32_t base, int d_f, uint32_t count);
+int port_rep_inl(xf86Int10InfoPtr pInt,
+ uint16_t port, uint32_t base, int d_f, uint32_t count);
+int port_rep_outb(xf86Int10InfoPtr pInt,
+ uint16_t port, uint32_t base, int d_f, uint32_t count);
+int port_rep_outw(xf86Int10InfoPtr pInt,
+ uint16_t port, uint32_t base, int d_f, uint32_t count);
+int port_rep_outl(xf86Int10InfoPtr pInt,
+ uint16_t port, uint32_t base, int d_f, uint32_t count);
+
+uint8_t x_inb(uint16_t port);
+uint16_t x_inw(uint16_t port);
+void x_outb(uint16_t port, uint8_t val);
+void x_outw(uint16_t port, uint16_t val);
+uint32_t x_inl(uint16_t port);
+void x_outl(uint16_t port, uint32_t val);
+
+uint8_t Mem_rb(uint32_t addr);
+uint16_t Mem_rw(uint32_t addr);
+uint32_t Mem_rl(uint32_t addr);
+void Mem_wb(uint32_t addr, uint8_t val);
+void Mem_ww(uint32_t addr, uint16_t val);
+void Mem_wl(uint32_t addr, uint32_t val);
+
+/* helper_mem.c */
+void setup_int_vect(xf86Int10InfoPtr pInt);
+int setup_system_bios(void *base_addr);
+void reset_int_vect(xf86Int10InfoPtr pInt);
+void set_return_trap(xf86Int10InfoPtr pInt);
+extern _X_EXPORT void *xf86HandleInt10Options(ScrnInfoPtr pScrn,
+ int entityIndex);
+Bool int10skip(const void *options);
+Bool int10_check_bios(int scrnIndex, int codeSeg,
+ const unsigned char *vbiosMem);
+Bool initPrimary(const void *options);
+extern _X_EXPORT BusType xf86int10GetBiosLocationType(const xf86Int10InfoPtr
+ pInt);
+extern _X_EXPORT Bool xf86int10GetBiosSegment(xf86Int10InfoPtr pInt,
+ void *base);
+#ifdef DEBUG
+void dprint(unsigned long start, unsigned long size);
+#endif
+
+#endif /* _INT10_PRIVATE */
+#endif /* _XF86INT10_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86platformBus.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86platformBus.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86platformBus.h (working copy)
@@ -0,0 +1,68 @@
+/*
+ * Copyright © 2012 Red Hat.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Author: Dave Airlie <airlied@redhat.com>
+ */
+#ifndef XF86_PLATFORM_BUS_H
+#define XF86_PLATFORM_BUS_H
+
+#include "hotplug.h"
+
+struct xf86_platform_device {
+ struct OdevAttributes *attribs;
+ /* for PCI devices */
+ struct pci_device *pdev;
+};
+
+#ifdef XSERVER_PLATFORM_BUS
+int xf86platformProbe(void);
+int xf86platformProbeDev(DriverPtr drvp);
+
+extern int xf86_num_platform_devices;
+
+extern char *
+xf86_get_platform_attrib(int index, int attrib_id);
+extern int
+xf86_add_platform_device(struct OdevAttributes *attribs);
+extern int
+xf86_remove_platform_device(int dev_index);
+extern Bool
+xf86_add_platform_device_attrib(int index, int attrib_id, char *attrib_str);
+extern Bool
+xf86_get_platform_device_unowned(int index);
+
+extern int
+xf86platformAddDevice(int index);
+extern void
+xf86platformRemoveDevice(int index);
+
+extern _X_EXPORT char *
+xf86_get_platform_device_attrib(struct xf86_platform_device *device, int attrib_id);
+extern _X_EXPORT Bool
+xf86PlatformDeviceCheckBusID(struct xf86_platform_device *device, const char *busid);
+
+extern _X_EXPORT int
+xf86PlatformMatchDriver(char *matches[], int nmatches);
+
+extern void xf86platformVTProbe(void);
+#endif
+
+#endif
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86sbusBus.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86sbusBus.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86sbusBus.h (working copy)
@@ -0,0 +1,111 @@
+/*
+ * SBUS bus-specific declarations
+ *
+ * Copyright (C) 2000 Jakub Jelinek (jakub@redhat.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * JAKUB JELINEK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef _XF86_SBUSBUS_H
+#define _XF86_SBUSBUS_H
+
+#include "xf86str.h"
+
+#define SBUS_DEVICE_BW2 0x0001
+#define SBUS_DEVICE_CG2 0x0002
+#define SBUS_DEVICE_CG3 0x0003
+#define SBUS_DEVICE_CG4 0x0004
+#define SBUS_DEVICE_CG6 0x0005
+#define SBUS_DEVICE_CG8 0x0006
+#define SBUS_DEVICE_CG12 0x0007
+#define SBUS_DEVICE_CG14 0x0008
+#define SBUS_DEVICE_LEO 0x0009
+#define SBUS_DEVICE_TCX 0x000a
+#define SBUS_DEVICE_FFB 0x000b
+#define SBUS_DEVICE_GT 0x000c
+#define SBUS_DEVICE_MGX 0x000d
+
+typedef struct sbus_prom_node {
+ int node;
+ /* Because of misdesigned openpromio */
+ int cookie[2];
+} sbusPromNode, *sbusPromNodePtr;
+
+typedef struct sbus_device {
+ int devId;
+ int fbNum;
+ int fd;
+ int width, height;
+ sbusPromNode node;
+ const char *descr;
+ const char *device;
+} sbusDevice, *sbusDevicePtr;
+
+struct sbus_devtable {
+ int devId;
+ int fbType;
+ const char *promName;
+ const char *driverName;
+ const char *descr;
+};
+
+extern _X_EXPORT void xf86SbusProbe(void);
+extern _X_EXPORT sbusDevicePtr *xf86SbusInfo;
+extern _X_EXPORT struct sbus_devtable sbusDeviceTable[];
+
+extern _X_EXPORT int xf86MatchSbusInstances(const char *driverName,
+ int sbusDevId, GDevPtr * devList,
+ int numDevs, DriverPtr drvp,
+ int **foundEntities);
+extern _X_EXPORT sbusDevicePtr xf86GetSbusInfoForEntity(int entityIndex);
+extern _X_EXPORT int xf86GetEntityForSbusInfo(sbusDevicePtr psdp);
+extern _X_EXPORT void xf86SbusUseBuiltinMode(ScrnInfoPtr pScrn,
+ sbusDevicePtr psdp);
+extern _X_EXPORT void *xf86MapSbusMem(sbusDevicePtr psdp,
+ unsigned long offset,
+ unsigned long size);
+extern _X_EXPORT void xf86UnmapSbusMem(sbusDevicePtr psdp, void *addr,
+ unsigned long size);
+extern _X_EXPORT void xf86SbusHideOsHwCursor(sbusDevicePtr psdp);
+extern _X_EXPORT void xf86SbusSetOsHwCursorCmap(sbusDevicePtr psdp, int bg,
+ int fg);
+extern _X_EXPORT Bool xf86SbusHandleColormaps(ScreenPtr pScreen,
+ sbusDevicePtr psdp);
+
+extern _X_EXPORT int promRootNode;
+
+extern _X_EXPORT int promGetSibling(int node);
+extern _X_EXPORT int promGetChild(int node);
+extern _X_EXPORT char *promGetProperty(const char *prop, int *lenp);
+extern _X_EXPORT int promGetBool(const char *prop);
+
+extern _X_EXPORT int sparcPromInit(void);
+extern _X_EXPORT void sparcPromClose(void);
+extern _X_EXPORT char *sparcPromGetProperty(sbusPromNodePtr pnode,
+ const char *prop, int *lenp);
+extern _X_EXPORT int sparcPromGetBool(sbusPromNodePtr pnode, const char *prop);
+extern _X_EXPORT void sparcPromAssignNodes(void);
+extern _X_EXPORT char *sparcPromNode2Pathname(sbusPromNodePtr pnode);
+extern _X_EXPORT int sparcPromPathname2Node(const char *pathName);
+extern _X_EXPORT char *sparcDriverName(void);
+
+extern Bool xf86SbusConfigure(void *busData, sbusDevicePtr sBus);
+extern void xf86SbusConfigureNewDev(void *busData, sbusDevicePtr sBus,
+ GDevRec * GDev);
+
+#endif /* _XF86_SBUSBUS_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86str.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86str.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86str.h (working copy)
@@ -0,0 +1,899 @@
+
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+/*
+ * This file contains definitions of the public XFree86 data structures/types.
+ * Any data structures that video drivers need to access should go here.
+ */
+
+#ifndef _XF86STR_H
+#define _XF86STR_H
+
+#include "misc.h"
+#include "input.h"
+#include "scrnintstr.h"
+#include "pixmapstr.h"
+#include "colormapst.h"
+#include "xf86Module.h"
+#include "xf86Opt.h"
+
+/**
+ * Integer type that is of the size of the addressable memory (machine size).
+ * On most platforms \c uintptr_t will suffice. However, on some mixed
+ * 32-bit / 64-bit platforms, such as 32-bit binaries on 64-bit PowerPC, this
+ * must be 64-bits.
+ */
+#include <inttypes.h>
+#if defined(__powerpc__)
+typedef uint64_t memType;
+#else
+typedef uintptr_t memType;
+#endif
+
+/* Video mode flags */
+
+typedef enum {
+ V_PHSYNC = 0x0001,
+ V_NHSYNC = 0x0002,
+ V_PVSYNC = 0x0004,
+ V_NVSYNC = 0x0008,
+ V_INTERLACE = 0x0010,
+ V_DBLSCAN = 0x0020,
+ V_CSYNC = 0x0040,
+ V_PCSYNC = 0x0080,
+ V_NCSYNC = 0x0100,
+ V_HSKEW = 0x0200, /* hskew provided */
+ V_BCAST = 0x0400,
+ V_PIXMUX = 0x1000,
+ V_DBLCLK = 0x2000,
+ V_CLKDIV2 = 0x4000
+} ModeFlags;
+
+typedef enum {
+ INTERLACE_HALVE_V = 0x0001 /* Halve V values for interlacing */
+} CrtcAdjustFlags;
+
+/* Flags passed to ChipValidMode() */
+typedef enum {
+ MODECHECK_INITIAL = 0,
+ MODECHECK_FINAL = 1
+} ModeCheckFlags;
+
+/* These are possible return values for xf86CheckMode() and ValidMode() */
+typedef enum {
+ MODE_OK = 0, /* Mode OK */
+ MODE_HSYNC, /* hsync out of range */
+ MODE_VSYNC, /* vsync out of range */
+ MODE_H_ILLEGAL, /* mode has illegal horizontal timings */
+ MODE_V_ILLEGAL, /* mode has illegal horizontal timings */
+ MODE_BAD_WIDTH, /* requires an unsupported linepitch */
+ MODE_NOMODE, /* no mode with a maching name */
+ MODE_NO_INTERLACE, /* interlaced mode not supported */
+ MODE_NO_DBLESCAN, /* doublescan mode not supported */
+ MODE_NO_VSCAN, /* multiscan mode not supported */
+ MODE_MEM, /* insufficient video memory */
+ MODE_VIRTUAL_X, /* mode width too large for specified virtual size */
+ MODE_VIRTUAL_Y, /* mode height too large for specified virtual size */
+ MODE_MEM_VIRT, /* insufficient video memory given virtual size */
+ MODE_NOCLOCK, /* no fixed clock available */
+ MODE_CLOCK_HIGH, /* clock required is too high */
+ MODE_CLOCK_LOW, /* clock required is too low */
+ MODE_CLOCK_RANGE, /* clock/mode isn't in a ClockRange */
+ MODE_BAD_HVALUE, /* horizontal timing was out of range */
+ MODE_BAD_VVALUE, /* vertical timing was out of range */
+ MODE_BAD_VSCAN, /* VScan value out of range */
+ MODE_HSYNC_NARROW, /* horizontal sync too narrow */
+ MODE_HSYNC_WIDE, /* horizontal sync too wide */
+ MODE_HBLANK_NARROW, /* horizontal blanking too narrow */
+ MODE_HBLANK_WIDE, /* horizontal blanking too wide */
+ MODE_VSYNC_NARROW, /* vertical sync too narrow */
+ MODE_VSYNC_WIDE, /* vertical sync too wide */
+ MODE_VBLANK_NARROW, /* vertical blanking too narrow */
+ MODE_VBLANK_WIDE, /* vertical blanking too wide */
+ MODE_PANEL, /* exceeds panel dimensions */
+ MODE_INTERLACE_WIDTH, /* width too large for interlaced mode */
+ MODE_ONE_WIDTH, /* only one width is supported */
+ MODE_ONE_HEIGHT, /* only one height is supported */
+ MODE_ONE_SIZE, /* only one resolution is supported */
+ MODE_NO_REDUCED, /* monitor doesn't accept reduced blanking */
+ MODE_BANDWIDTH, /* mode requires too much memory bandwidth */
+ MODE_BAD = -2, /* unspecified reason */
+ MODE_ERROR = -1 /* error condition */
+} ModeStatus;
+
+/*
+ * The mode sets are, from best to worst: USERDEF, DRIVER, and DEFAULT/BUILTIN.
+ * Preferred will bubble a mode to the top within a set.
+ */
+#define M_T_BUILTIN 0x01 /* built-in mode */
+#define M_T_CLOCK_C (0x02 | M_T_BUILTIN) /* built-in mode - configure clock */
+#define M_T_CRTC_C (0x04 | M_T_BUILTIN) /* built-in mode - configure CRTC */
+#define M_T_CLOCK_CRTC_C (M_T_CLOCK_C | M_T_CRTC_C)
+ /* built-in mode - configure CRTC and clock */
+#define M_T_PREFERRED 0x08 /* preferred mode within a set */
+#define M_T_DEFAULT 0x10 /* (VESA) default modes */
+#define M_T_USERDEF 0x20 /* One of the modes from the config file */
+#define M_T_DRIVER 0x40 /* Supplied by the driver (EDID, etc) */
+#define M_T_USERPREF 0x80 /* mode preferred by the user config */
+
+/* Video mode */
+typedef struct _DisplayModeRec {
+ struct _DisplayModeRec *prev;
+ struct _DisplayModeRec *next;
+ const char *name; /* identifier for the mode */
+ ModeStatus status;
+ int type;
+
+ /* These are the values that the user sees/provides */
+ int Clock; /* pixel clock freq (kHz) */
+ int HDisplay; /* horizontal timing */
+ int HSyncStart;
+ int HSyncEnd;
+ int HTotal;
+ int HSkew;
+ int VDisplay; /* vertical timing */
+ int VSyncStart;
+ int VSyncEnd;
+ int VTotal;
+ int VScan;
+ int Flags;
+
+ /* These are the values the hardware uses */
+ int ClockIndex;
+ int SynthClock; /* Actual clock freq to
+ * be programmed (kHz) */
+ int CrtcHDisplay;
+ int CrtcHBlankStart;
+ int CrtcHSyncStart;
+ int CrtcHSyncEnd;
+ int CrtcHBlankEnd;
+ int CrtcHTotal;
+ int CrtcHSkew;
+ int CrtcVDisplay;
+ int CrtcVBlankStart;
+ int CrtcVSyncStart;
+ int CrtcVSyncEnd;
+ int CrtcVBlankEnd;
+ int CrtcVTotal;
+ Bool CrtcHAdjusted;
+ Bool CrtcVAdjusted;
+ int PrivSize;
+ INT32 *Private;
+ int PrivFlags;
+
+ float HSync, VRefresh;
+} DisplayModeRec, *DisplayModePtr;
+
+/* The monitor description */
+
+#define MAX_HSYNC 8
+#define MAX_VREFRESH 8
+
+typedef struct {
+ float hi, lo;
+} range;
+
+typedef struct {
+ CARD32 red, green, blue;
+} rgb;
+
+typedef struct {
+ float red, green, blue;
+} Gamma;
+
+/* The permitted gamma range is 1 / GAMMA_MAX <= g <= GAMMA_MAX */
+#define GAMMA_MAX 10.0
+#define GAMMA_MIN (1.0 / GAMMA_MAX)
+#define GAMMA_ZERO (GAMMA_MIN / 100.0)
+
+typedef struct {
+ const char *id;
+ const char *vendor;
+ const char *model;
+ int nHsync;
+ range hsync[MAX_HSYNC];
+ int nVrefresh;
+ range vrefresh[MAX_VREFRESH];
+ DisplayModePtr Modes; /* Start of the monitor's mode list */
+ DisplayModePtr Last; /* End of the monitor's mode list */
+ Gamma gamma; /* Gamma of the monitor */
+ int widthmm;
+ int heightmm;
+ void *options;
+ void *DDC;
+ Bool reducedblanking; /* Allow CVT reduced blanking modes? */
+ int maxPixClock; /* in kHz, like mode->Clock */
+} MonRec, *MonPtr;
+
+/* the list of clock ranges */
+typedef struct x_ClockRange {
+ struct x_ClockRange *next;
+ int minClock; /* (kHz) */
+ int maxClock; /* (kHz) */
+ int clockIndex; /* -1 for programmable clocks */
+ Bool interlaceAllowed;
+ Bool doubleScanAllowed;
+ int ClockMulFactor;
+ int ClockDivFactor;
+ int PrivFlags;
+} ClockRange, *ClockRangePtr;
+
+/*
+ * The driverFunc. xorgDriverFuncOp specifies the action driver should
+ * perform. If requested option is not supported function should return
+ * FALSE. pointer can be used to pass arguments to the function or
+ * to return data to the caller.
+ */
+typedef struct _ScrnInfoRec *ScrnInfoPtr;
+
+/* do not change order */
+typedef enum {
+ RR_GET_INFO,
+ RR_SET_CONFIG,
+ RR_GET_MODE_MM,
+ GET_REQUIRED_HW_INTERFACES = 10
+} xorgDriverFuncOp;
+
+typedef Bool xorgDriverFuncProc(ScrnInfoPtr, xorgDriverFuncOp, void *);
+
+/* RR_GET_INFO, RR_SET_CONFIG */
+typedef struct {
+ int rotation;
+ int rate;
+ int width;
+ int height;
+} xorgRRConfig;
+
+typedef union {
+ short RRRotations;
+ xorgRRConfig RRConfig;
+} xorgRRRotation, *xorgRRRotationPtr;
+
+/* RR_GET_MODE_MM */
+typedef struct {
+ DisplayModePtr mode;
+ int virtX;
+ int virtY;
+ int mmWidth;
+ int mmHeight;
+} xorgRRModeMM, *xorgRRModeMMPtr;
+
+/* GET_REQUIRED_HW_INTERFACES */
+#define HW_IO 1
+#define HW_MMIO 2
+#define HW_SKIP_CONSOLE 4
+#define NEED_IO_ENABLED(x) (x & HW_IO)
+
+typedef CARD32 xorgHWFlags;
+
+/*
+ * The driver list struct. This contains the information required for each
+ * driver before a ScrnInfoRec has been allocated.
+ */
+struct _DriverRec;
+
+typedef struct {
+ int driverVersion;
+ const char *driverName;
+ void (*Identify) (int flags);
+ Bool (*Probe) (struct _DriverRec * drv, int flags);
+ const OptionInfoRec *(*AvailableOptions) (int chipid, int bustype);
+ void *module;
+ int refCount;
+} DriverRec1;
+
+struct _SymTabRec;
+struct _PciChipsets;
+
+struct pci_device;
+struct xf86_platform_device;
+
+typedef struct _DriverRec {
+ int driverVersion;
+ const char *driverName;
+ void (*Identify) (int flags);
+ Bool (*Probe) (struct _DriverRec * drv, int flags);
+ const OptionInfoRec *(*AvailableOptions) (int chipid, int bustype);
+ void *module;
+ int refCount;
+ xorgDriverFuncProc *driverFunc;
+
+ const struct pci_id_match *supported_devices;
+ Bool (*PciProbe) (struct _DriverRec * drv, int entity_num,
+ struct pci_device * dev, intptr_t match_data);
+ Bool (*platformProbe) (struct _DriverRec * drv, int entity_num, int flags,
+ struct xf86_platform_device * dev, intptr_t match_data);
+} DriverRec, *DriverPtr;
+
+/*
+ * platform probe flags
+ */
+#define PLATFORM_PROBE_GPU_SCREEN 1
+
+/*
+ * AddDriver flags
+ */
+#define HaveDriverFuncs 1
+
+/*
+ * These are the private bus types. New types can be added here. Types
+ * required for the public interface should be added to xf86str.h, with
+ * function prototypes added to xf86.h.
+ */
+
+/* Tolerate prior #include <linux/input.h> */
+#if defined(linux)
+#undef BUS_NONE
+#undef BUS_PCI
+#undef BUS_SBUS
+#undef BUS_PLATFORM
+#undef BUS_last
+#endif
+
+typedef enum {
+ BUS_NONE,
+ BUS_PCI,
+ BUS_SBUS,
+ BUS_PLATFORM,
+ BUS_last /* Keep last */
+} BusType;
+
+typedef struct {
+ int fbNum;
+} SbusBusId;
+
+typedef struct _bus {
+ BusType type;
+ union {
+ struct pci_device *pci;
+ SbusBusId sbus;
+ struct xf86_platform_device *plat;
+ } id;
+} BusRec, *BusPtr;
+
+#define MAXCLOCKS 128
+typedef enum {
+ DAC_BPP8 = 0,
+ DAC_BPP16,
+ DAC_BPP24,
+ DAC_BPP32,
+ MAXDACSPEEDS
+} DacSpeedIndex;
+
+typedef struct {
+ const char *identifier;
+ const char *vendor;
+ const char *board;
+ const char *chipset;
+ const char *ramdac;
+ const char *driver;
+ struct _confscreenrec *myScreenSection;
+ Bool claimed;
+ int dacSpeeds[MAXDACSPEEDS];
+ int numclocks;
+ int clock[MAXCLOCKS];
+ const char *clockchip;
+ const char *busID;
+ Bool active;
+ Bool inUse;
+ int videoRam;
+ int textClockFreq;
+ unsigned long BiosBase; /* Base address of video BIOS */
+ unsigned long MemBase; /* Frame buffer base address */
+ unsigned long IOBase;
+ int chipID;
+ int chipRev;
+ void *options;
+ int irq;
+ int screen; /* For multi-CRTC cards */
+} GDevRec, *GDevPtr;
+
+typedef struct {
+ int frameX0;
+ int frameY0;
+ int virtualX;
+ int virtualY;
+ int depth;
+ int fbbpp;
+ rgb weight;
+ rgb blackColour;
+ rgb whiteColour;
+ int defaultVisual;
+ const char **modes;
+ void *options;
+} DispRec, *DispPtr;
+
+typedef struct _confxvportrec {
+ const char *identifier;
+ void *options;
+} confXvPortRec, *confXvPortPtr;
+
+typedef struct _confxvadaptrec {
+ const char *identifier;
+ int numports;
+ confXvPortPtr ports;
+ void *options;
+} confXvAdaptorRec, *confXvAdaptorPtr;
+
+typedef struct _confscreenrec {
+ const char *id;
+ int screennum;
+ int defaultdepth;
+ int defaultbpp;
+ int defaultfbbpp;
+ MonPtr monitor;
+ GDevPtr device;
+ int numdisplays;
+ DispPtr displays;
+ int numxvadaptors;
+ confXvAdaptorPtr xvadaptors;
+ void *options;
+} confScreenRec, *confScreenPtr;
+
+typedef enum {
+ PosObsolete = -1,
+ PosAbsolute = 0,
+ PosRightOf,
+ PosLeftOf,
+ PosAbove,
+ PosBelow,
+ PosRelative
+} PositionType;
+
+typedef struct _screenlayoutrec {
+ confScreenPtr screen;
+ const char *topname;
+ confScreenPtr top;
+ const char *bottomname;
+ confScreenPtr bottom;
+ const char *leftname;
+ confScreenPtr left;
+ const char *rightname;
+ confScreenPtr right;
+ PositionType where;
+ int x;
+ int y;
+ const char *refname;
+ confScreenPtr refscreen;
+} screenLayoutRec, *screenLayoutPtr;
+
+typedef struct _InputInfoRec InputInfoRec;
+
+typedef struct _serverlayoutrec {
+ const char *id;
+ screenLayoutPtr screens;
+ GDevPtr inactives;
+ InputInfoRec **inputs; /* NULL terminated */
+ void *options;
+} serverLayoutRec, *serverLayoutPtr;
+
+typedef struct _confdribufferrec {
+ int count;
+ int size;
+ enum {
+ XF86DRI_WC_HINT = 0x0001 /* Placeholder: not implemented */
+ } flags;
+} confDRIBufferRec, *confDRIBufferPtr;
+
+typedef struct _confdrirec {
+ int group;
+ int mode;
+ int bufs_count;
+ confDRIBufferRec *bufs;
+} confDRIRec, *confDRIPtr;
+
+/* These values should be adjusted when new fields are added to ScrnInfoRec */
+#define NUM_RESERVED_INTS 16
+#define NUM_RESERVED_POINTERS 14
+#define NUM_RESERVED_FUNCS 10
+
+typedef void *(*funcPointer) (void);
+
+/* flags for depth 24 pixmap options */
+typedef enum {
+ Pix24DontCare = 0,
+ Pix24Use24,
+ Pix24Use32
+} Pix24Flags;
+
+/* Power management events: so far we only support APM */
+
+typedef enum {
+ XF86_APM_UNKNOWN = -1,
+ XF86_APM_SYS_STANDBY,
+ XF86_APM_SYS_SUSPEND,
+ XF86_APM_CRITICAL_SUSPEND,
+ XF86_APM_USER_STANDBY,
+ XF86_APM_USER_SUSPEND,
+ XF86_APM_STANDBY_RESUME,
+ XF86_APM_NORMAL_RESUME,
+ XF86_APM_CRITICAL_RESUME,
+ XF86_APM_LOW_BATTERY,
+ XF86_APM_POWER_STATUS_CHANGE,
+ XF86_APM_UPDATE_TIME,
+ XF86_APM_CAPABILITY_CHANGED,
+ XF86_APM_STANDBY_FAILED,
+ XF86_APM_SUSPEND_FAILED
+} pmEvent;
+
+typedef enum {
+ PM_WAIT,
+ PM_CONTINUE,
+ PM_FAILED,
+ PM_NONE
+} pmWait;
+
+typedef struct _PciChipsets {
+ /**
+ * Key used to match this device with its name in an array of
+ * \c SymTabRec.
+ */
+ int numChipset;
+
+ /**
+ * This value is quirky. Depending on the driver, it can take on one of
+ * three meanings. In drivers that have exactly one vendor ID (e.g.,
+ * radeon, mga, i810) the low 16-bits are the device ID.
+ *
+ * In drivers that can have multiple vendor IDs (e.g., the glint driver
+ * can have either 3dlabs' ID or TI's ID, the i740 driver can have either
+ * Intel's ID or Real3D's ID, etc.) the low 16-bits are the device ID and
+ * the high 16-bits are the vendor ID.
+ *
+ * In drivers that don't have a specific vendor (e.g., vga) contains the
+ * device ID for either the generic VGA or generic 8514 devices. This
+ * turns out to be the same as the subclass and programming interface
+ * value (e.g., the full 24-bit class for the VGA device is 0x030000 (or
+ * 0x000101) and for 8514 is 0x030001).
+ */
+ int PCIid;
+
+/* dummy place holders for drivers to build against old/new servers */
+#define RES_UNDEFINED NULL
+#define RES_EXCLUSIVE_VGA NULL
+#define RES_SHARED_VGA NULL
+ void *dummy;
+} PciChipsets;
+
+/* Entity properties */
+typedef void (*EntityProc) (int entityIndex, void *private);
+
+typedef struct _entityInfo {
+ int index;
+ BusRec location;
+ int chipset;
+ Bool active;
+ GDevPtr device;
+ DriverPtr driver;
+} EntityInfoRec, *EntityInfoPtr;
+
+/* DGA */
+
+typedef struct {
+ int num; /* A unique identifier for the mode (num > 0) */
+ DisplayModePtr mode;
+ int flags; /* DGA_CONCURRENT_ACCESS, etc... */
+ int imageWidth; /* linear accessible portion (pixels) */
+ int imageHeight;
+ int pixmapWidth; /* Xlib accessible portion (pixels) */
+ int pixmapHeight; /* both fields ignored if no concurrent access */
+ int bytesPerScanline;
+ int byteOrder; /* MSBFirst, LSBFirst */
+ int depth;
+ int bitsPerPixel;
+ unsigned long red_mask;
+ unsigned long green_mask;
+ unsigned long blue_mask;
+ short visualClass;
+ int viewportWidth;
+ int viewportHeight;
+ int xViewportStep; /* viewport position granularity */
+ int yViewportStep;
+ int maxViewportX; /* max viewport origin */
+ int maxViewportY;
+ int viewportFlags; /* types of page flipping possible */
+ int offset; /* offset into physical memory */
+ unsigned char *address; /* server's mapped framebuffer */
+ int reserved1;
+ int reserved2;
+} DGAModeRec, *DGAModePtr;
+
+typedef struct {
+ DGAModePtr mode;
+ PixmapPtr pPix;
+} DGADeviceRec, *DGADevicePtr;
+
+/*
+ * Flags for driver Probe() functions.
+ */
+#define PROBE_DEFAULT 0x00
+#define PROBE_DETECT 0x01
+#define PROBE_TRYHARD 0x02
+
+/*
+ * Driver entry point types
+ */
+
+typedef Bool xf86ProbeProc(DriverPtr, int);
+typedef Bool xf86PreInitProc(ScrnInfoPtr, int);
+typedef Bool xf86ScreenInitProc(ScreenPtr, int, char **);
+typedef Bool xf86SwitchModeProc(ScrnInfoPtr, DisplayModePtr);
+typedef void xf86AdjustFrameProc(ScrnInfoPtr, int, int);
+typedef Bool xf86EnterVTProc(ScrnInfoPtr);
+typedef void xf86LeaveVTProc(ScrnInfoPtr);
+typedef void xf86FreeScreenProc(ScrnInfoPtr);
+typedef ModeStatus xf86ValidModeProc(ScrnInfoPtr, DisplayModePtr, Bool, int);
+typedef void xf86EnableDisableFBAccessProc(ScrnInfoPtr, Bool);
+typedef int xf86SetDGAModeProc(ScrnInfoPtr, int, DGADevicePtr);
+typedef int xf86ChangeGammaProc(ScrnInfoPtr, Gamma);
+typedef void xf86PointerMovedProc(ScrnInfoPtr, int, int);
+typedef Bool xf86PMEventProc(ScrnInfoPtr, pmEvent, Bool);
+typedef void xf86DPMSSetProc(ScrnInfoPtr, int, int);
+typedef void xf86LoadPaletteProc(ScrnInfoPtr, int, int *, LOCO *, VisualPtr);
+typedef void xf86SetOverscanProc(ScrnInfoPtr, int);
+typedef void xf86ModeSetProc(ScrnInfoPtr);
+
+/*
+ * ScrnInfoRec
+ *
+ * There is one of these for each screen, and it holds all the screen-specific
+ * information.
+ *
+ * Note: the size and layout must be kept the same across versions. New
+ * fields are to be added in place of the "reserved*" fields. No fields
+ * are to be dependent on compile-time defines.
+ */
+
+typedef struct _ScrnInfoRec {
+ int driverVersion;
+ const char *driverName; /* canonical name used in */
+ /* the config file */
+ ScreenPtr pScreen; /* Pointer to the ScreenRec */
+ int scrnIndex; /* Number of this screen */
+ Bool configured; /* Is this screen valid */
+ int origIndex; /* initial number assigned to
+ * this screen before
+ * finalising the number of
+ * available screens */
+
+ /* Display-wide screenInfo values needed by this screen */
+ int imageByteOrder;
+ int bitmapScanlineUnit;
+ int bitmapScanlinePad;
+ int bitmapBitOrder;
+ int numFormats;
+ PixmapFormatRec formats[MAXFORMATS];
+ PixmapFormatRec fbFormat;
+
+ int bitsPerPixel; /* fb bpp */
+ Pix24Flags pixmap24; /* pixmap pref for depth 24 */
+ int depth; /* depth of default visual */
+ MessageType depthFrom; /* set from config? */
+ MessageType bitsPerPixelFrom; /* set from config? */
+ rgb weight; /* r/g/b weights */
+ rgb mask; /* rgb masks */
+ rgb offset; /* rgb offsets */
+ int rgbBits; /* Number of bits in r/g/b */
+ Gamma gamma; /* Gamma of the monitor */
+ int defaultVisual; /* default visual class */
+ int maxHValue; /* max horizontal timing */
+ int maxVValue; /* max vertical timing value */
+ int virtualX; /* Virtual width */
+ int virtualY; /* Virtual height */
+ int xInc; /* Horizontal timing increment */
+ MessageType virtualFrom; /* set from config? */
+ int displayWidth; /* memory pitch */
+ int frameX0; /* viewport position */
+ int frameY0;
+ int frameX1;
+ int frameY1;
+ int zoomLocked; /* Disallow mode changes */
+ DisplayModePtr modePool; /* list of compatible modes */
+ DisplayModePtr modes; /* list of actual modes */
+ DisplayModePtr currentMode; /* current mode
+ * This was previously
+ * overloaded with the modes
+ * field, which is a pointer
+ * into a circular list */
+ confScreenPtr confScreen; /* Screen config info */
+ MonPtr monitor; /* Monitor information */
+ DispPtr display; /* Display information */
+ int *entityList; /* List of device entities */
+ int numEntities;
+ int widthmm; /* physical display dimensions
+ * in mm */
+ int heightmm;
+ int xDpi; /* width DPI */
+ int yDpi; /* height DPI */
+ const char *name; /* Name to prefix messages */
+ void *driverPrivate; /* Driver private area */
+ DevUnion *privates; /* Other privates can hook in
+ * here */
+ DriverPtr drv; /* xf86DriverList[] entry */
+ void *module; /* Pointer to module head */
+ int colorKey;
+ int overlayFlags;
+
+ /* Some of these may be moved out of here into the driver private area */
+
+ const char *chipset; /* chipset name */
+ const char *ramdac; /* ramdac name */
+ const char *clockchip; /* clock name */
+ Bool progClock; /* clock is programmable */
+ int numClocks; /* number of clocks */
+ int clock[MAXCLOCKS]; /* list of clock frequencies */
+ int videoRam; /* amount of video ram (kb) */
+ unsigned long biosBase; /* Base address of video BIOS */
+ unsigned long memPhysBase; /* Physical address of FB */
+ unsigned long fbOffset; /* Offset of FB in the above */
+ int memClk; /* memory clock */
+ int textClockFreq; /* clock of text mode */
+ Bool flipPixels; /* swap default black/white */
+ void *options;
+
+ int chipID;
+ int chipRev;
+
+ /* Allow screens to be enabled/disabled individually */
+ Bool vtSema;
+
+ /* hw cursor moves at SIGIO time */
+ Bool silkenMouse;
+
+ /* Storage for clockRanges and adjustFlags for use with the VidMode ext */
+ ClockRangePtr clockRanges;
+ int adjustFlags;
+
+ /*
+ * These can be used when the minor ABI version is incremented.
+ * The NUM_* parameters must be reduced appropriately to keep the
+ * structure size and alignment unchanged.
+ */
+ int reservedInt[NUM_RESERVED_INTS];
+
+ int *entityInstanceList;
+ struct pci_device *vgaDev;
+
+ void *reservedPtr[NUM_RESERVED_POINTERS];
+
+ /*
+ * Driver entry points.
+ *
+ */
+
+ xf86ProbeProc *Probe;
+ xf86PreInitProc *PreInit;
+ xf86ScreenInitProc *ScreenInit;
+ xf86SwitchModeProc *SwitchMode;
+ xf86AdjustFrameProc *AdjustFrame;
+ xf86EnterVTProc *EnterVT;
+ xf86LeaveVTProc *LeaveVT;
+ xf86FreeScreenProc *FreeScreen;
+ xf86ValidModeProc *ValidMode;
+ xf86EnableDisableFBAccessProc *EnableDisableFBAccess;
+ xf86SetDGAModeProc *SetDGAMode;
+ xf86ChangeGammaProc *ChangeGamma;
+ xf86PointerMovedProc *PointerMoved;
+ xf86PMEventProc *PMEvent;
+ xf86DPMSSetProc *DPMSSet;
+ xf86LoadPaletteProc *LoadPalette;
+ xf86SetOverscanProc *SetOverscan;
+ xorgDriverFuncProc *DriverFunc;
+ xf86ModeSetProc *ModeSet;
+
+ /*
+ * This can be used when the minor ABI version is incremented.
+ * The NUM_* parameter must be reduced appropriately to keep the
+ * structure size and alignment unchanged.
+ */
+ funcPointer reservedFuncs[NUM_RESERVED_FUNCS];
+
+ Bool is_gpu;
+ uint32_t capabilities;
+} ScrnInfoRec;
+
+typedef struct {
+ Bool (*OpenFramebuffer) (ScrnInfoPtr pScrn,
+ char **name,
+ unsigned char **mem,
+ int *size, int *offset, int *extra);
+ void (*CloseFramebuffer) (ScrnInfoPtr pScrn);
+ Bool (*SetMode) (ScrnInfoPtr pScrn, DGAModePtr pMode);
+ void (*SetViewport) (ScrnInfoPtr pScrn, int x, int y, int flags);
+ int (*GetViewport) (ScrnInfoPtr pScrn);
+ void (*Sync) (ScrnInfoPtr);
+ void (*FillRect) (ScrnInfoPtr pScrn,
+ int x, int y, int w, int h, unsigned long color);
+ void (*BlitRect) (ScrnInfoPtr pScrn,
+ int srcx, int srcy, int w, int h, int dstx, int dsty);
+ void (*BlitTransRect) (ScrnInfoPtr pScrn,
+ int srcx, int srcy,
+ int w, int h,
+ int dstx, int dsty, unsigned long color);
+} DGAFunctionRec, *DGAFunctionPtr;
+
+typedef struct _SymTabRec {
+ int token; /* id of the token */
+ const char *name; /* token name */
+} SymTabRec, *SymTabPtr;
+
+/* flags for xf86LookupMode */
+typedef enum {
+ LOOKUP_DEFAULT = 0, /* Use default mode lookup method */
+ LOOKUP_BEST_REFRESH, /* Pick modes with best refresh */
+ LOOKUP_CLOSEST_CLOCK, /* Pick modes with the closest clock */
+ LOOKUP_LIST_ORDER, /* Pick first useful mode in list */
+ LOOKUP_CLKDIV2 = 0x0100, /* Allow half clocks */
+ LOOKUP_OPTIONAL_TOLERANCES = 0x0200 /* Allow missing hsync/vrefresh */
+} LookupModeFlags;
+
+#define NoDepth24Support 0x00
+#define Support24bppFb 0x01 /* 24bpp framebuffer supported */
+#define Support32bppFb 0x02 /* 32bpp framebuffer supported */
+#define SupportConvert24to32 0x04 /* Can convert 24bpp pixmap to 32bpp */
+#define SupportConvert32to24 0x08 /* Can convert 32bpp pixmap to 24bpp */
+#define PreferConvert24to32 0x10 /* prefer 24bpp pixmap to 32bpp conv */
+#define PreferConvert32to24 0x20 /* prefer 32bpp pixmap to 24bpp conv */
+
+/* For DPMS */
+typedef void (*DPMSSetProcPtr) (ScrnInfoPtr, int, int);
+
+/* Input handler proc */
+typedef void (*InputHandlerProc) (int fd, void *data);
+
+/* These are used by xf86GetClocks */
+#define CLK_REG_SAVE -1
+#define CLK_REG_RESTORE -2
+
+/*
+ * misc constants
+ */
+#define INTERLACE_REFRESH_WEIGHT 1.5
+#define SYNC_TOLERANCE 0.01 /* 1 percent */
+#define CLOCK_TOLERANCE 2000 /* Clock matching tolerance (2MHz) */
+
+#define OVERLAY_8_32_DUALFB 0x00000001
+#define OVERLAY_8_24_DUALFB 0x00000002
+#define OVERLAY_8_16_DUALFB 0x00000004
+#define OVERLAY_8_32_PLANAR 0x00000008
+
+/* Values of xf86Info.mouseFlags */
+#define MF_CLEAR_DTR 1
+#define MF_CLEAR_RTS 2
+
+/* Action Events */
+typedef enum {
+ ACTION_TERMINATE = 0, /* Terminate Server */
+ ACTION_NEXT_MODE = 10, /* Switch to next video mode */
+ ACTION_PREV_MODE,
+ ACTION_SWITCHSCREEN = 100, /* VT switch */
+ ACTION_SWITCHSCREEN_NEXT,
+ ACTION_SWITCHSCREEN_PREV,
+} ActionEvent;
+
+#endif /* _XF86STR_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86xv.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86xv.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86xv.h (working copy)
@@ -0,0 +1,266 @@
+
+/*
+ * Copyright (c) 1998-2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+#ifndef _XF86XV_H_
+#define _XF86XV_H_
+
+#include "xvdix.h"
+#include "xf86str.h"
+
+#define VIDEO_NO_CLIPPING 0x00000001
+#define VIDEO_INVERT_CLIPLIST 0x00000002
+#define VIDEO_OVERLAID_IMAGES 0x00000004
+#define VIDEO_OVERLAID_STILLS 0x00000008
+/*
+ * Usage of VIDEO_CLIP_TO_VIEWPORT is not recommended.
+ * It can make reput behaviour inconsistent.
+ */
+#define VIDEO_CLIP_TO_VIEWPORT 0x00000010
+
+typedef struct {
+ int id;
+ int type;
+ int byte_order;
+ unsigned char guid[16];
+ int bits_per_pixel;
+ int format;
+ int num_planes;
+
+ /* for RGB formats only */
+ int depth;
+ unsigned int red_mask;
+ unsigned int green_mask;
+ unsigned int blue_mask;
+
+ /* for YUV formats only */
+ unsigned int y_sample_bits;
+ unsigned int u_sample_bits;
+ unsigned int v_sample_bits;
+ unsigned int horz_y_period;
+ unsigned int horz_u_period;
+ unsigned int horz_v_period;
+ unsigned int vert_y_period;
+ unsigned int vert_u_period;
+ unsigned int vert_v_period;
+ char component_order[32];
+ int scanline_order;
+} XF86ImageRec, *XF86ImagePtr;
+
+typedef struct {
+ ScrnInfoPtr pScrn;
+ int id;
+ unsigned short width, height;
+ int *pitches; /* bytes */
+ int *offsets; /* in bytes from start of framebuffer */
+ DevUnion devPrivate;
+} XF86SurfaceRec, *XF86SurfacePtr;
+
+typedef int (*PutVideoFuncPtr) (ScrnInfoPtr pScrn,
+ short vid_x, short vid_y, short drw_x,
+ short drw_y, short vid_w, short vid_h,
+ short drw_w, short drw_h, RegionPtr clipBoxes,
+ void *data, DrawablePtr pDraw);
+typedef int (*PutStillFuncPtr) (ScrnInfoPtr pScrn, short vid_x, short vid_y,
+ short drw_x, short drw_y, short vid_w,
+ short vid_h, short drw_w, short drw_h,
+ RegionPtr clipBoxes, void *data,
+ DrawablePtr pDraw);
+typedef int (*GetVideoFuncPtr) (ScrnInfoPtr pScrn, short vid_x, short vid_y,
+ short drw_x, short drw_y, short vid_w,
+ short vid_h, short drw_w, short drw_h,
+ RegionPtr clipBoxes, void *data,
+ DrawablePtr pDraw);
+typedef int (*GetStillFuncPtr) (ScrnInfoPtr pScrn, short vid_x, short vid_y,
+ short drw_x, short drw_y, short vid_w,
+ short vid_h, short drw_w, short drw_h,
+ RegionPtr clipBoxes, void *data,
+ DrawablePtr pDraw);
+typedef void (*StopVideoFuncPtr) (ScrnInfoPtr pScrn, void *data, Bool Exit);
+typedef int (*SetPortAttributeFuncPtr) (ScrnInfoPtr pScrn, Atom attribute,
+ INT32 value, void *data);
+typedef int (*GetPortAttributeFuncPtr) (ScrnInfoPtr pScrn, Atom attribute,
+ INT32 *value, void *data);
+typedef void (*QueryBestSizeFuncPtr) (ScrnInfoPtr pScrn, Bool motion,
+ short vid_w, short vid_h, short drw_w,
+ short drw_h, unsigned int *p_w,
+ unsigned int *p_h, void *data);
+typedef int (*PutImageFuncPtr) (ScrnInfoPtr pScrn, short src_x, short src_y,
+ short drw_x, short drw_y, short src_w,
+ short src_h, short drw_w, short drw_h,
+ int image, unsigned char *buf, short width,
+ short height, Bool Sync, RegionPtr clipBoxes,
+ void *data, DrawablePtr pDraw);
+typedef int (*ReputImageFuncPtr) (ScrnInfoPtr pScrn, short src_x, short src_y,
+ short drw_x, short drw_y, short src_w,
+ short src_h, short drw_w, short drw_h,
+ RegionPtr clipBoxes, void *data,
+ DrawablePtr pDraw);
+typedef int (*QueryImageAttributesFuncPtr) (ScrnInfoPtr pScrn, int image,
+ unsigned short *width,
+ unsigned short *height,
+ int *pitches, int *offsets);
+typedef void (*ClipNotifyFuncPtr) (ScrnInfoPtr pScrn, void *data,
+ WindowPtr window, int dx, int dy);
+
+typedef enum {
+ XV_OFF,
+ XV_PENDING,
+ XV_ON
+} XvStatus;
+
+/*** this is what the driver needs to fill out ***/
+
+typedef struct {
+ int id;
+ const char *name;
+ unsigned short width, height;
+ XvRationalRec rate;
+} XF86VideoEncodingRec, *XF86VideoEncodingPtr;
+
+typedef struct {
+ char depth;
+ short class;
+} XF86VideoFormatRec, *XF86VideoFormatPtr;
+
+typedef struct {
+ int flags;
+ int min_value;
+ int max_value;
+ const char *name;
+} XF86AttributeRec, *XF86AttributePtr;
+
+typedef struct {
+ unsigned int type;
+ int flags;
+ const char *name;
+ int nEncodings;
+ XF86VideoEncodingPtr pEncodings;
+ int nFormats;
+ XF86VideoFormatPtr pFormats;
+ int nPorts;
+ DevUnion *pPortPrivates;
+ int nAttributes;
+ XF86AttributePtr pAttributes;
+ int nImages;
+ XF86ImagePtr pImages;
+ PutVideoFuncPtr PutVideo;
+ PutStillFuncPtr PutStill;
+ GetVideoFuncPtr GetVideo;
+ GetStillFuncPtr GetStill;
+ StopVideoFuncPtr StopVideo;
+ SetPortAttributeFuncPtr SetPortAttribute;
+ GetPortAttributeFuncPtr GetPortAttribute;
+ QueryBestSizeFuncPtr QueryBestSize;
+ PutImageFuncPtr PutImage;
+ ReputImageFuncPtr ReputImage; /* image/still */
+ QueryImageAttributesFuncPtr QueryImageAttributes;
+ ClipNotifyFuncPtr ClipNotify;
+} XF86VideoAdaptorRec, *XF86VideoAdaptorPtr;
+
+typedef struct {
+ XF86ImagePtr image;
+ int flags;
+ int (*alloc_surface) (ScrnInfoPtr pScrn,
+ int id,
+ unsigned short width,
+ unsigned short height, XF86SurfacePtr surface);
+ int (*free_surface) (XF86SurfacePtr surface);
+ int (*display) (XF86SurfacePtr surface,
+ short vid_x, short vid_y,
+ short drw_x, short drw_y,
+ short vid_w, short vid_h,
+ short drw_w, short drw_h, RegionPtr clipBoxes);
+ int (*stop) (XF86SurfacePtr surface);
+ int (*getAttribute) (ScrnInfoPtr pScrn, Atom attr, INT32 *value);
+ int (*setAttribute) (ScrnInfoPtr pScrn, Atom attr, INT32 value);
+ int max_width;
+ int max_height;
+ int num_attributes;
+ XF86AttributePtr attributes;
+} XF86OffscreenImageRec, *XF86OffscreenImagePtr;
+
+extern _X_EXPORT Bool
+ xf86XVScreenInit(ScreenPtr pScreen, XF86VideoAdaptorPtr * Adaptors, int num);
+
+typedef int (*xf86XVInitGenericAdaptorPtr) (ScrnInfoPtr pScrn,
+ XF86VideoAdaptorPtr ** Adaptors);
+
+extern _X_EXPORT int
+ xf86XVRegisterGenericAdaptorDriver(xf86XVInitGenericAdaptorPtr InitFunc);
+
+extern _X_EXPORT int
+ xf86XVListGenericAdaptors(ScrnInfoPtr pScrn, XF86VideoAdaptorPtr ** Adaptors);
+
+extern _X_EXPORT Bool
+
+xf86XVRegisterOffscreenImages(ScreenPtr pScreen,
+ XF86OffscreenImagePtr images, int num);
+
+extern _X_EXPORT XF86OffscreenImagePtr
+xf86XVQueryOffscreenImages(ScreenPtr pScreen, int *num);
+
+extern _X_EXPORT XF86VideoAdaptorPtr xf86XVAllocateVideoAdaptorRec(ScrnInfoPtr
+ pScrn);
+
+extern _X_EXPORT void xf86XVFreeVideoAdaptorRec(XF86VideoAdaptorPtr ptr);
+
+extern _X_EXPORT void
+ xf86XVFillKeyHelper(ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes);
+
+extern _X_EXPORT void
+
+xf86XVFillKeyHelperDrawable(DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes);
+
+extern _X_EXPORT void
+
+xf86XVFillKeyHelperPort(DrawablePtr pDraw, void *data, CARD32 key,
+ RegionPtr clipboxes, Bool fillEverything);
+
+extern _X_EXPORT Bool
+
+xf86XVClipVideoHelper(BoxPtr dst,
+ INT32 *xa,
+ INT32 *xb,
+ INT32 *ya,
+ INT32 *yb, RegionPtr reg, INT32 width, INT32 height);
+
+extern _X_EXPORT void
+
+xf86XVCopyYUV12ToPacked(const void *srcy,
+ const void *srcv,
+ const void *srcu,
+ void *dst,
+ int srcPitchy,
+ int srcPitchuv, int dstPitch, int h, int w);
+
+extern _X_EXPORT void
+
+xf86XVCopyPacked(const void *src,
+ void *dst, int srcPitch, int dstPitch, int h, int w);
+
+#endif /* _XF86XV_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86xvmc.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86xvmc.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86xvmc.h (working copy)
@@ -0,0 +1,141 @@
+
+/*
+ * Copyright (c) 2001 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+#ifndef _XF86XVMC_H
+#define _XF86XVMC_H
+
+#include "xvmcext.h"
+#include "xf86xv.h"
+
+typedef struct {
+ int num_xvimages;
+ int *xvimage_ids; /* reference the subpictures in the XF86MCAdaptorRec */
+} XF86MCImageIDList;
+
+typedef struct {
+ int surface_type_id; /* Driver generated. Must be unique on the port */
+ int chroma_format;
+ int color_description; /* no longer used */
+ unsigned short max_width;
+ unsigned short max_height;
+ unsigned short subpicture_max_width;
+ unsigned short subpicture_max_height;
+ int mc_type;
+ int flags;
+ XF86MCImageIDList *compatible_subpictures; /* can be null, if none */
+} XF86MCSurfaceInfoRec, *XF86MCSurfaceInfoPtr;
+
+/*
+ xf86XvMCCreateContextProc
+
+ DIX will fill everything out in the context except the driver_priv.
+ The port_priv holds the private data specified for the port when
+ Xv was initialized by the driver.
+ The driver may store whatever it wants in driver_priv and edit
+ the width, height and flags. If the driver wants to return something
+ to the client it can allocate space in priv and specify the number
+ of 32 bit words in num_priv. This must be dynamically allocated
+ space because DIX will free it after it passes it to the client.
+*/
+
+typedef int (*xf86XvMCCreateContextProcPtr) (ScrnInfoPtr pScrn,
+ XvMCContextPtr context,
+ int *num_priv, CARD32 **priv);
+
+typedef void (*xf86XvMCDestroyContextProcPtr) (ScrnInfoPtr pScrn,
+ XvMCContextPtr context);
+
+/*
+ xf86XvMCCreateSurfaceProc
+
+ DIX will fill everything out in the surface except the driver_priv.
+ The driver may store whatever it wants in driver_priv. The driver
+ may pass data back to the client in the same manner as the
+ xf86XvMCCreateContextProc.
+*/
+
+typedef int (*xf86XvMCCreateSurfaceProcPtr) (ScrnInfoPtr pScrn,
+ XvMCSurfacePtr surface,
+ int *num_priv, CARD32 **priv);
+
+typedef void (*xf86XvMCDestroySurfaceProcPtr) (ScrnInfoPtr pScrn,
+ XvMCSurfacePtr surface);
+
+/*
+ xf86XvMCCreateSubpictureProc
+
+ DIX will fill everything out in the subpicture except the driver_priv,
+ num_palette_entries, entry_bytes and component_order. The driver may
+ store whatever it wants in driver_priv and edit the width and height.
+ If it is a paletted subpicture the driver needs to fill out the
+ num_palette_entries, entry_bytes and component_order. These are
+ not communicated to the client until the time the surface is
+ created.
+
+ The driver may pass data back to the client in the same manner as the
+ xf86XvMCCreateContextProc.
+*/
+
+typedef int (*xf86XvMCCreateSubpictureProcPtr) (ScrnInfoPtr pScrn,
+ XvMCSubpicturePtr subpicture,
+ int *num_priv, CARD32 **priv);
+
+typedef void (*xf86XvMCDestroySubpictureProcPtr) (ScrnInfoPtr pScrn,
+ XvMCSubpicturePtr subpicture);
+
+typedef struct {
+ const char *name;
+ int num_surfaces;
+ XF86MCSurfaceInfoPtr *surfaces;
+ int num_subpictures;
+ XF86ImagePtr *subpictures;
+ xf86XvMCCreateContextProcPtr CreateContext;
+ xf86XvMCDestroyContextProcPtr DestroyContext;
+ xf86XvMCCreateSurfaceProcPtr CreateSurface;
+ xf86XvMCDestroySurfaceProcPtr DestroySurface;
+ xf86XvMCCreateSubpictureProcPtr CreateSubpicture;
+ xf86XvMCDestroySubpictureProcPtr DestroySubpicture;
+} XF86MCAdaptorRec, *XF86MCAdaptorPtr;
+
+/*
+ xf86XvMCScreenInit
+
+ Unlike Xv, the adaptor data is not copied from this structure.
+ This structure's data is used so it must stick around for the
+ life of the server. Note that it's an array of pointers not
+ an array of structures.
+*/
+
+extern _X_EXPORT Bool xf86XvMCScreenInit(ScreenPtr pScreen,
+ int num_adaptors,
+ XF86MCAdaptorPtr * adaptors);
+
+extern _X_EXPORT XF86MCAdaptorPtr xf86XvMCCreateAdaptorRec(void);
+extern _X_EXPORT void xf86XvMCDestroyAdaptorRec(XF86MCAdaptorPtr adaptor);
+
+#endif /* _XF86XVMC_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86xvpriv.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86xvpriv.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xf86xvpriv.h (working copy)
@@ -0,0 +1,88 @@
+
+/*
+ * Copyright (c) 2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+#ifndef _XF86XVPRIV_H_
+#define _XF86XVPRIV_H_
+
+#include "xf86xv.h"
+#include "privates.h"
+
+/*** These are DDX layer privates ***/
+
+extern _X_EXPORT DevPrivateKey XF86XvScreenKey;
+
+typedef struct {
+ DestroyWindowProcPtr DestroyWindow;
+ ClipNotifyProcPtr ClipNotify;
+ WindowExposuresProcPtr WindowExposures;
+ PostValidateTreeProcPtr PostValidateTree;
+ void (*AdjustFrame) (ScrnInfoPtr, int, int);
+ Bool (*EnterVT) (ScrnInfoPtr);
+ void (*LeaveVT) (ScrnInfoPtr);
+ xf86ModeSetProc *ModeSet;
+} XF86XVScreenRec, *XF86XVScreenPtr;
+
+typedef struct {
+ int flags;
+ PutVideoFuncPtr PutVideo;
+ PutStillFuncPtr PutStill;
+ GetVideoFuncPtr GetVideo;
+ GetStillFuncPtr GetStill;
+ StopVideoFuncPtr StopVideo;
+ SetPortAttributeFuncPtr SetPortAttribute;
+ GetPortAttributeFuncPtr GetPortAttribute;
+ QueryBestSizeFuncPtr QueryBestSize;
+ PutImageFuncPtr PutImage;
+ ReputImageFuncPtr ReputImage;
+ QueryImageAttributesFuncPtr QueryImageAttributes;
+ ClipNotifyFuncPtr ClipNotify;
+} XvAdaptorRecPrivate, *XvAdaptorRecPrivatePtr;
+
+typedef struct {
+ ScrnInfoPtr pScrn;
+ DrawablePtr pDraw;
+ unsigned char type;
+ unsigned int subWindowMode;
+ RegionPtr clientClip;
+ RegionPtr ckeyFilled;
+ RegionPtr pCompositeClip;
+ Bool FreeCompositeClip;
+ XvAdaptorRecPrivatePtr AdaptorRec;
+ XvStatus isOn;
+ Bool clipChanged;
+ int vid_x, vid_y, vid_w, vid_h;
+ int drw_x, drw_y, drw_w, drw_h;
+ DevUnion DevPriv;
+} XvPortRecPrivate, *XvPortRecPrivatePtr;
+
+typedef struct _XF86XVWindowRec {
+ XvPortRecPrivatePtr PortRec;
+ struct _XF86XVWindowRec *next;
+} XF86XVWindowRec, *XF86XVWindowPtr;
+
+#endif /* _XF86XVPRIV_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xfixes.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xfixes.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xfixes.h (working copy)
@@ -0,0 +1,56 @@
+/*
+ * Copyright © 2002 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifndef _XFIXES_H_
+#define _XFIXES_H_
+
+#include "resource.h"
+
+extern _X_EXPORT RESTYPE RegionResType;
+extern _X_EXPORT int XFixesErrorBase;
+
+#define VERIFY_REGION(pRegion, rid, client, mode) \
+ do { \
+ int err; \
+ err = dixLookupResourceByType((void **) &pRegion, rid, \
+ RegionResType, client, mode); \
+ if (err != Success) { \
+ client->errorValue = rid; \
+ return err; \
+ } \
+ } while (0)
+
+#define VERIFY_REGION_OR_NONE(pRegion, rid, client, mode) { \
+ pRegion = 0; \
+ if (rid) VERIFY_REGION(pRegion, rid, client, mode); \
+}
+
+extern _X_EXPORT RegionPtr
+ XFixesRegionCopy(RegionPtr pRegion);
+
+#include "xibarriers.h"
+
+#endif /* _XFIXES_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xisb.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xisb.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xisb.h (working copy)
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 1997 Metro Link Incorporated
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the Metro Link shall not be
+ * used in advertising or otherwise to promote the sale, use or other dealings
+ * in this Software without prior written authorization from Metro Link.
+ *
+ */
+
+#ifndef _xisb_H_
+#define _xisb_H_
+
+#include <unistd.h>
+
+/******************************************************************************
+ * Definitions
+ * structs, typedefs, #defines, enums
+ *****************************************************************************/
+
+typedef struct _XISBuffer {
+ int fd;
+ int trace;
+ int block_duration;
+ ssize_t current; /* bytes read */
+ ssize_t end;
+ ssize_t buffer_size;
+ unsigned char *buf;
+} XISBuffer;
+
+/******************************************************************************
+ * Declarations
+ * variables: use xisb_LOC in front
+ * of globals.
+ * put locals in the .c file.
+ *****************************************************************************/
+extern _X_EXPORT XISBuffer *XisbNew(int fd, ssize_t size);
+extern _X_EXPORT void XisbFree(XISBuffer * b);
+extern _X_EXPORT int XisbRead(XISBuffer * b);
+extern _X_EXPORT ssize_t XisbWrite(XISBuffer * b, unsigned char *msg,
+ ssize_t len);
+extern _X_EXPORT void XisbTrace(XISBuffer * b, int trace);
+extern _X_EXPORT void XisbBlockDuration(XISBuffer * b, int block_duration);
+
+/*
+ * DO NOT PUT ANYTHING AFTER THIS ENDIF
+ */
+#endif
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xkbfile.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xkbfile.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xkbfile.h (working copy)
@@ -0,0 +1,276 @@
+/************************************************************
+ Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
+
+ Permission to use, copy, modify, and distribute this
+ software and its documentation for any purpose and without
+ fee is hereby granted, provided that the above copyright
+ notice appear in all copies and that both that copyright
+ notice and this permission notice appear in supporting
+ documentation, and that the name of Silicon Graphics not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific prior written permission.
+ Silicon Graphics makes no representation about the suitability
+ of this software for any purpose. It is provided "as is"
+ without any express or implied warranty.
+
+ SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+ ********************************************************/
+
+#ifndef _XKBFILE_H_
+#define _XKBFILE_H_ 1
+
+#include "xkbstr.h"
+
+/***====================================================================***/
+
+#define XkbXKMFile 0
+#define XkbCFile 1
+#define XkbXKBFile 2
+#define XkbMessage 3
+
+#define XkbMapDefined (1<<0)
+#define XkbStateDefined (1<<1)
+
+typedef void (*XkbFileAddOnFunc) (FILE * /* file */ ,
+ XkbDescPtr /* result */ ,
+ Bool /* topLevel */ ,
+ Bool /* showImplicit */ ,
+ int /* fileSection */ ,
+ void * /* priv */
+ );
+
+/***====================================================================***/
+
+#define _XkbSuccess 0
+#define _XkbErrMissingNames 1
+#define _XkbErrMissingTypes 2
+#define _XkbErrMissingReqTypes 3
+#define _XkbErrMissingSymbols 4
+#define _XkbErrMissingVMods 5
+#define _XkbErrMissingIndicators 6
+#define _XkbErrMissingCompatMap 7
+#define _XkbErrMissingSymInterps 8
+#define _XkbErrMissingGeometry 9
+#define _XkbErrIllegalDoodad 10
+#define _XkbErrIllegalTOCType 11
+#define _XkbErrIllegalContents 12
+#define _XkbErrEmptyFile 13
+#define _XkbErrFileNotFound 14
+#define _XkbErrFileCannotOpen 15
+#define _XkbErrBadValue 16
+#define _XkbErrBadMatch 17
+#define _XkbErrBadTypeName 18
+#define _XkbErrBadTypeWidth 19
+#define _XkbErrBadFileType 20
+#define _XkbErrBadFileVersion 21
+#define _XkbErrBadFileFormat 22
+#define _XkbErrBadAlloc 23
+#define _XkbErrBadLength 24
+#define _XkbErrXReqFailure 25
+#define _XkbErrBadImplementation 26
+
+/***====================================================================***/
+
+_XFUNCPROTOBEGIN
+
+extern _X_EXPORT char *XkbIndentText(unsigned /* size */
+ );
+
+extern _X_EXPORT char *XkbAtomText(Atom /* atm */ ,
+ unsigned /* format */
+ );
+
+extern _X_EXPORT char *XkbKeysymText(KeySym /* sym */ ,
+ unsigned /* format */
+ );
+
+extern _X_EXPORT char *XkbStringText(char * /* str */ ,
+ unsigned /* format */
+ );
+
+extern _X_EXPORT char *XkbKeyNameText(char * /* name */ ,
+ unsigned /* format */
+ );
+
+extern _X_EXPORT char *XkbModIndexText(unsigned /* ndx */ ,
+ unsigned /* format */
+ );
+
+extern _X_EXPORT char *XkbModMaskText(unsigned /* mask */ ,
+ unsigned /* format */
+ );
+
+extern _X_EXPORT char *XkbVModIndexText(XkbDescPtr /* xkb */ ,
+ unsigned /* ndx */ ,
+ unsigned /* format */
+ );
+
+extern _X_EXPORT char *XkbVModMaskText(XkbDescPtr /* xkb */ ,
+ unsigned /* modMask */ ,
+ unsigned /* mask */ ,
+ unsigned /* format */
+ );
+
+extern _X_EXPORT char *XkbConfigText(unsigned /* config */ ,
+ unsigned /* format */
+ );
+
+extern _X_EXPORT const char *XkbSIMatchText(unsigned /* type */ ,
+ unsigned /* format */
+ );
+
+extern _X_EXPORT char *XkbIMWhichStateMaskText(unsigned /* use_which */ ,
+ unsigned /* format */
+ );
+
+extern _X_EXPORT char *XkbControlsMaskText(unsigned /* ctrls */ ,
+ unsigned /* format */
+ );
+
+extern _X_EXPORT char *XkbGeomFPText(int /* val */ ,
+ unsigned /* format */
+ );
+
+extern _X_EXPORT char *XkbDoodadTypeText(unsigned /* type */ ,
+ unsigned /* format */
+ );
+
+extern _X_EXPORT const char *XkbActionTypeText(unsigned /* type */ ,
+ unsigned /* format */
+ );
+
+extern _X_EXPORT char *XkbActionText(XkbDescPtr /* xkb */ ,
+ XkbAction * /* action */ ,
+ unsigned /* format */
+ );
+
+extern _X_EXPORT char *XkbBehaviorText(XkbDescPtr /* xkb */ ,
+ XkbBehavior * /* behavior */ ,
+ unsigned /* format */
+ );
+
+/***====================================================================***/
+
+#define _XkbKSLower (1<<0)
+#define _XkbKSUpper (1<<1)
+
+#define XkbKSIsLower(k) (_XkbKSCheckCase(k)&_XkbKSLower)
+#define XkbKSIsUpper(k) (_XkbKSCheckCase(k)&_XkbKSUpper)
+#define XkbKSIsKeypad(k) (((k)>=XK_KP_Space)&&((k)<=XK_KP_Equal))
+#define XkbKSIsDeadKey(k) \
+ (((k)>=XK_dead_grave)&&((k)<=XK_dead_semivoiced_sound))
+
+extern _X_EXPORT unsigned _XkbKSCheckCase(KeySym /* sym */
+ );
+
+extern _X_EXPORT int XkbFindKeycodeByName(XkbDescPtr /* xkb */ ,
+ char * /* name */ ,
+ Bool /* use_aliases */
+ );
+
+/***====================================================================***/
+
+extern _X_EXPORT Atom XkbInternAtom(char * /* name */ ,
+ Bool /* onlyIfExists */
+ );
+
+/***====================================================================***/
+
+#ifdef _XKBGEOM_H_
+
+#define XkbDW_Unknown 0
+#define XkbDW_Doodad 1
+#define XkbDW_Section 2
+typedef struct _XkbDrawable {
+ int type;
+ int priority;
+ union {
+ XkbDoodadPtr doodad;
+ XkbSectionPtr section;
+ } u;
+ struct _XkbDrawable *next;
+} XkbDrawableRec, *XkbDrawablePtr;
+
+#endif
+
+/***====================================================================***/
+
+extern _X_EXPORT unsigned XkbConvertGetByNameComponents(Bool /* toXkm */ ,
+ unsigned /* orig */
+ );
+
+extern _X_EXPORT Bool XkbNameMatchesPattern(char * /* name */ ,
+ char * /* pattern */
+ );
+
+/***====================================================================***/
+
+extern _X_EXPORT Bool XkbWriteXKBKeycodes(FILE * /* file */ ,
+ XkbDescPtr /* result */ ,
+ Bool /* topLevel */ ,
+ Bool /* showImplicit */ ,
+ XkbFileAddOnFunc /* addOn */ ,
+ void * /* priv */
+ );
+
+extern _X_EXPORT Bool XkbWriteXKBKeyTypes(FILE * /* file */ ,
+ XkbDescPtr /* result */ ,
+ Bool /* topLevel */ ,
+ Bool /* showImplicit */ ,
+ XkbFileAddOnFunc /* addOn */ ,
+ void * /* priv */
+ );
+
+extern _X_EXPORT Bool XkbWriteXKBCompatMap(FILE * /* file */ ,
+ XkbDescPtr /* result */ ,
+ Bool /* topLevel */ ,
+ Bool /* showImplicit */ ,
+ XkbFileAddOnFunc /* addOn */ ,
+ void * /* priv */
+ );
+
+extern _X_EXPORT Bool XkbWriteXKBSymbols(FILE * /* file */ ,
+ XkbDescPtr /* result */ ,
+ Bool /* topLevel */ ,
+ Bool /* showImplicit */ ,
+ XkbFileAddOnFunc /* addOn */ ,
+ void * /* priv */
+ );
+
+extern _X_EXPORT Bool XkbWriteXKBGeometry(FILE * /* file */ ,
+ XkbDescPtr /* result */ ,
+ Bool /* topLevel */ ,
+ Bool /* showImplicit */ ,
+ XkbFileAddOnFunc /* addOn */ ,
+ void * /* priv */
+ );
+
+extern _X_EXPORT Bool XkbWriteXKBKeymapForNames(FILE * /* file */ ,
+ XkbComponentNamesPtr /* names */
+ ,
+ XkbDescPtr /* xkb */ ,
+ unsigned /* want */ ,
+ unsigned /* need */
+ );
+
+/***====================================================================***/
+
+extern _X_EXPORT Bool XkmProbe(FILE * /* file */
+ );
+
+extern _X_EXPORT unsigned XkmReadFile(FILE * /* file */ ,
+ unsigned /* need */ ,
+ unsigned /* want */ ,
+ XkbDescPtr * /* result */
+ );
+
+_XFUNCPROTOEND
+#endif /* _XKBFILE_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xkbrules.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xkbrules.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xkbrules.h (working copy)
@@ -0,0 +1,120 @@
+#ifndef _XKBRULES_H_
+#define _XKBRULES_H_ 1
+
+/************************************************************
+ Copyright (c) 1996 by Silicon Graphics Computer Systems, Inc.
+
+ Permission to use, copy, modify, and distribute this
+ software and its documentation for any purpose and without
+ fee is hereby granted, provided that the above copyright
+ notice appear in all copies and that both that copyright
+ notice and this permission notice appear in supporting
+ documentation, and that the name of Silicon Graphics not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific prior written permission.
+ Silicon Graphics makes no representation about the suitability
+ of this software for any purpose. It is provided "as is"
+ without any express or implied warranty.
+
+ SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+ ********************************************************/
+
+/***====================================================================***/
+
+typedef struct _XkbRMLVOSet {
+ char *rules;
+ char *model;
+ char *layout;
+ char *variant;
+ char *options;
+} XkbRMLVOSet;
+
+typedef struct _XkbRF_VarDefs {
+ const char *model;
+ const char *layout;
+ const char *variant;
+ const char *options;
+} XkbRF_VarDefsRec, *XkbRF_VarDefsPtr;
+
+typedef struct _XkbRF_Rule {
+ int number;
+ int layout_num;
+ int variant_num;
+ const char *model;
+ const char *layout;
+ const char *variant;
+ const char *option;
+ /* yields */
+ const char *keycodes;
+ const char *symbols;
+ const char *types;
+ const char *compat;
+ const char *geometry;
+ unsigned flags;
+} XkbRF_RuleRec, *XkbRF_RulePtr;
+
+typedef struct _XkbRF_Group {
+ int number;
+ const char *name;
+ char *words;
+} XkbRF_GroupRec, *XkbRF_GroupPtr;
+
+#define XkbRF_PendingMatch (1L<<1)
+#define XkbRF_Option (1L<<2)
+#define XkbRF_Append (1L<<3)
+#define XkbRF_Normal (1L<<4)
+#define XkbRF_Invalid (1L<<5)
+
+typedef struct _XkbRF_Rules {
+ unsigned short sz_rules;
+ unsigned short num_rules;
+ XkbRF_RulePtr rules;
+ unsigned short sz_groups;
+ unsigned short num_groups;
+ XkbRF_GroupPtr groups;
+} XkbRF_RulesRec, *XkbRF_RulesPtr;
+
+/***====================================================================***/
+
+_XFUNCPROTOBEGIN
+
+/* Seems preferable to dragging xkbstr.h in. */
+ struct _XkbComponentNames;
+
+extern _X_EXPORT Bool XkbRF_GetComponents(XkbRF_RulesPtr /* rules */ ,
+ XkbRF_VarDefsPtr /* var_defs */ ,
+ struct _XkbComponentNames * /* names */
+ );
+
+extern _X_EXPORT Bool XkbRF_LoadRules(FILE * /* file */ ,
+ XkbRF_RulesPtr /* rules */
+ );
+
+extern _X_EXPORT Bool XkbRF_LoadRulesByName(char * /* base */ ,
+ char * /* locale */ ,
+ XkbRF_RulesPtr /* rules */
+ );
+
+/***====================================================================***/
+
+extern _X_EXPORT XkbRF_RulesPtr XkbRF_Create(void);
+
+extern _X_EXPORT void XkbRF_Free(XkbRF_RulesPtr /* rules */ ,
+ Bool /* freeRules */
+ );
+
+/***====================================================================***/
+
+#define _XKB_RF_NAMES_PROP_ATOM "_XKB_RULES_NAMES"
+#define _XKB_RF_NAMES_PROP_MAXLEN 1024
+
+_XFUNCPROTOEND
+#endif /* _XKBRULES_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xkbsrv.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xkbsrv.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xkbsrv.h (working copy)
@@ -0,0 +1,872 @@
+/************************************************************
+Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+#ifndef _XKBSRV_H_
+#define _XKBSRV_H_
+
+#define XkbAllocClientMap SrvXkbAllocClientMap
+#define XkbAllocServerMap SrvXkbAllocServerMap
+#define XkbChangeTypesOfKey SrvXkbChangeTypesOfKey
+#define XkbCopyKeyTypes SrvXkbCopyKeyTypes
+#define XkbFreeClientMap SrvXkbFreeClientMap
+#define XkbFreeServerMap SrvXkbFreeServerMap
+#define XkbKeyTypesForCoreSymbols SrvXkbKeyTypesForCoreSymbols
+#define XkbApplyCompatMapToKey SrvXkbApplyCompatMapToKey
+#define XkbResizeKeyActions SrvXkbResizeKeyActions
+#define XkbResizeKeySyms SrvXkbResizeKeySyms
+#define XkbResizeKeyType SrvXkbResizeKeyType
+#define XkbAllocCompatMap SrvXkbAllocCompatMap
+#define XkbAllocControls SrvXkbAllocControls
+#define XkbAllocIndicatorMaps SrvXkbAllocIndicatorMaps
+#define XkbAllocKeyboard SrvXkbAllocKeyboard
+#define XkbAllocNames SrvXkbAllocNames
+#define XkbFreeCompatMap SrvXkbFreeCompatMap
+#define XkbFreeKeyboard SrvXkbFreeKeyboard
+#define XkbFreeNames SrvXkbFreeNames
+#define XkbLatchModifiers SrvXkbLatchModifiers
+#define XkbLatchGroup SrvXkbLatchGroup
+#define XkbVirtualModsToReal SrvXkbVirtualModsToReal
+#define XkbChangeKeycodeRange SrvXkbChangeKeycodeRange
+#define XkbApplyVirtualModChanges SrvXkbApplyVirtualModChanges
+
+#include <X11/extensions/XKBproto.h>
+#include "xkbstr.h"
+#include "xkbrules.h"
+#include "inputstr.h"
+#include "events.h"
+
+typedef struct _XkbInterest {
+ DeviceIntPtr dev;
+ ClientPtr client;
+ XID resource;
+ struct _XkbInterest *next;
+ CARD16 extDevNotifyMask;
+ CARD16 stateNotifyMask;
+ CARD16 namesNotifyMask;
+ CARD32 ctrlsNotifyMask;
+ CARD8 compatNotifyMask;
+ BOOL bellNotifyMask;
+ BOOL actionMessageMask;
+ CARD16 accessXNotifyMask;
+ CARD32 iStateNotifyMask;
+ CARD32 iMapNotifyMask;
+ CARD16 altSymsNotifyMask;
+ CARD32 autoCtrls;
+ CARD32 autoCtrlValues;
+} XkbInterestRec, *XkbInterestPtr;
+
+typedef struct _XkbRadioGroup {
+ CARD8 flags;
+ CARD8 nMembers;
+ CARD8 dfltDown;
+ CARD8 currentDown;
+ CARD8 members[XkbRGMaxMembers];
+} XkbRadioGroupRec, *XkbRadioGroupPtr;
+
+typedef struct _XkbEventCause {
+ CARD8 kc;
+ CARD8 event;
+ CARD8 mjr;
+ CARD8 mnr;
+ ClientPtr client;
+} XkbEventCauseRec, *XkbEventCausePtr;
+
+#define XkbSetCauseKey(c,k,e) { (c)->kc= (k),(c)->event= (e),\
+ (c)->mjr= (c)->mnr= 0; \
+ (c)->client= NULL; }
+#define XkbSetCauseReq(c,j,n,cl) { (c)->kc= (c)->event= 0,\
+ (c)->mjr= (j),(c)->mnr= (n);\
+ (c)->client= (cl); }
+#define XkbSetCauseCoreReq(c,e,cl) XkbSetCauseReq(c,e,0,cl)
+#define XkbSetCauseXkbReq(c,e,cl) XkbSetCauseReq(c,XkbReqCode,e,cl)
+#define XkbSetCauseUnknown(c) XkbSetCauseKey(c,0,0)
+
+#define _OFF_TIMER 0
+#define _KRG_WARN_TIMER 1
+#define _KRG_TIMER 2
+#define _SK_TIMEOUT_TIMER 3
+#define _ALL_TIMEOUT_TIMER 4
+
+#define _BEEP_NONE 0
+#define _BEEP_FEATURE_ON 1
+#define _BEEP_FEATURE_OFF 2
+#define _BEEP_FEATURE_CHANGE 3
+#define _BEEP_SLOW_WARN 4
+#define _BEEP_SLOW_PRESS 5
+#define _BEEP_SLOW_ACCEPT 6
+#define _BEEP_SLOW_REJECT 7
+#define _BEEP_SLOW_RELEASE 8
+#define _BEEP_STICKY_LATCH 9
+#define _BEEP_STICKY_LOCK 10
+#define _BEEP_STICKY_UNLOCK 11
+#define _BEEP_LED_ON 12
+#define _BEEP_LED_OFF 13
+#define _BEEP_LED_CHANGE 14
+#define _BEEP_BOUNCE_REJECT 15
+
+typedef struct _XkbFilter {
+ CARD16 keycode;
+ CARD8 what;
+ CARD8 active;
+ CARD8 filterOthers;
+ CARD32 priv;
+ XkbAction upAction;
+ int (*filter) (struct _XkbSrvInfo * /* xkbi */ ,
+ struct _XkbFilter * /* filter */ ,
+ unsigned /* keycode */ ,
+ XkbAction * /* action */
+ );
+ struct _XkbFilter *next;
+} XkbFilterRec, *XkbFilterPtr;
+
+typedef struct _XkbSrvInfo {
+ XkbStateRec prev_state;
+ XkbStateRec state;
+ XkbDescPtr desc;
+
+ DeviceIntPtr device;
+ KbdCtrlProcPtr kbdProc;
+
+ XkbRadioGroupPtr radioGroups;
+ CARD8 nRadioGroups;
+ CARD8 clearMods;
+ CARD8 setMods;
+ INT16 groupChange;
+
+ CARD16 dfltPtrDelta;
+
+ double mouseKeysCurve;
+ double mouseKeysCurveFactor;
+ INT16 mouseKeysDX;
+ INT16 mouseKeysDY;
+ CARD8 mouseKeysFlags;
+ Bool mouseKeysAccel;
+ CARD8 mouseKeysCounter;
+
+ CARD8 lockedPtrButtons;
+ CARD8 shiftKeyCount;
+ KeyCode mouseKey;
+ KeyCode inactiveKey;
+ KeyCode slowKey;
+ KeyCode slowKeyEnableKey;
+ KeyCode repeatKey;
+ CARD8 krgTimerActive;
+ CARD8 beepType;
+ CARD8 beepCount;
+
+ CARD32 flags;
+ CARD32 lastPtrEventTime;
+ CARD32 lastShiftEventTime;
+ OsTimerPtr beepTimer;
+ OsTimerPtr mouseKeyTimer;
+ OsTimerPtr slowKeysTimer;
+ OsTimerPtr bounceKeysTimer;
+ OsTimerPtr repeatKeyTimer;
+ OsTimerPtr krgTimer;
+
+ int szFilters;
+ XkbFilterPtr filters;
+} XkbSrvInfoRec, *XkbSrvInfoPtr;
+
+#define XkbSLI_IsDefault (1L<<0)
+#define XkbSLI_HasOwnState (1L<<1)
+
+typedef struct _XkbSrvLedInfo {
+ CARD16 flags;
+ CARD16 class;
+ CARD16 id;
+ union {
+ KbdFeedbackPtr kf;
+ LedFeedbackPtr lf;
+ } fb;
+
+ CARD32 physIndicators;
+ CARD32 autoState;
+ CARD32 explicitState;
+ CARD32 effectiveState;
+
+ CARD32 mapsPresent;
+ CARD32 namesPresent;
+ XkbIndicatorMapPtr maps;
+ Atom *names;
+
+ CARD32 usesBase;
+ CARD32 usesLatched;
+ CARD32 usesLocked;
+ CARD32 usesEffective;
+ CARD32 usesCompat;
+ CARD32 usesControls;
+
+ CARD32 usedComponents;
+} XkbSrvLedInfoRec, *XkbSrvLedInfoPtr;
+
+/*
+ * Settings for xkbClientFlags field (used by DIX)
+ * These flags _must_ not overlap with XkbPCF_*
+ */
+#define _XkbClientInitialized (1<<15)
+
+#define _XkbWantsDetectableAutoRepeat(c)\
+ ((c)->xkbClientFlags&XkbPCF_DetectableAutoRepeatMask)
+
+/*
+ * Settings for flags field
+ */
+#define _XkbStateNotifyInProgress (1<<0)
+
+typedef struct {
+ ProcessInputProc processInputProc;
+ /* If processInputProc is set to something different than realInputProc,
+ * UNWRAP and COND_WRAP will not touch processInputProc and update only
+ * realInputProc. This ensures that
+ * processInputProc == (frozen ? EnqueueEvent : realInputProc)
+ *
+ * WRAP_PROCESS_INPUT_PROC should only be called during initialization,
+ * since it may destroy this invariant.
+ */
+ ProcessInputProc realInputProc;
+ DeviceUnwrapProc unwrapProc;
+} xkbDeviceInfoRec, *xkbDeviceInfoPtr;
+
+#define WRAP_PROCESS_INPUT_PROC(device, oldprocs, proc, unwrapproc) \
+ device->public.processInputProc = proc; \
+ oldprocs->processInputProc = \
+ oldprocs->realInputProc = device->public.realInputProc; \
+ device->public.realInputProc = proc; \
+ oldprocs->unwrapProc = device->unwrapProc; \
+ device->unwrapProc = unwrapproc;
+
+#define COND_WRAP_PROCESS_INPUT_PROC(device, oldprocs, proc, unwrapproc) \
+ if (device->public.processInputProc == device->public.realInputProc)\
+ device->public.processInputProc = proc; \
+ oldprocs->processInputProc = \
+ oldprocs->realInputProc = device->public.realInputProc; \
+ device->public.realInputProc = proc; \
+ oldprocs->unwrapProc = device->unwrapProc; \
+ device->unwrapProc = unwrapproc;
+
+#define UNWRAP_PROCESS_INPUT_PROC(device, oldprocs, backupproc) \
+ backupproc = device->public.realInputProc; \
+ if (device->public.processInputProc == device->public.realInputProc)\
+ device->public.processInputProc = oldprocs->realInputProc; \
+ device->public.realInputProc = oldprocs->realInputProc; \
+ device->unwrapProc = oldprocs->unwrapProc;
+
+extern _X_EXPORT DevPrivateKeyRec xkbDevicePrivateKeyRec;
+
+#define xkbDevicePrivateKey (&xkbDevicePrivateKeyRec)
+
+#define XKBDEVICEINFO(dev) ((xkbDeviceInfoPtr)dixLookupPrivate(&(dev)->devPrivates, xkbDevicePrivateKey))
+
+extern void xkbUnwrapProc(DeviceIntPtr, DeviceHandleProc, void *);
+
+/***====================================================================***/
+
+/***====================================================================***/
+
+#define XkbAX_KRGMask (XkbSlowKeysMask|XkbBounceKeysMask)
+#define XkbAllFilteredEventsMask \
+ (XkbAccessXKeysMask|XkbRepeatKeysMask|XkbMouseKeysAccelMask|XkbAX_KRGMask)
+
+/***====================================================================***/
+
+extern _X_EXPORT int XkbReqCode;
+extern _X_EXPORT int XkbEventBase;
+extern _X_EXPORT int XkbKeyboardErrorCode;
+extern _X_EXPORT const char *XkbBaseDirectory;
+extern _X_EXPORT const char *XkbBinDirectory;
+
+extern _X_EXPORT CARD32 xkbDebugFlags;
+
+#define _XkbLibError(c,l,d) /* Epoch fail */
+
+/* "a" is a "unique" numeric identifier that just defines which error
+ * code statement it is. _XkbErrCode2(4, foo) means "this is the 4th error
+ * statement in this function". lovely.
+ */
+#define _XkbErrCode2(a,b) ((XID)((((unsigned int)(a))<<24)|((b)&0xffffff)))
+#define _XkbErrCode3(a,b,c) _XkbErrCode2(a,(((unsigned int)(b))<<16)|(c))
+#define _XkbErrCode4(a,b,c,d) _XkbErrCode3(a,b,((((unsigned int)(c))<<8)|(d)))
+
+#define Status int
+
+extern _X_EXPORT void XkbUseMsg(void
+ );
+
+extern _X_EXPORT int XkbProcessArguments(int /* argc */ ,
+ char ** /* argv */ ,
+ int /* i */
+ );
+
+extern _X_EXPORT Bool XkbInitPrivates(void);
+
+extern _X_EXPORT void XkbSetExtension(DeviceIntPtr device,
+ ProcessInputProc proc);
+
+extern _X_EXPORT void XkbFreeCompatMap(XkbDescPtr /* xkb */ ,
+ unsigned int /* which */ ,
+ Bool /* freeMap */
+ );
+
+extern _X_EXPORT void XkbFreeNames(XkbDescPtr /* xkb */ ,
+ unsigned int /* which */ ,
+ Bool /* freeMap */
+ );
+
+extern _X_EXPORT int _XkbLookupAnyDevice(DeviceIntPtr *pDev,
+ int id,
+ ClientPtr client,
+ Mask access_mode, int *xkb_err);
+
+extern _X_EXPORT int _XkbLookupKeyboard(DeviceIntPtr *pDev,
+ int id,
+ ClientPtr client,
+ Mask access_mode, int *xkb_err);
+
+extern _X_EXPORT int _XkbLookupBellDevice(DeviceIntPtr *pDev,
+ int id,
+ ClientPtr client,
+ Mask access_mode, int *xkb_err);
+
+extern _X_EXPORT int _XkbLookupLedDevice(DeviceIntPtr *pDev,
+ int id,
+ ClientPtr client,
+ Mask access_mode, int *xkb_err);
+
+extern _X_EXPORT int _XkbLookupButtonDevice(DeviceIntPtr *pDev,
+ int id,
+ ClientPtr client,
+ Mask access_mode, int *xkb_err);
+
+extern _X_EXPORT XkbDescPtr XkbAllocKeyboard(void
+ );
+
+extern _X_EXPORT Status XkbAllocClientMap(XkbDescPtr /* xkb */ ,
+ unsigned int /* which */ ,
+ unsigned int /* nTypes */
+ );
+
+extern _X_EXPORT Status XkbAllocServerMap(XkbDescPtr /* xkb */ ,
+ unsigned int /* which */ ,
+ unsigned int /* nNewActions */
+ );
+
+extern _X_EXPORT void XkbFreeClientMap(XkbDescPtr /* xkb */ ,
+ unsigned int /* what */ ,
+ Bool /* freeMap */
+ );
+
+extern _X_EXPORT void XkbFreeServerMap(XkbDescPtr /* xkb */ ,
+ unsigned int /* what */ ,
+ Bool /* freeMap */
+ );
+
+extern _X_EXPORT Status XkbAllocIndicatorMaps(XkbDescPtr /* xkb */
+ );
+
+extern _X_EXPORT Status XkbAllocCompatMap(XkbDescPtr /* xkb */ ,
+ unsigned int /* which */ ,
+ unsigned int /* nInterpret */
+ );
+
+extern _X_EXPORT Status XkbAllocNames(XkbDescPtr /* xkb */ ,
+ unsigned int /* which */ ,
+ int /* nTotalRG */ ,
+ int /* nTotalAliases */
+ );
+
+extern _X_EXPORT Status XkbAllocControls(XkbDescPtr /* xkb */ ,
+ unsigned int /* which */
+ );
+
+extern _X_EXPORT Status XkbCopyKeyTypes(XkbKeyTypePtr /* from */ ,
+ XkbKeyTypePtr /* into */ ,
+ int /* num_types */
+ );
+
+extern _X_EXPORT Status XkbResizeKeyType(XkbDescPtr /* xkb */ ,
+ int /* type_ndx */ ,
+ int /* map_count */ ,
+ Bool /* want_preserve */ ,
+ int /* new_num_lvls */
+ );
+
+extern _X_EXPORT void XkbFreeKeyboard(XkbDescPtr /* xkb */ ,
+ unsigned int /* which */ ,
+ Bool /* freeDesc */
+ );
+
+extern _X_EXPORT void XkbFreeComponentNames(XkbComponentNamesPtr /* names */ ,
+ Bool /* freeNames */
+ );
+
+extern _X_EXPORT void XkbSetActionKeyMods(XkbDescPtr /* xkb */ ,
+ XkbAction * /* act */ ,
+ unsigned int /* mods */
+ );
+
+extern _X_EXPORT unsigned int XkbMaskForVMask(XkbDescPtr /* xkb */ ,
+ unsigned int /* vmask */
+ );
+
+extern _X_EXPORT Bool XkbVirtualModsToReal(XkbDescPtr /* xkb */ ,
+ unsigned int /* virtua_mask */ ,
+ unsigned int * /* mask_rtrn */
+ );
+
+extern _X_EXPORT unsigned int XkbAdjustGroup(int /* group */ ,
+ XkbControlsPtr /* ctrls */
+ );
+
+extern _X_EXPORT KeySym *XkbResizeKeySyms(XkbDescPtr /* xkb */ ,
+ int /* key */ ,
+ int /* needed */
+ );
+
+extern _X_EXPORT XkbAction *XkbResizeKeyActions(XkbDescPtr /* xkb */ ,
+ int /* key */ ,
+ int /* needed */
+ );
+
+extern _X_EXPORT void XkbUpdateKeyTypesFromCore(DeviceIntPtr /* pXDev */ ,
+ KeySymsPtr /* syms */ ,
+ KeyCode /* first */ ,
+ CARD8 /* num */ ,
+ XkbChangesPtr /* pChanges */
+ );
+
+extern _X_EXPORT void XkbUpdateDescActions(XkbDescPtr /* xkb */ ,
+ KeyCode /* first */ ,
+ CARD8 /* num */ ,
+ XkbChangesPtr /* changes */
+ );
+
+extern _X_EXPORT void XkbUpdateActions(DeviceIntPtr /* pXDev */ ,
+ KeyCode /* first */ ,
+ CARD8 /* num */ ,
+ XkbChangesPtr /* pChanges */ ,
+ unsigned int * /* needChecksRtrn */ ,
+ XkbEventCausePtr /* cause */
+ );
+
+extern _X_EXPORT KeySymsPtr XkbGetCoreMap(DeviceIntPtr /* keybd */
+ );
+
+extern _X_EXPORT void XkbApplyMappingChange(DeviceIntPtr /* pXDev */ ,
+ KeySymsPtr /* map */ ,
+ KeyCode /* firstKey */ ,
+ CARD8 /* num */ ,
+ CARD8 * /* modmap */ ,
+ ClientPtr /* client */
+ );
+
+extern _X_EXPORT void XkbSetIndicators(DeviceIntPtr /* pXDev */ ,
+ CARD32 /* affect */ ,
+ CARD32 /* values */ ,
+ XkbEventCausePtr /* cause */
+ );
+
+extern _X_EXPORT void XkbUpdateIndicators(DeviceIntPtr /* keybd */ ,
+ CARD32 /* changed */ ,
+ Bool /* check_edevs */ ,
+ XkbChangesPtr /* pChanges */ ,
+ XkbEventCausePtr /* cause */
+ );
+
+extern _X_EXPORT XkbSrvLedInfoPtr XkbAllocSrvLedInfo(DeviceIntPtr /* dev */ ,
+ KbdFeedbackPtr /* kf */ ,
+ LedFeedbackPtr /* lf */ ,
+ unsigned int /* needed_parts */
+ );
+
+extern _X_EXPORT XkbSrvLedInfoPtr XkbCopySrvLedInfo(DeviceIntPtr /* dev */ ,
+ XkbSrvLedInfoPtr /* src */ ,
+ KbdFeedbackPtr /* kf */ ,
+ LedFeedbackPtr /* lf */
+ );
+
+extern _X_EXPORT XkbSrvLedInfoPtr XkbFindSrvLedInfo(DeviceIntPtr /* dev */ ,
+ unsigned int /* class */ ,
+ unsigned int /* id */ ,
+ unsigned int /* needed_parts */
+ );
+
+extern _X_EXPORT void XkbApplyLedNameChanges(DeviceIntPtr /* dev */ ,
+ XkbSrvLedInfoPtr /* sli */ ,
+ unsigned int /* changed_names */ ,
+ xkbExtensionDeviceNotify * /* ed */
+ ,
+ XkbChangesPtr /* changes */ ,
+ XkbEventCausePtr /* cause */
+ );
+
+extern _X_EXPORT void XkbApplyLedMapChanges(DeviceIntPtr /* dev */ ,
+ XkbSrvLedInfoPtr /* sli */ ,
+ unsigned int /* changed_maps */ ,
+ xkbExtensionDeviceNotify * /* ed */
+ ,
+ XkbChangesPtr /* changes */ ,
+ XkbEventCausePtr /* cause */
+ );
+
+extern _X_EXPORT void XkbApplyLedStateChanges(DeviceIntPtr /* dev */ ,
+ XkbSrvLedInfoPtr /* sli */ ,
+ unsigned int /* changed_leds */ ,
+ xkbExtensionDeviceNotify *
+ /* ed */ ,
+ XkbChangesPtr /* changes */ ,
+ XkbEventCausePtr /* cause */
+ );
+
+extern _X_EXPORT void XkbFlushLedEvents(DeviceIntPtr /* dev */ ,
+ DeviceIntPtr /* kbd */ ,
+ XkbSrvLedInfoPtr /* sli */ ,
+ xkbExtensionDeviceNotify * /* ed */ ,
+ XkbChangesPtr /* changes */ ,
+ XkbEventCausePtr /* cause */
+ );
+
+extern _X_EXPORT unsigned int XkbIndicatorsToUpdate(DeviceIntPtr /* dev */ ,
+ unsigned long
+ /* state_changes */ ,
+ Bool /* enabled_ctrl_changes */
+ );
+
+extern _X_EXPORT void XkbComputeDerivedState(XkbSrvInfoPtr /* xkbi */
+ );
+
+extern _X_EXPORT void XkbCheckSecondaryEffects(XkbSrvInfoPtr /* xkbi */ ,
+ unsigned int /* which */ ,
+ XkbChangesPtr /* changes */ ,
+ XkbEventCausePtr /* cause */
+ );
+
+extern _X_EXPORT void XkbCheckIndicatorMaps(DeviceIntPtr /* dev */ ,
+ XkbSrvLedInfoPtr /* sli */ ,
+ unsigned int /* which */
+ );
+
+extern _X_EXPORT unsigned int XkbStateChangedFlags(XkbStatePtr /* old */ ,
+ XkbStatePtr /* new */
+ );
+
+extern _X_EXPORT void XkbSendStateNotify(DeviceIntPtr /* kbd */ ,
+ xkbStateNotify * /* pSN */
+ );
+
+extern _X_EXPORT void XkbSendMapNotify(DeviceIntPtr /* kbd */ ,
+ xkbMapNotify * /* ev */
+ );
+
+extern _X_EXPORT int XkbComputeControlsNotify(DeviceIntPtr /* kbd */ ,
+ XkbControlsPtr /* old */ ,
+ XkbControlsPtr /* new */ ,
+ xkbControlsNotify * /* pCN */ ,
+ Bool /* forceCtrlProc */
+ );
+
+extern _X_EXPORT void XkbSendControlsNotify(DeviceIntPtr /* kbd */ ,
+ xkbControlsNotify * /* ev */
+ );
+
+extern _X_EXPORT void XkbSendCompatMapNotify(DeviceIntPtr /* kbd */ ,
+ xkbCompatMapNotify * /* ev */
+ );
+
+extern _X_EXPORT void XkbHandleBell(BOOL /* force */ ,
+ BOOL /* eventOnly */ ,
+ DeviceIntPtr /* kbd */ ,
+ CARD8 /* percent */ ,
+ void */* ctrl */ ,
+ CARD8 /* class */ ,
+ Atom /* name */ ,
+ WindowPtr /* pWin */ ,
+ ClientPtr /* pClient */
+ );
+
+extern _X_EXPORT void XkbSendAccessXNotify(DeviceIntPtr /* kbd */ ,
+ xkbAccessXNotify * /* pEv */
+ );
+
+extern _X_EXPORT void XkbSendNamesNotify(DeviceIntPtr /* kbd */ ,
+ xkbNamesNotify * /* ev */
+ );
+
+extern _X_EXPORT void XkbSendActionMessage(DeviceIntPtr /* kbd */ ,
+ xkbActionMessage * /* ev */
+ );
+
+extern _X_EXPORT void XkbSendExtensionDeviceNotify(DeviceIntPtr /* kbd */ ,
+ ClientPtr /* client */ ,
+ xkbExtensionDeviceNotify * /* ev */
+ );
+
+extern _X_EXPORT void XkbSendNotification(DeviceIntPtr /* kbd */ ,
+ XkbChangesPtr /* pChanges */ ,
+ XkbEventCausePtr /* cause */
+ );
+
+extern _X_EXPORT void XkbProcessKeyboardEvent(DeviceEvent * /* event */ ,
+ DeviceIntPtr /* keybd */
+ );
+
+extern _X_EXPORT void XkbHandleActions(DeviceIntPtr /* dev */ ,
+ DeviceIntPtr /* kbd */ ,
+ DeviceEvent * /* event */
+ );
+
+extern _X_EXPORT Bool XkbEnableDisableControls(XkbSrvInfoPtr /* xkbi */ ,
+ unsigned long /* change */ ,
+ unsigned long /* newValues */ ,
+ XkbChangesPtr /* changes */ ,
+ XkbEventCausePtr /* cause */
+ );
+
+extern _X_EXPORT void AccessXInit(DeviceIntPtr /* dev */
+ );
+
+extern _X_EXPORT Bool AccessXFilterPressEvent(DeviceEvent * /* event */ ,
+ DeviceIntPtr /* keybd */
+ );
+
+extern _X_EXPORT Bool AccessXFilterReleaseEvent(DeviceEvent * /* event */ ,
+ DeviceIntPtr /* keybd */
+ );
+
+extern _X_EXPORT void AccessXCancelRepeatKey(XkbSrvInfoPtr /* xkbi */ ,
+ KeyCode /* key */
+ );
+
+extern _X_EXPORT void AccessXComputeCurveFactor(XkbSrvInfoPtr /* xkbi */ ,
+ XkbControlsPtr /* ctrls */
+ );
+
+extern _X_EXPORT XkbInterestPtr XkbFindClientResource(DevicePtr /* inDev */ ,
+ ClientPtr /* client */
+ );
+
+extern _X_EXPORT XkbInterestPtr XkbAddClientResource(DevicePtr /* inDev */ ,
+ ClientPtr /* client */ ,
+ XID /* id */
+ );
+
+extern _X_EXPORT int XkbRemoveResourceClient(DevicePtr /* inDev */ ,
+ XID /* id */
+ );
+
+extern _X_EXPORT int XkbDDXAccessXBeep(DeviceIntPtr /* dev */ ,
+ unsigned int /* what */ ,
+ unsigned int /* which */
+ );
+
+extern _X_EXPORT int XkbDDXUsesSoftRepeat(DeviceIntPtr /* dev */
+ );
+
+extern _X_EXPORT void XkbDDXKeybdCtrlProc(DeviceIntPtr /* dev */ ,
+ KeybdCtrl * /* ctrl */
+ );
+
+extern _X_EXPORT void XkbDDXChangeControls(DeviceIntPtr /* dev */ ,
+ XkbControlsPtr /* old */ ,
+ XkbControlsPtr /* new */
+ );
+
+extern _X_EXPORT void XkbDDXUpdateDeviceIndicators(DeviceIntPtr /* dev */ ,
+ XkbSrvLedInfoPtr /* sli */ ,
+ CARD32 /* newState */
+ );
+
+extern _X_EXPORT int XkbDDXTerminateServer(DeviceIntPtr /* dev */ ,
+ KeyCode /* key */ ,
+ XkbAction * /* act */
+ );
+
+extern _X_EXPORT int XkbDDXSwitchScreen(DeviceIntPtr /* dev */ ,
+ KeyCode /* key */ ,
+ XkbAction * /* act */
+ );
+
+extern _X_EXPORT int XkbDDXPrivate(DeviceIntPtr /* dev */ ,
+ KeyCode /* key */ ,
+ XkbAction * /* act */
+ );
+
+extern _X_EXPORT void XkbDisableComputedAutoRepeats(DeviceIntPtr /* pXDev */ ,
+ unsigned int /* key */
+ );
+
+extern _X_EXPORT void XkbSetRepeatKeys(DeviceIntPtr /* pXDev */ ,
+ int /* key */ ,
+ int /* onoff */
+ );
+
+extern _X_EXPORT int XkbLatchModifiers(DeviceIntPtr /* pXDev */ ,
+ CARD8 /* mask */ ,
+ CARD8 /* latches */
+ );
+
+extern _X_EXPORT int XkbLatchGroup(DeviceIntPtr /* pXDev */ ,
+ int /* group */
+ );
+
+extern _X_EXPORT void XkbClearAllLatchesAndLocks(DeviceIntPtr /* dev */ ,
+ XkbSrvInfoPtr /* xkbi */ ,
+ Bool /* genEv */ ,
+ XkbEventCausePtr /* cause */
+ );
+
+extern _X_EXPORT void XkbInitRules(XkbRMLVOSet * /* rmlvo */,
+ const char * /* rules */,
+ const char * /* model */,
+ const char * /* layout */,
+ const char * /* variant */,
+ const char * /* options */
+ ) ;
+
+extern _X_EXPORT void XkbGetRulesDflts(XkbRMLVOSet * /* rmlvo */
+ );
+
+extern _X_EXPORT void XkbFreeRMLVOSet(XkbRMLVOSet * /* rmlvo */ ,
+ Bool /* freeRMLVO */
+ );
+
+extern _X_EXPORT void XkbSetRulesDflts(XkbRMLVOSet * /* rmlvo */
+ );
+
+extern _X_EXPORT void XkbDeleteRulesDflts(void
+ );
+
+extern _X_EXPORT void XkbDeleteRulesUsed(void
+ );
+
+extern _X_EXPORT int SProcXkbDispatch(ClientPtr /* client */
+ );
+
+extern _X_EXPORT XkbGeometryPtr XkbLookupNamedGeometry(DeviceIntPtr /* dev */ ,
+ Atom /* name */ ,
+ Bool * /* shouldFree */
+ );
+
+extern _X_EXPORT void XkbConvertCase(KeySym /* sym */ ,
+ KeySym * /* lower */ ,
+ KeySym * /* upper */
+ );
+
+extern _X_EXPORT Status XkbChangeKeycodeRange(XkbDescPtr /* xkb */ ,
+ int /* minKC */ ,
+ int /* maxKC */ ,
+ XkbChangesPtr /* changes */
+ );
+
+extern _X_EXPORT void XkbFreeSrvLedInfo(XkbSrvLedInfoPtr /* sli */
+ );
+
+extern _X_EXPORT void XkbFreeInfo(XkbSrvInfoPtr /* xkbi */
+ );
+
+extern _X_EXPORT Status XkbChangeTypesOfKey(XkbDescPtr /* xkb */ ,
+ int /* key */ ,
+ int /* nGroups */ ,
+ unsigned int /* groups */ ,
+ int * /* newTypesIn */ ,
+ XkbMapChangesPtr /* changes */
+ );
+
+extern _X_EXPORT int XkbKeyTypesForCoreSymbols(XkbDescPtr /* xkb */ ,
+ int /* map_width */ ,
+ KeySym * /* core_syms */ ,
+ unsigned int /* protected */ ,
+ int * /* types_inout */ ,
+ KeySym * /* xkb_syms_rtrn */
+ );
+
+extern _X_EXPORT Bool XkbApplyCompatMapToKey(XkbDescPtr /* xkb */ ,
+ KeyCode /* key */ ,
+ XkbChangesPtr /* changes */
+ );
+
+extern _X_EXPORT Bool XkbApplyVirtualModChanges(XkbDescPtr /* xkb */ ,
+ unsigned int /* changed */ ,
+ XkbChangesPtr /* changes */
+ );
+
+extern _X_EXPORT void XkbSendNewKeyboardNotify(DeviceIntPtr /* kbd */ ,
+ xkbNewKeyboardNotify * /* pNKN */
+ );
+
+extern Bool XkbCopyKeymap(XkbDescPtr /* dst */ ,
+ XkbDescPtr /* src */ );
+
+extern _X_EXPORT Bool XkbCopyDeviceKeymap(DeviceIntPtr /* dst */ ,
+ DeviceIntPtr /* src */ );
+
+extern void XkbFilterEvents(ClientPtr /* pClient */ ,
+ int /* nEvents */ ,
+ xEvent * /* xE */ );
+
+extern int XkbGetEffectiveGroup(XkbSrvInfoPtr /* xkbi */ ,
+ XkbStatePtr /* xkbstate */ ,
+ CARD8 /* keycode */ );
+
+extern void XkbMergeLockedPtrBtns(DeviceIntPtr /* master */ );
+
+extern void XkbFakeDeviceButton(DeviceIntPtr /* dev */ ,
+ int /* press */ ,
+ int /* button */ );
+
+#include "xkbfile.h"
+#include "xkbrules.h"
+
+#define _XkbListKeycodes 0
+#define _XkbListTypes 1
+#define _XkbListCompat 2
+#define _XkbListSymbols 3
+#define _XkbListGeometry 4
+#define _XkbListNumComponents 5
+
+extern _X_EXPORT unsigned int XkbDDXLoadKeymapByNames(DeviceIntPtr /* keybd */ ,
+ XkbComponentNamesPtr
+ /* names */ ,
+ unsigned int /* want */ ,
+ unsigned int /* need */ ,
+ XkbDescPtr *
+ /* finfoRtrn */ ,
+ char *
+ /* keymapNameRtrn */ ,
+ int /* keymapNameRtrnLen */
+ );
+
+extern _X_EXPORT Bool XkbDDXNamesFromRules(DeviceIntPtr /* keybd */ ,
+ const char * /* rules */ ,
+ XkbRF_VarDefsPtr /* defs */ ,
+ XkbComponentNamesPtr /* names */
+ );
+
+extern _X_EXPORT XkbDescPtr XkbCompileKeymap(DeviceIntPtr /* dev */ ,
+ XkbRMLVOSet * /* rmlvo */
+ );
+
+#endif /* _XKBSRV_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xkbstr.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xkbstr.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xkbstr.h (working copy)
@@ -0,0 +1,640 @@
+/************************************************************
+Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+#ifndef _XKBSTR_H_
+#define _XKBSTR_H_
+
+#include <X11/extensions/XKB.h>
+
+#define XkbCharToInt(v) ((int) ((v) & 0x80 ? ((v) | (~0xff)) : ((v) & 0x7f)))
+#define XkbIntTo2Chars(i, h, l) ((h) = (i >> 8) & 0xff, (l) = (i) & 0xff)
+
+#if defined(WORD64) && defined(UNSIGNEDBITFIELDS)
+#define Xkb2CharsToInt(h, l) ((int) ((h) & 0x80 ? \
+ (((h) << 8) | (l) | (~0xffff)) : \
+ (((h) << 8) | (l) & 0x7fff))
+#else
+#define Xkb2CharsToInt(h,l) ((short)(((h)<<8)|(l)))
+#endif
+
+ /*
+ * Common data structures and access macros
+ */
+
+typedef struct _XkbStateRec {
+ unsigned char group; /* base + latched + locked */
+ /* FIXME: Why are base + latched short and not char?? */
+ unsigned short base_group; /* physically ... down? */
+ unsigned short latched_group;
+ unsigned char locked_group;
+
+ unsigned char mods; /* base + latched + locked */
+ unsigned char base_mods; /* physically down */
+ unsigned char latched_mods;
+ unsigned char locked_mods;
+
+ unsigned char compat_state; /* mods + group for core state */
+
+ /* grab mods = all depressed and latched mods, _not_ locked mods */
+ unsigned char grab_mods; /* grab mods minus internal mods */
+ unsigned char compat_grab_mods; /* grab mods + group for core state,
+ but not locked groups if
+ IgnoreGroupLocks set */
+
+ /* effective mods = all mods (depressed, latched, locked) */
+ unsigned char lookup_mods; /* effective mods minus internal mods */
+ unsigned char compat_lookup_mods; /* effective mods + group */
+
+ unsigned short ptr_buttons; /* core pointer buttons */
+} XkbStateRec, *XkbStatePtr;
+
+#define XkbStateFieldFromRec(s) XkbBuildCoreState((s)->lookup_mods,(s)->group)
+#define XkbGrabStateFromRec(s) XkbBuildCoreState((s)->grab_mods,(s)->group)
+
+typedef struct _XkbMods {
+ unsigned char mask; /* effective mods */
+ unsigned char real_mods;
+ unsigned short vmods;
+} XkbModsRec, *XkbModsPtr;
+
+typedef struct _XkbKTMapEntry {
+ Bool active;
+ unsigned char level;
+ XkbModsRec mods;
+} XkbKTMapEntryRec, *XkbKTMapEntryPtr;
+
+typedef struct _XkbKeyType {
+ XkbModsRec mods;
+ unsigned char num_levels;
+ unsigned char map_count;
+ XkbKTMapEntryPtr map;
+ XkbModsPtr preserve;
+ Atom name;
+ Atom *level_names;
+} XkbKeyTypeRec, *XkbKeyTypePtr;
+
+#define XkbNumGroups(g) ((g)&0x0f)
+#define XkbOutOfRangeGroupInfo(g) ((g)&0xf0)
+#define XkbOutOfRangeGroupAction(g) ((g)&0xc0)
+#define XkbOutOfRangeGroupNumber(g) (((g)&0x30)>>4)
+#define XkbSetGroupInfo(g, w, n) (((w) & 0xc0) | (((n) & 3) << 4) | \
+ ((g) & 0x0f))
+#define XkbSetNumGroups(g,n) (((g)&0xf0)|((n)&0x0f))
+
+ /*
+ * Structures and access macros used primarily by the server
+ */
+
+typedef struct _XkbBehavior {
+ unsigned char type;
+ unsigned char data;
+} XkbBehavior;
+
+#define XkbAnyActionDataSize 7
+typedef struct _XkbAnyAction {
+ unsigned char type;
+ unsigned char data[XkbAnyActionDataSize];
+} XkbAnyAction;
+
+typedef struct _XkbModAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char mask;
+ unsigned char real_mods;
+ /* FIXME: Make this an int. */
+ unsigned char vmods1;
+ unsigned char vmods2;
+} XkbModAction;
+
+#define XkbModActionVMods(a) ((short) (((a)->vmods1 << 8) | (a)->vmods2))
+#define XkbSetModActionVMods(a,v) \
+ ((a)->vmods1 = (((v) >> 8) & 0xff), \
+ (a)->vmods2 = (v) & 0xff)
+
+typedef struct _XkbGroupAction {
+ unsigned char type;
+ unsigned char flags;
+ /* FIXME: Make this an int. */
+ char group_XXX;
+} XkbGroupAction;
+
+#define XkbSAGroup(a) (XkbCharToInt((a)->group_XXX))
+#define XkbSASetGroup(a,g) ((a)->group_XXX=(g))
+
+typedef struct _XkbISOAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char mask;
+ unsigned char real_mods;
+ /* FIXME: Make this an int. */
+ char group_XXX;
+ unsigned char affect;
+ unsigned char vmods1;
+ unsigned char vmods2;
+} XkbISOAction;
+
+typedef struct _XkbPtrAction {
+ unsigned char type;
+ unsigned char flags;
+ /* FIXME: Make this an int. */
+ unsigned char high_XXX;
+ unsigned char low_XXX;
+ unsigned char high_YYY;
+ unsigned char low_YYY;
+} XkbPtrAction;
+
+#define XkbPtrActionX(a) (Xkb2CharsToInt((a)->high_XXX,(a)->low_XXX))
+#define XkbPtrActionY(a) (Xkb2CharsToInt((a)->high_YYY,(a)->low_YYY))
+#define XkbSetPtrActionX(a,x) (XkbIntTo2Chars(x,(a)->high_XXX,(a)->low_XXX))
+#define XkbSetPtrActionY(a,y) (XkbIntTo2Chars(y,(a)->high_YYY,(a)->low_YYY))
+
+typedef struct _XkbPtrBtnAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char count;
+ unsigned char button;
+} XkbPtrBtnAction;
+
+typedef struct _XkbPtrDfltAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char affect;
+ char valueXXX;
+} XkbPtrDfltAction;
+
+#define XkbSAPtrDfltValue(a) (XkbCharToInt((a)->valueXXX))
+#define XkbSASetPtrDfltValue(a, c) ((a)->valueXXX = (c) & 0xff)
+
+typedef struct _XkbSwitchScreenAction {
+ unsigned char type;
+ unsigned char flags;
+ char screenXXX;
+} XkbSwitchScreenAction;
+
+#define XkbSAScreen(a) (XkbCharToInt((a)->screenXXX))
+#define XkbSASetScreen(a, s) ((a)->screenXXX = (s) & 0xff)
+
+typedef struct _XkbCtrlsAction {
+ unsigned char type;
+ unsigned char flags;
+ /* FIXME: Make this an int. */
+ unsigned char ctrls3;
+ unsigned char ctrls2;
+ unsigned char ctrls1;
+ unsigned char ctrls0;
+} XkbCtrlsAction;
+
+#define XkbActionSetCtrls(a, c) ((a)->ctrls3 = ((c) >> 24) & 0xff, \
+ (a)->ctrls2 = ((c) >> 16) & 0xff, \
+ (a)->ctrls1 = ((c) >> 8) & 0xff, \
+ (a)->ctrls0 = (c) & 0xff)
+#define XkbActionCtrls(a) ((((unsigned int)(a)->ctrls3)<<24)|\
+ (((unsigned int)(a)->ctrls2)<<16)|\
+ (((unsigned int)(a)->ctrls1)<<8)|\
+ ((unsigned int) (a)->ctrls0))
+
+typedef struct _XkbMessageAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char message[6];
+} XkbMessageAction;
+
+typedef struct _XkbRedirectKeyAction {
+ unsigned char type;
+ unsigned char new_key;
+ unsigned char mods_mask;
+ unsigned char mods;
+ /* FIXME: Make this an int. */
+ unsigned char vmods_mask0;
+ unsigned char vmods_mask1;
+ unsigned char vmods0;
+ unsigned char vmods1;
+} XkbRedirectKeyAction;
+
+#define XkbSARedirectVMods(a) ((((unsigned int)(a)->vmods1)<<8)|\
+ ((unsigned int)(a)->vmods0))
+/* FIXME: This is blatantly not setting vmods. Yeesh. */
+#define XkbSARedirectSetVMods(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),\
+ ((a)->vmods_mask0=((m)&0xff)))
+#define XkbSARedirectVModsMask(a) ((((unsigned int)(a)->vmods_mask1)<<8)|\
+ ((unsigned int)(a)->vmods_mask0))
+#define XkbSARedirectSetVModsMask(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),\
+ ((a)->vmods_mask0=((m)&0xff)))
+
+typedef struct _XkbDeviceBtnAction {
+ unsigned char type;
+ unsigned char flags;
+ unsigned char count;
+ unsigned char button;
+ unsigned char device;
+} XkbDeviceBtnAction;
+
+typedef struct _XkbDeviceValuatorAction {
+ unsigned char type;
+ unsigned char device;
+ unsigned char v1_what;
+ unsigned char v1_ndx;
+ unsigned char v1_value;
+ unsigned char v2_what;
+ unsigned char v2_ndx;
+ unsigned char v2_value;
+} XkbDeviceValuatorAction;
+
+typedef union _XkbAction {
+ XkbAnyAction any;
+ XkbModAction mods;
+ XkbGroupAction group;
+ XkbISOAction iso;
+ XkbPtrAction ptr;
+ XkbPtrBtnAction btn;
+ XkbPtrDfltAction dflt;
+ XkbSwitchScreenAction screen;
+ XkbCtrlsAction ctrls;
+ XkbMessageAction msg;
+ XkbRedirectKeyAction redirect;
+ XkbDeviceBtnAction devbtn;
+ XkbDeviceValuatorAction devval;
+ unsigned char type;
+} XkbAction;
+
+typedef struct _XkbControls {
+ unsigned char mk_dflt_btn;
+ unsigned char num_groups;
+ unsigned char groups_wrap;
+ XkbModsRec internal;
+ XkbModsRec ignore_lock;
+ unsigned int enabled_ctrls;
+ unsigned short repeat_delay;
+ unsigned short repeat_interval;
+ unsigned short slow_keys_delay;
+ unsigned short debounce_delay;
+ unsigned short mk_delay;
+ unsigned short mk_interval;
+ unsigned short mk_time_to_max;
+ unsigned short mk_max_speed;
+ short mk_curve;
+ unsigned short ax_options;
+ unsigned short ax_timeout;
+ unsigned short axt_opts_mask;
+ unsigned short axt_opts_values;
+ unsigned int axt_ctrls_mask;
+ unsigned int axt_ctrls_values;
+ unsigned char per_key_repeat[XkbPerKeyBitArraySize];
+} XkbControlsRec, *XkbControlsPtr;
+
+#define XkbAX_AnyFeedback(c) ((c)->enabled_ctrls&XkbAccessXFeedbackMask)
+#define XkbAX_NeedOption(c,w) ((c)->ax_options&(w))
+#define XkbAX_NeedFeedback(c, w) (XkbAX_AnyFeedback((c)) && \
+ XkbAX_NeedOption((c), (w)))
+
+typedef struct _XkbServerMapRec {
+ unsigned short num_acts;
+ unsigned short size_acts;
+ XkbAction *acts;
+
+ XkbBehavior *behaviors;
+ unsigned short *key_acts;
+#if defined(__cplusplus) || defined(c_plusplus)
+ /* explicit is a C++ reserved word */
+ unsigned char *c_explicit;
+#else
+ unsigned char *explicit;
+#endif
+ unsigned char vmods[XkbNumVirtualMods];
+ unsigned short *vmodmap;
+} XkbServerMapRec, *XkbServerMapPtr;
+
+#define XkbSMKeyActionsPtr(m, k) (&(m)->acts[(m)->key_acts[(k)]])
+
+ /*
+ * Structures and access macros used primarily by clients
+ */
+
+typedef struct _XkbSymMapRec {
+ unsigned char kt_index[XkbNumKbdGroups];
+ unsigned char group_info;
+ unsigned char width;
+ unsigned short offset;
+} XkbSymMapRec, *XkbSymMapPtr;
+
+typedef struct _XkbClientMapRec {
+ unsigned char size_types;
+ unsigned char num_types;
+ XkbKeyTypePtr types;
+
+ unsigned short size_syms;
+ unsigned short num_syms;
+ KeySym *syms;
+ XkbSymMapPtr key_sym_map;
+
+ unsigned char *modmap;
+} XkbClientMapRec, *XkbClientMapPtr;
+
+#define XkbCMKeyGroupInfo(m, k) ((m)->key_sym_map[(k)].group_info)
+#define XkbCMKeyNumGroups(m, k) (XkbNumGroups((m)->key_sym_map[(k)].group_info))
+#define XkbCMKeyGroupWidth(m, k, g) (XkbCMKeyType((m), (k), (g))->num_levels)
+#define XkbCMKeyGroupsWidth(m, k) ((m)->key_sym_map[(k)].width)
+#define XkbCMKeyTypeIndex(m, k, g) ((m)->key_sym_map[(k)].kt_index[(g) & 0x3])
+#define XkbCMKeyType(m, k, g) (&(m)->types[XkbCMKeyTypeIndex((m), (k), (g))])
+#define XkbCMKeyNumSyms(m, k) (XkbCMKeyGroupsWidth((m), (k)) * \
+ XkbCMKeyNumGroups((m), (k)))
+#define XkbCMKeySymsOffset(m, k) ((m)->key_sym_map[(k)].offset)
+#define XkbCMKeySymsPtr(m, k) (&(m)->syms[XkbCMKeySymsOffset((m), (k))])
+
+ /*
+ * Compatibility structures and access macros
+ */
+
+typedef struct _XkbSymInterpretRec {
+ KeySym sym;
+ unsigned char flags;
+ unsigned char match;
+ unsigned char mods;
+ unsigned char virtual_mod;
+ XkbAnyAction act;
+} XkbSymInterpretRec, *XkbSymInterpretPtr;
+
+typedef struct _XkbCompatMapRec {
+ XkbSymInterpretPtr sym_interpret;
+ XkbModsRec groups[XkbNumKbdGroups];
+ unsigned short num_si;
+ unsigned short size_si;
+} XkbCompatMapRec, *XkbCompatMapPtr;
+
+typedef struct _XkbIndicatorMapRec {
+ unsigned char flags;
+ /* FIXME: For some reason, interepretation of groups is wildly
+ * different between which being base/latched/locked. */
+ unsigned char which_groups;
+ unsigned char groups;
+ unsigned char which_mods;
+ XkbModsRec mods;
+ unsigned int ctrls;
+} XkbIndicatorMapRec, *XkbIndicatorMapPtr;
+
+#define XkbIM_IsAuto(i) (!((i)->flags & XkbIM_NoAutomatic) && \
+ (((i)->which_groups&&(i)->groups)||\
+ ((i)->which_mods&&(i)->mods.mask)||\
+ (i)->ctrls))
+#define XkbIM_InUse(i) ((i)->flags || (i)->which_groups || (i)->which_mods || \
+ (i)->ctrls)
+
+typedef struct _XkbIndicatorRec {
+ unsigned long phys_indicators;
+ XkbIndicatorMapRec maps[XkbNumIndicators];
+} XkbIndicatorRec, *XkbIndicatorPtr;
+
+typedef struct _XkbKeyNameRec {
+ char name[XkbKeyNameLength];
+} XkbKeyNameRec, *XkbKeyNamePtr;
+
+typedef struct _XkbKeyAliasRec {
+ char real[XkbKeyNameLength];
+ char alias[XkbKeyNameLength];
+} XkbKeyAliasRec, *XkbKeyAliasPtr;
+
+ /*
+ * Names for everything
+ */
+typedef struct _XkbNamesRec {
+ Atom keycodes;
+ Atom geometry;
+ Atom symbols;
+ Atom types;
+ Atom compat;
+ Atom vmods[XkbNumVirtualMods];
+ Atom indicators[XkbNumIndicators];
+ Atom groups[XkbNumKbdGroups];
+ XkbKeyNamePtr keys;
+ XkbKeyAliasPtr key_aliases;
+ Atom *radio_groups;
+ Atom phys_symbols;
+
+ unsigned char num_keys;
+ unsigned char num_key_aliases;
+ unsigned short num_rg;
+} XkbNamesRec, *XkbNamesPtr;
+
+typedef struct _XkbGeometry *XkbGeometryPtr;
+
+ /*
+ * Tie it all together into one big keyboard description
+ */
+typedef struct _XkbDesc {
+ unsigned int defined;
+ unsigned short flags;
+ unsigned short device_spec;
+ KeyCode min_key_code;
+ KeyCode max_key_code;
+
+ XkbControlsPtr ctrls;
+ XkbServerMapPtr server;
+ XkbClientMapPtr map;
+ XkbIndicatorPtr indicators;
+ XkbNamesPtr names;
+ XkbCompatMapPtr compat;
+ XkbGeometryPtr geom;
+} XkbDescRec, *XkbDescPtr;
+
+#define XkbKeyKeyTypeIndex(d, k, g) (XkbCMKeyTypeIndex((d)->map, (k), (g)))
+#define XkbKeyKeyType(d, k, g) (XkbCMKeyType((d)->map, (k), (g)))
+#define XkbKeyGroupWidth(d, k, g) (XkbCMKeyGroupWidth((d)->map, (k), (g)))
+#define XkbKeyGroupsWidth(d, k) (XkbCMKeyGroupsWidth((d)->map, (k)))
+#define XkbKeyGroupInfo(d,k) (XkbCMKeyGroupInfo((d)->map,(k)))
+#define XkbKeyNumGroups(d,k) (XkbCMKeyNumGroups((d)->map,(k)))
+#define XkbKeyNumSyms(d,k) (XkbCMKeyNumSyms((d)->map,(k)))
+#define XkbKeySymsPtr(d,k) (XkbCMKeySymsPtr((d)->map,(k)))
+#define XkbKeySym(d, k, n) (XkbKeySymsPtr((d), (k))[(n)])
+#define XkbKeySymEntry(d,k,sl,g) \
+ (XkbKeySym((d), (k), (XkbKeyGroupsWidth((d), (k)) * (g)) + (sl)))
+#define XkbKeyAction(d,k,n) \
+ (XkbKeyHasActions((d), (k)) ? & XkbKeyActionsPtr((d), (k))[(n)] : NULL)
+#define XkbKeyActionEntry(d,k,sl,g) \
+ (XkbKeyHasActions((d), (k)) ? \
+ XkbKeyAction((d), (k), ((XkbKeyGroupsWidth((d), (k)) * (g)) + (sl))) : \
+ NULL)
+
+#define XkbKeyHasActions(d, k) (!!(d)->server->key_acts[(k)])
+#define XkbKeyNumActions(d, k) (XkbKeyHasActions((d), (k)) ? \
+ XkbKeyNumSyms((d), (k)) : 1)
+#define XkbKeyActionsPtr(d, k) (XkbSMKeyActionsPtr((d)->server, (k)))
+#define XkbKeycodeInRange(d, k) ((k) >= (d)->min_key_code && \
+ (k) <= (d)->max_key_code)
+#define XkbNumKeys(d) ((d)->max_key_code-(d)->min_key_code+1)
+
+ /*
+ * The following structures can be used to track changes
+ * to a keyboard device
+ */
+typedef struct _XkbMapChanges {
+ unsigned short changed;
+ KeyCode min_key_code;
+ KeyCode max_key_code;
+ unsigned char first_type;
+ unsigned char num_types;
+ KeyCode first_key_sym;
+ unsigned char num_key_syms;
+ KeyCode first_key_act;
+ unsigned char num_key_acts;
+ KeyCode first_key_behavior;
+ unsigned char num_key_behaviors;
+ KeyCode first_key_explicit;
+ unsigned char num_key_explicit;
+ KeyCode first_modmap_key;
+ unsigned char num_modmap_keys;
+ KeyCode first_vmodmap_key;
+ unsigned char num_vmodmap_keys;
+ unsigned char pad;
+ unsigned short vmods;
+} XkbMapChangesRec, *XkbMapChangesPtr;
+
+typedef struct _XkbControlsChanges {
+ unsigned int changed_ctrls;
+ unsigned int enabled_ctrls_changes;
+ Bool num_groups_changed;
+} XkbControlsChangesRec, *XkbControlsChangesPtr;
+
+typedef struct _XkbIndicatorChanges {
+ unsigned int state_changes;
+ unsigned int map_changes;
+} XkbIndicatorChangesRec, *XkbIndicatorChangesPtr;
+
+typedef struct _XkbNameChanges {
+ unsigned int changed;
+ unsigned char first_type;
+ unsigned char num_types;
+ unsigned char first_lvl;
+ unsigned char num_lvls;
+ unsigned char num_aliases;
+ unsigned char num_rg;
+ unsigned char first_key;
+ unsigned char num_keys;
+ unsigned short changed_vmods;
+ unsigned long changed_indicators;
+ unsigned char changed_groups;
+} XkbNameChangesRec, *XkbNameChangesPtr;
+
+typedef struct _XkbCompatChanges {
+ unsigned char changed_groups;
+ unsigned short first_si;
+ unsigned short num_si;
+} XkbCompatChangesRec, *XkbCompatChangesPtr;
+
+typedef struct _XkbChanges {
+ unsigned short device_spec;
+ unsigned short state_changes;
+ XkbMapChangesRec map;
+ XkbControlsChangesRec ctrls;
+ XkbIndicatorChangesRec indicators;
+ XkbNameChangesRec names;
+ XkbCompatChangesRec compat;
+} XkbChangesRec, *XkbChangesPtr;
+
+ /*
+ * These data structures are used to construct a keymap from
+ * a set of components or to list components in the server
+ * database.
+ */
+typedef struct _XkbComponentNames {
+ char *keycodes;
+ char *types;
+ char *compat;
+ char *symbols;
+ char *geometry;
+} XkbComponentNamesRec, *XkbComponentNamesPtr;
+
+typedef struct _XkbComponentName {
+ unsigned short flags;
+ char *name;
+} XkbComponentNameRec, *XkbComponentNamePtr;
+
+typedef struct _XkbComponentList {
+ int num_keymaps;
+ int num_keycodes;
+ int num_types;
+ int num_compat;
+ int num_symbols;
+ int num_geometry;
+ XkbComponentNamePtr keymaps;
+ XkbComponentNamePtr keycodes;
+ XkbComponentNamePtr types;
+ XkbComponentNamePtr compat;
+ XkbComponentNamePtr symbols;
+ XkbComponentNamePtr geometry;
+} XkbComponentListRec, *XkbComponentListPtr;
+
+ /*
+ * The following data structures describe and track changes to a
+ * non-keyboard extension device
+ */
+typedef struct _XkbDeviceLedInfo {
+ unsigned short led_class;
+ unsigned short led_id;
+ unsigned int phys_indicators;
+ unsigned int maps_present;
+ unsigned int names_present;
+ unsigned int state;
+ Atom names[XkbNumIndicators];
+ XkbIndicatorMapRec maps[XkbNumIndicators];
+} XkbDeviceLedInfoRec, *XkbDeviceLedInfoPtr;
+
+typedef struct _XkbDeviceInfo {
+ char *name;
+ Atom type;
+ unsigned short device_spec;
+ Bool has_own_state;
+ unsigned short supported;
+ unsigned short unsupported;
+
+ unsigned short num_btns;
+ XkbAction *btn_acts;
+
+ unsigned short sz_leds;
+ unsigned short num_leds;
+ unsigned short dflt_kbd_fb;
+ unsigned short dflt_led_fb;
+ XkbDeviceLedInfoPtr leds;
+} XkbDeviceInfoRec, *XkbDeviceInfoPtr;
+
+#define XkbXI_DevHasBtnActs(d) ((d)->num_btns > 0 && (d)->btn_acts)
+#define XkbXI_LegalDevBtn(d,b) (XkbXI_DevHasBtnActs(d) && (b) < (d)->num_btns)
+#define XkbXI_DevHasLeds(d) ((d)->num_leds > 0 && (d)->leds)
+
+typedef struct _XkbDeviceLedChanges {
+ unsigned short led_class;
+ unsigned short led_id;
+ unsigned int defined; /* names or maps changed */
+ struct _XkbDeviceLedChanges *next;
+} XkbDeviceLedChangesRec, *XkbDeviceLedChangesPtr;
+
+typedef struct _XkbDeviceChanges {
+ unsigned int changed;
+ unsigned short first_btn;
+ unsigned short num_btns;
+ XkbDeviceLedChangesRec leds;
+} XkbDeviceChangesRec, *XkbDeviceChangesPtr;
+
+#endif /* _XKBSTR_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xorg-server.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xorg-server.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xorg-server.h (working copy)
@@ -0,0 +1,231 @@
+/* include/xorg-server.h. Generated from xorg-server.h.in by configure. */
+/* xorg-server.h.in -*- c -*-
+ *
+ * This file is the template file for the xorg-server.h file which gets
+ * installed as part of the SDK. The #defines in this file overlap
+ * with those from config.h, but only for those options that we want
+ * to export to external modules. Boilerplate autotool #defines such
+ * as HAVE_STUFF and PACKAGE_NAME is kept in config.h
+ *
+ * It is still possible to update config.h.in using autoheader, since
+ * autoheader only creates a .h.in file for the first
+ * AM_CONFIG_HEADER() line, and thus does not overwrite this file.
+ *
+ * However, it should be kept in sync with this file.
+ */
+
+#ifndef _XORG_SERVER_H_
+#define _XORG_SERVER_H_
+
+/* Support BigRequests extension */
+#define BIGREQS 1
+
+/* Default font path */
+#define COMPILEDDEFAULTFONTPATH "/usr/share/fonts/X11/misc/,/usr/share/fonts/X11/TTF/,/usr/share/fonts/X11/OTF/,/usr/share/fonts/X11/Type1/,/usr/share/fonts/X11/100dpi/,/usr/share/fonts/X11/75dpi/"
+
+/* Support Composite Extension */
+#define COMPOSITE 1
+
+/* Build DPMS extension */
+#define DPMSExtension 1
+
+/* Build DRI3 extension */
+#define DRI3 1
+
+/* Build GLX extension */
+#define GLXEXT 1
+
+/* Support XDM-AUTH*-1 */
+#define HASXDMAUTH 1
+
+/* Support SHM */
+#define HAS_SHM 1
+
+/* Define to 1 if you have the `ffs' function. */
+#define HAVE_FFS 1
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#define HAVE_STRCASECMP 1
+
+/* Define to 1 if you have the `strcasestr' function. */
+#define HAVE_STRCASESTR 1
+
+/* Define to 1 if you have the `strlcat' function. */
+/* #undef HAVE_STRLCAT */
+
+/* Define to 1 if you have the `strlcpy' function. */
+/* #undef HAVE_STRLCPY */
+
+/* Define to 1 if you have the `strncasecmp' function. */
+#define HAVE_STRNCASECMP 1
+
+/* Define to 1 if you have the `strndup' function. */
+#define HAVE_STRNDUP 1
+
+/* Support IPv6 for TCP connections */
+#define IPv6 1
+
+/* Support MIT-SHM Extension */
+#define MITSHM 1
+
+/* Internal define for Xinerama */
+#define PANORAMIX 1
+
+/* Support Present extension */
+#define PRESENT 1
+
+/* Support RANDR extension */
+#define RANDR 1
+
+/* Support RENDER extension */
+#define RENDER 1
+
+/* Support X resource extension */
+#define RES 1
+
+/* Support MIT-SCREEN-SAVER extension */
+#define SCREENSAVER 1
+
+/* Support SHAPE extension */
+#define SHAPE 1
+
+/* Define to 1 on systems derived from System V Release 4 */
+/* #undef SVR4 */
+
+/* Support TCP socket connections */
+#define TCPCONN 1
+
+/* Enable touchscreen support */
+/* #undef TOUCHSCREEN */
+
+/* Support tslib touchscreen abstraction library */
+/* #undef TSLIB */
+
+/* Support UNIX socket connections */
+#define UNIXCONN 1
+
+/* unaligned word accesses behave as expected */
+/* #undef WORKING_UNALIGNED_INT */
+
+/* Support XCMisc extension */
+#define XCMISC 1
+
+/* Support Xdmcp */
+#define XDMCP 1
+
+/* Build XFree86 BigFont extension */
+/* #undef XF86BIGFONT */
+
+/* Support XFree86 Video Mode extension */
+#define XF86VIDMODE 1
+
+/* Build XDGA support */
+#define XFreeXDGA 1
+
+/* Support Xinerama extension */
+#define XINERAMA 1
+
+/* Support X Input extension */
+#define XINPUT 1
+
+/* XKB default rules */
+#define XKB_DFLT_RULES "evdev"
+
+/* Support loadable input and output drivers */
+/* #undef XLOADABLE */
+
+/* Build DRI extension */
+#define XF86DRI 1
+
+/* Build DRI2 extension */
+#define DRI2 1
+
+/* Build Xorg server */
+#define XORGSERVER 1
+
+/* Vendor release */
+/* #undef XORG_RELEASE */
+
+/* Current Xorg version */
+#define XORG_VERSION_CURRENT (((1) * 10000000) + ((15) * 100000) + ((99) * 1000) + 901)
+
+/* Build Xv Extension */
+#define XvExtension 1
+
+/* Build XvMC Extension */
+#define XvMCExtension 1
+
+/* Support XSync extension */
+#define XSYNC 1
+
+/* Support XTest extension */
+#define XTEST 1
+
+/* Support Xv Extension */
+#define XV 1
+
+/* Vendor name */
+#define XVENDORNAME "The X.Org Foundation"
+
+/* BSD-compliant source */
+/* #undef _BSD_SOURCE */
+
+/* POSIX-compliant source */
+/* #undef _POSIX_SOURCE */
+
+/* X/Open-compliant source */
+/* #undef _XOPEN_SOURCE */
+
+/* Vendor web address for support */
+#define __VENDORDWEBSUPPORT__ "http://wiki.x.org"
+
+/* Location of configuration file */
+#define __XCONFIGFILE__ "xorg.conf"
+
+/* Name of X server */
+#define __XSERVERNAME__ "Xorg"
+
+/* Building vgahw module */
+#define WITH_VGAHW 1
+
+/* System is BSD-like */
+/* #undef CSRG_BASED */
+
+/* System has PC console */
+/* #undef PCCONS_SUPPORT */
+
+/* System has PCVT console */
+/* #undef PCVT_SUPPORT */
+
+/* System has syscons console */
+/* #undef SYSCONS_SUPPORT */
+
+/* System has wscons console */
+/* #undef WSCONS_SUPPORT */
+
+/* Loadable XFree86 server awesomeness */
+#define XFree86LOADER
+
+/* Use libpciaccess */
+#define XSERVER_LIBPCIACCESS 1
+
+/* X Access Control Extension */
+#define XACE 1
+
+/* Have X server platform bus support */
+#define XSERVER_PLATFORM_BUS 1
+
+#ifdef _LP64
+#define _XSERVER64 1
+#endif
+
+/* Have support for X shared memory fence library (xshmfence) */
+#define HAVE_XSHMFENCE 1
+
+/* Use XTrans FD passing support */
+#define XTRANS_SEND_FDS 1
+
+/* Ask fontsproto to make font path element names const */
+#define FONT_PATH_ELEMENT_NAME_CONST 1
+
+#endif /* _XORG_SERVER_H_ */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xorgVersion.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xorgVersion.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xorgVersion.h (working copy)
@@ -0,0 +1,49 @@
+
+/*
+ * Copyright (c) 2004, X.Org Foundation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+#ifndef XORG_VERSION_H
+#define XORG_VERSION_H
+
+#ifndef XORG_VERSION_CURRENT
+#error
+#endif
+
+#define XORG_VERSION_NUMERIC(major,minor,patch,snap,dummy) \
+ (((major) * 10000000) + ((minor) * 100000) + ((patch) * 1000) + snap)
+
+#define XORG_GET_MAJOR_VERSION(vers) ((vers) / 10000000)
+#define XORG_GET_MINOR_VERSION(vers) (((vers) % 10000000) / 100000)
+#define XORG_GET_PATCH_VERSION(vers) (((vers) % 100000) / 1000)
+#define XORG_GET_SNAP_VERSION(vers) ((vers) % 1000)
+
+#define XORG_VERSION_MAJOR XORG_GET_MAJOR_VERSION(XORG_VERSION_CURRENT)
+#define XORG_VERSION_MINOR XORG_GET_MINOR_VERSION(XORG_VERSION_CURRENT)
+#define XORG_VERSION_PATCH XORG_GET_PATCH_VERSION(XORG_VERSION_CURRENT)
+#define XORG_VERSION_SNAP XORG_GET_SNAP_VERSION(XORG_VERSION_CURRENT)
+
+#endif
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xserver-properties.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xserver-properties.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xserver-properties.h (working copy)
@@ -0,0 +1,205 @@
+/*
+ * Copyright 2008 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software")
+ * to deal in the software without restriction, including without limitation
+ * on the rights to use, copy, modify, merge, publish, distribute, sub
+ * license, and/or sell copies of the Software, and to permit persons to whom
+ * them Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTIBILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/* Properties managed by the server. */
+
+#ifndef _XSERVER_PROPERTIES_H_
+#define _XSERVER_PROPERTIES_H_
+
+/* Type for a 4 byte float. Storage format IEEE 754 in client's default
+ * byte-ordering. */
+#define XATOM_FLOAT "FLOAT"
+
+/* STRING. Seat name of this display */
+#define SEAT_ATOM_NAME "Xorg_Seat"
+
+/* BOOL. 0 - device disabled, 1 - device enabled */
+#define XI_PROP_ENABLED "Device Enabled"
+/* BOOL. If present, device is a virtual XTEST device */
+#define XI_PROP_XTEST_DEVICE "XTEST Device"
+
+/* CARD32, 2 values, vendor, product.
+ * This property is set by the driver and may not be available for some
+ * drivers. Read-Only */
+#define XI_PROP_PRODUCT_ID "Device Product ID"
+
+/* Coordinate transformation matrix for absolute input devices
+ * FLOAT, 9 values in row-major order, coordinates in 0..1 range:
+ * [c0 c1 c2] [x]
+ * [c3 c4 c5] * [y]
+ * [c6 c7 c8] [1] */
+#define XI_PROP_TRANSFORM "Coordinate Transformation Matrix"
+
+/* STRING. Device node path of device */
+#define XI_PROP_DEVICE_NODE "Device Node"
+
+/* Pointer acceleration properties */
+/* INTEGER of any format */
+#define ACCEL_PROP_PROFILE_NUMBER "Device Accel Profile"
+/* FLOAT, format 32 */
+#define ACCEL_PROP_CONSTANT_DECELERATION "Device Accel Constant Deceleration"
+/* FLOAT, format 32 */
+#define ACCEL_PROP_ADAPTIVE_DECELERATION "Device Accel Adaptive Deceleration"
+/* FLOAT, format 32 */
+#define ACCEL_PROP_VELOCITY_SCALING "Device Accel Velocity Scaling"
+
+/* Axis labels */
+#define AXIS_LABEL_PROP "Axis Labels"
+
+#define AXIS_LABEL_PROP_REL_X "Rel X"
+#define AXIS_LABEL_PROP_REL_Y "Rel Y"
+#define AXIS_LABEL_PROP_REL_Z "Rel Z"
+#define AXIS_LABEL_PROP_REL_RX "Rel Rotary X"
+#define AXIS_LABEL_PROP_REL_RY "Rel Rotary Y"
+#define AXIS_LABEL_PROP_REL_RZ "Rel Rotary Z"
+#define AXIS_LABEL_PROP_REL_HWHEEL "Rel Horiz Wheel"
+#define AXIS_LABEL_PROP_REL_DIAL "Rel Dial"
+#define AXIS_LABEL_PROP_REL_WHEEL "Rel Vert Wheel"
+#define AXIS_LABEL_PROP_REL_MISC "Rel Misc"
+#define AXIS_LABEL_PROP_REL_VSCROLL "Rel Vert Scroll"
+#define AXIS_LABEL_PROP_REL_HSCROLL "Rel Horiz Scroll"
+
+/*
+ * Absolute axes
+ */
+
+#define AXIS_LABEL_PROP_ABS_X "Abs X"
+#define AXIS_LABEL_PROP_ABS_Y "Abs Y"
+#define AXIS_LABEL_PROP_ABS_Z "Abs Z"
+#define AXIS_LABEL_PROP_ABS_RX "Abs Rotary X"
+#define AXIS_LABEL_PROP_ABS_RY "Abs Rotary Y"
+#define AXIS_LABEL_PROP_ABS_RZ "Abs Rotary Z"
+#define AXIS_LABEL_PROP_ABS_THROTTLE "Abs Throttle"
+#define AXIS_LABEL_PROP_ABS_RUDDER "Abs Rudder"
+#define AXIS_LABEL_PROP_ABS_WHEEL "Abs Wheel"
+#define AXIS_LABEL_PROP_ABS_GAS "Abs Gas"
+#define AXIS_LABEL_PROP_ABS_BRAKE "Abs Brake"
+#define AXIS_LABEL_PROP_ABS_HAT0X "Abs Hat 0 X"
+#define AXIS_LABEL_PROP_ABS_HAT0Y "Abs Hat 0 Y"
+#define AXIS_LABEL_PROP_ABS_HAT1X "Abs Hat 1 X"
+#define AXIS_LABEL_PROP_ABS_HAT1Y "Abs Hat 1 Y"
+#define AXIS_LABEL_PROP_ABS_HAT2X "Abs Hat 2 X"
+#define AXIS_LABEL_PROP_ABS_HAT2Y "Abs Hat 2 Y"
+#define AXIS_LABEL_PROP_ABS_HAT3X "Abs Hat 3 X"
+#define AXIS_LABEL_PROP_ABS_HAT3Y "Abs Hat 3 Y"
+#define AXIS_LABEL_PROP_ABS_PRESSURE "Abs Pressure"
+#define AXIS_LABEL_PROP_ABS_DISTANCE "Abs Distance"
+#define AXIS_LABEL_PROP_ABS_TILT_X "Abs Tilt X"
+#define AXIS_LABEL_PROP_ABS_TILT_Y "Abs Tilt Y"
+#define AXIS_LABEL_PROP_ABS_TOOL_WIDTH "Abs Tool Width"
+#define AXIS_LABEL_PROP_ABS_VOLUME "Abs Volume"
+#define AXIS_LABEL_PROP_ABS_MT_TOUCH_MAJOR "Abs MT Touch Major"
+#define AXIS_LABEL_PROP_ABS_MT_TOUCH_MINOR "Abs MT Touch Minor"
+#define AXIS_LABEL_PROP_ABS_MT_WIDTH_MAJOR "Abs MT Width Major"
+#define AXIS_LABEL_PROP_ABS_MT_WIDTH_MINOR "Abs MT Width Minor"
+#define AXIS_LABEL_PROP_ABS_MT_ORIENTATION "Abs MT Orientation"
+#define AXIS_LABEL_PROP_ABS_MT_POSITION_X "Abs MT Position X"
+#define AXIS_LABEL_PROP_ABS_MT_POSITION_Y "Abs MT Position Y"
+#define AXIS_LABEL_PROP_ABS_MT_TOOL_TYPE "Abs MT Tool Type"
+#define AXIS_LABEL_PROP_ABS_MT_BLOB_ID "Abs MT Blob ID"
+#define AXIS_LABEL_PROP_ABS_MT_TRACKING_ID "Abs MT Tracking ID"
+#define AXIS_LABEL_PROP_ABS_MT_PRESSURE "Abs MT Pressure"
+#define AXIS_LABEL_PROP_ABS_MT_DISTANCE "Abs MT Distance"
+#define AXIS_LABEL_PROP_ABS_MT_TOOL_X "Abs MT Tool X"
+#define AXIS_LABEL_PROP_ABS_MT_TOOL_Y "Abs MT Tool Y"
+#define AXIS_LABEL_PROP_ABS_MISC "Abs Misc"
+
+/* Button names */
+#define BTN_LABEL_PROP "Button Labels"
+
+/* Default label */
+#define BTN_LABEL_PROP_BTN_UNKNOWN "Button Unknown"
+/* Wheel buttons */
+#define BTN_LABEL_PROP_BTN_WHEEL_UP "Button Wheel Up"
+#define BTN_LABEL_PROP_BTN_WHEEL_DOWN "Button Wheel Down"
+#define BTN_LABEL_PROP_BTN_HWHEEL_LEFT "Button Horiz Wheel Left"
+#define BTN_LABEL_PROP_BTN_HWHEEL_RIGHT "Button Horiz Wheel Right"
+
+/* The following are from linux/input.h */
+#define BTN_LABEL_PROP_BTN_0 "Button 0"
+#define BTN_LABEL_PROP_BTN_1 "Button 1"
+#define BTN_LABEL_PROP_BTN_2 "Button 2"
+#define BTN_LABEL_PROP_BTN_3 "Button 3"
+#define BTN_LABEL_PROP_BTN_4 "Button 4"
+#define BTN_LABEL_PROP_BTN_5 "Button 5"
+#define BTN_LABEL_PROP_BTN_6 "Button 6"
+#define BTN_LABEL_PROP_BTN_7 "Button 7"
+#define BTN_LABEL_PROP_BTN_8 "Button 8"
+#define BTN_LABEL_PROP_BTN_9 "Button 9"
+
+#define BTN_LABEL_PROP_BTN_LEFT "Button Left"
+#define BTN_LABEL_PROP_BTN_RIGHT "Button Right"
+#define BTN_LABEL_PROP_BTN_MIDDLE "Button Middle"
+#define BTN_LABEL_PROP_BTN_SIDE "Button Side"
+#define BTN_LABEL_PROP_BTN_EXTRA "Button Extra"
+#define BTN_LABEL_PROP_BTN_FORWARD "Button Forward"
+#define BTN_LABEL_PROP_BTN_BACK "Button Back"
+#define BTN_LABEL_PROP_BTN_TASK "Button Task"
+
+#define BTN_LABEL_PROP_BTN_TRIGGER "Button Trigger"
+#define BTN_LABEL_PROP_BTN_THUMB "Button Thumb"
+#define BTN_LABEL_PROP_BTN_THUMB2 "Button Thumb2"
+#define BTN_LABEL_PROP_BTN_TOP "Button Top"
+#define BTN_LABEL_PROP_BTN_TOP2 "Button Top2"
+#define BTN_LABEL_PROP_BTN_PINKIE "Button Pinkie"
+#define BTN_LABEL_PROP_BTN_BASE "Button Base"
+#define BTN_LABEL_PROP_BTN_BASE2 "Button Base2"
+#define BTN_LABEL_PROP_BTN_BASE3 "Button Base3"
+#define BTN_LABEL_PROP_BTN_BASE4 "Button Base4"
+#define BTN_LABEL_PROP_BTN_BASE5 "Button Base5"
+#define BTN_LABEL_PROP_BTN_BASE6 "Button Base6"
+#define BTN_LABEL_PROP_BTN_DEAD "Button Dead"
+
+#define BTN_LABEL_PROP_BTN_A "Button A"
+#define BTN_LABEL_PROP_BTN_B "Button B"
+#define BTN_LABEL_PROP_BTN_C "Button C"
+#define BTN_LABEL_PROP_BTN_X "Button X"
+#define BTN_LABEL_PROP_BTN_Y "Button Y"
+#define BTN_LABEL_PROP_BTN_Z "Button Z"
+#define BTN_LABEL_PROP_BTN_TL "Button T Left"
+#define BTN_LABEL_PROP_BTN_TR "Button T Right"
+#define BTN_LABEL_PROP_BTN_TL2 "Button T Left2"
+#define BTN_LABEL_PROP_BTN_TR2 "Button T Right2"
+#define BTN_LABEL_PROP_BTN_SELECT "Button Select"
+#define BTN_LABEL_PROP_BTN_START "Button Start"
+#define BTN_LABEL_PROP_BTN_MODE "Button Mode"
+#define BTN_LABEL_PROP_BTN_THUMBL "Button Thumb Left"
+#define BTN_LABEL_PROP_BTN_THUMBR "Button Thumb Right"
+
+#define BTN_LABEL_PROP_BTN_TOOL_PEN "Button Tool Pen"
+#define BTN_LABEL_PROP_BTN_TOOL_RUBBER "Button Tool Rubber"
+#define BTN_LABEL_PROP_BTN_TOOL_BRUSH "Button Tool Brush"
+#define BTN_LABEL_PROP_BTN_TOOL_PENCIL "Button Tool Pencil"
+#define BTN_LABEL_PROP_BTN_TOOL_AIRBRUSH "Button Tool Airbrush"
+#define BTN_LABEL_PROP_BTN_TOOL_FINGER "Button Tool Finger"
+#define BTN_LABEL_PROP_BTN_TOOL_MOUSE "Button Tool Mouse"
+#define BTN_LABEL_PROP_BTN_TOOL_LENS "Button Tool Lens"
+#define BTN_LABEL_PROP_BTN_TOUCH "Button Touch"
+#define BTN_LABEL_PROP_BTN_STYLUS "Button Stylus"
+#define BTN_LABEL_PROP_BTN_STYLUS2 "Button Stylus2"
+#define BTN_LABEL_PROP_BTN_TOOL_DOUBLETAP "Button Tool Doubletap"
+#define BTN_LABEL_PROP_BTN_TOOL_TRIPLETAP "Button Tool Tripletap"
+
+#define BTN_LABEL_PROP_BTN_GEAR_DOWN "Button Gear down"
+#define BTN_LABEL_PROP_BTN_GEAR_UP "Button Gear up"
+
+#endif
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xvdix.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xvdix.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xvdix.h (working copy)
@@ -0,0 +1,267 @@
+/***********************************************************
+Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
+and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the names of Digital or MIT not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef XVDIX_H
+#define XVDIX_H
+/*
+** File:
+**
+** xvdix.h --- Xv device independent header file
+**
+** Author:
+**
+** David Carver (Digital Workstation Engineering/Project Athena)
+**
+** Revisions:
+**
+** 29.08.91 Carver
+** - removed UnrealizeWindow wrapper unrealizing windows no longer
+** preempts video
+**
+** 11.06.91 Carver
+** - changed SetPortControl to SetPortAttribute
+** - changed GetPortControl to GetPortAttribute
+** - changed QueryBestSize
+**
+** 15.05.91 Carver
+** - version 2.0 upgrade
+**
+** 24.01.91 Carver
+** - version 1.4 upgrade
+**
+*/
+
+#include "scrnintstr.h"
+#include <X11/extensions/Xvproto.h>
+
+extern _X_EXPORT unsigned long XvExtensionGeneration;
+extern _X_EXPORT unsigned long XvScreenGeneration;
+extern _X_EXPORT unsigned long XvResourceGeneration;
+
+extern _X_EXPORT int XvReqCode;
+extern _X_EXPORT int XvEventBase;
+extern _X_EXPORT int XvErrorBase;
+
+extern _X_EXPORT RESTYPE XvRTPort;
+extern _X_EXPORT RESTYPE XvRTEncoding;
+extern _X_EXPORT RESTYPE XvRTGrab;
+extern _X_EXPORT RESTYPE XvRTVideoNotify;
+extern _X_EXPORT RESTYPE XvRTVideoNotifyList;
+extern _X_EXPORT RESTYPE XvRTPortNotify;
+
+typedef struct {
+ int numerator;
+ int denominator;
+} XvRationalRec, *XvRationalPtr;
+
+typedef struct {
+ char depth;
+ unsigned long visual;
+} XvFormatRec, *XvFormatPtr;
+
+typedef struct {
+ unsigned long id;
+ ClientPtr client;
+} XvGrabRec, *XvGrabPtr;
+
+typedef struct _XvVideoNotifyRec {
+ struct _XvVideoNotifyRec *next;
+ ClientPtr client;
+ unsigned long id;
+ unsigned long mask;
+} XvVideoNotifyRec, *XvVideoNotifyPtr;
+
+typedef struct _XvPortNotifyRec {
+ struct _XvPortNotifyRec *next;
+ ClientPtr client;
+ unsigned long id;
+} XvPortNotifyRec, *XvPortNotifyPtr;
+
+typedef struct {
+ int id;
+ ScreenPtr pScreen;
+ char *name;
+ unsigned short width, height;
+ XvRationalRec rate;
+} XvEncodingRec, *XvEncodingPtr;
+
+typedef struct _XvAttributeRec {
+ int flags;
+ int min_value;
+ int max_value;
+ char *name;
+} XvAttributeRec, *XvAttributePtr;
+
+typedef struct {
+ int id;
+ int type;
+ int byte_order;
+ char guid[16];
+ int bits_per_pixel;
+ int format;
+ int num_planes;
+
+ /* for RGB formats only */
+ int depth;
+ unsigned int red_mask;
+ unsigned int green_mask;
+ unsigned int blue_mask;
+
+ /* for YUV formats only */
+ unsigned int y_sample_bits;
+ unsigned int u_sample_bits;
+ unsigned int v_sample_bits;
+ unsigned int horz_y_period;
+ unsigned int horz_u_period;
+ unsigned int horz_v_period;
+ unsigned int vert_y_period;
+ unsigned int vert_u_period;
+ unsigned int vert_v_period;
+ char component_order[32];
+ int scanline_order;
+} XvImageRec, *XvImagePtr;
+
+typedef struct {
+ unsigned long base_id;
+ unsigned char type;
+ char *name;
+ int nEncodings;
+ XvEncodingPtr pEncodings;
+ int nFormats;
+ XvFormatPtr pFormats;
+ int nAttributes;
+ XvAttributePtr pAttributes;
+ int nImages;
+ XvImagePtr pImages;
+ int nPorts;
+ struct _XvPortRec *pPorts;
+ ScreenPtr pScreen;
+ int (*ddAllocatePort) (unsigned long, struct _XvPortRec *,
+ struct _XvPortRec **);
+ int (*ddFreePort) (struct _XvPortRec *);
+ int (*ddPutVideo) (ClientPtr, DrawablePtr, struct _XvPortRec *, GCPtr,
+ INT16, INT16, CARD16, CARD16,
+ INT16, INT16, CARD16, CARD16);
+ int (*ddPutStill) (ClientPtr, DrawablePtr, struct _XvPortRec *, GCPtr,
+ INT16, INT16, CARD16, CARD16,
+ INT16, INT16, CARD16, CARD16);
+ int (*ddGetVideo) (ClientPtr, DrawablePtr, struct _XvPortRec *, GCPtr,
+ INT16, INT16, CARD16, CARD16,
+ INT16, INT16, CARD16, CARD16);
+ int (*ddGetStill) (ClientPtr, DrawablePtr, struct _XvPortRec *, GCPtr,
+ INT16, INT16, CARD16, CARD16,
+ INT16, INT16, CARD16, CARD16);
+ int (*ddStopVideo) (ClientPtr, struct _XvPortRec *, DrawablePtr);
+ int (*ddSetPortAttribute) (ClientPtr, struct _XvPortRec *, Atom, INT32);
+ int (*ddGetPortAttribute) (ClientPtr, struct _XvPortRec *, Atom, INT32 *);
+ int (*ddQueryBestSize) (ClientPtr, struct _XvPortRec *, CARD8,
+ CARD16, CARD16, CARD16, CARD16,
+ unsigned int *, unsigned int *);
+ int (*ddPutImage) (ClientPtr, DrawablePtr, struct _XvPortRec *, GCPtr,
+ INT16, INT16, CARD16, CARD16,
+ INT16, INT16, CARD16, CARD16,
+ XvImagePtr, unsigned char *, Bool, CARD16, CARD16);
+ int (*ddQueryImageAttributes) (ClientPtr, struct _XvPortRec *, XvImagePtr,
+ CARD16 *, CARD16 *, int *, int *);
+ DevUnion devPriv;
+} XvAdaptorRec, *XvAdaptorPtr;
+
+typedef struct _XvPortRec {
+ unsigned long id;
+ XvAdaptorPtr pAdaptor;
+ XvPortNotifyPtr pNotify;
+ DrawablePtr pDraw;
+ ClientPtr client;
+ XvGrabRec grab;
+ TimeStamp time;
+ DevUnion devPriv;
+} XvPortRec, *XvPortPtr;
+
+#define VALIDATE_XV_PORT(portID, pPort, mode)\
+ {\
+ int rc = dixLookupResourceByType((void **)&(pPort), portID,\
+ XvRTPort, client, mode);\
+ if (rc != Success)\
+ return rc;\
+ }
+
+typedef struct {
+ int version, revision;
+ int nAdaptors;
+ XvAdaptorPtr pAdaptors;
+ DestroyWindowProcPtr DestroyWindow;
+ DestroyPixmapProcPtr DestroyPixmap;
+ CloseScreenProcPtr CloseScreen;
+ Bool (*ddCloseScreen) (ScreenPtr);
+ int (*ddQueryAdaptors) (ScreenPtr, XvAdaptorPtr *, int *);
+ DevUnion devPriv;
+} XvScreenRec, *XvScreenPtr;
+
+#define SCREEN_PROLOGUE(pScreen, field) ((pScreen)->field = ((XvScreenPtr) \
+ dixLookupPrivate(&(pScreen)->devPrivates, XvScreenKey))->field)
+
+#define SCREEN_EPILOGUE(pScreen, field, wrapper)\
+ ((pScreen)->field = wrapper)
+
+/* Errors */
+
+#define _XvBadPort (XvBadPort+XvErrorBase)
+#define _XvBadEncoding (XvBadEncoding+XvErrorBase)
+
+extern _X_EXPORT int ProcXvDispatch(ClientPtr);
+extern _X_EXPORT int SProcXvDispatch(ClientPtr);
+
+extern _X_EXPORT int XvScreenInit(ScreenPtr);
+extern _X_EXPORT DevPrivateKey XvGetScreenKey(void);
+extern _X_EXPORT unsigned long XvGetRTPort(void);
+extern _X_EXPORT int XvdiSendPortNotify(XvPortPtr, Atom, INT32);
+extern _X_EXPORT int XvdiVideoStopped(XvPortPtr, int);
+
+extern _X_EXPORT int XvdiPutVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
+ INT16, INT16, CARD16, CARD16,
+ INT16, INT16, CARD16, CARD16);
+extern _X_EXPORT int XvdiPutStill(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
+ INT16, INT16, CARD16, CARD16,
+ INT16, INT16, CARD16, CARD16);
+extern _X_EXPORT int XvdiGetVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
+ INT16, INT16, CARD16, CARD16,
+ INT16, INT16, CARD16, CARD16);
+extern _X_EXPORT int XvdiGetStill(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
+ INT16, INT16, CARD16, CARD16,
+ INT16, INT16, CARD16, CARD16);
+extern _X_EXPORT int XvdiPutImage(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
+ INT16, INT16, CARD16, CARD16,
+ INT16, INT16, CARD16, CARD16,
+ XvImagePtr, unsigned char *, Bool,
+ CARD16, CARD16);
+extern _X_EXPORT int XvdiSelectVideoNotify(ClientPtr, DrawablePtr, BOOL);
+extern _X_EXPORT int XvdiSelectPortNotify(ClientPtr, XvPortPtr, BOOL);
+extern _X_EXPORT int XvdiSetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32);
+extern _X_EXPORT int XvdiGetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32 *);
+extern _X_EXPORT int XvdiStopVideo(ClientPtr, XvPortPtr, DrawablePtr);
+extern _X_EXPORT int XvdiPreemptVideo(ClientPtr, XvPortPtr, DrawablePtr);
+extern _X_EXPORT int XvdiMatchPort(XvPortPtr, DrawablePtr);
+extern _X_EXPORT int XvdiGrabPort(ClientPtr, XvPortPtr, Time, int *);
+extern _X_EXPORT int XvdiUngrabPort(ClientPtr, XvPortPtr, Time);
+#endif /* XVDIX_H */
Index: src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xvmcext.h
===================================================================
--- src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xvmcext.h (revision 0)
+++ src/VBox/Additions/x11/x11include/xorg-server-1.16.0/xvmcext.h (working copy)
@@ -0,0 +1,98 @@
+
+#ifndef _XVMC_H
+#define _XVMC_H
+#include <X11/extensions/Xv.h>
+#include "xvdix.h"
+
+typedef struct {
+ int num_xvimages;
+ int *xvimage_ids;
+} XvMCImageIDList;
+
+typedef struct {
+ int surface_type_id;
+ int chroma_format;
+ int color_description;
+ unsigned short max_width;
+ unsigned short max_height;
+ unsigned short subpicture_max_width;
+ unsigned short subpicture_max_height;
+ int mc_type;
+ int flags;
+ XvMCImageIDList *compatible_subpictures;
+} XvMCSurfaceInfoRec, *XvMCSurfaceInfoPtr;
+
+typedef struct {
+ XID context_id;
+ ScreenPtr pScreen;
+ int adapt_num;
+ int surface_type_id;
+ unsigned short width;
+ unsigned short height;
+ CARD32 flags;
+ int refcnt;
+ void *port_priv;
+ void *driver_priv;
+} XvMCContextRec, *XvMCContextPtr;
+
+typedef struct {
+ XID surface_id;
+ int surface_type_id;
+ XvMCContextPtr context;
+ void *driver_priv;
+} XvMCSurfaceRec, *XvMCSurfacePtr;
+
+typedef struct {
+ XID subpicture_id;
+ int xvimage_id;
+ unsigned short width;
+ unsigned short height;
+ int num_palette_entries;
+ int entry_bytes;
+ char component_order[4];
+ XvMCContextPtr context;
+ void *driver_priv;
+} XvMCSubpictureRec, *XvMCSubpicturePtr;
+
+typedef int (*XvMCCreateContextProcPtr) (XvPortPtr port,
+ XvMCContextPtr context,
+ int *num_priv, CARD32 **priv);
+
+typedef void (*XvMCDestroyContextProcPtr) (XvMCContextPtr context);
+
+typedef int (*XvMCCreateSurfaceProcPtr) (XvMCSurfacePtr surface,
+ int *num_priv, CARD32 **priv);
+
+typedef void (*XvMCDestroySurfaceProcPtr) (XvMCSurfacePtr surface);
+
+typedef int (*XvMCCreateSubpictureProcPtr) (XvMCSubpicturePtr subpicture,
+ int *num_priv, CARD32 **priv);
+
+typedef void (*XvMCDestroySubpictureProcPtr) (XvMCSubpicturePtr subpicture);
+
+typedef struct {
+ XvAdaptorPtr xv_adaptor;
+ int num_surfaces;
+ XvMCSurfaceInfoPtr *surfaces;
+ int num_subpictures;
+ XvImagePtr *subpictures;
+ XvMCCreateContextProcPtr CreateContext;
+ XvMCDestroyContextProcPtr DestroyContext;
+ XvMCCreateSurfaceProcPtr CreateSurface;
+ XvMCDestroySurfaceProcPtr DestroySurface;
+ XvMCCreateSubpictureProcPtr CreateSubpicture;
+ XvMCDestroySubpictureProcPtr DestroySubpicture;
+} XvMCAdaptorRec, *XvMCAdaptorPtr;
+
+extern int (*XvMCScreenInitProc)(ScreenPtr, int, XvMCAdaptorPtr);
+
+extern _X_EXPORT int XvMCScreenInit(ScreenPtr pScreen,
+ int num, XvMCAdaptorPtr adapt);
+
+extern _X_EXPORT XvImagePtr XvMCFindXvImage(XvPortPtr pPort, CARD32 id);
+
+extern _X_EXPORT int xf86XvMCRegisterDRInfo(ScreenPtr pScreen, const char *name,
+ const char *busID, int major, int minor,
+ int patchLevel);
+
+#endif /* _XVMC_H */