free-sw/xcb/proto
10 years agoAlso track directly imported modules in a separate list
Keith Packard [Wed, 12 Feb 2014 21:53:13 +0000 (13:53 -0800)]
Also track directly imported modules in a separate list

This allows the generated header files to only include the
directly referenced header files, with the indirectly referenced header
files included by the directly referenced ones.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
10 years agoxkb: Use <pad align="4" /> in GetMap
Peter Harris [Tue, 14 Jan 2014 19:48:22 +0000 (14:48 -0500)]
xkb: Use <pad align="4" /> in GetMap

There is a bug where lists of size other than one are automatically
aligned by c_client.py. So alignment_pad3 and 4 were aligning twice
and consuming too many bytes.

Rather than change the type to CARD8 and wrap the <op> in yet another
<op> to multiply by two, use the new <pad align> operation.

Reviewed-By: Ran Benita <ran234@gmail.com>
Tested-By: Ran Benita <ran234@gmail.com>
Signed-off-by: Peter Harris <pharris@opentext.com>
10 years agoSupport <pad align="n" />
Peter Harris [Tue, 14 Jan 2014 19:45:36 +0000 (14:45 -0500)]
Support <pad align="n" />

Reviewed-By: Ran Benita <ran234@gmail.com>
Signed-off-by: Peter Harris <pharris@opentext.com>
10 years agoTrack pad count at the module level
Peter Harris [Tue, 14 Jan 2014 19:45:15 +0000 (14:45 -0500)]
Track pad count at the module level

If the pad count is reset for each bitcase, the names will collide
in the encompasing switch struct.

Reviewed-By: Ran Benita <ran234@gmail.com>
Signed-off-by: Peter Harris <pharris@opentext.com>
10 years agoRelease xcb-proto 1.10
Uli Schlachter [Sun, 22 Dec 2013 14:57:36 +0000 (15:57 +0100)]
Release xcb-proto 1.10

Signed-off-by: Uli Schlachter <psychon@znc.in>
10 years agoAdd news for 1.10
Julien Cristau [Sat, 14 Dec 2013 05:25:12 +0000 (06:25 +0100)]
Add news for 1.10

Signed-off-by: Julien Cristau <jcristau@debian.org>
10 years agoxinput: Explicitly specify NotifyMode and NotifyDetail
Peter Harris [Fri, 6 Dec 2013 21:17:37 +0000 (16:17 -0500)]
xinput: Explicitly specify NotifyMode and NotifyDetail

There is a NotifyMode and a NotifyDetail in both xproto and xinput.  Add
a namespece to the enum references to be clear about which one is to be
used.

Signed-off-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Julien Cristau <jcristau@debian.org>
10 years agoAdd NEWS entries for release 1.9
Uli Schlachter [Fri, 15 Nov 2013 21:24:35 +0000 (22:24 +0100)]
Add NEWS entries for release 1.9

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Cristau <jcristau@debian.org>
10 years agoRename ge events to GeGeneric events
Uli Schlachter [Mon, 18 Nov 2013 19:38:43 +0000 (20:38 +0100)]
Rename ge events to GeGeneric events

The new xcb_ge_event_t that libxcb generates from this definition has different
fields than the old, hand-written xcb_ge_event_t. To undo an API break, libxcb
will reintroduce the old hand-written version and mark it as deprecated, so that
everyone can switch to this new version.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71502
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Cristau <jcristau@debian.org>
10 years agosync: VALUETYPE and TESTTYPE are enum
Peter Harris [Fri, 15 Nov 2013 22:22:02 +0000 (17:22 -0500)]
sync: VALUETYPE and TESTTYPE are enum

Typoed as mask in e6a246e50e62cbcba33d0e1d2371e69e6e089383

Signed-off-by: Peter Harris <pharris@opentext.com>
Reviewed-By: Daniel Martin <consume.noise@gmail.com>
10 years agosync: Add missing namespace for the INT64 struct
Peter Harris [Fri, 15 Nov 2013 16:07:39 +0000 (11:07 -0500)]
sync: Add missing namespace for the INT64 struct

Signed-off-by: Peter Harris <pharris@opentext.com>
Reviewed-By: Daniel Martin <consume.noise@gmail.com>
10 years agoPresent: Remove reference to nonexistent enum
Peter Harris [Wed, 13 Nov 2013 21:21:22 +0000 (16:21 -0500)]
Present: Remove reference to nonexistent enum

Signed-off-by: Peter Harris <pharris@opentext.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
10 years agoxkb: Add struct Property as per spec (commented out)
Ran Benita [Sun, 13 Oct 2013 11:44:41 +0000 (13:44 +0200)]
xkb: Add struct Property as per spec (commented out)

The specification says that Property is a struct of two CountedString16
(name and value). This form can't be handled atm. correctly too. But,
add it as a comment so we've it at hand when we know what to do with it.

All credits go to Ran Benita, as he found this.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
10 years agoxkb: Comment out intermixed fixed size fields and lists
Daniel Martin [Sun, 13 Oct 2013 11:44:40 +0000 (13:44 +0200)]
xkb: Comment out intermixed fixed size fields and lists

c_client.py doesn't handle such intermixed fixed size fields and lists
correctly. Therefor comment them out.

With that change the size of the generated request structure for
ListComponents has 8 Bytes which is the same as xkbListComponentsReq
has and the server checks REQUEST_AT_LEAST_SIZE(xkbListComponentsReq).
The same goes for GetKbdByName, which results in a structure of 12
Bytes.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-By: Ran Benita <ran234@gmail.com>
10 years agoxkb: Comment out the struct Property and {Get, Set}Geometry
Daniel Martin [Sun, 13 Oct 2013 11:44:39 +0000 (13:44 +0200)]
xkb: Comment out the struct Property and {Get, Set}Geometry

This struct has intermixed fixed size fields and lists, which
c_client.py doesn't handle properly. Therefor comment out the struct and
the fields type-referencing it.

As doodads are commented out already and with Property gone the requests
GetGeomtry and SetGeometry become pretty much useless. Therefor comment
them out completly.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-By: Ran Benita <ran234@gmail.com>
10 years agoxkb: Comment out Doodads
Daniel Martin [Sun, 13 Oct 2013 11:44:38 +0000 (13:44 +0200)]
xkb: Comment out Doodads

Doodads are known to be broken (*). Comment them out until they can be
handled properly.

(*) One problem is that TextDoodad and LogoDoodad have variadic lists at
the end. But, they're within a union with other fixed size Doodads. A
union doesn't have a hint which field is in use and therefor the code
generator (at least c_client.py) just creates a generic iterator for the
Doodad union, which fails for TextDoodad and LogoDoodad.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-By: Ran Benita <ran234@gmail.com>
10 years agoAdd note on pretty patches and src/.gitattributes
Daniel Martin [Sun, 13 Oct 2013 11:44:37 +0000 (13:44 +0200)]
Add note on pretty patches and src/.gitattributes

Add a file HACKING describing howto to prettify patches (their hunk
headers) and add src/.gitattributes, which is necessary for that.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-By: Ran Benita <ran234@gmail.com>
10 years agoxv: Remove obsolete comments in EncodingInfo and QueryEncodings
Daniel Martin [Sun, 13 Oct 2013 11:44:36 +0000 (13:44 +0200)]
xv: Remove obsolete comments in EncodingInfo and QueryEncodings

The padding in EncodingInfo (struct) and QueryEncodings (reply) has been
fixed upstream:
    Xvproto: fix xvEncodingInfo to match actual wire protocol
    http://cgit.freedesktop.org/xorg/proto/videoproto/commit/?id=d970512
and
    Xvproto.h: fix xvQueryEncodingsReply to match actual wire protocol
    http://cgit.freedesktop.org/xorg/proto/videoproto/commit/?id=1a96222

So, we can remove the comments.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Arnaud Fontaine <arnau@debian.org>
10 years agoxinput: Add XI2 event enum. for event selection
Daniel Martin [Sun, 13 Oct 2013 11:44:35 +0000 (13:44 +0200)]
xinput: Add XI2 event enum. for event selection

This adds an enumeration 'XIEventMask', which is necessary to select for
XI2 events via the SelectEvent request.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-By: Ran Benita <ran234@gmail.com>
10 years agoxcbgen: Remove tab from xtypes.py.
Matt Turner [Tue, 12 Nov 2013 02:32:09 +0000 (18:32 -0800)]
xcbgen: Remove tab from xtypes.py.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71418

10 years agoUpdate to version 1.9
Keith Packard [Thu, 7 Nov 2013 21:51:09 +0000 (13:51 -0800)]
Update to version 1.9

Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agoAdd 'fd' element to fields group, fix present Generic event to validate
Keith Packard [Thu, 7 Nov 2013 21:29:14 +0000 (13:29 -0800)]
Add 'fd' element to fields group, fix present Generic event to validate

This fixes 'make check'

Signed-off-by: Keith Packard <keithp@keithp.com>
10 years agoAdd Present protocol specification
Keith Packard [Thu, 11 Jul 2013 22:59:08 +0000 (15:59 -0700)]
Add Present protocol specification

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Harris <pharris@opentext.com>
10 years agoAdd DRI3
Keith Packard [Wed, 10 Apr 2013 04:36:40 +0000 (21:36 -0700)]
Add DRI3

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Harris <pharris@opentext.com>
10 years agoAdd MIT-SHM AttachFd and CreateSegment requests
Keith Packard [Fri, 18 Jan 2013 09:28:10 +0000 (01:28 -0800)]
Add MIT-SHM AttachFd and CreateSegment requests

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Harris <pharris@opentext.com>
10 years agoAdd support for file descriptor request fields
Keith Packard [Mon, 14 Jan 2013 22:19:45 +0000 (14:19 -0800)]
Add support for file descriptor request fields

These are present in the API, but not present on the wire.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
10 years agoDefine X generic event structure
Keith Packard [Wed, 6 Nov 2013 18:23:14 +0000 (10:23 -0800)]
Define X generic event structure

This is used by libxcb, and was defined explicitly there but it's
cleaner to use the XML specification.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Harris <pharris@opentext.com>
10 years agoAdd CARD64/INT64 protocol types
Keith Packard [Thu, 11 Jul 2013 22:56:54 +0000 (15:56 -0700)]
Add CARD64/INT64 protocol types

No reason to make people use two 32-bit values when every modern
compiler has native 64-bit objects.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
10 years agoMove the INT64 types in sync.xml to the sync: namespace
Keith Packard [Fri, 12 Jul 2013 21:45:57 +0000 (14:45 -0700)]
Move the INT64 types in sync.xml to the sync: namespace

This makes sure we use the crazy sync-specific 64-bit datatype instead
of the global INT64 type

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Harris <pharris@opentext.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
10 years agoXKB: Rewrite AXOption
Peter Harris [Tue, 24 Sep 2013 13:59:30 +0000 (09:59 -0400)]
XKB: Rewrite AXOption

AXOption can be an <enum> instead of a <union>, which is a much simpler
construct.

Signed-off-by: Peter Harris <pharris@opentext.com>
Reviewed-By: Ran Benita <ran234@gmail.com>
10 years agoXKB: Fix values of AXFBOpt enum
Peter Harris [Tue, 24 Sep 2013 13:59:29 +0000 (09:59 -0400)]
XKB: Fix values of AXFBOpt enum

Signed-off-by: Peter Harris <pharris@opentext.com>
Reviewed-By: Ran Benita <ran234@gmail.com>
10 years agoxkb: Fix struct ExtensionDeviceNotify
Daniel Martin [Mon, 19 Aug 2013 21:00:22 +0000 (23:00 +0200)]
xkb: Fix struct ExtensionDeviceNotify

The field ledId is of type CARD16, not CARD8, see XKBproto.h.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-By: Ran Benita <ran234@gmail.com>
10 years agoxkb: Pad structs CommonDoodad and SALockDeviceBtn
Daniel Martin [Mon, 19 Aug 2013 21:00:21 +0000 (23:00 +0200)]
xkb: Pad structs CommonDoodad and SALockDeviceBtn

* CommonDoodad is xkbAnyDoodadWireDesc in XKBproto.h. There it has a
  size of 20 like all Doodads:
    #define sz_xkbAnyDoodadWireDesc 20
  Add the necessary 8 bytes of padding.

* SALockDeviceBtn is an Action. All Actions are handled by the server
  and libX11 with sizeof(xkbActionWireDesc) or
  SIZEOF(xkbActionWireDesc). Which results in a size of 8:
    #define sz_xkbActionWireDesc 8 /* in XKBproto.h */
  Add the necessary 3 bytes of padding.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com>
10 years agorandr: Fix GetProviderProperty reply
Daniel Martin [Mon, 19 Aug 2013 21:00:20 +0000 (23:00 +0200)]
randr: Fix GetProviderProperty reply

The first field has to be 'format' not a pad and 'num_items' is of type
CARD32.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Arnaud Fontaine <arnau@debian.org>
10 years agoEnforce a bit or value in enum items
Daniel Martin [Sun, 18 Aug 2013 13:18:10 +0000 (15:18 +0200)]
Enforce a bit or value in enum items

Do not allow enum items without an explicit bit or value. The value of
an enum item is known when adding the enum to the xml specification.
There's no reason why this information shouldn't be where it belongs to.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com> (and tested)
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
10 years agoxv: Use explicit enum value
Daniel Martin [Sun, 18 Aug 2013 13:17:45 +0000 (15:17 +0200)]
xv: Use explicit enum value

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com> (and tested)
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
10 years agoxproto: Use explicit enum value
Daniel Martin [Sun, 18 Aug 2013 13:17:27 +0000 (15:17 +0200)]
xproto: Use explicit enum value

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com> (and tested)
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
10 years agoxinput: Use explicit enum value
Daniel Martin [Sun, 18 Aug 2013 13:16:19 +0000 (15:16 +0200)]
xinput: Use explicit enum value

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com> (and tested)
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
10 years agoxfixes: Use explicit enum value
Daniel Martin [Sun, 18 Aug 2013 13:16:05 +0000 (15:16 +0200)]
xfixes: Use explicit enum value

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com> (and tested)
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
10 years agoxevie: Use explicit enum value
Daniel Martin [Sun, 18 Aug 2013 13:15:49 +0000 (15:15 +0200)]
xevie: Use explicit enum value

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com> (and tested)
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
10 years agosync: Use explicit enum value
Daniel Martin [Sun, 18 Aug 2013 13:15:35 +0000 (15:15 +0200)]
sync: Use explicit enum value

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com> (and tested)
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
10 years agoshape: Use explicit enum value
Daniel Martin [Sun, 18 Aug 2013 13:15:20 +0000 (15:15 +0200)]
shape: Use explicit enum value

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com> (and tested)
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
10 years agoscreensaver: Use explicit enum value
Daniel Martin [Sun, 18 Aug 2013 13:15:04 +0000 (15:15 +0200)]
screensaver: Use explicit enum value

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com> (and tested)
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
10 years agorender: Use explicit enum value
Daniel Martin [Sun, 18 Aug 2013 13:14:36 +0000 (15:14 +0200)]
render: Use explicit enum value

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com> (and tested)
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
10 years agodri2: Use explicit enum value
Daniel Martin [Sun, 18 Aug 2013 13:14:18 +0000 (15:14 +0200)]
dri2: Use explicit enum value

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com> (and tested)
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
10 years agorandr: Use explicit enum value
Daniel Martin [Sun, 18 Aug 2013 13:13:56 +0000 (15:13 +0200)]
randr: Use explicit enum value

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com> (and tested)
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
10 years agodpms: Use explicit enum value
Daniel Martin [Sun, 18 Aug 2013 13:13:19 +0000 (15:13 +0200)]
dpms: Use explicit enum value

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com> (and tested)
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
10 years agodamage: Use explicit enum value
Daniel Martin [Sun, 18 Aug 2013 13:13:05 +0000 (15:13 +0200)]
damage: Use explicit enum value

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com> (and tested)
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
10 years agocomposite: Use explicit enum value
Daniel Martin [Sun, 18 Aug 2013 13:12:17 +0000 (15:12 +0200)]
composite: Use explicit enum value

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com> (and tested)
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
10 years agoxkb: Add missing LedClass and BellClass enum values
Ran Benita [Mon, 12 Aug 2013 09:18:59 +0000 (12:18 +0300)]
xkb: Add missing LedClass and BellClass enum values

The protocol encoding says:
http://www.x.org/releases/current/doc/kbproto/xkbproto.html#appD::Common_Types

    KB_LEDCLASSRESULT
        0     KbdFeedbackClass
        4     LedFeedbackClass

    KB_LEDCLASSSPEC
        Encoding same as KB_LEDCLASSRESULT, with the addition of:
        #x0300     XkbDfltXIClass
        #x0500     XkbAllXIClasses

    KB_BELLCLASSRESULT
        0     KbdFeedbackClass
        5     BellFeedbackClass

    KB_BELLCLASSSPEC
        Encoding same as KB_BELLCLASSRESULT, with the addition of:
        #x0300     XkbDfltXIClass

Note that the spec says something slightly different in another section:
http://www.x.org/releases/current/doc/kbproto/xkbproto.html#Common_Types

    KB_LEDCLASSSPEC { KbdFeedbackClass , LedFeedbackClass , DfltXIClass , AllXIClasses , XINone }
    KB_BELLCLASSSPEC    { KbdFeedbackClass , BellFeedbackClass , DfltXIClass , AllXIClasses  }}

From what I could gather, the encoding is the correct one (but I'm not
sure).

Signed-off-by: Ran Benita <ran234@gmail.com>
Reviewed-by: Daniel Martin <consume.noise@gmail.com>
10 years agoxkb: Add missing 'supported' field to GetNamedIndicator reply
Ran Benita [Mon, 12 Aug 2013 07:55:02 +0000 (10:55 +0300)]
xkb: Add missing 'supported' field to GetNamedIndicator reply

The protocol encoding has it:
http://www.x.org/releases/current/doc/kbproto/xkbproto.html#appD::Requests

    1     CARD8          opcode
    1     15          xkb-opcode
    [...]

    1     1          Reply
    1     CARD8          deviceID
    2     CARD16          sequence number
    [...]
    4     SETofKB_BOOLCTRL          map.ctrls
    1     BOOL          supported
    3               unused

And xkbGetNamedIndicatorReply in XKBproto.h also.

Finally, the server does send it, though it's always TRUE.

Signed-off-by: Ran Benita <ran234@gmail.com>
Reviewed-by: Daniel Martin <consume.noise@gmail.com>
10 years agoxkb: Unify Overlay1Behavior and Overlay2Behavior
Ran Benita [Tue, 6 Aug 2013 08:33:45 +0000 (11:33 +0300)]
xkb: Unify Overlay1Behavior and Overlay2Behavior

These two structs are used by the server in the exact same way, and are
handled together (see xkb/xkbPrKeyEv.c, XkbKB_Overlay{1,2} handling).
There is no need to use different (and for some reason slightly
different) types for them.

Reviewed-by: Daniel Martin <consume.noise@gmail.com>
Signed-off-by: Ran Benita <ran234@gmail.com>
10 years agoxkb: Change DfltBtnAbsolute to the value used by the server
Ran Benita [Sun, 4 Aug 2013 10:35:02 +0000 (13:35 +0300)]
xkb: Change DfltBtnAbsolute to the value used by the server

The spec says:
     #x02     XkbSA_DfltBtnAbsolute
But /usr/include/X11/extensions/XKB.h has:
     #define XkbSA_DfltBtnAbsolute (1L << 2)
which is what the server sends.

Note: the XKB spec was changed by Daniel Martin to match the Xlib value.
See kbproto commit db07706cb268d5fe1bc38ef5c0a9f49309068b2c.

Reviewed-by: Daniel Martin <consume.noise@gmail.com>
Signed-off-by: Ran Benita <ran234@gmail.com>
10 years agoxkb: Fix key type map entry field order
Ran Benita [Sun, 4 Aug 2013 10:33:30 +0000 (13:33 +0300)]
xkb: Fix key type map entry field order

In fact, unlike the deleted comment says, both Xlib and the server use
the order as specified in the protocol spec:
http://www.x.org/releases/current/doc/kbproto/xkbproto.html#appD::Requests
(Search for KB_KTMAPENTRY).

Also see struct xkbKTMapEntryWireDesc in
/usr/include/X11/extensions/XKBproto.h

Reviewed-by: Peter Harris <pharris@opentext.com>
Reviewed-by: Daniel Martin <consume.noise@gmail.com>
Signed-off-by: Ran Benita <ran234@gmail.com>
10 years agoxkb: Work around alignment problems in GetNames and GetMap replies
Ran Benita [Sun, 4 Aug 2013 10:31:29 +0000 (13:31 +0300)]
xkb: Work around alignment problems in GetNames and GetMap replies

The basic situation is this: a list of CARD8/CARD16s followed by a list
of CARD16/CARD32s. In the current code, the second list is aligned to
1/2 bytes according the size of the first list. However, in some cases
the second list needs to be aligned to 4 bytes per the xkbproto spec:
http://www.x.org/releases/current/doc/kbproto/xkbproto.html#appD::Requests

XkbGetMap reply (xkb-opcode 8):
[...]
a     LISTofCARD8          actsRtrn.count
p               unused,p=pad(a)
8A     LISTofKB_ACTION          actsRtrn.acts
4B     LISTofKB_SETBEHAVIOR          behaviorsRtrn
v     LISTofSETofKEYMASK          vmodsRtrn
p               unused, p=pad(v)
2E     LISTofKB_SETEXPLICIT          explicitRtrn
p               unused,p=pad(2E)
2M     LISTofKB_KEYMODMAP          modmapRtrn
p               unused, p=pad(2M)
[...]

XkbGetNames reply (xkb-opcode 17):
[...]
l     LISTofCARD8          nLevelsPerType, sum of all elements=L
p               unused, p=pad(l)
[...]

The server and Xlib handle this with calls to XkbPaddedSize(), which is
a good way to see where the extra padding is needed.

Signed-off-by: Ran Benita <ran234@gmail.com>
Reviewed-by: Daniel Martin <consume.noise@gmail.com>
10 years agoxproto: Fix GContext error references in documentation
Daniel Martin [Sat, 29 Jun 2013 19:16:22 +0000 (21:16 +0200)]
xproto: Fix GContext error references in documentation

The name of the error is GContext, not GC.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-By: Ran Benita <ran234@gmail.com>
10 years agoxinput: Use BARRIER from xfixes
Daniel Martin [Thu, 14 Feb 2013 19:55:32 +0000 (20:55 +0100)]
xinput: Use BARRIER from xfixes

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
10 years agoxinput: Unlock uninterpreted lists
Daniel Martin [Tue, 15 Jan 2013 19:28:05 +0000 (20:28 +0100)]
xinput: Unlock uninterpreted lists

The 'uninterpreted_data' lists have been added to pad the structure at
runtime and thereby making lists of such structures iterable.

This is a temporary solution until it is possible to nest a <switch> in
a <struct> correctly.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
10 years agoxinput: Add XI v2.3
Daniel Martin [Tue, 15 Jan 2013 19:17:13 +0000 (20:17 +0100)]
xinput: Add XI v2.3

Introduced with v2.3 has been Pointer Barrier support, including a new
request (XIBarrierReleasePointer) and 2 events (Barrier{Hit,Leave}).

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
10 years agoxinput: Add XI v2.2
Daniel Martin [Tue, 15 Jan 2013 19:14:57 +0000 (20:14 +0100)]
xinput: Add XI v2.2

Introduced with v2.2 has been Multitouch support and therefor 7 new
events: (Raw)Touch{Begin,Update,End} and TouchOwnership.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
10 years agoxinput: Add XI v2.1
Daniel Martin [Tue, 15 Jan 2013 19:11:43 +0000 (20:11 +0100)]
xinput: Add XI v2.1

Introduced with v2.1 has been Raw event support and therefor 5 new
events: Raw{Key,Button}{Press,Release} and RawMotion.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
10 years agoxinput: Add XI v2.0
Daniel Martin [Tue, 15 Jan 2013 19:06:34 +0000 (20:06 +0100)]
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>
10 years agoxinput: Add XI v1.5
Daniel Martin [Tue, 15 Jan 2013 18:01:12 +0000 (19:01 +0100)]
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>
10 years agoxinput: Cleanup implementation of XI up to v1.4
Daniel Martin [Tue, 15 Jan 2013 17:54:05 +0000 (18:54 +0100)]
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>
10 years agoAdd support for X Generic Extension events
Daniel Martin [Sat, 8 Jun 2013 09:20:38 +0000 (11:20 +0200)]
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>
10 years agosync: Change value list param of CreateAlarm and ChangeAlarm into switch
Louis-Francis Ratté-Boulianne [Tue, 2 Jul 2013 18:21:40 +0000 (19:21 +0100)]
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>
10 years agores: Add ClientIdMask enum
Daniel Martin [Tue, 4 Jun 2013 19:29:32 +0000 (21:29 +0200)]
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>
10 years agores: Fix and rename list in ClientIdValue
Daniel Martin [Mon, 27 May 2013 17:20:32 +0000 (19:20 +0200)]
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>
10 years agorandr: Add provider object support (RandR v1.4)
Daniel Martin [Tue, 4 Jun 2013 19:27:30 +0000 (21:27 +0200)]
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>
10 years agoxtest: Version bump 2.1..2.2
Daniel Martin [Mon, 27 May 2013 17:20:30 +0000 (19:20 +0200)]
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>
10 years agoglx: Version bump 1.3..1.4
Daniel Martin [Mon, 27 May 2013 17:20:29 +0000 (19:20 +0200)]
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>
10 years agocomposite: Version bump 0.3..0.4
Daniel Martin [Mon, 27 May 2013 17:20:28 +0000 (19:20 +0200)]
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>
10 years agoxfixes: Rename enum DirectionMask to BarrierDirec.
Daniel Martin [Tue, 28 May 2013 14:43:15 +0000 (16:43 +0200)]
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>
10 years agoXKB: Correct enum to mask
Mark Witmer [Thu, 30 May 2013 02:36:37 +0000 (19:36 -0700)]
XKB: Correct enum to mask

Changes fields with enums EventType, MapPart, or BoolCtrl to use them as
masks instead.

10 years agoscreensaver: Use enum and mask attributes
Daniel Martin [Thu, 23 May 2013 20:35:03 +0000 (22:35 +0200)]
screensaver: Use enum and mask attributes

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Signed-off-by: Peter Harris <pharris@opentext.com>
10 years agoscreensaver: Remove wrong fields from Notify event
Daniel Martin [Thu, 23 May 2013 20:35:02 +0000 (22:35 +0200)]
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>
10 years agoPrototype for XRes v1.2
Erkki Seppälä [Mon, 31 Jan 2011 13:50:16 +0000 (15:50 +0200)]
Prototype for XRes v1.2

10 years agoxcbgen: Handle multiple <enumref> in a <bitcase>
Daniel Martin [Mon, 13 May 2013 21:33:03 +0000 (23:33 +0200)]
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>
11 years agoXKB: Fix calculation in GetIndicatorMap
Peter Harris [Tue, 16 Apr 2013 18:29:51 +0000 (14:29 -0400)]
XKB: Fix calculation in GetIndicatorMap

Contrary to the spec, the server doesn't set nIndicators.

Signed-off-by: Peter Harris <pharris@opentext.com>
11 years agoXKB: Fix GetKbdByName
Peter Harris [Wed, 10 Apr 2013 23:09:44 +0000 (19:09 -0400)]
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>
11 years agoAllow multiple <enumref> in a <bitcase>
Peter Harris [Thu, 11 Apr 2013 13:52:57 +0000 (09:52 -0400)]
Allow multiple <enumref> in a <bitcase>

Signed-off-by: Peter Harris <pharris@opentext.com>
11 years agoXKB: Change CARD8 to char where ASCII is expected
Peter Harris [Wed, 10 Apr 2013 23:06:20 +0000 (19:06 -0400)]
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>
11 years agoXKB: Fix VirtualMods
Peter Harris [Wed, 10 Apr 2013 23:05:23 +0000 (19:05 -0400)]
XKB: Fix VirtualMods

nVModMapKeys is usually larger than <popcount>virtualMods</popcount>.

Signed-off-by: Peter Harris <pharris@opentext.com>
11 years agoXKB: Fix SymInterpret
Peter Harris [Wed, 10 Apr 2013 23:04:11 +0000 (19:04 -0400)]
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>
11 years agoXKB: Fix CountedString16 padding
Peter Harris [Wed, 10 Apr 2013 23:01:35 +0000 (19:01 -0400)]
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>
11 years agoXKB: Remove CountedString8
Peter Harris [Wed, 10 Apr 2013 22:59:57 +0000 (18:59 -0400)]
XKB: Remove CountedString8

CountedString8 is never used.

Signed-off-by: Peter Harris <pharris@opentext.com>
11 years agoxkb: Revert half of d42d791 XKB: Fix broken events
Daniel Martin [Tue, 15 Jan 2013 11:51:30 +0000 (12:51 +0100)]
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

11 years agoSimplify boolean attribute retrieval
Daniel Martin [Fri, 11 Jan 2013 17:10:08 +0000 (18:10 +0100)]
Simplify boolean attribute retrieval

11 years agoxfixes: Update to version 5
Neil Roberts [Thu, 14 Feb 2013 12:10:50 +0000 (12:10 +0000)]
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>
11 years agoautogen.sh: Implement GNOME Build API
Colin Walters [Wed, 4 Jan 2012 22:37:06 +0000 (17:37 -0500)]
autogen.sh: Implement GNOME Build API

http://people.gnome.org/~walters/docs/build-api.txt

Signed-off-by: Adam Jackson <ajax@redhat.com>
11 years agoRelease xcb-proto 1.8
Uli Schlachter [Fri, 5 Oct 2012 12:43:12 +0000 (14:43 +0200)]
Release xcb-proto 1.8

Signed-off-by: Uli Schlachter <psychon@znc.in>
11 years agoXKB: Fix broken events
Daniel Stone [Thu, 21 Jun 2012 11:40:02 +0000 (12:40 +0100)]
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>
11 years agodri2: Update to DRI2 1.4
Chad Versace [Mon, 4 Jun 2012 19:11:48 +0000 (12:11 -0700)]
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>
12 years agoxproto: add doc tags, xcbgen: handle doc tags
Michael Stapelberg [Sun, 27 Nov 2011 10:35:06 +0000 (10:35 +0000)]
xproto: add doc tags, xcbgen: handle doc tags

Signed-off-by: Julien Danjou <julien@danjou.info>
12 years agoRelease xcb-proto 1.7.1
Julien Danjou [Fri, 23 Mar 2012 15:24:15 +0000 (16:24 +0100)]
Release xcb-proto 1.7.1

Signed-off-by: Julien Danjou <julien@danjou.info>
12 years agoRename the ExprType "parent" attribute to "parents".
Alex Plotnick [Fri, 23 Mar 2012 14:19:08 +0000 (10:19 -0400)]
Rename the ExprType "parent" attribute to "parents".

This is fallout from commit 76ca2c0b1527541be59c344118c538ba055ad9d8,
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>
12 years agoAdd autogen.sh to EXTRA_DIST.
Arnaud Fontaine [Wed, 25 Jan 2012 07:52:43 +0000 (16:52 +0900)]
Add autogen.sh to EXTRA_DIST.

Reviewed-by: Uli Schlachter <psychon@znc.in>
12 years agoRemove now unnecessary files as everything is implemented in xcbgen.
Arnaud Fontaine [Wed, 25 Jan 2012 07:56:36 +0000 (16:56 +0900)]
Remove now unnecessary files as everything is implemented in xcbgen.

Reviewed-by: Jamey Sharp <jamey@minilop.net>
12 years agoAdd ge and xf86vidmode protocol descriptions.
Arnaud Fontaine [Fri, 20 Jan 2012 09:51:12 +0000 (18:51 +0900)]
Add ge and xf86vidmode protocol descriptions.

Reviewed-by: Jamey Sharp <jamey@minilop.net>
12 years agoRelease xcb-proto 1.7
Julien Danjou [Wed, 11 Jan 2012 16:27:38 +0000 (17:27 +0100)]
Release xcb-proto 1.7