aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/xcb/types.lisp51
1 files changed, 50 insertions, 1 deletions
diff --git a/src/xcb/types.lisp b/src/xcb/types.lisp
index 1e59363..68f9a54 100644
--- a/src/xcb/types.lisp
+++ b/src/xcb/types.lisp
@@ -59,6 +59,9 @@
(declare (ignore size kind))
`(register-type (make-instance 'type-description :name ',name ,@options)))
+
+;;; Common Types
+
(defxcbtype :card8
:kind :fixed
:size 1)
@@ -67,10 +70,54 @@
:kind :fixed
:size 2)
+(defxcbtype :card32
+ :kind :fixed
+ :size 4)
+
+(defxcbtype :card64
+ :kind :fixed
+ :size 8)
+
+(defxcbtype :int8
+ :kind :fixed
+ :size 1)
+
+(defxcbtype :int16
+ :kind :fixed
+ :size 2)
+
+(defxcbtype :int32
+ :kind :fixed
+ :size 4)
+
+(defxcbtype :int64
+ :kind :fixed
+ :size 8)
+
+(defxcbtype :char
+ :kind :fixed
+ :size 1)
+
+(defxcbtype :float
+ :kind :fixed
+ :size 4)
+
+(defxcbtype :double
+ :kind :fixed
+ :size 8)
+
(defxcbtype :bool
:kind :fixed
:size 1)
+(defxcbtype :byte
+ :kind :fixed
+ :size 1)
+
+;; XXX: It is serialized as a uint8_t
+(defxcbtype :void
+ :kind :fixed
+ :size 1)
(defun register-type-alias (alias base-name)
(setf (gethash alias *type-info*)
@@ -82,6 +129,8 @@
(define-type-alias :cookie
:card16)
-;; TODO: Check if this alias is according to the spec.
+;; XXX: This is wrong, they are the same size but they map to
+;; different C types. uint8_t and char respectively.
+;; Cf state.py in ;; xcbproto.
(define-type-alias :char
:card8)