# PaCkAgE DaTaStReAm xcb-proto 1 1392 # end of header 0707010004d287000081a40000000000000000000000014f7d29e9000001060000010000010007ffffffffffffffff0000001200000000xcb-proto/pkginfoPKG=xcb-proto NAME=xcb-proto 1.7.1 SPARC 64bit Solaris 10 VERSION=1.7.1 PSTAMP=5th April 2012 VENDOR=X.org EMAIL=http://xcb.freedesktop.org/dist/ DESC=X11 C-language bindings ARCH=sparc CATEGORY=utility CLASSES=none BASEDIR=/ ISTATES=S s 1 2 3 RSTATES=S s 1 2 3 0707010004d286000081a40000000000000000000000014f7d29e9000012770000010000010007ffffffffffffffff0000001100000000xcb-proto/pkgmap: 1 1392 1 d none /usr ? ? ? 1 d none /usr/local ? ? ? 1 d none /usr/local/lib 0755 root root 1 d none /usr/local/lib/pkgconfig 0755 root root 1 f none /usr/local/lib/pkgconfig/xcb-proto.pc 0644 root root 271 25401 1333602716 1 d none /usr/local/lib/python2.7 0755 root root 1 d none /usr/local/lib/python2.7/site-packages 0755 root root 1 d none /usr/local/lib/python2.7/site-packages/xcbgen 0755 root root 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/__init__.py 0644 root root 1 10 1333602715 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/__init__.pyc 0644 root root 144 7967 1333602716 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/__init__.pyo 0644 root root 144 7967 1333602716 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/error.py 0644 root root 116 9191 1333602715 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/error.pyc 0644 root root 447 26054 1333602716 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/error.pyo 0644 root root 447 26054 1333602716 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/expr.py 0644 root root 4595 19029 1333602715 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/expr.pyc 0644 root root 4005 35866 1333602716 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/expr.pyo 0644 root root 4005 35866 1333602716 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/matcher.py 0644 root root 3594 30579 1333602715 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/matcher.pyc 0644 root root 5227 61526 1333602716 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/matcher.pyo 0644 root root 5227 61526 1333602716 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/state.py 0644 root root 5167 3592 1333602715 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/state.pyc 0644 root root 6919 35729 1333602716 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/state.pyo 0644 root root 6919 35729 1333602716 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/xtypes.py 0644 root root 21941 38184 1333602715 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyc 0644 root root 22615 48217 1333602716 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyo 0644 root root 22615 48217 1333602716 1 d none /usr/local/share 0755 root root 1 d none /usr/local/share/xcb 0755 root root 1 f none /usr/local/share/xcb/bigreq.xml 0644 root root 1705 10701 1333602715 1 f none /usr/local/share/xcb/composite.xml 0644 root root 3424 12916 1333602715 1 f none /usr/local/share/xcb/damage.xml 0644 root root 3194 58686 1333602715 1 f none /usr/local/share/xcb/dpms.xml 0644 root root 3054 46215 1333602715 1 f none /usr/local/share/xcb/dri2.xml 0644 root root 8508 58736 1333602715 1 f none /usr/local/share/xcb/ge.xml 0644 root root 1863 22561 1333602715 1 f none /usr/local/share/xcb/glx.xml 0644 root root 44610 49549 1333602715 1 f none /usr/local/share/xcb/randr.xml 0644 root root 21602 32833 1333602715 1 f none /usr/local/share/xcb/record.xml 0644 root root 5924 18159 1333602715 1 f none /usr/local/share/xcb/render.xml 0644 root root 18070 55436 1333602715 1 f none /usr/local/share/xcb/res.xml 0644 root root 3094 40641 1333602715 1 f none /usr/local/share/xcb/screensaver.xml 0644 root root 4297 8591 1333602715 1 f none /usr/local/share/xcb/shape.xml 0644 root root 5834 2894 1333602715 1 f none /usr/local/share/xcb/shm.xml 0644 root root 4278 4541 1333602715 1 f none /usr/local/share/xcb/sync.xml 0644 root root 6523 38180 1333602715 1 f none /usr/local/share/xcb/xc_misc.xml 0644 root root 1162 24478 1333602715 1 f none /usr/local/share/xcb/xcb.xsd 0644 root root 12210 43992 1333602715 1 f none /usr/local/share/xcb/xevie.xml 0644 root root 2910 34040 1333602715 1 f none /usr/local/share/xcb/xf86dri.xml 0644 root root 5900 7115 1333602715 1 f none /usr/local/share/xcb/xf86vidmode.xml 0644 root root 14675 63904 1333602715 1 f none /usr/local/share/xcb/xfixes.xml 0644 root root 10891 54639 1333602715 1 f none /usr/local/share/xcb/xinerama.xml 0644 root root 3453 62864 1333602715 1 f none /usr/local/share/xcb/xinput.xml 0644 root root 31171 11320 1333602715 1 f none /usr/local/share/xcb/xkb.xml 0644 root root 97935 17794 1333602715 1 f none /usr/local/share/xcb/xprint.xml 0644 root root 11287 40665 1333602715 1 f none /usr/local/share/xcb/xproto.xml 0644 root root 81989 19430 1333602715 1 f none /usr/local/share/xcb/xselinux.xml 0644 root root 8216 56161 1333602715 1 f none /usr/local/share/xcb/xtest.xml 0644 root root 4003 40508 1333602715 1 f none /usr/local/share/xcb/xv.xml 0644 root root 15794 22970 1333602715 1 f none /usr/local/share/xcb/xvmc.xml 0644 root root 5363 5551 1333602715 1 i checkinstall 785 2565 1333602793 1 i pkginfo 262 20062 1333602793 07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000b00000000TRAILER!!!0707010004d287000081a40000000000000000000000014f7d29e9000001060000010000010007ffffffffffffffff0000000800000000pkginfoPKG=xcb-proto NAME=xcb-proto 1.7.1 SPARC 64bit Solaris 10 VERSION=1.7.1 PSTAMP=5th April 2012 VENDOR=X.org EMAIL=http://xcb.freedesktop.org/dist/ DESC=X11 C-language bindings ARCH=sparc CATEGORY=utility CLASSES=none BASEDIR=/ ISTATES=S s 1 2 3 RSTATES=S s 1 2 3 0707010004d286000081a40000000000000000000000014f7d29e9000012770000010000010007ffffffffffffffff0000000700000000pkgmap: 1 1392 1 d none /usr ? ? ? 1 d none /usr/local ? ? ? 1 d none /usr/local/lib 0755 root root 1 d none /usr/local/lib/pkgconfig 0755 root root 1 f none /usr/local/lib/pkgconfig/xcb-proto.pc 0644 root root 271 25401 1333602716 1 d none /usr/local/lib/python2.7 0755 root root 1 d none /usr/local/lib/python2.7/site-packages 0755 root root 1 d none /usr/local/lib/python2.7/site-packages/xcbgen 0755 root root 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/__init__.py 0644 root root 1 10 1333602715 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/__init__.pyc 0644 root root 144 7967 1333602716 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/__init__.pyo 0644 root root 144 7967 1333602716 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/error.py 0644 root root 116 9191 1333602715 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/error.pyc 0644 root root 447 26054 1333602716 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/error.pyo 0644 root root 447 26054 1333602716 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/expr.py 0644 root root 4595 19029 1333602715 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/expr.pyc 0644 root root 4005 35866 1333602716 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/expr.pyo 0644 root root 4005 35866 1333602716 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/matcher.py 0644 root root 3594 30579 1333602715 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/matcher.pyc 0644 root root 5227 61526 1333602716 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/matcher.pyo 0644 root root 5227 61526 1333602716 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/state.py 0644 root root 5167 3592 1333602715 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/state.pyc 0644 root root 6919 35729 1333602716 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/state.pyo 0644 root root 6919 35729 1333602716 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/xtypes.py 0644 root root 21941 38184 1333602715 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyc 0644 root root 22615 48217 1333602716 1 f none /usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyo 0644 root root 22615 48217 1333602716 1 d none /usr/local/share 0755 root root 1 d none /usr/local/share/xcb 0755 root root 1 f none /usr/local/share/xcb/bigreq.xml 0644 root root 1705 10701 1333602715 1 f none /usr/local/share/xcb/composite.xml 0644 root root 3424 12916 1333602715 1 f none /usr/local/share/xcb/damage.xml 0644 root root 3194 58686 1333602715 1 f none /usr/local/share/xcb/dpms.xml 0644 root root 3054 46215 1333602715 1 f none /usr/local/share/xcb/dri2.xml 0644 root root 8508 58736 1333602715 1 f none /usr/local/share/xcb/ge.xml 0644 root root 1863 22561 1333602715 1 f none /usr/local/share/xcb/glx.xml 0644 root root 44610 49549 1333602715 1 f none /usr/local/share/xcb/randr.xml 0644 root root 21602 32833 1333602715 1 f none /usr/local/share/xcb/record.xml 0644 root root 5924 18159 1333602715 1 f none /usr/local/share/xcb/render.xml 0644 root root 18070 55436 1333602715 1 f none /usr/local/share/xcb/res.xml 0644 root root 3094 40641 1333602715 1 f none /usr/local/share/xcb/screensaver.xml 0644 root root 4297 8591 1333602715 1 f none /usr/local/share/xcb/shape.xml 0644 root root 5834 2894 1333602715 1 f none /usr/local/share/xcb/shm.xml 0644 root root 4278 4541 1333602715 1 f none /usr/local/share/xcb/sync.xml 0644 root root 6523 38180 1333602715 1 f none /usr/local/share/xcb/xc_misc.xml 0644 root root 1162 24478 1333602715 1 f none /usr/local/share/xcb/xcb.xsd 0644 root root 12210 43992 1333602715 1 f none /usr/local/share/xcb/xevie.xml 0644 root root 2910 34040 1333602715 1 f none /usr/local/share/xcb/xf86dri.xml 0644 root root 5900 7115 1333602715 1 f none /usr/local/share/xcb/xf86vidmode.xml 0644 root root 14675 63904 1333602715 1 f none /usr/local/share/xcb/xfixes.xml 0644 root root 10891 54639 1333602715 1 f none /usr/local/share/xcb/xinerama.xml 0644 root root 3453 62864 1333602715 1 f none /usr/local/share/xcb/xinput.xml 0644 root root 31171 11320 1333602715 1 f none /usr/local/share/xcb/xkb.xml 0644 root root 97935 17794 1333602715 1 f none /usr/local/share/xcb/xprint.xml 0644 root root 11287 40665 1333602715 1 f none /usr/local/share/xcb/xproto.xml 0644 root root 81989 19430 1333602715 1 f none /usr/local/share/xcb/xselinux.xml 0644 root root 8216 56161 1333602715 1 f none /usr/local/share/xcb/xtest.xml 0644 root root 4003 40508 1333602715 1 f none /usr/local/share/xcb/xv.xml 0644 root root 15794 22970 1333602715 1 f none /usr/local/share/xcb/xvmc.xml 0644 root root 5363 5551 1333602715 1 i checkinstall 785 2565 1333602793 1 i pkginfo 262 20062 1333602793 0707010004d2c4000041ed0000000000000000000000024f7d29e9000000000000010000010007ffffffffffffffff0000000800000000install0707010004d2c5000081ed0000000000000000000000014f7d29e9000003110000010000010007ffffffffffffffff0000001500000000install/checkinstall#!/bin/sh # expected_bits="64" expected_release="5.10" expected_platform="sparc" # release=`uname -r` platform=`uname -p` bits=`isainfo -b` # if [ ${platform} != ${expected_platform} ]; then echo "\n\n\n\tThis package must be installed on a ${expected_platform} architecture\n" echo "\tAborting installation.\n\n\n" exit 1 fi if [ ${release} != ${expected_release} ]; then echo "\n\n\n\tThis package must be installed on a ${expected_release} machine\n" echo "\tAborting installation.\n\n\n" exit 1 fi if [ ${bits} != ${expected_bits} ]; then echo "\n\n\n\tThis package must be installed on a ${expected_bits} bit machine\n" echo "\tYour machine is running a ${bits} bit O.S. currently\n" echo "\tAborting installation.\n\n\n" exit 1 fi exit 0 0707010004d288000041ed0000000000000000000000034f7d29e9000000000000010000010007ffffffffffffffff0000000500000000root0707010004d289000041ed0000000000000000000000034f7d29e9000000000000010000010007ffffffffffffffff0000000900000000root/usr0707010004d28a000041ed0000000000000000000000044f7d29e9000000000000010000010007ffffffffffffffff0000000f00000000root/usr/local0707010004d2a3000041ed0000000000000000000000034f7d29e9000000000000010000010007ffffffffffffffff0000001500000000root/usr/local/share0707010004d2a4000041ed0000000000000000000000024f7d29e9000000000000010000010007ffffffffffffffff0000001900000000root/usr/local/share/xcb0707010004d2c3000081a40000000000000000000000014f7d299b000014f30000010000010007ffffffffffffffff0000002200000000root/usr/local/share/xcb/xvmc.xml xv num length length 4 length num 0707010004d2a7000081a40000000000000000000000014f7d299b00000c7a0000010000010007ffffffffffffffff0000002400000000root/usr/local/share/xcb/damage.xml xproto xfixes 0707010004d2a8000081a40000000000000000000000014f7d299b00000bee0000010000010007ffffffffffffffff0000002200000000root/usr/local/share/xcb/dpms.xml 0707010004d2bf000081a40000000000000000000000014f7d299b000140450000010000010007ffffffffffffffff0000002400000000root/usr/local/share/xcb/xproto.xml WINDOW PIXMAP FONT GCONTEXT 0 1 2 3 4 5 visuals_len 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 0 1 2 allowed_depths_len authorization_protocol_name_len authorization_protocol_data_len reason_len length 4 0 1 vendor_len pixmap_formats_len roots_len 0 1 2 3 4 5 6 7 15 0 1 2 3 4 5 6 7 8 9 10 11 12 0 8 9 10 11 12 15 0 1 0 1 2 3 4 5 6 7 0 1 2 3 31 0 1 2 0 1 0 1 0 0 0 0 1 0 20 10 5 0 1 2 0 1 2 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0 1 0 0 1 2 3 4 5 6 7 8 9 10 0 1 2 0 1 0 1 2 3 4 5 6 0 1 2 3 4 0 1 children_len name_len name_len 0 1 2 data_len format 8 0 value_len format 8 atoms_len 0 1 32 0 1 0 1 2 3 4 0 0 1 2 3 4 5 0 0 1 2 3 4 5 6 7 events_len 0 1 2 3 32 name_len 0 1 properties_len char_infos_len string_len1 name_len pattern_len names_len pattern_len properties_len name_len font_qty path_len 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 1 2 0 1 2 3 0 1 2 0 1 2 3 0 1 0 1 0 1 dashes_len 0 1 2 3 0 1 0 1 2 0 1 2 length 4 string_len string_len 0 1 cmaps_len name_len pixels_len masks_len pixels_len 0 1 2 name_len colors_len name_len 0 0 0 1 2 name_len names_len keycode_count keysyms_per_keycode length 0 1 2 3 4 5 6 7 0 1 0 1 2 32 0 1 2 0 1 2 0 1 0 1 2 5 6 address_len address_len hosts_len 0 1 0 1 2 0 atoms_len 0 1 0 1 2 map_len map_len 0 1 2 3 4 5 6 7 keycodes_per_modifier 8 keycodes_per_modifier 8 0707010004d2ae000081a40000000000000000000000014f7d299b000046960000010000010007ffffffffffffffff0000002400000000root/usr/local/share/xcb/render.xml xproto 16 32 48 0 1 2 3 4 5 6 7 8 9 10 11 12 num_visuals num_depths num_formats num_screens num_subpixel num_values glyphs_len glyphs_len num_aliases num_filters filter_len num_stops num_stops num_stops num_stops num_stops num_stops 0707010004d2a9000081a40000000000000000000000014f7d299b0000213c0000010000010007ffffffffffffffff0000002200000000root/usr/local/share/xcb/dri2.xml xproto 1 2 3 driver_name_length driver_name_length 3 3 driver_name_length device_name_length count count 0707010004d2b2000081a40000000000000000000000014f7d299b000016ca0000010000010007ffffffffffffffff0000002300000000root/usr/local/share/xcb/shape.xml xproto rectangles_len 0707010004d2bb000081a40000000000000000000000014f7d299b00000d7d0000010000010007ffffffffffffffff0000002600000000root/usr/local/share/xcb/xinerama.xml xproto number 0707010004d2c1000081a40000000000000000000000014f7d299b00000fa30000010000010007ffffffffffffffff0000002300000000root/usr/local/share/xcb/xtest.xml xproto 0 1 0707010004d2c0000081a40000000000000000000000014f7d299b000020180000010000010007ffffffffffffffff0000002600000000root/usr/local/share/xcb/xselinux.xml xproto context_len context_len context_len context_len context_len context_len context_len object_context_len data_context_len context_len context_len context_len context_len context_len context_len properties_len context_len context_len context_len context_len context_len context_len selections_len context_len 0707010004d2af000081a40000000000000000000000014f7d299b00000c160000010000010007ffffffffffffffff0000002100000000root/usr/local/share/xcb/res.xml xproto num_clients num_types 0707010004d2ba000081a40000000000000000000000014f7d299b00002a8b0000010000010007ffffffffffffffff0000002400000000root/usr/local/share/xcb/xfixes.xml xproto render shape 0 1 2 0 width height length 2 nbytes nbytes nbytes width height nbytes 0707010004d2b0000081a40000000000000000000000014f7d299b000010c90000010000010007ffffffffffffffff0000002900000000root/usr/local/share/xcb/screensaver.xml xproto 0 1 0707010004d2b6000081a40000000000000000000000014f7d299b00002fb20000010000010007ffffffffffffffff0000002100000000root/usr/local/share/xcb/xcb.xsd 0707010004d2c2000081a40000000000000000000000014f7d299b00003db20000010000010007ffffffffffffffff0000002000000000root/usr/local/share/xcb/xv.xml xproto shm 0 1 2 3 4 0 1 name_size num_formats name_size num_planes num_planes data_size size 16 32 num_adaptors num_encodings num_attributes num_formats num_planes num_planes 0707010004d2be000081a40000000000000000000000014f7d299b00002c170000010000010007ffffffffffffffff0000002400000000root/usr/local/share/xcb/xprint.xml xproto nameLen descLen 0 1 0 0 1 1 2 3 4 5 6 1 2 3 4 5 6 7 printerNameLen localeLen listCount printerNameLen localeLen len_data dataLen nameLen valueLen listCount 0707010004d2ac000081a40000000000000000000000014f7d299b000054620000010000010007ffffffffffffffff0000002300000000root/usr/local/share/xcb/randr.xml xproto render 0 1 2 3 4 5 nRates 0 1 2 3 0 1 2 3 nSizes nInfo nSizes 0 1 2 3 4 5 6 7 8 9 10 11 12 13 num_crtcs num_outputs num_modes names_len num_crtcs num_modes num_clones name_len num_atoms length num_units format 8 num_items format 8 num_outputs num_possible_outputs size size size size size size num_crtcs num_outputs num_modes names_len filter_len pending_len pending_nparams current_len current_nparams 0 1 2 0707010004d2bc000081a40000000000000000000000014f7d299b000079c30000010000010007ffffffffffffffff0000002400000000root/usr/local/share/xcb/xinput.xml xproto 0 1 0 1 name_len 0 1 2 3 4 devices_len 0 1 2 3 4 5 6 axes_len num_classes num_classes num_this_classes num_all_classes num_classes num_classes num_classes num_classes num_classes 32 num_keysyms num_keysyms length keycode_count keysyms_per_keycode keycodes_per_modifier 8 keycodes_per_modifier 8 map_size map_size 32 32 num_valuators num_events 32 num_classes num_valuators num_valuators num_valuators num_valuators num_valuators 6 4 4 3 28 28 0707010004d2b5000081a40000000000000000000000014f7d299b0000048a0000010000010007ffffffffffffffff0000002500000000root/usr/local/share/xcb/xc_misc.xml ids_len 0707010004d2b4000081a40000000000000000000000014f7d299b0000197b0000010000010007ffffffffffffffff0000002200000000root/usr/local/share/xcb/sync.xml xproto 0 1 2 3 4 5 name_len counters_len 0707010004d2a6000081a40000000000000000000000014f7d299b00000d600000010000010007ffffffffffffffff0000002700000000root/usr/local/share/xcb/composite.xml xproto xfixes 0707010004d2b9000081a40000000000000000000000014f7d299b000039530000010000010007ffffffffffffffff0000002900000000root/usr/local/share/xcb/xf86vidmode.xml 0 1 2 3 4 5 6 7 8 9 10 11 12 0 0 1 privsize privsize num_hsync num_vsync vendor_length vendor_length 3 3 vendor_length model_length modecount privsize privsize privsize privsize 1 flags 1 clocks size 1 1 size 1 1 size 1 1 size 1 1 size 1 1 size 1 1 0707010004d2a5000081a40000000000000000000000014f7d299b000006a90000010000010007ffffffffffffffff0000002400000000root/usr/local/share/xcb/bigreq.xml 0707010004d2ad000081a40000000000000000000000014f7d299b000017240000010000010007ffffffffffffffff0000002400000000root/usr/local/share/xcb/record.xml 0 1 2 1 2 3 num_ranges num_client_specs num_ranges num_client_specs num_ranges num_client_specs num_intercepted_clients length 4 0707010004d2b7000081a40000000000000000000000014f7d299b00000b5e0000010000010007ffffffffffffffff0000002300000000root/usr/local/share/xcb/xevie.xml 0707010004d2b3000081a40000000000000000000000014f7d299b000010b60000010000010007ffffffffffffffff0000002100000000root/usr/local/share/xcb/shm.xml xproto 0707010004d2ab000081a40000000000000000000000014f7d299b0000ae420000010000010007ffffffffffffffff0000002100000000root/usr/local/share/xcb/glx.xml xproto xproto:WINDOW PBUFFER glx:PIXMAP glx:WINDOW 32791 32792 32793 32794 data_len 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 16777215 length 24 length 4 str_len str_len length num_attribs 2 num_attribs 2 num_attribs 2 num_attribs 2 num_attribs 2 num_attribs 2 num_versions 2 gl_str_len glx_str_len num_attribs 2 num_versions 3 gl_str_len glx_str_len n 7168 7169 7170 length 4 n length 2 n n n n n n n n n n n n n length 4 n n n n n n length 4 n n n n n length 4 n length length 4 n n length 4 n n length 4 length 4 n n length 4 n n length 4 n length n n n 0707010004d2b8000081a40000000000000000000000014f7d299b0000170c0000010000010007ffffffffffffffff0000002500000000root/usr/local/share/xcb/xf86dri.xml bus_id_len client_driver_name_len num_clip_rects num_back_clip_rects device_private_size 0707010004d2bd000081a40000000000000000000000014f7d299b00017e8f0000010000010007ffffffffffffffff0000002100000000root/usr/local/share/xcb/xkb.xml xproto 255 32 4 0 1 2 3 4 5 6 7 8 9 10 11 0 1 2 0 1 2 3 4 5 6 0 1 2 3 4 5 6 7 0 1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 0 1 2 3 4 5 6 7 8 9 10 11 12 27 28 29 30 31 0 1 2 3 4 5 6 7 8 9 6 7 0 4 768 1280 0 5 768 256 512 768 1024 1280 1536 65280 0 1 2 3 254 255 0 1 2 3 7 0 6 7 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 0 1 2 3 4 7 127 7 6 5 4 3 2 1 0 4 3 2 1 0 0 1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 0 1 2 3 4 5 6 7 0 1 2 3 4 0 1 2 3 4 4 4 4 length length nMapEntries hasPreserve nMapEntries 4 nSyms 0 1 2 3 4 129 130 131 132 nMapEntries preserve nMapEntries nameLength valueLength nPoints nOutlines 4 4 4 nKeys nRows nKeys 1 2 3 4 5 nRows nDoodads nOverlays length namesPresent mapsPresent 255 254 253 0 1 2 2 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 0 1 2 1 0 0 1 2 2 3 3 4 5 6 0 2 0 1 2 3 4 0 1 2 3 4 5 6 7 0 1 2 6 0 1 0 1 2 3 4 5 affectWhich clear selectAll NewKeyboardNotify StateNotify ControlsNotify IndicatorStateNotify IndicatorMapNotify NamesNotify CompatMapNotify BellNotify ActionMessage AccessXNotify ExtensionDeviceNotify 32 32 present KeyTypes nTypes KeySyms nKeySyms KeyActions nKeyActions totalActions KeyBehaviors totalKeyBehaviors VirtualMods nVModMapKeys ExplicitComponents totalKeyExplicit ModifierMap totalModMapKeys VirtualModMap totalVModMapKeys present KeyTypes nTypes KeySyms nKeySyms KeyActions nKeyActions totalActions KeyBehaviors totalKeyBehaviors VirtualMods nVModMapKeys ExplicitComponents totalKeyExplicit ModifierMap totalModMapKeys VirtualModMap totalVModMapKeys 16 nSIRtrn groupsRtrn 16 nSI groups nIndicators which which Keycodes Geometry Symbols PhysSymbols Types Compat KeyTypeNames nTypes KTLevelNames nTypes IndicatorNames indicators VirtualModNames virtualMods GroupNames groupNames KeyNames nKeys KeyAliases nKeyAliases RGNames nRadioGroups which Keycodes Geometry Symbols PhysSymbols Types Compat KeyTypeNames nTypes KTLevelNames nKTLevels IndicatorNames indicators VirtualModNames virtualMods GroupNames groupNames KeyNames nKeys KeyAliases nKeyAliases RGNames nRadioGroups nProperties nColors nShapes nSections nDoodads nKeyAliases nProperties nColors nShapes nSections nDoodads nKeyAliases keymapsSpecLen keycodesSpecLen typesSpecLen compatMapSpecLen symbolsSpecLen geometrySpecLen nKeymaps nKeycodes nTypes nCompatMaps nSymbols nGeometries keymapsSpecLen keycodesSpecLen typesSpecLen compatMapSpecLen symbolsSpecLen geometrySpecLen reported Types present KeyTypes nTypes KeySyms nKeySyms KeyActions nKeyActions totalActions KeyBehaviors totalKeyBehaviors VirtualMods nVModMapKeys ExplicitComponents totalKeyExplicit ModifierMap totalModMapKeys VirtualModMap totalVModMapKeys CompatMap 16 nSIRtrn groupsRtrn ClientSymbols present KeyTypes nTypes KeySyms nKeySyms KeyActions nKeyActions totalActions KeyBehaviors totalKeyBehaviors VirtualMods nVModMapKeys ExplicitComponents totalKeyExplicit ModifierMap totalModMapKeys VirtualModMap totalVModMapKeys ServerSymbols present KeyTypes nTypes KeySyms nKeySyms KeyActions nKeyActions totalActions KeyBehaviors totalKeyBehaviors VirtualMods nVModMapKeys ExplicitComponents totalKeyExplicit ModifierMap totalModMapKeys VirtualModMap totalVModMapKeys IndicatorMaps nIndicators KeyNames which Keycodes Geometry Symbols PhysSymbols Types Compat KeyTypeNames nTypes KTLevelNames nKTLevels IndicatorNames indicators VirtualModNames virtualMods GroupNames groupNames KeyNames nKeys KeyAliases nKeyAliases RGNames nRadioGroups OtherNames which Keycodes Geometry Symbols PhysSymbols Types Compat KeyTypeNames nTypes KTLevelNames nKTLevels IndicatorNames indicators VirtualModNames virtualMods GroupNames groupNames KeyNames nKeys KeyAliases nKeyAliases RGNames nRadioGroups Geometry nProperties nColors nShapes nSections nDoodads nKeyAliases nameLen nBtnsRtrn nDeviceLedFBs nBtns nDeviceLedFBs msgLength 8 0707010004d2aa000081a40000000000000000000000014f7d299b000007470000010000010007ffffffffffffffff0000002000000000root/usr/local/share/xcb/ge.xml 0707010004d28b000041ed0000000000000000000000044f7d29e9000000000000010000010007ffffffffffffffff0000001300000000root/usr/local/lib0707010004d28c000041ed0000000000000000000000024f7d29e9000000000000010000010007ffffffffffffffff0000001d00000000root/usr/local/lib/pkgconfig0707010004d28d000081a40000000000000000000000014f7d299c0000010f0000010000010007ffffffffffffffff0000002a00000000root/usr/local/lib/pkgconfig/xcb-proto.pcprefix=/usr/local exec_prefix=${prefix} datarootdir=${prefix}/share datadir=${datarootdir} libdir=${exec_prefix}/lib xcbincludedir=${datadir}/xcb pythondir=${prefix}/lib/python2.7/site-packages Name: XCB Proto Description: X protocol descriptions for XCB Version: 1.7.1 0707010004d28e000041ed0000000000000000000000034f7d29e9000000000000010000010007ffffffffffffffff0000001d00000000root/usr/local/lib/python2.70707010004d28f000041ed0000000000000000000000034f7d29e9000000000000010000010007ffffffffffffffff0000002b00000000root/usr/local/lib/python2.7/site-packages0707010004d290000041ed0000000000000000000000024f7d29e9000000000000010000010007ffffffffffffffff0000003200000000root/usr/local/lib/python2.7/site-packages/xcbgen0707010004d298000081a40000000000000000000000014f7d299c00000fa50000010000010007ffffffffffffffff0000003b00000000root/usr/local/lib/python2.7/site-packages/xcbgen/expr.pycó ›)}Oc@s6dZdefd„ƒYZdefd„ƒYZdS(sR This module contains helper classes for structure fields and length expressions. tFieldcBseZdZd„ZRS(sŸ Represents a field of a structure. type is the datatype object for the field. field_type is the name of the type (string tuple) field_name is the name of the structure field. visible is true iff the field should be in the request API. wire is true iff the field should be in the request structure. auto is true iff the field is on the wire but not in the request API (e.g. opcode) cCs:||_||_||_||_||_||_dS(N(ttypet field_typet field_nametvisibletwiretauto(tselfRRRRRR((s5/usr/local/lib/python2.7/site-packages/xcbgen/expr.pyt__init__s      (t__name__t __module__t__doc__R(((s5/usr/local/lib/python2.7/site-packages/xcbgen/expr.pyRs t ExpressioncBs)eZdZd„Zd„Zd„ZRS(sâ Represents a mathematical expression for a list length or exprfield. Public fields: op is the operation (text +,*,/,<<,~) or None. lhs and rhs are the sub-Expressions if op is set. lenfield_name is the name of the length field, or None for request lists. lenfield is the Field object for the length field, or None. bitfield is True if the length field is a bitmask instead of a number. nmemb is the fixed size (value)of the expression, or None cCs¼||_d|_d|_d|_d|_d|_t|_t|_ d|_ d|_ d|_ |j dkr”|jdƒd|_d|_n$|j dkr²|j|_n|j dkrú|jdƒ|_|jdƒ|_t|_t|_ n¾|j d kr†|jd ƒ|_ tt|ƒd |ƒ|_ tt|ƒd |ƒ|_ |j j|_|jdkr¸|j j|_q¸n2|j d krÕ|jd ƒ|_ tt|ƒd |ƒ|_ |j j|_nã|j d krüt|jd ƒ|_n¼|j dkrBd|_ tt|ƒd |ƒ|_ |j j|_nv|j dkrxd|_ |jdƒ|jf|_n@|j dkr¥d|_ |jdƒ|_ntd|j ƒ‚dS(Ntlisttnamet_lentCARD32tfieldreft valueparamsvalue-mask-namesvalue-mask-typetopiitunoptvaluetpopcounttenumreftreftsumofsundefined tag '%s'(tparenttNonetnmembt lenfield_namet lenfield_typetlenfield_parenttlenfieldtFalsetlenwiretbitfieldRtlhstrhsttagtgetttexttTrueR R tintt Exception(RteltR((s5/usr/local/lib/python2.7/site-packages/xcbgen/expr.pyR$sZ                 cCs |jdkS(N(RR(R((s5/usr/local/lib/python2.7/site-packages/xcbgen/expr.pyt fixed_sizelscCsä|jdkr;|j|jdƒ|_|jd|_n¥|jdkràx“t|ƒD]‚}tg|jD]}|j|f^qjƒ}|j|jƒkrW|j r¹|j d|_ n ||_ ||jj |_PqWqWWndS(NRiiRiÿÿÿÿ( Rtget_typeRRtreversedtdicttfieldsRtkeyst is_bitcasetparentsRR(RtmoduleR4tptfR1((s5/usr/local/lib/python2.7/site-packages/xcbgen/expr.pytresolveos+  (R R R RR-R8(((s5/usr/local/lib/python2.7/site-packages/xcbgen/expr.pyR s  H N(R tobjectRR (((s5/usr/local/lib/python2.7/site-packages/xcbgen/expr.pyts0707010004d29b000081a40000000000000000000000014f7d299c0000146b0000010000010007ffffffffffffffff0000003e00000000root/usr/local/lib/python2.7/site-packages/xcbgen/matcher.pycó ›)}Oc@sdZddlmZddlmZddlTd„Zd„Zd„Zd„Z d „Z d „Z d „Z d „Z d „Zd„Zd„Zd„Zi ed6ed6ed6e d6e d6e d6e d6e d6ed6ed6ed6ed6Zd„ZdS(s XML parser. One function for each top-level element in the schema. Most functions just declare a new object and add it to the module. For typedefs, eventcopies, xidtypes, and other aliases though, we do not create a new type object, we just record the existing one under a new name. iÿÿÿÿ(tjoin(tparse(t*cCsƒddlm}t|jd|jƒ}t|ƒjƒ}|j|ƒ}t||ƒ|j |jƒs|j |j|ƒndS(s For imports, we load the file, create a new namespace object, execute recursively, then record the import (for header files, etc.) iÿÿÿÿ(tstates%s.xmlN( txcbgenRRtdirttextRtgetroott Namespacetexecutet has_importt add_import(tnodetmodulet namespaceRtnew_filetnew_roott new_namespace((s8/usr/local/lib/python2.7/site-packages/xcbgen/matcher.pytimport_s cCsT|jdƒ}|j|f}|j|jdƒƒ}|j||j||ƒdS(Ntnewnametoldname(tgettprefixtget_typetadd_typetns(R R Rtidtnamettype((s8/usr/local/lib/python2.7/site-packages/xcbgen/matcher.pyttypedefscCsK|jdƒ}|j|f}|jdƒ}|j||j||ƒdS(NRtCARD32(RRRRR(R R RRRR((s8/usr/local/lib/python2.7/site-packages/xcbgen/matcher.pytxidtype"scCsK|jdƒ}|j|f}|jdƒ}|j||j||ƒdS(NRR(RRRRR(R R RRRR((s8/usr/local/lib/python2.7/site-packages/xcbgen/matcher.pytxidunion(scCsK|jdƒ}|j|f}t||ƒ}|j||j||ƒdS(NR(RRtEnumRR(R R RRRR((s8/usr/local/lib/python2.7/site-packages/xcbgen/matcher.pytenum.scCsK|jdƒ}|j|f}t||ƒ}|j||j||ƒdS(NR(RRtStructRR(R R RRRR((s8/usr/local/lib/python2.7/site-packages/xcbgen/matcher.pytstruct4scCsK|jdƒ}|j|f}t||ƒ}|j||j||ƒdS(NR(RRtUnionRR(R R RRRR((s8/usr/local/lib/python2.7/site-packages/xcbgen/matcher.pytunion:scCsE|jdƒ}|j|f}t||ƒ}|j|||ƒdS(NR(RRtRequestt add_request(R R RRRR((s8/usr/local/lib/python2.7/site-packages/xcbgen/matcher.pytrequest@scCsa|jdƒ}|j|f}t||ƒ}|j|jdƒ|tƒ|j|||ƒdS(NRtnumber(RRtEventt add_opcodetTruet add_event(R R RRRtevent((s8/usr/local/lib/python2.7/site-packages/xcbgen/matcher.pyR/Fs cCsj|jdƒ}|j|f}|j|jdƒƒ}|j|jdƒ|tƒ|j|||ƒdS(NRtrefR*(RRt get_eventR,tFalseR.(R R RRRR/((s8/usr/local/lib/python2.7/site-packages/xcbgen/matcher.pyt eventcopyMs cCsa|jdƒ}|j|f}t||ƒ}|j|jdƒ|tƒ|j|||ƒdS(NRR*(RRtErrorR,R-t add_error(R R RRRterror((s8/usr/local/lib/python2.7/site-packages/xcbgen/matcher.pyR6Ts cCsj|jdƒ}|j|f}|j|jdƒƒ}|j|jdƒ|tƒ|j|||ƒdS(NRR0R*(RRt get_errorR,R2R5(R R RRRR6((s8/usr/local/lib/python2.7/site-packages/xcbgen/matcher.pyt errorcopy[s timportRRR R"R$R&R)R/R3R6R8cCs5x.t|jƒD]}t|j|||ƒqWdS(N(tlisttroottfuncsttag(R Rtelt((s8/usr/local/lib/python2.7/site-packages/xcbgen/matcher.pyR osN(t__doc__tos.pathRtxml.etree.cElementTreeRt xcbgen.xtypesRRRR R"R$R&R)R/R3R6R8R<R (((s8/usr/local/lib/python2.7/site-packages/xcbgen/matcher.pyts8               0707010004d2a2000081a40000000000000000000000014f7d299c000058570000010000010007ffffffffffffffff0000003d00000000root/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyoó ›)}Oc@s!dZddlmZmZddlZdefd„ƒYZdefd„ƒYZed0d ƒZed1d ƒZ ed2d ƒZ ed3d ƒZ ed4d ƒZ ed5d ƒZ ed6d ƒZed7d ƒZed8dƒZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd „ƒYZd!efd"„ƒYZd#efd$„ƒYZd%efd&„ƒYZd'efd(„ƒYZd)efd*„ƒYZd+efd,„ƒYZd-efd.„ƒYZeedƒejd/e e!e ƒZ"dS(9sB This module contains the classes which represent XCB data types. iÿÿÿÿ(tFieldt ExpressionNtTypecBs;eZdZd„Zd„Zd„Zd„Zd„ZRS(sm Abstract base class for all XCB data types. Contains default fields, and some abstract methods. cCsy||_d|_d|_t|_t|_t|_t|_t|_ t|_ t|_ t|_ t|_ t|_dS(s§ Default structure initializer. Sets up default fields. Public fields: name is a tuple of strings specifying the full type name. size is the size of the datatype in bytes, or None if variable-sized. nmemb is 1 for non-list types, None for variable-sized lists, otherwise number of elts. booleans for identifying subclasses, because I can't figure out isinstance(). N(tnametNonetsizetnmembtFalsetresolvedt is_simpletis_listtis_exprt is_containertis_replytis_uniontis_padt is_switcht is_bitcase(tselfR((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyt__init__ s            cCstdƒ‚dS(s€ Abstract method for resolving a type. This should make sure any referenced types are already declared. s'abstract resolve method not overridden!N(t Exception(Rtmodule((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pytresolve&scCstdƒ‚dS(sÑ Abstract method for outputting code. These are declared in the language-specific modules, and there must be a dictionary containing them declared when this module is imported! s#abstract out method not overridden!N(R(RR((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pytout-scCstdƒ‚dS(sQ Abstract method for determining if the data type is fixed-size. s*abstract fixed_size method not overridden!N(R(R((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyt fixed_size5sc Cslt||||||ƒ}x:t|jƒD])\} } | tkr+||j| fƒ|jj|jdƒ|j fƒq2q2WdS( NiiRttvaluetbits%ui( R*RtvaluestbitstlisttlenRtgetttagttexttint(RRtelttitemR:((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRzs  %3cCs t|_dS(N(R+R(RR((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRŒscCstS(N(R+(R((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRstenum( R'R(R)RRRR-R.R(((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyR8rs    tListTypecBs2eZdZd„Zd„Zd„Zd„ZRS(sA Derived class which represents a list of some other datatype. Fixed- or variable-sized. Public fields added: member is the datatype of the list elements. parent is the structure type containing the list. expr is an Expression object containing the length information, for variable-sized lists. cGsätj||jƒt|_||_t|ƒ|_|jdkrzt|ƒ}t t |ƒrh|dn||ƒ|_ n$|jdkržt ||ƒ|_ n|j ƒr³|j nd|_ |j j ƒr×|j jnd|_dS(NR>it valueparam(RRRR+R tmemberR>tparentsRARR?texprRRRR(RRDRItparenttelts((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRžs   +c Cså|jƒs¿|jj}|jj} |jj} t} x=|jD]2} x)| jD]} | j| krPt } qPqPWq@W| r¿|j |ƒ}|j |ƒ}|j |||| t| t ƒq¿nt j ||||||||ƒdS(N(RRKt lenfield_typet lenfield_nametlenwireR+RJRRRtget_typet get_type_nameR&R(RRRRRR R!R"tlenfidRORPtneedlenRLR%ttypeRN((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyR&­s    %cCs¥|jr dS|jj|ƒ|jj||jƒ|jƒs˜xV|jD]H}x?|jD]4}|j|jjkrY|j rY||j_ PqYqYWqIWnt |_dS(N( RRIRRKRJRRRROR!tlenfieldR+(RRRLR%((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRÅs   cCs|jjƒo|jjƒS(N(RIRRK(R((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRÖs(R'R(R)RR&RR(((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRG•s    tExprTypecBs)eZdZd„Zd„Zd„ZRS(s¡ Derived class which represents an exprfield. Fixed size. Public fields added: expr is an Expression object containing the value of the field. cGsctj||jƒt|_||_||_tt|ƒd|ƒ|_ |j |_ d|_ dS(Nii( RRRR+R RIRJRR>RKRR(RRDRIRJ((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRàs    cCs*|jr dS|jj|ƒt|_dS(N(RRIRR+(RR((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRës cCstS(N(R+(R((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRñs(R'R(R)RRR(((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRWÙs tPadTypecBs)eZdZd„Zd„Zd„ZRS(s9 Derived class which represents a padding field. cCsVtj|tjƒt|_d|_|dkr7dnt|j dƒdƒ|_ dS(Nitbytesi( RRttcard8RR+RRRRCR@R(RRD((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRøs  cCs t|_dS(N(R+R(RR((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRþscCstS(N(R+(R((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRs(R'R(R)RRR(((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRXôs  t ComplexTypecBs2eZdZd„Zd„Zd„Zd„ZRS(s¼ Derived class which represents a structure. Base type for all structure types. Public fields added: fields is an array of Field objects describing the structure fields. cCsMtj||ƒt|_||_g|_d|_d|_|g|_dS(Nii( RRR+R RDRRRtlenfield_parent(RRRD((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyR s     c Csy|jr dSd}xLt|jƒD];}|jdkrmdt|ƒ}d}t|ƒ}|d}t}n¶|jdkr²|jdƒ}|jdƒ}|j|ƒ}t }nq|jdkr|jdƒ}|jdƒ}t ||j|ƒ|j Œ}t}n|jd krZ|jdƒ}|jdƒ}t ||j|ƒ|j Œ}t }nÉ|jd kr¥|jd ƒ}d }t ||j|ƒ|j Œ}t }n~|jd kr#|jdƒ}|j |f}t|||j Œ}t }|j|||||t tƒ|j|ƒq#nq#|j|ƒ}|j|||||t tƒ|j|ƒq#W|jƒt |_dS(NitpadtCARD8iR%RRUt exprfieldR>RHsvalue-list-nametCARD32tswitch(RR>RDRAtstrRXRR@RQR+RWR\RGRt SwitchTypeR&RRRt calc_size( RRtpadstchildRtfkeyRUR R((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRsX          cCsld|_x\|jD]Q}|js(qn|jjƒrZ|j|jj|jj|_qd|_PqWdS(Ni(RRR!RURRR(Rtm((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRdMs  # cCs+x$|jD]}|jjƒs tSq WtS(N(RRURRR+(RRh((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRXs(R'R(R)RRRdR(((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyR[s  8 RccBs;eZdZd„Zd„Zd„Zd„Zd„ZRS(s› Derived class which represents a List of Items. Public fields added: bitcases is an array of Bitcase objects describing the list items cGs|tj|||ƒ||_t|ƒ|g|_g|_t|_t|ƒ}tt |ƒri|dn||ƒ|_ dS(Ni( R[RRJR>R\tbitcasesR+RRR?RK(RRRDRJRM((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRfs    c Cs˜|jr dSt|jƒ|g}x[tt|jƒƒD]D\}}|jdkr9|jdƒ}|dkr†|jd|f}n|j|f}t ||||Œ}|dkrÌt |_ |j}nt }|j |||||t t ƒ|j|ƒt } xv|jD]h} x@t|jƒD]/\} } | tkr$| |j| RJRRDRAR@RRt BitcaseTypeRthas_nameR+R&RRRRRd( RRRJtindexRfRRRUR tinsertedR#R$R%((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRss6 "         c Cså|jƒs¿|jj}|jj} |jj} t} x=|jD]2} x)| jD]} | j| krPt } qPqPWq@W| r¿|j |ƒ}|j |ƒ}|j |||| t| t ƒq¿nt j ||||||||ƒdS(N(RRKRNRORPR+RJRRRRQRRR&R(RRRRRR R!R"RSRORPRTRLR%RURN((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyR& s    %cCsdS(N((R((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRd¹scCstS(N(R(R((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyR¾s(R'R(R)RRR&RdR(((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRc^s  -  tStructcBseZdZejdZRS(s8 Derived class representing a struct data type. tstruct(R'R(R)R-R.R(((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRoÆstUnioncBs$eZdZd„ZejdZRS(s7 Derived class representing a union data type. cCs tj|||ƒt|_dS(N(R[RR+R(RRRD((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRÑstunion(R'R(R)RR-R.R(((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRqÍs RkcBs)eZdZd„Zd„Zd„ZRS(s8 Derived class representing a struct data type. cGst|ƒ}tt|ƒr%|dn||ƒ|_tj|||dƒt|_d|_t|ƒ|g|_ t|ƒ|_ t|_ dS(Nii( R>RR?RKR[RR+RlRmR\RJR(RRmRRDRLRM((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRÜs (  c Cslt||||||ƒ}x:t|jƒD])\} } | tkr+||j| |jr dS|jj||j|gƒtj||ƒdS(N(RRKRRJR[(RR((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRøs (R'R(R)RR&R(((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRkØs tReplycBs eZdZd„Zd„ZRS(sP Derived class representing a reply. Only found as a field of Request. cCs tj|||ƒt|_dS(N(R[RR+R (RRRD((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRscCs©|jr dS|jjtttjdtttƒƒ|jjtƒ|jjtt t jdtttƒƒ|jjtt t jdtttƒƒt j ||ƒdS(Nt response_typetsequencetlength( RRRRRZRRR+Rttcard16ttcard32R[R(RR((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyR s ((((R'R(R)RR(((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRts tRequestcBs-eZdZd„Zd„ZejdZRS(s² Derived class representing a request. Public fields added: reply contains the reply datatype or None for void requests. opcode contains the request number. cCsmtj|||ƒd|_|jdƒ|_x8t|ƒD]*}|jdkr;t||ƒ|_q;q;WdS(Ntopcodetreply( R[RRR|R@R{R>RARt(RRRDRf((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRs  cCs4|jr dS|jjr¤|jjtttjdtt t ƒƒ|jjtttjdtt t ƒƒ|jjtt t jdtt t ƒƒt j ||ƒnp|jjtttjdtt t ƒƒ|jjt ƒ|jjtt t jdtt t ƒƒt j ||ƒ|jr0|jj |ƒndS(Nt major_opcodet minor_opcodeRw(Rt namespacetis_extRRRRZRRR+RxR[RRR|(RR((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyR&s  ((((( trequest(R'R(R)RRR-R.R(((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRzs tEventcBs6eZdZd„Zd„Zd„ZejdZRS(s™ Derived class representing an event data type. Public fields added: opcodes is a dictionary of name -> opcode number, for eventcopies. cCs\tj|||ƒi|_|jdƒ}|dkpR|jƒdkpR|dk|_dS(Nsno-sequence-numbertfalset0(R[RtopcodesR@Rtlowerthas_seq(RRRDttmp((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRBs cCs#||j|<|r||_ndS(N(R…R(RR{Rtmain((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyt add_opcodeIs cCs|jr dS|jjtttjdtttƒƒ|jry|jjt ƒ|jjtt t jdtttƒƒnt j ||ƒdS(NRuRv( RRRRRZRRR+R‡RRxR[R(RR((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRNs ( +tevent( R'R(R)RRŠRR-R.R(((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyR‚;s    tErrorcBs6eZdZd„Zd„Zd„ZejdZRS(s™ Derived class representing an error data type. Public fields added: opcodes is a dictionary of name -> opcode number, for errorcopies. cCs tj|||ƒi|_dS(N(R[RR…(RRRD((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRcscCs#||j|<|r||_ndS(N(R…R(RR{RR‰((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRŠgs cCs™|jr dS|jjtttjdtttƒƒ|jjtttjdtttƒƒ|jjtttjdtttƒƒt j ||ƒdS(NRut error_codeRv( RRRRRZRRR+RxR[R(RR((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRls  (((terror( R'R(R)RRŠRR-R.R(((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRŒ\s    tpad0(R/(R0(R1(R2(R3(R4(schar(sfloat(R7(#R)t xcbgen.exprRRR-tobjectRR*RZRxRyttint8ttint16ttint32ttcharttfloatttdoubleR8RGRWRXR[RcRoRqRkRtRzR‚RŒRRRR+R(((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyts6 H#DYh *&!0707010004d29a000081a40000000000000000000000014f7d299b00000e0a0000010000010007ffffffffffffffff0000003d00000000root/usr/local/lib/python2.7/site-packages/xcbgen/matcher.py''' XML parser. One function for each top-level element in the schema. Most functions just declare a new object and add it to the module. For typedefs, eventcopies, xidtypes, and other aliases though, we do not create a new type object, we just record the existing one under a new name. ''' from os.path import join from xml.etree.cElementTree import parse from xcbgen.xtypes import * def import_(node, module, namespace): ''' For imports, we load the file, create a new namespace object, execute recursively, then record the import (for header files, etc.) ''' # To avoid circular import error from xcbgen import state new_file = join(namespace.dir, '%s.xml' % node.text) new_root = parse(new_file).getroot() new_namespace = state.Namespace(new_file) execute(module, new_namespace) if not module.has_import(node.text): module.add_import(node.text, new_namespace) def typedef(node, module, namespace): id = node.get('newname') name = namespace.prefix + (id,) type = module.get_type(node.get('oldname')) module.add_type(id, namespace.ns, name, type) def xidtype(node, module, namespace): id = node.get('name') name = namespace.prefix + (id,) type = module.get_type('CARD32') module.add_type(id, namespace.ns, name, type) def xidunion(node, module, namespace): id = node.get('name') name = namespace.prefix + (id,) type = module.get_type('CARD32') module.add_type(id, namespace.ns, name, type) def enum(node, module, namespace): id = node.get('name') name = namespace.prefix + (id,) type = Enum(name, node) module.add_type(id, namespace.ns, name, type) def struct(node, module, namespace): id = node.get('name') name = namespace.prefix + (id,) type = Struct(name, node) module.add_type(id, namespace.ns, name, type) def union(node, module, namespace): id = node.get('name') name = namespace.prefix + (id,) type = Union(name, node) module.add_type(id, namespace.ns, name, type) def request(node, module, namespace): id = node.get('name') name = namespace.prefix + (id,) type = Request(name, node) module.add_request(id, name, type) def event(node, module, namespace): id = node.get('name') name = namespace.prefix + (id,) event = Event(name, node) event.add_opcode(node.get('number'), name, True) module.add_event(id, name, event) def eventcopy(node, module, namespace): id = node.get('name') name = namespace.prefix + (id,) event = module.get_event(node.get('ref')) event.add_opcode(node.get('number'), name, False) module.add_event(id, name, event) def error(node, module, namespace): id = node.get('name') name = namespace.prefix + (id,) error = Error(name, node) error.add_opcode(node.get('number'), name, True) module.add_error(id, name, error) def errorcopy(node, module, namespace): id = node.get('name') name = namespace.prefix + (id,) error = module.get_error(node.get('ref')) error.add_opcode(node.get('number'), name, False) module.add_error(id, name, error) funcs = {'import' : import_, 'typedef' : typedef, 'xidtype' : xidtype, 'xidunion' : xidunion, 'enum' : enum, 'struct' : struct, 'union' : union, 'request' : request, 'event' : event, 'eventcopy' : eventcopy, 'error' : error, 'errorcopy' : errorcopy} def execute(module, namespace): for elt in list(namespace.root): funcs[elt.tag](elt, module, namespace) 0707010004d29f000081a40000000000000000000000014f7d299c00001b070000010000010007ffffffffffffffff0000003c00000000root/usr/local/lib/python2.7/site-packages/xcbgen/state.pyoó ›)}Oc@sŒdZddlmZmZddlmZddlmZddlTddl Tddl Z de fd„ƒYZ d e fd „ƒYZ dS( sJ This module contains the namespace class and the singleton module class. iÿÿÿÿ(tdirnametbasename(tparse(tmatcher(t*Nt NamespacecBseZdZd„ZRS(s[ Contains the naming information for an extension. Public fields: header is the header attribute ("header file" name). is_ext is true for extensions, false for xproto. major_version and minor_version are extension version info. ext_xname is the X extension name string. ext_name is the XCB extension name prefix. cCs||_t|ƒ|_t|ƒ|_t|ƒjƒ|_|jjdƒ|_ |j d|_ |jjdt ƒrèt |_ |jjdƒ|_|jjdƒ|_|jjdƒ|_|jjdƒ|_d|jf|_nt |_ d|_d |_dS( Ntheadert:sextension-xnames major-versions minor-versionsextension-nametxcbt(R(tpathRtdirRtfileRtgetroottroottgetRtnstFalsetTruetis_extt major_versiont minor_versiont ext_xnametext_nametprefix(tselftfilename((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyt__init__s     (t__name__t __module__t__doc__R(((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyR s tModulecBs¯eZdZejdZejdZd„Zd„Zd„Z d„Z d„Z d„Z d „Z d „Zd „Zd „Zd „Zd„Zd„Zd„Zd„ZRS(s8 This is the grand, encompassing class that represents an entire XCB specification. Only gets instantiated once, in the main() routine. Don't need to worry about this much except to declare it and to get the namespace. Public fields: namespace contains the namespace info for the spec. topentclosecCsQt|ƒ|_||_g|_i|_i|_i|_g|_|jdddt ƒ|jdddt ƒ|jdddt ƒ|jdddt ƒ|jd ddt ƒ|jd ddtƒ|jdddt ƒ|jdddt ƒ|jdddtƒ|jdddtƒ|jdddtƒ|jdddt ƒdS( NtCARD8R tuint8_ttCARD16tuint16_ttCARD32tuint32_ttINT8tint8_ttINT16tint16_ttINT32tint32_ttBYTEtBOOLtchartfloattdoubletvoid(R#(R%(R'(R)(R+(R-(R#(R#(schar(sfloat(R2(R3(Rt namespacetoutputtimportsttypesteventsterrorstalltadd_typettcard8ttcard16ttcard32ttint8ttint16ttint32ttcharttfloatttdouble(RRR5((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyR?s&      cCstj||jƒdS(N(RtexecuteR4(R((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pytregisterXscCs+x$|jD]\}}|j|ƒq WdS(N(R:tresolve(Rtnametitem((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyRG\scCs?|jƒx$|jD]\}}|j|ƒqW|jƒdS(N(R R:toutR!(RRHRI((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pytgenerateas cCs|jj||jfƒdS(N(R6tappendR(RRHR4((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyt add_importjscCs.x'|jD]\}}||kr tSq WtS(N(R6RR(RRHtname_R((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyt has_importms cCsc||}||jkrdS||f|j|<|d |jjkr_|jj||fƒndS(Niÿÿÿÿ(R7R4RR:RL(RtidRRHRItkey((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyR;ts  cCs¨|}||jkr$|j||S|jj|}||jkrR|j||Sx?|jjƒD].}|jdƒd|krb|j||SqbWtd|ƒ‚dS(NRisType %s not found(R7R4Rtkeyst rpartitiontResolveException(RRPtidxRQ((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyt get_type_impl|scCs|j|dƒS(Ni(RV(RRP((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pytget_type‹scCs|j|dƒS(Ni(RV(RRP((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyt get_type_nameŽscCs3|d |jjkr/|jj||fƒndS(Niÿÿÿÿ(R4RR:RL(RRPRHRI((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyt add_request’scCsF||f|j|<|d |jjkrB|jj||fƒndS(Niÿÿÿÿ(R8R4RR:RL(RRPRHRI((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyt add_event—scCs|j|dS(Ni(R8(RRP((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyt get_eventœscCsF||f|j|<|d |jjkrB|jj||fƒndS(Niÿÿÿÿ(R9R4RR:RL(RRPRHRI((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyt add_error scCs|j|dS(Ni(R9(RRP((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyt get_error¥s(RRRt__main__R5R R!RRFRGRKRMROR;RVRWRXRYRZR[R\R](((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyR2s$                (Rtos.pathRRtxml.etree.cElementTreeRtxcbgenRt xcbgen.errort xcbgen.xtypesR^tobjectRR(((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyts   %0707010004d293000081a40000000000000000000000014f7d299c000000900000010000010007ffffffffffffffff0000003f00000000root/usr/local/lib/python2.7/site-packages/xcbgen/__init__.pyoó ›)}Oc@sdS(N((((s9/usr/local/lib/python2.7/site-packages/xcbgen/__init__.pyts0707010004d294000081a40000000000000000000000014f7d299b000000740000010000010007ffffffffffffffff0000003b00000000root/usr/local/lib/python2.7/site-packages/xcbgen/error.pyclass ResolveException(Exception): ''' Gets thrown when a type doesn't resolve in the XML. ''' pass 0707010004d296000081a40000000000000000000000014f7d299c000001bf0000010000010007ffffffffffffffff0000003c00000000root/usr/local/lib/python2.7/site-packages/xcbgen/error.pyoó ›)}Oc@sdefd„ƒYZdS(tResolveExceptioncBseZdZRS(s= Gets thrown when a type doesn't resolve in the XML. (t__name__t __module__t__doc__(((s6/usr/local/lib/python2.7/site-packages/xcbgen/error.pyRsN(t ExceptionR(((s6/usr/local/lib/python2.7/site-packages/xcbgen/error.pyts0707010004d2a0000081a40000000000000000000000014f7d299b000055b50000010000010007ffffffffffffffff0000003c00000000root/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.py''' This module contains the classes which represent XCB data types. ''' from xcbgen.expr import Field, Expression import __main__ class Type(object): ''' Abstract base class for all XCB data types. Contains default fields, and some abstract methods. ''' def __init__(self, name): ''' Default structure initializer. Sets up default fields. Public fields: name is a tuple of strings specifying the full type name. size is the size of the datatype in bytes, or None if variable-sized. nmemb is 1 for non-list types, None for variable-sized lists, otherwise number of elts. booleans for identifying subclasses, because I can't figure out isinstance(). ''' self.name = name self.size = None self.nmemb = None self.resolved = False # Screw isinstance(). self.is_simple = False self.is_list = False self.is_expr = False self.is_container = False self.is_reply = False self.is_union = False self.is_pad = False self.is_switch = False self.is_bitcase = False def resolve(self, module): ''' Abstract method for resolving a type. This should make sure any referenced types are already declared. ''' raise Exception('abstract resolve method not overridden!') def out(self, name): ''' Abstract method for outputting code. These are declared in the language-specific modules, and there must be a dictionary containing them declared when this module is imported! ''' raise Exception('abstract out method not overridden!') def fixed_size(self): ''' Abstract method for determining if the data type is fixed-size. ''' raise Exception('abstract fixed_size method not overridden!') def make_member_of(self, module, complex_type, field_type, field_name, visible, wire, auto): ''' Default method for making a data type a member of a structure. Extend this if the data type needs to add an additional length field or something. module is the global module object. complex_type is the structure object. see Field for the meaning of the other parameters. ''' new_field = Field(self, field_type, field_name, visible, wire, auto) # We dump the _placeholder_byte if any fields are added. for (idx, field) in enumerate(complex_type.fields): if field == _placeholder_byte: complex_type.fields[idx] = new_field return complex_type.fields.append(new_field) class SimpleType(Type): ''' Derived class which represents a cardinal type like CARD32 or char. Any type which is typedef'ed to cardinal will be one of these. Public fields added: none ''' def __init__(self, name, size): Type.__init__(self, name) self.is_simple = True self.size = size self.nmemb = 1 def resolve(self, module): self.resolved = True def fixed_size(self): return True out = __main__.output['simple'] # Cardinal datatype globals. See module __init__ method. tcard8 = SimpleType(('uint8_t',), 1) tcard16 = SimpleType(('uint16_t',), 2) tcard32 = SimpleType(('uint32_t',), 4) tint8 = SimpleType(('int8_t',), 1) tint16 = SimpleType(('int16_t',), 2) tint32 = SimpleType(('int32_t',), 4) tchar = SimpleType(('char',), 1) tfloat = SimpleType(('float',), 4) tdouble = SimpleType(('double',), 8) class Enum(SimpleType): ''' Derived class which represents an enum. Fixed-size. Public fields added: values contains a list of (name, value) tuples. value is empty, or a number. bits contains a list of (name, bitnum) tuples. items only appear if specified as a bit. bitnum is a number. ''' def __init__(self, name, elt): SimpleType.__init__(self, name, 4) self.values = [] self.bits = [] for item in list(elt): # First check if we're using a default value if len(list(item)) == 0: self.values.append((item.get('name'), '')) continue # An explicit value or bit was specified. value = list(item)[0] if value.tag == 'value': self.values.append((item.get('name'), value.text)) elif value.tag == 'bit': self.values.append((item.get('name'), '%u' % (1 << int(value.text, 0)))) self.bits.append((item.get('name'), value.text)) def resolve(self, module): self.resolved = True def fixed_size(self): return True out = __main__.output['enum'] class ListType(Type): ''' Derived class which represents a list of some other datatype. Fixed- or variable-sized. Public fields added: member is the datatype of the list elements. parent is the structure type containing the list. expr is an Expression object containing the length information, for variable-sized lists. ''' def __init__(self, elt, member, *parent): Type.__init__(self, member.name) self.is_list = True self.member = member self.parents = list(parent) 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 def make_member_of(self, module, complex_type, field_type, field_name, visible, wire, auto): if not self.fixed_size(): # We need a length field. # Ask our Expression object for it's name, type, and whether it's on the wire. lenfid = self.expr.lenfield_type lenfield_name = self.expr.lenfield_name lenwire = self.expr.lenwire needlen = True # See if the length field is already in the structure. for parent in self.parents: for field in parent.fields: if field.field_name == lenfield_name: needlen = False # It isn't, so we need to add it to the structure ourself. if needlen: type = module.get_type(lenfid) lenfield_type = module.get_type_name(lenfid) type.make_member_of(module, complex_type, lenfield_type, lenfield_name, True, lenwire, False) # Add ourself to the structure by calling our original method. Type.make_member_of(self, module, complex_type, field_type, field_name, visible, wire, auto) def resolve(self, module): if self.resolved: return self.member.resolve(module) self.expr.resolve(module, self.parents) # Find my length field again. We need the actual Field object in the expr. # This is needed because we might have added it ourself above. if not self.fixed_size(): for parent in self.parents: for field in parent.fields: if field.field_name == self.expr.lenfield_name and field.wire: self.expr.lenfield = field break self.resolved = True def fixed_size(self): return self.member.fixed_size() and self.expr.fixed_size() class ExprType(Type): ''' Derived class which represents an exprfield. Fixed size. Public fields added: expr is an Expression object containing the value of the field. ''' def __init__(self, elt, member, *parents): Type.__init__(self, member.name) self.is_expr = True self.member = member self.parents = parents self.expr = Expression(list(elt)[0], self) self.size = member.size self.nmemb = 1 def resolve(self, module): if self.resolved: return self.member.resolve(module) self.resolved = True def fixed_size(self): return True class PadType(Type): ''' Derived class which represents a padding field. ''' def __init__(self, elt): Type.__init__(self, tcard8.name) self.is_pad = True self.size = 1 self.nmemb = 1 if (elt == None) else int(elt.get('bytes'), 0) def resolve(self, module): self.resolved = True def fixed_size(self): return True class ComplexType(Type): ''' Derived class which represents a structure. Base type for all structure types. Public fields added: fields is an array of Field objects describing the structure fields. ''' def __init__(self, name, elt): Type.__init__(self, name) self.is_container = True self.elt = elt self.fields = [] self.nmemb = 1 self.size = 0 self.lenfield_parent = [self] def resolve(self, module): if self.resolved: return pads = 0 # Resolve all of our field datatypes. for child in list(self.elt): if child.tag == 'pad': field_name = 'pad' + str(pads) fkey = 'CARD8' type = PadType(child) pads = pads + 1 visible = False elif child.tag == 'field': field_name = child.get('name') fkey = child.get('type') type = module.get_type(fkey) visible = True elif child.tag == 'exprfield': field_name = child.get('name') fkey = child.get('type') type = ExprType(child, module.get_type(fkey), *self.lenfield_parent) visible = False elif child.tag == 'list': field_name = child.get('name') 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 field_type = self.name + (field_name,) type = SwitchType(field_type, child, *self.lenfield_parent) visible = True type.make_member_of(module, self, field_type, field_name, visible, True, False) type.resolve(module) continue else: # Hit this on Reply continue # Get the full type name for the field field_type = module.get_type_name(fkey) # Add the field to ourself type.make_member_of(module, self, field_type, field_name, visible, True, False) # Recursively resolve the type (could be another structure, list) type.resolve(module) self.calc_size() # Figure out how big we are self.resolved = True def calc_size(self): self.size = 0 for m in self.fields: if not m.wire: continue if m.type.fixed_size(): self.size = self.size + (m.type.size * m.type.nmemb) else: self.size = None break def fixed_size(self): for m in self.fields: if not m.type.fixed_size(): return False return True class SwitchType(ComplexType): ''' Derived class which represents a List of Items. Public fields added: bitcases is an array of Bitcase objects describing the list items ''' def __init__(self, name, elt, *parents): ComplexType.__init__(self, name, elt) self.parents = parents # FIXME: switch cannot store lenfields, so it should just delegate the parents self.lenfield_parent = list(parents) + [self] # self.fields contains all possible fields collected from the Bitcase objects, # whereas self.items contains the Bitcase objects themselves self.bitcases = [] self.is_switch = True elts = list(elt) self.expr = Expression(elts[0] if len(elts) else elt, self) def resolve(self, module): if self.resolved: return # pads = 0 parents = list(self.parents) + [self] # Resolve all of our field datatypes. for index, child in enumerate(list(self.elt)): if child.tag == 'bitcase': field_name = child.get('name') if field_name is None: field_type = self.name + ('bitcase%d' % index,) else: field_type = self.name + (field_name,) # use self.parent to indicate anchestor, # as switch does not contain named fields itself type = BitcaseType(index, field_type, child, *parents) # construct the switch type name from the parent type and the field name if field_name is None: type.has_name = False # Get the full type name for the field field_type = type.name visible = True # add the field to ourself type.make_member_of(module, self, field_type, field_name, visible, True, False) # recursively resolve the type (could be another structure, list) type.resolve(module) inserted = False for new_field in type.fields: # We dump the _placeholder_byte if any fields are added. for (idx, field) in enumerate(self.fields): if field == _placeholder_byte: self.fields[idx] = new_field inserted = True break if False == inserted: self.fields.append(new_field) self.calc_size() # Figure out how big we are self.resolved = True def make_member_of(self, module, complex_type, field_type, field_name, visible, wire, auto): if not self.fixed_size(): # We need a length field. # Ask our Expression object for it's name, type, and whether it's on the wire. lenfid = self.expr.lenfield_type lenfield_name = self.expr.lenfield_name lenwire = self.expr.lenwire needlen = True # See if the length field is already in the structure. for parent in self.parents: for field in parent.fields: if field.field_name == lenfield_name: needlen = False # It isn't, so we need to add it to the structure ourself. if needlen: type = module.get_type(lenfid) lenfield_type = module.get_type_name(lenfid) type.make_member_of(module, complex_type, lenfield_type, lenfield_name, True, lenwire, False) # Add ourself to the structure by calling our original method. Type.make_member_of(self, module, complex_type, field_type, field_name, visible, wire, auto) # size for switch can only be calculated at runtime def calc_size(self): pass # note: switch is _always_ of variable size, but we indicate here wether # it contains elements that are variable-sized themselves def fixed_size(self): return False # for m in self.fields: # if not m.type.fixed_size(): # return False # return True class Struct(ComplexType): ''' Derived class representing a struct data type. ''' out = __main__.output['struct'] class Union(ComplexType): ''' Derived class representing a union data type. ''' def __init__(self, name, elt): ComplexType.__init__(self, name, elt) self.is_union = True out = __main__.output['union'] class BitcaseType(ComplexType): ''' Derived class representing a struct data type. ''' def __init__(self, index, name, elt, *parent): elts = list(elt) self.expr = Expression(elts[0] if len(elts) else elt, self) ComplexType.__init__(self, name, elts[1:]) self.has_name = True self.index = 1 self.lenfield_parent = list(parent) + [self] self.parents = list(parent) self.is_bitcase = True def make_member_of(self, module, switch_type, field_type, field_name, visible, wire, auto): ''' register BitcaseType with the corresponding SwitchType module is the global module object. complex_type is the structure object. see Field for the meaning of the other parameters. ''' new_field = Field(self, field_type, field_name, visible, wire, auto) # We dump the _placeholder_byte if any bitcases are added. for (idx, field) in enumerate(switch_type.bitcases): if field == _placeholder_byte: switch_type.bitcases[idx] = new_field return switch_type.bitcases.append(new_field) def resolve(self, module): if self.resolved: return self.expr.resolve(module, self.parents+[self]) # Resolve the bitcase expression ComplexType.resolve(self, module) class Reply(ComplexType): ''' Derived class representing a reply. Only found as a field of Request. ''' def __init__(self, name, elt): ComplexType.__init__(self, name, elt) self.is_reply = True def resolve(self, module): if self.resolved: return # Add the automatic protocol fields self.fields.append(Field(tcard8, tcard8.name, 'response_type', False, True, True)) self.fields.append(_placeholder_byte) self.fields.append(Field(tcard16, tcard16.name, 'sequence', False, True, True)) self.fields.append(Field(tcard32, tcard32.name, 'length', False, True, True)) ComplexType.resolve(self, module) class Request(ComplexType): ''' Derived class representing a request. Public fields added: reply contains the reply datatype or None for void requests. opcode contains the request number. ''' def __init__(self, name, elt): ComplexType.__init__(self, name, elt) self.reply = None self.opcode = elt.get('opcode') for child in list(elt): if child.tag == 'reply': self.reply = Reply(name, child) def resolve(self, module): if self.resolved: return # Add the automatic protocol fields if module.namespace.is_ext: self.fields.append(Field(tcard8, tcard8.name, 'major_opcode', False, True, True)) self.fields.append(Field(tcard8, tcard8.name, 'minor_opcode', False, True, True)) self.fields.append(Field(tcard16, tcard16.name, 'length', False, True, True)) ComplexType.resolve(self, module) else: self.fields.append(Field(tcard8, tcard8.name, 'major_opcode', False, True, True)) self.fields.append(_placeholder_byte) self.fields.append(Field(tcard16, tcard16.name, 'length', False, True, True)) ComplexType.resolve(self, module) if self.reply: self.reply.resolve(module) out = __main__.output['request'] class Event(ComplexType): ''' Derived class representing an event data type. Public fields added: opcodes is a dictionary of name -> opcode number, for eventcopies. ''' def __init__(self, name, elt): ComplexType.__init__(self, name, elt) self.opcodes = {} tmp = elt.get('no-sequence-number') self.has_seq = (tmp == None or tmp.lower() == 'false' or tmp == '0') def add_opcode(self, opcode, name, main): self.opcodes[name] = opcode if main: self.name = name def resolve(self, module): if self.resolved: return # Add the automatic protocol fields self.fields.append(Field(tcard8, tcard8.name, 'response_type', False, True, True)) if self.has_seq: self.fields.append(_placeholder_byte) self.fields.append(Field(tcard16, tcard16.name, 'sequence', False, True, True)) ComplexType.resolve(self, module) out = __main__.output['event'] class Error(ComplexType): ''' Derived class representing an error data type. Public fields added: opcodes is a dictionary of name -> opcode number, for errorcopies. ''' def __init__(self, name, elt): ComplexType.__init__(self, name, elt) self.opcodes = {} def add_opcode(self, opcode, name, main): self.opcodes[name] = opcode if main: self.name = name def resolve(self, module): if self.resolved: return # Add the automatic protocol fields self.fields.append(Field(tcard8, tcard8.name, 'response_type', False, True, True)) self.fields.append(Field(tcard8, tcard8.name, 'error_code', False, True, True)) self.fields.append(Field(tcard16, tcard16.name, 'sequence', False, True, True)) ComplexType.resolve(self, module) out = __main__.output['error'] _placeholder_byte = Field(PadType(None), tcard8.name, 'pad0', False, True, False) 0707010004d297000081a40000000000000000000000014f7d299b000011f30000010000010007ffffffffffffffff0000003a00000000root/usr/local/lib/python2.7/site-packages/xcbgen/expr.py''' This module contains helper classes for structure fields and length expressions. ''' class Field(object): ''' Represents a field of a structure. type is the datatype object for the field. field_type is the name of the type (string tuple) field_name is the name of the structure field. visible is true iff the field should be in the request API. wire is true iff the field should be in the request structure. auto is true iff the field is on the wire but not in the request API (e.g. opcode) ''' def __init__(self, type, field_type, field_name, visible, wire, auto): self.type = type self.field_type = field_type self.field_name = field_name self.visible = visible self.wire = wire self.auto = auto class Expression(object): ''' Represents a mathematical expression for a list length or exprfield. Public fields: op is the operation (text +,*,/,<<,~) or None. lhs and rhs are the sub-Expressions if op is set. lenfield_name is the name of the length field, or None for request lists. lenfield is the Field object for the length field, or None. bitfield is True if the length field is a bitmask instead of a number. nmemb is the fixed size (value)of the expression, or None ''' def __init__(self, elt, parent): self.parent = parent self.nmemb = None self.lenfield_name = None self.lenfield_type = None self.lenfield_parent = None self.lenfield = None self.lenwire = False self.bitfield = False self.op = None self.lhs = None self.rhs = None if elt.tag == 'list': # List going into a request, which has no length field (inferred by server) self.lenfield_name = elt.get('name') + '_len' self.lenfield_type = 'CARD32' elif elt.tag == 'fieldref': # 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 == 'op': # Op field. Need to recurse. self.op = elt.get('op') self.lhs = Expression(list(elt)[0], parent) self.rhs = Expression(list(elt)[1], parent) # Hopefully we don't have two separate length fields... self.lenfield_name = self.lhs.lenfield_name if self.lenfield_name == None: self.lenfield_name = self.rhs.lenfield_name elif elt.tag == 'unop': # Op field. Need to recurse. self.op = elt.get('op') self.rhs = Expression(list(elt)[0], parent) self.lenfield_name = self.rhs.lenfield_name elif elt.tag == 'value': # Constant expression self.nmemb = int(elt.text, 0) elif elt.tag == 'popcount': self.op = 'popcount' self.rhs = Expression(list(elt)[0], parent) self.lenfield_name = self.rhs.lenfield_name # xcb_popcount returns 'int' - handle the type in the language-specific part elif elt.tag == 'enumref': self.op = 'enumref' self.lenfield_name = (elt.get('ref'), elt.text) elif elt.tag == 'sumof': self.op = 'sumof' self.lenfield_name = elt.get('ref') else: # Notreached raise Exception("undefined tag '%s'" % elt.tag) def fixed_size(self): return self.nmemb != None def resolve(self, module, parents): if self.op == 'enumref': self.lenfield_type = module.get_type(self.lenfield_name[0]) self.lenfield_name = self.lenfield_name[1] elif self.op == 'sumof': # need to find the field with lenfield_name for p in reversed(parents): fields = dict([(f.field_name, f) for f in p.fields]) if self.lenfield_name in fields.keys(): if p.is_bitcase: # switch is the anchestor self.lenfield_parent = p.parents[-1] else: self.lenfield_parent = p self.lenfield_type = fields[self.lenfield_name].field_type break 0707010004d29c000081a40000000000000000000000014f7d299c0000146b0000010000010007ffffffffffffffff0000003e00000000root/usr/local/lib/python2.7/site-packages/xcbgen/matcher.pyoó ›)}Oc@sdZddlmZddlmZddlTd„Zd„Zd„Zd„Z d „Z d „Z d „Z d „Z d „Zd„Zd„Zd„Zi ed6ed6ed6e d6e d6e d6e d6e d6ed6ed6ed6ed6Zd„ZdS(s XML parser. One function for each top-level element in the schema. Most functions just declare a new object and add it to the module. For typedefs, eventcopies, xidtypes, and other aliases though, we do not create a new type object, we just record the existing one under a new name. iÿÿÿÿ(tjoin(tparse(t*cCsƒddlm}t|jd|jƒ}t|ƒjƒ}|j|ƒ}t||ƒ|j |jƒs|j |j|ƒndS(s For imports, we load the file, create a new namespace object, execute recursively, then record the import (for header files, etc.) iÿÿÿÿ(tstates%s.xmlN( txcbgenRRtdirttextRtgetroott Namespacetexecutet has_importt add_import(tnodetmodulet namespaceRtnew_filetnew_roott new_namespace((s8/usr/local/lib/python2.7/site-packages/xcbgen/matcher.pytimport_s cCsT|jdƒ}|j|f}|j|jdƒƒ}|j||j||ƒdS(Ntnewnametoldname(tgettprefixtget_typetadd_typetns(R R Rtidtnamettype((s8/usr/local/lib/python2.7/site-packages/xcbgen/matcher.pyttypedefscCsK|jdƒ}|j|f}|jdƒ}|j||j||ƒdS(NRtCARD32(RRRRR(R R RRRR((s8/usr/local/lib/python2.7/site-packages/xcbgen/matcher.pytxidtype"scCsK|jdƒ}|j|f}|jdƒ}|j||j||ƒdS(NRR(RRRRR(R R RRRR((s8/usr/local/lib/python2.7/site-packages/xcbgen/matcher.pytxidunion(scCsK|jdƒ}|j|f}t||ƒ}|j||j||ƒdS(NR(RRtEnumRR(R R RRRR((s8/usr/local/lib/python2.7/site-packages/xcbgen/matcher.pytenum.scCsK|jdƒ}|j|f}t||ƒ}|j||j||ƒdS(NR(RRtStructRR(R R RRRR((s8/usr/local/lib/python2.7/site-packages/xcbgen/matcher.pytstruct4scCsK|jdƒ}|j|f}t||ƒ}|j||j||ƒdS(NR(RRtUnionRR(R R RRRR((s8/usr/local/lib/python2.7/site-packages/xcbgen/matcher.pytunion:scCsE|jdƒ}|j|f}t||ƒ}|j|||ƒdS(NR(RRtRequestt add_request(R R RRRR((s8/usr/local/lib/python2.7/site-packages/xcbgen/matcher.pytrequest@scCsa|jdƒ}|j|f}t||ƒ}|j|jdƒ|tƒ|j|||ƒdS(NRtnumber(RRtEventt add_opcodetTruet add_event(R R RRRtevent((s8/usr/local/lib/python2.7/site-packages/xcbgen/matcher.pyR/Fs cCsj|jdƒ}|j|f}|j|jdƒƒ}|j|jdƒ|tƒ|j|||ƒdS(NRtrefR*(RRt get_eventR,tFalseR.(R R RRRR/((s8/usr/local/lib/python2.7/site-packages/xcbgen/matcher.pyt eventcopyMs cCsa|jdƒ}|j|f}t||ƒ}|j|jdƒ|tƒ|j|||ƒdS(NRR*(RRtErrorR,R-t add_error(R R RRRterror((s8/usr/local/lib/python2.7/site-packages/xcbgen/matcher.pyR6Ts cCsj|jdƒ}|j|f}|j|jdƒƒ}|j|jdƒ|tƒ|j|||ƒdS(NRR0R*(RRt get_errorR,R2R5(R R RRRR6((s8/usr/local/lib/python2.7/site-packages/xcbgen/matcher.pyt errorcopy[s timportRRR R"R$R&R)R/R3R6R8cCs5x.t|jƒD]}t|j|||ƒqWdS(N(tlisttroottfuncsttag(R Rtelt((s8/usr/local/lib/python2.7/site-packages/xcbgen/matcher.pyR osN(t__doc__tos.pathRtxml.etree.cElementTreeRt xcbgen.xtypesRRRR R"R$R&R)R/R3R6R8R<R (((s8/usr/local/lib/python2.7/site-packages/xcbgen/matcher.pyts8               0707010004d299000081a40000000000000000000000014f7d299c00000fa50000010000010007ffffffffffffffff0000003b00000000root/usr/local/lib/python2.7/site-packages/xcbgen/expr.pyoó ›)}Oc@s6dZdefd„ƒYZdefd„ƒYZdS(sR This module contains helper classes for structure fields and length expressions. tFieldcBseZdZd„ZRS(sŸ Represents a field of a structure. type is the datatype object for the field. field_type is the name of the type (string tuple) field_name is the name of the structure field. visible is true iff the field should be in the request API. wire is true iff the field should be in the request structure. auto is true iff the field is on the wire but not in the request API (e.g. opcode) cCs:||_||_||_||_||_||_dS(N(ttypet field_typet field_nametvisibletwiretauto(tselfRRRRRR((s5/usr/local/lib/python2.7/site-packages/xcbgen/expr.pyt__init__s      (t__name__t __module__t__doc__R(((s5/usr/local/lib/python2.7/site-packages/xcbgen/expr.pyRs t ExpressioncBs)eZdZd„Zd„Zd„ZRS(sâ Represents a mathematical expression for a list length or exprfield. Public fields: op is the operation (text +,*,/,<<,~) or None. lhs and rhs are the sub-Expressions if op is set. lenfield_name is the name of the length field, or None for request lists. lenfield is the Field object for the length field, or None. bitfield is True if the length field is a bitmask instead of a number. nmemb is the fixed size (value)of the expression, or None cCs¼||_d|_d|_d|_d|_d|_t|_t|_ d|_ d|_ d|_ |j dkr”|jdƒd|_d|_n$|j dkr²|j|_n|j dkrú|jdƒ|_|jdƒ|_t|_t|_ n¾|j d kr†|jd ƒ|_ tt|ƒd |ƒ|_ tt|ƒd |ƒ|_ |j j|_|jdkr¸|j j|_q¸n2|j d krÕ|jd ƒ|_ tt|ƒd |ƒ|_ |j j|_nã|j d krüt|jd ƒ|_n¼|j dkrBd|_ tt|ƒd |ƒ|_ |j j|_nv|j dkrxd|_ |jdƒ|jf|_n@|j dkr¥d|_ |jdƒ|_ntd|j ƒ‚dS(Ntlisttnamet_lentCARD32tfieldreft valueparamsvalue-mask-namesvalue-mask-typetopiitunoptvaluetpopcounttenumreftreftsumofsundefined tag '%s'(tparenttNonetnmembt lenfield_namet lenfield_typetlenfield_parenttlenfieldtFalsetlenwiretbitfieldRtlhstrhsttagtgetttexttTrueR R tintt Exception(RteltR((s5/usr/local/lib/python2.7/site-packages/xcbgen/expr.pyR$sZ                 cCs |jdkS(N(RR(R((s5/usr/local/lib/python2.7/site-packages/xcbgen/expr.pyt fixed_sizelscCsä|jdkr;|j|jdƒ|_|jd|_n¥|jdkràx“t|ƒD]‚}tg|jD]}|j|f^qjƒ}|j|jƒkrW|j r¹|j d|_ n ||_ ||jj |_PqWqWWndS(NRiiRiÿÿÿÿ( Rtget_typeRRtreversedtdicttfieldsRtkeyst is_bitcasetparentsRR(RtmoduleR4tptfR1((s5/usr/local/lib/python2.7/site-packages/xcbgen/expr.pytresolveos+  (R R R RR-R8(((s5/usr/local/lib/python2.7/site-packages/xcbgen/expr.pyR s  H N(R tobjectRR (((s5/usr/local/lib/python2.7/site-packages/xcbgen/expr.pyts0707010004d29d000081a40000000000000000000000014f7d299b0000142f0000010000010007ffffffffffffffff0000003b00000000root/usr/local/lib/python2.7/site-packages/xcbgen/state.py''' This module contains the namespace class and the singleton module class. ''' from os.path import dirname, basename from xml.etree.cElementTree import parse from xcbgen import matcher from xcbgen.error import * from xcbgen.xtypes import * import __main__ class Namespace(object): ''' Contains the naming information for an extension. Public fields: header is the header attribute ("header file" name). is_ext is true for extensions, false for xproto. major_version and minor_version are extension version info. ext_xname is the X extension name string. ext_name is the XCB extension name prefix. ''' def __init__(self, filename): # Path info self.path = filename self.dir = dirname(filename) self.file = basename(filename) # Parse XML self.root = parse(filename).getroot() self.header = self.root.get('header') self.ns = self.header + ':' # Get root element attributes if self.root.get('extension-xname', False): self.is_ext = True self.major_version = self.root.get('major-version') self.minor_version = self.root.get('minor-version') self.ext_xname = self.root.get('extension-xname') self.ext_name = self.root.get('extension-name') self.prefix = ('xcb', self.ext_name) else: self.is_ext = False self.ext_name = '' self.prefix = ('xcb',) class Module(object): ''' This is the grand, encompassing class that represents an entire XCB specification. Only gets instantiated once, in the main() routine. Don't need to worry about this much except to declare it and to get the namespace. Public fields: namespace contains the namespace info for the spec. ''' open = __main__.output['open'] close = __main__.output['close'] def __init__(self, filename, output): self.namespace = Namespace(filename) self.output = output self.imports = [] self.types = {} self.events = {} self.errors = {} self.all = [] # Register some common types self.add_type('CARD8', '', ('uint8_t',), tcard8) self.add_type('CARD16', '', ('uint16_t',), tcard16) self.add_type('CARD32', '', ('uint32_t',), tcard32) self.add_type('INT8', '', ('int8_t',), tint8) self.add_type('INT16', '', ('int16_t',), tint16) self.add_type('INT32', '', ('int32_t',), tint32) self.add_type('BYTE', '', ('uint8_t',), tcard8) self.add_type('BOOL', '', ('uint8_t',), tcard8) self.add_type('char', '', ('char',), tchar) self.add_type('float', '', ('float',), tfloat) self.add_type('double', '', ('double',), tdouble) self.add_type('void', '', ('void',), tcard8) # This goes out and parses the rest of the XML def register(self): matcher.execute(self, self.namespace) # Recursively resolve all types def resolve(self): for (name, item) in self.all: item.resolve(self) # Call all the output methods def generate(self): self.open() for (name, item) in self.all: item.out(name) self.close() # Keeps track of what's been imported so far. def add_import(self, name, namespace): self.imports.append((name, namespace.header)) def has_import(self, name): for (name_, header) in self.imports: if name_ == name: return True return False # Keeps track of non-request/event/error datatypes def add_type(self, id, ns, name, item): key = ns + id if key in self.types: return self.types[key] = (name, item) if name[:-1] == self.namespace.prefix: self.all.append((name, item)) def get_type_impl(self, id, idx): key = id if key in self.types: return self.types[key][idx] key = self.namespace.ns + id if key in self.types: return self.types[key][idx] for key in self.types.keys(): if key.rpartition(':')[2] == id: return self.types[key][idx] raise ResolveException('Type %s not found' % id) def get_type(self, id): return self.get_type_impl(id, 1) def get_type_name(self, id): return self.get_type_impl(id, 0) # Keeps track of request datatypes def add_request(self, id, name, item): if name[:-1] == self.namespace.prefix: self.all.append((name, item)) # Keeps track of event datatypes def add_event(self, id, name, item): self.events[id] = (name, item) if name[:-1] == self.namespace.prefix: self.all.append((name, item)) def get_event(self, id): return self.events[id][1] # Keeps track of error datatypes def add_error(self, id, name, item): self.errors[id] = (name, item) if name[:-1] == self.namespace.prefix: self.all.append((name, item)) def get_error(self, id): return self.errors[id][1] 0707010004d2a1000081a40000000000000000000000014f7d299c000058570000010000010007ffffffffffffffff0000003d00000000root/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pycó ›)}Oc@s!dZddlmZmZddlZdefd„ƒYZdefd„ƒYZed0d ƒZed1d ƒZ ed2d ƒZ ed3d ƒZ ed4d ƒZ ed5d ƒZ ed6d ƒZed7d ƒZed8dƒZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd „ƒYZd!efd"„ƒYZd#efd$„ƒYZd%efd&„ƒYZd'efd(„ƒYZd)efd*„ƒYZd+efd,„ƒYZd-efd.„ƒYZeedƒejd/e e!e ƒZ"dS(9sB This module contains the classes which represent XCB data types. iÿÿÿÿ(tFieldt ExpressionNtTypecBs;eZdZd„Zd„Zd„Zd„Zd„ZRS(sm Abstract base class for all XCB data types. Contains default fields, and some abstract methods. cCsy||_d|_d|_t|_t|_t|_t|_t|_ t|_ t|_ t|_ t|_ t|_dS(s§ Default structure initializer. Sets up default fields. Public fields: name is a tuple of strings specifying the full type name. size is the size of the datatype in bytes, or None if variable-sized. nmemb is 1 for non-list types, None for variable-sized lists, otherwise number of elts. booleans for identifying subclasses, because I can't figure out isinstance(). N(tnametNonetsizetnmembtFalsetresolvedt is_simpletis_listtis_exprt is_containertis_replytis_uniontis_padt is_switcht is_bitcase(tselfR((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyt__init__ s            cCstdƒ‚dS(s€ Abstract method for resolving a type. This should make sure any referenced types are already declared. s'abstract resolve method not overridden!N(t Exception(Rtmodule((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pytresolve&scCstdƒ‚dS(sÑ Abstract method for outputting code. These are declared in the language-specific modules, and there must be a dictionary containing them declared when this module is imported! s#abstract out method not overridden!N(R(RR((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pytout-scCstdƒ‚dS(sQ Abstract method for determining if the data type is fixed-size. s*abstract fixed_size method not overridden!N(R(R((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyt fixed_size5sc Cslt||||||ƒ}x:t|jƒD])\} } | tkr+||j| fƒ|jj|jdƒ|j fƒq2q2WdS( NiiRttvaluetbits%ui( R*RtvaluestbitstlisttlenRtgetttagttexttint(RRtelttitemR:((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRzs  %3cCs t|_dS(N(R+R(RR((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRŒscCstS(N(R+(R((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRstenum( R'R(R)RRRR-R.R(((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyR8rs    tListTypecBs2eZdZd„Zd„Zd„Zd„ZRS(sA Derived class which represents a list of some other datatype. Fixed- or variable-sized. Public fields added: member is the datatype of the list elements. parent is the structure type containing the list. expr is an Expression object containing the length information, for variable-sized lists. cGsätj||jƒt|_||_t|ƒ|_|jdkrzt|ƒ}t t |ƒrh|dn||ƒ|_ n$|jdkržt ||ƒ|_ n|j ƒr³|j nd|_ |j j ƒr×|j jnd|_dS(NR>it valueparam(RRRR+R tmemberR>tparentsRARR?texprRRRR(RRDRItparenttelts((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRžs   +c Cså|jƒs¿|jj}|jj} |jj} t} x=|jD]2} x)| jD]} | j| krPt } qPqPWq@W| r¿|j |ƒ}|j |ƒ}|j |||| t| t ƒq¿nt j ||||||||ƒdS(N(RRKt lenfield_typet lenfield_nametlenwireR+RJRRRtget_typet get_type_nameR&R(RRRRRR R!R"tlenfidRORPtneedlenRLR%ttypeRN((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyR&­s    %cCs¥|jr dS|jj|ƒ|jj||jƒ|jƒs˜xV|jD]H}x?|jD]4}|j|jjkrY|j rY||j_ PqYqYWqIWnt |_dS(N( RRIRRKRJRRRROR!tlenfieldR+(RRRLR%((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRÅs   cCs|jjƒo|jjƒS(N(RIRRK(R((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRÖs(R'R(R)RR&RR(((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRG•s    tExprTypecBs)eZdZd„Zd„Zd„ZRS(s¡ Derived class which represents an exprfield. Fixed size. Public fields added: expr is an Expression object containing the value of the field. cGsctj||jƒt|_||_||_tt|ƒd|ƒ|_ |j |_ d|_ dS(Nii( RRRR+R RIRJRR>RKRR(RRDRIRJ((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRàs    cCs*|jr dS|jj|ƒt|_dS(N(RRIRR+(RR((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRës cCstS(N(R+(R((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRñs(R'R(R)RRR(((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRWÙs tPadTypecBs)eZdZd„Zd„Zd„ZRS(s9 Derived class which represents a padding field. cCsVtj|tjƒt|_d|_|dkr7dnt|j dƒdƒ|_ dS(Nitbytesi( RRttcard8RR+RRRRCR@R(RRD((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRøs  cCs t|_dS(N(R+R(RR((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRþscCstS(N(R+(R((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRs(R'R(R)RRR(((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRXôs  t ComplexTypecBs2eZdZd„Zd„Zd„Zd„ZRS(s¼ Derived class which represents a structure. Base type for all structure types. Public fields added: fields is an array of Field objects describing the structure fields. cCsMtj||ƒt|_||_g|_d|_d|_|g|_dS(Nii( RRR+R RDRRRtlenfield_parent(RRRD((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyR s     c Csy|jr dSd}xLt|jƒD];}|jdkrmdt|ƒ}d}t|ƒ}|d}t}n¶|jdkr²|jdƒ}|jdƒ}|j|ƒ}t }nq|jdkr|jdƒ}|jdƒ}t ||j|ƒ|j Œ}t}n|jd krZ|jdƒ}|jdƒ}t ||j|ƒ|j Œ}t }nÉ|jd kr¥|jd ƒ}d }t ||j|ƒ|j Œ}t }n~|jd kr#|jdƒ}|j |f}t|||j Œ}t }|j|||||t tƒ|j|ƒq#nq#|j|ƒ}|j|||||t tƒ|j|ƒq#W|jƒt |_dS(NitpadtCARD8iR%RRUt exprfieldR>RHsvalue-list-nametCARD32tswitch(RR>RDRAtstrRXRR@RQR+RWR\RGRt SwitchTypeR&RRRt calc_size( RRtpadstchildRtfkeyRUR R((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRsX          cCsld|_x\|jD]Q}|js(qn|jjƒrZ|j|jj|jj|_qd|_PqWdS(Ni(RRR!RURRR(Rtm((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRdMs  # cCs+x$|jD]}|jjƒs tSq WtS(N(RRURRR+(RRh((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRXs(R'R(R)RRRdR(((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyR[s  8 RccBs;eZdZd„Zd„Zd„Zd„Zd„ZRS(s› Derived class which represents a List of Items. Public fields added: bitcases is an array of Bitcase objects describing the list items cGs|tj|||ƒ||_t|ƒ|g|_g|_t|_t|ƒ}tt |ƒri|dn||ƒ|_ dS(Ni( R[RRJR>R\tbitcasesR+RRR?RK(RRRDRJRM((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRfs    c Cs˜|jr dSt|jƒ|g}x[tt|jƒƒD]D\}}|jdkr9|jdƒ}|dkr†|jd|f}n|j|f}t ||||Œ}|dkrÌt |_ |j}nt }|j |||||t t ƒ|j|ƒt } xv|jD]h} x@t|jƒD]/\} } | tkr$| |j| RJRRDRAR@RRt BitcaseTypeRthas_nameR+R&RRRRRd( RRRJtindexRfRRRUR tinsertedR#R$R%((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRss6 "         c Cså|jƒs¿|jj}|jj} |jj} t} x=|jD]2} x)| jD]} | j| krPt } qPqPWq@W| r¿|j |ƒ}|j |ƒ}|j |||| t| t ƒq¿nt j ||||||||ƒdS(N(RRKRNRORPR+RJRRRRQRRR&R(RRRRRR R!R"RSRORPRTRLR%RURN((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyR& s    %cCsdS(N((R((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRd¹scCstS(N(R(R((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyR¾s(R'R(R)RRR&RdR(((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRc^s  -  tStructcBseZdZejdZRS(s8 Derived class representing a struct data type. tstruct(R'R(R)R-R.R(((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRoÆstUnioncBs$eZdZd„ZejdZRS(s7 Derived class representing a union data type. cCs tj|||ƒt|_dS(N(R[RR+R(RRRD((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRÑstunion(R'R(R)RR-R.R(((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRqÍs RkcBs)eZdZd„Zd„Zd„ZRS(s8 Derived class representing a struct data type. cGst|ƒ}tt|ƒr%|dn||ƒ|_tj|||dƒt|_d|_t|ƒ|g|_ t|ƒ|_ t|_ dS(Nii( R>RR?RKR[RR+RlRmR\RJR(RRmRRDRLRM((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRÜs (  c Cslt||||||ƒ}x:t|jƒD])\} } | tkr+||j| |jr dS|jj||j|gƒtj||ƒdS(N(RRKRRJR[(RR((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRøs (R'R(R)RR&R(((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRkØs tReplycBs eZdZd„Zd„ZRS(sP Derived class representing a reply. Only found as a field of Request. cCs tj|||ƒt|_dS(N(R[RR+R (RRRD((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRscCs©|jr dS|jjtttjdtttƒƒ|jjtƒ|jjtt t jdtttƒƒ|jjtt t jdtttƒƒt j ||ƒdS(Nt response_typetsequencetlength( RRRRRZRRR+Rttcard16ttcard32R[R(RR((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyR s ((((R'R(R)RR(((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRts tRequestcBs-eZdZd„Zd„ZejdZRS(s² Derived class representing a request. Public fields added: reply contains the reply datatype or None for void requests. opcode contains the request number. cCsmtj|||ƒd|_|jdƒ|_x8t|ƒD]*}|jdkr;t||ƒ|_q;q;WdS(Ntopcodetreply( R[RRR|R@R{R>RARt(RRRDRf((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRs  cCs4|jr dS|jjr¤|jjtttjdtt t ƒƒ|jjtttjdtt t ƒƒ|jjtt t jdtt t ƒƒt j ||ƒnp|jjtttjdtt t ƒƒ|jjt ƒ|jjtt t jdtt t ƒƒt j ||ƒ|jr0|jj |ƒndS(Nt major_opcodet minor_opcodeRw(Rt namespacetis_extRRRRZRRR+RxR[RRR|(RR((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyR&s  ((((( trequest(R'R(R)RRR-R.R(((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRzs tEventcBs6eZdZd„Zd„Zd„ZejdZRS(s™ Derived class representing an event data type. Public fields added: opcodes is a dictionary of name -> opcode number, for eventcopies. cCs\tj|||ƒi|_|jdƒ}|dkpR|jƒdkpR|dk|_dS(Nsno-sequence-numbertfalset0(R[RtopcodesR@Rtlowerthas_seq(RRRDttmp((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRBs cCs#||j|<|r||_ndS(N(R…R(RR{Rtmain((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyt add_opcodeIs cCs|jr dS|jjtttjdtttƒƒ|jry|jjt ƒ|jjtt t jdtttƒƒnt j ||ƒdS(NRuRv( RRRRRZRRR+R‡RRxR[R(RR((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRNs ( +tevent( R'R(R)RRŠRR-R.R(((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyR‚;s    tErrorcBs6eZdZd„Zd„Zd„ZejdZRS(s™ Derived class representing an error data type. Public fields added: opcodes is a dictionary of name -> opcode number, for errorcopies. cCs tj|||ƒi|_dS(N(R[RR…(RRRD((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRcscCs#||j|<|r||_ndS(N(R…R(RR{RR‰((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRŠgs cCs™|jr dS|jjtttjdtttƒƒ|jjtttjdtttƒƒ|jjtttjdtttƒƒt j ||ƒdS(NRut error_codeRv( RRRRRZRRR+RxR[R(RR((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRls  (((terror( R'R(R)RRŠRR-R.R(((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyRŒ\s    tpad0(R/(R0(R1(R2(R3(R4(schar(sfloat(R7(#R)t xcbgen.exprRRR-tobjectRR*RZRxRyttint8ttint16ttint32ttcharttfloatttdoubleR8RGRWRXR[RcRoRqRkRtRzR‚RŒRRRR+R(((s7/usr/local/lib/python2.7/site-packages/xcbgen/xtypes.pyts6 H#DYh *&!0707010004d29e000081a40000000000000000000000014f7d299c00001b070000010000010007ffffffffffffffff0000003c00000000root/usr/local/lib/python2.7/site-packages/xcbgen/state.pycó ›)}Oc@sŒdZddlmZmZddlmZddlmZddlTddl Tddl Z de fd„ƒYZ d e fd „ƒYZ dS( sJ This module contains the namespace class and the singleton module class. iÿÿÿÿ(tdirnametbasename(tparse(tmatcher(t*Nt NamespacecBseZdZd„ZRS(s[ Contains the naming information for an extension. Public fields: header is the header attribute ("header file" name). is_ext is true for extensions, false for xproto. major_version and minor_version are extension version info. ext_xname is the X extension name string. ext_name is the XCB extension name prefix. cCs||_t|ƒ|_t|ƒ|_t|ƒjƒ|_|jjdƒ|_ |j d|_ |jjdt ƒrèt |_ |jjdƒ|_|jjdƒ|_|jjdƒ|_|jjdƒ|_d|jf|_nt |_ d|_d |_dS( Ntheadert:sextension-xnames major-versions minor-versionsextension-nametxcbt(R(tpathRtdirRtfileRtgetroottroottgetRtnstFalsetTruetis_extt major_versiont minor_versiont ext_xnametext_nametprefix(tselftfilename((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyt__init__s     (t__name__t __module__t__doc__R(((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyR s tModulecBs¯eZdZejdZejdZd„Zd„Zd„Z d„Z d„Z d„Z d „Z d „Zd „Zd „Zd „Zd„Zd„Zd„Zd„ZRS(s8 This is the grand, encompassing class that represents an entire XCB specification. Only gets instantiated once, in the main() routine. Don't need to worry about this much except to declare it and to get the namespace. Public fields: namespace contains the namespace info for the spec. topentclosecCsQt|ƒ|_||_g|_i|_i|_i|_g|_|jdddt ƒ|jdddt ƒ|jdddt ƒ|jdddt ƒ|jd ddt ƒ|jd ddtƒ|jdddt ƒ|jdddt ƒ|jdddtƒ|jdddtƒ|jdddtƒ|jdddt ƒdS( NtCARD8R tuint8_ttCARD16tuint16_ttCARD32tuint32_ttINT8tint8_ttINT16tint16_ttINT32tint32_ttBYTEtBOOLtchartfloattdoubletvoid(R#(R%(R'(R)(R+(R-(R#(R#(schar(sfloat(R2(R3(Rt namespacetoutputtimportsttypesteventsterrorstalltadd_typettcard8ttcard16ttcard32ttint8ttint16ttint32ttcharttfloatttdouble(RRR5((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyR?s&      cCstj||jƒdS(N(RtexecuteR4(R((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pytregisterXscCs+x$|jD]\}}|j|ƒq WdS(N(R:tresolve(Rtnametitem((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyRG\scCs?|jƒx$|jD]\}}|j|ƒqW|jƒdS(N(R R:toutR!(RRHRI((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pytgenerateas cCs|jj||jfƒdS(N(R6tappendR(RRHR4((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyt add_importjscCs.x'|jD]\}}||kr tSq WtS(N(R6RR(RRHtname_R((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyt has_importms cCsc||}||jkrdS||f|j|<|d |jjkr_|jj||fƒndS(Niÿÿÿÿ(R7R4RR:RL(RtidRRHRItkey((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyR;ts  cCs¨|}||jkr$|j||S|jj|}||jkrR|j||Sx?|jjƒD].}|jdƒd|krb|j||SqbWtd|ƒ‚dS(NRisType %s not found(R7R4Rtkeyst rpartitiontResolveException(RRPtidxRQ((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyt get_type_impl|scCs|j|dƒS(Ni(RV(RRP((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pytget_type‹scCs|j|dƒS(Ni(RV(RRP((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyt get_type_nameŽscCs3|d |jjkr/|jj||fƒndS(Niÿÿÿÿ(R4RR:RL(RRPRHRI((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyt add_request’scCsF||f|j|<|d |jjkrB|jj||fƒndS(Niÿÿÿÿ(R8R4RR:RL(RRPRHRI((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyt add_event—scCs|j|dS(Ni(R8(RRP((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyt get_eventœscCsF||f|j|<|d |jjkrB|jj||fƒndS(Niÿÿÿÿ(R9R4RR:RL(RRPRHRI((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyt add_error scCs|j|dS(Ni(R9(RRP((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyt get_error¥s(RRRt__main__R5R R!RRFRGRKRMROR;RVRWRXRYRZR[R\R](((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyR2s$                (Rtos.pathRRtxml.etree.cElementTreeRtxcbgenRt xcbgen.errort xcbgen.xtypesR^tobjectRR(((s6/usr/local/lib/python2.7/site-packages/xcbgen/state.pyts   %0707010004d292000081a40000000000000000000000014f7d299c000000900000010000010007ffffffffffffffff0000003f00000000root/usr/local/lib/python2.7/site-packages/xcbgen/__init__.pycó ›)}Oc@sdS(N((((s9/usr/local/lib/python2.7/site-packages/xcbgen/__init__.pyts0707010004d291000081a40000000000000000000000014f7d299b000000010000010000010007ffffffffffffffff0000003e00000000root/usr/local/lib/python2.7/site-packages/xcbgen/__init__.py 0707010004d295000081a40000000000000000000000014f7d299c000001bf0000010000010007ffffffffffffffff0000003c00000000root/usr/local/lib/python2.7/site-packages/xcbgen/error.pycó ›)}Oc@sdefd„ƒYZdS(tResolveExceptioncBseZdZRS(s= Gets thrown when a type doesn't resolve in the XML. (t__name__t __module__t__doc__(((s6/usr/local/lib/python2.7/site-packages/xcbgen/error.pyRsN(t ExceptionR(((s6/usr/local/lib/python2.7/site-packages/xcbgen/error.pyts07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000b00000000TRAILER!!!