[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/xelb 0d23b04: Add support for <eventstruct>
From: |
Chris Feng |
Subject: |
[elpa] externals/xelb 0d23b04: Add support for <eventstruct> |
Date: |
Sun, 5 Nov 2017 09:17:35 -0500 (EST) |
branch: externals/xelb
commit 0d23b045c16968c520c08fa6547aab912ce554fc
Author: Chris Feng <address@hidden>
Commit: Chris Feng <address@hidden>
Add support for <eventstruct>
* el_client.el (xelb-parse-top-level-element, xelb-parse-eventstruct):
Add support for <eventstruct>.
* xcb-xinput.el: Sync with upstream protocol.
---
el_client.el | 7 +++++++
xcb-xinput.el | 52 ++++++++++++++++++++++++++++------------------------
xcb-xproto.el | 2 +-
3 files changed, 36 insertions(+), 25 deletions(-)
diff --git a/el_client.el b/el_client.el
index 40487b3..befe1c8 100644
--- a/el_client.el
+++ b/el_client.el
@@ -302,6 +302,7 @@ an `xelb-auto-padding' attribute."
(`error (xelb-parse-error node))
(`eventcopy (xelb-parse-eventcopy node))
(`errorcopy (xelb-parse-errorcopy node))
+ (`eventstruct (xelb-parse-eventstruct node))
((or `comment `doc)) ;ignored
(x (error "Unsupported top-level element: <%s>" x))))
@@ -494,6 +495,12 @@ The `combine-adjacent' attribute is simply ignored."
`((defclass ,name (xcb:-error ,refname) ;Shadow the method of ref
((~code :initform ,error-number))))))
+(defun xelb-parse-eventstruct (node)
+ "Parse <eventstruct>."
+ (let ((name (intern (concat xelb-prefix (xelb-node-attr node 'name)))))
+ ;; Only conventional events are supported (and we don't check opcode).
+ `((defclass ,name (xcb:-event) nil))))
+
;;;; XCB: structure contents
(defun xelb-parse-structure-content (node)
diff --git a/xcb-xinput.el b/xcb-xinput.el
index 9826485..0a6fb64 100644
--- a/xcb-xinput.el
+++ b/xcb-xinput.el
@@ -201,10 +201,12 @@
:type xcb:-list)
(pad~3 :initform 4 :type xcb:-pad-align)))
+(xcb:deftypealias 'xcb:xinput:EventTypeBase 'xcb:CARD8)
+
(defclass xcb:xinput:InputClassInfo
(xcb:-struct)
((class-id :initarg :class-id :type xcb:CARD8)
- (event-type-base :initarg :event-type-base :type xcb:CARD8)))
+ (event-type-base :initarg :event-type-base :type xcb:xinput:EventTypeBase)))
(defclass xcb:xinput:OpenDevice
(xcb:-request)
@@ -973,29 +975,6 @@
(xcb:-fieldref 'num-classes))
:type xcb:-list)))
-(defclass xcb:xinput:SendExtensionEvent
- (xcb:-request)
- ((~opcode :initform 31 :type xcb:-u1)
- (destination :initarg :destination :type xcb:WINDOW)
- (device-id :initarg :device-id :type xcb:CARD8)
- (propagate :initarg :propagate :type xcb:BOOL)
- (num-classes :initarg :num-classes :type xcb:CARD16)
- (num-events :initarg :num-events :type xcb:CARD8)
- (pad~0 :initform 3 :type xcb:-pad)
- (events :initarg :events :type xcb:-ignore)
- (events~ :initform
- '(name events type xcb:CARD8 size
- (*
- (xcb:-fieldref 'num-events)
- 32))
- :type xcb:-list)
- (pad~1 :initform 4 :type xcb:-pad-align)
- (classes :initarg :classes :type xcb:-ignore)
- (classes~ :initform
- '(name classes type xcb:xinput:EventClass size
- (xcb:-fieldref 'num-classes))
- :type xcb:-list)))
-
(defclass xcb:xinput:DeviceBell
(xcb:-request)
((~opcode :initform 32 :type xcb:-u1)
@@ -2750,6 +2729,31 @@
(xcb:-event xcb:xinput:BarrierHit)
((~evtype :initform 26)))
+(defclass xcb:xinput:EventForSend
+ (xcb:-event)
+ nil)
+
+(defclass xcb:xinput:SendExtensionEvent
+ (xcb:-request)
+ ((~opcode :initform 31 :type xcb:-u1)
+ (destination :initarg :destination :type xcb:WINDOW)
+ (device-id :initarg :device-id :type xcb:CARD8)
+ (propagate :initarg :propagate :type xcb:BOOL)
+ (num-classes :initarg :num-classes :type xcb:CARD16)
+ (num-events :initarg :num-events :type xcb:CARD8)
+ (pad~0 :initform 3 :type xcb:-pad)
+ (events :initarg :events :type xcb:-ignore)
+ (events~ :initform
+ '(name events type xcb:xinput:EventForSend size
+ (xcb:-fieldref 'num-events))
+ :type xcb:-list)
+ (pad~1 :initform 4 :type xcb:-pad-align)
+ (classes :initarg :classes :type xcb:-ignore)
+ (classes~ :initform
+ '(name classes type xcb:xinput:EventClass size
+ (xcb:-fieldref 'num-classes))
+ :type xcb:-list)))
+
(defclass xcb:xinput:Device
(xcb:-error)
((~code :initform 0)))
diff --git a/xcb-xproto.el b/xcb-xproto.el
index 43d2d0f..7ec4539 100644
--- a/xcb-xproto.el
+++ b/xcb-xproto.el
@@ -1644,7 +1644,7 @@
'(name string type xcb:CHAR2B size nil)
:type xcb:-list)))
(cl-defmethod xcb:marshal
- ((obj xcb:QueryTextExtents))
+ ((obj xcb:QueryTextExtents))
nil
(setf
(slot-value obj 'odd-length)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/xelb 0d23b04: Add support for <eventstruct>,
Chris Feng <=