From 1bb7cc9f6b50bc2ff5750119473db548dc681b0a Mon Sep 17 00:00:00 2001 From: Richard Ramsden Date: Sat, 19 May 2012 11:59:21 -0700 Subject: [PATCH] add more types --- lib/X11/type.rb | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/lib/X11/type.rb b/lib/X11/type.rb index 6254bff..56f9086 100644 --- a/lib/X11/type.rb +++ b/lib/X11/type.rb @@ -32,25 +32,6 @@ module X11 define "Uint16", "S", 2 define "Uint32", "L", 4 - KeyCode = Uint8 - Signifigance = Uint8 - Bool = Uint8 - Bitmask = Uint32 - Window = Uint32 - Pixmap = Uint32 - Cursor = Uint32 - Colornum = Uint32 - Font = Uint32 - Gcontext = Uint32 - Colormap = Uint32 - Drawable = Uint32 - Fontable = Uint32 - Atom = Uint32 - VisualID = Uint32 - EventMask = Uint32 - - # Strings are "Special" in X11 they need - # their own class unfortunately since strings are padded class String8 def self.pack(x) x + "\x00"*(-x.length & 3) @@ -64,5 +45,26 @@ module X11 end end + KeyCode = Uint8 + Signifigance = Uint8 + Bool = Uint8 + BitGravity = Uint8 + WinGravity = Uint8 + BackingStore = Uint8 + Bitmask = Uint32 + Window = Uint32 + Pixmap = Uint32 + Cursor = Uint32 + Colornum = Uint32 + Font = Uint32 + Gcontext = Uint32 + Colormap = Uint32 + Drawable = Uint32 + Fontable = Uint32 + Atom = Uint32 + VisualID = Uint32 + Mask = Uint32 + Timestamp = Uint32 + end end