os: if inet_ntop() is available, use it for IPv4 addresses as well
[xserver.git] / Xext / xvdix_priv.h
blob5bd08e33408916c633d4661526970f463bf1a24d
1 /* SPDX-License-Identifier: MIT OR X11
3 * Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
4 */
5 #ifndef _XORG_XVDIX_PRIV_H
7 #include <X11/Xdefs.h>
9 #include "include/pixmap.h"
10 #include "include/regionstr.h"
11 #include "Xext/xvdix.h"
13 #define VALIDATE_XV_PORT(portID, pPort, mode)\
15 int rc = dixLookupResourceByType((void **)&(pPort), portID,\
16 XvRTPort, client, mode);\
17 if (rc != Success)\
18 return rc;\
21 /* Errors */
23 #define _XvBadPort (XvBadPort+XvErrorBase)
25 typedef struct {
26 int version, revision;
27 int nAdaptors;
28 XvAdaptorPtr pAdaptors;
29 DestroyWindowProcPtr DestroyWindow;
30 DestroyPixmapProcPtr DestroyPixmap;
31 CloseScreenProcPtr CloseScreen;
32 } XvScreenRec, *XvScreenPtr;
34 typedef struct _XvPortNotifyRec {
35 struct _XvPortNotifyRec *next;
36 ClientPtr client;
37 unsigned long id;
38 } XvPortNotifyRec, *XvPortNotifyPtr;
40 extern int XvReqCode;
41 extern int XvErrorBase;
43 extern RESTYPE XvRTPort;
45 /* dispatch functions */
46 int ProcXvDispatch(ClientPtr);
47 int SProcXvDispatch(ClientPtr);
49 void XvFreeAdaptor(XvAdaptorPtr pAdaptor);
51 void XvFillColorKey(DrawablePtr pDraw, CARD32 key, RegionPtr region);
53 int XvdiSelectVideoNotify(ClientPtr client, DrawablePtr pDraw, BOOL onoff);
54 int XvdiSelectPortNotify(ClientPtr client, XvPortPtr pPort, BOOL onoff);
56 int XvdiPutVideo(ClientPtr client, DrawablePtr pDraw, XvPortPtr pPort,
57 GCPtr pGC, INT16 vid_x, INT16 vid_y, CARD16 vid_w,
58 CARD16 wid_h, INT16 drw_x, INT16 drw_y, CARD16 drw_w,
59 CARD16 drw_h);
60 int XvdiPutStill(ClientPtr client, DrawablePtr pDraw, XvPortPtr pPort,
61 GCPtr pGC, INT16 vid_x, INT16 vid_y, CARD16 vid_w,
62 CARD16 vid_h, INT16 drw_x, INT16 drw_y, CARD16 drw_w,
63 CARD16 drw_h);
64 int XvdiPutImage(ClientPtr client, DrawablePtr pDraw, XvPortPtr pPort,
65 GCPtr pGC, INT16 src_x, INT16 src_y, CARD16 src_w,
66 CARD16 src_h, INT16 drw_x, INT16 drw_y, CARD16 drw_w,
67 CARD16 drw_h, XvImagePtr image, unsigned char *data,
68 Bool sync, CARD16 width, CARD16 height);
70 int XvdiGetVideo(ClientPtr client, DrawablePtr pDraw, XvPortPtr pPort,
71 GCPtr pGC, INT16 vid_x, INT16 vid_y, CARD16 vid_w,
72 CARD16 vid_h, INT16 drw_x, INT16 drw_y, CARD16 drw_w,
73 CARD16 drw_h);
74 int XvdiGetStill(ClientPtr client, DrawablePtr pDraw, XvPortPtr pPort,
75 GCPtr pGC, INT16 vid_x, INT16 vid_y, CARD16 vid_w,
76 CARD16 vid_h, INT16 drw_x, INT16 drw_y, CARD16 drw_w,
77 CARD16 drw_h);
79 int XvdiSetPortAttribute(ClientPtr client, XvPortPtr pPort, Atom attribute,
80 INT32 value);
81 int XvdiGetPortAttribute(ClientPtr client, XvPortPtr pPort, Atom attribute,
82 INT32 *p_value);
84 int XvdiStopVideo(ClientPtr client, XvPortPtr pPort, DrawablePtr pDraw);
86 int XvdiMatchPort(XvPortPtr pPort, DrawablePtr pDraw);
88 int XvdiGrabPort(ClientPtr client, XvPortPtr pPort, Time ctime, int *p_result);
89 int XvdiUngrabPort(ClientPtr client, XvPortPtr pPort, Time ctime);
91 XvImagePtr XvMCFindXvImage(XvPortPtr pPort, CARD32 id);
93 #endif /* _XORG_XVDIX_PRIV_H */