[Xcb] documentation

Vincent Torri vtorri at univ-evry.fr
Sat Apr 19 22:28:02 PDT 2008


Hey,

> Now that we have the python generator (sweeeeeet)... do you have the
> doxygen proposal hiding anywhere?  I can't seem to find it.

I've attached the protocol, xml and diff files of the sync extension. I 
have not documented entirely the protocol, but it should be sufficient.

Vincent
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sync.ps.gz
Type: application/octet-stream
Size: 104845 bytes
Desc: 
Url : http://lists.freedesktop.org/archives/xcb/attachments/20080420/e5821791/attachment-0001.obj 
-------------- next part --------------
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2004 Mikko Torni and Josh Triplett.
All Rights Reserved.  See the file COPYING in this directory
for licensing information.
-->
<xcb header="sync" extension-xname="SYNC" extension-name="Sync"
    major-version="3" minor-version="0">
  <import>xproto</import>

  <xidtype name="ALARM" />

  <enum name="ALARMSTATE">
    <doc>
      <brief>
      The ALARMSTATE type describe the state of an alarm.
      </brief>
      <detailed>
      The ALARMSTATE type describe the state of an alarm.
      </detailed>
    </doc>
    <item name="Active" doc="The alarm is active." />
    <item name="Inactive" doc="The alarm is inactive." />
    <item name="Destroyed" doc="The alarm is destroyed." />
  </enum>

  <xidtype name="COUNTER" />

  <enum name="TESTTYPE">
    <item name="PositiveTransition" />
    <item name="NegativeTransition" />
    <item name="PositiveComparison" />
    <item name="NegativeComparison" />
  </enum>

  <enum name="VALUETYPE">
    <item name="Absolute" />
    <item name="Relative" />
  </enum>

  <enum name="CA">
    <item name="Counter">  <bit>0</bit></item>
    <item name="ValueType"><bit>1</bit></item>
    <item name="Value">    <bit>2</bit></item>
    <item name="TestType"> <bit>3</bit></item>
    <item name="Delta">    <bit>4</bit></item>
    <item name="Events">   <bit>5</bit></item>
  </enum>

  <struct name="INT64">
    <field type="INT32" name="hi" />
    <field type="CARD32" name="lo" />
  </struct>

  <struct name="SYSTEMCOUNTER">
    <doc>
      <brief>
      The SYSTEMCOUNTER type provides the client with information
      about a System Counter.
      </brief>
      <detailed>
      The SYSTEMCOUNTER type provides the client with information
      about a System Counter. The name field is the textual name of
      the counter that identifies the counter to the client. The
      counter field is the client-side handle that should be used in
      requests that require a counter. The resolution field gives the
      approximate step size of the system counter. This is a hint to
      the client that the extension may not be able to resolve two
      wait conditions with test values that differ by less than this
      step size. A microsecond clock, for example, may advance in
      steps of 64 microseconds, so a counter based on this clock would
      have a resolution of 64.

      The only system counter that is guaranteed to be present is
      called SERVERTIME, which counts milliseconds from some arbitrary
      starting point. The least significant 32 bits of this counter
      track the value of Time used by the server in Events and
      Requests. Other system counters may be provided by different
      implementations of the extension. The X Consortium will maintain
      a registry of system counter names to avoid collisions in the
      name space.
      </detailed>
    </doc>
    <field type="COUNTER" name="counter" doc="The counter." />
    <field type="INT64" name="resolution" />
    <field type="CARD16" name="name_len" doc="The length of the name of the counter" />
    <list type="CARD8" name="name" doc=" The textual name of the counter" >
      <fieldref>name_len</fieldref>
    </list>
  </struct>

  <struct name="TRIGGER">
    <field type="COUNTER" name="counter" />
    <field type="VALUETYPE" name="wait_type" />
    <field type="INT64" name="wait_value" />
    <field type="TESTTYPE" name="test_type" />
  </struct>

  <struct name="WAITCONDITION">
    <doc>
      <brief>
      The WAITCONDITION type is simply a trigger with an associated
      event-threshold.
      </brief>
      <detailed>
      The WAITCONDITION type is simply a trigger with an associated
      event-threshold. The event threshold is used by the Await
      request to decide whether or not to generate an event to the
      client after the trigger has become TRUE. By setting the
      event-threshold to an appropriate value, it is possible to
      detect the situation where an Await request was processed after
      the TRIGGER became TRUE, which usually indicates that the server
      is not processing requests as fast as the client expects.
      </detailed>
    </doc>
    <field type="TRIGGER" name="trigger" doc="The trigger." />
    <field type="INT64" name="event_threshold" doc="The event threshold." />
  </struct>

  <error name="Counter" number="0">
    <field type="CARD32" name="bad_counter" />
    <field type="CARD16" name="minor_opcode" />
    <field type="CARD8" name="major_opcode" />
    <doc>
    This error is generated if the value for a COUNTER argument in a
    request does not name a defined COUNTER.
    </doc>
  </error>

  <error name="Alarm" number="1">
    <field type="CARD32" name="bad_alarm" />
    <field type="CARD16" name="minor_opcode" />
    <field type="CARD8" name="major_opcode" />
    <doc>
    This error is generated if the value for an ALARM argument in a
    request does not name a defined ALARM.
    </doc>
  </error>

  <request name="Initialize" opcode="0">
    <doc>
      <brief>
      This request takes the version number of the extension that the
      client wishes to use and returns the actual version number being
      implemented by the extension for this client.
      </brief>
      <detailed>
      This request must be executed before any other requests for this
      extension.  If a client violates this rule, the results of all
      SYNC requests that it issues are undefined.  The request takes
      the version number of the extension that the client wishes to
      use and returns the actual version number being implemented by
      the extension for this client. The extension may return
      different version numbers to a client depending of the version
      number supplied by that client. This request should be executed
      only once for each client connection.

      Given two different versions of the SYNC protocol, v1 and v2, v1
      is compatible with v2 if and only if @a v1.version_major =
      @a v2.version_major and @a v1.version\_minor <=
      @a v2.version_minor.  Compatible means that the functionality is
      fully supported in an identical fashion in the two versions.

      This document describes major version 3, minor version 0 of the
      SYNC protocol.
      </detailed>
    </doc>
    <reply>
      <pad bytes="1" />
      <field type="CARD8" name="major_version" doc="major versions of the SYNC protocol" />
      <field type="CARD8" name="minor_version" doc="minor versions of the SYNC protocol" />
    </reply>
  </request>

  <request name="ListSystemCounters" opcode="1">
    <doc>
      <brief>
      This request returns a list of all the system counters that are
      available at the time the request is executed.
      </brief>
      <detailed>
      This request returns a list of all the system counters that are
      available at the time the request is executed, which includes
      the system counters that are maintained by other extensions. The
      list returned by this request may change as counters are created
      and destroyed by other extensions.
      </detailed>
    </doc>
    <reply>
      <pad bytes="1" />
      <field type="CARD32" name="counters_len" doc="The counters count" />
      <pad bytes="20" />
      <list type="SYSTEMCOUNTER" name="counters" doc="the list of counters">
        <fieldref>counters_len</fieldref>
      </list>
    </reply>
    <error code="11" name="Alloc" />
  </request>

  <request name="CreateCounter" opcode="2">
    <doc>
      <brief>
      </brief>
      <detailed>
      This request creates a counter and assigns the specified id to
      it. The counter value is initialized to the specified
      initial-value and there are no clients waiting on the counter.
      </detailed>
    </doc>
    <field type="COUNTER" name="id" doc="The id of the counter" />
    <field type="INT64" name="initial_value" doc="The initial value of the counter" />
    <error code="11" name="Alloc" />
    <error code="14" name="IDChoice" />
  </request>

  <request name="DestroyCounter" opcode="6">
    <doc>
      <brief>
      This request destroys the given counter.
      </brief>
      <detailed>
      This request destroys the given counter and sets the counter
      fields for all triggers that specify this counter to
      @c None. All clients waiting on the counter are released and a
      CounterNotify event with the destroyed field set to TRUE is sent
      to each waiting client, regardless of the event-threshold.  All
      alarms specifying the counter become @c Inactive and an
      AlarmNotify event with a state field of @c Inactive is
      generated. A counter is destroyed automatically when the
      connection to the creating client is closed down if the
      close-down mode is @c Destroy. An Access error is generated if
      counter is a system counter. A Counter error is generated if
      counter does not name a valid counter.
      </detailed>
    </doc>
    <field type="COUNTER" name="counter" doc="The counter to destroy" />
    <error code="0" name="Counter" />
    <error code="10" name="Access" />
  </request>

  <request name="QueryCounter" opcode="5">
    <doc>
      <brief>
      This request returns the current value of the given counter.
      </brief>
      <detailed>
      This request returns the current value of the given counter or
      generates a Counter error if counter does not name a valid
      counter.
      </detailed>
    </doc>
    <field type="COUNTER" name="counter" doc="The counter" />
    <reply>
      <pad bytes="1" />
      <field type="INT64" name="counter_value" doc="The value of the counter" />
    </reply>
    <error code="0" name="Counter" />
  </request>

  <request name="Await" opcode="7">
    <doc>
      <brief>
      </brief>
      <detailed>
      </detailed>
    </doc>
    <list type="WAITCONDITION" name="wait_list" />
  </request>

  <request name="ChangeCounter" opcode="4">
    <doc>
      <brief>
      </brief>
      <detailed>
      </detailed>
    </doc>
    <field type="COUNTER" name="counter" />
    <field type="INT64" name="amount" />
  </request>

  <request name="SetCounter" opcode="3">
    <doc>
      <brief>
      </brief>
      <detailed>
      </detailed>
    </doc>
    <field type="COUNTER" name="counter" />
    <field type="INT64" name="value" />
  </request>

  <request name="CreateAlarm" opcode="8">
    <doc>
      <brief>
      </brief>
      <detailed>
      </detailed>
    </doc>
    <field type="ALARM" name="id" />
    <valueparam value-mask-type="CARD32"
                value-mask-name="value_mask"
                value-list-name="value_list" />
  </request>

  <request name="ChangeAlarm" opcode="9">
    <doc>
      <brief>
      </brief>
      <detailed>
      </detailed>
    </doc>
    <field type="ALARM" name="id" />
    <valueparam value-mask-type="CARD32"
                value-mask-name="value_mask"
                value-list-name="value_list" />
  </request>

  <request name="DestroyAlarm" opcode="11">
    <field type="ALARM" name="alarm" />
  </request>

  <request name="QueryAlarm" opcode="10">
    <doc>
      <brief>
      </brief>
      <detailed>
      </detailed>
    </doc>
    <field type="ALARM" name="alarm" />
    <reply>
      <pad bytes="1" />
      <field type="TRIGGER" name="trigger" />
      <field type="INT64" name="delta" />
      <field type="BOOL" name="events" />
      <field type="ALARMSTATE" name="state" />
    </reply>
  </request>

  <request name="SetPriority" opcode="12">
    <doc>
      <brief>
      </brief>
      <detailed>
      </detailed>
    </doc>
    <field type="CARD32" name="id" />
    <field type="INT32" name="priority" />
  </request>

  <request name="GetPriority" opcode="13">
    <doc>
      <brief>
      </brief>
      <detailed>
      </detailed>
    </doc>
    <field type="CARD32" name="id" />
    <reply>
      <pad bytes="1" />
      <field type="INT32" name="priority" />
    </reply>
  </request>

  <event name="CounterNotify" number="0">
    <doc>
    CounterNotify events may be generated when a client becomes
    unblocked after an Await request has been processed. The
    wait-value is the value being waited for, and counter-value is the
    actual value of the counter at the time the event was
    generated. The destroyed flag is TRUE if this request was
    generated as the result of the destruction of the counter and
    FALSE otherwise. The time is the server time at which the event
    was generated.

    When a client is unblocked, all the CounterNotify events for the
    Await request are generated contiguously. If count is 0, there are
    no more events to follow for this request. If count is @e n, there
    are at least @e n more events to follow.
    </doc>
    <field type="CARD8" name="kind" />
    <field type="COUNTER" name="counter" doc="The counter." />
    <field type="INT64" name="wait_value" doc="The value being waited for." />
    <field type="INT64" name="counter_value" doc="The actual value of the counter." />
    <field type="TIMESTAMP" name="timestamp" doc="The server time." />
    <field type="CARD16" name="count" doc="The events count." />
    <field type="BOOL" name="destroyed" doc="TRUE if this request was generated as the result of the destruction of the counter and FALSE otherwise." />
  </event>

  <event name="AlarmNotify" number="1">
    <doc>
    An AlarmNotify event is generated when an alarm is
    triggered. alarm-value is the test value of the trigger in the
    alarm when it was triggered, counter-value is the value of the
    counter that triggered the alarm, and time is the server time at
    which the event was generated. The state is the new state of the
    alarm. If state is @c Inactive, no more events will be generated
    by this alarm until a ChangeAlarm request is executed, the alarm
    is destroyed, or the counter for the alarm is destroyed.
    </doc>
    <field type="CARD8" name="kind" />
    <field type="ALARM" name="alarm" doc="The alarm." />
    <field type="INT64" name="counter_value" doc="The value of the counter." />
    <field type="INT64" name="alarm_value" doc="The test value of the trigger." />
    <field type="TIMESTAMP" name="timestamp" doc="The server time." />
  </event>
</xcb>
-------------- next part --------------
diff --git a/src/sync.xml b/src/sync.xml
index 74281f1..bc34232 100644
--- a/src/sync.xml
+++ b/src/sync.xml
@@ -11,9 +11,17 @@ for licensing information.
   <xidtype name="ALARM" />
 
   <enum name="ALARMSTATE">
-    <item name="Active" />
-    <item name="Inactive" />
-    <item name="Destroyed" />
+    <doc>
+      <brief>
+      The ALARMSTATE type describe the state of an alarm.
+      </brief>
+      <detailed>
+      The ALARMSTATE type describe the state of an alarm.
+      </detailed>
+    </doc>
+    <item name="Active" doc="The alarm is active." />
+    <item name="Inactive" doc="The alarm is inactive." />
+    <item name="Destroyed" doc="The alarm is destroyed." />
   </enum>
 
   <xidtype name="COUNTER" />
@@ -45,10 +53,38 @@ for licensing information.
   </struct>
 
   <struct name="SYSTEMCOUNTER">
-    <field type="COUNTER" name="counter" />
+    <doc>
+      <brief>
+      The SYSTEMCOUNTER type provides the client with information
+      about a System Counter.
+      </brief>
+      <detailed>
+      The SYSTEMCOUNTER type provides the client with information
+      about a System Counter. The name field is the textual name of
+      the counter that identifies the counter to the client. The
+      counter field is the client-side handle that should be used in
+      requests that require a counter. The resolution field gives the
+      approximate step size of the system counter. This is a hint to
+      the client that the extension may not be able to resolve two
+      wait conditions with test values that differ by less than this
+      step size. A microsecond clock, for example, may advance in
+      steps of 64 microseconds, so a counter based on this clock would
+      have a resolution of 64.
+
+      The only system counter that is guaranteed to be present is
+      called SERVERTIME, which counts milliseconds from some arbitrary
+      starting point. The least significant 32 bits of this counter
+      track the value of Time used by the server in Events and
+      Requests. Other system counters may be provided by different
+      implementations of the extension. The X Consortium will maintain
+      a registry of system counter names to avoid collisions in the
+      name space.
+      </detailed>
+    </doc>
+    <field type="COUNTER" name="counter" doc="The counter." />
     <field type="INT64" name="resolution" />
-    <field type="CARD16" name="name_len" />
-    <list type="CARD8" name="name">
+    <field type="CARD16" name="name_len" doc="The length of the name of the counter" />
+    <list type="CARD8" name="name" doc=" The textual name of the counter" >
       <fieldref>name_len</fieldref>
     </list>
   </struct>
@@ -61,73 +97,205 @@ for licensing information.
   </struct>
 
   <struct name="WAITCONDITION">
-    <field type="TRIGGER" name="trigger" />
-    <field type="INT64" name="event_threshold" />
+    <doc>
+      <brief>
+      The WAITCONDITION type is simply a trigger with an associated
+      event-threshold.
+      </brief>
+      <detailed>
+      The WAITCONDITION type is simply a trigger with an associated
+      event-threshold. The event threshold is used by the Await
+      request to decide whether or not to generate an event to the
+      client after the trigger has become TRUE. By setting the
+      event-threshold to an appropriate value, it is possible to
+      detect the situation where an Await request was processed after
+      the TRIGGER became TRUE, which usually indicates that the server
+      is not processing requests as fast as the client expects.
+      </detailed>
+    </doc>
+    <field type="TRIGGER" name="trigger" doc="The trigger." />
+    <field type="INT64" name="event_threshold" doc="The event threshold." />
   </struct>
 
   <error name="Counter" number="0">
     <field type="CARD32" name="bad_counter" />
     <field type="CARD16" name="minor_opcode" />
     <field type="CARD8" name="major_opcode" />
+    <doc>
+    This error is generated if the value for a COUNTER argument in a
+    request does not name a defined COUNTER.
+    </doc>
   </error>
 
   <error name="Alarm" number="1">
     <field type="CARD32" name="bad_alarm" />
     <field type="CARD16" name="minor_opcode" />
     <field type="CARD8" name="major_opcode" />
+    <doc>
+    This error is generated if the value for an ALARM argument in a
+    request does not name a defined ALARM.
+    </doc>
   </error>
-    
+
   <request name="Initialize" opcode="0">
+    <doc>
+      <brief>
+      This request takes the version number of the extension that the
+      client wishes to use and returns the actual version number being
+      implemented by the extension for this client.
+      </brief>
+      <detailed>
+      This request must be executed before any other requests for this
+      extension.  If a client violates this rule, the results of all
+      SYNC requests that it issues are undefined.  The request takes
+      the version number of the extension that the client wishes to
+      use and returns the actual version number being implemented by
+      the extension for this client. The extension may return
+      different version numbers to a client depending of the version
+      number supplied by that client. This request should be executed
+      only once for each client connection.
+
+      Given two different versions of the SYNC protocol, v1 and v2, v1
+      is compatible with v2 if and only if @a v1.version_major =
+      @a v2.version_major and @a v1.version\_minor <=
+      @a v2.version_minor.  Compatible means that the functionality is
+      fully supported in an identical fashion in the two versions.
+
+      This document describes major version 3, minor version 0 of the
+      SYNC protocol.
+      </detailed>
+    </doc>
     <reply>
       <pad bytes="1" />
-      <field type="CARD8" name="major_version" />
-      <field type="CARD8" name="minor_version" />
+      <field type="CARD8" name="major_version" doc="major versions of the SYNC protocol" />
+      <field type="CARD8" name="minor_version" doc="minor versions of the SYNC protocol" />
     </reply>
   </request>
 
   <request name="ListSystemCounters" opcode="1">
+    <doc>
+      <brief>
+      This request returns a list of all the system counters that are
+      available at the time the request is executed.
+      </brief>
+      <detailed>
+      This request returns a list of all the system counters that are
+      available at the time the request is executed, which includes
+      the system counters that are maintained by other extensions. The
+      list returned by this request may change as counters are created
+      and destroyed by other extensions.
+      </detailed>
+    </doc>
     <reply>
       <pad bytes="1" />
-      <field type="CARD32" name="counters_len" />
+      <field type="CARD32" name="counters_len" doc="The counters count" />
       <pad bytes="20" />
-      <list type="SYSTEMCOUNTER" name="counters">
+      <list type="SYSTEMCOUNTER" name="counters" doc="the list of counters">
         <fieldref>counters_len</fieldref>
       </list>
     </reply>
+    <error code="11" name="Alloc" />
   </request>
 
   <request name="CreateCounter" opcode="2">
-    <field type="COUNTER" name="id" />
-    <field type="INT64" name="initial_value" />
+    <doc>
+      <brief>
+      </brief>
+      <detailed>
+      This request creates a counter and assigns the specified id to
+      it. The counter value is initialized to the specified
+      initial-value and there are no clients waiting on the counter.
+      </detailed>
+    </doc>
+    <field type="COUNTER" name="id" doc="The id of the counter" />
+    <field type="INT64" name="initial_value" doc="The initial value of the counter" />
+    <error code="11" name="Alloc" />
+    <error code="14" name="IDChoice" />
   </request>
 
   <request name="DestroyCounter" opcode="6">
-    <field type="COUNTER" name="counter" />
+    <doc>
+      <brief>
+      This request destroys the given counter.
+      </brief>
+      <detailed>
+      This request destroys the given counter and sets the counter
+      fields for all triggers that specify this counter to
+      @c None. All clients waiting on the counter are released and a
+      CounterNotify event with the destroyed field set to TRUE is sent
+      to each waiting client, regardless of the event-threshold.  All
+      alarms specifying the counter become @c Inactive and an
+      AlarmNotify event with a state field of @c Inactive is
+      generated. A counter is destroyed automatically when the
+      connection to the creating client is closed down if the
+      close-down mode is @c Destroy. An Access error is generated if
+      counter is a system counter. A Counter error is generated if
+      counter does not name a valid counter.
+      </detailed>
+    </doc>
+    <field type="COUNTER" name="counter" doc="The counter to destroy" />
+    <error code="0" name="Counter" />
+    <error code="10" name="Access" />
   </request>
 
   <request name="QueryCounter" opcode="5">
-    <field type="COUNTER" name="counter" />
+    <doc>
+      <brief>
+      This request returns the current value of the given counter.
+      </brief>
+      <detailed>
+      This request returns the current value of the given counter or
+      generates a Counter error if counter does not name a valid
+      counter.
+      </detailed>
+    </doc>
+    <field type="COUNTER" name="counter" doc="The counter" />
     <reply>
       <pad bytes="1" />
-      <field type="INT64" name="counter_value" />
+      <field type="INT64" name="counter_value" doc="The value of the counter" />
     </reply>
+    <error code="0" name="Counter" />
   </request>
 
   <request name="Await" opcode="7">
+    <doc>
+      <brief>
+      </brief>
+      <detailed>
+      </detailed>
+    </doc>
     <list type="WAITCONDITION" name="wait_list" />
   </request>
 
   <request name="ChangeCounter" opcode="4">
+    <doc>
+      <brief>
+      </brief>
+      <detailed>
+      </detailed>
+    </doc>
     <field type="COUNTER" name="counter" />
     <field type="INT64" name="amount" />
   </request>
 
   <request name="SetCounter" opcode="3">
+    <doc>
+      <brief>
+      </brief>
+      <detailed>
+      </detailed>
+    </doc>
     <field type="COUNTER" name="counter" />
     <field type="INT64" name="value" />
   </request>
 
   <request name="CreateAlarm" opcode="8">
+    <doc>
+      <brief>
+      </brief>
+      <detailed>
+      </detailed>
+    </doc>
     <field type="ALARM" name="id" />
     <valueparam value-mask-type="CARD32"
                 value-mask-name="value_mask"
@@ -135,6 +303,12 @@ for licensing information.
   </request>
 
   <request name="ChangeAlarm" opcode="9">
+    <doc>
+      <brief>
+      </brief>
+      <detailed>
+      </detailed>
+    </doc>
     <field type="ALARM" name="id" />
     <valueparam value-mask-type="CARD32"
                 value-mask-name="value_mask"
@@ -146,6 +320,12 @@ for licensing information.
   </request>
 
   <request name="QueryAlarm" opcode="10">
+    <doc>
+      <brief>
+      </brief>
+      <detailed>
+      </detailed>
+    </doc>
     <field type="ALARM" name="alarm" />
     <reply>
       <pad bytes="1" />
@@ -157,11 +337,23 @@ for licensing information.
   </request>
 
   <request name="SetPriority" opcode="12">
+    <doc>
+      <brief>
+      </brief>
+      <detailed>
+      </detailed>
+    </doc>
     <field type="CARD32" name="id" />
     <field type="INT32" name="priority" />
   </request>
-    
+
   <request name="GetPriority" opcode="13">
+    <doc>
+      <brief>
+      </brief>
+      <detailed>
+      </detailed>
+    </doc>
     <field type="CARD32" name="id" />
     <reply>
       <pad bytes="1" />
@@ -170,20 +362,45 @@ for licensing information.
   </request>
 
   <event name="CounterNotify" number="0">
+    <doc>
+    CounterNotify events may be generated when a client becomes
+    unblocked after an Await request has been processed. The
+    wait-value is the value being waited for, and counter-value is the
+    actual value of the counter at the time the event was
+    generated. The destroyed flag is TRUE if this request was
+    generated as the result of the destruction of the counter and
+    FALSE otherwise. The time is the server time at which the event
+    was generated.
+
+    When a client is unblocked, all the CounterNotify events for the
+    Await request are generated contiguously. If count is 0, there are
+    no more events to follow for this request. If count is @e n, there
+    are at least @e n more events to follow.
+    </doc>
     <field type="CARD8" name="kind" />
-    <field type="COUNTER" name="counter" />
-    <field type="INT64" name="wait_value" />
-    <field type="INT64" name="counter_value" />
-    <field type="TIMESTAMP" name="timestamp" />
-    <field type="CARD16" name="count" />
-    <field type="BOOL" name="destroyed" />
+    <field type="COUNTER" name="counter" doc="The counter." />
+    <field type="INT64" name="wait_value" doc="The value being waited for." />
+    <field type="INT64" name="counter_value" doc="The actual value of the counter." />
+    <field type="TIMESTAMP" name="timestamp" doc="The server time." />
+    <field type="CARD16" name="count" doc="The events count." />
+    <field type="BOOL" name="destroyed" doc="TRUE if this request was generated as the result of the destruction of the counter and FALSE otherwise." />
   </event>
 
   <event name="AlarmNotify" number="1">
+    <doc>
+    An AlarmNotify event is generated when an alarm is
+    triggered. alarm-value is the test value of the trigger in the
+    alarm when it was triggered, counter-value is the value of the
+    counter that triggered the alarm, and time is the server time at
+    which the event was generated. The state is the new state of the
+    alarm. If state is @c Inactive, no more events will be generated
+    by this alarm until a ChangeAlarm request is executed, the alarm
+    is destroyed, or the counter for the alarm is destroyed.
+    </doc>
     <field type="CARD8" name="kind" />
-    <field type="ALARM" name="alarm" />
-    <field type="INT64" name="counter_value" />
-    <field type="INT64" name="alarm_value" />
-    <field type="TIMESTAMP" name="timestamp" />
+    <field type="ALARM" name="alarm" doc="The alarm." />
+    <field type="INT64" name="counter_value" doc="The value of the counter." />
+    <field type="INT64" name="alarm_value" doc="The test value of the trigger." />
+    <field type="TIMESTAMP" name="timestamp" doc="The server time." />
   </event>
 </xcb>


More information about the Xcb mailing list