mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 01:34:11 +00:00
xfree86: move over public SDK headers to include/
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
7275b5409f
commit
65472d1964
1033
include/compiler.h
Normal file
1033
include/compiler.h
Normal file
File diff suppressed because it is too large
Load Diff
55
include/dgaproc.h
Normal file
55
include/dgaproc.h
Normal file
@@ -0,0 +1,55 @@
|
||||
|
||||
#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;
|
||||
|
||||
#endif /* __DGAPROC_H */
|
||||
@@ -418,6 +418,7 @@ if build_xorg
|
||||
'closure.h',
|
||||
'colormap.h',
|
||||
'colormapst.h',
|
||||
'compiler.h',
|
||||
'compositeext.h',
|
||||
'cursor.h',
|
||||
'cursorstr.h',
|
||||
@@ -480,12 +481,35 @@ if build_xorg
|
||||
'vndserver.h',
|
||||
'window.h',
|
||||
'windowstr.h',
|
||||
'xaarop.h',
|
||||
'xf86.h',
|
||||
'xf86cmap.h',
|
||||
'xf86fbman.h',
|
||||
'xf86Opt.h',
|
||||
'xf86Optionstr.h',
|
||||
'xf86platformBus.h',
|
||||
'xf86Priv.h',
|
||||
'xf86Privstr.h',
|
||||
'xf86str.h',
|
||||
'xf86Module.h',
|
||||
'xf86Xinput.h',
|
||||
'xisb.h',
|
||||
'xkbsrv.h',
|
||||
'xkbstr.h',
|
||||
'xkbrules.h',
|
||||
'xorgVersion.h',
|
||||
'Xprintf.h',
|
||||
'xf86sbusBus.h',
|
||||
'xserver-properties.h',
|
||||
],
|
||||
install_dir: xorgsdkdir,
|
||||
)
|
||||
|
||||
if build_dga
|
||||
install_data(['dgaproc.h'], install_dir: xorgsdkdir)
|
||||
endif
|
||||
|
||||
if build_xv
|
||||
install_data(['xf86xv.h', 'xf86xvmc.h'], install_dir: xorgsdkdir)
|
||||
endif
|
||||
endif
|
||||
|
||||
268
include/xaarop.h
Normal file
268
include/xaarop.h
Normal file
@@ -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 */
|
||||
283
include/xf86.h
Normal file
283
include/xf86.h
Normal file
@@ -0,0 +1,283 @@
|
||||
/*
|
||||
* 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
|
||||
|
||||
#include "xf86str.h"
|
||||
#include "xf86Opt.h"
|
||||
#include <X11/Xfuncproto.h>
|
||||
#include <stdarg.h>
|
||||
#include <X11/extensions/randr.h>
|
||||
|
||||
/* General parameters */
|
||||
extern _X_EXPORT Bool xorgHWAccess;
|
||||
|
||||
extern _X_EXPORT DevPrivateKeyRec xf86ScreenKeyRec;
|
||||
|
||||
#define xf86ScreenKey (&xf86ScreenKeyRec)
|
||||
|
||||
extern _X_EXPORT ScrnInfoPtr *xf86Screens; /* List of pointers to ScrnInfoRecs */
|
||||
extern _X_EXPORT const unsigned char byte_reversed[256];
|
||||
|
||||
#define XF86SCRNINFO(p) xf86ScreenToScrn(p)
|
||||
|
||||
/* Compatibility functions for pre-input-thread drivers */
|
||||
static inline _X_DEPRECATED int xf86BlockSIGIO(void) { input_lock(); return 0; }
|
||||
static inline _X_DEPRECATED void xf86UnblockSIGIO(int wasset) { input_unlock(); }
|
||||
|
||||
/* PCI related */
|
||||
#ifdef XSERVER_LIBPCIACCESS
|
||||
#include <pciaccess.h>
|
||||
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 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);
|
||||
#endif
|
||||
|
||||
/* xf86Bus.c */
|
||||
|
||||
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 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 EntityInfoPtr xf86GetEntityInfo(int entityIndex);
|
||||
|
||||
#define xf86SetLastScrnFlag(e, s) do { } while (0)
|
||||
|
||||
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 xf86SetViewport(ScreenPtr pScreen, int x, int y);
|
||||
extern _X_EXPORT Bool xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode);
|
||||
extern _X_EXPORT void *xf86GetPointerScreenFuncs(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 *xf86AddGeneralHandler(int fd, InputHandlerProc proc,
|
||||
void *data);
|
||||
extern _X_EXPORT int xf86RemoveGeneralHandler(void *handler);
|
||||
|
||||
/* xf86Helper.c */
|
||||
|
||||
extern _X_EXPORT void xf86AddDriver(DriverPtr driver, void *module,
|
||||
int flags);
|
||||
extern _X_EXPORT ScrnInfoPtr xf86AllocateScreen(DriverPtr drv, int flags);
|
||||
extern _X_EXPORT int xf86AllocateScrnInfoPrivateIndex(void);
|
||||
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
|
||||
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 Gamma
|
||||
xf86GetGamma(void);
|
||||
extern _X_EXPORT Bool
|
||||
xf86ServerIsExiting(void);
|
||||
extern _X_EXPORT Bool
|
||||
xf86ServerIsOnlyDetecting(void);
|
||||
extern _X_EXPORT Bool
|
||||
xf86GetAllowMouseOpenFail(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 ScrnInfoPtr
|
||||
xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag,
|
||||
int entityIndex, EntityProc init,
|
||||
EntityProc enter, EntityProc leave, void *private);
|
||||
|
||||
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 ModeStatus
|
||||
xf86CheckModeForMonitor(DisplayModePtr mode, MonPtr monitor);
|
||||
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);
|
||||
|
||||
/* xf86Option.c */
|
||||
|
||||
extern _X_EXPORT void
|
||||
xf86CollectOptions(ScrnInfoPtr pScrn, XF86OptionPtr extraOpts);
|
||||
|
||||
/* convert ScreenPtr to ScrnInfoPtr */
|
||||
extern _X_EXPORT ScrnInfoPtr xf86ScreenToScrn(ScreenPtr pScreen);
|
||||
/* convert ScrnInfoPtr to ScreenPtr */
|
||||
extern _X_EXPORT ScreenPtr xf86ScrnToScreen(ScrnInfoPtr pScrn);
|
||||
|
||||
#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
|
||||
|
||||
/* only for backwards (source) compatibility */
|
||||
#define xf86MsgVerb LogMessageVerb
|
||||
#define xf86Msg(type, ...) LogMessageVerb(type, 1, __VA_ARGS__)
|
||||
|
||||
/*
|
||||
* retrieve file descriptor to opened console device.
|
||||
* only for some legacy keyboard drivers (xf86-input-keyboard)
|
||||
*/
|
||||
_X_EXPORT int xf86GetConsoleFd(void);
|
||||
|
||||
#endif /* _XF86_H */
|
||||
240
include/xf86Module.h
Normal file
240
include/xf86Module.h
Normal file
@@ -0,0 +1,240 @@
|
||||
/*
|
||||
* 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 <X11/Xfuncproto.h>
|
||||
#include <X11/Xdefs.h>
|
||||
#include <X11/Xmd.h>
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL ((void *)0)
|
||||
#endif
|
||||
|
||||
#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_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(1, 4)
|
||||
|
||||
/* XXX This is a compile-time option that changes abi XXX */
|
||||
/* TODO: Remove this toggle in 26.0 */
|
||||
#ifdef CONFIG_LEGACY_NVIDIA_PADDING
|
||||
#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(28, 1)
|
||||
#else
|
||||
#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(28, 0)
|
||||
#endif
|
||||
#define ABI_XINPUT_VERSION SET_ABI_VERSION(26, 0)
|
||||
#define ABI_EXTENSION_VERSION SET_ABI_VERSION(11, 0)
|
||||
|
||||
/* hack to get both modern and ancient nvidia DDX drivers to work at the same time */
|
||||
#define ABI_NVIDIA_VERSION SET_ABI_VERSION(25, 2)
|
||||
|
||||
#define MODINFOSTRING1 0xef23fdc5
|
||||
#define MODINFOSTRING2 0x10dc023a
|
||||
|
||||
#ifndef MODULEVENDORSTRING
|
||||
#define MODULEVENDORSTRING "X.Org Foundation"
|
||||
#endif
|
||||
|
||||
/* Error return codes for errmaj */
|
||||
typedef enum {
|
||||
LDR_NOERROR = 0,
|
||||
LDR_NOMEM, /* memory allocation failed */
|
||||
LDR_NOENT, /* Module file does not exist */
|
||||
LDR_NOLOAD, /* type specific loader failed */
|
||||
LDR_ONCEONLY, /* Module should only be loaded once (not an error) */
|
||||
LDR_MISMATCH, /* the module didn't match the spec'd requirements */
|
||||
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_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;
|
||||
|
||||
#define MODULE_VERSION_NUMERIC(maj, min, patch) \
|
||||
((((maj) & 0xFF) << 24) | (((min) & 0xFF) << 16) | (patch & 0xFFFF))
|
||||
|
||||
/* 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 *LoaderSymbol(const char *);
|
||||
extern _X_EXPORT void *LoaderSymbolFromModule(void *, const char *);
|
||||
extern _X_EXPORT void LoaderErrorMsg(const char *, const char *, int, int);
|
||||
|
||||
/* deprecated, only kept for backwards compat w/ proprietary NVidia driver */
|
||||
extern _X_EXPORT Bool LoaderShouldIgnoreABI(void) _X_DEPRECATED;
|
||||
extern _X_EXPORT int LoaderGetABIVersion(const char *abiclass) _X_DEPRECATED;
|
||||
|
||||
typedef void *(*ModuleSetupProc) (void *, void *, int *, int *);
|
||||
typedef void (*ModuleTearDownProc) (void *);
|
||||
|
||||
#define MODULESETUPPROTO(func) void *func(void *, void *, int*, int*)
|
||||
|
||||
/*
|
||||
* Module information header. Every loadable module needs to export a symbol
|
||||
* of that type, so the loader can call into the module for initialization.
|
||||
* The symbol must be named <modulename> + "ModuleData".
|
||||
*/
|
||||
typedef struct {
|
||||
/* must point to structure with version information */
|
||||
XF86ModuleVersionInfo *vers;
|
||||
/* called on module load (if not null) */
|
||||
ModuleSetupProc setup;
|
||||
/* called on module teardown with setup()'s result as parameter (if not null) */
|
||||
ModuleTearDownProc teardown;
|
||||
} XF86ModuleData;
|
||||
|
||||
/*
|
||||
* declare module version info structure for an input driver module
|
||||
*/
|
||||
#define XF86_MODULE_VERSION_INPUT(_name, _major, _minor, _patchlevel) \
|
||||
static XF86ModuleVersionInfo modVersion = { \
|
||||
.modname = _name, \
|
||||
.vendor = MODULEVENDORSTRING, \
|
||||
._modinfo1_ = MODINFOSTRING1, \
|
||||
._modinfo2_ = MODINFOSTRING2, \
|
||||
.xf86version = XORG_VERSION_CURRENT, \
|
||||
.majorversion = _major, \
|
||||
.minorversion = _minor, \
|
||||
.patchlevel = _patchlevel, \
|
||||
.abiclass = ABI_CLASS_XINPUT, \
|
||||
.abiversion = ABI_XINPUT_VERSION, \
|
||||
.moduleclass = MOD_CLASS_XINPUT, \
|
||||
};
|
||||
|
||||
/*
|
||||
* declare module version info structure for an video driver module
|
||||
*/
|
||||
#define XF86_MODULE_VERSION_VIDEO(_name, _major, _minor, _patchlevel) \
|
||||
static XF86ModuleVersionInfo modVersion = { \
|
||||
.modname = _name, \
|
||||
.vendor = MODULEVENDORSTRING, \
|
||||
._modinfo1_ = MODINFOSTRING1, \
|
||||
._modinfo2_ = MODINFOSTRING2, \
|
||||
.xf86version = XORG_VERSION_CURRENT, \
|
||||
.majorversion = _major, \
|
||||
.minorversion = _minor, \
|
||||
.patchlevel = _patchlevel, \
|
||||
.abiclass = ABI_CLASS_VIDEODRV, \
|
||||
.abiversion = ABI_VIDEODRV_VERSION, \
|
||||
.moduleclass = MOD_CLASS_VIDEODRV, \
|
||||
};
|
||||
|
||||
#define XF86_MODULE_DATA_INPUT(_modname, _setup, _teardown, _name, _major, _minor, _patchlevel) \
|
||||
XF86_MODULE_VERSION_INPUT(_name, _major, _minor, _patchlevel) \
|
||||
_X_EXPORT XF86ModuleData _modname##ModuleData = { \
|
||||
.vers = &modVersion, \
|
||||
.setup = _setup, \
|
||||
.teardown = _teardown, \
|
||||
};
|
||||
|
||||
#define XF86_MODULE_DATA_VIDEO(_modname, _setup, _teardown, _name, _major, _minor, _patchlevel) \
|
||||
XF86_MODULE_VERSION_VIDEO(_name, _major, _minor, _patchlevel) \
|
||||
_X_EXPORT XF86ModuleData _modname##ModuleData = { \
|
||||
.vers = &modVersion, \
|
||||
.setup = _setup, \
|
||||
.teardown = _teardown, \
|
||||
};
|
||||
|
||||
#endif /* _XF86MODULE_H */
|
||||
144
include/xf86Opt.h
Normal file
144
include/xf86Opt.h
Normal file
@@ -0,0 +1,144 @@
|
||||
/*
|
||||
* 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 <X11/Xdefs.h>
|
||||
|
||||
#include "xf86Optionstr.h"
|
||||
|
||||
typedef struct {
|
||||
double freq;
|
||||
int units;
|
||||
} OptFrequency;
|
||||
|
||||
typedef union {
|
||||
unsigned long num;
|
||||
const char *str;
|
||||
double realnum;
|
||||
Bool boolean;
|
||||
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 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 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 XF86OptionPtr xf86FindOption(XF86OptionPtr options,
|
||||
const char *name);
|
||||
extern _X_EXPORT const char *xf86FindOptionValue(XF86OptionPtr options,
|
||||
const char *name);
|
||||
extern _X_EXPORT void xf86MarkOptionUsedByName(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 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 xf86ReplaceBoolOption(XF86OptionPtr optlist,
|
||||
const char *name,
|
||||
const Bool val);
|
||||
extern _X_EXPORT XF86OptionPtr xf86ReplaceStrOption(XF86OptionPtr optlist,
|
||||
const char *name,
|
||||
const char *val);
|
||||
#endif
|
||||
42
include/xf86Optionstr.h
Normal file
42
include/xf86Optionstr.h
Normal file
@@ -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
|
||||
63
include/xf86Priv.h
Normal file
63
include/xf86Priv.h
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* 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 "input.h"
|
||||
|
||||
extern _X_EXPORT int xf86FbBpp;
|
||||
extern _X_EXPORT int xf86Depth;
|
||||
|
||||
/* Other parameters */
|
||||
|
||||
extern _X_EXPORT xf86InfoRec xf86Info;
|
||||
extern _X_EXPORT serverLayoutRec xf86ConfigLayout;
|
||||
|
||||
extern _X_EXPORT DriverPtr *xf86DriverList;
|
||||
extern _X_EXPORT int xf86NumScreens;
|
||||
|
||||
extern _X_EXPORT ScrnInfoPtr *xf86GPUScreens; /* List of pointers to ScrnInfoRecs */
|
||||
extern _X_EXPORT int xf86NumGPUScreens;
|
||||
extern _X_EXPORT int xf86DRMMasterFd; /* Command line argument for DRM master file descriptor */
|
||||
#ifndef DEFAULT_DPI
|
||||
#define DEFAULT_DPI 96
|
||||
#endif
|
||||
|
||||
/* xf86Bus.c */
|
||||
extern _X_EXPORT void xf86BusProbe(void);
|
||||
extern _X_EXPORT void xf86AddDevToEntity(int entityIndex, GDevPtr dev);
|
||||
|
||||
#endif /* _XF86PRIV_H */
|
||||
126
include/xf86Privstr.h
Normal file
126
include/xf86Privstr.h
Normal file
@@ -0,0 +1,126 @@
|
||||
|
||||
/*
|
||||
* 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 {
|
||||
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;
|
||||
|
||||
/* 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 pmFlag;
|
||||
MessageType iglxFrom;
|
||||
XF86_GlxVisuals glxVisuals;
|
||||
MessageType glxVisualsFrom;
|
||||
|
||||
Bool useDefaultFontPath;
|
||||
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;
|
||||
const char *debug;
|
||||
Bool autoBindGPU;
|
||||
|
||||
Bool singleDriver; /* Only the first successfully probed driver adds primary screens,
|
||||
* others may add GPU secondary screens only */
|
||||
} xf86InfoRec, *xf86InfoPtr;
|
||||
|
||||
/* 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
|
||||
|
||||
/* Root window property to tell clients whether our VT is currently active.
|
||||
* Name chosen to match the "XFree86_VT" property. */
|
||||
#define HAS_VT_ATOM_NAME "XFree86_has_VT"
|
||||
|
||||
#endif /* _XF86PRIVSTR_H */
|
||||
191
include/xf86Xinput.h
Normal file
191
include/xf86Xinput.h
Normal file
@@ -0,0 +1,191 @@
|
||||
/*
|
||||
* 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 <X11/Xfuncproto.h>
|
||||
|
||||
#include "xf86.h"
|
||||
#include "xf86str.h"
|
||||
#include "inputstr.h"
|
||||
#include <X11/extensions/XI.h>
|
||||
#include <X11/extensions/XIproto.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 */
|
||||
#define XI86_SERVER_FD 0x20 /* fd is managed by xserver */
|
||||
|
||||
/* Input device driver capabilities */
|
||||
#define XI86_DRV_CAP_SERVER_FD 0x01
|
||||
|
||||
/* 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;
|
||||
int capabilities;
|
||||
} InputDriverRec, *InputDriverPtr;
|
||||
|
||||
/* This is to input devices what the ScrnInfoRec is to screens. */
|
||||
|
||||
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;
|
||||
int major;
|
||||
int minor;
|
||||
DeviceIntPtr dev;
|
||||
void *private;
|
||||
const char *type_name;
|
||||
InputDriverPtr drv;
|
||||
void *module;
|
||||
XF86OptionPtr options;
|
||||
InputAttributes *attrs;
|
||||
};
|
||||
|
||||
/* xf86Xinput.c */
|
||||
extern _X_EXPORT void xf86PostMotionEvent(DeviceIntPtr device, int is_absolute,
|
||||
int first_valuator, int num_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 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 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 void xf86PostGesturePinchEvent(DeviceIntPtr dev, uint16_t type,
|
||||
uint16_t num_touches,
|
||||
uint32_t flags,
|
||||
double delta_x, double delta_y,
|
||||
double delta_unaccel_x,
|
||||
double delta_unaccel_y,
|
||||
double scale, double delta_angle);
|
||||
extern _X_EXPORT void xf86PostGestureSwipeEvent(DeviceIntPtr dev, uint16_t type,
|
||||
uint16_t num_touches,
|
||||
uint32_t flags,
|
||||
double delta_x, double delta_y,
|
||||
double delta_unaccel_x,
|
||||
double delta_unaccel_y);
|
||||
|
||||
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);
|
||||
|
||||
/* xf86Helper.c */
|
||||
extern _X_EXPORT void xf86AddInputDriver(InputDriverPtr driver, void *module,
|
||||
int flags);
|
||||
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);
|
||||
|
||||
/* xf86Option.c */
|
||||
extern _X_EXPORT void
|
||||
xf86CollectInputOptions(InputInfoPtr pInfo, const char **defaultOpts);
|
||||
|
||||
#endif /* _xf86Xinput_h */
|
||||
66
include/xf86cmap.h
Normal file
66
include/xf86cmap.h
Normal file
@@ -0,0 +1,66 @@
|
||||
|
||||
/*
|
||||
* 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"
|
||||
|
||||
#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 */
|
||||
113
include/xf86fbman.h
Normal file
113
include/xf86fbman.h
Normal file
@@ -0,0 +1,113 @@
|
||||
|
||||
/*
|
||||
* 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 (*MoveAreaCallbackProcPtr) (FBAreaPtr, FBAreaPtr);
|
||||
typedef void (*RemoveAreaCallbackProcPtr) (FBAreaPtr);
|
||||
|
||||
typedef void (*MoveLinearCallbackProcPtr) (FBLinearPtr, FBLinearPtr);
|
||||
typedef void (*RemoveLinearCallbackProcPtr) (FBLinearPtr);
|
||||
|
||||
extern _X_EXPORT Bool
|
||||
xf86InitFBManager(ScreenPtr pScreen, BoxPtr FullBox);
|
||||
|
||||
extern _X_EXPORT Bool
|
||||
xf86InitFBManagerLinear(ScreenPtr pScreen, int offset, int size);
|
||||
|
||||
extern _X_EXPORT FBAreaPtr
|
||||
xf86AllocateOffscreenArea(ScreenPtr pScreen,
|
||||
int w, int h,
|
||||
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
|
||||
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 */
|
||||
92
include/xf86platformBus.h
Normal file
92
include/xf86platformBus.h
Normal file
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* 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
|
||||
|
||||
struct xf86_platform_device {
|
||||
struct OdevAttributes *attribs;
|
||||
/* for PCI devices */
|
||||
struct pci_device *pdev;
|
||||
int flags;
|
||||
};
|
||||
|
||||
/* xf86_platform_device flags */
|
||||
#define XF86_PDEV_UNOWNED 0x01
|
||||
#define XF86_PDEV_SERVER_FD 0x02
|
||||
#define XF86_PDEV_PAUSED 0x04
|
||||
|
||||
#ifdef XSERVER_PLATFORM_BUS
|
||||
|
||||
/*
|
||||
* Define the legacy API only for external builds
|
||||
*/
|
||||
|
||||
/* 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
|
||||
/* Server managed FD */
|
||||
#define ODEV_ATTRIB_FD 4
|
||||
/* Major number of the device node pointed to by ODEV_ATTRIB_PATH */
|
||||
#define ODEV_ATTRIB_MAJOR 5
|
||||
/* Minor number of the device node pointed to by ODEV_ATTRIB_PATH */
|
||||
#define ODEV_ATTRIB_MINOR 6
|
||||
/* kernel driver name */
|
||||
#define ODEV_ATTRIB_DRIVER 7
|
||||
|
||||
_X_EXPORT char *
|
||||
_xf86_get_platform_device_attrib(struct xf86_platform_device *device, int attrib, int (*fake)[0]);
|
||||
|
||||
_X_EXPORT int
|
||||
_xf86_get_platform_device_int_attrib(struct xf86_platform_device *device, int attrib, int (*fake)[0]);
|
||||
|
||||
/* Protect against a mismatch attribute type by generating a compiler
|
||||
* error using a negative array size when an incorrect attribute is
|
||||
* passed
|
||||
*/
|
||||
|
||||
#define _ODEV_ATTRIB_IS_STRING(x) ((x) == ODEV_ATTRIB_PATH || \
|
||||
(x) == ODEV_ATTRIB_SYSPATH || \
|
||||
(x) == ODEV_ATTRIB_BUSID || \
|
||||
(x) == ODEV_ATTRIB_DRIVER)
|
||||
|
||||
#define _ODEV_ATTRIB_STRING_CHECK(x) ((int (*)[_ODEV_ATTRIB_IS_STRING(x)-1]) 0)
|
||||
|
||||
#define xf86_get_platform_device_attrib(device, attrib) _xf86_get_platform_device_attrib(device,attrib,_ODEV_ATTRIB_STRING_CHECK(attrib))
|
||||
|
||||
#define _ODEV_ATTRIB_IS_INT(x) ((x) == ODEV_ATTRIB_FD || (x) == ODEV_ATTRIB_MAJOR || (x) == ODEV_ATTRIB_MINOR)
|
||||
#define _ODEV_ATTRIB_INT_DEFAULT(x) ((x) == ODEV_ATTRIB_FD ? -1 : 0)
|
||||
#define _ODEV_ATTRIB_DEFAULT_CHECK(x,def) (_ODEV_ATTRIB_INT_DEFAULT(x) == (def))
|
||||
#define _ODEV_ATTRIB_INT_CHECK(x,def) ((int (*)[_ODEV_ATTRIB_IS_INT(x)*_ODEV_ATTRIB_DEFAULT_CHECK(x,def)-1]) 0)
|
||||
|
||||
#define xf86_get_platform_device_int_attrib(device, attrib, def) _xf86_get_platform_device_int_attrib(device,attrib,_ODEV_ATTRIB_INT_CHECK(attrib,def))
|
||||
|
||||
extern _X_EXPORT Bool
|
||||
xf86PlatformDeviceCheckBusID(struct xf86_platform_device *device, const char *busid);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
74
include/xf86sbusBus.h
Normal file
74
include/xf86sbusBus.h
Normal file
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* 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_CG3 0x0003
|
||||
#define SBUS_DEVICE_CG6 0x0005
|
||||
#define SBUS_DEVICE_CG14 0x0008
|
||||
#define SBUS_DEVICE_LEO 0x0009
|
||||
#define SBUS_DEVICE_TCX 0x000a
|
||||
#define SBUS_DEVICE_FFB 0x000b
|
||||
|
||||
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;
|
||||
|
||||
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 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 sparcPromInit(void);
|
||||
extern _X_EXPORT void sparcPromClose(void);
|
||||
extern _X_EXPORT int sparcPromGetBool(sbusPromNodePtr pnode, const char *prop);
|
||||
|
||||
#endif /* _XF86_SBUSBUS_H */
|
||||
765
include/xf86str.h
Normal file
765
include/xf86str.h
Normal file
@@ -0,0 +1,765 @@
|
||||
|
||||
/*
|
||||
* 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"
|
||||
#include "displaymode.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;
|
||||
|
||||
/*
|
||||
* 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 */
|
||||
|
||||
/* 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,
|
||||
SUPPORTS_SERVER_FDS = 11,
|
||||
} 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;
|
||||
|
||||
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__) || defined(__FreeBSD__)
|
||||
#undef BUS_NONE
|
||||
#undef BUS_PCI
|
||||
#undef BUS_SBUS
|
||||
#undef BUS_PLATFORM
|
||||
#undef BUS_USB
|
||||
#undef BUS_last
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
BUS_NONE,
|
||||
BUS_PCI,
|
||||
BUS_SBUS,
|
||||
BUS_PLATFORM,
|
||||
BUS_USB,
|
||||
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;
|
||||
|
||||
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;
|
||||
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;
|
||||
|
||||
#define MAX_GPUDEVICES 4
|
||||
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;
|
||||
|
||||
int num_gpu_devices;
|
||||
GDevPtr gpu_devices[MAX_GPUDEVICES];
|
||||
} 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;
|
||||
|
||||
#define NUM_RESERVED_INTS 4
|
||||
#define NUM_RESERVED_POINTERS 4
|
||||
#define NUM_RESERVED_FUNCS 4
|
||||
|
||||
/* let clients know they can use this */
|
||||
#define XF86_SCRN_HAS_PREFER_CLONE 1
|
||||
|
||||
typedef void *(*funcPointer) (void);
|
||||
|
||||
/* 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: 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 */
|
||||
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 virtualX; /* Virtual width */
|
||||
int virtualY; /* Virtual height */
|
||||
int xInc; /* Horizontal timing increment */
|
||||
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 memPhysBase; /* Physical address of FB */
|
||||
unsigned long fbOffset; /* Offset of FB in the above */
|
||||
void *options;
|
||||
|
||||
/* Allow screens to be enabled/disabled individually */
|
||||
Bool vtSema;
|
||||
|
||||
/* hw cursor moves from input thread */
|
||||
Bool silkenMouse;
|
||||
|
||||
/* Storage for clockRanges and adjustFlags for use with the VidMode ext */
|
||||
ClockRangePtr clockRanges;
|
||||
int adjustFlags;
|
||||
|
||||
/* initial rightof support disable */
|
||||
int preferClone;
|
||||
|
||||
Bool is_gpu;
|
||||
uint32_t capabilities;
|
||||
|
||||
int *entityInstanceList;
|
||||
struct pci_device *vgaDev;
|
||||
|
||||
/*
|
||||
* 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;
|
||||
|
||||
int reservedInt[NUM_RESERVED_INTS];
|
||||
void *reservedPtr[NUM_RESERVED_POINTERS];
|
||||
funcPointer reservedFuncs[NUM_RESERVED_FUNCS];
|
||||
} 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
|
||||
|
||||
#endif /* _XF86STR_H */
|
||||
224
include/xf86xv.h
Normal file
224
include/xf86xv.h
Normal file
@@ -0,0 +1,224 @@
|
||||
|
||||
/*
|
||||
* 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_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 XvImageRec 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 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 XvAttributeRec 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;
|
||||
} 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 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_ */
|
||||
141
include/xf86xvmc.h
Normal file
141
include/xf86xvmc.h
Normal file
@@ -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 */
|
||||
62
include/xisb.h
Normal file
62
include/xisb.h
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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 void XisbBlockDuration(XISBuffer * b, int block_duration);
|
||||
|
||||
/*
|
||||
* DO NOT PUT ANYTHING AFTER THIS ENDIF
|
||||
*/
|
||||
#endif
|
||||
49
include/xorgVersion.h
Normal file
49
include/xorgVersion.h
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user