From f1c2db43dcf35d2cf4715390bd2391c28e42a8c2 Mon Sep 17 00:00:00 2001 From: marha Date: Sun, 22 Feb 2015 14:31:16 +0100 Subject: xwininfo fontconfig libX11 libXdmcp libfontenc libxcb libxcb/xcb-proto mesalib xserver xkeyboard-config mkfontscale git update 22 Feb 2015 xserver commit 3a06faf3fcdb7451125a46181f9152e8e59e9770 libxcb commit e3ec1f74637237ce500dfd0ca59f2e422da4e019 libxcb/xcb-proto commit 4c550465934164aab2449a125f75f4ca07816233 xkeyboard-config commit 26f344c93f8c6141e9233eb68088ba4fd56bc9ef libX11 commit c8e19b393defd53f046ddc2da3a16881221b3c34 libXdmcp commit 9f4cac7656b221ce2a8f97e7bd31e5e23126d001 libfontenc commit de1843aaf76015c9d99416f3122d169fe331b849 mkfontscale commit 87d628f8eec170ec13bb9feefb1ce05aed07d1d6 xwininfo commit 0c49f8f2bd56b1e77721e81030ea948386dcdf4e fontconfig commit d6d5adeb7940c0d0beb86489c2a1c2ce59e5c044 mesa commit 4359954d842caa2a9f8d4b50d70ecc789884b68b --- libxcb/xcb-proto/doc/xml-xcb.txt | 33 +++ libxcb/xcb-proto/src/present.xml | 10 +- libxcb/xcb-proto/src/render.xml | 118 +++++++- libxcb/xcb-proto/src/screensaver.xml | 68 ++++- libxcb/xcb-proto/src/xcb.xsd | 24 +- libxcb/xcb-proto/src/xfixes.xml | 2 +- libxcb/xcb-proto/src/xinput.xml | 527 +++++++++++++++++++++++++---------- libxcb/xcb-proto/src/xprint.xml | 13 +- libxcb/xcb-proto/src/xproto.xml | 414 +++++++++++++++++++++++++-- libxcb/xcb-proto/xcbgen/expr.py | 31 ++- libxcb/xcb-proto/xcbgen/xtypes.py | 8 +- 11 files changed, 1041 insertions(+), 207 deletions(-) (limited to 'libxcb/xcb-proto') diff --git a/libxcb/xcb-proto/doc/xml-xcb.txt b/libxcb/xcb-proto/doc/xml-xcb.txt index 235958de3..f8129ea9c 100644 --- a/libxcb/xcb-proto/doc/xml-xcb.txt +++ b/libxcb/xcb-proto/doc/xml-xcb.txt @@ -298,6 +298,23 @@ Expressions the structure containing this expression. The identifier is the value of the "name" attribute on the referenced field. +identifier + + A paramref is similar to a fieldref, but it refers to the value of + a field in the context which refers to the struct which contains the paramref. + + So, it refers to a field outside of the structure where it is defined. + This has the following consequences: + * The generator cannot deduce its type. + So, it is mandatory to specify its type. + * The identifier-name must not be used as a field in the structure + which contaons the paramref. + + For an example, see struct "DeviceTimeCoord" and request/reply + "GetDeviceMotionEvents" in xinput.xml, where paramref "num_axes" + in struct DeviceTimeCoord refers to field "num_axes" in + the DeviceTimeCoord reply. + integer The value element represents a literal integer value in an expression. The @@ -322,10 +339,26 @@ Expressions This element represents a sumation of the elements of the referenced list. +expression + + The expression is evaluated for each element of the referenced list, + in the context of this element. + This sumof element then represents a sumation of the results of these + evaluations. + + expression will usually be a fieldref which references a field of + a list-element or an expression containing a fieldref, + such as popcount of a fieldref. + expression This element represents the number of bits set in the expression. + + + This element represents the current list-element when used inside + a list-iteration expression such as . + Documentation ------------- diff --git a/libxcb/xcb-proto/src/present.xml b/libxcb/xcb-proto/src/present.xml index a9adc2ba8..95fee0181 100644 --- a/libxcb/xcb-proto/src/present.xml +++ b/libxcb/xcb-proto/src/present.xml @@ -199,7 +199,15 @@ OF THIS SOFTWARE. - + + + + length + 18 + + 2 + + diff --git a/libxcb/xcb-proto/src/render.xml b/libxcb/xcb-proto/src/render.xml index 55b73f7b8..c54608e72 100644 --- a/libxcb/xcb-proto/src/render.xml +++ b/libxcb/xcb-proto/src/render.xml @@ -280,16 +280,122 @@ for licensing information. - + + + value_mask + + Repeat + + + + AlphaMap + + + + AlphaXOrigin + + + + AlphaYOrigin + + + + ClipXOrigin + + + + ClipYOrigin + + + + ClipMask + + + + GraphicsExposure + + + + SubwindowMode + + + + PolyEdge + + + + PolyMode + + + + Dither + + + + ComponentAlpha + + + - + + + value_mask + + Repeat + + + + AlphaMap + + + + AlphaXOrigin + + + + AlphaYOrigin + + + + ClipXOrigin + + + + ClipYOrigin + + + + ClipMask + + + + GraphicsExposure + + + + SubwindowMode + + + + PolyEdge + + + + PolyMode + + + + Dither + + + + ComponentAlpha + + + diff --git a/libxcb/xcb-proto/src/screensaver.xml b/libxcb/xcb-proto/src/screensaver.xml index 491869e81..8d5abb43d 100644 --- a/libxcb/xcb-proto/src/screensaver.xml +++ b/libxcb/xcb-proto/src/screensaver.xml @@ -95,9 +95,71 @@ Draft Standard Version 1.1 - + + + value_mask + + BackPixmap + + + + BackPixel + + + + BorderPixmap + + + + BorderPixel + + + + BitGravity + + + + WinGravity + + + + BackingStore + + + + BackingPlanes + + + + BackingPixel + + + + OverrideRedirect + + + + SaveUnder + + + + EventMask + + + + DontPropagate + + + + Colormap + + + + Cursor + + + + diff --git a/libxcb/xcb-proto/src/xcb.xsd b/libxcb/xcb-proto/src/xcb.xsd index 85f5bc2af..c1dce3e1e 100644 --- a/libxcb/xcb-proto/src/xcb.xsd +++ b/libxcb/xcb-proto/src/xcb.xsd @@ -146,6 +146,15 @@ authorization from the authors. + + + + + + + + + @@ -162,9 +171,13 @@ authorization from the authors. + + + + @@ -182,15 +195,6 @@ authorization from the authors. - - - - - - - - - @@ -296,7 +300,6 @@ authorization from the authors. - @@ -306,7 +309,6 @@ authorization from the authors. - diff --git a/libxcb/xcb-proto/src/xfixes.xml b/libxcb/xcb-proto/src/xfixes.xml index c5cba352a..0a3d5ffee 100644 --- a/libxcb/xcb-proto/src/xfixes.xml +++ b/libxcb/xcb-proto/src/xfixes.xml @@ -291,13 +291,13 @@ authorization from the authors. - nbytes width height + nbytes diff --git a/libxcb/xcb-proto/src/xinput.xml b/libxcb/xcb-proto/src/xinput.xml index 7f7b0a66d..c729f20fb 100644 --- a/libxcb/xcb-proto/src/xinput.xml +++ b/libxcb/xcb-proto/src/xinput.xml @@ -46,56 +46,10 @@ This will, e.g., be necessary for automatically generated byte-order conversion which will, e.g., be necessary for server-side xcb. This affects the following: -* GetFeedbackControl reply field "feedbacks" ( structs FeedbackState, ... ) -* ChangeFeedbackControl request field "feedback" ( structs FeedbackCtl, ... ) -* QueryDeviceState reply field "classes" ( structs InputState, ... ) -* GetDeviceControl reply field "control" ( structs DeviceState, ... ) -* ChangeDeviceControl request field "control" ( structs ChangeDeviceControl, ... ) -* XIChangeHierarchy request field "changes" ( structs HierarchyChange, ... ) -* struct XIDeviceInfo field "classes" ( structs DeviceClass, ... ) * SendExtensionEvent member "events" ***** -xml and generator have to support of all members of a list - -This is needed for the following XI2-events ( and eventcopies thereof ) - KeyPress - ButtonPress - RawKeyPress - RawKeyPress - RawButtonPress - TouchBegin - RawTouchBegin - - -***** - - should support fields of listmembers. - -This is needed for request "ListInputDevices" - -***** - -xml and generator should support -switch-case similar to switch-bitcase. - -(and maybe: variable sized unions with a mechanism to define -which union-field is selected.) - -One of these features is needed for the InputInfo type -which is used by request "ListInputDevices" for the list "input_infos". - -***** - -Parametrized structs - -This is needed for being able to use the value of the field -"num_axes" of the GetDeviceMotionEvents-reply -in struct DeviceTimeCoord. - -***** - --> @@ -217,6 +171,29 @@ in struct DeviceTimeCoord. + + class_id + + Key + + + + + + + Button + + + + Valuator + + + + + axes_len + + + @@ -234,9 +211,15 @@ in struct DeviceTimeCoord. devices_len - - + + + num_class_info + + + + devices_len + + @@ -346,8 +329,9 @@ in struct DeviceTimeCoord. - + + num_axes + @@ -361,7 +345,9 @@ in struct DeviceTimeCoord. - + + num_events + @@ -609,12 +595,56 @@ in struct DeviceTimeCoord. - - - len - 4 - - + + class_id + + Keyboard + + + + + + + + + + 32 + + + + Pointer + + + + + + + String + + + + num_keysyms + + + + Integer + + + + + + Led + + + + + Bell + + + + + + @@ -696,12 +726,51 @@ in struct DeviceTimeCoord. - - - len - 4 - - + + class_id + + Keyboard + + + + + + + + + + + Pointer + + + + + + + String + + + + num_keysyms + + + + Integer + + + + Led + + + + + Bell + + + + + + @@ -1025,12 +1094,53 @@ in struct DeviceTimeCoord. - - - len - 4 - - + + control_id + + resolution + + + num_valuators + + + num_valuators + + + num_valuators + + + + abs_calib + + + + + + + + + + + core + + + + + + enable + + + + + abs_area + + + + + + + + @@ -1099,12 +1209,48 @@ in struct DeviceTimeCoord. - - - len - 4 - - + + control_id + + resolution + + + + + num_valuators + + + + abs_calib + + + + + + + + + + + core + + + + + enable + + + + + abs_area + + + + + + + + @@ -1205,30 +1351,26 @@ in struct DeviceTimeCoord. format - - + 8Bits num_items - - + + 16Bits num_items - - + + 32Bits num_items - + @@ -1356,15 +1498,37 @@ in struct DeviceTimeCoord. - - - - len - 4 - - 4 - - + + type + + AddMaster + + + + + name_len + + + + + RemoveMaster + + + + + + + + AttachSlave + + + + + DetachSlave + + + + @@ -1560,16 +1724,56 @@ in struct DeviceTimeCoord. - - - - - len - 4 - - 8 - - + + type + + Key + + + num_keys + + + + Button + + + + + num_buttons + 31 + + 32 + + + + num_buttons + + + + Valuator + + + + + + + + + + + Scroll + + + + + + + + Touch + + + + @@ -1776,28 +1980,24 @@ in struct DeviceTimeCoord. format - - + 8Bits num_items - - + + 16Bits num_items - - + + 32Bits num_items - + @@ -1828,30 +2028,26 @@ in struct DeviceTimeCoord. format - - + 8Bits num_items - - + + 16Bits num_items - - + + 32Bits num_items - + @@ -2092,8 +2288,13 @@ in struct DeviceTimeCoord. valuators_len - + + + + + + + @@ -2128,8 +2329,13 @@ in struct DeviceTimeCoord. valuators_len - + + + + + + + @@ -2248,10 +2454,20 @@ in struct DeviceTimeCoord. valuators_len - - + + + + + + + + + + + + + + @@ -2269,10 +2485,20 @@ in struct DeviceTimeCoord. valuators_len - - + + + + + + + + + + + + + + @@ -2311,8 +2537,13 @@ in struct DeviceTimeCoord. valuators_len - + + + + + + + @@ -2351,10 +2582,20 @@ in struct DeviceTimeCoord. valuators_len - - + + + + + + + + + + + + + + diff --git a/libxcb/xcb-proto/src/xprint.xml b/libxcb/xcb-proto/src/xprint.xml index e32293f3b..dc23dd0da 100644 --- a/libxcb/xcb-proto/src/xprint.xml +++ b/libxcb/xcb-proto/src/xprint.xml @@ -209,21 +209,14 @@ authorization from the authors. - + - - - + + diff --git a/libxcb/xcb-proto/src/xproto.xml b/libxcb/xcb-proto/src/xproto.xml index bfb8a4cff..d50a4285a 100644 --- a/libxcb/xcb-proto/src/xproto.xml +++ b/libxcb/xcb-proto/src/xproto.xml @@ -57,6 +57,7 @@ authorization from the authors. GCONTEXT + @@ -64,6 +65,8 @@ authorization from the authors. + + @@ -1293,9 +1296,71 @@ parent's cursor will cause an immediate change in the displayed cursor. - + + + value_mask + + BackPixmap + + + + BackPixel + + + + BorderPixmap + + + + BorderPixel + + + + BitGravity + + + + WinGravity + + + + BackingStore + + + + BackingPlanes + + + + BackingPixel + + + + OverrideRedirect + + + + SaveUnder + + + + EventMask + + + + DontPropagate + + + + Colormap + + + + Cursor + + + + Creates a window - + + + value_mask + + BackPixmap + + + + BackPixel + + + + BorderPixmap + + + + BorderPixel + + + + BitGravity + + + + WinGravity + + + + BackingStore + + + + BackingPlanes + + + + BackingPixel + + + + OverrideRedirect + + + + SaveUnder + + + + EventMask + + + + DontPropagate + + + + Colormap + + + + Cursor + + + + change window attributes - + - + + value_mask + + X + + + + Y + + + + Width + + + + Height + + + + BorderWidth + + + + Sibling + + + + StackMode + + + + Configures window attributes - + + + value_mask + + Function + + + + PlaneMask + + + + Foreground + + + + Background + + + + LineWidth + + + + LineStyle + + + + CapStyle + + + + JoinStyle + + + + FillStyle + + + + FillRule + + + + Tile + + + + Stipple + + + + TileStippleOriginX + + + + TileStippleOriginY + + + + Font + + + + SubwindowMode + + + + GraphicsExposures + + + + ClipOriginX + + + + ClipOriginY + + + + ClipMask + + + + DashOffset + + + + DashList + + + + ArcMode + + + Creates a graphics context - + + + value_mask + + Function + + + + PlaneMask + + + + Foreground + + + + Background + + + + LineWidth + + + + LineStyle + + + + CapStyle + + + + JoinStyle + + + + FillStyle + + + + FillRule + + + + Tile + + + + Stipple + + + + TileStippleOriginX + + + + TileStippleOriginY + + + + Font + + + + SubwindowMode + + + + GraphicsExposures + + + + ClipOriginX + + + + ClipOriginY + + + + ClipMask + + + + DashOffset + + + + DashList + + + + ArcMode + + + change graphics context components - + + + value_mask + + KeyClickPercent + + + + BellPercent + + + + BellPitch + + + + BellDuration + + + + Led + + + + LedMode + + + + Key + + + + AutoRepeatMode + + + + diff --git a/libxcb/xcb-proto/xcbgen/expr.py b/libxcb/xcb-proto/xcbgen/expr.py index e4fb06e93..e4ee8c6e2 100644 --- a/libxcb/xcb-proto/xcbgen/expr.py +++ b/libxcb/xcb-proto/xcbgen/expr.py @@ -22,6 +22,7 @@ class Field(object): self.wire = wire self.auto = auto self.isfd = isfd + self.parent = None class Expression(object): @@ -52,6 +53,8 @@ class Expression(object): self.lhs = None self.rhs = None + self.contains_listelement_ref = False + if elt.tag == 'list': # List going into a request, which has no length field (inferred by server) self.lenfield_name = elt.get('name') + '_len' @@ -61,12 +64,9 @@ class Expression(object): # Standard list with a fieldref self.lenfield_name = elt.text - elif elt.tag == 'valueparam': - # Value-mask. The length bitmask is described by attributes. - self.lenfield_name = elt.get('value-mask-name') - self.lenfield_type = elt.get('value-mask-type') - self.lenwire = True - self.bitfield = True + elif elt.tag == 'paramref': + self.lenfield_name = elt.text + self.lenfield_type = elt.get('type') elif elt.tag == 'op': # Op field. Need to recurse. @@ -103,6 +103,17 @@ class Expression(object): elif elt.tag == 'sumof': self.op = 'sumof' self.lenfield_name = elt.get('ref') + subexpressions = list(elt) + if len(subexpressions) > 0: + # sumof with a nested expression which is to be evaluated + # for each list-element in the context of that list-element. + # sumof then returns the sum of the results of these evaluations + self.rhs = Expression(subexpressions[0], parent) + + elif elt.tag == 'listelement-ref': + # current list element inside iterating expressions such as sumof + self.op = 'listelement-ref' + self.contains_listelement_ref = True else: # Notreached @@ -111,6 +122,12 @@ class Expression(object): def fixed_size(self): return self.nmemb != None + def recursive_resolve_tasks(self, module, parents): + for subexpr in (self.lhs, self.rhs): + if subexpr != None: + subexpr.recursive_resolve_tasks(module, parents) + self.contains_listelement_ref |= subexpr.contains_listelement_ref + def resolve(self, module, parents): if self.op == 'enumref': self.lenfield_type = module.get_type(self.lenfield_name[0]) @@ -127,4 +144,6 @@ class Expression(object): self.lenfield_parent = p self.lenfield_type = fields[self.lenfield_name].field_type break + + self.recursive_resolve_tasks(module, parents) diff --git a/libxcb/xcb-proto/xcbgen/xtypes.py b/libxcb/xcb-proto/xcbgen/xtypes.py index 45d7568f5..4d6bbc031 100644 --- a/libxcb/xcb-proto/xcbgen/xtypes.py +++ b/libxcb/xcb-proto/xcbgen/xtypes.py @@ -76,6 +76,7 @@ class Type(object): return complex_type.fields.append(new_field) + new_field.parent = complex_type def make_fd_of(self, module, complex_type, fd_name): ''' @@ -184,8 +185,6 @@ class ListType(Type): if elt.tag == 'list': elts = list(elt) self.expr = Expression(elts[0] if len(elts) else elt, self) - elif elt.tag == 'valueparam': - self.expr = Expression(elt, self) self.size = member.size if member.fixed_size() else None self.nmemb = self.expr.nmemb if self.expr.fixed_size() else None @@ -328,11 +327,6 @@ class ComplexType(Type): fkey = child.get('type') type = ListType(child, module.get_type(fkey), *self.lenfield_parent) visible = True - elif child.tag == 'valueparam': - field_name = child.get('value-list-name') - fkey = 'CARD32' - type = ListType(child, module.get_type(fkey), *self.lenfield_parent) - visible = True elif child.tag == 'switch': field_name = child.get('name') # construct the switch type name from the parent type and the field name -- cgit v1.2.3