mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 01:34:11 +00:00
Xext: 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
9bd146a391
commit
69d57bcf52
@@ -495,6 +495,7 @@ if build_xorg
|
||||
'scrnintstr.h',
|
||||
'servermd.h',
|
||||
'shadow.h',
|
||||
'syncsdk.h',
|
||||
'validate.h',
|
||||
'displaymode.h',
|
||||
'vndserver.h',
|
||||
@@ -513,13 +514,15 @@ if build_xorg
|
||||
'xf86str.h',
|
||||
'xf86Module.h',
|
||||
'xf86Xinput.h',
|
||||
'xf86sbusBus.h',
|
||||
'xisb.h',
|
||||
'xkbsrv.h',
|
||||
'xkbstr.h',
|
||||
'xkbrules.h',
|
||||
'xorgVersion.h',
|
||||
'Xprintf.h',
|
||||
'xf86sbusBus.h',
|
||||
'xvdix.h',
|
||||
'xvmcext.h',
|
||||
'xserver-properties.h',
|
||||
'xlibre_ptrtypes.h',
|
||||
],
|
||||
@@ -533,4 +536,8 @@ if build_xorg
|
||||
if build_xv
|
||||
install_data(['xf86xv.h', 'xf86xvmc.h'], install_dir: xorgsdkdir)
|
||||
endif
|
||||
|
||||
if build_mitshm
|
||||
install_data(['shmint.h'], install_dir: xorgsdkdir)
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#ifndef _MISYNC_H_
|
||||
#define _MISYNC_H_
|
||||
|
||||
#include "screenint.h"
|
||||
|
||||
typedef struct _SyncObject SyncObject;
|
||||
typedef struct _SyncFence SyncFence;
|
||||
typedef struct _SyncTrigger SyncTrigger;
|
||||
|
||||
76
include/shmint.h
Normal file
76
include/shmint.h
Normal file
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* Copyright © 2003 Keith Packard
|
||||
*
|
||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
||||
* documentation for any purpose is hereby granted without fee, provided that
|
||||
* the above copyright notice appear in all copies and that both that
|
||||
* copyright notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of Keith Packard not be used in
|
||||
* advertising or publicity pertaining to distribution of the software without
|
||||
* specific, written prior permission. Keith Packard makes no
|
||||
* representations about the suitability of this software for any purpose. It
|
||||
* is provided "as is" without express or implied warranty.
|
||||
*
|
||||
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _SHMINT_H_
|
||||
#define _SHMINT_H_
|
||||
|
||||
#include <X11/Xmd.h>
|
||||
#include <X11/extensions/shmproto.h>
|
||||
|
||||
#include "screenint.h"
|
||||
#include "pixmap.h"
|
||||
#include "gc.h"
|
||||
|
||||
#define XSHM_PUT_IMAGE_ARGS \
|
||||
DrawablePtr /* dst */, \
|
||||
GCPtr /* pGC */, \
|
||||
int /* depth */, \
|
||||
unsigned int /* format */, \
|
||||
int /* w */, \
|
||||
int /* h */, \
|
||||
int /* sx */, \
|
||||
int /* sy */, \
|
||||
int /* sw */, \
|
||||
int /* sh */, \
|
||||
int /* dx */, \
|
||||
int /* dy */, \
|
||||
char * /* data */
|
||||
|
||||
#define XSHM_CREATE_PIXMAP_ARGS \
|
||||
ScreenPtr /* pScreen */, \
|
||||
int /* width */, \
|
||||
int /* height */, \
|
||||
int /* depth */, \
|
||||
char * /* addr */
|
||||
|
||||
typedef struct _ShmFuncs {
|
||||
PixmapPtr (*CreatePixmap) (XSHM_CREATE_PIXMAP_ARGS);
|
||||
void (*PutImage) (XSHM_PUT_IMAGE_ARGS);
|
||||
} ShmFuncs, *ShmFuncsPtr;
|
||||
|
||||
#if XTRANS_SEND_FDS
|
||||
#define SHM_FD_PASSING 1
|
||||
#endif
|
||||
|
||||
#ifdef SHM_FD_PASSING
|
||||
#define SHMDESC_IS_FD(shmdesc) ((shmdesc)->is_fd)
|
||||
#else
|
||||
#define SHMDESC_IS_FD(shmdesc) (0)
|
||||
#endif
|
||||
|
||||
_X_EXPORT void ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs);
|
||||
_X_EXPORT void ShmRegisterFbFuncs(ScreenPtr pScreen);
|
||||
|
||||
extern _X_EXPORT int ShmCompletionCode;
|
||||
extern _X_EXPORT int BadShmSegCode;
|
||||
|
||||
#endif /* _SHMINT_H_ */
|
||||
49
include/syncsdk.h
Normal file
49
include/syncsdk.h
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright © 2010 NVIDIA Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _SYNCSDK_H_
|
||||
#define _SYNCSDK_H_
|
||||
|
||||
#include "misync.h"
|
||||
|
||||
extern _X_EXPORT int
|
||||
SyncVerifyFence(SyncFence ** ppFence, XID fid, ClientPtr client, Mask mode);
|
||||
|
||||
extern _X_EXPORT SyncObject*
|
||||
SyncCreate(ClientPtr client, XID id, unsigned char type);
|
||||
|
||||
#define VERIFY_SYNC_FENCE(pFence, fid, client, mode) \
|
||||
do { \
|
||||
int rc; \
|
||||
rc = SyncVerifyFence(&(pFence), (fid), (client), (mode)); \
|
||||
if (Success != rc) return rc; \
|
||||
} while (0)
|
||||
|
||||
#define VERIFY_SYNC_FENCE_OR_NONE(pFence, fid, client, mode) \
|
||||
do { \
|
||||
pFence = 0; \
|
||||
if (None != fid) \
|
||||
VERIFY_SYNC_FENCE((pFence), (fid), (client), (mode)); \
|
||||
} while (0)
|
||||
|
||||
#endif /* _SYNCSDK_H_ */
|
||||
185
include/xvdix.h
Normal file
185
include/xvdix.h
Normal file
@@ -0,0 +1,185 @@
|
||||
/***********************************************************
|
||||
Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
|
||||
and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
|
||||
|
||||
All Rights Reserved
|
||||
|
||||
Permission to use, copy, modify, and distribute this software and its
|
||||
documentation for any purpose and without fee is hereby granted,
|
||||
provided that the above copyright notice appear in all copies and that
|
||||
both that copyright notice and this permission notice appear in
|
||||
supporting documentation, and that the names of Digital or MIT not be
|
||||
used in advertising or publicity pertaining to distribution of the
|
||||
software without specific, written prior permission.
|
||||
|
||||
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
||||
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
||||
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
|
||||
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||
SOFTWARE.
|
||||
|
||||
******************************************************************/
|
||||
|
||||
#ifndef XVDIX_H
|
||||
#define XVDIX_H
|
||||
/*
|
||||
** File:
|
||||
**
|
||||
** xvdix.h --- Xv device independent header file
|
||||
**
|
||||
** Author:
|
||||
**
|
||||
** David Carver (Digital Workstation Engineering/Project Athena)
|
||||
**
|
||||
** Revisions:
|
||||
**
|
||||
** 29.08.91 Carver
|
||||
** - removed UnrealizeWindow wrapper unrealizing windows no longer
|
||||
** preempts video
|
||||
**
|
||||
** 11.06.91 Carver
|
||||
** - changed SetPortControl to SetPortAttribute
|
||||
** - changed GetPortControl to GetPortAttribute
|
||||
** - changed QueryBestSize
|
||||
**
|
||||
** 15.05.91 Carver
|
||||
** - version 2.0 upgrade
|
||||
**
|
||||
** 24.01.91 Carver
|
||||
** - version 1.4 upgrade
|
||||
**
|
||||
*/
|
||||
|
||||
#include "scrnintstr.h"
|
||||
#include <X11/extensions/Xvproto.h>
|
||||
|
||||
typedef struct {
|
||||
int numerator;
|
||||
int denominator;
|
||||
} XvRationalRec, *XvRationalPtr;
|
||||
|
||||
typedef struct {
|
||||
char depth;
|
||||
unsigned long visual;
|
||||
} XvFormatRec, *XvFormatPtr;
|
||||
|
||||
typedef struct {
|
||||
unsigned long id;
|
||||
ClientPtr client;
|
||||
} XvGrabRec, *XvGrabPtr;
|
||||
|
||||
typedef struct _XvPortNotifyRec *XvPortNotifyPtr;
|
||||
|
||||
typedef struct {
|
||||
int id;
|
||||
ScreenPtr pScreen;
|
||||
char *name;
|
||||
unsigned short width, height;
|
||||
XvRationalRec rate;
|
||||
} XvEncodingRec, *XvEncodingPtr;
|
||||
|
||||
typedef struct _XvAttributeRec {
|
||||
int flags;
|
||||
int min_value;
|
||||
int max_value;
|
||||
char *name;
|
||||
} XvAttributeRec, *XvAttributePtr;
|
||||
|
||||
typedef struct {
|
||||
int id;
|
||||
int type;
|
||||
int byte_order;
|
||||
char guid[16];
|
||||
int bits_per_pixel;
|
||||
int format;
|
||||
int num_planes;
|
||||
|
||||
/* for RGB formats only */
|
||||
int depth;
|
||||
unsigned int red_mask;
|
||||
unsigned int green_mask;
|
||||
unsigned int blue_mask;
|
||||
|
||||
/* for YUV formats only */
|
||||
unsigned int y_sample_bits;
|
||||
unsigned int u_sample_bits;
|
||||
unsigned int v_sample_bits;
|
||||
unsigned int horz_y_period;
|
||||
unsigned int horz_u_period;
|
||||
unsigned int horz_v_period;
|
||||
unsigned int vert_y_period;
|
||||
unsigned int vert_u_period;
|
||||
unsigned int vert_v_period;
|
||||
char component_order[32];
|
||||
int scanline_order;
|
||||
} XvImageRec, *XvImagePtr;
|
||||
|
||||
typedef struct {
|
||||
unsigned long base_id;
|
||||
unsigned char type;
|
||||
char *name;
|
||||
int nEncodings;
|
||||
XvEncodingPtr pEncodings;
|
||||
int nFormats;
|
||||
XvFormatPtr pFormats;
|
||||
int nAttributes;
|
||||
XvAttributePtr pAttributes;
|
||||
int nImages;
|
||||
XvImagePtr pImages;
|
||||
int nPorts;
|
||||
struct _XvPortRec *pPorts;
|
||||
ScreenPtr pScreen;
|
||||
int (*ddPutVideo) (DrawablePtr, struct _XvPortRec *, GCPtr,
|
||||
INT16, INT16, CARD16, CARD16,
|
||||
INT16, INT16, CARD16, CARD16);
|
||||
int (*ddPutStill) (DrawablePtr, struct _XvPortRec *, GCPtr,
|
||||
INT16, INT16, CARD16, CARD16,
|
||||
INT16, INT16, CARD16, CARD16);
|
||||
int (*ddGetVideo) (DrawablePtr, struct _XvPortRec *, GCPtr,
|
||||
INT16, INT16, CARD16, CARD16,
|
||||
INT16, INT16, CARD16, CARD16);
|
||||
int (*ddGetStill) (DrawablePtr, struct _XvPortRec *, GCPtr,
|
||||
INT16, INT16, CARD16, CARD16,
|
||||
INT16, INT16, CARD16, CARD16);
|
||||
int (*ddStopVideo) (struct _XvPortRec *, DrawablePtr);
|
||||
int (*ddSetPortAttribute) (struct _XvPortRec *, Atom, INT32);
|
||||
int (*ddGetPortAttribute) (struct _XvPortRec *, Atom, INT32 *);
|
||||
int (*ddQueryBestSize) (struct _XvPortRec *, CARD8,
|
||||
CARD16, CARD16, CARD16, CARD16,
|
||||
unsigned int *, unsigned int *);
|
||||
int (*ddPutImage) (DrawablePtr, struct _XvPortRec *, GCPtr,
|
||||
INT16, INT16, CARD16, CARD16,
|
||||
INT16, INT16, CARD16, CARD16,
|
||||
XvImagePtr, unsigned char *, Bool, CARD16, CARD16);
|
||||
int (*ddQueryImageAttributes) (struct _XvPortRec *, XvImagePtr,
|
||||
CARD16 *, CARD16 *, int *, int *);
|
||||
DevUnion devPriv;
|
||||
} XvAdaptorRec, *XvAdaptorPtr;
|
||||
|
||||
typedef struct _XvPortRec {
|
||||
unsigned long id;
|
||||
XvAdaptorPtr pAdaptor;
|
||||
XvPortNotifyPtr pNotify;
|
||||
DrawablePtr pDraw;
|
||||
ClientPtr client;
|
||||
XvGrabRec grab;
|
||||
TimeStamp time;
|
||||
DevUnion devPriv;
|
||||
} XvPortRec, *XvPortPtr;
|
||||
|
||||
typedef struct {
|
||||
int version, revision;
|
||||
int nAdaptors;
|
||||
XvAdaptorPtr pAdaptors;
|
||||
void *_dummy1; // required in place of a removed field for ABI compatibility
|
||||
void *_dummy2; // required in place of a removed field for ABI compatibility
|
||||
void *_dummy3; // required in place of a removed field for ABI compatibility
|
||||
} XvScreenRec, *XvScreenPtr;
|
||||
|
||||
extern _X_EXPORT int XvScreenInit(ScreenPtr);
|
||||
extern _X_EXPORT DevPrivateKey XvGetScreenKey(void);
|
||||
extern _X_EXPORT unsigned long XvGetRTPort(void);
|
||||
|
||||
#endif /* XVDIX_H */
|
||||
94
include/xvmcext.h
Normal file
94
include/xvmcext.h
Normal file
@@ -0,0 +1,94 @@
|
||||
|
||||
#ifndef _XVMC_H
|
||||
#define _XVMC_H
|
||||
#include <X11/extensions/Xv.h>
|
||||
#include "xvdix.h"
|
||||
|
||||
typedef struct {
|
||||
int num_xvimages;
|
||||
int *xvimage_ids;
|
||||
} XvMCImageIDList;
|
||||
|
||||
typedef struct {
|
||||
int surface_type_id;
|
||||
int chroma_format;
|
||||
int color_description;
|
||||
unsigned short max_width;
|
||||
unsigned short max_height;
|
||||
unsigned short subpicture_max_width;
|
||||
unsigned short subpicture_max_height;
|
||||
int mc_type;
|
||||
int flags;
|
||||
XvMCImageIDList *compatible_subpictures;
|
||||
} XvMCSurfaceInfoRec, *XvMCSurfaceInfoPtr;
|
||||
|
||||
typedef struct {
|
||||
XID context_id;
|
||||
ScreenPtr pScreen;
|
||||
int adapt_num;
|
||||
int surface_type_id;
|
||||
unsigned short width;
|
||||
unsigned short height;
|
||||
CARD32 flags;
|
||||
int refcnt;
|
||||
void *port_priv;
|
||||
void *driver_priv;
|
||||
} XvMCContextRec, *XvMCContextPtr;
|
||||
|
||||
typedef struct {
|
||||
XID surface_id;
|
||||
int surface_type_id;
|
||||
XvMCContextPtr context;
|
||||
void *driver_priv;
|
||||
} XvMCSurfaceRec, *XvMCSurfacePtr;
|
||||
|
||||
typedef struct {
|
||||
XID subpicture_id;
|
||||
int xvimage_id;
|
||||
unsigned short width;
|
||||
unsigned short height;
|
||||
int num_palette_entries;
|
||||
int entry_bytes;
|
||||
char component_order[4];
|
||||
XvMCContextPtr context;
|
||||
void *driver_priv;
|
||||
} XvMCSubpictureRec, *XvMCSubpicturePtr;
|
||||
|
||||
typedef int (*XvMCCreateContextProcPtr) (XvPortPtr port,
|
||||
XvMCContextPtr context,
|
||||
int *num_priv, CARD32 **priv);
|
||||
|
||||
typedef void (*XvMCDestroyContextProcPtr) (XvMCContextPtr context);
|
||||
|
||||
typedef int (*XvMCCreateSurfaceProcPtr) (XvMCSurfacePtr surface,
|
||||
int *num_priv, CARD32 **priv);
|
||||
|
||||
typedef void (*XvMCDestroySurfaceProcPtr) (XvMCSurfacePtr surface);
|
||||
|
||||
typedef int (*XvMCCreateSubpictureProcPtr) (XvMCSubpicturePtr subpicture,
|
||||
int *num_priv, CARD32 **priv);
|
||||
|
||||
typedef void (*XvMCDestroySubpictureProcPtr) (XvMCSubpicturePtr subpicture);
|
||||
|
||||
typedef struct {
|
||||
XvAdaptorPtr xv_adaptor;
|
||||
int num_surfaces;
|
||||
XvMCSurfaceInfoPtr *surfaces;
|
||||
int num_subpictures;
|
||||
XvImagePtr *subpictures;
|
||||
XvMCCreateContextProcPtr CreateContext;
|
||||
XvMCDestroyContextProcPtr DestroyContext;
|
||||
XvMCCreateSurfaceProcPtr CreateSurface;
|
||||
XvMCDestroySurfaceProcPtr DestroySurface;
|
||||
XvMCCreateSubpictureProcPtr CreateSubpicture;
|
||||
XvMCDestroySubpictureProcPtr DestroySubpicture;
|
||||
} XvMCAdaptorRec, *XvMCAdaptorPtr;
|
||||
|
||||
extern _X_EXPORT int XvMCScreenInit(ScreenPtr pScreen,
|
||||
int num, XvMCAdaptorPtr adapt);
|
||||
|
||||
extern _X_EXPORT int xf86XvMCRegisterDRInfo(ScreenPtr pScreen, const char *name,
|
||||
const char *busID, int major, int minor,
|
||||
int patchLevel);
|
||||
|
||||
#endif /* _XVMC_H */
|
||||
Reference in New Issue
Block a user