1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
9 <title>Extended Visual Information Extension</title>
10 <subtitle>X Project Team Standard</subtitle>
11 <releaseinfo>Version 1.0</releaseinfo>
14 <firstname>Peter</firstname><surname>Daifuku</surname>
15 <affiliation><orgname>Silicon Graphics, Inc.</orgname></affiliation>
18 <corpname>X Consortium Standard</corpname>
19 <copyright><year>1986-97</year><holder>The Open Group</holder></copyright>
20 <affiliation><orgname>X Consortium</orgname></affiliation>
21 <productnumber>X Version 11, Release 6.8</productnumber>
26 Permission is hereby granted, free of charge, to any person obtaining a
28 software and associated documentation files (the Software), to use the
29 Software without restriction, including, without limitation, the rights to
30 copy, modify, merge, publish, distribute and sublicense the Software,
31 to make, have made, license and distribute derivative works thereof, and
32 to permit persons to whom the Software is
33 furnished to do so, subject to the following conditions:
37 The above copyright notice and the following permission notice shall be
38 included in all copies of the Software:
42 THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND,
43 EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE WARRANTIES
44 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-
45 INFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY
46 CLAIM, DAMAGES OR OTHER USEABILITIY, WHETHER IN AN ACTION OF
47 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN
48 CONNNECTION WITH THE SOFTWARE OR THE USE OF OTHER DEALINGS IN
53 Except as contained in this notice, the name of The Open Group shall not
54 be used in advertising or otherwise to promote the use or other dealings
55 in this Software without prior written authorization from The Open Group.
59 X Window System is a trademark of The Open Group.
67 <sect1 id="Introduction">
68 <title>Introduction</title>
70 EVI (Extended Visual Information extension) allows a client to determine
71 information about core X visuals beyond what the core protocol provides.
78 As the X Window System has evolved, it has become clear that the information
79 returned by the core X protocol regarding Visuals is often insufficient for a
80 client to determine which is the most appropriate visual for its needs. This
81 extension allows clients to query the X server for additional visual
82 information, specifically as regards colormaps and framebuffer levels.
86 This extension is meant to address the needs of pure X clients only. It is
87 specifically and purposefully not designed to address the needs of X
88 extensions. Extensions that have an impact on visual information should provide
89 their own mechanisms for delivering that information. For example, the Double
90 Buffering Extension (DBE) provides its own mechanism for determining which
91 visuals support double-buffering.
96 <title>Requests</title>
98 <function>GetVersion</function>
101 <informaltable frame="none">
102 <tgroup cols='1' align='left'>
103 <colspec colname='c1' colsep="0" colwidth="1*"/>
107 <emphasis remap='I'>client_major_version</emphasis>: CARD8
112 <emphasis remap='I'>client_minor_version</emphasis>: CARD8
122 <emphasis remap='I'>server_major_version</emphasis>: CARD8
127 <emphasis remap='I'>server_minor_version</emphasis>: CARD8
137 If supplied, the client_major_version and client_minor_version indicate
138 what version of the protocol the client wants the server to implement.
139 The server version numbers returned indicate the protocol this extension
140 actually supports. This might not equal the version sent by the client.
141 An implementation can (but need not) support more than one version
142 simultaneously. The server_major_version and the server_minor_version
143 are a mechanism to support future revisions of the EVI protocol that
144 may be necessary. In general, the major version would increment for
145 incompatible changes, and the minor version would increment for small
146 upward-compatible changes. Servers that support the protocol defined in
147 this document will return a server_major_version of one (1), and a
148 server_minor_version of zero (0).
152 <function> GetVisualInfo</function>
155 <informaltable frame="none">
156 <tgroup cols='1' align='left'>
157 <colspec colname='c1' colsep="0" colwidth="1*"/>
161 <emphasis remap='I'>visual_list</emphasis>: LISTofVISUALID
171 <emphasis remap='I'>per_visual_info</emphasis>: LISTofVISUALINFO
182 <informaltable frame="none">
183 <tgroup cols='1' align='left'>
184 <colspec colname='c1' colsep="0" colwidth="1*"/>
188 VISUALINFO: [core_visual_id: VISUALID
203 transparency_type: CARD8
213 transparency_value: CARD32
218 min_hw_colormaps: CARD8
223 max_hw_colormaps: CARD8
228 num_colormap_conflicts: CARD16
233 colormap_conflicts: LISTofVISUALID]
243 level is 0 for normal planes, > 0 for overlays, < 0 for underlays.
248 transparency_type is 0 for none, 1 for transparent pixel, 2 for
254 transparency_value: value to get transparent pixel if transparency
260 min_hw_colormaps: minimum number of hardware colormaps backing up the
266 max_hw_colormaps: maximum number of hardware colormaps backing up the
270 (architectures with static colormap allocation/reallocation would have min
276 num_colormap_conflicts: number of elements in colormap_conflicts.
281 colormap_conflicts: list of visuals that may conflict with this one. For
282 example, if a 12-bit colormap is overloaded to support 8-bit visuals, the
283 8-bit visuals would conflict with the 12-bit visuals.
289 <sect1 id="Events_and_Errors">
290 <title>Events and Errors</title>
292 No new events or errors are defined by this extension.
296 <sect1 id="Changes_to_existing_protocol_">
297 <title>Changes to existing protocol.</title>
303 <sect1 id="Encoding">
304 <title>Encoding</title>
306 The name of this extension is "Extended-Visual-Information".
310 The conventions used here are the same as those for the core X11
314 <literallayout class="monospaced">
315 <function>GetVersion</function>
319 2 CARD16 client_major_version
320 2 CARD16 client_minor_version
324 2 CARD16 sequence number
326 2 CARD16 server_major_version
327 2 CARD16 server_minor_version
331 <literallayout class="monospaced">
332 <function>GetVisualInfo</function>
341 2 CARD16 sequence number
346 16n LISTofVISUALINFO items
349 <literallayout class="monospaced">
351 4 VisualID core_visual_id
354 1 CARD8 transparency_type
356 4 CARD32 transparency_value
357 1 CARD8 min_hw_colormaps
358 1 CARD8 max_hw_colormaps
359 2 CARD16 num_colormap_conflicts
363 <sect1 id="C_Language_Binding">
364 <title>C Language Binding</title>
367 The C functions provide direct access to the protocol and add no additional
368 semantics. For complete details on the effects of these functions, refer
369 to the appropriate protocol request, which can be derived by deleting Xevi
370 at the start of the function. All functions that have return type Status
371 will return nonzero for success and zero for failure.
375 The include file for this extension is:
376 <function>< X11/extensions/XEVI.h></function>.
381 <funcdef>Bool <function> XeviQueryVersion</function></funcdef>
382 <paramdef>Display<parameter> *display</parameter></paramdef>
383 <paramdef>int<parameter> *major_version_return</parameter></paramdef>
384 <paramdef>int<parameter> *minor_version_return</parameter></paramdef>
391 <emphasis remap='I'>display</emphasis>
395 Specifies the connection to the X server.
401 <emphasis remap='I'>major_version_return</emphasis>
405 Returns the major version supported by the server.
411 <emphasis remap='I'>minor_version_return</emphasis>
415 Returns the minor version supported by the server.
422 XeviQueryVersion sets major_version_return and minor_version_return to
423 the major and minor EVI protocol version supported by the server. If
424 the EVI library is compatible with the version returned by the server,
425 it returns nonzero. If dpy does not support the EVI extension, or if
426 there was an error during communication with the server, or if the server
427 and library protocol versions are incompatible, it returns zero. No other
428 Xevi functions may be called before this function. If a client violates
429 this rule, the effects of all subsequent Xevi calls that it makes are
434 To get the extended information for any subset of visuals use
440 <funcdef>int <function> XeviGetVisualInfo</function></funcdef>
441 <paramdef>Display<parameter> *display</parameter></paramdef>
442 <paramdef>VisualID<parameter> *visual</parameter></paramdef>
443 <paramdef>int<parameter> n_visual</parameter></paramdef>
444 <paramdef>ExtendedVisualInfo<parameter> **evi_return</parameter></paramdef>
445 <paramdef>int<parameter> *n_info_return</parameter></paramdef>
452 <emphasis remap='I'>display</emphasis>
456 Specifies the connection to the X server.
462 <emphasis remap='I'>visual</emphasis>
466 If NULL, then information for all visuals of all
467 screens is returned. Otherwise, a pointer to a list of visuals for which
468 extended visual information is desired.
474 <emphasis remap='I'>n_visual</emphasis>
478 If 0, then information for all visuals of all screens is returned. Otherwise,
479 the number of elements in the array <emphasis remap='I'>visual</emphasis>.
485 <emphasis remap='I'>evi_return</emphasis>
489 Returns a pointer to a list of <emphasis remap='I'>ExtendedVisualInfo</emphasis>. When done, the client
490 should free the list using <emphasis remap='I'>XFree</emphasis>.
496 <emphasis remap='I'>n_info_return</emphasis>
500 Returns the number of elements in the list of
501 <emphasis remap='I'>ExtendedVisualInfo</emphasis>.
508 XeviGetVisualInfo returns a list of ExtendedVisualInfo structures that describe
509 visual information beyond that supported by the core protocol. This includes
510 layer information relevant for systems supporting overlays and/or underlay
511 planes, and information that allows applications better to determine the level
512 of hardware support for multiple colormaps. XeviGetVisualInfo returns Success
513 if successful, or an X error otherwise.