1db39249a2932f6694b068e058f55f1ccc0530ac
[platform/upstream/libXvMC.git] / src / XvMClibint.h
1 /* $XFree86: xc/lib/XvMC/XvMClibint.h,v 1.4 2001/07/25 15:04:54 dawes Exp $ */
2
3 #ifndef _XVMCLIBINT_H
4 #define _XVMCLIBINT_H
5 #define NEED_REPLIES
6
7 #include <X11/Xlibint.h>
8 #include <X11/extensions/Xvproto.h>
9 #include <X11/extensions/XvMCproto.h>
10 #include <X11/extensions/XvMClib.h>
11
12 #define XvMCCheckExtension(dpy, i, val) \
13   XextCheckExtension(dpy, i, xvmc_extension_name, val)
14
15
16 #if !defined(UNIXCPP)
17 #define XvMCGetReq(name, req) \
18         WORD64ALIGN\
19         if ((dpy->bufptr + sizeof(xvmc##name##Req)) > dpy->bufmax)\
20                 _XFlush(dpy);\
21         req = (xvmc##name##Req *)(dpy->last_req = dpy->bufptr);\
22         req->reqType = info->codes->major_opcode;\
23         req->xvmcReqType = xvmc_##name; \
24         req->length = sizeof(xvmc##name##Req)>>2;\
25         dpy->bufptr += sizeof(xvmc##name##Req);\
26         dpy->request++
27 #else
28 #define XvMCGetReq(name, req) \
29         WORD64ALIGN\
30         if ((dpy->bufptr + sizeof(xvmc/**/name/**/Req)) > dpy->bufmax)\
31                 _XFlush(dpy);\
32         req = (xvmc/**/name/**/Req *)(dpy->last_req = dpy->bufptr);\
33         req->reqType = info->codes->major_opcode;\
34         req->xvmcReqType = xvmc_/**/name;\
35         req->length = sizeof(xvmc/**/name/**/Req)>>2;\
36         dpy->bufptr += sizeof(xvmc/**/name/**/Req);\
37         dpy->request++
38 #endif
39
40 #endif /* XVMCLIBINT_H */