Commit graph

279 commits

Author SHA1 Message Date
Daniel Martin
0f3a98cc62 xinput: Add XI v2.0
Introduced with v2.0 have been various new types, structures, 21
requests and 12 XGE events.

All new requests have the "XI" prefix in the name. This prefix can be
found in the spec too and avoids name clashes with requests found in
prior versions of XI (at least that's (Un)GrabDevice).

All new events are X Generic Events. They've a different header then
"normal" events. Therefor we've to mark them with the attribute 'xge'
set to 'true'.

To prevent another name clash one new structure had to be prefixed,
too: XIDeviceInfo.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
2013-08-15 00:00:52 +02:00
Daniel Martin
bd070c5a51 xinput: Add XI v1.5
New:
- Requests
  * ListDeviceProperties
  * ChangeDeviceProperty
  * DeleteDeviceProperty
  * GetDeviceProperty

- Enum
  * PropertyFormat

- Event
  * DevicePropertyNotify

The requests ChangeDeviceProperty and GetDeviceProperty use switches to
return a list depending on the format (8bit, 16bit and 32bit) of the
property value.
We reuse the <bitcase> here. Which is possible, because the format
values don't have equal bits. But, this is rather a hack and must be
changed when the value test (a <case>) for switches is implemented.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
2013-08-15 00:00:52 +02:00
Daniel Martin
4fce9448b6 xinput: Cleanup implementation of XI up to v1.4
- Structural changes:
  * indent with spaces only (replaced tabs)
  * indent attributes
  * move structures in front of the first request using it
    (Otherwise c_client.py would generate uncompileable code if we fix
     the uninterpreted lists.)
  * add version-controlled section comments (types, requests, events,
    errors) and move structures into their corresponding section
  * sort events and eventcopys by number

- Additions:
  * add various missing enums and structs (i.e. DeviceChange,
    DeviceControl, DeviceName, ...)
  * uncomment commented out requests
  * linked in various enums into fields (via enum or altenum)

- Other changes:
  * link to the txt specification in the git repo
  * fixed comments for "uninterpreted lists"

- API CHANGES:
  * Request: GetDeviceMotionEvents
    The reply contains a list of events (of coordinates). So, we rename
    num_coords to num_events. The field is called nevents_return in the
    specification. The list was commented out anyways, so the rename
    shouldn't affect that much.
  * Request: SendExtensionEvent
    The list 'events' is a mask, make it a CARD8 like every other mask.
  * Events: FocusIn/Out
    Those ones haven't been named properly. They are called
    DeviceFocusIn/Out in the specification. In XI2 the names FocusIn/Out
    are used to introduce new events and cause name clashes. So, we have
    to rename the existing FocusIn/Out and give them their proper names.
  * Structures: *Feedback{Ctl,State}
    Rename the field id to feedback_id, as it's called in the spec. The
    only lists using those structs are commented out yet. So, this might
    not be called an api break.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
2013-08-15 00:00:52 +02:00
Daniel Martin
56a82005ac Add support for X Generic Extension events
With these patches, we are able to mark an XGE event as such and
generate the correct header for it.

XGE events can be found in the X Input Extension v2++.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Harris <pharris@opentext.com>
2013-07-12 15:54:14 -04:00
Louis-Francis Ratté-Boulianne
e6a246e50e sync: Change value list param of CreateAlarm and ChangeAlarm into switch
Values for "Value" and "Delta" fields are 64-bit that couldn't be passed through a regular value list/mask.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Signed-off-by: Peter Harris <pharris@opentext.com>
2013-07-03 19:02:41 -04:00
Daniel Martin
e5f7c75081 res: Add ClientIdMask enum
And make use of it in ClientIdSpec.

v2: use <bit/> instead of <value/> in the enum

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Signed-off-by: Peter Harris <pharris@opentext.com>
2013-06-06 16:13:52 -04:00
Daniel Martin
5802c6a0f9 res: Fix and rename list in ClientIdValue
The list is a CARD32 and rename the field to "value" to match the
specification.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Signed-off-by: Peter Harris <pharris@opentext.com>
2013-06-06 16:13:52 -04:00
Daniel Martin
45d8361e59 randr: Add provider object support (RandR v1.4)
With RandR 1.4 provider objects have been introduced. "A provider object
represents a GPU or virtual device providing services to the X server."

To handle provider objects the following requests have been added:
    - GetProviders
    - GetProviderInfo
    - SetProviderOffloadSink
    - SetProviderOutputSource
    - ListProviderProperties
    - QueryProviderProperty
    - ConfigureProviderProperty
    - ChangeProviderProperty
    - DeleteProviderProperty
    - GetProviderProperty

And the Notify event got 3 new subcodes:
    - ProviderChange
    - ProviderProperty
    - ResourceChange

v2:
- add missing name field to GetProviderInfo
v3:
- changed ProviderCapability enum
  o replaced <value> with <bit>
  o removed None
- replaced "alignment pad list" with commented out <pad align="4"/> to
  be prepared for future enhancements
- add brief description to commit msg about additions

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Signed-off-by: Peter Harris <pharris@opentext.com>
2013-06-06 16:13:52 -04:00
Daniel Martin
5f1fb6ab6b xtest: Version bump 2.1..2.2
The implemented and upstream version is 2.2.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Signed-off-by: Peter Harris <pharris@opentext.com>
2013-06-06 16:13:52 -04:00
Daniel Martin
a2d4c41cbb glx: Version bump 1.3..1.4
Add the BufferSwapComplete (v2) event.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Signed-off-by: Peter Harris <pharris@opentext.com>
2013-06-06 16:13:52 -04:00
Daniel Martin
f206ca3bea composite: Version bump 0.3..0.4
The only difference between version 0.3 and 0.4 is that the clipping
semantics have been redefined. That's just an internal change, no
structure has to be modified.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Signed-off-by: Peter Harris <pharris@opentext.com>
2013-06-06 16:13:52 -04:00
Daniel Martin
8c85be5392 xfixes: Rename enum DirectionMask to BarrierDirec.
Rename the enum 'DirectionMask' to 'BarrierDirections' to match the
specification.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Signed-off-by: Peter Harris <pharris@opentext.com>
2013-06-06 16:13:52 -04:00
Mark Witmer
bdfedfa57a XKB: Correct enum to mask
Changes fields with enums EventType, MapPart, or BoolCtrl to use them as
masks instead.
2013-05-30 11:22:13 -04:00
Daniel Martin
879c119ff6 screensaver: Use enum and mask attributes
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Signed-off-by: Peter Harris <pharris@opentext.com>
2013-05-27 12:06:13 -04:00
Daniel Martin
a50670c49e screensaver: Remove wrong fields from Notify event
This fixes bug #63158:
    screensaver notify event specification is incorrect
    https://bugs.freedesktop.org/show_bug.cgi?id=63158

As stated in the bug report the response_type and sequence field will be
added automatically while parsing the specification. Additionally, the
pad field is wrong.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Signed-off-by: Peter Harris <pharris@opentext.com>
2013-05-27 12:06:13 -04:00
Erkki Seppälä
e8af4649ba Prototype for XRes v1.2 2013-05-23 13:06:00 -07:00
Daniel Martin
a9a892e9a1 xcbgen: Handle multiple <enumref> in a <bitcase>
Adopt the XML schema change from commit
    ee71d96 Allow multiple <enumref> in a <bitcase>
and its usage with commit
    b3b5e02 XKB: Fix GetKbdByName.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Signed-off-by: Peter Harris <pharris@opentext.com>
2013-05-23 10:51:57 -04:00
Peter Harris
f05f44554f XKB: Fix calculation in GetIndicatorMap
Contrary to the spec, the server doesn't set nIndicators.

Signed-off-by: Peter Harris <pharris@opentext.com>
2013-04-16 14:50:32 -04:00
Peter Harris
b3b5e029e7 XKB: Fix GetKbdByName
Each part of the reply has a fake type, sequence, and length. In
addition, some parts of the reply are encoded only once even when
multiple bits are set.

Signed-off-by: Peter Harris <pharris@opentext.com>
2013-04-16 14:37:05 -04:00
Peter Harris
ee71d96c83 Allow multiple <enumref> in a <bitcase>
Signed-off-by: Peter Harris <pharris@opentext.com>
2013-04-16 14:37:05 -04:00
Peter Harris
63fce1aa1a XKB: Change CARD8 to char where ASCII is expected
This does not impact libxcb, but it makes some pretty-printers prettier.

Signed-off-by: Peter Harris <pharris@opentext.com>
2013-04-16 14:37:05 -04:00
Peter Harris
2ad6d97b39 XKB: Fix VirtualMods
nVModMapKeys is usually larger than <popcount>virtualMods</popcount>.

Signed-off-by: Peter Harris <pharris@opentext.com>
2013-04-16 14:37:05 -04:00
Peter Harris
b6abdad2c2 XKB: Fix SymInterpret
SymInterpret is referenced by the spec, but never defined. Therefore,
the definition of SymInterpret is inferred from the server implementation.

Signed-off-by: Peter Harris <pharris@opentext.com>
2013-04-16 14:37:05 -04:00
Peter Harris
88a0f33199 XKB: Fix CountedString16 padding
Should be <pad align=4>, not <pad bytes=1>. This is a very long-winded
way to write <pad align>, since libxcb doesn't support <pad align> yet.

Signed-off-by: Peter Harris <pharris@opentext.com>
2013-04-16 14:37:05 -04:00
Peter Harris
01f8c32984 XKB: Remove CountedString8
CountedString8 is never used.

Signed-off-by: Peter Harris <pharris@opentext.com>
2013-04-16 14:37:05 -04:00
Daniel Martin
7265cbb3a9 xkb: Revert half of d42d791 XKB: Fix broken events
The no-sequence-number attribute was not necessary to achive what commit
d42d791 did. The first field automatically goes between the
response_type and the sequence field in the header. So, adding the
xkbType field would've been sufficient to fix the broken events.

Reference-to: d42d791 XKB: Fix broken events
2013-02-14 20:40:34 +01:00
Daniel Martin
28ae6975c0 Simplify boolean attribute retrieval 2013-02-14 20:40:34 +01:00
Neil Roberts
c0d65da722 xfixes: Update to version 5
This adds the two new functions in XFixes version 5 for handling
pointer barriers.

Signed-off-by: Neil Roberts <neil@linux.intel.com>
Tested-by: Daniel Martin <consume.noise@gmail.com>
Signed-off-by: Peter Harris <pharris@opentext.com>
2013-02-14 11:35:26 -05:00
Colin Walters
ca30e6d5d7 autogen.sh: Implement GNOME Build API
http://people.gnome.org/~walters/docs/build-api.txt

Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-01-16 13:20:49 -05:00
Uli Schlachter
e623b97807 Release xcb-proto 1.8
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-05 14:43:12 +02:00
Daniel Stone
d42d791806 XKB: Fix broken events
XKB events all have exactly the same event number - 0 (from the XKB
event base).  Within this, they're all multiplexed by the xkbType field,
which comes immediately after the event type field, before the sequence
number.  Without this field, the events are pretty much useless, so add
it manually.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2012-06-21 16:16:11 +02:00
Chad Versace
5a4e42f37a dri2: Update to DRI2 1.4
In DRI2 1.4, the DRI2GetParam request was added.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2012-06-05 10:31:19 +02:00
Michael Stapelberg
b02b7f8dcf xproto: add doc tags, xcbgen: handle doc tags
Signed-off-by: Julien Danjou <julien@danjou.info>
2012-03-26 18:23:15 +02:00
Julien Danjou
8c41b3c901 Release xcb-proto 1.7.1
Signed-off-by: Julien Danjou <julien@danjou.info>
2012-03-23 16:24:15 +01:00
Alex Plotnick
eaa943c23e Rename the ExprType "parent" attribute to "parents".
This is fallout from commit 76ca2c0b15,
which renamed the *parent parameter of ExprType.__init__, but failed
to rename the instance attribute to which it was assigned.

Signed-off-by: Julien Danjou <julien@danjou.info>
2012-03-23 15:31:57 +01:00
Arnaud Fontaine
12cb81c5b5 Add autogen.sh to EXTRA_DIST.
Reviewed-by: Uli Schlachter <psychon@znc.in>
2012-02-10 17:44:33 +09:00
Arnaud Fontaine
f7ca3e1dcc Remove now unnecessary files as everything is implemented in xcbgen.
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2012-01-26 10:03:04 +09:00
Arnaud Fontaine
f2574e460f Add ge and xf86vidmode protocol descriptions.
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2012-01-23 10:15:32 +09:00
Julien Danjou
4c8e4acef4 Release xcb-proto 1.7 2012-01-11 17:27:38 +01:00
Robert Ancell
5a94a73845 Fix XKB GetState missing lookupMods field
This fixes #43606

Signed-off-by: Julien Danjou <julien@danjou.info>
2012-01-11 17:17:33 +01:00
Robert Ancell
2608811712 Fix some fields name
XKB-SetControls has some incorrectly named fields according to the spec,
interanlRealMods -> internalRealMods, Internal where Ignore should be used.

This fixes #43605

Signed-off-by: Julien Danjou <julien@danjou.info>
2012-01-11 17:14:29 +01:00
Julien Danjou
04a6b048c6 Fix 9efd2ac87b field name
Signed-off-by: Julien Danjou <julien@danjou.info>
2012-01-11 17:13:27 +01:00
Robert Ancell
9efd2ac87b Fix SetFontPath path string encoding
SetFontPath doesn't encode the path strings correctly - it should be the
same as the GetFontPath reply.

Fixes #43602

Signed-off-by: Julien Danjou <julien@danjou.info>
2012-01-11 17:07:10 +01:00
Robert Ancell
08eb095955 Fix ChangeHosts address string
ChangeHosts incorrectly encodes address as a string, not a binary blob. It
should be the same as in the HOSTS structure.

Fixes #43604

Signed-off-by: Julien Danjou <julien@danjou.info>
2012-01-11 17:03:47 +01:00
Fredrik Höglund
e4dec4873a dri2: Update to version 1.3 (v2)
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Peter Harris <pharris@opentext.com>
2011-12-08 10:17:57 -05:00
Ian Romanick
a0f20ce0ef glx: Add protocol for GLX_ARB_create_context and GLX_ARB_create_context_profile
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Peter Harris <pharris@opentext.com>
2011-12-06 15:14:14 -05:00
Ian Romanick
d0b88e5119 glx: Use FBCONFIG type for fbconfig parameter of CreateNewContext and CreatePixmap
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Peter Harris <pharris@opentext.com>
2011-12-06 15:13:04 -05:00
Ian Romanick
6a167ee4f2 glx: Use glx:CONTEXT for share_list parameter of CreateNewContext
This matches the share_list parameter of CreateContext.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Peter Harris <pharris@opentext.com>
2011-12-06 15:13:04 -05:00
Ian Romanick
cb7c7123e1 glx: Replace some 'reserved' fields with explicit padding
In the GLX protocol specs, the various fields named 'reserved' are
just there to provide alignment padding.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Peter Harris <pharris@opentext.com>
2011-12-06 15:13:04 -05:00
Mike Frysinger
17ab095a98 add libdir/exec_prefix to xcb-xproto.pc
If we want to base other paths off of exec_prefix or libdir (like the
python path), we can't because the xcb-proto.pc.in file omits those
variables.  Add them so people can leverage them in their own builds.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Julien Danjou <julien@danjou.info>
2011-11-10 15:36:54 +01:00