annotate semiconginev2/old/thirdparty/x11/xvlib.nim @ 1218:56781cc0fc7c compiletime-tests

did: renamge main package
author sam <sam@basx.dev>
date Wed, 17 Jul 2024 21:01:37 +0700
parents semicongine/old/thirdparty/x11/xvlib.nim@239adab121a3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1191
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1 #***********************************************************
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2 #Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
3 #and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
4 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
5 # All Rights Reserved
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
6 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
7 #Permission to use, copy, modify, and distribute this software and its
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
8 #documentation for any purpose and without fee is hereby granted,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
9 #provided that the above copyright notice appear in all copies and that
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
10 #both that copyright notice and this permission notice appear in
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
11 #supporting documentation, and that the names of Digital or MIT not be
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
12 #used in advertising or publicity pertaining to distribution of the
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
13 #software without specific, written prior permission.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
14 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
15 #DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
16 #ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
17 #DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
18 #ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
19 #WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
20 #ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
21 #SOFTWARE.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
22 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
23 #******************************************************************
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
24 # $XFree86: xc/include/extensions/Xvlib.h,v 1.3 1999/12/11 19:28:48 mvojkovi Exp $
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
25 #*
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
26 #** File:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
27 #**
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
28 #** Xvlib.h --- Xv library public header file
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
29 #**
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
30 #** Author:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
31 #**
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
32 #** David Carver (Digital Workstation Engineering/Project Athena)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
33 #**
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
34 #** Revisions:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
35 #**
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
36 #** 26.06.91 Carver
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
37 #** - changed XvFreeAdaptors to XvFreeAdaptorInfo
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
38 #** - changed XvFreeEncodings to XvFreeEncodingInfo
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
39 #**
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
40 #** 11.06.91 Carver
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
41 #** - changed SetPortControl to SetPortAttribute
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
42 #** - changed GetPortControl to GetPortAttribute
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
43 #** - changed QueryBestSize
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
44 #**
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
45 #** 05.15.91 Carver
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
46 #** - version 2.0 upgrade
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
47 #**
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
48 #** 01.24.91 Carver
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
49 #** - version 1.4 upgrade
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
50 #**
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
51 #*
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
52
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
53 import
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
54 x, xlib, xshm, xv
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
55
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
56 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
57 libXv* = "libXv.so"
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
58
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
59 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
60 PXvRational* = ptr XvRational
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
61 XvRational*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
62 numerator*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
63 denominator*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
64
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
65 PXvAttribute* = ptr XvAttribute
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
66 XvAttribute*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
67 flags*: cint # XvGettable, XvSettable
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
68 min_value*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
69 max_value*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
70 name*: cstring
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
71
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
72 PPXvEncodingInfo* = ptr PXvEncodingInfo
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
73 PXvEncodingInfo* = ptr XvEncodingInfo
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
74 XvEncodingInfo*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
75 encoding_id*: XvEncodingID
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
76 name*: cstring
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
77 width*: culong
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
78 height*: culong
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
79 rate*: XvRational
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
80 num_encodings*: culong
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
81
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
82 PXvFormat* = ptr XvFormat
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
83 XvFormat*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
84 depth*: cchar
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
85 visual_id*: culong
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
86
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
87 PPXvAdaptorInfo* = ptr PXvAdaptorInfo
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
88 PXvAdaptorInfo* = ptr XvAdaptorInfo
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
89 XvAdaptorInfo*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
90 base_id*: XvPortID
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
91 num_ports*: culong
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
92 thetype*: cchar
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
93 name*: cstring
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
94 num_formats*: culong
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
95 formats*: PXvFormat
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
96 num_adaptors*: culong
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
97
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
98 PXvVideoNotifyEvent* = ptr XvVideoNotifyEvent
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
99 XvVideoNotifyEvent*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
100 theType*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
101 serial*: culong # # of last request processed by server
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
102 send_event*: XBool # true if this came from a SendEvent request
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
103 display*: PDisplay # Display the event was read from
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
104 drawable*: Drawable # drawable
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
105 reason*: culong # what generated this event
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
106 port_id*: XvPortID # what port
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
107 time*: Time # milliseconds
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
108
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
109 PXvPortNotifyEvent* = ptr XvPortNotifyEvent
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
110 XvPortNotifyEvent*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
111 theType*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
112 serial*: culong # # of last request processed by server
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
113 send_event*: XBool # true if this came from a SendEvent request
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
114 display*: PDisplay # Display the event was read from
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
115 port_id*: XvPortID # what port
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
116 time*: Time # milliseconds
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
117 attribute*: Atom # atom that identifies attribute
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
118 value*: clong # value of attribute
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
119
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
120 PXvEvent* = ptr XvEvent
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
121 XvEvent*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
122 pad*: array[0..23, clong] # case longint of
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
123 # 0 : (
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
124 # theType : cint;
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
125 # );
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
126 # 1 : (
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
127 # xvvideo : XvVideoNotifyEvent;
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
128 # );
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
129 # 2 : (
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
130 # xvport : XvPortNotifyEvent;
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
131 # );
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
132 # 3 : (
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
133 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
134 # );
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
135
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
136 PXvImageFormatValues* = ptr XvImageFormatValues
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
137 XvImageFormatValues*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
138 id*: cint # Unique descriptor for the format
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
139 theType*: cint # XvRGB, XvYUV
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
140 byte_order*: cint # LSBFirst, MSBFirst
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
141 guid*: array[0..15, cchar] # Globally Unique IDentifier
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
142 bits_per_pixel*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
143 format*: cint # XvPacked, XvPlanar
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
144 num_planes*: cint # for RGB formats only
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
145 depth*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
146 red_mask*: cuint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
147 green_mask*: cuint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
148 blue_mask*: cuint # for YUV formats only
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
149 y_sample_bits*: cuint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
150 u_sample_bits*: cuint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
151 v_sample_bits*: cuint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
152 horz_y_period*: cuint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
153 horz_u_period*: cuint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
154 horz_v_period*: cuint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
155 vert_y_period*: cuint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
156 vert_u_period*: cuint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
157 vert_v_period*: cuint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
158 component_order*: array[0..31, char] # eg. UYVY
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
159 scanline_order*: cint # XvTopToBottom, XvBottomToTop
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
160
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
161 PXvImage* = ptr XvImage
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
162 XvImage*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
163 id*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
164 width*, height*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
165 data_size*: cint # bytes
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
166 num_planes*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
167 pitches*: cint # bytes
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
168 offsets*: cint # bytes
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
169 data*: pointer
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
170 obdata*: XPointer
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
171
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
172 proc XvQueryExtension*(display: PDisplay, p_version, p_revision, p_requestBase,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
173 p_eventBase, p_errorBase: cuint): cint{.cdecl, dynlib: libXv, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
174 proc XvQueryAdaptors*(display: PDisplay, window: Window, p_nAdaptors: cuint,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
175 p_pAdaptors: PPXvAdaptorInfo): cint{.cdecl, dynlib: libXv,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
176 importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
177 proc XvQueryEncodings*(display: PDisplay, port: XvPortID, p_nEncoding: cuint,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
178 p_pEncoding: PPXvEncodingInfo): cint{.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
179 dynlib: libXv, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
180 proc XvPutVideo*(display: PDisplay, port: XvPortID, d: Drawable, gc: GC,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
181 vx, vy: cint, vw, vh: cuint, dx, dy: cint, dw, dh: cuint): cint{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
182 cdecl, dynlib: libXv, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
183 proc XvPutStill*(display: PDisplay, port: XvPortID, d: Drawable, gc: GC,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
184 vx, vy: cint, vw, vh: cuint, dx, dy: cint, dw, dh: cuint): cint{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
185 cdecl, dynlib: libXv, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
186 proc XvGetVideo*(display: PDisplay, port: XvPortID, d: Drawable, gc: GC,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
187 vx, vy: cint, vw, vh: cuint, dx, dy: cint, dw, dh: cuint): cint{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
188 cdecl, dynlib: libXv, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
189 proc XvGetStill*(display: PDisplay, port: XvPortID, d: Drawable, gc: GC,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
190 vx, vy: cint, vw, vh: cuint, dx, dy: cint, dw, dh: cuint): cint{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
191 cdecl, dynlib: libXv, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
192 proc XvStopVideo*(display: PDisplay, port: XvPortID, drawable: Drawable): cint{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
193 cdecl, dynlib: libXv, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
194 proc XvGrabPort*(display: PDisplay, port: XvPortID, time: Time): cint{.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
195 dynlib: libXv, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
196 proc XvUngrabPort*(display: PDisplay, port: XvPortID, time: Time): cint{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
197 cdecl, dynlib: libXv, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
198 proc XvSelectVideoNotify*(display: PDisplay, drawable: Drawable, onoff: XBool): cint{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
199 cdecl, dynlib: libXv, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
200 proc XvSelectPortNotify*(display: PDisplay, port: XvPortID, onoff: XBool): cint{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
201 cdecl, dynlib: libXv, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
202 proc XvSetPortAttribute*(display: PDisplay, port: XvPortID, attribute: Atom,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
203 value: cint): cint{.cdecl, dynlib: libXv, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
204 proc XvGetPortAttribute*(display: PDisplay, port: XvPortID, attribute: Atom,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
205 p_value: cint): cint{.cdecl, dynlib: libXv, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
206 proc XvQueryBestSize*(display: PDisplay, port: XvPortID, motion: XBool,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
207 vid_w, vid_h, drw_w, drw_h: cuint,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
208 p_actual_width, p_actual_height: cuint): cint{.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
209 dynlib: libXv, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
210 proc XvQueryPortAttributes*(display: PDisplay, port: XvPortID, number: cint): PXvAttribute{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
211 cdecl, dynlib: libXv, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
212 proc XvFreeAdaptorInfo*(adaptors: PXvAdaptorInfo){.cdecl, dynlib: libXv, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
213 proc XvFreeEncodingInfo*(encodings: PXvEncodingInfo){.cdecl, dynlib: libXv,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
214 importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
215 proc XvListImageFormats*(display: PDisplay, port_id: XvPortID,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
216 count_return: cint): PXvImageFormatValues{.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
217 dynlib: libXv, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
218 proc XvCreateImage*(display: PDisplay, port: XvPortID, id: cint, data: pointer,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
219 width, height: cint): PXvImage{.cdecl, dynlib: libXv,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
220 importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
221 proc XvPutImage*(display: PDisplay, id: XvPortID, d: Drawable, gc: GC,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
222 image: PXvImage, src_x, src_y: cint, src_w, src_h: cuint,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
223 dest_x, dest_y: cint, dest_w, dest_h: cuint): cint{.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
224 dynlib: libXv, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
225 proc XvShmPutImage*(display: PDisplay, id: XvPortID, d: Drawable, gc: GC,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
226 image: PXvImage, src_x, src_y: cint, src_w, src_h: cuint,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
227 dest_x, dest_y: cint, dest_w, dest_h: cuint,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
228 send_event: XBool): cint{.cdecl, dynlib: libXv, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
229 proc XvShmCreateImage*(display: PDisplay, port: XvPortID, id: cint,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
230 data: pointer, width, height: cint,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
231 shminfo: PXShmSegmentInfo): PXvImage{.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
232 dynlib: libXv, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
233 # implementation