3 * Contains the graphics metalanguage interface details
\r
12 * http://www.d-rift.nl/combuster/mos3/?p=viewsource&file=/include/common/udi_gfx.h
\r
15 // note that the specification, and thus, the contents of this file is not fixed.
\r
17 #ifndef __UDI_GFX_H__
\r
18 #define __UDI_GFX_H__
\r
22 #ifndef UDI_GFX_VERSION
\r
23 #error "UDI_GFX_VERSION not defined."
\r
24 #elif UDI_GFX_VERSION != 0x101
\r
25 #error "UDI_GFX_VERSION not supported."
\r
29 * Enumeration: UDI_GFX_PROP
\r
30 * Lists the various UDI properties
\r
33 // General state properties
\r
34 /* Constant: UDI_GFX_PROP_ENABLE
\r
42 * Must include at least 1
\r
44 * The primary state of the connector or engine. An enabled state indicates
\r
45 * it is functioning and generating live output. A disabled state is one where
\r
46 * it is not contributing to any output but is otherwise functional. Finally
\r
47 * the reset state is where the driver is free to deallocate all resources
\r
48 * corresponding to this component and trash any state not referenced by other
\r
51 * A disabled or reset engine forwards all data from the previous stage
\r
52 * unmodified. The disabled state indicates that the component might be
\r
53 * returned to its enabled state within short notice.
\r
55 * A disabled connector will not send pixel data, but can perform other
\r
56 * initialisation communication such as DDC. A reset connector will not respond
\r
57 * in any fashion and can not be used for other purposes. Hardware is expected
\r
58 * to be powered down in such state.
\r
60 * Users should expect significant delays when moving components in and out of
\r
61 * the reset state. Moving engines between the enabled and disabled state should
\r
62 * take effect within one frame, such transition should take effect on a frame
\r
63 * boundary when supported.
\r
65 #define UDI_GFX_PROP_ENABLE 0
\r
67 #define UDI_GFX_PROP_ENABLE_DISABLED 0
\r
68 #define UDI_GFX_PROP_ENABLE_ENABLED 1
\r
69 #define UDI_GFX_PROP_ENABLE_RESET 2
\r
70 /* Constant: UDI_GFX_PROP_INPUT
\r
73 * Any valid engine ID, provided no dependency cycles are created, or -1
\r
76 * Any non-empty set of valid values. Often hardwired.
\r
78 * Points to the engine that is processed before this unit. In the case of a
\r
79 * connector, it points to the last engine in a pipeline, and each engine points
\r
80 * to the next engine in the sequence. A value of -1 indicates a source that
\r
81 * only yields black pixels. Implementations must not allow cyclic structures.
\r
82 * Changing this value may reallocate resources, and engines that are no longer
\r
83 * referenced may lose their data (but not their state) when it is not part of
\r
84 * any pipeline. If preservation is required, the ENABLE state should be used
\r
85 * instead. Valid ranges includes one or more from the list of engines and -1
\r
86 * combined. In most cases, this property can not be modified.
\r
88 #define UDI_GFX_PROP_INPUT 1
\r
89 /* Constant: UDI_GFX_PROP_WIDTH
\r
92 * Any non-zero positive number.
\r
95 * Contains at least one valid value. Often only multiples of UNIT_WIDTH
\r
96 * or a power of two are allowed. May be hardwired.
\r
98 * Contains the amount of pixels in the horizontal direction. For connectors,
\r
99 * this is the amount of data pixels rendered horizontally. For engines, this
\r
100 * is the width in pixels of the image. Pixels requested from an engine outside
\r
101 * the range (0..width-1) are defined according to the <UDI_GFX_PROP_CLIP>
\r
102 * property. In some cases, hardware may support only fixed combinations of
\r
103 * width and height. In such cases, changing the width will also change the
\r
104 * height to a corresponding valid number. Valid ranges include any values
\r
105 * strictly above zero. For connectors, expect large continuous ranges, large
\r
106 * ranges with a certain modulus, a limited number of fixed values, or a
\r
109 #define UDI_GFX_PROP_WIDTH 2
\r
110 /* Constant: UDI_GFX_PROP_HEIGHT
\r
113 * Any non-zero positive number.
\r
116 * Contains at least one valid value. Often only multiples of UNIT_HEIGHT
\r
117 * or a power of two are allowed. May be hardwired.
\r
119 * Contains the amount of pixels in the vertical direction. Functions similar
\r
120 * to the width property, but changing it will not alter the width property,
\r
121 * and it's range at any time contains the valid range for the currently
\r
124 #define UDI_GFX_PROP_HEIGHT 3
\r
126 /* Constant: UDI_GFX_PROP_CUSTOM
\r
127 * The first property index of the driver's custom range. These are not assigned
\r
128 * directly assigned by the UDI specification, but may be specified in the
\r
131 #define UDI_GFX_PROP_CUSTOM 1024
\r
133 // engine properties
\r
135 /* Constant: UDI_GFX_PROP_CLIP
\r
138 * 0 - points outside width x height are passed unmodified from input
\r
139 * 1 - the engine's contents is tiled with size width x height
\r
140 * 2 - points outside the width overflow into the y coordinate
\r
141 * 3 - points outside the height overflow into the x coordinate
\r
144 * Hardwired zero for connectors. Any non-empty subset for engines, usually
\r
147 * For engines, contains the behaviour for pixels requested outside the width
\r
148 * and height of the engine. Can be either 0 (pass from next stage), 1 (the
\r
149 * coordinates are wrapped modulus the height and width), 2 (the coordinates
\r
150 * overflow onto the next scanline horizontally, and wrap vertically), 3 (the
\r
151 * coordinates overflow onto the next column vertically, and wrap horizontally).
\r
152 * Valid ranges contain one or more of these options. For overlays and sprites,
\r
153 * a value 0 is common. For framebuffers, 2 is the most common value. For
\r
154 * connectors, this property is always 0 since they do not store pixel data
\r
156 #define UDI_GFX_PROP_CLIP 4
\r
158 /* Constant: UDI_GFX_PROP_UNIT_WIDTH
\r
161 * Any non-zero positive value
\r
164 * Any non-empty set of valid values. May be hardwired to 1 for
\r
165 * framebuffers, or a range of small values for hardware scaling, or any
\r
166 * larger hardwired number or set for tiling engines.
\r
168 * Tiles are used to indicate that the hardware groups sets of pixels and have
\r
169 * each group share certain properties, i.e. color or tile index, or share the
\r
170 * same chroma subsample with only a different intensity. If the engine has no
\r
171 * such grouping, or shares all properties over the entire contents, the value
\r
172 * of this property should be 1. Some tile examples include rescaling, where a
\r
173 * tile width of 2 indicates a pixel doubling in X direction, or in text mode
\r
174 * where a tile width of 8 or 9 corresponds with the width of common bitmap
\r
177 #define UDI_GFX_PROP_UNIT_WIDTH 5
\r
179 /* Constant: UDI_GFX_PROP_UNIT_HEIGHT
\r
182 * Any non-zero positive value
\r
185 * Any non-empty set of valid values. May be hardwired to 1 for
\r
186 * framebuffers, or a range of small values for hardware scaling, or any
\r
187 * larger hardwired number or set for tiling engines.
\r
189 * See <UDI_GFX_PROP_UNIT_WIDTH>, but for the Y direction. Common values are
\r
190 * 1-2 for framebuffers (doublescanning on or off), identical to the tile
\r
191 * width, or mostly independent.
\r
193 #define UDI_GFX_PROP_UNIT_HEIGHT 6
\r
195 /* Constant: UDI_GFX_PROP_TRANSLATEX
\r
198 * Any, signed value.
\r
201 * Any non-empty set. Typical values are hardwired zero, continuous
\r
202 * between -WIDTH and WIDTH, -WIDTH to zero inclusive, or all possible values
\r
204 * The horizontal offset where drawing starts. A positive value means the top-left
\r
205 * corner moves towards the right end of the screen, a negative value moves the
\r
206 * origin off the screen on the left side. Clipped areas moved off the screen do
\r
207 * not reappear on the opposite side.
\r
209 * With clipping enabled, this field combined with <UDI_GFX_PROP_WIDTH>
\r
210 * determines the area where the image should be drawn, which is the horizontal
\r
211 * range from UDI_GFX_PROP_TRANSLATEX to UDI_GFX_PROP_WIDTH +
\r
212 * UDI_GFX_PROP_TRANSLATEX - 1
\r
214 #define UDI_GFX_PROP_TRANSLATEX 7
\r
216 /* Constant: UDI_GFX_PROP_TRANSLATEY
\r
219 * Any signed value.
\r
222 * Any non-empty set. Typical values are hardwired zero, continuous
\r
223 * between -WIDTH and WIDTH, or all possible values
\r
225 * See <UDI_GFX_PROP_TRANSLATEX> but for the Y direction.
\r
227 #define UDI_GFX_PROP_TRANSLATEY 8
\r
229 #define UDI_GFX_PROP_GL_VERSION 14
\r
230 #define UDI_GFX_PROP_GLES_VERSION 15
\r
231 #define UDI_GFX_PROP_STATE_BLOCK 16
\r
232 #define UDI_GFX_PROP_COLOR_BITS 22
\r
233 #define UDI_GFX_PROP_GL_TARGET 23
\r
235 /* Constant: UDI_GFX_PROP_STOCK_FORMAT
\r
238 * Zero, or any constant from <UDI_GFX_STOCK_FORMAT>
\r
241 * Any non-empty set of valid values.
\r
243 * This field indicates the storage format is one from a limited set of
\r
244 * typical configurations. If the field is zero, the engine is not knowingly
\r
245 * configured as a common framebuffer. If nonzero, the operator chain and any
\r
246 * dependent settings are defined to be functionally equivalent to that of a
\r
247 * typical framebuffer device.
\r
249 * The value zero does not imply that the device does not actually follow a
\r
250 * set convention. This saves drivers from writing elaborate checking code
\r
251 * to determine the condition in question.
\r
253 * Writing this field potentially modifies other property fields within the
\r
254 * same engine to establish the requested configuration. Manually writing such
\r
255 * properties after changing this setting may in turn revert this property to
\r
256 * the zero state, even if there was no modification or the behaviour is still
\r
257 * as previously advertised by this property.
\r
259 #define UDI_GFX_PROP_STOCK_FORMAT 27
\r
261 /* Constant: UDI_GFX_PROP_OPERATOR_COUNT
\r
264 * Any non-zero positive number
\r
267 * Most likely constant. Can be any set of valid values.
\r
269 * The current value is the number of entries in the operator tree that can
\r
270 * be requested for this engine using <udi_gfx_get_engine_operator_req> and
\r
271 * <udi_gfx_get_engine_operator_ack>
\r
273 #define UDI_GFX_PROP_OPERATOR_COUNT 28
\r
275 // properties for removal:
\r
276 #define UDI_GFX_PROP_STORE_COUNT 24 // not generic
\r
277 #define UDI_GFX_PROP_STORE_WIDTH 9 // not generic
\r
278 #define UDI_GFX_PROP_STORE_HEIGHT 10 // not generic
\r
279 #define UDI_GFX_PROP_STORE_BITS 11 // not generic
\r
280 #define UDI_GFX_PROP_PALETTE 1024 // optional, can be derived from the operator tree
\r
281 #define UDI_GFX_PROP_BUFFER 1025 // optional, can be derived from the operator tree
\r
282 #define UDI_GFX_PROP_TILESHEET 1026 // optional, can be derived from the operator tree
\r
283 #define UDI_GFX_PROP_OPERATOR_INDEX 17 // deprecated for dedicated methods
\r
284 #define UDI_GFX_PROP_OPERATOR_OPCODE 18 // deprecated for dedicated methods
\r
285 #define UDI_GFX_PROP_OPERATOR_ARG_1 19 // deprecated for dedicated methods
\r
286 #define UDI_GFX_PROP_OPERATOR_ARG_2 20 // deprecated for dedicated methods
\r
287 #define UDI_GFX_PROP_OPERATOR_ARG_3 21 // deprecated for dedicated methods
\r
288 #define UDI_GFX_PROP_SOURCE_WIDTH 12 // should have been documented when I still knew what it did.
\r
289 #define UDI_GFX_PROP_SOURCE_HEIGHT 13 // should have been documented when I still knew what it did.
\r
290 #define UDI_GFX_PROP_INPUTX 25 // should have been documented when I still knew what it did.
\r
291 #define UDI_GFX_PROP_INPUTY 26 // should have been documented when I still knew what it did.
\r
293 // connector properties
\r
294 #define UDI_GFX_PROP_SIGNAL 23
\r
295 #define UDI_GFX_PROP_CONNECTOR_TYPE 24
\r
296 #define UDI_GFX_PROP_VGA_H_FRONT_PORCH 25
\r
297 #define UDI_GFX_PROP_VGA_H_BACK_PORCH 26
\r
298 #define UDI_GFX_PROP_VGA_H_SYNC 27
\r
299 #define UDI_GFX_PROP_VGA_V_FRONT_PORCH 28
\r
300 #define UDI_GFX_PROP_VGA_V_BACK_PORCH 29
\r
301 #define UDI_GFX_PROP_VGA_V_SYNC 30
\r
302 #define UDI_GFX_PROP_DOT_CLOCK 31
\r
303 #define UDI_GFX_PROP_VGA_H_SYNC_POL 32
\r
304 #define UDI_GFX_PROP_VGA_V_SYNC_POL 33
\r
307 * Enumeration: UDI_GFX_SIGNAL
\r
308 * Lists the various signal types
\r
310 #define UDI_GFX_SIGNAL_HIDDEN 0
\r
311 #define UDI_GFX_SIGNAL_INTEGRATED 0
\r
312 #define UDI_GFX_SIGNAL_RGBHV 1
\r
313 #define UDI_GFX_SIGNAL_RGBS 2
\r
314 #define UDI_GFX_SIGNAL_RGSB 3
\r
315 #define UDI_GFX_SIGNAL_YPBPR 4
\r
316 #define UDI_GFX_SIGNAL_DVID 5
\r
317 #define UDI_GFX_SIGNAL_YUV 6
\r
318 #define UDI_GFX_SIGNAL_YIQ 7
\r
319 #define UDI_GFX_SIGNAL_Y_UV 8
\r
320 #define UDI_GFX_SIGNAL_Y_IQ 9
\r
321 #define UDI_GFX_SIGNAL_HDMI 10
\r
322 #define UDI_GFX_SIGNAL_TEXT 11
\r
323 #define UDI_GFX_SIGNAL_CUSTOM 12
\r
326 * Enumeration: UDI_GFX_CONNECTOR
\r
327 * Lists the various external connectors
\r
329 #define UDI_GFX_CONNECTOR_HIDDEN 0
\r
330 #define UDI_GFX_CONNECTOR_VGA 1
\r
331 #define UDI_GFX_CONNECTOR_DVI 2
\r
332 #define UDI_GFX_CONNECTOR_SVIDEO 3
\r
333 #define UDI_GFX_CONNECTOR_COMPONENT 4
\r
334 #define UDI_GFX_CONNECTOR_HDMI 5
\r
335 #define UDI_GFX_CONNECTOR_RF 6
\r
336 #define UDI_GFX_CONNECTOR_SCART 7
\r
337 #define UDI_GFX_CONNECTOR_COMPOSITE 8
\r
338 #define UDI_GFX_CONNECTOR_MEMBUFFER 9
\r
341 * Enumeration: UDI_GFX_OPERATOR
\r
342 * Lists the display output operator
\r
344 #define UDI_GFX_OPERATOR_RGB 0 // output = (color) red(a1) + green(a2) + blue(a3) (each component is UDI_GFX_PROP_COLOR_BITS
\r
345 #define UDI_GFX_OPERATOR_YUV 1 // output = (color) Y(a1) + U(a2) + V(a3)
\r
346 #define UDI_GFX_OPERATOR_YIQ 2 // output = (color) Y(a1) + I(a2) + Q(a3)
\r
347 #define UDI_GFX_OPERATOR_I 3 // output = (color) intensity(a1)
\r
348 #define UDI_GFX_OPERATOR_ALPHA 4 // output = (color) a1 + alpha(a2)
\r
349 #define UDI_GFX_OPERATOR_ADD 5 // output = a1 + a2 + v3
\r
350 #define UDI_GFX_OPERATOR_SUB 6 // output = a1 - a2 - v3
\r
351 #define UDI_GFX_OPERATOR_MUL 7 // output = a1 * a2
\r
352 #define UDI_GFX_OPERATOR_DIV 8 // output = a1 / a2
\r
353 #define UDI_GFX_OPERATOR_MAD 9 // output = a1 * a2 + a3
\r
354 #define UDI_GFX_OPERATOR_FRC 10 // output = (a1 * a2) / a3
\r
355 #define UDI_GFX_OPERATOR_SHR 11 // output = a1 >> (a2 + v3)
\r
356 #define UDI_GFX_OPERATOR_SHL 12 // output = a1 << (a2 + v3)
\r
357 #define UDI_GFX_OPERATOR_ROR 13 // output = a1 >> a2 (over a3 bits)
\r
358 #define UDI_GFX_OPERATOR_ROL 14 // output = a1 << a2 (over a3 bits)
\r
359 #define UDI_GFX_OPERATOR_SAR 15 // output = a1 >> a2 (width is a3 bits, i.e. empties are filled with bit a3-1)
\r
360 #define UDI_GFX_OPERATOR_SAL 16 // output = a1 <<< (a2 + v3) (empties filled with bit 0)
\r
361 #define UDI_GFX_OPERATOR_AND 17 // output = a1 & a2
\r
362 #define UDI_GFX_OPERATOR_OR 18 // output = a1 | a2 | v3
\r
363 #define UDI_GFX_OPERATOR_NOT 19 // output = ~a1
\r
364 #define UDI_GFX_OPERATOR_XOR 20 // output = a1 ^ a2 ^ v3
\r
365 #define UDI_GFX_OPERATOR_NEG 21 // output = -a1
\r
366 #define UDI_GFX_OPERATOR_SEG 22 // output = (a1 >> v2) & (2**v3-1) (select v3 bits starting from bit v2)
\r
367 #define UDI_GFX_OPERATOR_RANGE 23 // output = (a1 > a2) ? a2 : ((a1 < a3) ? a3 : a1)
\r
368 #define UDI_GFX_OPERATOR_CONST 24 // output = v1
\r
369 #define UDI_GFX_OPERATOR_ATTR 25 // output = property[a1 + v2]
\r
370 #define UDI_GFX_OPERATOR_SWITCH 26 // output = output[(a1 % v3) + v2]
\r
371 #define UDI_GFX_OPERATOR_BUFFER 27 // output = buffer[a1][a2] (buffer is v3 bits per entry)
\r
372 #define UDI_GFX_OPERATOR_X 28 // output = output x pixel
\r
373 #define UDI_GFX_OPERATOR_Y 29 // output = output y pixel
\r
374 #define UDI_GFX_OPERATOR_TX 30 // output = horizontal tile index belonging to output pixel
\r
375 #define UDI_GFX_OPERATOR_TY 31 // output = vertical tile index belonging to output pixel
\r
376 #define UDI_GFX_OPERATOR_TXOFF 32 // output = horizontal offset from start of tile
\r
377 #define UDI_GFX_OPERATOR_TYOFF 33 // output = vertical offset from start of tile
\r
378 #define UDI_GFX_OPERATOR_INPUT 34 // output = input engine[x][y] component v1
\r
379 #define UDI_GFX_OPERATOR_DINPUT 35 // output = input engine[a1][a2] component v3
\r
381 /* Enumeration: UDI_GFX_STOCK_FORMAT
\r
382 * Lists stock configurations
\r
384 * When a stock configuration is used, the device is set to behave as a
\r
385 * simple framebuffer device. The <UDI_GFX_PROP_WIDTH> and <UDI_GFX_PROP_HEIGHT>
\r
386 * determine the virtual size of the framebuffer, and <UDI_GFX_PROP_TRANSLATEX>
\r
387 * and <UDI_GFX_PROP_TRANSLATEY> indicate the offset into that framebuffer
\r
388 * that is visible (which are typically restricted to negative values)
\r
390 #define UDI_GFX_STOCK_FORMAT_UNKNOWN 0
\r
391 #define UDI_GFX_STOCK_FORMAT_R8G8B8X8 1
\r
392 #define UDI_GFX_STOCK_FORMAT_B8G8R8X8 2
\r
393 #define UDI_GFX_STOCK_FORMAT_R8G8B8 3
\r
394 #define UDI_GFX_STOCK_FORMAT_B8G8R8 4
\r
395 #define UDI_GFX_STOCK_FORMAT_R5G6B5 5
\r
396 #define UDI_GFX_STOCK_FORMAT_B5G6R5 6
\r
397 #define UDI_GFX_STOCK_FORMAT_R5G5B5X1 7
\r
398 #define UDI_GFX_STOCK_FORMAT_B5G5R5X1 8
\r
399 #define UDI_GFX_STOCK_FORMAT_N8 9
\r
401 // Enumeration: UDI_GFX_BUFFER_INFO_FLAG
\r
402 // Lists behavioural patterns for direct buffer accesses.
\r
404 #define UDI_GFX_BUFFER_INFO_FLAG_R 0x0001 // buffer can be read
\r
405 #define UDI_GFX_BUFFER_INFO_FLAG_W 0x0002 // buffer can be written
\r
406 #define UDI_GFX_BUFFER_INFO_FLAG_BITALIGN_ENTRY 0x0004 // for non-multiple-of-eight buffer slot sizes, align on byte boundary every unit
\r
407 #define UDI_GFX_BUFFER_INFO_FLAG_BITALIGN_ROW 0x0008 // for non-multiple-of-eight buffer slot sizes, align only the start of the row
\r
410 // Constant: UDI_GFX_PROVIDER_OPS_NUM
\r
411 // the ops number used for the graphics driver
\r
412 #define UDI_GFX_PROVIDER_OPS_NUM 1
\r
414 // Constant: UDI_GFX_CLIENT_OPS_NUM
\r
415 // the ops number used for the graphics application
\r
416 #define UDI_GFX_CLIENT_OPS_NUM 2
\r
418 // Structure: udi_gfx_bind_cb_t
\r
419 // Contains the operations of a driver binding request
\r
422 // The main control block
\r
424 } udi_gfx_bind_cb_t;
\r
425 #define UDI_GFX_BIND_CB_NUM 1
\r
427 // Function: udi_block_bind_req
\r
428 // function pointer prototype for connecting to a block device
\r
431 // cb - A pointer to a <udi_block_bind_cb_t>
\r
433 typedef void udi_gfx_bind_req_op_t (udi_gfx_bind_cb_t *cb );
\r
434 udi_gfx_bind_req_op_t udi_gfx_bind_req;
\r
436 // Function: udi_gfx_bind_ack
\r
437 // function pointer prototype for acknowledging a connection request
\r
440 // cb - A pointer to a <udi_gfx_bind_cb_t>
\r
441 // sockets - The number of addressable socket components
\r
442 // engines - The number of addressable engine components
\r
443 // status - The result of the bind operation
\r
445 typedef void udi_gfx_bind_ack_op_t (udi_gfx_bind_cb_t *cb, udi_index_t sockets, udi_index_t engines, udi_status_t status );
\r
446 udi_gfx_bind_ack_op_t udi_gfx_bind_ack;
\r
448 // Function: udi_gfx_unbind_req
\r
449 // function pointer prototype for disconnecting a block device
\r
452 // cb - A pointer to a <udi_block_bind_cb_t>
\r
454 typedef void udi_gfx_unbind_req_op_t (udi_gfx_bind_cb_t *cb );
\r
455 udi_gfx_unbind_req_op_t udi_gfx_unbind_req;
\r
457 // Function: udi_gfx_unbind_ack
\r
458 // function pointer prototype for connecting to a block device
\r
461 // cb - A pointer to a <udi_gfx_bind_cb_t>
\r
463 typedef void udi_gfx_unbind_ack_op_t (udi_gfx_bind_cb_t *cb );
\r
464 udi_gfx_unbind_ack_op_t udi_gfx_unbind_ack;
\r
466 // Structure: udi_gfx_state_cb_t
\r
467 // Contains the operations of a read/write transaction
\r
470 // The main control block
\r
472 udi_ubit32_t subsystem;
\r
473 udi_ubit32_t attribute;
\r
474 } udi_gfx_state_cb_t;
\r
475 #define UDI_GFX_STATE_CB_NUM 2
\r
477 // Function: udi_gfx_set_engine_req
\r
478 // function pointer prototype for setting an engine state
\r
481 // cb - A pointer to a <udi_gfx_state_cb_t>
\r
483 typedef void udi_gfx_set_engine_req_op_t (udi_gfx_state_cb_t *cb, udi_ubit32_t value);
\r
484 udi_gfx_set_engine_req_op_t udi_gfx_set_engine_req;
\r
486 // Function: udi_gfx_set_connector_req
\r
487 // function pointer prototype for setting an connector state
\r
490 // cb - A pointer to a <udi_gfx_state_cb_t>
\r
492 typedef void udi_gfx_set_connector_req_op_t (udi_gfx_state_cb_t *cb, udi_ubit32_t value);
\r
493 udi_gfx_set_connector_req_op_t udi_gfx_set_connector_req;
\r
495 // Function: udi_gfx_set_engine_ack
\r
496 // function pointer prototype for setting an engine state
\r
499 // cb - A pointer to a <udi_gfx_state_cb_t>
\r
501 typedef void udi_gfx_set_engine_ack_op_t (udi_gfx_state_cb_t *cb );
\r
502 udi_gfx_set_engine_ack_op_t udi_gfx_set_engine_ack;
\r
504 // Function: udi_gfx_set_connector_ack
\r
505 // function pointer prototype for setting an engine state
\r
508 // cb - A pointer to a <udi_gfx_state_cb_t>
\r
510 typedef void udi_gfx_set_connector_ack_op_t (udi_gfx_state_cb_t *cb );
\r
511 udi_gfx_set_connector_ack_op_t udi_gfx_set_connector_ack;
\r
513 // Function: udi_gfx_get_engine_req
\r
514 // function pointer prototype for setting an engine state
\r
517 // cb - A pointer to a <udi_gfx_state_cb_t>
\r
519 typedef void udi_gfx_get_engine_req_op_t (udi_gfx_state_cb_t *cb );
\r
520 udi_gfx_get_engine_req_op_t udi_gfx_get_engine_req;
\r
522 // Function: udi_gfx_get_connector_req
\r
523 // function pointer prototype for setting an connector state
\r
526 // cb - A pointer to a <udi_gfx_state_cb_t>
\r
528 typedef void udi_gfx_get_connector_req_op_t (udi_gfx_state_cb_t *cb );
\r
529 udi_gfx_get_connector_req_op_t udi_gfx_get_connector_req;
\r
531 // Function: udi_gfx_get_engine_ack
\r
532 // function pointer prototype for setting an engine state
\r
535 // cb - A pointer to a <udi_gfx_state_cb_t>
\r
537 typedef void udi_gfx_get_engine_ack_op_t (udi_gfx_state_cb_t *cb, udi_ubit32_t value);
\r
538 udi_gfx_get_engine_ack_op_t udi_gfx_get_engine_ack;
\r
540 // Function: udi_gfx_get_connector_ack
\r
541 // function pointer prototype for setting an engine state
\r
544 // cb - A pointer to a <udi_gfx_state_cb_t>
\r
546 typedef void udi_gfx_get_connector_ack_op_t (udi_gfx_state_cb_t *cb, udi_ubit32_t value);
\r
547 udi_gfx_get_connector_ack_op_t udi_gfx_get_connector_ack;
\r
549 // Function: udi_gfx_set_engine_nak
\r
550 // function pointer prototype for setting an engine state
\r
553 // cb - A pointer to a <udi_gfx_state_cb_t>
\r
554 // status - An UDI status value indicative of the error
\r
556 typedef void udi_gfx_set_engine_nak_op_t (udi_gfx_state_cb_t *cb, udi_status_t status);
\r
557 udi_gfx_set_engine_nak_op_t udi_gfx_set_engine_nak;
\r
559 // Function: udi_gfx_set_connector_nak
\r
560 // function pointer prototype for setting an engine state
\r
563 // cb - A pointer to a <udi_gfx_state_cb_t>
\r
564 // status - An UDI status value indicative of the error
\r
566 typedef void udi_gfx_set_connector_nak_op_t (udi_gfx_state_cb_t *cb, udi_status_t status);
\r
567 udi_gfx_set_connector_nak_op_t udi_gfx_get_connector_nak;
\r
569 // Structure: udi_gfx_range_cb_t
\r
570 // Contains the operations of a range request transaction
\r
573 // The main control block
\r
575 udi_ubit32_t subsystem;
\r
576 udi_ubit32_t attribute;
\r
577 udi_buf_t * rangedata;
\r
578 } udi_gfx_range_cb_t;
\r
579 #define UDI_GFX_RANGE_CB_NUM 3
\r
581 // Function: udi_gfx_range_engine_req
\r
582 // function pointer prototype for getting an engine property range
\r
585 // cb - A pointer to a <udi_gfx_range_cb_t>
\r
587 typedef void udi_gfx_range_engine_req_op_t (udi_gfx_range_cb_t *cb );
\r
588 udi_gfx_range_engine_req_op_t udi_gfx_range_engine_req;
\r
590 // Function: udi_gfx_range_connector_req
\r
591 // function pointer prototype for getting a connector property range
\r
594 // cb - A pointer to a <udi_gfx_range_cb_t>
\r
596 typedef void udi_gfx_range_connector_req_op_t (udi_gfx_range_cb_t *cb );
\r
597 udi_gfx_range_connector_req_op_t udi_gfx_range_connector_req;
\r
599 // Function: udi_gfx_range_engine_ack
\r
600 // function pointer prototype for replying an engine property range
\r
603 // cb - A pointer to a <udi_gfx_range_cb_t>
\r
605 typedef void udi_gfx_range_engine_ack_op_t (udi_gfx_range_cb_t *cb );
\r
606 udi_gfx_range_engine_ack_op_t udi_gfx_range_engine_ack;
\r
608 // Function: udi_gfx_range_connector_ack
\r
609 // function pointer prototype for replying a connector property range
\r
612 // cb - A pointer to a <udi_gfx_range_cb_t>
\r
614 typedef void udi_gfx_range_connector_ack_op_t (udi_gfx_range_cb_t *cb );
\r
615 udi_gfx_range_connector_ack_op_t udi_gfx_range_connector_ack;
\r
617 // Function: udi_gfx_get_engine_operator_req
\r
618 // function pointer prototype for requesting the engine operator layout
\r
621 // cb - A pointer to a <udi_gfx_state_cb_t>
\r
623 typedef void udi_gfx_get_engine_operator_req_op_t (udi_gfx_range_cb_t *cb );
\r
624 udi_gfx_get_engine_operator_req_op_t udi_gfx_get_engine_operator_req;
\r
626 // Function: udi_gfx_get_engine_operator_ack
\r
627 // function pointer prototype for replying the engine operator layout
\r
630 // cb - A pointer to a <udi_gfx_state_cb_t>
\r
631 // op - The operator performed at this index
\r
632 // arg1 - the first argument to this operator
\r
633 // arg2 - the second argument to this operator
\r
634 // arg3 - the third argument to this operator
\r
636 typedef void udi_gfx_get_engine_operator_ack_op_t (udi_gfx_range_cb_t *cb, udi_ubit32_t op, udi_ubit32_t arg1, udi_ubit32_t arg2, udi_ubit32_t arg3 );
\r
637 udi_gfx_get_engine_operator_ack_op_t udi_gfx_get_engine_operator_ack;
\r
641 // Structure: udi_gfx_command_cb_t
\r
642 // Contains the operations of a command sequence
\r
645 // The main control block
\r
647 udi_buf_t * commanddata;
\r
648 } udi_gfx_command_cb_t;
\r
649 #define UDI_GFX_COMMAND_CB_NUM 4
\r
651 // Function: udi_gfx_connector_command_req
\r
652 // function pointer prototype for sending command data to the output connector
\r
655 // cb - A pointer to a <udi_gfx_command_cb_t>
\r
657 typedef void udi_gfx_connector_command_req_op_t (udi_gfx_command_cb_t *cb );
\r
658 udi_gfx_connector_command_req_op_t udi_gfx_connector_command_req;
\r
660 // Function: udi_gfx_engine_command_req
\r
661 // function pointer prototype for sending command data to the engine
\r
664 // cb - A pointer to a <udi_gfx_command_cb_t>
\r
666 typedef void udi_gfx_engine_command_req_op_t (udi_gfx_command_cb_t *cb );
\r
667 udi_gfx_engine_command_req_op_t udi_gfx_engine_command_req;
\r
669 // Function: udi_gfx_connector_command_ack
\r
670 // function pointer prototype for sending command data replies
\r
673 // cb - A pointer to a <udi_gfx_command_cb_t>
\r
675 typedef void udi_gfx_connector_command_ack_op_t (udi_gfx_command_cb_t *cb);
\r
676 udi_gfx_connector_command_ack_op_t udi_gfx_connector_command_ack;
\r
678 // Function: udi_gfx_engine_command_ack
\r
679 // function pointer prototype for sending engine data replies
\r
682 // cb - A pointer to a <udi_gfx_command_cb_t>
\r
684 typedef void udi_gfx_engine_command_ack_op_t (udi_gfx_command_cb_t *cb);
\r
685 udi_gfx_engine_command_ack_op_t udi_gfx_engine_command_ack;
\r
687 // Structure: udi_gfx_buffer_cb_t
\r
688 // Contains a description of a buffer, or area thereof
\r
691 // The main control block
\r
693 udi_ubit32_t buffer_index;
\r
694 } udi_gfx_buffer_info_cb_t;
\r
696 // Function: udi_gfx_buffer_info_req
\r
697 // function pointer prototype for getting buffer configuration information
\r
700 // cb - A pointer to a <udi_gfx_command_cb_t>
\r
702 typedef void udi_gfx_buffer_info_req_op_t (udi_gfx_buffer_info_cb_t *cb);
\r
703 udi_gfx_buffer_info_req_op_t udi_gfx_buffer_info_req;
\r
705 // Function: udi_gfx_buffer_info_ack
\r
706 // function pointer prototype for getting buffer configuration information
\r
709 // cb - A pointer to a <udi_gfx_command_cb_t>
\r
710 // width - The width of the buffer
\r
711 // height - The height of the buffer
\r
712 // bitsper - The number of bits read from the buffer per pixel unit
\r
713 // flags - A bitfield of <UDI_GFX_BUFFER_FLAGS> indicating the exposed
\r
714 // capabilities of this buffer
\r
716 // Note that bitsper might not be a multiple of eight.
\r
718 typedef void udi_gfx_buffer_info_ack_op_t (udi_gfx_buffer_info_cb_t *cb, udi_ubit32_t width, udi_ubit32_t height, udi_ubit32_t bitsper, udi_ubit32_t flags);
\r
719 udi_gfx_buffer_info_ack_op_t udi_gfx_buffer_info_ack;
\r
721 // Structure: udi_gfx_buffer_cb_t
\r
722 // Contains a description of a buffer, or area thereof
\r
725 // The main control block
\r
727 udi_ubit32_t buffer_index;
\r
730 udi_ubit32_t width;
\r
731 udi_ubit32_t height;
\r
732 udi_buf_t * buffer;
\r
733 } udi_gfx_buffer_cb_t;
\r
735 // Function: udi_gfx_buffer_write_req_op_t
\r
736 // function pointer prototype for writing raw hardware buffers
\r
739 // cb - A pointer to a <udi_gfx_buffer_cb_t>
\r
741 typedef void udi_gfx_buffer_write_req_op_t (udi_gfx_buffer_cb_t *cb);
\r
742 udi_gfx_buffer_write_req_op_t udi_gfx_buffer_write_req;
\r
744 // Function: udi_gfx_buffer_write_req_op_t
\r
745 // function pointer prototype for reading raw hardware buffers
\r
748 // cb - A pointer to a <udi_gfx_buffer_cb_t>
\r
750 typedef void udi_gfx_buffer_read_req_op_t (udi_gfx_buffer_cb_t *cb);
\r
751 udi_gfx_buffer_read_req_op_t udi_gfx_buffer_read_req;
\r
753 // Function: udi_gfx_buffer_write_ack_op_t
\r
754 // function pointer prototype for writing raw hardware buffers
\r
757 // cb - A pointer to a <udi_gfx_buffer_cb_t>
\r
759 typedef void udi_gfx_buffer_write_ack_op_t (udi_gfx_buffer_cb_t *cb);
\r
760 udi_gfx_buffer_write_ack_op_t udi_gfx_buffer_write_ack;
\r
762 // Function: udi_gfx_buffer_write_ack_op_t
\r
763 // function pointer prototype for reading raw hardware buffers
\r
766 // cb - A pointer to a <udi_gfx_buffer_cb_t>
\r
768 typedef void udi_gfx_buffer_read_ack_op_t (udi_gfx_buffer_cb_t *cb);
\r
769 udi_gfx_buffer_read_ack_op_t udi_gfx_buffer_read_ack;
\r
771 // Function: udi_gfx_buffer_write_nak_op_t
\r
772 // error handling for buffer writes
\r
775 // cb - A pointer to a <udi_gfx_buffer_cb_t>
\r
777 typedef void udi_gfx_buffer_write_nak_op_t (udi_gfx_buffer_cb_t *cb, udi_status_t status);
\r
778 udi_gfx_buffer_write_nak_op_t udi_gfx_buffer_write_nak;
\r
780 // Function: udi_gfx_buffer_write_nak_op_t
\r
781 // error handling for buffer reads
\r
784 // cb - A pointer to a <udi_gfx_buffer_cb_t>
\r
786 typedef void udi_gfx_buffer_read_nak_op_t (udi_gfx_buffer_cb_t *cb, udi_status_t status);
\r
787 udi_gfx_buffer_read_nak_op_t udi_gfx_buffer_read_nak;
\r
789 /* Structure: udi_gfx_provider_ops_t
\r
791 * The graphics metalanguage entry points (provider side)
\r
793 typedef const struct {
\r
794 udi_channel_event_ind_op_t *channel_event_ind_op;
\r
795 udi_gfx_bind_req_op_t *gfx_bind_req_op;
\r
796 udi_gfx_unbind_req_op_t *gfx_unbind_req_op;
\r
797 udi_gfx_set_connector_req_op_t *gfx_set_connector_req_op;
\r
798 udi_gfx_set_engine_req_op_t *gfx_set_engine_req_op;
\r
799 udi_gfx_get_connector_req_op_t *gfx_get_connector_req_op;
\r
800 udi_gfx_get_engine_req_op_t *gfx_get_engine_req_op;
\r
801 udi_gfx_range_connector_req_op_t *gfx_range_connector_req_op;
\r
802 udi_gfx_range_engine_req_op_t *gfx_range_engine_req_op;
\r
803 udi_gfx_get_engine_operator_req_op_t*gfx_get_engine_operator_req_op;
\r
804 udi_gfx_connector_command_req_op_t *gfx_connector_command_req_op;
\r
805 udi_gfx_engine_command_req_op_t *gfx_engine_command_req_op;
\r
806 udi_gfx_buffer_info_req_op_t *gfx_buffer_info_req_op;
\r
807 udi_gfx_buffer_read_req_op_t *gfx_buffer_read_req_op;
\r
808 udi_gfx_buffer_write_req_op_t *gfx_buffer_write_req_op;
\r
809 } udi_gfx_provider_ops_t;
\r
811 /* Structure: udi_gfx_client_ops_t
\r
813 * The graphics metalanguage entry points (client side)
\r
815 typedef const struct {
\r
816 udi_channel_event_ind_op_t *channel_event_ind_op;
\r
817 udi_gfx_bind_ack_op_t *gfx_bind_ack_op;
\r
818 udi_gfx_unbind_ack_op_t *gfx_unbind_ack_op;
\r
819 udi_gfx_set_connector_ack_op_t *gfx_set_connector_ack_op;
\r
820 udi_gfx_set_engine_ack_op_t *gfx_set_engine_ack_op;
\r
821 udi_gfx_set_connector_nak_op_t *gfx_set_connector_nak_op;
\r
822 udi_gfx_set_engine_nak_op_t *gfx_set_engine_nak_op;
\r
823 udi_gfx_get_connector_ack_op_t *gfx_get_connector_ack_op;
\r
824 udi_gfx_get_engine_ack_op_t *gfx_get_engine_ack_op;
\r
825 udi_gfx_range_connector_ack_op_t *gfx_range_connector_ack_op;
\r
826 udi_gfx_range_engine_ack_op_t *gfx_range_engine_ack_op;
\r
827 udi_gfx_get_engine_operator_req_op_t*gfx_get_engine_operator_ack_op;
\r
828 udi_gfx_connector_command_ack_op_t *gfx_connector_command_ack_op;
\r
829 udi_gfx_engine_command_ack_op_t *gfx_engine_command_ack_op;
\r
830 udi_gfx_buffer_info_ack_op_t *gfx_buffer_info_ack_op;
\r
831 udi_gfx_buffer_read_ack_op_t *gfx_buffer_read_ack_op;
\r
832 udi_gfx_buffer_write_ack_op_t *gfx_buffer_write_ack_op;
\r
833 udi_gfx_buffer_read_nak_op_t *gfx_buffer_read_nak_op;
\r
834 udi_gfx_buffer_write_nak_op_t *gfx_buffer_write_nak_op;
\r
835 } udi_gfx_client_ops_t;
\r
839 #ifndef UDI_ANNOY_ME
\r
840 void EngineReturnSimpleRange (int source, int index, int prop, int first, int last, int modulus);
\r
841 void ConnectorReturnSimpleRange (int source, int index, int prop, int first, int last, int modulus);
\r
842 void EngineReturnConstantRange (int source, int index, int prop, int value);
\r
843 void ConnectorReturnConstantRange (int source, int index, int prop, int value);
\r
844 void EngineReturnBooleanRange (int source, int index, int prop, int value1, int value2);
\r
845 void ConnectorReturnBooleanRange (int source, int index, int prop, int value1, int value2);
\r