18 Commits
Author SHA1 Message Date
Andrew Gallant 1614b58c42 fix structs with field name of 'Bytes'
(it conflict with a method of the same name that is generated for
all such structs)
2018-09-08 16:49:25 +02:00
Andrew Gallant 5451e59f88 Remove panics/fatal errors.
Fixes #9.

This makes shutdown a little more graceful, but there's more
work to be done here. Namely, all outstanding cookies need to
be given the error, otherwise they will block forever.
2018-09-08 16:49:24 +02:00
Andrew Gallant ef8155bf17 Formatting and 80 cols. 2018-09-08 16:49:23 +02:00
Andrew Gallant 76f9adb599 Use consistent extension names. Close #6. 2018-09-08 16:49:21 +02:00
Andrew Gallant 33509dbeb0 It appears that the "Str" type (which is built into the core X protocol)
doesn't specify any padding. So it has to be treated as a special case.

Close #12.
2018-09-08 16:49:21 +02:00
Andrew Gallant ad9c35a02f shortcuts for the lazy 2018-09-08 16:49:20 +02:00
Andrew Gallant 2dc9914b5e When writing, don't pad the length of bytes produced from inner
structs/unions. Each type should take care of its own padding.

Close #14.
2018-09-08 16:49:20 +02:00
Andrew Gallant f0385db3a7 Regenerate xgb with latest XML descriptions. 2018-09-08 16:49:20 +02:00
Andrew Gallant 5a07ac7108 Fix fmt'd output for union list writing. 2018-09-08 16:49:19 +02:00
Andrew Gallant efe87cb908 Ignore the "fd" field for the time being (for the shm extension only). 2018-09-08 16:49:19 +02:00
Andrew Gallant 3b4adabee1 The sync and xinput extensions now use the switch field, which
XGB does not currently support. Therefore, I'm removing the sync and
xinput extensions.

This affects issues #11 and #13.
2018-09-08 16:49:19 +02:00
Andrew Gallant 38b293e74d Padding on a list is on the length of the list.
There was a bug where padding was being computed on each element of the
list. Close #5.
2018-09-08 16:49:18 +02:00
Andrew Gallant b06a8ca976 Don't needlessly change source files every time. 2018-09-08 16:49:18 +02:00
Andrew Gallant 0685fb57e1 Update to latest xproto XML. 2018-09-08 16:49:17 +02:00
Andrew Gallant 4b20ffaf4f Updated to work with new xproto XML files.
Namely, the "doc" element is ignored. Also, I've sorted everything
before output so that diff isn't completely useless.
2018-09-08 16:49:17 +02:00
Andrew Gallant 5d96993ee1 Fixed a nasty bug where closing could cause ReadFull to crash
the program. Close #4.
2018-09-08 16:49:16 +02:00
Andrew Gallant 3658686aee gofmt 2018-09-08 16:49:16 +02:00
Andrew Gallant e635de5e1d Provide access to the X display number in the XGB Conn. 2018-09-08 16:49:16 +02:00