evi.xml 14.2 KB
Newer Older
1 2
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3 4 5 6
                   "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
[
<!ENTITY % defs SYSTEM "defs.ent"> %defs;
]>
7 8 9 10 11 12 13 14 15 16 17 18 19


<book id="evi">

<bookinfo>
   <title>Extended Visual Information Extension</title>
   <subtitle>X Project Team Standard</subtitle>
   <authorgroup>
      <author>
         <firstname>Peter</firstname><surname>Daifuku</surname>
         <affiliation><orgname>Silicon Graphics, Inc.</orgname></affiliation>
      </author>
   </authorgroup>
20 21 22
   <releaseinfo>X Version 11, Release &fullrelvers;</releaseinfo>
   <releaseinfo>Version 1.0</releaseinfo>
   <copyright><year>1986-1997</year><holder>The Open Group</holder></copyright>
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42

<legalnotice>

<para>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this
software and associated documentation files (the Software), to use the
Software without restriction, including, without limitation, the rights to
copy, modify, merge, publish, distribute and sublicense the Software,
to make, have made, license and distribute derivative works thereof, and
to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
</para>

<para>
The above copyright notice and the following permission notice shall be
included in all copies of the Software:
</para>

<para>
43
THE SOFTWARE IS PROVIDED &ldquo;AS IS&rdquo;, WITHOUT WARRANTY OF ANY KIND,
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-
INFRINGEMENT.  IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER USEABILITIY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN
CONNNECTION WITH THE SOFTWARE OR THE USE OF OTHER DEALINGS IN
THE SOFTWARE.
</para>

<para>
Except as contained in this notice, the name of The Open Group shall not
be used in advertising or otherwise to promote the use or other dealings
in this Software without prior written authorization from The Open Group.
</para>

<para>
X Window System is a trademark of The Open Group.
</para>

</legalnotice>
</bookinfo>

66
<chapter id="Introduction">
67 68 69 70 71
<title>Introduction</title>
<para>
EVI (Extended Visual Information extension) allows a client to determine
information about core X visuals beyond what the core protocol provides.
</para>
72
</chapter>
73

74
<chapter id="Goals">
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
<title>Goals</title>
<para>
As the X Window System has evolved, it has become clear that the information
returned by the core X protocol regarding Visuals is often insufficient for a
client to determine which is the most appropriate visual for its needs. This
extension allows clients to query the X server for additional visual
information, specifically as regards colormaps and framebuffer levels.
</para>

<para>
This extension is meant to address the needs of pure X clients only. It is
specifically and purposefully not designed to address the needs of X
extensions. Extensions that have an impact on visual information should provide
their own mechanisms for delivering that information. For example, the Double
Buffering Extension (DBE) provides its own mechanism for determining which
visuals support double-buffering.
</para>
92
</chapter>
93

94
<chapter id="Requests">
95 96 97 98 99 100
<title>Requests</title>
<para>
<function>GetVersion</function>
</para>

<informaltable frame="none">
Matt Dew's avatar
Matt Dew committed
101 102 103
  <?dbfo keep-together="always" ?>
  <tgroup cols='1' align='left' colsep='0' rowsep='0'>
  <colspec colname='c1' colwidth="1.0*"/>
104
  <tbody>
Matt Dew's avatar
Matt Dew committed
105
    <row>
106 107 108 109
      <entry>
<emphasis remap='I'>client_major_version</emphasis>: CARD8
      </entry>
    </row>
Matt Dew's avatar
Matt Dew committed
110
    <row>
111 112 113 114
      <entry>
<emphasis remap='I'>client_minor_version</emphasis>: CARD8
      </entry>
    </row>
Matt Dew's avatar
Matt Dew committed
115
    <row>
116 117 118 119
      <entry>
=&gt;
      </entry>
    </row>
Matt Dew's avatar
Matt Dew committed
120
    <row>
121 122 123 124
      <entry>
<emphasis remap='I'>server_major_version</emphasis>: CARD8
      </entry>
    </row>
Matt Dew's avatar
Matt Dew committed
125
    <row>
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
      <entry>
<emphasis remap='I'>server_minor_version</emphasis>: CARD8
      </entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>



<para>
If supplied, the client_major_version and client_minor_version indicate
what version of the protocol the client wants the server to implement.
The server version numbers returned indicate the protocol this extension
actually supports. This might not equal the version sent by the client.
An implementation can (but need not) support more than one version
simultaneously. The server_major_version and the server_minor_version
are a mechanism to support future revisions of the EVI protocol that
may be necessary. In general, the major version would increment for
incompatible changes, and the minor version would increment for small
upward-compatible changes. Servers that support the protocol defined in
this document will return a server_major_version of one (1), and a
server_minor_version of zero (0).
</para>

<para>
<function>  GetVisualInfo</function>
</para>

<informaltable frame="none">
Matt Dew's avatar
Matt Dew committed
156 157 158
  <?dbfo keep-together="always" ?>
  <tgroup cols='1' align='left' colsep='0' rowsep='0'>
  <colspec colname='c1' colwidth="1.0*"/>
159
  <tbody>
Matt Dew's avatar
Matt Dew committed
160
    <row>
161 162 163 164
      <entry>
<emphasis remap='I'>visual_list</emphasis>: LISTofVISUALID
      </entry>
    </row>
Matt Dew's avatar
Matt Dew committed
165
    <row>
166 167 168 169
      <entry>
=&gt;
      </entry>
    </row>
Matt Dew's avatar
Matt Dew committed
170
    <row>
171 172 173 174 175 176 177 178 179 180 181 182 183
      <entry>
<emphasis remap='I'>per_visual_info</emphasis>: LISTofVISUALINFO
      </entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<para>
where:
</para>

<informaltable frame="none">
Matt Dew's avatar
Matt Dew committed
184 185 186
  <?dbfo keep-together="always" ?>
  <tgroup cols='1' align='left' colsep='0' rowsep='0'>
  <colspec colname='c1' colwidth="1.0*"/>
187
  <tbody>
Matt Dew's avatar
Matt Dew committed
188
    <row>
189 190 191 192
      <entry>
VISUALINFO: [core_visual_id: VISUALID
      </entry>
    </row>
Matt Dew's avatar
Matt Dew committed
193
    <row>
194 195 196 197
      <entry>
screen: CARD8
      </entry>
    </row>
Matt Dew's avatar
Matt Dew committed
198
    <row>
199 200 201 202
      <entry>
level: INT8
      </entry>
    </row>
Matt Dew's avatar
Matt Dew committed
203
    <row>
204 205 206 207
      <entry>
transparency_type: CARD8
      </entry>
    </row>
Matt Dew's avatar
Matt Dew committed
208
    <row>
209 210 211 212
      <entry>
unused: CARD8
      </entry>
    </row>
Matt Dew's avatar
Matt Dew committed
213
    <row>
214 215 216 217
      <entry>
transparency_value: CARD32
      </entry>
    </row>
Matt Dew's avatar
Matt Dew committed
218
    <row>
219 220 221 222
      <entry>
min_hw_colormaps: CARD8
      </entry>
    </row>
Matt Dew's avatar
Matt Dew committed
223
    <row>
224 225 226 227
      <entry>
max_hw_colormaps: CARD8
      </entry>
    </row>
Matt Dew's avatar
Matt Dew committed
228
    <row>
229 230 231 232
      <entry>
num_colormap_conflicts: CARD16
      </entry>
    </row>
Matt Dew's avatar
Matt Dew committed
233
    <row>
234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289
      <entry>
colormap_conflicts: LISTofVISUALID]
      </entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>

<itemizedlist>
  <listitem>
    <para>
level is 0 for normal planes, &gt; 0 for overlays, &lt; 0 for underlays.
    </para>
  </listitem>
  <listitem>
    <para>
transparency_type is 0 for none, 1 for transparent pixel, 2 for
transparent mask.
    </para>
  </listitem>
  <listitem>
    <para>
transparency_value: value to get transparent pixel if transparency
supported.
    </para>
  </listitem>
  <listitem>
    <para>
min_hw_colormaps: minimum number of hardware colormaps backing up the
visual.
    </para>
  </listitem>
  <listitem>
    <para>
max_hw_colormaps: maximum number of hardware colormaps backing up the
visual.
    </para>
    <para>
    (architectures with static colormap allocation/reallocation would have min
= max)
    </para>
  </listitem>
  <listitem>
    <para>
num_colormap_conflicts: number of elements in colormap_conflicts.
    </para>
  </listitem>
  <listitem>
    <para>
colormap_conflicts: list of visuals that may conflict with this one. For
example, if a 12-bit colormap is overloaded to support 8-bit visuals, the
8-bit visuals would conflict with the 12-bit visuals.
    </para>
  </listitem>
</itemizedlist>

290 291
</chapter>
<chapter id="Events_and_Errors">
292 293 294 295
<title>Events and Errors</title>
<para>
No new events or errors are defined by this extension.
</para>
296
</chapter>
297

298
<chapter id='Changes_to_existing_protocol'>
299 300 301 302
<title>Changes to existing protocol.</title>
<para>
None.
</para>
303
</chapter>
304

305
<chapter id="Encoding">
306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362
<title>Encoding</title>
<para>
The name of this extension is "Extended-Visual-Information".
</para>

<para>
The conventions used here are the same as those for the core X11
Protocol Encoding.
</para>

<literallayout class="monospaced">
<function>GetVersion</function>
     1     CARD8               opcode
     1     0                   EVI opcode
     2     2                   request length
     2     CARD16              client_major_version
     2     CARD16              client_minor_version
=&gt;
     1     1                   reply
     1                         unused
     2     CARD16              sequence number
     4     0                   length
     2     CARD16              server_major_version
     2     CARD16              server_minor_version
     20                        unused
</literallayout>

<literallayout class="monospaced">
<function>GetVisualInfo</function>
     1     CARD8               opcode
     1     1                   EVI opcode
     2     2+n                 request length
     4     CARD32              n_visual
     4n    CARD32              visual_ids
=&gt;
     1     1                   reply
     1                         unused
     2     CARD16              sequence number
     4     n                   length
     4     CARD32              n_info
     4     CARD32              n_conflicts
     16                        unused
     16n   LISTofVISUALINFO    items
</literallayout>

<literallayout class="monospaced">
VISUALINFO
     4     VisualID            core_visual_id
     1     INT8                screen
     1     INT8                level
     1     CARD8               transparency_type
     1     CARD8               unused
     4     CARD32              transparency_value
     1     CARD8               min_hw_colormaps
     1     CARD8               max_hw_colormaps
     2     CARD16              num_colormap_conflicts
</literallayout>
363
</chapter>
364

365
<chapter id="C_Language_Binding">
366 367 368 369 370 371 372 373 374 375 376 377 378 379 380
<title>C Language Binding</title>
<para>
<!-- .LP -->
The C functions provide direct access to the protocol and add no additional
semantics.  For complete details on the effects of these functions, refer
to the appropriate protocol request, which can be derived by deleting Xevi
at the start of the function. All functions that have return type Status
will return nonzero for success and zero for failure.
</para>

<para>
The include file for this extension is:
<function>&lt; X11/extensions/XEVI.h&gt;</function>.
</para>

381
<funcsynopsis id='XeviQueryVersion'>
382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439
<funcprototype>
  <funcdef>Bool <function> XeviQueryVersion</function></funcdef>
  <paramdef>Display<parameter> *display</parameter></paramdef>
  <paramdef>int<parameter> *major_version_return</parameter></paramdef>
  <paramdef>int<parameter> *minor_version_return</parameter></paramdef>
</funcprototype>
</funcsynopsis>

<variablelist>
  <varlistentry>
    <term>
      <emphasis remap='I'>display</emphasis>
    </term>
    <listitem>
      <para>
Specifies the connection to the X server.
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <emphasis remap='I'>major_version_return</emphasis>
    </term>
    <listitem>
      <para>
Returns the major version supported by the server.
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <emphasis remap='I'>minor_version_return</emphasis>
    </term>
    <listitem>
      <para>
Returns the minor version supported by the server.
    </para>
  </listitem>
  </varlistentry>
</variablelist>

<para>
XeviQueryVersion sets major_version_return and minor_version_return to
the major and minor EVI protocol version supported by the server.  If
the EVI library is compatible with the version returned by the server,
it returns nonzero.  If dpy does not support the EVI extension, or if
there was an error during communication with the server, or if the server
and library protocol versions are incompatible, it returns zero.  No other
Xevi functions may be called before this function. If a client violates
this rule, the effects of all subsequent Xevi calls that it makes are
undefined.
</para>

<para>
To get the extended information for any subset of visuals use
XeviGetVisualInfo.
</para>

440
<funcsynopsis id='XeviGetVisualInfo'>
441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519
<funcprototype>
  <funcdef>int <function> XeviGetVisualInfo</function></funcdef>
  <paramdef>Display<parameter> *display</parameter></paramdef>
  <paramdef>VisualID<parameter> *visual</parameter></paramdef>
  <paramdef>int<parameter> n_visual</parameter></paramdef>
  <paramdef>ExtendedVisualInfo<parameter> **evi_return</parameter></paramdef>
  <paramdef>int<parameter> *n_info_return</parameter></paramdef>
</funcprototype>
</funcsynopsis>

<variablelist>
  <varlistentry>
    <term>
      <emphasis remap='I'>display</emphasis>
    </term>
    <listitem>
      <para>
Specifies the connection to the X server.
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <emphasis remap='I'>visual</emphasis>
    </term>
    <listitem>
      <para>
If NULL, then information for all visuals of all
screens is returned. Otherwise, a pointer to a list of visuals for which
extended visual information is desired.
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <emphasis remap='I'>n_visual</emphasis>
    </term>
    <listitem>
      <para>
If 0, then information for all visuals of all screens is returned. Otherwise,
the number of elements in the array <emphasis remap='I'>visual</emphasis>.
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <emphasis remap='I'>evi_return</emphasis>
    </term>
    <listitem>
      <para>
Returns a pointer to a list of <emphasis remap='I'>ExtendedVisualInfo</emphasis>. When done, the client
should free the list using <emphasis remap='I'>XFree</emphasis>.
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <emphasis remap='I'>n_info_return</emphasis>
    </term>
    <listitem>
      <para>
Returns the number of elements in the list of
<emphasis remap='I'>ExtendedVisualInfo</emphasis>.
    </para>
  </listitem>
  </varlistentry>
</variablelist>

<para>
XeviGetVisualInfo returns a list of ExtendedVisualInfo structures that describe
visual information beyond that supported by the core protocol. This includes
layer information relevant for systems supporting overlays and/or underlay
planes, and information that allows applications better to determine the level
of hardware support for multiple colormaps. XeviGetVisualInfo returns Success
if successful, or an X error otherwise.
</para>

</chapter>
</book>