summary refs log tree commit diff stats
path: root/lib/wrappers
diff options
context:
space:
mode:
authorfowlmouth <phowl.mouth@gmail.com>2013-12-01 21:10:06 -0600
committerfowlmouth <phowl.mouth@gmail.com>2013-12-01 21:10:06 -0600
commit944b4685b9cff18fc865e4c16d2bce9bf89e29c0 (patch)
tree0af0b771b40f64341fd19d3021400fa73fe9eb5a /lib/wrappers
parent5dcfa97fb959eda3cb8a41e2bd39e998c30052c8 (diff)
downloadNim-944b4685b9cff18fc865e4c16d2bce9bf89e29c0.tar.gz
removed x11
Diffstat (limited to 'lib/wrappers')
-rw-r--r--lib/wrappers/x11/cursorfont.nim110
-rw-r--r--lib/wrappers/x11/keysym.nim1926
-rw-r--r--lib/wrappers/x11/x.nim401
-rw-r--r--lib/wrappers/x11/x11pragma.nim20
-rw-r--r--lib/wrappers/x11/xatom.nim81
-rw-r--r--lib/wrappers/x11/xcms.nim396
-rw-r--r--lib/wrappers/x11/xf86dga.nim235
-rw-r--r--lib/wrappers/x11/xf86vmode.nim229
-rw-r--r--lib/wrappers/x11/xi.nim307
-rw-r--r--lib/wrappers/x11/xinerama.nim25
-rw-r--r--lib/wrappers/x11/xkb.nim2387
-rw-r--r--lib/wrappers/x11/xkblib.nim661
-rw-r--r--lib/wrappers/x11/xlib.nim2027
-rw-r--r--lib/wrappers/x11/xrandr.nim194
-rw-r--r--lib/wrappers/x11/xrender.nim241
-rw-r--r--lib/wrappers/x11/xresource.nim200
-rw-r--r--lib/wrappers/x11/xshm.nim77
-rw-r--r--lib/wrappers/x11/xutil.nim412
-rw-r--r--lib/wrappers/x11/xv.nim84
-rw-r--r--lib/wrappers/x11/xvlib.nim234
20 files changed, 0 insertions, 10247 deletions
diff --git a/lib/wrappers/x11/cursorfont.nim b/lib/wrappers/x11/cursorfont.nim
deleted file mode 100644
index b262ad7c1..000000000
--- a/lib/wrappers/x11/cursorfont.nim
+++ /dev/null
@@ -1,110 +0,0 @@
-# $Xorg: cursorfont.h,v 1.4 2001/02/09 02:03:39 xorgcvs Exp $ 
-#
-#
-#Copyright 1987, 1998  The Open Group
-#
-#Permission to use, copy, modify, distribute, and sell this software and its
-#documentation for any purpose is hereby granted without fee, provided that
-#the above copyright notice appear in all copies and that both that
-#copyright notice and this permission notice appear in supporting
-#documentation.
-#
-#The above copyright notice and this permission notice shall be included
-#in all copies or substantial portions of the Software.
-#
-#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-#OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-#MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-#IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-#OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-#ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-#OTHER DEALINGS IN THE SOFTWARE.
-#
-#Except as contained in this notice, the name of The Open Group shall
-#not be used in advertising or otherwise to promote the sale, use or
-#other dealings in this Software without prior written authorization
-#from The Open Group.
-#
-#
-
-const 
-  XC_num_glyphs* = 154
-  XC_X_cursor* = 0
-  XC_arrow* = 2
-  XC_based_arrow_down* = 4
-  XC_based_arrow_up* = 6
-  XC_boat* = 8
-  XC_bogosity* = 10
-  XC_bottom_left_corner* = 12
-  XC_bottom_right_corner* = 14
-  XC_bottom_side* = 16
-  XC_bottom_tee* = 18
-  XC_box_spiral* = 20
-  XC_center_ptr* = 22
-  XC_circle* = 24
-  XC_clock* = 26
-  XC_coffee_mug* = 28
-  XC_cross* = 30
-  XC_cross_reverse* = 32
-  XC_crosshair* = 34
-  XC_diamond_cross* = 36
-  XC_dot* = 38
-  XC_dotbox* = 40
-  XC_double_arrow* = 42
-  XC_draft_large* = 44
-  XC_draft_small* = 46
-  XC_draped_box* = 48
-  XC_exchange* = 50
-  XC_fleur* = 52
-  XC_gobbler* = 54
-  XC_gumby* = 56
-  XC_hand1* = 58
-  XC_hand2* = 60
-  XC_heart* = 62
-  XC_icon* = 64
-  XC_iron_cross* = 66
-  XC_left_ptr* = 68
-  XC_left_side* = 70
-  XC_left_tee* = 72
-  XC_leftbutton* = 74
-  XC_ll_angle* = 76
-  XC_lr_angle* = 78
-  XC_man* = 80
-  XC_middlebutton* = 82
-  XC_mouse* = 84
-  XC_pencil* = 86
-  XC_pirate* = 88
-  XC_plus* = 90
-  XC_question_arrow* = 92
-  XC_right_ptr* = 94
-  XC_right_side* = 96
-  XC_right_tee* = 98
-  XC_rightbutton* = 100
-  XC_rtl_logo* = 102
-  XC_sailboat* = 104
-  XC_sb_down_arrow* = 106
-  XC_sb_h_double_arrow* = 108
-  XC_sb_left_arrow* = 110
-  XC_sb_right_arrow* = 112
-  XC_sb_up_arrow* = 114
-  XC_sb_v_double_arrow* = 116
-  XC_shuttle* = 118
-  XC_sizing* = 120
-  XC_spider* = 122
-  XC_spraycan* = 124
-  XC_star* = 126
-  XC_target* = 128
-  XC_tcross* = 130
-  XC_top_left_arrow* = 132
-  XC_top_left_corner* = 134
-  XC_top_right_corner* = 136
-  XC_top_side* = 138
-  XC_top_tee* = 140
-  XC_trek* = 142
-  XC_ul_angle* = 144
-  XC_umbrella* = 146
-  XC_ur_angle* = 148
-  XC_watch* = 150
-  XC_xterm* = 152
-
-# implementation
diff --git a/lib/wrappers/x11/keysym.nim b/lib/wrappers/x11/keysym.nim
deleted file mode 100644
index c001ab622..000000000
--- a/lib/wrappers/x11/keysym.nim
+++ /dev/null
@@ -1,1926 +0,0 @@
-#
-#Converted from X11/keysym.h and X11/keysymdef.h
-#
-#Capital letter consts renamed from XK_... to XKc_...
-# (since Pascal isn't case-sensitive)
-#
-#i.e.
-#C      Pascal
-#XK_a   XK_a
-#XK_A   XKc_A
-#
-
-#* default keysyms *
-import x
-
-const 
-  XK_VoidSymbol*: TKeySym = 0x00FFFFFF # void symbol 
-
-when defined(XK_MISCELLANY) or true: 
-  const
-    #*
-    # * TTY Functions, cleverly chosen to map to ascii, for convenience of
-    # * programming, but could have been arbitrary (at the cost of lookup
-    # * tables in client code.
-    # *
-    XK_BackSpace*: TKeySym = 0x0000FF08  # back space, back char 
-    XK_Tab*: TKeySym = 0x0000FF09
-    XK_Linefeed*: TKeySym = 0x0000FF0A   # Linefeed, LF 
-    XK_Clear*: TKeySym = 0x0000FF0B
-    XK_Return*: TKeySym = 0x0000FF0D     # Return, enter 
-    XK_Pause*: TKeySym = 0x0000FF13      # Pause, hold 
-    XK_Scroll_Lock*: TKeySym = 0x0000FF14
-    XK_Sys_Req*: TKeySym = 0x0000FF15
-    XK_Escape*: TKeySym = 0x0000FF1B
-    XK_Delete*: TKeySym = 0x0000FFFF     # Delete, rubout \
-                                # International & multi-key character composition 
-    XK_Multi_key*: TKeySym = 0x0000FF20  # Multi-key character compose 
-    XK_Codeinput*: TKeySym = 0x0000FF37
-    XK_SingleCandidate*: TKeySym = 0x0000FF3C
-    XK_MultipleCandidate*: TKeySym = 0x0000FF3D
-    XK_PreviousCandidate*: TKeySym = 0x0000FF3E # Japanese keyboard support 
-    XK_Kanji*: TKeySym = 0x0000FF21      # Kanji, Kanji convert 
-    XK_Muhenkan*: TKeySym = 0x0000FF22   # Cancel Conversion 
-    XK_Henkan_Mode*: TKeySym = 0x0000FF23 # Start/Stop Conversion 
-    XK_Henkan*: TKeySym = 0x0000FF23     # Alias for Henkan_Mode 
-    XK_Romaji*: TKeySym = 0x0000FF24     # to Romaji 
-    XK_Hiragana*: TKeySym = 0x0000FF25   # to Hiragana 
-    XK_Katakana*: TKeySym = 0x0000FF26   # to Katakana 
-    XK_Hiragana_Katakana*: TKeySym = 0x0000FF27 # Hiragana/Katakana toggle 
-    XK_Zenkaku*: TKeySym = 0x0000FF28    # to Zenkaku 
-    XK_Hankaku*: TKeySym = 0x0000FF29    # to Hankaku 
-    XK_Zenkaku_Hankaku*: TKeySym = 0x0000FF2A # Zenkaku/Hankaku toggle 
-    XK_Touroku*: TKeySym = 0x0000FF2B    # Add to Dictionary 
-    XK_Massyo*: TKeySym = 0x0000FF2C     # Delete from Dictionary 
-    XK_Kana_Lock*: TKeySym = 0x0000FF2D  # Kana Lock 
-    XK_Kana_Shift*: TKeySym = 0x0000FF2E # Kana Shift 
-    XK_Eisu_Shift*: TKeySym = 0x0000FF2F # Alphanumeric Shift 
-    XK_Eisu_toggle*: TKeySym = 0x0000FF30 # Alphanumeric toggle 
-    XK_Kanji_Bangou*: TKeySym = 0x0000FF37 # Codeinput 
-    XK_Zen_Koho*: TKeySym = 0x0000FF3D   # Multiple/All Candidate(s) 
-    XK_Mae_Koho*: TKeySym = 0x0000FF3E   # Previous Candidate \
-                                # = $FF31 thru = $FF3F are under XK_KOREAN 
-                                # Cursor control & motion 
-    XK_Home*: TKeySym = 0x0000FF50
-    XK_Left*: TKeySym = 0x0000FF51       # Move left, left arrow 
-    XK_Up*: TKeySym = 0x0000FF52         # Move up, up arrow 
-    XK_Right*: TKeySym = 0x0000FF53      # Move right, right arrow 
-    XK_Down*: TKeySym = 0x0000FF54       # Move down, down arrow 
-    XK_Prior*: TKeySym = 0x0000FF55      # Prior, previous 
-    XK_Page_Up*: TKeySym = 0x0000FF55
-    XK_Next*: TKeySym = 0x0000FF56       # Next 
-    XK_Page_Down*: TKeySym = 0x0000FF56
-    XK_End*: TKeySym = 0x0000FF57        # EOL 
-    XK_Begin*: TKeySym = 0x0000FF58      # BOL \
-                                # Misc Functions 
-    XK_Select*: TKeySym = 0x0000FF60     # Select, mark 
-    XK_Print*: TKeySym = 0x0000FF61
-    XK_Execute*: TKeySym = 0x0000FF62    # Execute, run, do 
-    XK_Insert*: TKeySym = 0x0000FF63     # Insert, insert here 
-    XK_Undo*: TKeySym = 0x0000FF65       # Undo, oops 
-    XK_Redo*: TKeySym = 0x0000FF66       # redo, again 
-    XK_Menu*: TKeySym = 0x0000FF67
-    XK_Find*: TKeySym = 0x0000FF68       # Find, search 
-    XK_Cancel*: TKeySym = 0x0000FF69     # Cancel, stop, abort, exit 
-    XK_Help*: TKeySym = 0x0000FF6A       # Help 
-    XK_Break*: TKeySym = 0x0000FF6B
-    XK_Mode_switch*: TKeySym = 0x0000FF7E # Character set switch 
-    XK_script_switch*: TKeySym = 0x0000FF7E # Alias for mode_switch 
-    XK_Num_Lock*: TKeySym = 0x0000FF7F   # Keypad Functions, keypad numbers cleverly chosen to map to ascii 
-    XK_KP_Space*: TKeySym = 0x0000FF80   # space 
-    XK_KP_Tab*: TKeySym = 0x0000FF89
-    XK_KP_Enter*: TKeySym = 0x0000FF8D   # enter 
-    XK_KP_F1*: TKeySym = 0x0000FF91      # PF1, KP_A, ... 
-    XK_KP_F2*: TKeySym = 0x0000FF92
-    XK_KP_F3*: TKeySym = 0x0000FF93
-    XK_KP_F4*: TKeySym = 0x0000FF94
-    XK_KP_Home*: TKeySym = 0x0000FF95
-    XK_KP_Left*: TKeySym = 0x0000FF96
-    XK_KP_Up*: TKeySym = 0x0000FF97
-    XK_KP_Right*: TKeySym = 0x0000FF98
-    XK_KP_Down*: TKeySym = 0x0000FF99
-    XK_KP_Prior*: TKeySym = 0x0000FF9A
-    XK_KP_Page_Up*: TKeySym = 0x0000FF9A
-    XK_KP_Next*: TKeySym = 0x0000FF9B
-    XK_KP_Page_Down*: TKeySym = 0x0000FF9B
-    XK_KP_End*: TKeySym = 0x0000FF9C
-    XK_KP_Begin*: TKeySym = 0x0000FF9D
-    XK_KP_Insert*: TKeySym = 0x0000FF9E
-    XK_KP_Delete*: TKeySym = 0x0000FF9F
-    XK_KP_Equal*: TKeySym = 0x0000FFBD   # equals 
-    XK_KP_Multiply*: TKeySym = 0x0000FFAA
-    XK_KP_Add*: TKeySym = 0x0000FFAB
-    XK_KP_Separator*: TKeySym = 0x0000FFAC # separator, often comma 
-    XK_KP_Subtract*: TKeySym = 0x0000FFAD
-    XK_KP_Decimal*: TKeySym = 0x0000FFAE
-    XK_KP_Divide*: TKeySym = 0x0000FFAF
-    XK_KP_0*: TKeySym = 0x0000FFB0
-    XK_KP_1*: TKeySym = 0x0000FFB1
-    XK_KP_2*: TKeySym = 0x0000FFB2
-    XK_KP_3*: TKeySym = 0x0000FFB3
-    XK_KP_4*: TKeySym = 0x0000FFB4
-    XK_KP_5*: TKeySym = 0x0000FFB5
-    XK_KP_6*: TKeySym = 0x0000FFB6
-    XK_KP_7*: TKeySym = 0x0000FFB7
-    XK_KP_8*: TKeySym = 0x0000FFB8
-    XK_KP_9*: TKeySym = 0x0000FFB9 #*\
-                          # * Auxilliary Functions; note the duplicate definitions for left and right
-                          # * function keys;  Sun keyboards and a few other manufactures have such
-                          # * function key groups on the left and/or right sides of the keyboard.
-                          # * We've not found a keyboard with more than 35 function keys total.
-                          # *
-    XK_F1*: TKeySym = 0x0000FFBE
-    XK_F2*: TKeySym = 0x0000FFBF
-    XK_F3*: TKeySym = 0x0000FFC0
-    XK_F4*: TKeySym = 0x0000FFC1
-    XK_F5*: TKeySym = 0x0000FFC2
-    XK_F6*: TKeySym = 0x0000FFC3
-    XK_F7*: TKeySym = 0x0000FFC4
-    XK_F8*: TKeySym = 0x0000FFC5
-    XK_F9*: TKeySym = 0x0000FFC6
-    XK_F10*: TKeySym = 0x0000FFC7
-    XK_F11*: TKeySym = 0x0000FFC8
-    XK_L1*: TKeySym = 0x0000FFC8
-    XK_F12*: TKeySym = 0x0000FFC9
-    XK_L2*: TKeySym = 0x0000FFC9
-    XK_F13*: TKeySym = 0x0000FFCA
-    XK_L3*: TKeySym = 0x0000FFCA
-    XK_F14*: TKeySym = 0x0000FFCB
-    XK_L4*: TKeySym = 0x0000FFCB
-    XK_F15*: TKeySym = 0x0000FFCC
-    XK_L5*: TKeySym = 0x0000FFCC
-    XK_F16*: TKeySym = 0x0000FFCD
-    XK_L6*: TKeySym = 0x0000FFCD
-    XK_F17*: TKeySym = 0x0000FFCE
-    XK_L7*: TKeySym = 0x0000FFCE
-    XK_F18*: TKeySym = 0x0000FFCF
-    XK_L8*: TKeySym = 0x0000FFCF
-    XK_F19*: TKeySym = 0x0000FFD0
-    XK_L9*: TKeySym = 0x0000FFD0
-    XK_F20*: TKeySym = 0x0000FFD1
-    XK_L10*: TKeySym = 0x0000FFD1
-    XK_F21*: TKeySym = 0x0000FFD2
-    XK_R1*: TKeySym = 0x0000FFD2
-    XK_F22*: TKeySym = 0x0000FFD3
-    XK_R2*: TKeySym = 0x0000FFD3
-    XK_F23*: TKeySym = 0x0000FFD4
-    XK_R3*: TKeySym = 0x0000FFD4
-    XK_F24*: TKeySym = 0x0000FFD5
-    XK_R4*: TKeySym = 0x0000FFD5
-    XK_F25*: TKeySym = 0x0000FFD6
-    XK_R5*: TKeySym = 0x0000FFD6
-    XK_F26*: TKeySym = 0x0000FFD7
-    XK_R6*: TKeySym = 0x0000FFD7
-    XK_F27*: TKeySym = 0x0000FFD8
-    XK_R7*: TKeySym = 0x0000FFD8
-    XK_F28*: TKeySym = 0x0000FFD9
-    XK_R8*: TKeySym = 0x0000FFD9
-    XK_F29*: TKeySym = 0x0000FFDA
-    XK_R9*: TKeySym = 0x0000FFDA
-    XK_F30*: TKeySym = 0x0000FFDB
-    XK_R10*: TKeySym = 0x0000FFDB
-    XK_F31*: TKeySym = 0x0000FFDC
-    XK_R11*: TKeySym = 0x0000FFDC
-    XK_F32*: TKeySym = 0x0000FFDD
-    XK_R12*: TKeySym = 0x0000FFDD
-    XK_F33*: TKeySym = 0x0000FFDE
-    XK_R13*: TKeySym = 0x0000FFDE
-    XK_F34*: TKeySym = 0x0000FFDF
-    XK_R14*: TKeySym = 0x0000FFDF
-    XK_F35*: TKeySym = 0x0000FFE0
-    XK_R15*: TKeySym = 0x0000FFE0        # Modifiers 
-    XK_Shift_L*: TKeySym = 0x0000FFE1    # Left shift 
-    XK_Shift_R*: TKeySym = 0x0000FFE2    # Right shift 
-    XK_Control_L*: TKeySym = 0x0000FFE3  # Left control 
-    XK_Control_R*: TKeySym = 0x0000FFE4  # Right control 
-    XK_Caps_Lock*: TKeySym = 0x0000FFE5  # Caps lock 
-    XK_Shift_Lock*: TKeySym = 0x0000FFE6 # Shift lock 
-    XK_Meta_L*: TKeySym = 0x0000FFE7     # Left meta 
-    XK_Meta_R*: TKeySym = 0x0000FFE8     # Right meta 
-    XK_Alt_L*: TKeySym = 0x0000FFE9      # Left alt 
-    XK_Alt_R*: TKeySym = 0x0000FFEA      # Right alt 
-    XK_Super_L*: TKeySym = 0x0000FFEB    # Left super 
-    XK_Super_R*: TKeySym = 0x0000FFEC    # Right super 
-    XK_Hyper_L*: TKeySym = 0x0000FFED    # Left hyper 
-    XK_Hyper_R*: TKeySym = 0x0000FFEE    # Right hyper 
-# XK_MISCELLANY 
-#*
-# * ISO 9995 Function and Modifier Keys
-# * Byte 3 = = $FE
-# *
-
-when defined(XK_XKB_KEYS) or true: 
-  const
-    XK_ISO_Lock*: TKeySym = 0x0000FE01
-    XK_ISO_Level2_Latch*: TKeySym = 0x0000FE02
-    XK_ISO_Level3_Shift*: TKeySym = 0x0000FE03
-    XK_ISO_Level3_Latch*: TKeySym = 0x0000FE04
-    XK_ISO_Level3_Lock*: TKeySym = 0x0000FE05
-    XK_ISO_Group_Shift*: TKeySym = 0x0000FF7E # Alias for mode_switch 
-    XK_ISO_Group_Latch*: TKeySym = 0x0000FE06
-    XK_ISO_Group_Lock*: TKeySym = 0x0000FE07
-    XK_ISO_Next_Group*: TKeySym = 0x0000FE08
-    XK_ISO_Next_Group_Lock*: TKeySym = 0x0000FE09
-    XK_ISO_Prev_Group*: TKeySym = 0x0000FE0A
-    XK_ISO_Prev_Group_Lock*: TKeySym = 0x0000FE0B
-    XK_ISO_First_Group*: TKeySym = 0x0000FE0C
-    XK_ISO_First_Group_Lock*: TKeySym = 0x0000FE0D
-    XK_ISO_Last_Group*: TKeySym = 0x0000FE0E
-    XK_ISO_Last_Group_Lock*: TKeySym = 0x0000FE0F
-    XK_ISO_Left_Tab*: TKeySym = 0x0000FE20
-    XK_ISO_Move_Line_Up*: TKeySym = 0x0000FE21
-    XK_ISO_Move_Line_Down*: TKeySym = 0x0000FE22
-    XK_ISO_Partial_Line_Up*: TKeySym = 0x0000FE23
-    XK_ISO_Partial_Line_Down*: TKeySym = 0x0000FE24
-    XK_ISO_Partial_Space_Left*: TKeySym = 0x0000FE25
-    XK_ISO_Partial_Space_Right*: TKeySym = 0x0000FE26
-    XK_ISO_Set_Margin_Left*: TKeySym = 0x0000FE27
-    XK_ISO_Set_Margin_Right*: TKeySym = 0x0000FE28
-    XK_ISO_Release_Margin_Left*: TKeySym = 0x0000FE29
-    XK_ISO_Release_Margin_Right*: TKeySym = 0x0000FE2A
-    XK_ISO_Release_Both_Margins*: TKeySym = 0x0000FE2B
-    XK_ISO_Fast_Cursor_Left*: TKeySym = 0x0000FE2C
-    XK_ISO_Fast_Cursor_Right*: TKeySym = 0x0000FE2D
-    XK_ISO_Fast_Cursor_Up*: TKeySym = 0x0000FE2E
-    XK_ISO_Fast_Cursor_Down*: TKeySym = 0x0000FE2F
-    XK_ISO_Continuous_Underline*: TKeySym = 0x0000FE30
-    XK_ISO_Discontinuous_Underline*: TKeySym = 0x0000FE31
-    XK_ISO_Emphasize*: TKeySym = 0x0000FE32
-    XK_ISO_Center_Object*: TKeySym = 0x0000FE33
-    XK_ISO_Enter*: TKeySym = 0x0000FE34
-    XK_dead_grave*: TKeySym = 0x0000FE50
-    XK_dead_acute*: TKeySym = 0x0000FE51
-    XK_dead_circumflex*: TKeySym = 0x0000FE52
-    XK_dead_tilde*: TKeySym = 0x0000FE53
-    XK_dead_macron*: TKeySym = 0x0000FE54
-    XK_dead_breve*: TKeySym = 0x0000FE55
-    XK_dead_abovedot*: TKeySym = 0x0000FE56
-    XK_dead_diaeresis*: TKeySym = 0x0000FE57
-    XK_dead_abovering*: TKeySym = 0x0000FE58
-    XK_dead_doubleacute*: TKeySym = 0x0000FE59
-    XK_dead_caron*: TKeySym = 0x0000FE5A
-    XK_dead_cedilla*: TKeySym = 0x0000FE5B
-    XK_dead_ogonek*: TKeySym = 0x0000FE5C
-    XK_dead_iota*: TKeySym = 0x0000FE5D
-    XK_dead_voiced_sound*: TKeySym = 0x0000FE5E
-    XK_dead_semivoiced_sound*: TKeySym = 0x0000FE5F
-    XK_dead_belowdot*: TKeySym = 0x0000FE60
-    XK_dead_hook*: TKeySym = 0x0000FE61
-    XK_dead_horn*: TKeySym = 0x0000FE62
-    XK_First_Virtual_Screen*: TKeySym = 0x0000FED0
-    XK_Prev_Virtual_Screen*: TKeySym = 0x0000FED1
-    XK_Next_Virtual_Screen*: TKeySym = 0x0000FED2
-    XK_Last_Virtual_Screen*: TKeySym = 0x0000FED4
-    XK_Terminate_Server*: TKeySym = 0x0000FED5
-    XK_AccessX_Enable*: TKeySym = 0x0000FE70
-    XK_AccessX_Feedback_Enable*: TKeySym = 0x0000FE71
-    XK_RepeatKeys_Enable*: TKeySym = 0x0000FE72
-    XK_SlowKeys_Enable*: TKeySym = 0x0000FE73
-    XK_BounceKeys_Enable*: TKeySym = 0x0000FE74
-    XK_StickyKeys_Enable*: TKeySym = 0x0000FE75
-    XK_MouseKeys_Enable*: TKeySym = 0x0000FE76
-    XK_MouseKeys_Accel_Enable*: TKeySym = 0x0000FE77
-    XK_Overlay1_Enable*: TKeySym = 0x0000FE78
-    XK_Overlay2_Enable*: TKeySym = 0x0000FE79
-    XK_AudibleBell_Enable*: TKeySym = 0x0000FE7A
-    XK_Pointer_Left*: TKeySym = 0x0000FEE0
-    XK_Pointer_Right*: TKeySym = 0x0000FEE1
-    XK_Pointer_Up*: TKeySym = 0x0000FEE2
-    XK_Pointer_Down*: TKeySym = 0x0000FEE3
-    XK_Pointer_UpLeft*: TKeySym = 0x0000FEE4
-    XK_Pointer_UpRight*: TKeySym = 0x0000FEE5
-    XK_Pointer_DownLeft*: TKeySym = 0x0000FEE6
-    XK_Pointer_DownRight*: TKeySym = 0x0000FEE7
-    XK_Pointer_Button_Dflt*: TKeySym = 0x0000FEE8
-    XK_Pointer_Button1*: TKeySym = 0x0000FEE9
-    XK_Pointer_Button2*: TKeySym = 0x0000FEEA
-    XK_Pointer_Button3*: TKeySym = 0x0000FEEB
-    XK_Pointer_Button4*: TKeySym = 0x0000FEEC
-    XK_Pointer_Button5*: TKeySym = 0x0000FEED
-    XK_Pointer_DblClick_Dflt*: TKeySym = 0x0000FEEE
-    XK_Pointer_DblClick1*: TKeySym = 0x0000FEEF
-    XK_Pointer_DblClick2*: TKeySym = 0x0000FEF0
-    XK_Pointer_DblClick3*: TKeySym = 0x0000FEF1
-    XK_Pointer_DblClick4*: TKeySym = 0x0000FEF2
-    XK_Pointer_DblClick5*: TKeySym = 0x0000FEF3
-    XK_Pointer_Drag_Dflt*: TKeySym = 0x0000FEF4
-    XK_Pointer_Drag1*: TKeySym = 0x0000FEF5
-    XK_Pointer_Drag2*: TKeySym = 0x0000FEF6
-    XK_Pointer_Drag3*: TKeySym = 0x0000FEF7
-    XK_Pointer_Drag4*: TKeySym = 0x0000FEF8
-    XK_Pointer_Drag5*: TKeySym = 0x0000FEFD
-    XK_Pointer_EnableKeys*: TKeySym = 0x0000FEF9
-    XK_Pointer_Accelerate*: TKeySym = 0x0000FEFA
-    XK_Pointer_DfltBtnNext*: TKeySym = 0x0000FEFB
-    XK_Pointer_DfltBtnPrev*: TKeySym = 0x0000FEFC
-  #*
-  # * 3270 Terminal Keys
-  # * Byte 3 = = $FD
-  # *
-
-when defined(XK_3270) or true: 
-  const
-    XK_3270_Duplicate*: TKeySym = 0x0000FD01
-    XK_3270_FieldMark*: TKeySym = 0x0000FD02
-    XK_3270_Right2*: TKeySym = 0x0000FD03
-    XK_3270_Left2*: TKeySym = 0x0000FD04
-    XK_3270_BackTab*: TKeySym = 0x0000FD05
-    XK_3270_EraseEOF*: TKeySym = 0x0000FD06
-    XK_3270_EraseInput*: TKeySym = 0x0000FD07
-    XK_3270_Reset*: TKeySym = 0x0000FD08
-    XK_3270_Quit*: TKeySym = 0x0000FD09
-    XK_3270_PA1*: TKeySym = 0x0000FD0A
-    XK_3270_PA2*: TKeySym = 0x0000FD0B
-    XK_3270_PA3*: TKeySym = 0x0000FD0C
-    XK_3270_Test*: TKeySym = 0x0000FD0D
-    XK_3270_Attn*: TKeySym = 0x0000FD0E
-    XK_3270_CursorBlink*: TKeySym = 0x0000FD0F
-    XK_3270_AltCursor*: TKeySym = 0x0000FD10
-    XK_3270_KeyClick*: TKeySym = 0x0000FD11
-    XK_3270_Jump*: TKeySym = 0x0000FD12
-    XK_3270_Ident*: TKeySym = 0x0000FD13
-    XK_3270_Rule*: TKeySym = 0x0000FD14
-    XK_3270_Copy*: TKeySym = 0x0000FD15
-    XK_3270_Play*: TKeySym = 0x0000FD16
-    XK_3270_Setup*: TKeySym = 0x0000FD17
-    XK_3270_Record*: TKeySym = 0x0000FD18
-    XK_3270_ChangeScreen*: TKeySym = 0x0000FD19
-    XK_3270_DeleteWord*: TKeySym = 0x0000FD1A
-    XK_3270_ExSelect*: TKeySym = 0x0000FD1B
-    XK_3270_CursorSelect*: TKeySym = 0x0000FD1C
-    XK_3270_PrintScreen*: TKeySym = 0x0000FD1D
-    XK_3270_Enter*: TKeySym = 0x0000FD1E
-#*
-# *  Latin 1
-# *  Byte 3 = 0
-# *
-
-when defined(XK_LATIN1) or true: 
-  const
-    XK_space*: TKeySym = 0x00000020
-    XK_exclam*: TKeySym = 0x00000021
-    XK_quotedbl*: TKeySym = 0x00000022
-    XK_numbersign*: TKeySym = 0x00000023
-    XK_dollar*: TKeySym = 0x00000024
-    XK_percent*: TKeySym = 0x00000025
-    XK_ampersand*: TKeySym = 0x00000026
-    XK_apostrophe*: TKeySym = 0x00000027
-    XK_quoteright*: TKeySym = 0x00000027 # deprecated 
-    XK_parenleft*: TKeySym = 0x00000028
-    XK_parenright*: TKeySym = 0x00000029
-    XK_asterisk*: TKeySym = 0x0000002A
-    XK_plus*: TKeySym = 0x0000002B
-    XK_comma*: TKeySym = 0x0000002C
-    XK_minus*: TKeySym = 0x0000002D
-    XK_period*: TKeySym = 0x0000002E
-    XK_slash*: TKeySym = 0x0000002F
-    XK_0*: TKeySym = 0x00000030
-    XK_1*: TKeySym = 0x00000031
-    XK_2*: TKeySym = 0x00000032
-    XK_3*: TKeySym = 0x00000033
-    XK_4*: TKeySym = 0x00000034
-    XK_5*: TKeySym = 0x00000035
-    XK_6*: TKeySym = 0x00000036
-    XK_7*: TKeySym = 0x00000037
-    XK_8*: TKeySym = 0x00000038
-    XK_9*: TKeySym = 0x00000039
-    XK_colon*: TKeySym = 0x0000003A
-    XK_semicolon*: TKeySym = 0x0000003B
-    XK_less*: TKeySym = 0x0000003C
-    XK_equal*: TKeySym = 0x0000003D
-    XK_greater*: TKeySym = 0x0000003E
-    XK_question*: TKeySym = 0x0000003F
-    XK_at*: TKeySym = 0x00000040
-    XKc_A*: TKeySym = 0x00000041
-    XKc_B*: TKeySym = 0x00000042
-    XKc_C*: TKeySym = 0x00000043
-    XKc_D*: TKeySym = 0x00000044
-    XKc_E*: TKeySym = 0x00000045
-    XKc_F*: TKeySym = 0x00000046
-    XKc_G*: TKeySym = 0x00000047
-    XKc_H*: TKeySym = 0x00000048
-    XKc_I*: TKeySym = 0x00000049
-    XKc_J*: TKeySym = 0x0000004A
-    XKc_K*: TKeySym = 0x0000004B
-    XKc_L*: TKeySym = 0x0000004C
-    XKc_M*: TKeySym = 0x0000004D
-    XKc_N*: TKeySym = 0x0000004E
-    XKc_O*: TKeySym = 0x0000004F
-    XKc_P*: TKeySym = 0x00000050
-    XKc_Q*: TKeySym = 0x00000051
-    XKc_R*: TKeySym = 0x00000052
-    XKc_S*: TKeySym = 0x00000053
-    XKc_T*: TKeySym = 0x00000054
-    XKc_U*: TKeySym = 0x00000055
-    XKc_V*: TKeySym = 0x00000056
-    XKc_W*: TKeySym = 0x00000057
-    XKc_X*: TKeySym = 0x00000058
-    XKc_Y*: TKeySym = 0x00000059
-    XKc_Z*: TKeySym = 0x0000005A
-    XK_bracketleft*: TKeySym = 0x0000005B
-    XK_backslash*: TKeySym = 0x0000005C
-    XK_bracketright*: TKeySym = 0x0000005D
-    XK_asciicircum*: TKeySym = 0x0000005E
-    XK_underscore*: TKeySym = 0x0000005F
-    XK_grave*: TKeySym = 0x00000060
-    XK_quoteleft*: TKeySym = 0x00000060  # deprecated 
-    XK_a*: TKeySym = 0x00000061
-    XK_b*: TKeySym = 0x00000062
-    XK_c*: TKeySym = 0x00000063
-    XK_d*: TKeySym = 0x00000064
-    XK_e*: TKeySym = 0x00000065
-    XK_f*: TKeySym = 0x00000066
-    XK_g*: TKeySym = 0x00000067
-    XK_h*: TKeySym = 0x00000068
-    XK_i*: TKeySym = 0x00000069
-    XK_j*: TKeySym = 0x0000006A
-    XK_k*: TKeySym = 0x0000006B
-    XK_l*: TKeySym = 0x0000006C
-    XK_m*: TKeySym = 0x0000006D
-    XK_n*: TKeySym = 0x0000006E
-    XK_o*: TKeySym = 0x0000006F
-    XK_p*: TKeySym = 0x00000070
-    XK_q*: TKeySym = 0x00000071
-    XK_r*: TKeySym = 0x00000072
-    XK_s*: TKeySym = 0x00000073
-    XK_t*: TKeySym = 0x00000074
-    XK_u*: TKeySym = 0x00000075
-    XK_v*: TKeySym = 0x00000076
-    XK_w*: TKeySym = 0x00000077
-    XK_x*: TKeySym = 0x00000078
-    XK_y*: TKeySym = 0x00000079
-    XK_z*: TKeySym = 0x0000007A
-    XK_braceleft*: TKeySym = 0x0000007B
-    XK_bar*: TKeySym = 0x0000007C
-    XK_braceright*: TKeySym = 0x0000007D
-    XK_asciitilde*: TKeySym = 0x0000007E
-    XK_nobreakspace*: TKeySym = 0x000000A0
-    XK_exclamdown*: TKeySym = 0x000000A1
-    XK_cent*: TKeySym = 0x000000A2
-    XK_sterling*: TKeySym = 0x000000A3
-    XK_currency*: TKeySym = 0x000000A4
-    XK_yen*: TKeySym = 0x000000A5
-    XK_brokenbar*: TKeySym = 0x000000A6
-    XK_section*: TKeySym = 0x000000A7
-    XK_diaeresis*: TKeySym = 0x000000A8
-    XK_copyright*: TKeySym = 0x000000A9
-    XK_ordfeminine*: TKeySym = 0x000000AA
-    XK_guillemotleft*: TKeySym = 0x000000AB # left angle quotation mark 
-    XK_notsign*: TKeySym = 0x000000AC
-    XK_hyphen*: TKeySym = 0x000000AD
-    XK_registered*: TKeySym = 0x000000AE
-    XK_macron*: TKeySym = 0x000000AF
-    XK_degree*: TKeySym = 0x000000B0
-    XK_plusminus*: TKeySym = 0x000000B1
-    XK_twosuperior*: TKeySym = 0x000000B2
-    XK_threesuperior*: TKeySym = 0x000000B3
-    XK_acute*: TKeySym = 0x000000B4
-    XK_mu*: TKeySym = 0x000000B5
-    XK_paragraph*: TKeySym = 0x000000B6
-    XK_periodcentered*: TKeySym = 0x000000B7
-    XK_cedilla*: TKeySym = 0x000000B8
-    XK_onesuperior*: TKeySym = 0x000000B9
-    XK_masculine*: TKeySym = 0x000000BA
-    XK_guillemotright*: TKeySym = 0x000000BB # right angle quotation mark 
-    XK_onequarter*: TKeySym = 0x000000BC
-    XK_onehalf*: TKeySym = 0x000000BD
-    XK_threequarters*: TKeySym = 0x000000BE
-    XK_questiondown*: TKeySym = 0x000000BF
-    XKc_Agrave*: TKeySym = 0x000000C0
-    XKc_Aacute*: TKeySym = 0x000000C1
-    XKc_Acircumflex*: TKeySym = 0x000000C2
-    XKc_Atilde*: TKeySym = 0x000000C3
-    XKc_Adiaeresis*: TKeySym = 0x000000C4
-    XKc_Aring*: TKeySym = 0x000000C5
-    XKc_AE*: TKeySym = 0x000000C6
-    XKc_Ccedilla*: TKeySym = 0x000000C7
-    XKc_Egrave*: TKeySym = 0x000000C8
-    XKc_Eacute*: TKeySym = 0x000000C9
-    XKc_Ecircumflex*: TKeySym = 0x000000CA
-    XKc_Ediaeresis*: TKeySym = 0x000000CB
-    XKc_Igrave*: TKeySym = 0x000000CC
-    XKc_Iacute*: TKeySym = 0x000000CD
-    XKc_Icircumflex*: TKeySym = 0x000000CE
-    XKc_Idiaeresis*: TKeySym = 0x000000CF
-    XKc_ETH*: TKeySym = 0x000000D0
-    XKc_Ntilde*: TKeySym = 0x000000D1
-    XKc_Ograve*: TKeySym = 0x000000D2
-    XKc_Oacute*: TKeySym = 0x000000D3
-    XKc_Ocircumflex*: TKeySym = 0x000000D4
-    XKc_Otilde*: TKeySym = 0x000000D5
-    XKc_Odiaeresis*: TKeySym = 0x000000D6
-    XK_multiply*: TKeySym = 0x000000D7
-    XKc_Ooblique*: TKeySym = 0x000000D8
-    XKc_Oslash*: TKeySym = XKc_Ooblique
-    XKc_Ugrave*: TKeySym = 0x000000D9
-    XKc_Uacute*: TKeySym = 0x000000DA
-    XKc_Ucircumflex*: TKeySym = 0x000000DB
-    XKc_Udiaeresis*: TKeySym = 0x000000DC
-    XKc_Yacute*: TKeySym = 0x000000DD
-    XKc_THORN*: TKeySym = 0x000000DE
-    XK_ssharp*: TKeySym = 0x000000DF
-    XK_agrave*: TKeySym = 0x000000E0
-    XK_aacute*: TKeySym = 0x000000E1
-    XK_acircumflex*: TKeySym = 0x000000E2
-    XK_atilde*: TKeySym = 0x000000E3
-    XK_adiaeresis*: TKeySym = 0x000000E4
-    XK_aring*: TKeySym = 0x000000E5
-    XK_ae*: TKeySym = 0x000000E6
-    XK_ccedilla*: TKeySym = 0x000000E7
-    XK_egrave*: TKeySym = 0x000000E8
-    XK_eacute*: TKeySym = 0x000000E9
-    XK_ecircumflex*: TKeySym = 0x000000EA
-    XK_ediaeresis*: TKeySym = 0x000000EB
-    XK_igrave*: TKeySym = 0x000000EC
-    XK_iacute*: TKeySym = 0x000000ED
-    XK_icircumflex*: TKeySym = 0x000000EE
-    XK_idiaeresis*: TKeySym = 0x000000EF
-    XK_eth*: TKeySym = 0x000000F0
-    XK_ntilde*: TKeySym = 0x000000F1
-    XK_ograve*: TKeySym = 0x000000F2
-    XK_oacute*: TKeySym = 0x000000F3
-    XK_ocircumflex*: TKeySym = 0x000000F4
-    XK_otilde*: TKeySym = 0x000000F5
-    XK_odiaeresis*: TKeySym = 0x000000F6
-    XK_division*: TKeySym = 0x000000F7
-    XK_oslash*: TKeySym = 0x000000F8
-    XK_ooblique*: TKeySym = XK_oslash
-    XK_ugrave*: TKeySym = 0x000000F9
-    XK_uacute*: TKeySym = 0x000000FA
-    XK_ucircumflex*: TKeySym = 0x000000FB
-    XK_udiaeresis*: TKeySym = 0x000000FC
-    XK_yacute*: TKeySym = 0x000000FD
-    XK_thorn*: TKeySym = 0x000000FE
-    XK_ydiaeresis*: TKeySym = 0x000000FF
-# XK_LATIN1 
-#*
-# *   Latin 2
-# *   Byte 3 = 1
-# *
-
-when defined(XK_LATIN2) or true: 
-  const
-    XKc_Aogonek*: TKeySym = 0x000001A1
-    XK_breve*: TKeySym = 0x000001A2
-    XKc_Lstroke*: TKeySym = 0x000001A3
-    XKc_Lcaron*: TKeySym = 0x000001A5
-    XKc_Sacute*: TKeySym = 0x000001A6
-    XKc_Scaron*: TKeySym = 0x000001A9
-    XKc_Scedilla*: TKeySym = 0x000001AA
-    XKc_Tcaron*: TKeySym = 0x000001AB
-    XKc_Zacute*: TKeySym = 0x000001AC
-    XKc_Zcaron*: TKeySym = 0x000001AE
-    XKc_Zabovedot*: TKeySym = 0x000001AF
-    XK_aogonek*: TKeySym = 0x000001B1
-    XK_ogonek*: TKeySym = 0x000001B2
-    XK_lstroke*: TKeySym = 0x000001B3
-    XK_lcaron*: TKeySym = 0x000001B5
-    XK_sacute*: TKeySym = 0x000001B6
-    XK_caron*: TKeySym = 0x000001B7
-    XK_scaron*: TKeySym = 0x000001B9
-    XK_scedilla*: TKeySym = 0x000001BA
-    XK_tcaron*: TKeySym = 0x000001BB
-    XK_zacute*: TKeySym = 0x000001BC
-    XK_doubleacute*: TKeySym = 0x000001BD
-    XK_zcaron*: TKeySym = 0x000001BE
-    XK_zabovedot*: TKeySym = 0x000001BF
-    XKc_Racute*: TKeySym = 0x000001C0
-    XKc_Abreve*: TKeySym = 0x000001C3
-    XKc_Lacute*: TKeySym = 0x000001C5
-    XKc_Cacute*: TKeySym = 0x000001C6
-    XKc_Ccaron*: TKeySym = 0x000001C8
-    XKc_Eogonek*: TKeySym = 0x000001CA
-    XKc_Ecaron*: TKeySym = 0x000001CC
-    XKc_Dcaron*: TKeySym = 0x000001CF
-    XKc_Dstroke*: TKeySym = 0x000001D0
-    XKc_Nacute*: TKeySym = 0x000001D1
-    XKc_Ncaron*: TKeySym = 0x000001D2
-    XKc_Odoubleacute*: TKeySym = 0x000001D5
-    XKc_Rcaron*: TKeySym = 0x000001D8
-    XKc_Uring*: TKeySym = 0x000001D9
-    XKc_Udoubleacute*: TKeySym = 0x000001DB
-    XKc_Tcedilla*: TKeySym = 0x000001DE
-    XK_racute*: TKeySym = 0x000001E0
-    XK_abreve*: TKeySym = 0x000001E3
-    XK_lacute*: TKeySym = 0x000001E5
-    XK_cacute*: TKeySym = 0x000001E6
-    XK_ccaron*: TKeySym = 0x000001E8
-    XK_eogonek*: TKeySym = 0x000001EA
-    XK_ecaron*: TKeySym = 0x000001EC
-    XK_dcaron*: TKeySym = 0x000001EF
-    XK_dstroke*: TKeySym = 0x000001F0
-    XK_nacute*: TKeySym = 0x000001F1
-    XK_ncaron*: TKeySym = 0x000001F2
-    XK_odoubleacute*: TKeySym = 0x000001F5
-    XK_udoubleacute*: TKeySym = 0x000001FB
-    XK_rcaron*: TKeySym = 0x000001F8
-    XK_uring*: TKeySym = 0x000001F9
-    XK_tcedilla*: TKeySym = 0x000001FE
-    XK_abovedot*: TKeySym = 0x000001FF
-# XK_LATIN2 
-#*
-# *   Latin 3
-# *   Byte 3 = 2
-# *
-
-when defined(XK_LATIN3) or true: 
-  const
-    XKc_Hstroke*: TKeySym = 0x000002A1
-    XKc_Hcircumflex*: TKeySym = 0x000002A6
-    XKc_Iabovedot*: TKeySym = 0x000002A9
-    XKc_Gbreve*: TKeySym = 0x000002AB
-    XKc_Jcircumflex*: TKeySym = 0x000002AC
-    XK_hstroke*: TKeySym = 0x000002B1
-    XK_hcircumflex*: TKeySym = 0x000002B6
-    XK_idotless*: TKeySym = 0x000002B9
-    XK_gbreve*: TKeySym = 0x000002BB
-    XK_jcircumflex*: TKeySym = 0x000002BC
-    XKc_Cabovedot*: TKeySym = 0x000002C5
-    XKc_Ccircumflex*: TKeySym = 0x000002C6
-    XKc_Gabovedot*: TKeySym = 0x000002D5
-    XKc_Gcircumflex*: TKeySym = 0x000002D8
-    XKc_Ubreve*: TKeySym = 0x000002DD
-    XKc_Scircumflex*: TKeySym = 0x000002DE
-    XK_cabovedot*: TKeySym = 0x000002E5
-    XK_ccircumflex*: TKeySym = 0x000002E6
-    XK_gabovedot*: TKeySym = 0x000002F5
-    XK_gcircumflex*: TKeySym = 0x000002F8
-    XK_ubreve*: TKeySym = 0x000002FD
-    XK_scircumflex*: TKeySym = 0x000002FE
-# XK_LATIN3 
-#*
-# *   Latin 4
-# *   Byte 3 = 3
-# *
-
-when defined(XK_LATIN4) or true: 
-  const
-    XK_kra*: TKeySym = 0x000003A2
-    XK_kappa*: TKeySym = 0x000003A2      # deprecated 
-    XKc_Rcedilla*: TKeySym = 0x000003A3
-    XKc_Itilde*: TKeySym = 0x000003A5
-    XKc_Lcedilla*: TKeySym = 0x000003A6
-    XKc_Emacron*: TKeySym = 0x000003AA
-    XKc_Gcedilla*: TKeySym = 0x000003AB
-    XKc_Tslash*: TKeySym = 0x000003AC
-    XK_rcedilla*: TKeySym = 0x000003B3
-    XK_itilde*: TKeySym = 0x000003B5
-    XK_lcedilla*: TKeySym = 0x000003B6
-    XK_emacron*: TKeySym = 0x000003BA
-    XK_gcedilla*: TKeySym = 0x000003BB
-    XK_tslash*: TKeySym = 0x000003BC
-    XKc_ENG*: TKeySym = 0x000003BD
-    XK_eng*: TKeySym = 0x000003BF
-    XKc_Amacron*: TKeySym = 0x000003C0
-    XKc_Iogonek*: TKeySym = 0x000003C7
-    XKc_Eabovedot*: TKeySym = 0x000003CC
-    XKc_Imacron*: TKeySym = 0x000003CF
-    XKc_Ncedilla*: TKeySym = 0x000003D1
-    XKc_Omacron*: TKeySym = 0x000003D2
-    XKc_Kcedilla*: TKeySym = 0x000003D3
-    XKc_Uogonek*: TKeySym = 0x000003D9
-    XKc_Utilde*: TKeySym = 0x000003DD
-    XKc_Umacron*: TKeySym = 0x000003DE
-    XK_amacron*: TKeySym = 0x000003E0
-    XK_iogonek*: TKeySym = 0x000003E7
-    XK_eabovedot*: TKeySym = 0x000003EC
-    XK_imacron*: TKeySym = 0x000003EF
-    XK_ncedilla*: TKeySym = 0x000003F1
-    XK_omacron*: TKeySym = 0x000003F2
-    XK_kcedilla*: TKeySym = 0x000003F3
-    XK_uogonek*: TKeySym = 0x000003F9
-    XK_utilde*: TKeySym = 0x000003FD
-    XK_umacron*: TKeySym = 0x000003FE
-# XK_LATIN4 
-#*
-# * Latin-8
-# * Byte 3 = 18
-# *
-
-when defined(XK_LATIN8) or true: 
-  const
-    XKc_Babovedot*: TKeySym = 0x000012A1
-    XK_babovedot*: TKeySym = 0x000012A2
-    XKc_Dabovedot*: TKeySym = 0x000012A6
-    XKc_Wgrave*: TKeySym = 0x000012A8
-    XKc_Wacute*: TKeySym = 0x000012AA
-    XK_dabovedot*: TKeySym = 0x000012AB
-    XKc_Ygrave*: TKeySym = 0x000012AC
-    XKc_Fabovedot*: TKeySym = 0x000012B0
-    XK_fabovedot*: TKeySym = 0x000012B1
-    XKc_Mabovedot*: TKeySym = 0x000012B4
-    XK_mabovedot*: TKeySym = 0x000012B5
-    XKc_Pabovedot*: TKeySym = 0x000012B7
-    XK_wgrave*: TKeySym = 0x000012B8
-    XK_pabovedot*: TKeySym = 0x000012B9
-    XK_wacute*: TKeySym = 0x000012BA
-    XKc_Sabovedot*: TKeySym = 0x000012BB
-    XK_ygrave*: TKeySym = 0x000012BC
-    XKc_Wdiaeresis*: TKeySym = 0x000012BD
-    XK_wdiaeresis*: TKeySym = 0x000012BE
-    XK_sabovedot*: TKeySym = 0x000012BF
-    XKc_Wcircumflex*: TKeySym = 0x000012D0
-    XKc_Tabovedot*: TKeySym = 0x000012D7
-    XKc_Ycircumflex*: TKeySym = 0x000012DE
-    XK_wcircumflex*: TKeySym = 0x000012F0
-    XK_tabovedot*: TKeySym = 0x000012F7
-    XK_ycircumflex*: TKeySym = 0x000012FE
-# XK_LATIN8 
-#*
-# * Latin-9 (a.k.a. Latin-0)
-# * Byte 3 = 19
-# *
-
-when defined(XK_LATIN9) or true: 
-  const
-    XKc_OE*: TKeySym = 0x000013BC
-    XK_oe*: TKeySym = 0x000013BD
-    XKc_Ydiaeresis*: TKeySym = 0x000013BE
-# XK_LATIN9 
-#*
-# * Katakana
-# * Byte 3 = 4
-# *
-
-when defined(XK_KATAKANA) or true: 
-  const
-    XK_overline*: TKeySym = 0x0000047E
-    XK_kana_fullstop*: TKeySym = 0x000004A1
-    XK_kana_openingbracket*: TKeySym = 0x000004A2
-    XK_kana_closingbracket*: TKeySym = 0x000004A3
-    XK_kana_comma*: TKeySym = 0x000004A4
-    XK_kana_conjunctive*: TKeySym = 0x000004A5
-    XK_kana_middledot*: TKeySym = 0x000004A5 # deprecated 
-    XKc_kana_WO*: TKeySym = 0x000004A6
-    XK_kana_a*: TKeySym = 0x000004A7
-    XK_kana_i*: TKeySym = 0x000004A8
-    XK_kana_u*: TKeySym = 0x000004A9
-    XK_kana_e*: TKeySym = 0x000004AA
-    XK_kana_o*: TKeySym = 0x000004AB
-    XK_kana_ya*: TKeySym = 0x000004AC
-    XK_kana_yu*: TKeySym = 0x000004AD
-    XK_kana_yo*: TKeySym = 0x000004AE
-    XK_kana_tsu*: TKeySym = 0x000004AF
-    XK_kana_tu*: TKeySym = 0x000004AF    # deprecated 
-    XK_prolongedsound*: TKeySym = 0x000004B0
-    XKc_kana_A*: TKeySym = 0x000004B1
-    XKc_kana_I*: TKeySym = 0x000004B2
-    XKc_kana_U*: TKeySym = 0x000004B3
-    XKc_kana_E*: TKeySym = 0x000004B4
-    XKc_kana_O*: TKeySym = 0x000004B5
-    XKc_kana_KA*: TKeySym = 0x000004B6
-    XKc_kana_KI*: TKeySym = 0x000004B7
-    XKc_kana_KU*: TKeySym = 0x000004B8
-    XKc_kana_KE*: TKeySym = 0x000004B9
-    XKc_kana_KO*: TKeySym = 0x000004BA
-    XKc_kana_SA*: TKeySym = 0x000004BB
-    XKc_kana_SHI*: TKeySym = 0x000004BC
-    XKc_kana_SU*: TKeySym = 0x000004BD
-    XKc_kana_SE*: TKeySym = 0x000004BE
-    XKc_kana_SO*: TKeySym = 0x000004BF
-    XKc_kana_TA*: TKeySym = 0x000004C0
-    XKc_kana_CHI*: TKeySym = 0x000004C1
-    XKc_kana_TI*: TKeySym = 0x000004C1   # deprecated 
-    XKc_kana_TSU*: TKeySym = 0x000004C2
-    XKc_kana_TU*: TKeySym = 0x000004C2   # deprecated 
-    XKc_kana_TE*: TKeySym = 0x000004C3
-    XKc_kana_TO*: TKeySym = 0x000004C4
-    XKc_kana_NA*: TKeySym = 0x000004C5
-    XKc_kana_NI*: TKeySym = 0x000004C6
-    XKc_kana_NU*: TKeySym = 0x000004C7
-    XKc_kana_NE*: TKeySym = 0x000004C8
-    XKc_kana_NO*: TKeySym = 0x000004C9
-    XKc_kana_HA*: TKeySym = 0x000004CA
-    XKc_kana_HI*: TKeySym = 0x000004CB
-    XKc_kana_FU*: TKeySym = 0x000004CC
-    XKc_kana_HU*: TKeySym = 0x000004CC   # deprecated 
-    XKc_kana_HE*: TKeySym = 0x000004CD
-    XKc_kana_HO*: TKeySym = 0x000004CE
-    XKc_kana_MA*: TKeySym = 0x000004CF
-    XKc_kana_MI*: TKeySym = 0x000004D0
-    XKc_kana_MU*: TKeySym = 0x000004D1
-    XKc_kana_ME*: TKeySym = 0x000004D2
-    XKc_kana_MO*: TKeySym = 0x000004D3
-    XKc_kana_YA*: TKeySym = 0x000004D4
-    XKc_kana_YU*: TKeySym = 0x000004D5
-    XKc_kana_YO*: TKeySym = 0x000004D6
-    XKc_kana_RA*: TKeySym = 0x000004D7
-    XKc_kana_RI*: TKeySym = 0x000004D8
-    XKc_kana_RU*: TKeySym = 0x000004D9
-    XKc_kana_RE*: TKeySym = 0x000004DA
-    XKc_kana_RO*: TKeySym = 0x000004DB
-    XKc_kana_WA*: TKeySym = 0x000004DC
-    XKc_kana_N*: TKeySym = 0x000004DD
-    XK_voicedsound*: TKeySym = 0x000004DE
-    XK_semivoicedsound*: TKeySym = 0x000004DF
-    XK_kana_switch*: TKeySym = 0x0000FF7E # Alias for mode_switch 
-# XK_KATAKANA 
-#*
-# *  Arabic
-# *  Byte 3 = 5
-# *
-
-when defined(XK_ARABIC) or true: 
-  const
-    XK_Farsi_0*: TKeySym = 0x00000590
-    XK_Farsi_1*: TKeySym = 0x00000591
-    XK_Farsi_2*: TKeySym = 0x00000592
-    XK_Farsi_3*: TKeySym = 0x00000593
-    XK_Farsi_4*: TKeySym = 0x00000594
-    XK_Farsi_5*: TKeySym = 0x00000595
-    XK_Farsi_6*: TKeySym = 0x00000596
-    XK_Farsi_7*: TKeySym = 0x00000597
-    XK_Farsi_8*: TKeySym = 0x00000598
-    XK_Farsi_9*: TKeySym = 0x00000599
-    XK_Arabic_percent*: TKeySym = 0x000005A5
-    XK_Arabic_superscript_alef*: TKeySym = 0x000005A6
-    XK_Arabic_tteh*: TKeySym = 0x000005A7
-    XK_Arabic_peh*: TKeySym = 0x000005A8
-    XK_Arabic_tcheh*: TKeySym = 0x000005A9
-    XK_Arabic_ddal*: TKeySym = 0x000005AA
-    XK_Arabic_rreh*: TKeySym = 0x000005AB
-    XK_Arabic_comma*: TKeySym = 0x000005AC
-    XK_Arabic_fullstop*: TKeySym = 0x000005AE
-    XK_Arabic_0*: TKeySym = 0x000005B0
-    XK_Arabic_1*: TKeySym = 0x000005B1
-    XK_Arabic_2*: TKeySym = 0x000005B2
-    XK_Arabic_3*: TKeySym = 0x000005B3
-    XK_Arabic_4*: TKeySym = 0x000005B4
-    XK_Arabic_5*: TKeySym = 0x000005B5
-    XK_Arabic_6*: TKeySym = 0x000005B6
-    XK_Arabic_7*: TKeySym = 0x000005B7
-    XK_Arabic_8*: TKeySym = 0x000005B8
-    XK_Arabic_9*: TKeySym = 0x000005B9
-    XK_Arabic_semicolon*: TKeySym = 0x000005BB
-    XK_Arabic_question_mark*: TKeySym = 0x000005BF
-    XK_Arabic_hamza*: TKeySym = 0x000005C1
-    XK_Arabic_maddaonalef*: TKeySym = 0x000005C2
-    XK_Arabic_hamzaonalef*: TKeySym = 0x000005C3
-    XK_Arabic_hamzaonwaw*: TKeySym = 0x000005C4
-    XK_Arabic_hamzaunderalef*: TKeySym = 0x000005C5
-    XK_Arabic_hamzaonyeh*: TKeySym = 0x000005C6
-    XK_Arabic_alef*: TKeySym = 0x000005C7
-    XK_Arabic_beh*: TKeySym = 0x000005C8
-    XK_Arabic_tehmarbuta*: TKeySym = 0x000005C9
-    XK_Arabic_teh*: TKeySym = 0x000005CA
-    XK_Arabic_theh*: TKeySym = 0x000005CB
-    XK_Arabic_jeem*: TKeySym = 0x000005CC
-    XK_Arabic_hah*: TKeySym = 0x000005CD
-    XK_Arabic_khah*: TKeySym = 0x000005CE
-    XK_Arabic_dal*: TKeySym = 0x000005CF
-    XK_Arabic_thal*: TKeySym = 0x000005D0
-    XK_Arabic_ra*: TKeySym = 0x000005D1
-    XK_Arabic_zain*: TKeySym = 0x000005D2
-    XK_Arabic_seen*: TKeySym = 0x000005D3
-    XK_Arabic_sheen*: TKeySym = 0x000005D4
-    XK_Arabic_sad*: TKeySym = 0x000005D5
-    XK_Arabic_dad*: TKeySym = 0x000005D6
-    XK_Arabic_tah*: TKeySym = 0x000005D7
-    XK_Arabic_zah*: TKeySym = 0x000005D8
-    XK_Arabic_ain*: TKeySym = 0x000005D9
-    XK_Arabic_ghain*: TKeySym = 0x000005DA
-    XK_Arabic_tatweel*: TKeySym = 0x000005E0
-    XK_Arabic_feh*: TKeySym = 0x000005E1
-    XK_Arabic_qaf*: TKeySym = 0x000005E2
-    XK_Arabic_kaf*: TKeySym = 0x000005E3
-    XK_Arabic_lam*: TKeySym = 0x000005E4
-    XK_Arabic_meem*: TKeySym = 0x000005E5
-    XK_Arabic_noon*: TKeySym = 0x000005E6
-    XK_Arabic_ha*: TKeySym = 0x000005E7
-    XK_Arabic_heh*: TKeySym = 0x000005E7 # deprecated 
-    XK_Arabic_waw*: TKeySym = 0x000005E8
-    XK_Arabic_alefmaksura*: TKeySym = 0x000005E9
-    XK_Arabic_yeh*: TKeySym = 0x000005EA
-    XK_Arabic_fathatan*: TKeySym = 0x000005EB
-    XK_Arabic_dammatan*: TKeySym = 0x000005EC
-    XK_Arabic_kasratan*: TKeySym = 0x000005ED
-    XK_Arabic_fatha*: TKeySym = 0x000005EE
-    XK_Arabic_damma*: TKeySym = 0x000005EF
-    XK_Arabic_kasra*: TKeySym = 0x000005F0
-    XK_Arabic_shadda*: TKeySym = 0x000005F1
-    XK_Arabic_sukun*: TKeySym = 0x000005F2
-    XK_Arabic_madda_above*: TKeySym = 0x000005F3
-    XK_Arabic_hamza_above*: TKeySym = 0x000005F4
-    XK_Arabic_hamza_below*: TKeySym = 0x000005F5
-    XK_Arabic_jeh*: TKeySym = 0x000005F6
-    XK_Arabic_veh*: TKeySym = 0x000005F7
-    XK_Arabic_keheh*: TKeySym = 0x000005F8
-    XK_Arabic_gaf*: TKeySym = 0x000005F9
-    XK_Arabic_noon_ghunna*: TKeySym = 0x000005FA
-    XK_Arabic_heh_doachashmee*: TKeySym = 0x000005FB
-    XK_Farsi_yeh*: TKeySym = 0x000005FC
-    XK_Arabic_farsi_yeh*: TKeySym = XK_Farsi_yeh
-    XK_Arabic_yeh_baree*: TKeySym = 0x000005FD
-    XK_Arabic_heh_goal*: TKeySym = 0x000005FE
-    XK_Arabic_switch*: TKeySym = 0x0000FF7E # Alias for mode_switch 
-# XK_ARABIC 
-#*
-# * Cyrillic
-# * Byte 3 = 6
-# *
-
-when defined(XK_CYRILLIC) or true: 
-  const
-    XKc_Cyrillic_GHE_bar*: TKeySym = 0x00000680
-    XK_Cyrillic_ghe_bar*: TKeySym = 0x00000690
-    XKc_Cyrillic_ZHE_descender*: TKeySym = 0x00000681
-    XK_Cyrillic_zhe_descender*: TKeySym = 0x00000691
-    XKc_Cyrillic_KA_descender*: TKeySym = 0x00000682
-    XK_Cyrillic_ka_descender*: TKeySym = 0x00000692
-    XKc_Cyrillic_KA_vertstroke*: TKeySym = 0x00000683
-    XK_Cyrillic_ka_vertstroke*: TKeySym = 0x00000693
-    XKc_Cyrillic_EN_descender*: TKeySym = 0x00000684
-    XK_Cyrillic_en_descender*: TKeySym = 0x00000694
-    XKc_Cyrillic_U_straight*: TKeySym = 0x00000685
-    XK_Cyrillic_u_straight*: TKeySym = 0x00000695
-    XKc_Cyrillic_U_straight_bar*: TKeySym = 0x00000686
-    XK_Cyrillic_u_straight_bar*: TKeySym = 0x00000696
-    XKc_Cyrillic_HA_descender*: TKeySym = 0x00000687
-    XK_Cyrillic_ha_descender*: TKeySym = 0x00000697
-    XKc_Cyrillic_CHE_descender*: TKeySym = 0x00000688
-    XK_Cyrillic_che_descender*: TKeySym = 0x00000698
-    XKc_Cyrillic_CHE_vertstroke*: TKeySym = 0x00000689
-    XK_Cyrillic_che_vertstroke*: TKeySym = 0x00000699
-    XKc_Cyrillic_SHHA*: TKeySym = 0x0000068A
-    XK_Cyrillic_shha*: TKeySym = 0x0000069A
-    XKc_Cyrillic_SCHWA*: TKeySym = 0x0000068C
-    XK_Cyrillic_schwa*: TKeySym = 0x0000069C
-    XKc_Cyrillic_I_macron*: TKeySym = 0x0000068D
-    XK_Cyrillic_i_macron*: TKeySym = 0x0000069D
-    XKc_Cyrillic_O_bar*: TKeySym = 0x0000068E
-    XK_Cyrillic_o_bar*: TKeySym = 0x0000069E
-    XKc_Cyrillic_U_macron*: TKeySym = 0x0000068F
-    XK_Cyrillic_u_macron*: TKeySym = 0x0000069F
-    XK_Serbian_dje*: TKeySym = 0x000006A1
-    XK_Macedonia_gje*: TKeySym = 0x000006A2
-    XK_Cyrillic_io*: TKeySym = 0x000006A3
-    XK_Ukrainian_ie*: TKeySym = 0x000006A4
-    XK_Ukranian_je*: TKeySym = 0x000006A4 # deprecated 
-    XK_Macedonia_dse*: TKeySym = 0x000006A5
-    XK_Ukrainian_i*: TKeySym = 0x000006A6
-    XK_Ukranian_i*: TKeySym = 0x000006A6 # deprecated 
-    XK_Ukrainian_yi*: TKeySym = 0x000006A7
-    XK_Ukranian_yi*: TKeySym = 0x000006A7 # deprecated 
-    XK_Cyrillic_je*: TKeySym = 0x000006A8
-    XK_Serbian_je*: TKeySym = 0x000006A8 # deprecated 
-    XK_Cyrillic_lje*: TKeySym = 0x000006A9
-    XK_Serbian_lje*: TKeySym = 0x000006A9 # deprecated 
-    XK_Cyrillic_nje*: TKeySym = 0x000006AA
-    XK_Serbian_nje*: TKeySym = 0x000006AA # deprecated 
-    XK_Serbian_tshe*: TKeySym = 0x000006AB
-    XK_Macedonia_kje*: TKeySym = 0x000006AC
-    XK_Ukrainian_ghe_with_upturn*: TKeySym = 0x000006AD
-    XK_Byelorussian_shortu*: TKeySym = 0x000006AE
-    XK_Cyrillic_dzhe*: TKeySym = 0x000006AF
-    XK_Serbian_dze*: TKeySym = 0x000006AF # deprecated 
-    XK_numerosign*: TKeySym = 0x000006B0
-    XKc_Serbian_DJE*: TKeySym = 0x000006B1
-    XKc_Macedonia_GJE*: TKeySym = 0x000006B2
-    XKc_Cyrillic_IO*: TKeySym = 0x000006B3
-    XKc_Ukrainian_IE*: TKeySym = 0x000006B4
-    XKc_Ukranian_JE*: TKeySym = 0x000006B4 # deprecated 
-    XKc_Macedonia_DSE*: TKeySym = 0x000006B5
-    XKc_Ukrainian_I*: TKeySym = 0x000006B6
-    XKc_Ukranian_I*: TKeySym = 0x000006B6 # deprecated 
-    XKc_Ukrainian_YI*: TKeySym = 0x000006B7
-    XKc_Ukranian_YI*: TKeySym = 0x000006B7 # deprecated 
-    XKc_Cyrillic_JE*: TKeySym = 0x000006B8
-    XKc_Serbian_JE*: TKeySym = 0x000006B8 # deprecated 
-    XKc_Cyrillic_LJE*: TKeySym = 0x000006B9
-    XKc_Serbian_LJE*: TKeySym = 0x000006B9 # deprecated 
-    XKc_Cyrillic_NJE*: TKeySym = 0x000006BA
-    XKc_Serbian_NJE*: TKeySym = 0x000006BA # deprecated 
-    XKc_Serbian_TSHE*: TKeySym = 0x000006BB
-    XKc_Macedonia_KJE*: TKeySym = 0x000006BC
-    XKc_Ukrainian_GHE_WITH_UPTURN*: TKeySym = 0x000006BD
-    XKc_Byelorussian_SHORTU*: TKeySym = 0x000006BE
-    XKc_Cyrillic_DZHE*: TKeySym = 0x000006BF
-    XKc_Serbian_DZE*: TKeySym = 0x000006BF # deprecated 
-    XK_Cyrillic_yu*: TKeySym = 0x000006C0
-    XK_Cyrillic_a*: TKeySym = 0x000006C1
-    XK_Cyrillic_be*: TKeySym = 0x000006C2
-    XK_Cyrillic_tse*: TKeySym = 0x000006C3
-    XK_Cyrillic_de*: TKeySym = 0x000006C4
-    XK_Cyrillic_ie*: TKeySym = 0x000006C5
-    XK_Cyrillic_ef*: TKeySym = 0x000006C6
-    XK_Cyrillic_ghe*: TKeySym = 0x000006C7
-    XK_Cyrillic_ha*: TKeySym = 0x000006C8
-    XK_Cyrillic_i*: TKeySym = 0x000006C9
-    XK_Cyrillic_shorti*: TKeySym = 0x000006CA
-    XK_Cyrillic_ka*: TKeySym = 0x000006CB
-    XK_Cyrillic_el*: TKeySym = 0x000006CC
-    XK_Cyrillic_em*: TKeySym = 0x000006CD
-    XK_Cyrillic_en*: TKeySym = 0x000006CE
-    XK_Cyrillic_o*: TKeySym = 0x000006CF
-    XK_Cyrillic_pe*: TKeySym = 0x000006D0
-    XK_Cyrillic_ya*: TKeySym = 0x000006D1
-    XK_Cyrillic_er*: TKeySym = 0x000006D2
-    XK_Cyrillic_es*: TKeySym = 0x000006D3
-    XK_Cyrillic_te*: TKeySym = 0x000006D4
-    XK_Cyrillic_u*: TKeySym = 0x000006D5
-    XK_Cyrillic_zhe*: TKeySym = 0x000006D6
-    XK_Cyrillic_ve*: TKeySym = 0x000006D7
-    XK_Cyrillic_softsign*: TKeySym = 0x000006D8
-    XK_Cyrillic_yeru*: TKeySym = 0x000006D9
-    XK_Cyrillic_ze*: TKeySym = 0x000006DA
-    XK_Cyrillic_sha*: TKeySym = 0x000006DB
-    XK_Cyrillic_e*: TKeySym = 0x000006DC
-    XK_Cyrillic_shcha*: TKeySym = 0x000006DD
-    XK_Cyrillic_che*: TKeySym = 0x000006DE
-    XK_Cyrillic_hardsign*: TKeySym = 0x000006DF
-    XKc_Cyrillic_YU*: TKeySym = 0x000006E0
-    XKc_Cyrillic_A*: TKeySym = 0x000006E1
-    XKc_Cyrillic_BE*: TKeySym = 0x000006E2
-    XKc_Cyrillic_TSE*: TKeySym = 0x000006E3
-    XKc_Cyrillic_DE*: TKeySym = 0x000006E4
-    XKc_Cyrillic_IE*: TKeySym = 0x000006E5
-    XKc_Cyrillic_EF*: TKeySym = 0x000006E6
-    XKc_Cyrillic_GHE*: TKeySym = 0x000006E7
-    XKc_Cyrillic_HA*: TKeySym = 0x000006E8
-    XKc_Cyrillic_I*: TKeySym = 0x000006E9
-    XKc_Cyrillic_SHORTI*: TKeySym = 0x000006EA
-    XKc_Cyrillic_KA*: TKeySym = 0x000006EB
-    XKc_Cyrillic_EL*: TKeySym = 0x000006EC
-    XKc_Cyrillic_EM*: TKeySym = 0x000006ED
-    XKc_Cyrillic_EN*: TKeySym = 0x000006EE
-    XKc_Cyrillic_O*: TKeySym = 0x000006EF
-    XKc_Cyrillic_PE*: TKeySym = 0x000006F0
-    XKc_Cyrillic_YA*: TKeySym = 0x000006F1
-    XKc_Cyrillic_ER*: TKeySym = 0x000006F2
-    XKc_Cyrillic_ES*: TKeySym = 0x000006F3
-    XKc_Cyrillic_TE*: TKeySym = 0x000006F4
-    XKc_Cyrillic_U*: TKeySym = 0x000006F5
-    XKc_Cyrillic_ZHE*: TKeySym = 0x000006F6
-    XKc_Cyrillic_VE*: TKeySym = 0x000006F7
-    XKc_Cyrillic_SOFTSIGN*: TKeySym = 0x000006F8
-    XKc_Cyrillic_YERU*: TKeySym = 0x000006F9
-    XKc_Cyrillic_ZE*: TKeySym = 0x000006FA
-    XKc_Cyrillic_SHA*: TKeySym = 0x000006FB
-    XKc_Cyrillic_E*: TKeySym = 0x000006FC
-    XKc_Cyrillic_SHCHA*: TKeySym = 0x000006FD
-    XKc_Cyrillic_CHE*: TKeySym = 0x000006FE
-    XKc_Cyrillic_HARDSIGN*: TKeySym = 0x000006FF
-# XK_CYRILLIC 
-#*
-# * Greek
-# * Byte 3 = 7
-# *
-
-when defined(XK_GREEK) or true: 
-  const
-    XKc_Greek_ALPHAaccent*: TKeySym = 0x000007A1
-    XKc_Greek_EPSILONaccent*: TKeySym = 0x000007A2
-    XKc_Greek_ETAaccent*: TKeySym = 0x000007A3
-    XKc_Greek_IOTAaccent*: TKeySym = 0x000007A4
-    XKc_Greek_IOTAdieresis*: TKeySym = 0x000007A5
-    XKc_Greek_IOTAdiaeresis*: TKeySym = XKc_Greek_IOTAdieresis # old typo 
-    XKc_Greek_OMICRONaccent*: TKeySym = 0x000007A7
-    XKc_Greek_UPSILONaccent*: TKeySym = 0x000007A8
-    XKc_Greek_UPSILONdieresis*: TKeySym = 0x000007A9
-    XKc_Greek_OMEGAaccent*: TKeySym = 0x000007AB
-    XK_Greek_accentdieresis*: TKeySym = 0x000007AE
-    XK_Greek_horizbar*: TKeySym = 0x000007AF
-    XK_Greek_alphaaccent*: TKeySym = 0x000007B1
-    XK_Greek_epsilonaccent*: TKeySym = 0x000007B2
-    XK_Greek_etaaccent*: TKeySym = 0x000007B3
-    XK_Greek_iotaaccent*: TKeySym = 0x000007B4
-    XK_Greek_iotadieresis*: TKeySym = 0x000007B5
-    XK_Greek_iotaaccentdieresis*: TKeySym = 0x000007B6
-    XK_Greek_omicronaccent*: TKeySym = 0x000007B7
-    XK_Greek_upsilonaccent*: TKeySym = 0x000007B8
-    XK_Greek_upsilondieresis*: TKeySym = 0x000007B9
-    XK_Greek_upsilonaccentdieresis*: TKeySym = 0x000007BA
-    XK_Greek_omegaaccent*: TKeySym = 0x000007BB
-    XKc_Greek_ALPHA*: TKeySym = 0x000007C1
-    XKc_Greek_BETA*: TKeySym = 0x000007C2
-    XKc_Greek_GAMMA*: TKeySym = 0x000007C3
-    XKc_Greek_DELTA*: TKeySym = 0x000007C4
-    XKc_Greek_EPSILON*: TKeySym = 0x000007C5
-    XKc_Greek_ZETA*: TKeySym = 0x000007C6
-    XKc_Greek_ETA*: TKeySym = 0x000007C7
-    XKc_Greek_THETA*: TKeySym = 0x000007C8
-    XKc_Greek_IOTA*: TKeySym = 0x000007C9
-    XKc_Greek_KAPPA*: TKeySym = 0x000007CA
-    XKc_Greek_LAMDA*: TKeySym = 0x000007CB
-    XKc_Greek_LAMBDA*: TKeySym = 0x000007CB
-    XKc_Greek_MU*: TKeySym = 0x000007CC
-    XKc_Greek_NU*: TKeySym = 0x000007CD
-    XKc_Greek_XI*: TKeySym = 0x000007CE
-    XKc_Greek_OMICRON*: TKeySym = 0x000007CF
-    XKc_Greek_PI*: TKeySym = 0x000007D0
-    XKc_Greek_RHO*: TKeySym = 0x000007D1
-    XKc_Greek_SIGMA*: TKeySym = 0x000007D2
-    XKc_Greek_TAU*: TKeySym = 0x000007D4
-    XKc_Greek_UPSILON*: TKeySym = 0x000007D5
-    XKc_Greek_PHI*: TKeySym = 0x000007D6
-    XKc_Greek_CHI*: TKeySym = 0x000007D7
-    XKc_Greek_PSI*: TKeySym = 0x000007D8
-    XKc_Greek_OMEGA*: TKeySym = 0x000007D9
-    XK_Greek_alpha*: TKeySym = 0x000007E1
-    XK_Greek_beta*: TKeySym = 0x000007E2
-    XK_Greek_gamma*: TKeySym = 0x000007E3
-    XK_Greek_delta*: TKeySym = 0x000007E4
-    XK_Greek_epsilon*: TKeySym = 0x000007E5
-    XK_Greek_zeta*: TKeySym = 0x000007E6
-    XK_Greek_eta*: TKeySym = 0x000007E7
-    XK_Greek_theta*: TKeySym = 0x000007E8
-    XK_Greek_iota*: TKeySym = 0x000007E9
-    XK_Greek_kappa*: TKeySym = 0x000007EA
-    XK_Greek_lamda*: TKeySym = 0x000007EB
-    XK_Greek_lambda*: TKeySym = 0x000007EB
-    XK_Greek_mu*: TKeySym = 0x000007EC
-    XK_Greek_nu*: TKeySym = 0x000007ED
-    XK_Greek_xi*: TKeySym = 0x000007EE
-    XK_Greek_omicron*: TKeySym = 0x000007EF
-    XK_Greek_pi*: TKeySym = 0x000007F0
-    XK_Greek_rho*: TKeySym = 0x000007F1
-    XK_Greek_sigma*: TKeySym = 0x000007F2
-    XK_Greek_finalsmallsigma*: TKeySym = 0x000007F3
-    XK_Greek_tau*: TKeySym = 0x000007F4
-    XK_Greek_upsilon*: TKeySym = 0x000007F5
-    XK_Greek_phi*: TKeySym = 0x000007F6
-    XK_Greek_chi*: TKeySym = 0x000007F7
-    XK_Greek_psi*: TKeySym = 0x000007F8
-    XK_Greek_omega*: TKeySym = 0x000007F9
-    XK_Greek_switch*: TKeySym = 0x0000FF7E # Alias for mode_switch 
-# XK_GREEK 
-#*
-# * Technical
-# * Byte 3 = 8
-# *
-
-when defined(XK_TECHNICAL) or true: 
-  const
-    XK_leftradical*: TKeySym = 0x000008A1
-    XK_topleftradical*: TKeySym = 0x000008A2
-    XK_horizconnector*: TKeySym = 0x000008A3
-    XK_topintegral*: TKeySym = 0x000008A4
-    XK_botintegral*: TKeySym = 0x000008A5
-    XK_vertconnector*: TKeySym = 0x000008A6
-    XK_topleftsqbracket*: TKeySym = 0x000008A7
-    XK_botleftsqbracket*: TKeySym = 0x000008A8
-    XK_toprightsqbracket*: TKeySym = 0x000008A9
-    XK_botrightsqbracket*: TKeySym = 0x000008AA
-    XK_topleftparens*: TKeySym = 0x000008AB
-    XK_botleftparens*: TKeySym = 0x000008AC
-    XK_toprightparens*: TKeySym = 0x000008AD
-    XK_botrightparens*: TKeySym = 0x000008AE
-    XK_leftmiddlecurlybrace*: TKeySym = 0x000008AF
-    XK_rightmiddlecurlybrace*: TKeySym = 0x000008B0
-    XK_topleftsummation*: TKeySym = 0x000008B1
-    XK_botleftsummation*: TKeySym = 0x000008B2
-    XK_topvertsummationconnector*: TKeySym = 0x000008B3
-    XK_botvertsummationconnector*: TKeySym = 0x000008B4
-    XK_toprightsummation*: TKeySym = 0x000008B5
-    XK_botrightsummation*: TKeySym = 0x000008B6
-    XK_rightmiddlesummation*: TKeySym = 0x000008B7
-    XK_lessthanequal*: TKeySym = 0x000008BC
-    XK_notequal*: TKeySym = 0x000008BD
-    XK_greaterthanequal*: TKeySym = 0x000008BE
-    XK_integral*: TKeySym = 0x000008BF
-    XK_therefore*: TKeySym = 0x000008C0
-    XK_variation*: TKeySym = 0x000008C1
-    XK_infinity*: TKeySym = 0x000008C2
-    XK_nabla*: TKeySym = 0x000008C5
-    XK_approximate*: TKeySym = 0x000008C8
-    XK_similarequal*: TKeySym = 0x000008C9
-    XK_ifonlyif*: TKeySym = 0x000008CD
-    XK_implies*: TKeySym = 0x000008CE
-    XK_identical*: TKeySym = 0x000008CF
-    XK_radical*: TKeySym = 0x000008D6
-    XK_includedin*: TKeySym = 0x000008DA
-    XK_includes*: TKeySym = 0x000008DB
-    XK_intersection*: TKeySym = 0x000008DC
-    XK_union*: TKeySym = 0x000008DD
-    XK_logicaland*: TKeySym = 0x000008DE
-    XK_logicalor*: TKeySym = 0x000008DF
-    XK_partialderivative*: TKeySym = 0x000008EF
-    XK_function*: TKeySym = 0x000008F6
-    XK_leftarrow*: TKeySym = 0x000008FB
-    XK_uparrow*: TKeySym = 0x000008FC
-    XK_rightarrow*: TKeySym = 0x000008FD
-    XK_downarrow*: TKeySym = 0x000008FE
-# XK_TECHNICAL 
-#*
-# *  Special
-# *  Byte 3 = 9
-# *
-
-when defined(XK_SPECIAL): 
-  const
-    XK_blank*: TKeySym = 0x000009DF
-    XK_soliddiamond*: TKeySym = 0x000009E0
-    XK_checkerboard*: TKeySym = 0x000009E1
-    XK_ht*: TKeySym = 0x000009E2
-    XK_ff*: TKeySym = 0x000009E3
-    XK_cr*: TKeySym = 0x000009E4
-    XK_lf*: TKeySym = 0x000009E5
-    XK_nl*: TKeySym = 0x000009E8
-    XK_vt*: TKeySym = 0x000009E9
-    XK_lowrightcorner*: TKeySym = 0x000009EA
-    XK_uprightcorner*: TKeySym = 0x000009EB
-    XK_upleftcorner*: TKeySym = 0x000009EC
-    XK_lowleftcorner*: TKeySym = 0x000009ED
-    XK_crossinglines*: TKeySym = 0x000009EE
-    XK_horizlinescan1*: TKeySym = 0x000009EF
-    XK_horizlinescan3*: TKeySym = 0x000009F0
-    XK_horizlinescan5*: TKeySym = 0x000009F1
-    XK_horizlinescan7*: TKeySym = 0x000009F2
-    XK_horizlinescan9*: TKeySym = 0x000009F3
-    XK_leftt*: TKeySym = 0x000009F4
-    XK_rightt*: TKeySym = 0x000009F5
-    XK_bott*: TKeySym = 0x000009F6
-    XK_topt*: TKeySym = 0x000009F7
-    XK_vertbar*: TKeySym = 0x000009F8
-# XK_SPECIAL 
-#*
-# *  Publishing
-# *  Byte 3 = a
-# *
-
-when defined(XK_PUBLISHING) or true: 
-  const
-    XK_emspace*: TKeySym = 0x00000AA1
-    XK_enspace*: TKeySym = 0x00000AA2
-    XK_em3space*: TKeySym = 0x00000AA3
-    XK_em4space*: TKeySym = 0x00000AA4
-    XK_digitspace*: TKeySym = 0x00000AA5
-    XK_punctspace*: TKeySym = 0x00000AA6
-    XK_thinspace*: TKeySym = 0x00000AA7
-    XK_hairspace*: TKeySym = 0x00000AA8
-    XK_emdash*: TKeySym = 0x00000AA9
-    XK_endash*: TKeySym = 0x00000AAA
-    XK_signifblank*: TKeySym = 0x00000AAC
-    XK_ellipsis*: TKeySym = 0x00000AAE
-    XK_doubbaselinedot*: TKeySym = 0x00000AAF
-    XK_onethird*: TKeySym = 0x00000AB0
-    XK_twothirds*: TKeySym = 0x00000AB1
-    XK_onefifth*: TKeySym = 0x00000AB2
-    XK_twofifths*: TKeySym = 0x00000AB3
-    XK_threefifths*: TKeySym = 0x00000AB4
-    XK_fourfifths*: TKeySym = 0x00000AB5
-    XK_onesixth*: TKeySym = 0x00000AB6
-    XK_fivesixths*: TKeySym = 0x00000AB7
-    XK_careof*: TKeySym = 0x00000AB8
-    XK_figdash*: TKeySym = 0x00000ABB
-    XK_leftanglebracket*: TKeySym = 0x00000ABC
-    XK_decimalpoint*: TKeySym = 0x00000ABD
-    XK_rightanglebracket*: TKeySym = 0x00000ABE
-    XK_marker*: TKeySym = 0x00000ABF
-    XK_oneeighth*: TKeySym = 0x00000AC3
-    XK_threeeighths*: TKeySym = 0x00000AC4
-    XK_fiveeighths*: TKeySym = 0x00000AC5
-    XK_seveneighths*: TKeySym = 0x00000AC6
-    XK_trademark*: TKeySym = 0x00000AC9
-    XK_signaturemark*: TKeySym = 0x00000ACA
-    XK_trademarkincircle*: TKeySym = 0x00000ACB
-    XK_leftopentriangle*: TKeySym = 0x00000ACC
-    XK_rightopentriangle*: TKeySym = 0x00000ACD
-    XK_emopencircle*: TKeySym = 0x00000ACE
-    XK_emopenrectangle*: TKeySym = 0x00000ACF
-    XK_leftsinglequotemark*: TKeySym = 0x00000AD0
-    XK_rightsinglequotemark*: TKeySym = 0x00000AD1
-    XK_leftdoublequotemark*: TKeySym = 0x00000AD2
-    XK_rightdoublequotemark*: TKeySym = 0x00000AD3
-    XK_prescription*: TKeySym = 0x00000AD4
-    XK_minutes*: TKeySym = 0x00000AD6
-    XK_seconds*: TKeySym = 0x00000AD7
-    XK_latincross*: TKeySym = 0x00000AD9
-    XK_hexagram*: TKeySym = 0x00000ADA
-    XK_filledrectbullet*: TKeySym = 0x00000ADB
-    XK_filledlefttribullet*: TKeySym = 0x00000ADC
-    XK_filledrighttribullet*: TKeySym = 0x00000ADD
-    XK_emfilledcircle*: TKeySym = 0x00000ADE
-    XK_emfilledrect*: TKeySym = 0x00000ADF
-    XK_enopencircbullet*: TKeySym = 0x00000AE0
-    XK_enopensquarebullet*: TKeySym = 0x00000AE1
-    XK_openrectbullet*: TKeySym = 0x00000AE2
-    XK_opentribulletup*: TKeySym = 0x00000AE3
-    XK_opentribulletdown*: TKeySym = 0x00000AE4
-    XK_openstar*: TKeySym = 0x00000AE5
-    XK_enfilledcircbullet*: TKeySym = 0x00000AE6
-    XK_enfilledsqbullet*: TKeySym = 0x00000AE7
-    XK_filledtribulletup*: TKeySym = 0x00000AE8
-    XK_filledtribulletdown*: TKeySym = 0x00000AE9
-    XK_leftpointer*: TKeySym = 0x00000AEA
-    XK_rightpointer*: TKeySym = 0x00000AEB
-    XK_club*: TKeySym = 0x00000AEC
-    XK_diamond*: TKeySym = 0x00000AED
-    XK_heart*: TKeySym = 0x00000AEE
-    XK_maltesecross*: TKeySym = 0x00000AF0
-    XK_dagger*: TKeySym = 0x00000AF1
-    XK_doubledagger*: TKeySym = 0x00000AF2
-    XK_checkmark*: TKeySym = 0x00000AF3
-    XK_ballotcross*: TKeySym = 0x00000AF4
-    XK_musicalsharp*: TKeySym = 0x00000AF5
-    XK_musicalflat*: TKeySym = 0x00000AF6
-    XK_malesymbol*: TKeySym = 0x00000AF7
-    XK_femalesymbol*: TKeySym = 0x00000AF8
-    XK_telephone*: TKeySym = 0x00000AF9
-    XK_telephonerecorder*: TKeySym = 0x00000AFA
-    XK_phonographcopyright*: TKeySym = 0x00000AFB
-    XK_caret*: TKeySym = 0x00000AFC
-    XK_singlelowquotemark*: TKeySym = 0x00000AFD
-    XK_doublelowquotemark*: TKeySym = 0x00000AFE
-    XK_cursor*: TKeySym = 0x00000AFF
-# XK_PUBLISHING 
-#*
-# *  APL
-# *  Byte 3 = b
-# *
-
-when defined(XK_APL) or true: 
-  const
-    XK_leftcaret*: TKeySym = 0x00000BA3
-    XK_rightcaret*: TKeySym = 0x00000BA6
-    XK_downcaret*: TKeySym = 0x00000BA8
-    XK_upcaret*: TKeySym = 0x00000BA9
-    XK_overbar*: TKeySym = 0x00000BC0
-    XK_downtack*: TKeySym = 0x00000BC2
-    XK_upshoe*: TKeySym = 0x00000BC3
-    XK_downstile*: TKeySym = 0x00000BC4
-    XK_underbar*: TKeySym = 0x00000BC6
-    XK_jot*: TKeySym = 0x00000BCA
-    XK_quad*: TKeySym = 0x00000BCC
-    XK_uptack*: TKeySym = 0x00000BCE
-    XK_circle*: TKeySym = 0x00000BCF
-    XK_upstile*: TKeySym = 0x00000BD3
-    XK_downshoe*: TKeySym = 0x00000BD6
-    XK_rightshoe*: TKeySym = 0x00000BD8
-    XK_leftshoe*: TKeySym = 0x00000BDA
-    XK_lefttack*: TKeySym = 0x00000BDC
-    XK_righttack*: TKeySym = 0x00000BFC
-# XK_APL 
-#*
-# * Hebrew
-# * Byte 3 = c
-# *
-
-when defined(XK_HEBREW) or true: 
-  const
-    XK_hebrew_doublelowline*: TKeySym = 0x00000CDF
-    XK_hebrew_aleph*: TKeySym = 0x00000CE0
-    XK_hebrew_bet*: TKeySym = 0x00000CE1
-    XK_hebrew_beth*: TKeySym = 0x00000CE1 # deprecated 
-    XK_hebrew_gimel*: TKeySym = 0x00000CE2
-    XK_hebrew_gimmel*: TKeySym = 0x00000CE2 # deprecated 
-    XK_hebrew_dalet*: TKeySym = 0x00000CE3
-    XK_hebrew_daleth*: TKeySym = 0x00000CE3 # deprecated 
-    XK_hebrew_he*: TKeySym = 0x00000CE4
-    XK_hebrew_waw*: TKeySym = 0x00000CE5
-    XK_hebrew_zain*: TKeySym = 0x00000CE6
-    XK_hebrew_zayin*: TKeySym = 0x00000CE6 # deprecated 
-    XK_hebrew_chet*: TKeySym = 0x00000CE7
-    XK_hebrew_het*: TKeySym = 0x00000CE7 # deprecated 
-    XK_hebrew_tet*: TKeySym = 0x00000CE8
-    XK_hebrew_teth*: TKeySym = 0x00000CE8 # deprecated 
-    XK_hebrew_yod*: TKeySym = 0x00000CE9
-    XK_hebrew_finalkaph*: TKeySym = 0x00000CEA
-    XK_hebrew_kaph*: TKeySym = 0x00000CEB
-    XK_hebrew_lamed*: TKeySym = 0x00000CEC
-    XK_hebrew_finalmem*: TKeySym = 0x00000CED
-    XK_hebrew_mem*: TKeySym = 0x00000CEE
-    XK_hebrew_finalnun*: TKeySym = 0x00000CEF
-    XK_hebrew_nun*: TKeySym = 0x00000CF0
-    XK_hebrew_samech*: TKeySym = 0x00000CF1
-    XK_hebrew_samekh*: TKeySym = 0x00000CF1 # deprecated 
-    XK_hebrew_ayin*: TKeySym = 0x00000CF2
-    XK_hebrew_finalpe*: TKeySym = 0x00000CF3
-    XK_hebrew_pe*: TKeySym = 0x00000CF4
-    XK_hebrew_finalzade*: TKeySym = 0x00000CF5
-    XK_hebrew_finalzadi*: TKeySym = 0x00000CF5 # deprecated 
-    XK_hebrew_zade*: TKeySym = 0x00000CF6
-    XK_hebrew_zadi*: TKeySym = 0x00000CF6 # deprecated 
-    XK_hebrew_qoph*: TKeySym = 0x00000CF7
-    XK_hebrew_kuf*: TKeySym = 0x00000CF7 # deprecated 
-    XK_hebrew_resh*: TKeySym = 0x00000CF8
-    XK_hebrew_shin*: TKeySym = 0x00000CF9
-    XK_hebrew_taw*: TKeySym = 0x00000CFA
-    XK_hebrew_taf*: TKeySym = 0x00000CFA # deprecated 
-    XK_Hebrew_switch*: TKeySym = 0x0000FF7E # Alias for mode_switch 
-# XK_HEBREW 
-#*
-# * Thai
-# * Byte 3 = d
-# *
-
-when defined(XK_THAI) or true: 
-  const
-    XK_Thai_kokai*: TKeySym = 0x00000DA1
-    XK_Thai_khokhai*: TKeySym = 0x00000DA2
-    XK_Thai_khokhuat*: TKeySym = 0x00000DA3
-    XK_Thai_khokhwai*: TKeySym = 0x00000DA4
-    XK_Thai_khokhon*: TKeySym = 0x00000DA5
-    XK_Thai_khorakhang*: TKeySym = 0x00000DA6
-    XK_Thai_ngongu*: TKeySym = 0x00000DA7
-    XK_Thai_chochan*: TKeySym = 0x00000DA8
-    XK_Thai_choching*: TKeySym = 0x00000DA9
-    XK_Thai_chochang*: TKeySym = 0x00000DAA
-    XK_Thai_soso*: TKeySym = 0x00000DAB
-    XK_Thai_chochoe*: TKeySym = 0x00000DAC
-    XK_Thai_yoying*: TKeySym = 0x00000DAD
-    XK_Thai_dochada*: TKeySym = 0x00000DAE
-    XK_Thai_topatak*: TKeySym = 0x00000DAF
-    XK_Thai_thothan*: TKeySym = 0x00000DB0
-    XK_Thai_thonangmontho*: TKeySym = 0x00000DB1
-    XK_Thai_thophuthao*: TKeySym = 0x00000DB2
-    XK_Thai_nonen*: TKeySym = 0x00000DB3
-    XK_Thai_dodek*: TKeySym = 0x00000DB4
-    XK_Thai_totao*: TKeySym = 0x00000DB5
-    XK_Thai_thothung*: TKeySym = 0x00000DB6
-    XK_Thai_thothahan*: TKeySym = 0x00000DB7
-    XK_Thai_thothong*: TKeySym = 0x00000DB8
-    XK_Thai_nonu*: TKeySym = 0x00000DB9
-    XK_Thai_bobaimai*: TKeySym = 0x00000DBA
-    XK_Thai_popla*: TKeySym = 0x00000DBB
-    XK_Thai_phophung*: TKeySym = 0x00000DBC
-    XK_Thai_fofa*: TKeySym = 0x00000DBD
-    XK_Thai_phophan*: TKeySym = 0x00000DBE
-    XK_Thai_fofan*: TKeySym = 0x00000DBF
-    XK_Thai_phosamphao*: TKeySym = 0x00000DC0
-    XK_Thai_moma*: TKeySym = 0x00000DC1
-    XK_Thai_yoyak*: TKeySym = 0x00000DC2
-    XK_Thai_rorua*: TKeySym = 0x00000DC3
-    XK_Thai_ru*: TKeySym = 0x00000DC4
-    XK_Thai_loling*: TKeySym = 0x00000DC5
-    XK_Thai_lu*: TKeySym = 0x00000DC6
-    XK_Thai_wowaen*: TKeySym = 0x00000DC7
-    XK_Thai_sosala*: TKeySym = 0x00000DC8
-    XK_Thai_sorusi*: TKeySym = 0x00000DC9
-    XK_Thai_sosua*: TKeySym = 0x00000DCA
-    XK_Thai_hohip*: TKeySym = 0x00000DCB
-    XK_Thai_lochula*: TKeySym = 0x00000DCC
-    XK_Thai_oang*: TKeySym = 0x00000DCD
-    XK_Thai_honokhuk*: TKeySym = 0x00000DCE
-    XK_Thai_paiyannoi*: TKeySym = 0x00000DCF
-    XK_Thai_saraa*: TKeySym = 0x00000DD0
-    XK_Thai_maihanakat*: TKeySym = 0x00000DD1
-    XK_Thai_saraaa*: TKeySym = 0x00000DD2
-    XK_Thai_saraam*: TKeySym = 0x00000DD3
-    XK_Thai_sarai*: TKeySym = 0x00000DD4
-    XK_Thai_saraii*: TKeySym = 0x00000DD5
-    XK_Thai_saraue*: TKeySym = 0x00000DD6
-    XK_Thai_sarauee*: TKeySym = 0x00000DD7
-    XK_Thai_sarau*: TKeySym = 0x00000DD8
-    XK_Thai_sarauu*: TKeySym = 0x00000DD9
-    XK_Thai_phinthu*: TKeySym = 0x00000DDA
-    XK_Thai_maihanakat_maitho*: TKeySym = 0x00000DDE
-    XK_Thai_baht*: TKeySym = 0x00000DDF
-    XK_Thai_sarae*: TKeySym = 0x00000DE0
-    XK_Thai_saraae*: TKeySym = 0x00000DE1
-    XK_Thai_sarao*: TKeySym = 0x00000DE2
-    XK_Thai_saraaimaimuan*: TKeySym = 0x00000DE3
-    XK_Thai_saraaimaimalai*: TKeySym = 0x00000DE4
-    XK_Thai_lakkhangyao*: TKeySym = 0x00000DE5
-    XK_Thai_maiyamok*: TKeySym = 0x00000DE6
-    XK_Thai_maitaikhu*: TKeySym = 0x00000DE7
-    XK_Thai_maiek*: TKeySym = 0x00000DE8
-    XK_Thai_maitho*: TKeySym = 0x00000DE9
-    XK_Thai_maitri*: TKeySym = 0x00000DEA
-    XK_Thai_maichattawa*: TKeySym = 0x00000DEB
-    XK_Thai_thanthakhat*: TKeySym = 0x00000DEC
-    XK_Thai_nikhahit*: TKeySym = 0x00000DED
-    XK_Thai_leksun*: TKeySym = 0x00000DF0
-    XK_Thai_leknung*: TKeySym = 0x00000DF1
-    XK_Thai_leksong*: TKeySym = 0x00000DF2
-    XK_Thai_leksam*: TKeySym = 0x00000DF3
-    XK_Thai_leksi*: TKeySym = 0x00000DF4
-    XK_Thai_lekha*: TKeySym = 0x00000DF5
-    XK_Thai_lekhok*: TKeySym = 0x00000DF6
-    XK_Thai_lekchet*: TKeySym = 0x00000DF7
-    XK_Thai_lekpaet*: TKeySym = 0x00000DF8
-    XK_Thai_lekkao*: TKeySym = 0x00000DF9
-# XK_THAI 
-#*
-# *   Korean
-# *   Byte 3 = e
-# *
-
-when defined(XK_KOREAN) or true: 
-  const
-    XK_Hangul*: TKeySym = 0x0000FF31     # Hangul start/stop(toggle) 
-    XK_Hangul_Start*: TKeySym = 0x0000FF32 # Hangul start 
-    XK_Hangul_End*: TKeySym = 0x0000FF33 # Hangul end, English start 
-    XK_Hangul_Hanja*: TKeySym = 0x0000FF34 # Start Hangul->Hanja Conversion 
-    XK_Hangul_Jamo*: TKeySym = 0x0000FF35 # Hangul Jamo mode 
-    XK_Hangul_Romaja*: TKeySym = 0x0000FF36 # Hangul Romaja mode 
-    XK_Hangul_Codeinput*: TKeySym = 0x0000FF37 # Hangul code input mode 
-    XK_Hangul_Jeonja*: TKeySym = 0x0000FF38 # Jeonja mode 
-    XK_Hangul_Banja*: TKeySym = 0x0000FF39 # Banja mode 
-    XK_Hangul_PreHanja*: TKeySym = 0x0000FF3A # Pre Hanja conversion 
-    XK_Hangul_PostHanja*: TKeySym = 0x0000FF3B # Post Hanja conversion 
-    XK_Hangul_SingleCandidate*: TKeySym = 0x0000FF3C # Single candidate 
-    XK_Hangul_MultipleCandidate*: TKeySym = 0x0000FF3D # Multiple candidate 
-    XK_Hangul_PreviousCandidate*: TKeySym = 0x0000FF3E # Previous candidate 
-    XK_Hangul_Special*: TKeySym = 0x0000FF3F # Special symbols 
-    XK_Hangul_switch*: TKeySym = 0x0000FF7E # Alias for mode_switch \
-                                   # Hangul Consonant Characters 
-    XK_Hangul_Kiyeog*: TKeySym = 0x00000EA1
-    XK_Hangul_SsangKiyeog*: TKeySym = 0x00000EA2
-    XK_Hangul_KiyeogSios*: TKeySym = 0x00000EA3
-    XK_Hangul_Nieun*: TKeySym = 0x00000EA4
-    XK_Hangul_NieunJieuj*: TKeySym = 0x00000EA5
-    XK_Hangul_NieunHieuh*: TKeySym = 0x00000EA6
-    XK_Hangul_Dikeud*: TKeySym = 0x00000EA7
-    XK_Hangul_SsangDikeud*: TKeySym = 0x00000EA8
-    XK_Hangul_Rieul*: TKeySym = 0x00000EA9
-    XK_Hangul_RieulKiyeog*: TKeySym = 0x00000EAA
-    XK_Hangul_RieulMieum*: TKeySym = 0x00000EAB
-    XK_Hangul_RieulPieub*: TKeySym = 0x00000EAC
-    XK_Hangul_RieulSios*: TKeySym = 0x00000EAD
-    XK_Hangul_RieulTieut*: TKeySym = 0x00000EAE
-    XK_Hangul_RieulPhieuf*: TKeySym = 0x00000EAF
-    XK_Hangul_RieulHieuh*: TKeySym = 0x00000EB0
-    XK_Hangul_Mieum*: TKeySym = 0x00000EB1
-    XK_Hangul_Pieub*: TKeySym = 0x00000EB2
-    XK_Hangul_SsangPieub*: TKeySym = 0x00000EB3
-    XK_Hangul_PieubSios*: TKeySym = 0x00000EB4
-    XK_Hangul_Sios*: TKeySym = 0x00000EB5
-    XK_Hangul_SsangSios*: TKeySym = 0x00000EB6
-    XK_Hangul_Ieung*: TKeySym = 0x00000EB7
-    XK_Hangul_Jieuj*: TKeySym = 0x00000EB8
-    XK_Hangul_SsangJieuj*: TKeySym = 0x00000EB9
-    XK_Hangul_Cieuc*: TKeySym = 0x00000EBA
-    XK_Hangul_Khieuq*: TKeySym = 0x00000EBB
-    XK_Hangul_Tieut*: TKeySym = 0x00000EBC
-    XK_Hangul_Phieuf*: TKeySym = 0x00000EBD
-    XK_Hangul_Hieuh*: TKeySym = 0x00000EBE # Hangul Vowel Characters 
-    XK_Hangul_A*: TKeySym = 0x00000EBF
-    XK_Hangul_AE*: TKeySym = 0x00000EC0
-    XK_Hangul_YA*: TKeySym = 0x00000EC1
-    XK_Hangul_YAE*: TKeySym = 0x00000EC2
-    XK_Hangul_EO*: TKeySym = 0x00000EC3
-    XK_Hangul_E*: TKeySym = 0x00000EC4
-    XK_Hangul_YEO*: TKeySym = 0x00000EC5
-    XK_Hangul_YE*: TKeySym = 0x00000EC6
-    XK_Hangul_O*: TKeySym = 0x00000EC7
-    XK_Hangul_WA*: TKeySym = 0x00000EC8
-    XK_Hangul_WAE*: TKeySym = 0x00000EC9
-    XK_Hangul_OE*: TKeySym = 0x00000ECA
-    XK_Hangul_YO*: TKeySym = 0x00000ECB
-    XK_Hangul_U*: TKeySym = 0x00000ECC
-    XK_Hangul_WEO*: TKeySym = 0x00000ECD
-    XK_Hangul_WE*: TKeySym = 0x00000ECE
-    XK_Hangul_WI*: TKeySym = 0x00000ECF
-    XK_Hangul_YU*: TKeySym = 0x00000ED0
-    XK_Hangul_EU*: TKeySym = 0x00000ED1
-    XK_Hangul_YI*: TKeySym = 0x00000ED2
-    XK_Hangul_I*: TKeySym = 0x00000ED3   # Hangul syllable-final (JongSeong) Characters 
-    XK_Hangul_J_Kiyeog*: TKeySym = 0x00000ED4
-    XK_Hangul_J_SsangKiyeog*: TKeySym = 0x00000ED5
-    XK_Hangul_J_KiyeogSios*: TKeySym = 0x00000ED6
-    XK_Hangul_J_Nieun*: TKeySym = 0x00000ED7
-    XK_Hangul_J_NieunJieuj*: TKeySym = 0x00000ED8
-    XK_Hangul_J_NieunHieuh*: TKeySym = 0x00000ED9
-    XK_Hangul_J_Dikeud*: TKeySym = 0x00000EDA
-    XK_Hangul_J_Rieul*: TKeySym = 0x00000EDB
-    XK_Hangul_J_RieulKiyeog*: TKeySym = 0x00000EDC
-    XK_Hangul_J_RieulMieum*: TKeySym = 0x00000EDD
-    XK_Hangul_J_RieulPieub*: TKeySym = 0x00000EDE
-    XK_Hangul_J_RieulSios*: TKeySym = 0x00000EDF
-    XK_Hangul_J_RieulTieut*: TKeySym = 0x00000EE0
-    XK_Hangul_J_RieulPhieuf*: TKeySym = 0x00000EE1
-    XK_Hangul_J_RieulHieuh*: TKeySym = 0x00000EE2
-    XK_Hangul_J_Mieum*: TKeySym = 0x00000EE3
-    XK_Hangul_J_Pieub*: TKeySym = 0x00000EE4
-    XK_Hangul_J_PieubSios*: TKeySym = 0x00000EE5
-    XK_Hangul_J_Sios*: TKeySym = 0x00000EE6
-    XK_Hangul_J_SsangSios*: TKeySym = 0x00000EE7
-    XK_Hangul_J_Ieung*: TKeySym = 0x00000EE8
-    XK_Hangul_J_Jieuj*: TKeySym = 0x00000EE9
-    XK_Hangul_J_Cieuc*: TKeySym = 0x00000EEA
-    XK_Hangul_J_Khieuq*: TKeySym = 0x00000EEB
-    XK_Hangul_J_Tieut*: TKeySym = 0x00000EEC
-    XK_Hangul_J_Phieuf*: TKeySym = 0x00000EED
-    XK_Hangul_J_Hieuh*: TKeySym = 0x00000EEE # Ancient Hangul Consonant Characters 
-    XK_Hangul_RieulYeorinHieuh*: TKeySym = 0x00000EEF
-    XK_Hangul_SunkyeongeumMieum*: TKeySym = 0x00000EF0
-    XK_Hangul_SunkyeongeumPieub*: TKeySym = 0x00000EF1
-    XK_Hangul_PanSios*: TKeySym = 0x00000EF2
-    XK_Hangul_KkogjiDalrinIeung*: TKeySym = 0x00000EF3
-    XK_Hangul_SunkyeongeumPhieuf*: TKeySym = 0x00000EF4
-    XK_Hangul_YeorinHieuh*: TKeySym = 0x00000EF5 # Ancient Hangul Vowel Characters 
-    XK_Hangul_AraeA*: TKeySym = 0x00000EF6
-    XK_Hangul_AraeAE*: TKeySym = 0x00000EF7 # Ancient Hangul syllable-final (JongSeong) Characters 
-    XK_Hangul_J_PanSios*: TKeySym = 0x00000EF8
-    XK_Hangul_J_KkogjiDalrinIeung*: TKeySym = 0x00000EF9
-    XK_Hangul_J_YeorinHieuh*: TKeySym = 0x00000EFA # Korean currency symbol 
-    XK_Korean_Won*: TKeySym = 0x00000EFF
-# XK_KOREAN 
-#*
-# *   Armenian
-# *   Byte 3 = = $14
-# *
-
-when defined(XK_ARMENIAN) or true: 
-  const
-    XK_Armenian_eternity*: TKeySym = 0x000014A1
-    XK_Armenian_ligature_ew*: TKeySym = 0x000014A2
-    XK_Armenian_full_stop*: TKeySym = 0x000014A3
-    XK_Armenian_verjaket*: TKeySym = 0x000014A3
-    XK_Armenian_parenright*: TKeySym = 0x000014A4
-    XK_Armenian_parenleft*: TKeySym = 0x000014A5
-    XK_Armenian_guillemotright*: TKeySym = 0x000014A6
-    XK_Armenian_guillemotleft*: TKeySym = 0x000014A7
-    XK_Armenian_em_dash*: TKeySym = 0x000014A8
-    XK_Armenian_dot*: TKeySym = 0x000014A9
-    XK_Armenian_mijaket*: TKeySym = 0x000014A9
-    XK_Armenian_separation_mark*: TKeySym = 0x000014AA
-    XK_Armenian_but*: TKeySym = 0x000014AA
-    XK_Armenian_comma*: TKeySym = 0x000014AB
-    XK_Armenian_en_dash*: TKeySym = 0x000014AC
-    XK_Armenian_hyphen*: TKeySym = 0x000014AD
-    XK_Armenian_yentamna*: TKeySym = 0x000014AD
-    XK_Armenian_ellipsis*: TKeySym = 0x000014AE
-    XK_Armenian_exclam*: TKeySym = 0x000014AF
-    XK_Armenian_amanak*: TKeySym = 0x000014AF
-    XK_Armenian_accent*: TKeySym = 0x000014B0
-    XK_Armenian_shesht*: TKeySym = 0x000014B0
-    XK_Armenian_question*: TKeySym = 0x000014B1
-    XK_Armenian_paruyk*: TKeySym = 0x000014B1
-    XKc_Armenian_AYB*: TKeySym = 0x000014B2
-    XK_Armenian_ayb*: TKeySym = 0x000014B3
-    XKc_Armenian_BEN*: TKeySym = 0x000014B4
-    XK_Armenian_ben*: TKeySym = 0x000014B5
-    XKc_Armenian_GIM*: TKeySym = 0x000014B6
-    XK_Armenian_gim*: TKeySym = 0x000014B7
-    XKc_Armenian_DA*: TKeySym = 0x000014B8
-    XK_Armenian_da*: TKeySym = 0x000014B9
-    XKc_Armenian_YECH*: TKeySym = 0x000014BA
-    XK_Armenian_yech*: TKeySym = 0x000014BB
-    XKc_Armenian_ZA*: TKeySym = 0x000014BC
-    XK_Armenian_za*: TKeySym = 0x000014BD
-    XKc_Armenian_E*: TKeySym = 0x000014BE
-    XK_Armenian_e*: TKeySym = 0x000014BF
-    XKc_Armenian_AT*: TKeySym = 0x000014C0
-    XK_Armenian_at*: TKeySym = 0x000014C1
-    XKc_Armenian_TO*: TKeySym = 0x000014C2
-    XK_Armenian_to*: TKeySym = 0x000014C3
-    XKc_Armenian_ZHE*: TKeySym = 0x000014C4
-    XK_Armenian_zhe*: TKeySym = 0x000014C5
-    XKc_Armenian_INI*: TKeySym = 0x000014C6
-    XK_Armenian_ini*: TKeySym = 0x000014C7
-    XKc_Armenian_LYUN*: TKeySym = 0x000014C8
-    XK_Armenian_lyun*: TKeySym = 0x000014C9
-    XKc_Armenian_KHE*: TKeySym = 0x000014CA
-    XK_Armenian_khe*: TKeySym = 0x000014CB
-    XKc_Armenian_TSA*: TKeySym = 0x000014CC
-    XK_Armenian_tsa*: TKeySym = 0x000014CD
-    XKc_Armenian_KEN*: TKeySym = 0x000014CE
-    XK_Armenian_ken*: TKeySym = 0x000014CF
-    XKc_Armenian_HO*: TKeySym = 0x000014D0
-    XK_Armenian_ho*: TKeySym = 0x000014D1
-    XKc_Armenian_DZA*: TKeySym = 0x000014D2
-    XK_Armenian_dza*: TKeySym = 0x000014D3
-    XKc_Armenian_GHAT*: TKeySym = 0x000014D4
-    XK_Armenian_ghat*: TKeySym = 0x000014D5
-    XKc_Armenian_TCHE*: TKeySym = 0x000014D6
-    XK_Armenian_tche*: TKeySym = 0x000014D7
-    XKc_Armenian_MEN*: TKeySym = 0x000014D8
-    XK_Armenian_men*: TKeySym = 0x000014D9
-    XKc_Armenian_HI*: TKeySym = 0x000014DA
-    XK_Armenian_hi*: TKeySym = 0x000014DB
-    XKc_Armenian_NU*: TKeySym = 0x000014DC
-    XK_Armenian_nu*: TKeySym = 0x000014DD
-    XKc_Armenian_SHA*: TKeySym = 0x000014DE
-    XK_Armenian_sha*: TKeySym = 0x000014DF
-    XKc_Armenian_VO*: TKeySym = 0x000014E0
-    XK_Armenian_vo*: TKeySym = 0x000014E1
-    XKc_Armenian_CHA*: TKeySym = 0x000014E2
-    XK_Armenian_cha*: TKeySym = 0x000014E3
-    XKc_Armenian_PE*: TKeySym = 0x000014E4
-    XK_Armenian_pe*: TKeySym = 0x000014E5
-    XKc_Armenian_JE*: TKeySym = 0x000014E6
-    XK_Armenian_je*: TKeySym = 0x000014E7
-    XKc_Armenian_RA*: TKeySym = 0x000014E8
-    XK_Armenian_ra*: TKeySym = 0x000014E9
-    XKc_Armenian_SE*: TKeySym = 0x000014EA
-    XK_Armenian_se*: TKeySym = 0x000014EB
-    XKc_Armenian_VEV*: TKeySym = 0x000014EC
-    XK_Armenian_vev*: TKeySym = 0x000014ED
-    XKc_Armenian_TYUN*: TKeySym = 0x000014EE
-    XK_Armenian_tyun*: TKeySym = 0x000014EF
-    XKc_Armenian_RE*: TKeySym = 0x000014F0
-    XK_Armenian_re*: TKeySym = 0x000014F1
-    XKc_Armenian_TSO*: TKeySym = 0x000014F2
-    XK_Armenian_tso*: TKeySym = 0x000014F3
-    XKc_Armenian_VYUN*: TKeySym = 0x000014F4
-    XK_Armenian_vyun*: TKeySym = 0x000014F5
-    XKc_Armenian_PYUR*: TKeySym = 0x000014F6
-    XK_Armenian_pyur*: TKeySym = 0x000014F7
-    XKc_Armenian_KE*: TKeySym = 0x000014F8
-    XK_Armenian_ke*: TKeySym = 0x000014F9
-    XKc_Armenian_O*: TKeySym = 0x000014FA
-    XK_Armenian_o*: TKeySym = 0x000014FB
-    XKc_Armenian_FE*: TKeySym = 0x000014FC
-    XK_Armenian_fe*: TKeySym = 0x000014FD
-    XK_Armenian_apostrophe*: TKeySym = 0x000014FE
-    XK_Armenian_section_sign*: TKeySym = 0x000014FF
-# XK_ARMENIAN 
-#*
-# *   Georgian
-# *   Byte 3 = = $15
-# *
-
-when defined(XK_GEORGIAN) or true: 
-  const
-    XK_Georgian_an*: TKeySym = 0x000015D0
-    XK_Georgian_ban*: TKeySym = 0x000015D1
-    XK_Georgian_gan*: TKeySym = 0x000015D2
-    XK_Georgian_don*: TKeySym = 0x000015D3
-    XK_Georgian_en*: TKeySym = 0x000015D4
-    XK_Georgian_vin*: TKeySym = 0x000015D5
-    XK_Georgian_zen*: TKeySym = 0x000015D6
-    XK_Georgian_tan*: TKeySym = 0x000015D7
-    XK_Georgian_in*: TKeySym = 0x000015D8
-    XK_Georgian_kan*: TKeySym = 0x000015D9
-    XK_Georgian_las*: TKeySym = 0x000015DA
-    XK_Georgian_man*: TKeySym = 0x000015DB
-    XK_Georgian_nar*: TKeySym = 0x000015DC
-    XK_Georgian_on*: TKeySym = 0x000015DD
-    XK_Georgian_par*: TKeySym = 0x000015DE
-    XK_Georgian_zhar*: TKeySym = 0x000015DF
-    XK_Georgian_rae*: TKeySym = 0x000015E0
-    XK_Georgian_san*: TKeySym = 0x000015E1
-    XK_Georgian_tar*: TKeySym = 0x000015E2
-    XK_Georgian_un*: TKeySym = 0x000015E3
-    XK_Georgian_phar*: TKeySym = 0x000015E4
-    XK_Georgian_khar*: TKeySym = 0x000015E5
-    XK_Georgian_ghan*: TKeySym = 0x000015E6
-    XK_Georgian_qar*: TKeySym = 0x000015E7
-    XK_Georgian_shin*: TKeySym = 0x000015E8
-    XK_Georgian_chin*: TKeySym = 0x000015E9
-    XK_Georgian_can*: TKeySym = 0x000015EA
-    XK_Georgian_jil*: TKeySym = 0x000015EB
-    XK_Georgian_cil*: TKeySym = 0x000015EC
-    XK_Georgian_char*: TKeySym = 0x000015ED
-    XK_Georgian_xan*: TKeySym = 0x000015EE
-    XK_Georgian_jhan*: TKeySym = 0x000015EF
-    XK_Georgian_hae*: TKeySym = 0x000015F0
-    XK_Georgian_he*: TKeySym = 0x000015F1
-    XK_Georgian_hie*: TKeySym = 0x000015F2
-    XK_Georgian_we*: TKeySym = 0x000015F3
-    XK_Georgian_har*: TKeySym = 0x000015F4
-    XK_Georgian_hoe*: TKeySym = 0x000015F5
-    XK_Georgian_fi*: TKeySym = 0x000015F6
-# XK_GEORGIAN 
-#*
-# * Azeri (and other Turkic or Caucasian languages of ex-USSR)
-# * Byte 3 = = $16
-# *
-
-when defined(XK_CAUCASUS) or true: 
-  # latin 
-  const
-    XKc_Ccedillaabovedot*: TKeySym = 0x000016A2
-    XKc_Xabovedot*: TKeySym = 0x000016A3
-    XKc_Qabovedot*: TKeySym = 0x000016A5
-    XKc_Ibreve*: TKeySym = 0x000016A6
-    XKc_IE*: TKeySym = 0x000016A7
-    XKc_UO*: TKeySym = 0x000016A8
-    XKc_Zstroke*: TKeySym = 0x000016A9
-    XKc_Gcaron*: TKeySym = 0x000016AA
-    XKc_Obarred*: TKeySym = 0x000016AF
-    XK_ccedillaabovedot*: TKeySym = 0x000016B2
-    XK_xabovedot*: TKeySym = 0x000016B3
-    XKc_Ocaron*: TKeySym = 0x000016B4
-    XK_qabovedot*: TKeySym = 0x000016B5
-    XK_ibreve*: TKeySym = 0x000016B6
-    XK_ie*: TKeySym = 0x000016B7
-    XK_uo*: TKeySym = 0x000016B8
-    XK_zstroke*: TKeySym = 0x000016B9
-    XK_gcaron*: TKeySym = 0x000016BA
-    XK_ocaron*: TKeySym = 0x000016BD
-    XK_obarred*: TKeySym = 0x000016BF
-    XKc_SCHWA*: TKeySym = 0x000016C6
-    XK_schwa*: TKeySym = 0x000016F6 # those are not really Caucasus, but I put them here for now\ 
-                           # For Inupiak 
-    XKc_Lbelowdot*: TKeySym = 0x000016D1
-    XKc_Lstrokebelowdot*: TKeySym = 0x000016D2
-    XK_lbelowdot*: TKeySym = 0x000016E1
-    XK_lstrokebelowdot*: TKeySym = 0x000016E2 # For Guarani 
-    XKc_Gtilde*: TKeySym = 0x000016D3
-    XK_gtilde*: TKeySym = 0x000016E3
-# XK_CAUCASUS 
-#*
-# *   Vietnamese
-# *   Byte 3 = = $1e
-# *
-
-when defined(XK_VIETNAMESE) or true:
-  const 
-    XKc_Abelowdot*: TKeySym = 0x00001EA0
-    XK_abelowdot*: TKeySym = 0x00001EA1
-    XKc_Ahook*: TKeySym = 0x00001EA2
-    XK_ahook*: TKeySym = 0x00001EA3
-    XKc_Acircumflexacute*: TKeySym = 0x00001EA4
-    XK_acircumflexacute*: TKeySym = 0x00001EA5
-    XKc_Acircumflexgrave*: TKeySym = 0x00001EA6
-    XK_acircumflexgrave*: TKeySym = 0x00001EA7
-    XKc_Acircumflexhook*: TKeySym = 0x00001EA8
-    XK_acircumflexhook*: TKeySym = 0x00001EA9
-    XKc_Acircumflextilde*: TKeySym = 0x00001EAA
-    XK_acircumflextilde*: TKeySym = 0x00001EAB
-    XKc_Acircumflexbelowdot*: TKeySym = 0x00001EAC
-    XK_acircumflexbelowdot*: TKeySym = 0x00001EAD
-    XKc_Abreveacute*: TKeySym = 0x00001EAE
-    XK_abreveacute*: TKeySym = 0x00001EAF
-    XKc_Abrevegrave*: TKeySym = 0x00001EB0
-    XK_abrevegrave*: TKeySym = 0x00001EB1
-    XKc_Abrevehook*: TKeySym = 0x00001EB2
-    XK_abrevehook*: TKeySym = 0x00001EB3
-    XKc_Abrevetilde*: TKeySym = 0x00001EB4
-    XK_abrevetilde*: TKeySym = 0x00001EB5
-    XKc_Abrevebelowdot*: TKeySym = 0x00001EB6
-    XK_abrevebelowdot*: TKeySym = 0x00001EB7
-    XKc_Ebelowdot*: TKeySym = 0x00001EB8
-    XK_ebelowdot*: TKeySym = 0x00001EB9
-    XKc_Ehook*: TKeySym = 0x00001EBA
-    XK_ehook*: TKeySym = 0x00001EBB
-    XKc_Etilde*: TKeySym = 0x00001EBC
-    XK_etilde*: TKeySym = 0x00001EBD
-    XKc_Ecircumflexacute*: TKeySym = 0x00001EBE
-    XK_ecircumflexacute*: TKeySym = 0x00001EBF
-    XKc_Ecircumflexgrave*: TKeySym = 0x00001EC0
-    XK_ecircumflexgrave*: TKeySym = 0x00001EC1
-    XKc_Ecircumflexhook*: TKeySym = 0x00001EC2
-    XK_ecircumflexhook*: TKeySym = 0x00001EC3
-    XKc_Ecircumflextilde*: TKeySym = 0x00001EC4
-    XK_ecircumflextilde*: TKeySym = 0x00001EC5
-    XKc_Ecircumflexbelowdot*: TKeySym = 0x00001EC6
-    XK_ecircumflexbelowdot*: TKeySym = 0x00001EC7
-    XKc_Ihook*: TKeySym = 0x00001EC8
-    XK_ihook*: TKeySym = 0x00001EC9
-    XKc_Ibelowdot*: TKeySym = 0x00001ECA
-    XK_ibelowdot*: TKeySym = 0x00001ECB
-    XKc_Obelowdot*: TKeySym = 0x00001ECC
-    XK_obelowdot*: TKeySym = 0x00001ECD
-    XKc_Ohook*: TKeySym = 0x00001ECE
-    XK_ohook*: TKeySym = 0x00001ECF
-    XKc_Ocircumflexacute*: TKeySym = 0x00001ED0
-    XK_ocircumflexacute*: TKeySym = 0x00001ED1
-    XKc_Ocircumflexgrave*: TKeySym = 0x00001ED2
-    XK_ocircumflexgrave*: TKeySym = 0x00001ED3
-    XKc_Ocircumflexhook*: TKeySym = 0x00001ED4
-    XK_ocircumflexhook*: TKeySym = 0x00001ED5
-    XKc_Ocircumflextilde*: TKeySym = 0x00001ED6
-    XK_ocircumflextilde*: TKeySym = 0x00001ED7
-    XKc_Ocircumflexbelowdot*: TKeySym = 0x00001ED8
-    XK_ocircumflexbelowdot*: TKeySym = 0x00001ED9
-    XKc_Ohornacute*: TKeySym = 0x00001EDA
-    XK_ohornacute*: TKeySym = 0x00001EDB
-    XKc_Ohorngrave*: TKeySym = 0x00001EDC
-    XK_ohorngrave*: TKeySym = 0x00001EDD
-    XKc_Ohornhook*: TKeySym = 0x00001EDE
-    XK_ohornhook*: TKeySym = 0x00001EDF
-    XKc_Ohorntilde*: TKeySym = 0x00001EE0
-    XK_ohorntilde*: TKeySym = 0x00001EE1
-    XKc_Ohornbelowdot*: TKeySym = 0x00001EE2
-    XK_ohornbelowdot*: TKeySym = 0x00001EE3
-    XKc_Ubelowdot*: TKeySym = 0x00001EE4
-    XK_ubelowdot*: TKeySym = 0x00001EE5
-    XKc_Uhook*: TKeySym = 0x00001EE6
-    XK_uhook*: TKeySym = 0x00001EE7
-    XKc_Uhornacute*: TKeySym = 0x00001EE8
-    XK_uhornacute*: TKeySym = 0x00001EE9
-    XKc_Uhorngrave*: TKeySym = 0x00001EEA
-    XK_uhorngrave*: TKeySym = 0x00001EEB
-    XKc_Uhornhook*: TKeySym = 0x00001EEC
-    XK_uhornhook*: TKeySym = 0x00001EED
-    XKc_Uhorntilde*: TKeySym = 0x00001EEE
-    XK_uhorntilde*: TKeySym = 0x00001EEF
-    XKc_Uhornbelowdot*: TKeySym = 0x00001EF0
-    XK_uhornbelowdot*: TKeySym = 0x00001EF1
-    XKc_Ybelowdot*: TKeySym = 0x00001EF4
-    XK_ybelowdot*: TKeySym = 0x00001EF5
-    XKc_Yhook*: TKeySym = 0x00001EF6
-    XK_yhook*: TKeySym = 0x00001EF7
-    XKc_Ytilde*: TKeySym = 0x00001EF8
-    XK_ytilde*: TKeySym = 0x00001EF9
-    XKc_Ohorn*: TKeySym = 0x00001EFA     # U+01a0 
-    XK_ohorn*: TKeySym = 0x00001EFB      # U+01a1 
-    XKc_Uhorn*: TKeySym = 0x00001EFC     # U+01af 
-    XK_uhorn*: TKeySym = 0x00001EFD      # U+01b0 
-    XK_combining_tilde*: TKeySym = 0x00001E9F # U+0303 
-    XK_combining_grave*: TKeySym = 0x00001EF2 # U+0300 
-    XK_combining_acute*: TKeySym = 0x00001EF3 # U+0301 
-    XK_combining_hook*: TKeySym = 0x00001EFE # U+0309 
-    XK_combining_belowdot*: TKeySym = 0x00001EFF # U+0323 
-# XK_VIETNAMESE 
-
-when defined(XK_CURRENCY) or true: 
-  const
-    XK_EcuSign*: TKeySym = 0x000020A0
-    XK_ColonSign*: TKeySym = 0x000020A1
-    XK_CruzeiroSign*: TKeySym = 0x000020A2
-    XK_FFrancSign*: TKeySym = 0x000020A3
-    XK_LiraSign*: TKeySym = 0x000020A4
-    XK_MillSign*: TKeySym = 0x000020A5
-    XK_NairaSign*: TKeySym = 0x000020A6
-    XK_PesetaSign*: TKeySym = 0x000020A7
-    XK_RupeeSign*: TKeySym = 0x000020A8
-    XK_WonSign*: TKeySym = 0x000020A9
-    XK_NewSheqelSign*: TKeySym = 0x000020AA
-    XK_DongSign*: TKeySym = 0x000020AB
-    XK_EuroSign*: TKeySym = 0x000020AC
-# implementation
diff --git a/lib/wrappers/x11/x.nim b/lib/wrappers/x11/x.nim
deleted file mode 100644
index 2eefe311f..000000000
--- a/lib/wrappers/x11/x.nim
+++ /dev/null
@@ -1,401 +0,0 @@
-
-#
-#  Automatically converted by H2Pas 0.99.15 from x.h
-#  The following command line parameters were used:
-#    -p
-#    -T
-#    -S
-#    -d
-#    -c
-#    x.h
-#
-# Pointers to basic pascal types, inserted by h2pas conversion program.
-import unsigned
-
-const 
-  X_PROTOCOL* = 11
-  X_PROTOCOL_REVISION* = 0
-
-type
-  PXID* = ptr TXID
-  TXID* = culong
-  PMask* = ptr TMask
-  TMask* = culong
-  PPAtom* = ptr PAtom
-  PAtom* = ptr TAtom
-  TAtom* = culong
-  PVisualID* = ptr TVisualID
-  TVisualID* = culong
-  PTime* = ptr TTime
-  TTime* = culong
-  PPWindow* = ptr PWindow
-  PWindow* = ptr TWindow
-  TWindow* = TXID
-  PDrawable* = ptr TDrawable
-  TDrawable* = TXID
-  PFont* = ptr TFont
-  TFont* = TXID
-  PPixmap* = ptr TPixmap
-  TPixmap* = TXID
-  PCursor* = ptr TCursor
-  TCursor* = TXID
-  PColormap* = ptr TColormap
-  TColormap* = TXID
-  PGContext* = ptr TGContext
-  TGContext* = TXID
-  PKeySym* = ptr TKeySym
-  TKeySym* = TXID
-  PKeyCode* = ptr TKeyCode
-  TKeyCode* = cuchar
-
-proc `==`*(a, b: TAtom): bool =
-    return unsigned.`==`(a,b)
-
-const 
-  None* = 0
-  ParentRelative* = 1
-  CopyFromParent* = 0
-  PointerWindow* = 0
-  InputFocus* = 1
-  PointerRoot* = 1
-  AnyPropertyType* = 0
-  AnyKey* = 0
-  AnyButton* = 0
-  AllTemporary* = 0
-  CurrentTime* = 0
-  NoSymbol* = 0
-  NoEventMask* = 0
-  KeyPressMask* = 1 shl 0
-  KeyReleaseMask* = 1 shl 1
-  ButtonPressMask* = 1 shl 2
-  ButtonReleaseMask* = 1 shl 3
-  EnterWindowMask* = 1 shl 4
-  LeaveWindowMask* = 1 shl 5
-  PointerMotionMask* = 1 shl 6
-  PointerMotionHintMask* = 1 shl 7
-  Button1MotionMask* = 1 shl 8
-  Button2MotionMask* = 1 shl 9
-  Button3MotionMask* = 1 shl 10
-  Button4MotionMask* = 1 shl 11
-  Button5MotionMask* = 1 shl 12
-  ButtonMotionMask* = 1 shl 13
-  KeymapStateMask* = 1 shl 14
-  ExposureMask* = 1 shl 15
-  VisibilityChangeMask* = 1 shl 16
-  StructureNotifyMask* = 1 shl 17
-  ResizeRedirectMask* = 1 shl 18
-  SubstructureNotifyMask* = 1 shl 19
-  SubstructureRedirectMask* = 1 shl 20
-  FocusChangeMask* = 1 shl 21
-  PropertyChangeMask* = 1 shl 22
-  ColormapChangeMask* = 1 shl 23
-  OwnerGrabButtonMask* = 1 shl 24
-  KeyPress* = 2
-  KeyRelease* = 3
-  ButtonPress* = 4
-  ButtonRelease* = 5
-  MotionNotify* = 6
-  EnterNotify* = 7
-  LeaveNotify* = 8
-  FocusIn* = 9
-  FocusOut* = 10
-  KeymapNotify* = 11
-  Expose* = 12
-  GraphicsExpose* = 13
-  NoExpose* = 14
-  VisibilityNotify* = 15
-  CreateNotify* = 16
-  DestroyNotify* = 17
-  UnmapNotify* = 18
-  MapNotify* = 19
-  MapRequest* = 20
-  ReparentNotify* = 21
-  ConfigureNotify* = 22
-  ConfigureRequest* = 23
-  GravityNotify* = 24
-  ResizeRequest* = 25
-  CirculateNotify* = 26
-  CirculateRequest* = 27
-  PropertyNotify* = 28
-  SelectionClear* = 29
-  SelectionRequest* = 30
-  SelectionNotify* = 31
-  ColormapNotify* = 32
-  ClientMessage* = 33
-  MappingNotify* = 34
-  LASTEvent* = 35
-  ShiftMask* = 1 shl 0
-  LockMask* = 1 shl 1
-  ControlMask* = 1 shl 2
-  Mod1Mask* = 1 shl 3
-  Mod2Mask* = 1 shl 4
-  Mod3Mask* = 1 shl 5
-  Mod4Mask* = 1 shl 6
-  Mod5Mask* = 1 shl 7
-  ShiftMapIndex* = 0
-  LockMapIndex* = 1
-  ControlMapIndex* = 2
-  Mod1MapIndex* = 3
-  Mod2MapIndex* = 4
-  Mod3MapIndex* = 5
-  Mod4MapIndex* = 6
-  Mod5MapIndex* = 7
-  Button1Mask* = 1 shl 8
-  Button2Mask* = 1 shl 9
-  Button3Mask* = 1 shl 10
-  Button4Mask* = 1 shl 11
-  Button5Mask* = 1 shl 12
-  AnyModifier* = 1 shl 15
-  Button1* = 1
-  Button2* = 2
-  Button3* = 3
-  Button4* = 4
-  Button5* = 5
-  NotifyNormal* = 0
-  NotifyGrab* = 1
-  NotifyUngrab* = 2
-  NotifyWhileGrabbed* = 3
-  NotifyHint* = 1
-  NotifyAncestor* = 0
-  NotifyVirtual* = 1
-  NotifyInferior* = 2
-  NotifyNonlinear* = 3
-  NotifyNonlinearVirtual* = 4
-  NotifyPointer* = 5
-  NotifyPointerRoot* = 6
-  NotifyDetailNone* = 7
-  VisibilityUnobscured* = 0
-  VisibilityPartiallyObscured* = 1
-  VisibilityFullyObscured* = 2
-  PlaceOnTop* = 0
-  PlaceOnBottom* = 1
-  FamilyInternet* = 0
-  FamilyDECnet* = 1
-  FamilyChaos* = 2
-  FamilyInternet6* = 6
-  FamilyServerInterpreted* = 5
-  PropertyNewValue* = 0
-  PropertyDelete* = 1
-  ColormapUninstalled* = 0
-  ColormapInstalled* = 1
-  GrabModeSync* = 0
-  GrabModeAsync* = 1
-  GrabSuccess* = 0
-  AlreadyGrabbed* = 1
-  GrabInvalidTime* = 2
-  GrabNotViewable* = 3
-  GrabFrozen* = 4
-  AsyncPointer* = 0
-  SyncPointer* = 1
-  ReplayPointer* = 2
-  AsyncKeyboard* = 3
-  SyncKeyboard* = 4
-  ReplayKeyboard* = 5
-  AsyncBoth* = 6
-  SyncBoth* = 7
-  RevertToNone* = None
-  RevertToPointerRoot* = PointerRoot
-  RevertToParent* = 2
-  Success* = 0
-  BadRequest* = 1
-  BadValue* = 2
-  BadWindow* = 3
-  BadPixmap* = 4
-  BadAtom* = 5
-  BadCursor* = 6
-  BadFont* = 7
-  BadMatch* = 8
-  BadDrawable* = 9
-  BadAccess* = 10
-  BadAlloc* = 11
-  BadColor* = 12
-  BadGC* = 13
-  BadIDChoice* = 14
-  BadName* = 15
-  BadLength* = 16
-  BadImplementation* = 17
-  FirstExtensionError* = 128
-  LastExtensionError* = 255
-  InputOutput* = 1
-  InputOnly* = 2
-  CWBackPixmap* = 1 shl 0
-  CWBackPixel* = 1 shl 1
-  CWBorderPixmap* = 1 shl 2
-  CWBorderPixel* = 1 shl 3
-  CWBitGravity* = 1 shl 4
-  CWWinGravity* = 1 shl 5
-  CWBackingStore* = 1 shl 6
-  CWBackingPlanes* = 1 shl 7
-  CWBackingPixel* = 1 shl 8
-  CWOverrideRedirect* = 1 shl 9
-  CWSaveUnder* = 1 shl 10
-  CWEventMask* = 1 shl 11
-  CWDontPropagate* = 1 shl 12
-  CWColormap* = 1 shl 13
-  CWCursor* = 1 shl 14
-  CWX* = 1 shl 0
-  CWY* = 1 shl 1
-  CWWidth* = 1 shl 2
-  CWHeight* = 1 shl 3
-  CWBorderWidth* = 1 shl 4
-  CWSibling* = 1 shl 5
-  CWStackMode* = 1 shl 6
-  ForgetGravity* = 0
-  NorthWestGravity* = 1
-  NorthGravity* = 2
-  NorthEastGravity* = 3
-  WestGravity* = 4
-  CenterGravity* = 5
-  EastGravity* = 6
-  SouthWestGravity* = 7
-  SouthGravity* = 8
-  SouthEastGravity* = 9
-  StaticGravity* = 10
-  UnmapGravity* = 0
-  NotUseful* = 0
-  WhenMapped* = 1
-  Always* = 2
-  IsUnmapped* = 0
-  IsUnviewable* = 1
-  IsViewable* = 2
-  SetModeInsert* = 0
-  SetModeDelete* = 1
-  DestroyAll* = 0
-  RetainPermanent* = 1
-  RetainTemporary* = 2
-  Above* = 0
-  Below* = 1
-  TopIf* = 2
-  BottomIf* = 3
-  Opposite* = 4
-  RaiseLowest* = 0
-  LowerHighest* = 1
-  PropModeReplace* = 0
-  PropModePrepend* = 1
-  PropModeAppend* = 2
-  GXclear* = 0x00000000
-  GXand* = 0x00000001
-  GXandReverse* = 0x00000002
-  GXcopy* = 0x00000003
-  GXandInverted* = 0x00000004
-  GXnoop* = 0x00000005
-  GXxor* = 0x00000006
-  GXor* = 0x00000007
-  GXnor* = 0x00000008
-  GXequiv* = 0x00000009
-  GXinvert* = 0x0000000A
-  GXorReverse* = 0x0000000B
-  GXcopyInverted* = 0x0000000C
-  GXorInverted* = 0x0000000D
-  GXnand* = 0x0000000E
-  GXset* = 0x0000000F
-  LineSolid* = 0
-  LineOnOffDash* = 1
-  LineDoubleDash* = 2
-  CapNotLast* = 0
-  CapButt* = 1
-  CapRound* = 2
-  CapProjecting* = 3
-  JoinMiter* = 0
-  JoinRound* = 1
-  JoinBevel* = 2
-  FillSolid* = 0
-  FillTiled* = 1
-  FillStippled* = 2
-  FillOpaqueStippled* = 3
-  EvenOddRule* = 0
-  WindingRule* = 1
-  ClipByChildren* = 0
-  IncludeInferiors* = 1
-  Unsorted* = 0
-  YSorted* = 1
-  YXSorted* = 2
-  YXBanded* = 3
-  CoordModeOrigin* = 0
-  CoordModePrevious* = 1
-  Complex* = 0
-  Nonconvex* = 1
-  Convex* = 2
-  ArcChord* = 0
-  ArcPieSlice* = 1
-  GCFunction* = 1 shl 0
-  GCPlaneMask* = 1 shl 1
-  GCForeground* = 1 shl 2
-  GCBackground* = 1 shl 3
-  GCLineWidth* = 1 shl 4
-  GCLineStyle* = 1 shl 5
-  GCCapStyle* = 1 shl 6
-  GCJoinStyle* = 1 shl 7
-  GCFillStyle* = 1 shl 8
-  GCFillRule* = 1 shl 9
-  GCTile* = 1 shl 10
-  GCStipple* = 1 shl 11
-  GCTileStipXOrigin* = 1 shl 12
-  GCTileStipYOrigin* = 1 shl 13
-  GCFont* = 1 shl 14
-  GCSubwindowMode* = 1 shl 15
-  GCGraphicsExposures* = 1 shl 16
-  GCClipXOrigin* = 1 shl 17
-  GCClipYOrigin* = 1 shl 18
-  GCClipMask* = 1 shl 19
-  GCDashOffset* = 1 shl 20
-  GCDashList* = 1 shl 21
-  GCArcMode* = 1 shl 22
-  GCLastBit* = 22
-  FontLeftToRight* = 0
-  FontRightToLeft* = 1
-  FontChange* = 255
-  XYBitmap* = 0
-  XYPixmap* = 1
-  ZPixmap* = 2
-  AllocNone* = 0
-  AllocAll* = 1
-  DoRed* = 1 shl 0
-  DoGreen* = 1 shl 1
-  DoBlue* = 1 shl 2
-  CursorShape* = 0
-  TileShape* = 1
-  StippleShape* = 2
-  AutoRepeatModeOff* = 0
-  AutoRepeatModeOn* = 1
-  AutoRepeatModeDefault* = 2
-  LedModeOff* = 0
-  LedModeOn* = 1
-  KBKeyClickPercent* = 1 shl 0
-  KBBellPercent* = 1 shl 1
-  KBBellPitch* = 1 shl 2
-  KBBellDuration* = 1 shl 3
-  KBLed* = 1 shl 4
-  KBLedMode* = 1 shl 5
-  KBKey* = 1 shl 6
-  KBAutoRepeatMode* = 1 shl 7
-  MappingSuccess* = 0
-  MappingBusy* = 1
-  MappingFailed* = 2
-  MappingModifier* = 0
-  MappingKeyboard* = 1
-  MappingPointer* = 2
-  DontPreferBlanking* = 0
-  PreferBlanking* = 1
-  DefaultBlanking* = 2
-  DisableScreenSaver* = 0
-  DisableScreenInterval* = 0
-  DontAllowExposures* = 0
-  AllowExposures* = 1
-  DefaultExposures* = 2
-  ScreenSaverReset* = 0
-  ScreenSaverActive* = 1
-  HostInsert* = 0
-  HostDelete* = 1
-  EnableAccess* = 1
-  DisableAccess* = 0
-  StaticGray* = 0
-  GrayScale* = 1
-  StaticColor* = 2
-  PseudoColor* = 3
-  TrueColor* = 4
-  DirectColor* = 5
-  LSBFirst* = 0
-  MSBFirst* = 1
-
-# implementation
diff --git a/lib/wrappers/x11/x11pragma.nim b/lib/wrappers/x11/x11pragma.nim
deleted file mode 100644
index bc88fb004..000000000
--- a/lib/wrappers/x11/x11pragma.nim
+++ /dev/null
@@ -1,20 +0,0 @@
-# included from xlib bindings
-
-
-when defined(use_pkg_config) or defined(use_pkg_config_static):
-    {.pragma: libx11, cdecl, importc.}
-    {.pragma: libx11c, cdecl.}
-    when defined(use_pkg_config_static):
-        {.passl: gorge("pkg-config x11 --static --libs").}
-    else:
-        {.passl: gorge("pkg-config x11 --libs").}
-else:
-    when defined(macosx):
-        const 
-          libX11* = "libX11.dylib"
-    else:
-        const 
-          libX11* = "libX11.so"
-
-    {.pragma: libx11, cdecl, dynlib: libX11, importc.}
-    {.pragma: libx11c, cdecl, dynlib: libX11.}
diff --git a/lib/wrappers/x11/xatom.nim b/lib/wrappers/x11/xatom.nim
deleted file mode 100644
index b2e1dca91..000000000
--- a/lib/wrappers/x11/xatom.nim
+++ /dev/null
@@ -1,81 +0,0 @@
-#
-# THIS IS A GENERATED FILE
-#
-# Do not change!  Changing this file implies a protocol change!
-#
-
-import  
-  X
-
-const 
-  XA_PRIMARY* = TAtom(1)
-  XA_SECONDARY* = TAtom(2)
-  XA_ARC* = TAtom(3)
-  XA_ATOM* = TAtom(4)
-  XA_BITMAP* = TAtom(5)
-  XA_CARDINAL* = TAtom(6)
-  XA_COLORMAP* = TAtom(7)
-  XA_CURSOR* = TAtom(8)
-  XA_CUT_BUFFER0* = TAtom(9)
-  XA_CUT_BUFFER1* = TAtom(10)
-  XA_CUT_BUFFER2* = TAtom(11)
-  XA_CUT_BUFFER3* = TAtom(12)
-  XA_CUT_BUFFER4* = TAtom(13)
-  XA_CUT_BUFFER5* = TAtom(14)
-  XA_CUT_BUFFER6* = TAtom(15)
-  XA_CUT_BUFFER7* = TAtom(16)
-  XA_DRAWABLE* = TAtom(17)
-  XA_FONT* = TAtom(18)
-  XA_INTEGER* = TAtom(19)
-  XA_PIXMAP* = TAtom(20)
-  XA_POINT* = TAtom(21)
-  XA_RECTANGLE* = TAtom(22)
-  XA_RESOURCE_MANAGER* = TAtom(23)
-  XA_RGB_COLOR_MAP* = TAtom(24)
-  XA_RGB_BEST_MAP* = TAtom(25)
-  XA_RGB_BLUE_MAP* = TAtom(26)
-  XA_RGB_DEFAULT_MAP* = TAtom(27)
-  XA_RGB_GRAY_MAP* = TAtom(28)
-  XA_RGB_GREEN_MAP* = TAtom(29)
-  XA_RGB_RED_MAP* = TAtom(30)
-  XA_STRING* = TAtom(31)
-  XA_VISUALID* = TAtom(32)
-  XA_WINDOW* = TAtom(33)
-  XA_WM_COMMAND* = TAtom(34)
-  XA_WM_HINTS* = TAtom(35)
-  XA_WM_CLIENT_MACHINE* = TAtom(36)
-  XA_WM_ICON_NAME* = TAtom(37)
-  XA_WM_ICON_SIZE* = TAtom(38)
-  XA_WM_NAME* = TAtom(39)
-  XA_WM_NORMAL_HINTS* = TAtom(40)
-  XA_WM_SIZE_HINTS* = TAtom(41)
-  XA_WM_ZOOM_HINTS* = TAtom(42)
-  XA_MIN_SPACE* = TAtom(43)
-  XA_NORM_SPACE* = TAtom(44)
-  XA_MAX_SPACE* = TAtom(45)
-  XA_END_SPACE* = TAtom(46)
-  XA_SUPERSCRIPT_X* = TAtom(47)
-  XA_SUPERSCRIPT_Y* = TAtom(48)
-  XA_SUBSCRIPT_X* = TAtom(49)
-  XA_SUBSCRIPT_Y* = TAtom(50)
-  XA_UNDERLINE_POSITION* = TAtom(51)
-  XA_UNDERLINE_THICKNESS* = TAtom(52)
-  XA_STRIKEOUT_ASCENT* = TAtom(53)
-  XA_STRIKEOUT_DESCENT* = TAtom(54)
-  XA_ITALIC_ANGLE* = TAtom(55)
-  XA_X_HEIGHT* = TAtom(56)
-  XA_QUAD_WIDTH* = TAtom(57)
-  XA_WEIGHT* = TAtom(58)
-  XA_POINT_SIZE* = TAtom(59)
-  XA_RESOLUTION* = TAtom(60)
-  XA_COPYRIGHT* = TAtom(61)
-  XA_NOTICE* = TAtom(62)
-  XA_FONT_NAME* = TAtom(63)
-  XA_FAMILY_NAME* = TAtom(64)
-  XA_FULL_NAME* = TAtom(65)
-  XA_CAP_HEIGHT* = TAtom(66)
-  XA_WM_CLASS* = TAtom(67)
-  XA_WM_TRANSIENT_FOR* = TAtom(68)
-  XA_LAST_PREDEFINED* = TAtom(68)
-
-# implementation
diff --git a/lib/wrappers/x11/xcms.nim b/lib/wrappers/x11/xcms.nim
deleted file mode 100644
index 57aad6ae0..000000000
--- a/lib/wrappers/x11/xcms.nim
+++ /dev/null
@@ -1,396 +0,0 @@
-
-import 
-  x, xlib
-
-#const 
-#  libX11* = "X11" 
-
-#
-#  Automatically converted by H2Pas 0.99.15 from xcms.h
-#  The following command line parameters were used:
-#    -p
-#    -T
-#    -S
-#    -d
-#    -c
-#    xcms.h
-#
-
-const 
-  XcmsFailure* = 0
-  XcmsSuccess* = 1
-  XcmsSuccessWithCompression* = 2
-
-type 
-  PXcmsColorFormat* = ptr TXcmsColorFormat
-  TXcmsColorFormat* = int32
-
-proc XcmsUndefinedFormat*(): TXcmsColorFormat
-proc XcmsCIEXYZFormat*(): TXcmsColorFormat
-proc XcmsCIEuvYFormat*(): TXcmsColorFormat
-proc XcmsCIExyYFormat*(): TXcmsColorFormat
-proc XcmsCIELabFormat*(): TXcmsColorFormat
-proc XcmsCIELuvFormat*(): TXcmsColorFormat
-proc XcmsTekHVCFormat*(): TXcmsColorFormat
-proc XcmsRGBFormat*(): TXcmsColorFormat
-proc XcmsRGBiFormat*(): TXcmsColorFormat
-const 
-  XcmsInitNone* = 0x00000000
-  XcmsInitSuccess* = 0x00000001
-  XcmsInitFailure* = 0x000000FF
-
-when defined(MACROS): 
-  proc DisplayOfCCC*(ccc: int32): int32
-  proc ScreenNumberOfCCC*(ccc: int32): int32
-  proc VisualOfCCC*(ccc: int32): int32
-  proc ClientWhitePointOfCCC*(ccc: int32): int32
-  proc ScreenWhitePointOfCCC*(ccc: int32): int32
-  proc FunctionSetOfCCC*(ccc: int32): int32
-type 
-  PXcmsFloat* = ptr TXcmsFloat
-  TXcmsFloat* = float64
-  PXcmsRGB* = ptr TXcmsRGB
-  TXcmsRGB*{.final.} = object 
-    red*: int16
-    green*: int16
-    blue*: int16
-
-  PXcmsRGBi* = ptr TXcmsRGBi
-  TXcmsRGBi*{.final.} = object 
-    red*: TXcmsFloat
-    green*: TXcmsFloat
-    blue*: TXcmsFloat
-
-  PXcmsCIEXYZ* = ptr TXcmsCIEXYZ
-  TXcmsCIEXYZ*{.final.} = object 
-    X*: TXcmsFloat
-    Y*: TXcmsFloat
-    Z*: TXcmsFloat
-
-  PXcmsCIEuvY* = ptr TXcmsCIEuvY
-  TXcmsCIEuvY*{.final.} = object 
-    u_prime*: TXcmsFloat
-    v_prime*: TXcmsFloat
-    Y*: TXcmsFloat
-
-  PXcmsCIExyY* = ptr TXcmsCIExyY
-  TXcmsCIExyY*{.final.} = object 
-    x*: TXcmsFloat
-    y*: TXcmsFloat
-    theY*: TXcmsFloat
-
-  PXcmsCIELab* = ptr TXcmsCIELab
-  TXcmsCIELab*{.final.} = object 
-    L_star*: TXcmsFloat
-    a_star*: TXcmsFloat
-    b_star*: TXcmsFloat
-
-  PXcmsCIELuv* = ptr TXcmsCIELuv
-  TXcmsCIELuv*{.final.} = object 
-    L_star*: TXcmsFloat
-    u_star*: TXcmsFloat
-    v_star*: TXcmsFloat
-
-  PXcmsTekHVC* = ptr TXcmsTekHVC
-  TXcmsTekHVC*{.final.} = object 
-    H*: TXcmsFloat
-    V*: TXcmsFloat
-    C*: TXcmsFloat
-
-  PXcmsPad* = ptr TXcmsPad
-  TXcmsPad*{.final.} = object 
-    pad0*: TXcmsFloat
-    pad1*: TXcmsFloat
-    pad2*: TXcmsFloat
-    pad3*: TXcmsFloat
-
-  PXcmsColor* = ptr TXcmsColor
-  TXcmsColor*{.final.} = object  # spec : record
-                                 #            case longint of
-                                 #               0 : ( RGB : TXcmsRGB );
-                                 #               1 : ( RGBi : TXcmsRGBi );
-                                 #               2 : ( CIEXYZ : TXcmsCIEXYZ );
-                                 #               3 : ( CIEuvY : TXcmsCIEuvY );
-                                 #               4 : ( CIExyY : TXcmsCIExyY );
-                                 #               5 : ( CIELab : TXcmsCIELab );
-                                 #               6 : ( CIELuv : TXcmsCIELuv );
-                                 #               7 : ( TekHVC : TXcmsTekHVC );
-                                 #               8 : ( Pad : TXcmsPad ); 
-                                 #            end; 
-    pad*: TXcmsPad
-    pixel*: int32
-    format*: TXcmsColorFormat
-
-  PXcmsPerScrnInfo* = ptr TXcmsPerScrnInfo
-  TXcmsPerScrnInfo*{.final.} = object 
-    screenWhitePt*: TXcmsColor
-    functionSet*: TXPointer
-    screenData*: TXPointer
-    state*: int8
-    pad*: array[0..2, char]
-
-  PXcmsCCC* = ptr TXcmsCCC
-  TXcmsCompressionProc* = proc (para1: PXcmsCCC, para2: PXcmsColor, 
-                                para3: int32, para4: int32, para5: PBool): TStatus{.
-      cdecl.}
-  TXcmsWhiteAdjustProc* = proc (para1: PXcmsCCC, para2: PXcmsColor, 
-                                para3: PXcmsColor, para4: TXcmsColorFormat, 
-                                para5: PXcmsColor, para6: int32, para7: PBool): TStatus{.
-      cdecl.}
-  TXcmsCCC*{.final.} = object 
-    dpy*: PDisplay
-    screenNumber*: int32
-    visual*: PVisual
-    clientWhitePt*: TXcmsColor
-    gamutCompProc*: TXcmsCompressionProc
-    gamutCompClientData*: TXPointer
-    whitePtAdjProc*: TXcmsWhiteAdjustProc
-    whitePtAdjClientData*: TXPointer
-    pPerScrnInfo*: PXcmsPerScrnInfo
-
-  TXcmsCCCRec* = TXcmsCCC
-  PXcmsCCCRec* = ptr TXcmsCCCRec
-  TXcmsScreenInitProc* = proc (para1: PDisplay, para2: int32, 
-                               para3: PXcmsPerScrnInfo): TStatus{.cdecl.}
-  TXcmsScreenFreeProc* = proc (para1: TXPointer){.cdecl.}
-  TXcmsConversionProc* = proc (){.cdecl.}
-  PXcmsFuncListPtr* = ptr TXcmsFuncListPtr
-  TXcmsFuncListPtr* = TXcmsConversionProc
-  TXcmsParseStringProc* = proc (para1: cstring, para2: PXcmsColor): int32{.cdecl.}
-  PXcmsColorSpace* = ptr TXcmsColorSpace
-  TXcmsColorSpace*{.final.} = object 
-    prefix*: cstring
-    id*: TXcmsColorFormat
-    parseString*: TXcmsParseStringProc
-    to_CIEXYZ*: TXcmsFuncListPtr
-    from_CIEXYZ*: TXcmsFuncListPtr
-    inverse_flag*: int32
-
-  PXcmsFunctionSet* = ptr TXcmsFunctionSet
-  TXcmsFunctionSet*{.final.} = object  # error
-                                       #extern Status XcmsAddColorSpace (
-                                       #in declaration at line 323 
-    DDColorSpaces*: ptr PXcmsColorSpace
-    screenInitProc*: TXcmsScreenInitProc
-    screenFreeProc*: TXcmsScreenFreeProc
-
-
-proc XcmsAddFunctionSet*(para1: PXcmsFunctionSet): TStatus{.cdecl, 
-    dynlib: libX11, importc.}
-proc XcmsAllocColor*(para1: PDisplay, para2: TColormap, para3: PXcmsColor, 
-                     para4: TXcmsColorFormat): TStatus{.cdecl, dynlib: libX11, 
-    importc.}
-proc XcmsAllocNamedColor*(para1: PDisplay, para2: TColormap, para3: cstring, 
-                          para4: PXcmsColor, para5: PXcmsColor, 
-                          para6: TXcmsColorFormat): TStatus{.cdecl, 
-    dynlib: libX11, importc.}
-proc XcmsCCCOfColormap*(para1: PDisplay, para2: TColormap): TXcmsCCC{.cdecl, 
-    dynlib: libX11, importc.}
-proc XcmsCIELabClipab*(para1: TXcmsCCC, para2: PXcmsColor, para3: int32, 
-                       para4: int32, para5: PBool): TStatus{.cdecl, 
-    dynlib: libX11, importc.}
-proc XcmsCIELabClipL*(para1: TXcmsCCC, para2: PXcmsColor, para3: int32, 
-                      para4: int32, para5: PBool): TStatus{.cdecl, 
-    dynlib: libX11, importc.}
-proc XcmsCIELabClipLab*(para1: TXcmsCCC, para2: PXcmsColor, para3: int32, 
-                        para4: int32, para5: PBool): TStatus{.cdecl, 
-    dynlib: libX11, importc.}
-proc XcmsCIELabQueryMaxC*(para1: TXcmsCCC, para2: TXcmsFloat, para3: TXcmsFloat, 
-                          para4: PXcmsColor): TStatus{.cdecl, dynlib: libX11, 
-    importc.}
-proc XcmsCIELabQueryMaxL*(para1: TXcmsCCC, para2: TXcmsFloat, para3: TXcmsFloat, 
-                          para4: PXcmsColor): TStatus{.cdecl, dynlib: libX11, 
-    importc.}
-proc XcmsCIELabQueryMaxLC*(para1: TXcmsCCC, para2: TXcmsFloat, para3: PXcmsColor): TStatus{.
-    cdecl, dynlib: libX11, importc.}
-proc XcmsCIELabQueryMinL*(para1: TXcmsCCC, para2: TXcmsFloat, para3: TXcmsFloat, 
-                          para4: PXcmsColor): TStatus{.cdecl, dynlib: libX11, 
-    importc.}
-proc XcmsCIELabToCIEXYZ*(para1: TXcmsCCC, para2: PXcmsColor, para3: PXcmsColor, 
-                         para4: int32): TStatus{.cdecl, dynlib: libX11, importc.}
-proc XcmsCIELabWhiteShiftColors*(para1: TXcmsCCC, para2: PXcmsColor, 
-                                 para3: PXcmsColor, para4: TXcmsColorFormat, 
-                                 para5: PXcmsColor, para6: int32, para7: PBool): TStatus{.
-    cdecl, dynlib: libX11, importc.}
-proc XcmsCIELuvClipL*(para1: TXcmsCCC, para2: PXcmsColor, para3: int32, 
-                      para4: int32, para5: PBool): TStatus{.cdecl, 
-    dynlib: libX11, importc.}
-proc XcmsCIELuvClipLuv*(para1: TXcmsCCC, para2: PXcmsColor, para3: int32, 
-                        para4: int32, para5: PBool): TStatus{.cdecl, 
-    dynlib: libX11, importc.}
-proc XcmsCIELuvClipuv*(para1: TXcmsCCC, para2: PXcmsColor, para3: int32, 
-                       para4: int32, para5: PBool): TStatus{.cdecl, 
-    dynlib: libX11, importc.}
-proc XcmsCIELuvQueryMaxC*(para1: TXcmsCCC, para2: TXcmsFloat, para3: TXcmsFloat, 
-                          para4: PXcmsColor): TStatus{.cdecl, dynlib: libX11, 
-    importc.}
-proc XcmsCIELuvQueryMaxL*(para1: TXcmsCCC, para2: TXcmsFloat, para3: TXcmsFloat, 
-                          para4: PXcmsColor): TStatus{.cdecl, dynlib: libX11, 
-    importc.}
-proc XcmsCIELuvQueryMaxLC*(para1: TXcmsCCC, para2: TXcmsFloat, para3: PXcmsColor): TStatus{.
-    cdecl, dynlib: libX11, importc.}
-proc XcmsCIELuvQueryMinL*(para1: TXcmsCCC, para2: TXcmsFloat, para3: TXcmsFloat, 
-                          para4: PXcmsColor): TStatus{.cdecl, dynlib: libX11, 
-    importc.}
-proc XcmsCIELuvToCIEuvY*(para1: TXcmsCCC, para2: PXcmsColor, para3: PXcmsColor, 
-                         para4: int32): TStatus{.cdecl, dynlib: libX11, importc.}
-proc XcmsCIELuvWhiteShiftColors*(para1: TXcmsCCC, para2: PXcmsColor, 
-                                 para3: PXcmsColor, para4: TXcmsColorFormat, 
-                                 para5: PXcmsColor, para6: int32, para7: PBool): TStatus{.
-    cdecl, dynlib: libX11, importc.}
-proc XcmsCIEXYZToCIELab*(para1: TXcmsCCC, para2: PXcmsColor, para3: PXcmsColor, 
-                         para4: int32): TStatus{.cdecl, dynlib: libX11, importc.}
-proc XcmsCIEXYZToCIEuvY*(para1: TXcmsCCC, para2: PXcmsColor, para3: PXcmsColor, 
-                         para4: int32): TStatus{.cdecl, dynlib: libX11, importc.}
-proc XcmsCIEXYZToCIExyY*(para1: TXcmsCCC, para2: PXcmsColor, para3: PXcmsColor, 
-                         para4: int32): TStatus{.cdecl, dynlib: libX11, importc.}
-proc XcmsCIEXYZToRGBi*(para1: TXcmsCCC, para2: PXcmsColor, para3: int32, 
-                       para4: PBool): TStatus{.cdecl, dynlib: libX11, importc.}
-proc XcmsCIEuvYToCIELuv*(para1: TXcmsCCC, para2: PXcmsColor, para3: PXcmsColor, 
-                         para4: int32): TStatus{.cdecl, dynlib: libX11, importc.}
-proc XcmsCIEuvYToCIEXYZ*(para1: TXcmsCCC, para2: PXcmsColor, para3: PXcmsColor, 
-                         para4: int32): TStatus{.cdecl, dynlib: libX11, importc.}
-proc XcmsCIEuvYToTekHVC*(para1: TXcmsCCC, para2: PXcmsColor, para3: PXcmsColor, 
-                         para4: int32): TStatus{.cdecl, dynlib: libX11, importc.}
-proc XcmsCIExyYToCIEXYZ*(para1: TXcmsCCC, para2: PXcmsColor, para3: PXcmsColor, 
-                         para4: int32): TStatus{.cdecl, dynlib: libX11, importc.}
-proc XcmsClientWhitePointOfCCC*(para1: TXcmsCCC): PXcmsColor{.cdecl, 
-    dynlib: libX11, importc.}
-proc XcmsConvertColors*(para1: TXcmsCCC, para2: PXcmsColor, para3: int32, 
-                        para4: TXcmsColorFormat, para5: PBool): TStatus{.cdecl, 
-    dynlib: libX11, importc.}
-proc XcmsCreateCCC*(para1: PDisplay, para2: int32, para3: PVisual, 
-                    para4: PXcmsColor, para5: TXcmsCompressionProc, 
-                    para6: TXPointer, para7: TXcmsWhiteAdjustProc, 
-                    para8: TXPointer): TXcmsCCC{.cdecl, dynlib: libX11, importc.}
-proc XcmsDefaultCCC*(para1: PDisplay, para2: int32): TXcmsCCC{.cdecl, 
-    dynlib: libX11, importc.}
-proc XcmsDisplayOfCCC*(para1: TXcmsCCC): PDisplay{.cdecl, dynlib: libX11, 
-    importc.}
-proc XcmsFormatOfPrefix*(para1: cstring): TXcmsColorFormat{.cdecl, 
-    dynlib: libX11, importc.}
-proc XcmsFreeCCC*(para1: TXcmsCCC){.cdecl, dynlib: libX11, importc.}
-proc XcmsLookupColor*(para1: PDisplay, para2: TColormap, para3: cstring, 
-                      para4: PXcmsColor, para5: PXcmsColor, 
-                      para6: TXcmsColorFormat): TStatus{.cdecl, dynlib: libX11, 
-    importc.}
-proc XcmsPrefixOfFormat*(para1: TXcmsColorFormat): cstring{.cdecl, 
-    dynlib: libX11, importc.}
-proc XcmsQueryBlack*(para1: TXcmsCCC, para2: TXcmsColorFormat, para3: PXcmsColor): TStatus{.
-    cdecl, dynlib: libX11, importc.}
-proc XcmsQueryBlue*(para1: TXcmsCCC, para2: TXcmsColorFormat, para3: PXcmsColor): TStatus{.
-    cdecl, dynlib: libX11, importc.}
-proc XcmsQueryColor*(para1: PDisplay, para2: TColormap, para3: PXcmsColor, 
-                     para4: TXcmsColorFormat): TStatus{.cdecl, dynlib: libX11, 
-    importc.}
-proc XcmsQueryColors*(para1: PDisplay, para2: TColormap, para3: PXcmsColor, 
-                      para4: int32, para5: TXcmsColorFormat): TStatus{.cdecl, 
-    dynlib: libX11, importc.}
-proc XcmsQueryGreen*(para1: TXcmsCCC, para2: TXcmsColorFormat, para3: PXcmsColor): TStatus{.
-    cdecl, dynlib: libX11, importc.}
-proc XcmsQueryRed*(para1: TXcmsCCC, para2: TXcmsColorFormat, para3: PXcmsColor): TStatus{.
-    cdecl, dynlib: libX11, importc.}
-proc XcmsQueryWhite*(para1: TXcmsCCC, para2: TXcmsColorFormat, para3: PXcmsColor): TStatus{.
-    cdecl, dynlib: libX11, importc.}
-proc XcmsRGBiToCIEXYZ*(para1: TXcmsCCC, para2: PXcmsColor, para3: int32, 
-                       para4: PBool): TStatus{.cdecl, dynlib: libX11, importc.}
-proc XcmsRGBiToRGB*(para1: TXcmsCCC, para2: PXcmsColor, para3: int32, 
-                    para4: PBool): TStatus{.cdecl, dynlib: libX11, importc.}
-proc XcmsRGBToRGBi*(para1: TXcmsCCC, para2: PXcmsColor, para3: int32, 
-                    para4: PBool): TStatus{.cdecl, dynlib: libX11, importc.}
-proc XcmsScreenNumberOfCCC*(para1: TXcmsCCC): int32{.cdecl, dynlib: libX11, 
-    importc.}
-proc XcmsScreenWhitePointOfCCC*(para1: TXcmsCCC): PXcmsColor{.cdecl, 
-    dynlib: libX11, importc.}
-proc XcmsSetCCCOfColormap*(para1: PDisplay, para2: TColormap, para3: TXcmsCCC): TXcmsCCC{.
-    cdecl, dynlib: libX11, importc.}
-proc XcmsSetCompressionProc*(para1: TXcmsCCC, para2: TXcmsCompressionProc, 
-                             para3: TXPointer): TXcmsCompressionProc{.cdecl, 
-    dynlib: libX11, importc.}
-proc XcmsSetWhiteAdjustProc*(para1: TXcmsCCC, para2: TXcmsWhiteAdjustProc, 
-                             para3: TXPointer): TXcmsWhiteAdjustProc{.cdecl, 
-    dynlib: libX11, importc.}
-proc XcmsSetWhitePoint*(para1: TXcmsCCC, para2: PXcmsColor): TStatus{.cdecl, 
-    dynlib: libX11, importc.}
-proc XcmsStoreColor*(para1: PDisplay, para2: TColormap, para3: PXcmsColor): TStatus{.
-    cdecl, dynlib: libX11, importc.}
-proc XcmsStoreColors*(para1: PDisplay, para2: TColormap, para3: PXcmsColor, 
-                      para4: int32, para5: PBool): TStatus{.cdecl, 
-    dynlib: libX11, importc.}
-proc XcmsTekHVCClipC*(para1: TXcmsCCC, para2: PXcmsColor, para3: int32, 
-                      para4: int32, para5: PBool): TStatus{.cdecl, 
-    dynlib: libX11, importc.}
-proc XcmsTekHVCClipV*(para1: TXcmsCCC, para2: PXcmsColor, para3: int32, 
-                      para4: int32, para5: PBool): TStatus{.cdecl, 
-    dynlib: libX11, importc.}
-proc XcmsTekHVCClipVC*(para1: TXcmsCCC, para2: PXcmsColor, para3: int32, 
-                       para4: int32, para5: PBool): TStatus{.cdecl, 
-    dynlib: libX11, importc.}
-proc XcmsTekHVCQueryMaxC*(para1: TXcmsCCC, para2: TXcmsFloat, para3: TXcmsFloat, 
-                          para4: PXcmsColor): TStatus{.cdecl, dynlib: libX11, 
-    importc.}
-proc XcmsTekHVCQueryMaxV*(para1: TXcmsCCC, para2: TXcmsFloat, para3: TXcmsFloat, 
-                          para4: PXcmsColor): TStatus{.cdecl, dynlib: libX11, 
-    importc.}
-proc XcmsTekHVCQueryMaxVC*(para1: TXcmsCCC, para2: TXcmsFloat, para3: PXcmsColor): TStatus{.
-    cdecl, dynlib: libX11, importc.}
-proc XcmsTekHVCQueryMaxVSamples*(para1: TXcmsCCC, para2: TXcmsFloat, 
-                                 para3: PXcmsColor, para4: int32): TStatus{.
-    cdecl, dynlib: libX11, importc.}
-proc XcmsTekHVCQueryMinV*(para1: TXcmsCCC, para2: TXcmsFloat, para3: TXcmsFloat, 
-                          para4: PXcmsColor): TStatus{.cdecl, dynlib: libX11, 
-    importc.}
-proc XcmsTekHVCToCIEuvY*(para1: TXcmsCCC, para2: PXcmsColor, para3: PXcmsColor, 
-                         para4: int32): TStatus{.cdecl, dynlib: libX11, importc.}
-proc XcmsTekHVCWhiteShiftColors*(para1: TXcmsCCC, para2: PXcmsColor, 
-                                 para3: PXcmsColor, para4: TXcmsColorFormat, 
-                                 para5: PXcmsColor, para6: int32, para7: PBool): TStatus{.
-    cdecl, dynlib: libX11, importc.}
-proc XcmsVisualOfCCC*(para1: TXcmsCCC): PVisual{.cdecl, dynlib: libX11, importc.}
-# implementation
-
-proc XcmsUndefinedFormat(): TXcmsColorFormat = 
-  result = 0x00000000'i32
-
-proc XcmsCIEXYZFormat(): TXcmsColorFormat = 
-  result = 0x00000001'i32
-
-proc XcmsCIEuvYFormat(): TXcmsColorFormat = 
-  result = 0x00000002'i32
-
-proc XcmsCIExyYFormat(): TXcmsColorFormat = 
-  result = 0x00000003'i32
-
-proc XcmsCIELabFormat(): TXcmsColorFormat = 
-  result = 0x00000004'i32
-
-proc XcmsCIELuvFormat(): TXcmsColorFormat = 
-  result = 0x00000005'i32
-
-proc XcmsTekHVCFormat(): TXcmsColorFormat = 
-  result = 0x00000006'i32
-
-proc XcmsRGBFormat(): TXcmsColorFormat = 
-  result = 0x80000000'i32
-
-proc XcmsRGBiFormat(): TXcmsColorFormat = 
-  result = 0x80000001'i32
-
-when defined(MACROS): 
-  proc DisplayOfCCC(ccc: int32): int32 = 
-    result = ccc.dpy
-
-  proc ScreenNumberOfCCC(ccc: int32): int32 = 
-    result = ccc.screenNumber
-
-  proc VisualOfCCC(ccc: int32): int32 = 
-    result = ccc.visual
-
-  proc ClientWhitePointOfCCC(ccc: int32): int32 = 
-    result = addr(ccc.clientWhitePt)
-
-  proc ScreenWhitePointOfCCC(ccc: int32): int32 = 
-    result = addr(ccc.pPerScrnInfo.screenWhitePt)
-
-  proc FunctionSetOfCCC(ccc: int32): int32 = 
-    result = ccc.pPerScrnInfo.functionSet
diff --git a/lib/wrappers/x11/xf86dga.nim b/lib/wrappers/x11/xf86dga.nim
deleted file mode 100644
index 376f11861..000000000
--- a/lib/wrappers/x11/xf86dga.nim
+++ /dev/null
@@ -1,235 +0,0 @@
-#
-#   Copyright (c) 1999  XFree86 Inc
-#
-# $XFree86: xc/include/extensions/xf86dga.h,v 3.20 1999/10/13 04:20:48 dawes Exp $ 
-
-import 
-  x, xlib
-
-const 
-  libXxf86dga* = "libXxf86dga.so"
-
-#type 
-#  cfloat* = float32
-
-# $XFree86: xc/include/extensions/xf86dga1.h,v 1.2 1999/04/17 07:05:41 dawes Exp $ 
-#
-#
-#Copyright (c) 1995  Jon Tombs
-#Copyright (c) 1995  XFree86 Inc
-#
-#
-#************************************************************************
-#
-#   THIS IS THE OLD DGA API AND IS OBSOLETE.  PLEASE DO NOT USE IT ANYMORE
-#
-#************************************************************************
-
-type 
-  PPcchar* = ptr ptr cstring
-
-const 
-  X_XF86DGAQueryVersion* = 0
-  X_XF86DGAGetVideoLL* = 1
-  X_XF86DGADirectVideo* = 2
-  X_XF86DGAGetViewPortSize* = 3
-  X_XF86DGASetViewPort* = 4
-  X_XF86DGAGetVidPage* = 5
-  X_XF86DGASetVidPage* = 6
-  X_XF86DGAInstallColormap* = 7
-  X_XF86DGAQueryDirectVideo* = 8
-  X_XF86DGAViewPortChanged* = 9
-  XF86DGADirectPresent* = 0x00000001
-  XF86DGADirectGraphics* = 0x00000002
-  XF86DGADirectMouse* = 0x00000004
-  XF86DGADirectKeyb* = 0x00000008
-  XF86DGAHasColormap* = 0x00000100
-  XF86DGADirectColormap* = 0x00000200
-
-proc XF86DGAQueryVersion*(dpy: PDisplay, majorVersion: Pcint, 
-                          minorVersion: Pcint): TBool{.CDecl, 
-    dynlib: libXxf86dga, importc.}
-proc XF86DGAQueryExtension*(dpy: PDisplay, event_base: Pcint, error_base: Pcint): TBool{.
-    CDecl, dynlib: libXxf86dga, importc.}
-proc XF86DGAGetVideoLL*(dpy: PDisplay, screen: cint, base_addr: Pcint, 
-                        width: Pcint, bank_size: Pcint, ram_size: Pcint): TStatus{.
-    CDecl, dynlib: libXxf86dga, importc.}
-proc XF86DGAGetVideo*(dpy: PDisplay, screen: cint, base_addr: PPcchar, 
-                      width: Pcint, bank_size: Pcint, ram_size: Pcint): TStatus{.
-    CDecl, dynlib: libXxf86dga, importc.}
-proc XF86DGADirectVideo*(dpy: PDisplay, screen: cint, enable: cint): TStatus{.
-    CDecl, dynlib: libXxf86dga, importc.}
-proc XF86DGADirectVideoLL*(dpy: PDisplay, screen: cint, enable: cint): TStatus{.
-    CDecl, dynlib: libXxf86dga, importc.}
-proc XF86DGAGetViewPortSize*(dpy: PDisplay, screen: cint, width: Pcint, 
-                             height: Pcint): TStatus{.CDecl, 
-    dynlib: libXxf86dga, importc.}
-proc XF86DGASetViewPort*(dpy: PDisplay, screen: cint, x: cint, y: cint): TStatus{.
-    CDecl, dynlib: libXxf86dga, importc.}
-proc XF86DGAGetVidPage*(dpy: PDisplay, screen: cint, vid_page: Pcint): TStatus{.
-    CDecl, dynlib: libXxf86dga, importc.}
-proc XF86DGASetVidPage*(dpy: PDisplay, screen: cint, vid_page: cint): TStatus{.
-    CDecl, dynlib: libXxf86dga, importc.}
-proc XF86DGAInstallColormap*(dpy: PDisplay, screen: cint, Colormap: TColormap): TStatus{.
-    CDecl, dynlib: libXxf86dga, importc.}
-proc XF86DGAForkApp*(screen: cint): cint{.CDecl, dynlib: libXxf86dga, importc.}
-proc XF86DGAQueryDirectVideo*(dpy: PDisplay, screen: cint, flags: Pcint): TStatus{.
-    CDecl, dynlib: libXxf86dga, importc.}
-proc XF86DGAViewPortChanged*(dpy: PDisplay, screen: cint, n: cint): TBool{.
-    CDecl, dynlib: libXxf86dga, importc.}
-const 
-  X_XDGAQueryVersion* = 0     # 1 through 9 are in xf86dga1.pp 
-                              # 10 and 11 are reserved to avoid conflicts with rogue DGA extensions 
-  X_XDGAQueryModes* = 12
-  X_XDGASetMode* = 13
-  X_XDGASetViewport* = 14
-  X_XDGAInstallColormap* = 15
-  X_XDGASelectInput* = 16
-  X_XDGAFillRectangle* = 17
-  X_XDGACopyArea* = 18
-  X_XDGACopyTransparentArea* = 19
-  X_XDGAGetViewportStatus* = 20
-  X_XDGASync* = 21
-  X_XDGAOpenFramebuffer* = 22
-  X_XDGACloseFramebuffer* = 23
-  X_XDGASetClientVersion* = 24
-  X_XDGAChangePixmapMode* = 25
-  X_XDGACreateColormap* = 26
-  XDGAConcurrentAccess* = 0x00000001
-  XDGASolidFillRect* = 0x00000002
-  XDGABlitRect* = 0x00000004
-  XDGABlitTransRect* = 0x00000008
-  XDGAPixmap* = 0x00000010
-  XDGAInterlaced* = 0x00010000
-  XDGADoublescan* = 0x00020000
-  XDGAFlipImmediate* = 0x00000001
-  XDGAFlipRetrace* = 0x00000002
-  XDGANeedRoot* = 0x00000001
-  XF86DGANumberEvents* = 7
-  XDGAPixmapModeLarge* = 0
-  XDGAPixmapModeSmall* = 1
-  XF86DGAClientNotLocal* = 0
-  XF86DGANoDirectVideoMode* = 1
-  XF86DGAScreenNotActive* = 2
-  XF86DGADirectNotActivated* = 3
-  XF86DGAOperationNotSupported* = 4
-  XF86DGANumberErrors* = (XF86DGAOperationNotSupported + 1)
-
-type 
-  PXDGAMode* = ptr TXDGAMode
-  TXDGAMode*{.final.} = object 
-    num*: cint                # A unique identifier for the mode (num > 0) 
-    name*: cstring            # name of mode given in the XF86Config 
-    verticalRefresh*: cfloat
-    flags*: cint              # DGA_CONCURRENT_ACCESS, etc... 
-    imageWidth*: cint         # linear accessible portion (pixels) 
-    imageHeight*: cint
-    pixmapWidth*: cint        # Xlib accessible portion (pixels) 
-    pixmapHeight*: cint       # both fields ignored if no concurrent access 
-    bytesPerScanline*: cint
-    byteOrder*: cint          # MSBFirst, LSBFirst 
-    depth*: cint
-    bitsPerPixel*: cint
-    redMask*: culong
-    greenMask*: culong
-    blueMask*: culong
-    visualClass*: cshort
-    viewportWidth*: cint
-    viewportHeight*: cint
-    xViewportStep*: cint      # viewport position granularity 
-    yViewportStep*: cint
-    maxViewportX*: cint       # max viewport origin 
-    maxViewportY*: cint
-    viewportFlags*: cint      # types of page flipping possible 
-    reserved1*: cint
-    reserved2*: cint
-
-  PXDGADevice* = ptr TXDGADevice
-  TXDGADevice*{.final.} = object 
-    mode*: TXDGAMode
-    data*: Pcuchar
-    pixmap*: TPixmap
-
-  PXDGAButtonEvent* = ptr TXDGAButtonEvent
-  TXDGAButtonEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    display*: PDisplay
-    screen*: cint
-    time*: TTime
-    state*: cuint
-    button*: cuint
-
-  PXDGAKeyEvent* = ptr TXDGAKeyEvent
-  TXDGAKeyEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    display*: PDisplay
-    screen*: cint
-    time*: TTime
-    state*: cuint
-    keycode*: cuint
-
-  PXDGAMotionEvent* = ptr TXDGAMotionEvent
-  TXDGAMotionEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    display*: PDisplay
-    screen*: cint
-    time*: TTime
-    state*: cuint
-    dx*: cint
-    dy*: cint
-
-  PXDGAEvent* = ptr TXDGAEvent
-  TXDGAEvent*{.final.} = object 
-    pad*: array[0..23, clong] # sorry you have to cast if you want access
-                              #Case LongInt Of
-                              #      0 : (_type : cint);
-                              #      1 : (xbutton : TXDGAButtonEvent);
-                              #      2 : (xkey : TXDGAKeyEvent);
-                              #      3 : (xmotion : TXDGAMotionEvent);
-                              #      4 : (pad : Array[0..23] Of clong);
-  
-
-proc XDGAQueryExtension*(dpy: PDisplay, eventBase: Pcint, erroBase: Pcint): TBool{.
-    CDecl, dynlib: libXxf86dga, importc.}
-proc XDGAQueryVersion*(dpy: PDisplay, majorVersion: Pcint, minorVersion: Pcint): TBool{.
-    CDecl, dynlib: libXxf86dga, importc.}
-proc XDGAQueryModes*(dpy: PDisplay, screen: cint, num: Pcint): PXDGAMode{.CDecl, 
-    dynlib: libXxf86dga, importc.}
-proc XDGASetMode*(dpy: PDisplay, screen: cint, mode: cint): PXDGADevice{.CDecl, 
-    dynlib: libXxf86dga, importc.}
-proc XDGAOpenFramebuffer*(dpy: PDisplay, screen: cint): TBool{.CDecl, 
-    dynlib: libXxf86dga, importc.}
-proc XDGACloseFramebuffer*(dpy: PDisplay, screen: cint){.CDecl, 
-    dynlib: libXxf86dga, importc.}
-proc XDGASetViewport*(dpy: PDisplay, screen: cint, x: cint, y: cint, flags: cint){.
-    CDecl, dynlib: libXxf86dga, importc.}
-proc XDGAInstallColormap*(dpy: PDisplay, screen: cint, cmap: TColormap){.CDecl, 
-    dynlib: libXxf86dga, importc.}
-proc XDGACreateColormap*(dpy: PDisplay, screen: cint, device: PXDGADevice, 
-                         alloc: cint): TColormap{.CDecl, dynlib: libXxf86dga, 
-    importc.}
-proc XDGASelectInput*(dpy: PDisplay, screen: cint, event_mask: clong){.CDecl, 
-    dynlib: libXxf86dga, importc.}
-proc XDGAFillRectangle*(dpy: PDisplay, screen: cint, x: cint, y: cint, 
-                        width: cuint, height: cuint, color: culong){.CDecl, 
-    dynlib: libXxf86dga, importc.}
-proc XDGACopyArea*(dpy: PDisplay, screen: cint, srcx: cint, srcy: cint, 
-                   width: cuint, height: cuint, dstx: cint, dsty: cint){.CDecl, 
-    dynlib: libXxf86dga, importc.}
-proc XDGACopyTransparentArea*(dpy: PDisplay, screen: cint, srcx: cint, 
-                              srcy: cint, width: cuint, height: cuint, 
-                              dstx: cint, dsty: cint, key: culong){.CDecl, 
-    dynlib: libXxf86dga, importc.}
-proc XDGAGetViewportStatus*(dpy: PDisplay, screen: cint): cint{.CDecl, 
-    dynlib: libXxf86dga, importc.}
-proc XDGASync*(dpy: PDisplay, screen: cint){.CDecl, dynlib: libXxf86dga, importc.}
-proc XDGASetClientVersion*(dpy: PDisplay): TBool{.CDecl, dynlib: libXxf86dga, 
-    importc.}
-proc XDGAChangePixmapMode*(dpy: PDisplay, screen: cint, x: Pcint, y: Pcint, 
-                           mode: cint){.CDecl, dynlib: libXxf86dga, importc.}
-proc XDGAKeyEventToXKeyEvent*(dk: PXDGAKeyEvent, xk: PXKeyEvent){.CDecl, 
-    dynlib: libXxf86dga, importc.}
-# implementation
diff --git a/lib/wrappers/x11/xf86vmode.nim b/lib/wrappers/x11/xf86vmode.nim
deleted file mode 100644
index 18a922cab..000000000
--- a/lib/wrappers/x11/xf86vmode.nim
+++ /dev/null
@@ -1,229 +0,0 @@
-# $XFree86: xc/include/extensions/xf86vmode.h,v 3.30 2001/05/07 20:09:50 mvojkovi Exp $ 
-#
-#
-#Copyright 1995  Kaleb S. KEITHLEY
-#
-#Permission is hereby granted, free of charge, to any person obtaining
-#a copy of this software and associated documentation files (the
-#"Software"), to deal in the Software without restriction, including
-#without limitation the rights to use, copy, modify, merge, publish,
-#distribute, sublicense, and/or sell copies of the Software, and to
-#permit persons to whom the Software is furnished to do so, subject to
-#the following conditions:
-#
-#The above copyright notice and this permission notice shall be
-#included in all copies or substantial portions of the Software.
-#
-#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-#EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-#MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-#IN NO EVENT SHALL Kaleb S. KEITHLEY BE LIABLE FOR ANY CLAIM, DAMAGES 
-#OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-#ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-#OTHER DEALINGS IN THE SOFTWARE.
-#
-#Except as contained in this notice, the name of Kaleb S. KEITHLEY 
-#shall not be used in advertising or otherwise to promote the sale, use 
-#or other dealings in this Software without prior written authorization
-#from Kaleb S. KEITHLEY
-#
-#
-# $Xorg: xf86vmode.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ 
-# THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION 
-
-import 
-  x, xlib
-
-const 
-  libXxf86vm* = "libXxf86vm.so"
-
-type 
-  PINT32* = ptr int32
-
-const 
-  X_XF86VidModeQueryVersion* = 0
-  X_XF86VidModeGetModeLine* = 1
-  X_XF86VidModeModModeLine* = 2
-  X_XF86VidModeSwitchMode* = 3
-  X_XF86VidModeGetMonitor* = 4
-  X_XF86VidModeLockModeSwitch* = 5
-  X_XF86VidModeGetAllModeLines* = 6
-  X_XF86VidModeAddModeLine* = 7
-  X_XF86VidModeDeleteModeLine* = 8
-  X_XF86VidModeValidateModeLine* = 9
-  X_XF86VidModeSwitchToMode* = 10
-  X_XF86VidModeGetViewPort* = 11
-  X_XF86VidModeSetViewPort* = 12 # new for version 2.x of this extension 
-  X_XF86VidModeGetDotClocks* = 13
-  X_XF86VidModeSetClientVersion* = 14
-  X_XF86VidModeSetGamma* = 15
-  X_XF86VidModeGetGamma* = 16
-  X_XF86VidModeGetGammaRamp* = 17
-  X_XF86VidModeSetGammaRamp* = 18
-  X_XF86VidModeGetGammaRampSize* = 19
-  X_XF86VidModeGetPermissions* = 20
-  CLKFLAG_PROGRAMABLE* = 1
-
-when defined(XF86VIDMODE_EVENTS): 
-  const 
-    XF86VidModeNotify* = 0
-    XF86VidModeNumberEvents* = (XF86VidModeNotify + 1)
-    XF86VidModeNotifyMask* = 0x00000001
-    XF86VidModeNonEvent* = 0
-    XF86VidModeModeChange* = 1
-else: 
-  const 
-    XF86VidModeNumberEvents* = 0
-const 
-  XF86VidModeBadClock* = 0
-  XF86VidModeBadHTimings* = 1
-  XF86VidModeBadVTimings* = 2
-  XF86VidModeModeUnsuitable* = 3
-  XF86VidModeExtensionDisabled* = 4
-  XF86VidModeClientNotLocal* = 5
-  XF86VidModeZoomLocked* = 6
-  XF86VidModeNumberErrors* = (XF86VidModeZoomLocked + 1)
-  XF86VM_READ_PERMISSION* = 1
-  XF86VM_WRITE_PERMISSION* = 2
-
-type 
-  PXF86VidModeModeLine* = ptr TXF86VidModeModeLine
-  TXF86VidModeModeLine*{.final.} = object 
-    hdisplay*: cushort
-    hsyncstart*: cushort
-    hsyncend*: cushort
-    htotal*: cushort
-    hskew*: cushort
-    vdisplay*: cushort
-    vsyncstart*: cushort
-    vsyncend*: cushort
-    vtotal*: cushort
-    flags*: cuint
-    privsize*: cint
-    c_private*: PINT32
-
-  PPPXF86VidModeModeInfo* = ptr PPXF86VidModeModeInfo
-  PPXF86VidModeModeInfo* = ptr PXF86VidModeModeInfo
-  PXF86VidModeModeInfo* = ptr TXF86VidModeModeInfo
-  TXF86VidModeModeInfo*{.final.} = object 
-    dotclock*: cuint
-    hdisplay*: cushort
-    hsyncstart*: cushort
-    hsyncend*: cushort
-    htotal*: cushort
-    hskew*: cushort
-    vdisplay*: cushort
-    vsyncstart*: cushort
-    vsyncend*: cushort
-    vtotal*: cushort
-    flags*: cuint
-    privsize*: cint
-    c_private*: PINT32
-
-  PXF86VidModeSyncRange* = ptr TXF86VidModeSyncRange
-  TXF86VidModeSyncRange*{.final.} = object 
-    hi*: cfloat
-    lo*: cfloat
-
-  PXF86VidModeMonitor* = ptr TXF86VidModeMonitor
-  TXF86VidModeMonitor*{.final.} = object 
-    vendor*: cstring
-    model*: cstring
-    EMPTY*: cfloat
-    nhsync*: cuchar
-    hsync*: PXF86VidModeSyncRange
-    nvsync*: cuchar
-    vsync*: PXF86VidModeSyncRange
-
-  PXF86VidModeNotifyEvent* = ptr TXF86VidModeNotifyEvent
-  TXF86VidModeNotifyEvent*{.final.} = object 
-    theType*: cint            # of event 
-    serial*: culong           # # of last request processed by server 
-    send_event*: TBool        # true if this came from a SendEvent req 
-    display*: PDisplay        # Display the event was read from 
-    root*: TWindow            # root window of event screen 
-    state*: cint              # What happened 
-    kind*: cint               # What happened 
-    forced*: TBool            # extents of new region 
-    time*: TTime              # event timestamp 
-  
-  PXF86VidModeGamma* = ptr TXF86VidModeGamma
-  TXF86VidModeGamma*{.final.} = object 
-    red*: cfloat              # Red Gamma value 
-    green*: cfloat            # Green Gamma value 
-    blue*: cfloat             # Blue Gamma value 
-  
-
-when defined(MACROS): 
-  proc XF86VidModeSelectNextMode*(disp: PDisplay, scr: cint): TBool
-  proc XF86VidModeSelectPrevMode*(disp: PDisplay, scr: cint): TBool
-proc XF86VidModeQueryVersion*(dpy: PDisplay, majorVersion: Pcint, 
-                              minorVersion: Pcint): TBool{.CDecl, 
-    dynlib: libXxf86vm, importc.}
-proc XF86VidModeQueryExtension*(dpy: PDisplay, event_base: Pcint, 
-                                error_base: Pcint): TBool{.CDecl, 
-    dynlib: libXxf86vm, importc.}
-proc XF86VidModeSetClientVersion*(dpy: PDisplay): TBool{.CDecl, 
-    dynlib: libXxf86vm, importc.}
-proc XF86VidModeGetModeLine*(dpy: PDisplay, screen: cint, dotclock: Pcint, 
-                             modeline: PXF86VidModeModeLine): TBool{.CDecl, 
-    dynlib: libXxf86vm, importc.}
-proc XF86VidModeGetAllModeLines*(dpy: PDisplay, screen: cint, modecount: Pcint, 
-                                 modelinesPtr: PPPXF86VidModeModeInfo): TBool{.
-    CDecl, dynlib: libXxf86vm, importc.}
-proc XF86VidModeAddModeLine*(dpy: PDisplay, screen: cint, 
-                             new_modeline: PXF86VidModeModeInfo, 
-                             after_modeline: PXF86VidModeModeInfo): TBool{.
-    CDecl, dynlib: libXxf86vm, importc.}
-proc XF86VidModeDeleteModeLine*(dpy: PDisplay, screen: cint, 
-                                modeline: PXF86VidModeModeInfo): TBool{.CDecl, 
-    dynlib: libXxf86vm, importc.}
-proc XF86VidModeModModeLine*(dpy: PDisplay, screen: cint, 
-                             modeline: PXF86VidModeModeLine): TBool{.CDecl, 
-    dynlib: libXxf86vm, importc.}
-proc XF86VidModeValidateModeLine*(dpy: PDisplay, screen: cint, 
-                                  modeline: PXF86VidModeModeInfo): TStatus{.
-    CDecl, dynlib: libXxf86vm, importc.}
-proc XF86VidModeSwitchMode*(dpy: PDisplay, screen: cint, zoom: cint): TBool{.
-    CDecl, dynlib: libXxf86vm, importc.}
-proc XF86VidModeSwitchToMode*(dpy: PDisplay, screen: cint, 
-                              modeline: PXF86VidModeModeInfo): TBool{.CDecl, 
-    dynlib: libXxf86vm, importc.}
-proc XF86VidModeLockModeSwitch*(dpy: PDisplay, screen: cint, lock: cint): TBool{.
-    CDecl, dynlib: libXxf86vm, importc.}
-proc XF86VidModeGetMonitor*(dpy: PDisplay, screen: cint, 
-                            monitor: PXF86VidModeMonitor): TBool{.CDecl, 
-    dynlib: libXxf86vm, importc.}
-proc XF86VidModeGetViewPort*(dpy: PDisplay, screen: cint, x_return: Pcint, 
-                             y_return: Pcint): TBool{.CDecl, dynlib: libXxf86vm, 
-    importc.}
-proc XF86VidModeSetViewPort*(dpy: PDisplay, screen: cint, x: cint, y: cint): TBool{.
-    CDecl, dynlib: libXxf86vm, importc.}
-proc XF86VidModeGetDotClocks*(dpy: PDisplay, screen: cint, flags_return: Pcint, 
-                              number_of_clocks_return: Pcint, 
-                              max_dot_clock_return: Pcint, clocks_return: PPcint): TBool{.
-    CDecl, dynlib: libXxf86vm, importc.}
-proc XF86VidModeGetGamma*(dpy: PDisplay, screen: cint, Gamma: PXF86VidModeGamma): TBool{.
-    CDecl, dynlib: libXxf86vm, importc.}
-proc XF86VidModeSetGamma*(dpy: PDisplay, screen: cint, Gamma: PXF86VidModeGamma): TBool{.
-    CDecl, dynlib: libXxf86vm, importc.}
-proc XF86VidModeSetGammaRamp*(dpy: PDisplay, screen: cint, size: cint, 
-                              red_array: Pcushort, green_array: Pcushort, 
-                              blue_array: Pcushort): TBool{.CDecl, 
-    dynlib: libXxf86vm, importc.}
-proc XF86VidModeGetGammaRamp*(dpy: PDisplay, screen: cint, size: cint, 
-                              red_array: Pcushort, green_array: Pcushort, 
-                              blue_array: Pcushort): TBool{.CDecl, 
-    dynlib: libXxf86vm, importc.}
-proc XF86VidModeGetGammaRampSize*(dpy: PDisplay, screen: cint, size: Pcint): TBool{.
-    CDecl, dynlib: libXxf86vm, importc.}
-proc XF86VidModeGetPermissions*(dpy: PDisplay, screen: cint, permissions: Pcint): TBool{.
-    CDecl, dynlib: libXxf86vm, importc.}
-# implementation
-
-when defined(MACROS): 
-  proc XF86VidModeSelectNextMode(disp: PDisplay, scr: cint): TBool = 
-    XF86VidModeSelectNextMode = XF86VidModeSwitchMode(disp, scr, 1)
-
-  proc XF86VidModeSelectPrevMode(disp: PDisplay, scr: cint): TBool = 
-    XF86VidModeSelectPrevMode = XF86VidModeSwitchMode(disp, scr, - 1)
diff --git a/lib/wrappers/x11/xi.nim b/lib/wrappers/x11/xi.nim
deleted file mode 100644
index d1b9f7846..000000000
--- a/lib/wrappers/x11/xi.nim
+++ /dev/null
@@ -1,307 +0,0 @@
-#
-# $Xorg: XI.h,v 1.4 2001/02/09 02:03:23 xorgcvs Exp $
-#
-#************************************************************
-#
-#Copyright 1989, 1998  The Open Group
-#
-#Permission to use, copy, modify, distribute, and sell this software and its
-#documentation for any purpose is hereby granted without fee, provided that
-#the above copyright notice appear in all copies and that both that
-#copyright notice and this permission notice appear in supporting
-#documentation.
-#
-#The above copyright notice and this permission notice shall be included in
-#all copies or substantial portions of the Software.
-#
-#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-#OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-#AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-#CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-#Except as contained in this notice, the name of The Open Group shall not be
-#used in advertising or otherwise to promote the sale, use or other dealings
-#in this Software without prior written authorization from The Open Group.
-#
-#Copyright 1989 by Hewlett-Packard Company, Palo Alto, California.
-#
-#                        All Rights Reserved
-#
-#Permission to use, copy, modify, and distribute this software and its
-#documentation for any purpose and without fee is hereby granted,
-#provided that the above copyright notice appear in all copies and that
-#both that copyright notice and this permission notice appear in
-#supporting documentation, and that the name of Hewlett-Packard not be
-#used in advertising or publicity pertaining to distribution of the
-#software without specific, written prior permission.
-#
-#HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-#ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-#HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-#ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-#WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-#ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-#SOFTWARE.
-#
-#********************************************************/
-# $XFree86: xc/include/extensions/XI.h,v 1.5 2001/12/14 19:53:28 dawes Exp $
-#
-# Definitions used by the server, library and client
-#
-#        Pascal Convertion was made by Ido Kannner - kanerido@actcom.net.il
-#
-#Histroy:
-#        2004/10/15 - Fixed a bug of accessing second based records by removing "paced record" and chnaged it to
-#                     "reocrd" only.
-#        2004/10/07 - Removed the "uses X;" line. The unit does not need it.
-#        2004/10/03 - Conversion from C header to Pascal unit.
-#
-
-const 
-  sz_xGetExtensionVersionReq* = 8
-  sz_xGetExtensionVersionReply* = 32
-  sz_xListInputDevicesReq* = 4
-  sz_xListInputDevicesReply* = 32
-  sz_xOpenDeviceReq* = 8
-  sz_xOpenDeviceReply* = 32
-  sz_xCloseDeviceReq* = 8
-  sz_xSetDeviceModeReq* = 8
-  sz_xSetDeviceModeReply* = 32
-  sz_xSelectExtensionEventReq* = 12
-  sz_xGetSelectedExtensionEventsReq* = 8
-  sz_xGetSelectedExtensionEventsReply* = 32
-  sz_xChangeDeviceDontPropagateListReq* = 12
-  sz_xGetDeviceDontPropagateListReq* = 8
-  sz_xGetDeviceDontPropagateListReply* = 32
-  sz_xGetDeviceMotionEventsReq* = 16
-  sz_xGetDeviceMotionEventsReply* = 32
-  sz_xChangeKeyboardDeviceReq* = 8
-  sz_xChangeKeyboardDeviceReply* = 32
-  sz_xChangePointerDeviceReq* = 8
-  sz_xChangePointerDeviceReply* = 32
-  sz_xGrabDeviceReq* = 20
-  sz_xGrabDeviceReply* = 32
-  sz_xUngrabDeviceReq* = 12
-  sz_xGrabDeviceKeyReq* = 20
-  sz_xGrabDeviceKeyReply* = 32
-  sz_xUngrabDeviceKeyReq* = 16
-  sz_xGrabDeviceButtonReq* = 20
-  sz_xGrabDeviceButtonReply* = 32
-  sz_xUngrabDeviceButtonReq* = 16
-  sz_xAllowDeviceEventsReq* = 12
-  sz_xGetDeviceFocusReq* = 8
-  sz_xGetDeviceFocusReply* = 32
-  sz_xSetDeviceFocusReq* = 16
-  sz_xGetFeedbackControlReq* = 8
-  sz_xGetFeedbackControlReply* = 32
-  sz_xChangeFeedbackControlReq* = 12
-  sz_xGetDeviceKeyMappingReq* = 8
-  sz_xGetDeviceKeyMappingReply* = 32
-  sz_xChangeDeviceKeyMappingReq* = 8
-  sz_xGetDeviceModifierMappingReq* = 8
-  sz_xSetDeviceModifierMappingReq* = 8
-  sz_xSetDeviceModifierMappingReply* = 32
-  sz_xGetDeviceButtonMappingReq* = 8
-  sz_xGetDeviceButtonMappingReply* = 32
-  sz_xSetDeviceButtonMappingReq* = 8
-  sz_xSetDeviceButtonMappingReply* = 32
-  sz_xQueryDeviceStateReq* = 8
-  sz_xQueryDeviceStateReply* = 32
-  sz_xSendExtensionEventReq* = 16
-  sz_xDeviceBellReq* = 8
-  sz_xSetDeviceValuatorsReq* = 8
-  sz_xSetDeviceValuatorsReply* = 32
-  sz_xGetDeviceControlReq* = 8
-  sz_xGetDeviceControlReply* = 32
-  sz_xChangeDeviceControlReq* = 8
-  sz_xChangeDeviceControlReply* = 32
-
-const 
-  INAME* = "XInputExtension"
-
-const 
-  XI_KEYBOARD* = "KEYBOARD"
-  XI_MOUSE* = "MOUSE"
-  XI_TABLET* = "TABLET"
-  XI_TOUCHSCREEN* = "TOUCHSCREEN"
-  XI_TOUCHPAD* = "TOUCHPAD"
-  XI_BARCODE* = "BARCODE"
-  XI_BUTTONBOX* = "BUTTONBOX"
-  XI_KNOB_BOX* = "KNOB_BOX"
-  XI_ONE_KNOB* = "ONE_KNOB"
-  XI_NINE_KNOB* = "NINE_KNOB"
-  XI_TRACKBALL* = "TRACKBALL"
-  XI_QUADRATURE* = "QUADRATURE"
-  XI_ID_MODULE* = "ID_MODULE"
-  XI_SPACEBALL* = "SPACEBALL"
-  XI_DATAGLOVE* = "DATAGLOVE"
-  XI_EYETRACKER* = "EYETRACKER"
-  XI_CURSORKEYS* = "CURSORKEYS"
-  XI_FOOTMOUSE* = "FOOTMOUSE"
-
-const 
-  Dont_Check* = 0
-  XInput_Initial_Release* = 1
-  XInput_Add_XDeviceBell* = 2
-  XInput_Add_XSetDeviceValuators* = 3
-  XInput_Add_XChangeDeviceControl* = 4
-
-const 
-  XI_Absent* = 0
-  XI_Present* = 1
-
-const 
-  XI_Initial_Release_Major* = 1
-  XI_Initial_Release_Minor* = 0
-
-const 
-  XI_Add_XDeviceBell_Major* = 1
-  XI_Add_XDeviceBell_Minor* = 1
-
-const 
-  XI_Add_XSetDeviceValuators_Major* = 1
-  XI_Add_XSetDeviceValuators_Minor* = 2
-
-const 
-  XI_Add_XChangeDeviceControl_Major* = 1
-  XI_Add_XChangeDeviceControl_Minor* = 3
-
-const 
-  DEVICE_RESOLUTION* = 1
-
-const 
-  NoSuchExtension* = 1
-
-const 
-  COUNT* = 0
-  CREATE* = 1
-
-const 
-  NewPointer* = 0
-  NewKeyboard* = 1
-
-const 
-  XPOINTER* = 0
-  XKEYBOARD* = 1
-
-const 
-  UseXKeyboard* = 0x000000FF
-
-const 
-  IsXPointer* = 0
-  IsXKeyboard* = 1
-  IsXExtensionDevice* = 2
-
-const 
-  AsyncThisDevice* = 0
-  SyncThisDevice* = 1
-  ReplayThisDevice* = 2
-  AsyncOtherDevices* = 3
-  AsyncAll* = 4
-  SyncAll* = 5
-
-const 
-  FollowKeyboard* = 3
-  RevertToFollowKeyboard* = 3
-
-const 
-  DvAccelNum* = int(1) shl 0
-  DvAccelDenom* = int(1) shl 1
-  DvThreshold* = int(1) shl 2
-
-const 
-  DvKeyClickPercent* = int(1) shl 0
-  DvPercent* = int(1) shl 1
-  DvPitch* = int(1) shl 2
-  DvDuration* = int(1) shl 3
-  DvLed* = int(1) shl 4
-  DvLedMode* = int(1) shl 5
-  DvKey* = int(1) shl 6
-  DvAutoRepeatMode* = 1 shl 7
-
-const 
-  DvString* = int(1) shl 0
-
-const 
-  DvInteger* = int(1) shl 0
-
-const 
-  DeviceMode* = int(1) shl 0
-  Relative* = 0
-  Absolute* = 1               # Merged from Metrolink tree for XINPUT stuff 
-  TS_Raw* = 57
-  TS_Scaled* = 58
-  SendCoreEvents* = 59
-  DontSendCoreEvents* = 60    # End of merged section 
-
-const 
-  ProximityState* = int(1) shl 1
-  InProximity* = int(0) shl 1
-  OutOfProximity* = int(1) shl 1
-
-const 
-  AddToList* = 0
-  DeleteFromList* = 1
-
-const 
-  KeyClass* = 0
-  ButtonClass* = 1
-  ValuatorClass* = 2
-  FeedbackClass* = 3
-  ProximityClass* = 4
-  FocusClass* = 5
-  OtherClass* = 6
-
-const 
-  KbdFeedbackClass* = 0
-  PtrFeedbackClass* = 1
-  StringFeedbackClass* = 2
-  IntegerFeedbackClass* = 3
-  LedFeedbackClass* = 4
-  BellFeedbackClass* = 5
-
-const 
-  devicePointerMotionHint* = 0
-  deviceButton1Motion* = 1
-  deviceButton2Motion* = 2
-  deviceButton3Motion* = 3
-  deviceButton4Motion* = 4
-  deviceButton5Motion* = 5
-  deviceButtonMotion* = 6
-  deviceButtonGrab* = 7
-  deviceOwnerGrabButton* = 8
-  noExtensionEvent* = 9
-
-const 
-  XI_BadDevice* = 0
-  XI_BadEvent* = 1
-  XI_BadMode* = 2
-  XI_DeviceBusy* = 3
-  XI_BadClass* = 4 # Make XEventClass be a CARD32 for 64 bit servers.  Don't affect client
-                   #  definition of XEventClass since that would be a library interface change.
-                   #  See the top of X.h for more _XSERVER64 magic.
-                   #
-
-when defined(XSERVER64): 
-  type 
-    XEventClass* = CARD32
-else: 
-  type 
-    XEventClass* = int32
-#******************************************************************
-# *
-# * Extension version structure.
-# *
-# 
-
-type 
-  PXExtensionVersion* = ptr TXExtensionVersion
-  TXExtensionVersion*{.final.} = object 
-    present*: int16
-    major_version*: int16
-    minor_version*: int16
-
-
-# implementation
diff --git a/lib/wrappers/x11/xinerama.nim b/lib/wrappers/x11/xinerama.nim
deleted file mode 100644
index 96f5d7da3..000000000
--- a/lib/wrappers/x11/xinerama.nim
+++ /dev/null
@@ -1,25 +0,0 @@
-# Converted from X11/Xinerama.h 
-import                        
-  xlib
-
-const
-  xineramaLib = "libXinerama.so"
-
-type 
-  PXineramaScreenInfo* = ptr TXineramaScreenInfo
-  TXineramaScreenInfo*{.final.} = object 
-    screen_number*: cint
-    x_org*: int16
-    y_org*: int16
-    width*: int16
-    height*: int16
-
-
-proc XineramaQueryExtension*(dpy: PDisplay, event_base: Pcint, error_base: Pcint): TBool{.
-    cdecl, dynlib: xineramaLib, importc.}
-proc XineramaQueryVersion*(dpy: PDisplay, major: Pcint, minor: Pcint): TStatus{.
-    cdecl, dynlib: xineramaLib, importc.}
-proc XineramaIsActive*(dpy: PDisplay): TBool{.cdecl, dynlib: xineramaLib, importc.}
-proc XineramaQueryScreens*(dpy: PDisplay, number: Pcint): PXineramaScreenInfo{.
-    cdecl, dynlib: xineramaLib, importc.}
-
diff --git a/lib/wrappers/x11/xkb.nim b/lib/wrappers/x11/xkb.nim
deleted file mode 100644
index 86296430a..000000000
--- a/lib/wrappers/x11/xkb.nim
+++ /dev/null
@@ -1,2387 +0,0 @@
-#
-# $Xorg: XKB.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $
-#************************************************************
-# $Xorg: XKBstr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $
-#************************************************************
-# $Xorg: XKBgeom.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $
-#************************************************************
-#
-#Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
-#
-#Permission to use, copy, modify, and distribute this
-#software and its documentation for any purpose and without
-#fee is hereby granted, provided that the above copyright
-#notice appear in all copies and that both that copyright
-#notice and this permission notice appear in supporting
-#documentation, and that the name of Silicon Graphics not be
-#used in advertising or publicity pertaining to distribution
-#of the software without specific prior written permission.
-#Silicon Graphics makes no representation about the suitability
-#of this software for any purpose. It is provided "as is"
-#without any express or implied warranty.
-#
-#SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-#SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-#AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-#GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-#DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-#DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-#OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION  WITH
-#THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-#********************************************************
-# $XFree86: xc/include/extensions/XKB.h,v 1.5 2002/11/20 04:49:01 dawes Exp $
-# $XFree86: xc/include/extensions/XKBgeom.h,v 3.9 2002/09/18 17:11:40 tsi Exp $
-#
-# Pascal Convertion was made by Ido Kannner - kanerido@actcom.net.il
-#
-#Thanks:
-#         I want to thanks to oliebol for putting up with all of the problems that was found
-#         while translating this code. ;)
-#
-#         I want to thanks #fpc channel in freenode irc, for helping me, and to put up with my
-#         wierd questions ;)
-#
-#         Thanks for mmc in #xlib on freenode irc And so for the channel itself for the helping me to
-#         understanding some of the problems I had converting this headers and pointing me to resources
-#         that helped translating this headers.
-#
-# Ido
-#
-#History:
-#        2004/10/15           - Fixed a bug of accessing second based records by removing "paced record" and
-#                               chnaged it to "reocrd" only.
-#        2004/10/04 - 06      - Convertion from the c header of XKBgeom.h.
-#        2004/10/03           - Removed the XKBstr_UNIT compiler decleration. Afther the joined files,
-#                                                                                     There is no need for it anymore.
-#                                                                             - There is a need to define (for now) XKBgeom (compiler define) in order
-#                                                                               to use the code of it. At this moment, I did not yet converted it to Pascal.
-#
-#        2004/09/17 - 10/04   - Convertion from the c header of XKBstr.
-#
-#        2004/10/03           - Joined xkbstr.pas into xkb.pas because of the circular calls problems.
-#                             - Added the history of xkbstr.pas above this addition.
-#
-#        2004/09/17           - Fixed a wrong convertion number of XkbPerKeyBitArraySize, insted
-#                               of float, it's now converted into integer (as it should have been).
-#
-#        2004/09/15 - 16      - Convertion from the c header of XKB.h.
-#
-
-import 
-  X, Xlib
-
-include "x11pragma.nim"
-
-proc XkbCharToInt*(v: int8): int16
-proc XkbIntTo2Chars*(i: int16, h, L: var int8)
-proc Xkb2CharsToInt*(h, L: int8): int16
-  #
-  #          Common data structures and access macros
-  #        
-type
-  PWord* = ptr array[0..64_000, int16]
-  PByte* = ptr byte
-  PXkbStatePtr* = ptr TXkbStateRec
-  TXkbStateRec*{.final.} = object 
-    group*: int8
-    locked_group*: int8
-    base_group*: int16
-    latched_group*: int16
-    mods*: int8
-    base_mods*: int8
-    latched_mods*: int8
-    locked_mods*: int8
-    compat_state*: int8
-    grab_mods*: int8
-    compat_grab_mods*: int8
-    lookup_mods*: int8
-    compat_lookup_mods*: int8
-    ptr_buttons*: int16
-
-
-proc XkbModLocks*(s: PXkbStatePtr): int8
-proc XkbStateMods*(s: PXkbStatePtr): int16
-proc XkbGroupLock*(s: PXkbStatePtr): int8
-proc XkbStateGroup*(s: PXkbStatePtr): int16
-proc XkbStateFieldFromRec*(s: PXkbStatePtr): int
-proc XkbGrabStateFromRec*(s: PXkbStatePtr): int
-type 
-  PXkbModsPtr* = ptr TXkbModsRec
-  TXkbModsRec*{.final.} = object 
-    mask*: int8               # effective mods
-    real_mods*: int8
-    vmods*: int16
-
-
-type 
-  PXkbKTMapEntryPtr* = ptr TXkbKTMapEntryRec
-  TXkbKTMapEntryRec*{.final.} = object 
-    active*: bool
-    level*: int8
-    mods*: TXkbModsRec
-
-
-type 
-  PXkbKeyTypePtr* = ptr TXkbKeyTypeRec
-  TXkbKeyTypeRec*{.final.} = object 
-    mods*: TXkbModsRec
-    num_levels*: int8
-    map_count*: int8
-    map*: PXkbKTMapEntryPtr
-    preserve*: PXkbModsPtr
-    name*: TAtom
-    level_names*: TAtom
-
-
-proc XkbNumGroups*(g: int16): int16
-proc XkbOutOfRangeGroupInfo*(g: int16): int16
-proc XkbOutOfRangeGroupAction*(g: int16): int16
-proc XkbOutOfRangeGroupNumber*(g: int16): int16
-proc XkbSetGroupInfo*(g, w, n: int16): int16
-proc XkbSetNumGroups*(g, n: int16): int16
-  #
-  #          Structures and access macros used primarily by the server
-  #        
-type 
-  PXkbBehavior* = ptr TXkbBehavior
-  TXkbBehavior*{.final.} = object 
-    theType*: int8
-    data*: int8
-
-
-type 
-  PXkbModAction* = ptr TXkbModAction
-  TXkbModAction*{.final.} = object 
-    theType*: int8
-    flags*: int8
-    mask*: int8
-    real_mods*: int8
-    vmods1*: int8
-    vmods2*: int8
-
-
-proc XkbModActionVMods*(a: PXkbModAction): int16
-proc XkbSetModActionVMods*(a: PXkbModAction, v: int8)
-type 
-  PXkbGroupAction* = ptr TXkbGroupAction
-  TXkbGroupAction*{.final.} = object 
-    theType*: int8
-    flags*: int8
-    group_XXX*: int8
-
-
-proc XkbSAGroup*(a: PXkbGroupAction): int8
-proc XkbSASetGroupProc*(a: PXkbGroupAction, g: int8)
-type 
-  PXkbISOAction* = ptr TXkbISOAction
-  TXkbISOAction*{.final.} = object 
-    theType*: int8
-    flags*: int8
-    mask*: int8
-    real_mods*: int8
-    group_XXX*: int8
-    affect*: int8
-    vmods1*: int8
-    vmods2*: int8
-
-
-type 
-  PXkbPtrAction* = ptr TXkbPtrAction
-  TXkbPtrAction*{.final.} = object 
-    theType*: int8
-    flags*: int8
-    high_XXX*: int8
-    low_XXX*: int8
-    high_YYY*: int8
-    low_YYY*: int8
-
-
-proc XkbPtrActionX*(a: PXkbPtrAction): int16
-proc XkbPtrActionY*(a: PXkbPtrAction): int16
-proc XkbSetPtrActionX*(a: PXkbPtrAction, x: int8)
-proc XkbSetPtrActionY*(a: PXkbPtrAction, y: int8)
-type 
-  PXkbPtrBtnAction* = ptr TXkbPtrBtnAction
-  TXkbPtrBtnAction*{.final.} = object 
-    theType*: int8
-    flags*: int8
-    count*: int8
-    button*: int8
-
-
-type 
-  PXkbPtrDfltAction* = ptr TXkbPtrDfltAction
-  TXkbPtrDfltAction*{.final.} = object 
-    theType*: int8
-    flags*: int8
-    affect*: int8
-    valueXXX*: int8
-
-
-proc XkbSAPtrDfltValue*(a: PXkbPtrDfltAction): int8
-proc XkbSASetPtrDfltValue*(a: PXkbPtrDfltAction, c: pointer)
-type 
-  PXkbSwitchScreenAction* = ptr TXkbSwitchScreenAction
-  TXkbSwitchScreenAction*{.final.} = object 
-    theType*: int8
-    flags*: int8
-    screenXXX*: int8
-
-
-proc XkbSAScreen*(a: PXkbSwitchScreenAction): int8
-proc XkbSASetScreen*(a: PXkbSwitchScreenAction, s: pointer)
-type 
-  PXkbCtrlsAction* = ptr TXkbCtrlsAction
-  TXkbCtrlsAction*{.final.} = object 
-    theType*: int8
-    flags*: int8
-    ctrls3*: int8
-    ctrls2*: int8
-    ctrls1*: int8
-    ctrls0*: int8
-
-
-proc XkbActionSetCtrls*(a: PXkbCtrlsAction, c: int8)
-proc XkbActionCtrls*(a: PXkbCtrlsAction): int16
-type 
-  PXkbMessageAction* = ptr TXkbMessageAction
-  TXkbMessageAction*{.final.} = object 
-    theType*: int8
-    flags*: int8
-    message*: array[0..5, char]
-
-
-type 
-  PXkbRedirectKeyAction* = ptr TXkbRedirectKeyAction
-  TXkbRedirectKeyAction*{.final.} = object 
-    theType*: int8
-    new_key*: int8
-    mods_mask*: int8
-    mods*: int8
-    vmods_mask0*: int8
-    vmods_mask1*: int8
-    vmods0*: int8
-    vmods1*: int8
-
-
-proc XkbSARedirectVMods*(a: PXkbRedirectKeyAction): int16
-proc XkbSARedirectSetVMods*(a: PXkbRedirectKeyAction, m: int8)
-proc XkbSARedirectVModsMask*(a: PXkbRedirectKeyAction): int16
-proc XkbSARedirectSetVModsMask*(a: PXkbRedirectKeyAction, m: int8)
-type 
-  PXkbDeviceBtnAction* = ptr TXkbDeviceBtnAction
-  TXkbDeviceBtnAction*{.final.} = object 
-    theType*: int8
-    flags*: int8
-    count*: int8
-    button*: int8
-    device*: int8
-
-
-type 
-  PXkbDeviceValuatorAction* = ptr TXkbDeviceValuatorAction
-  TXkbDeviceValuatorAction*{.final.} = object  #
-                                               #      Macros to classify key actions
-                                               #                
-    theType*: int8
-    device*: int8
-    v1_what*: int8
-    v1_ndx*: int8
-    v1_value*: int8
-    v2_what*: int8
-    v2_ndx*: int8
-    v2_value*: int8
-
-
-const 
-  XkbAnyActionDataSize* = 7
-
-type 
-  PXkbAnyAction* = ptr TXkbAnyAction
-  TXkbAnyAction*{.final.} = object 
-    theType*: int8
-    data*: array[0..XkbAnyActionDataSize - 1, int8]
-
-
-proc XkbIsModAction*(a: PXkbAnyAction): bool
-proc XkbIsGroupAction*(a: PXkbAnyAction): bool
-proc XkbIsPtrAction*(a: PXkbAnyAction): bool
-type 
-  PXkbAction* = ptr TXkbAction
-  TXkbAction*{.final.} = object  #
-                                 #      XKB request codes, used in:
-                                 #      -  xkbReqType field of all requests
-                                 #      -  requestMinor field of some events
-                                 #                
-    any*: TXkbAnyAction
-    mods*: TXkbModAction
-    group*: TXkbGroupAction
-    iso*: TXkbISOAction
-    thePtr*: TXkbPtrAction
-    btn*: TXkbPtrBtnAction
-    dflt*: TXkbPtrDfltAction
-    screen*: TXkbSwitchScreenAction
-    ctrls*: TXkbCtrlsAction
-    msg*: TXkbMessageAction
-    redirect*: TXkbRedirectKeyAction
-    devbtn*: TXkbDeviceBtnAction
-    devval*: TXkbDeviceValuatorAction
-    theType*: int8
-
-
-const 
-  X_kbUseExtension* = 0
-  X_kbSelectEvents* = 1
-  X_kbBell* = 3
-  X_kbGetState* = 4
-  X_kbLatchLockState* = 5
-  X_kbGetControls* = 6
-  X_kbSetControls* = 7
-  X_kbGetMap* = 8
-  X_kbSetMap* = 9
-  X_kbGetCompatMap* = 10
-  X_kbSetCompatMap* = 11
-  X_kbGetIndicatorState* = 12
-  X_kbGetIndicatorMap* = 13
-  X_kbSetIndicatorMap* = 14
-  X_kbGetNamedIndicator* = 15
-  X_kbSetNamedIndicator* = 16
-  X_kbGetNames* = 17
-  X_kbSetNames* = 18
-  X_kbGetGeometry* = 19
-  X_kbSetGeometry* = 20
-  X_kbPerClientFlags* = 21
-  X_kbListComponents* = 22
-  X_kbGetKbdByName* = 23
-  X_kbGetDeviceInfo* = 24
-  X_kbSetDeviceInfo* = 25
-  X_kbSetDebuggingFlags* = 101 #
-                               #      In the X sense, XKB reports only one event.
-                               #      The type field of all XKB events is XkbEventCode
-                               #                
-
-const 
-  XkbEventCode* = 0
-  XkbNumberEvents* = XkbEventCode + 1 #
-                                      #      XKB has a minor event code so it can use one X event code for
-                                      #      multiple purposes.
-                                      #       - reported in the xkbType field of all XKB events.
-                                      #       - XkbSelectEventDetails: Indicates the event for which event details
-                                      #         are being changed
-                                      #                
-
-const 
-  XkbNewKeyboardNotify* = 0
-  XkbMapNotify* = 1
-  XkbStateNotify* = 2
-  XkbControlsNotify* = 3
-  XkbIndicatorStateNotify* = 4
-  XkbIndicatorMapNotify* = 5
-  XkbNamesNotify* = 6
-  XkbCompatMapNotify* = 7
-  XkbBellNotify* = 8
-  XkbActionMessage* = 9
-  XkbAccessXNotify* = 10
-  XkbExtensionDeviceNotify* = 11 #
-                                 #      Event Mask:
-                                 #       - XkbSelectEvents:  Specifies event interest.
-                                 #    
-
-const 
-  XkbNewKeyboardNotifyMask* = int(1) shl 0
-  XkbMapNotifyMask* = int(1) shl 1
-  XkbStateNotifyMask* = int(1) shl 2
-  XkbControlsNotifyMask* = int(1) shl 3
-  XkbIndicatorStateNotifyMask* = int(1) shl 4
-  XkbIndicatorMapNotifyMask* = int(1) shl 5
-  XkbNamesNotifyMask* = int(1) shl 6
-  XkbCompatMapNotifyMask* = int(1) shl 7
-  XkbBellNotifyMask* = int(1) shl 8
-  XkbActionMessageMask* = int(1) shl 9
-  XkbAccessXNotifyMask* = int(1) shl 10
-  XkbExtensionDeviceNotifyMask* = int(1) shl 11
-  XkbAllEventsMask* = 0x00000FFF #
-                                 #      NewKeyboardNotify event details:
-                                 #    
-
-const 
-  XkbNKN_KeycodesMask* = int(1) shl 0
-  XkbNKN_GeometryMask* = int(1) shl 1
-  XkbNKN_DeviceIDMask* = int(1) shl 2
-  XkbAllNewKeyboardEventsMask* = 0x00000007 #
-                                            #      AccessXNotify event types:
-                                            #       - The 'what' field of AccessXNotify events reports the
-                                            #         reason that the event was generated.
-                                            #                
-
-const 
-  XkbAXN_SKPress* = 0
-  XkbAXN_SKAccept* = 1
-  XkbAXN_SKReject* = 2
-  XkbAXN_SKRelease* = 3
-  XkbAXN_BKAccept* = 4
-  XkbAXN_BKReject* = 5
-  XkbAXN_AXKWarning* = 6 #
-                         #      AccessXNotify details:
-                         #      - Used as an event detail mask to limit the conditions under which
-                         #        AccessXNotify events are reported
-                         #                
-
-const 
-  XkbAXN_SKPressMask* = int(1) shl 0
-  XkbAXN_SKAcceptMask* = int(1) shl 1
-  XkbAXN_SKRejectMask* = int(1) shl 2
-  XkbAXN_SKReleaseMask* = int(1) shl 3
-  XkbAXN_BKAcceptMask* = int(1) shl 4
-  XkbAXN_BKRejectMask* = int(1) shl 5
-  XkbAXN_AXKWarningMask* = int(1) shl 6
-  XkbAllAccessXEventsMask* = 0x0000000F #
-                                        #      State detail mask:
-                                        #       - The 'changed' field of StateNotify events reports which of
-                                        #         the keyboard state components have changed.
-                                        #       - Used as an event detail mask to limit the conditions under
-                                        #         which StateNotify events are reported.
-                                        #                
-
-const 
-  XkbModifierStateMask* = int(1) shl 0
-  XkbModifierBaseMask* = int(1) shl 1
-  XkbModifierLatchMask* = int(1) shl 2
-  XkbModifierLockMask* = int(1) shl 3
-  XkbGroupStateMask* = int(1) shl 4
-  XkbGroupBaseMask* = int(1) shl 5
-  XkbGroupLatchMask* = int(1) shl 6
-  XkbGroupLockMask* = int(1) shl 7
-  XkbCompatStateMask* = int(1) shl 8
-  XkbGrabModsMask* = int(1) shl 9
-  XkbCompatGrabModsMask* = int(1) shl 10
-  XkbLookupModsMask* = int(1) shl 11
-  XkbCompatLookupModsMask* = int(1) shl 12
-  XkbPointerButtonMask* = int(1) shl 13
-  XkbAllStateComponentsMask* = 0x00003FFF #
-                                          #      Controls detail masks:
-                                          #       The controls specified in XkbAllControlsMask:
-                                          #       - The 'changed' field of ControlsNotify events reports which of
-                                          #         the keyboard controls have changed.
-                                          #       - The 'changeControls' field of the SetControls request specifies
-                                          #         the controls for which values are to be changed.
-                                          #       - Used as an event detail mask to limit the conditions under
-                                          #         which ControlsNotify events are reported.
-                                          #
-                                          #       The controls specified in the XkbAllBooleanCtrlsMask:
-                                          #       - The 'enabledControls' field of ControlsNotify events reports the
-                                          #         current status of the boolean controls.
-                                          #       - The 'enabledControlsChanges' field of ControlsNotify events reports
-                                          #         any boolean controls that have been turned on or off.
-                                          #       - The 'affectEnabledControls' and 'enabledControls' fields of the
-                                          #         kbSetControls request change the set of enabled controls.
-                                          #       - The 'accessXTimeoutMask' and 'accessXTimeoutValues' fields of
-                                          #         an XkbControlsRec specify the controls to be changed if the keyboard
-                                          #         times out and the values to which they should be changed.
-                                          #       - The 'autoCtrls' and 'autoCtrlsValues' fields of the PerClientFlags
-                                          #         request specifies the specify the controls to be reset when the
-                                          #         client exits and the values to which they should be reset.
-                                          #       - The 'ctrls' field of an indicator map specifies the controls
-                                          #         that drive the indicator.
-                                          #       - Specifies the boolean controls affected by the SetControls and
-                                          #         LockControls key actions.
-                                          #                
-
-const 
-  XkbRepeatKeysMask* = int(1) shl 0
-  XkbSlowKeysMask* = int(1) shl 1
-  XkbBounceKeysMask* = int(1) shl 2
-  XkbStickyKeysMask* = int(1) shl 3
-  XkbMouseKeysMask* = int(1) shl 4
-  XkbMouseKeysAccelMask* = int(1) shl 5
-  XkbAccessXKeysMask* = int(1) shl 6
-  XkbAccessXTimeoutMask* = int(1) shl 7
-  XkbAccessXFeedbackMask* = int(1) shl 8
-  XkbAudibleBellMask* = int(1) shl 9
-  XkbOverlay1Mask* = int(1) shl 10
-  XkbOverlay2Mask* = int(1) shl 11
-  XkbIgnoreGroupLockMask* = int(1) shl 12
-  XkbGroupsWrapMask* = int(1) shl 27
-  XkbInternalModsMask* = int(1) shl 28
-  XkbIgnoreLockModsMask* = int(1) shl 29
-  XkbPerKeyRepeatMask* = int(1) shl 30
-  XkbControlsEnabledMask* = int(1) shl 31
-  XkbAccessXOptionsMask* = XkbStickyKeysMask or XkbAccessXFeedbackMask
-  XkbAllBooleanCtrlsMask* = 0x00001FFF
-  XkbAllControlsMask* = 0xF8001FFF #
-                                   #      Compatibility Map Compontents:
-                                   #       - Specifies the components to be allocated in XkbAllocCompatMap.
-                                   #                
-
-const 
-  XkbSymInterpMask* = 1 shl 0
-  XkbGroupCompatMask* = 1 shl 1
-  XkbAllCompatMask* = 0x00000003 #
-                                 #      Assorted constants and limits.
-                                 #                
-
-const 
-  XkbAllIndicatorsMask* = 0xFFFFFFFF #
-                                     #      Map components masks:
-                                     #      Those in AllMapComponentsMask:
-                                     #       - Specifies the individual fields to be loaded or changed for the
-                                     #         GetMap and SetMap requests.
-                                     #      Those in ClientInfoMask:
-                                     #       - Specifies the components to be allocated by XkbAllocClientMap.
-                                     #      Those in ServerInfoMask:
-                                     #       - Specifies the components to be allocated by XkbAllocServerMap.
-                                     #                
-
-const 
-  XkbKeyTypesMask* = 1 shl 0
-  XkbKeySymsMask* = 1 shl 1
-  XkbModifierMapMask* = 1 shl 2
-  XkbExplicitComponentsMask* = 1 shl 3
-  XkbKeyActionsMask* = 1 shl 4
-  XkbKeyBehaviorsMask* = 1 shl 5
-  XkbVirtualModsMask* = 1 shl 6
-  XkbVirtualModMapMask* = 1 shl 7
-  XkbAllClientInfoMask* = XkbKeyTypesMask or XkbKeySymsMask or
-      XkbModifierMapMask
-  XkbAllServerInfoMask* = XkbExplicitComponentsMask or XkbKeyActionsMask or
-      XkbKeyBehaviorsMask or XkbVirtualModsMask or XkbVirtualModMapMask
-  XkbAllMapComponentsMask* = XkbAllClientInfoMask or XkbAllServerInfoMask #
-                                                                          #      Names component mask:
-                                                                          #       - Specifies the names to be loaded or changed for the GetNames and
-                                                                          #         SetNames requests.
-                                                                          #       - Specifies the names that have changed in a NamesNotify event.
-                                                                          #       - Specifies the names components to be allocated by XkbAllocNames.
-                                                                          #                
-
-const 
-  XkbKeycodesNameMask* = 1 shl 0
-  XkbGeometryNameMask* = 1 shl 1
-  XkbSymbolsNameMask* = 1 shl 2
-  XkbPhysSymbolsNameMask* = 1 shl 3
-  XkbTypesNameMask* = 1 shl 4
-  XkbCompatNameMask* = 1 shl 5
-  XkbKeyTypeNamesMask* = 1 shl 6
-  XkbKTLevelNamesMask* = 1 shl 7
-  XkbIndicatorNamesMask* = 1 shl 8
-  XkbKeyNamesMask* = 1 shl 9
-  XkbKeyAliasesMask* = 1 shl 10
-  XkbVirtualModNamesMask* = 1 shl 11
-  XkbGroupNamesMask* = 1 shl 12
-  XkbRGNamesMask* = 1 shl 13
-  XkbComponentNamesMask* = 0x0000003F
-  XkbAllNamesMask* = 0x00003FFF #
-                                #      Miscellaneous event details:
-                                #      - event detail masks for assorted events that don't reall
-                                #        have any details.
-                                #                
-
-const 
-  XkbAllStateEventsMask* = XkbAllStateComponentsMask
-  XkbAllMapEventsMask* = XkbAllMapComponentsMask
-  XkbAllControlEventsMask* = XkbAllControlsMask
-  XkbAllIndicatorEventsMask* = XkbAllIndicatorsMask
-  XkbAllNameEventsMask* = XkbAllNamesMask
-  XkbAllCompatMapEventsMask* = XkbAllCompatMask
-  XkbAllBellEventsMask* = int(1) shl 0
-  XkbAllActionMessagesMask* = int(1) shl 0 #
-                                           #      XKB reports one error:  BadKeyboard
-                                           #      A further reason for the error is encoded into to most significant
-                                           #      byte of the resourceID for the error:
-                                           #         XkbErr_BadDevice - the device in question was not found
-                                           #         XkbErr_BadClass  - the device was found but it doesn't belong to
-                                           #                            the appropriate class.
-                                           #         XkbErr_BadId     - the device was found and belongs to the right
-                                           #                            class, but not feedback with a matching id was
-                                           #                            found.
-                                           #      The low byte of the resourceID for this error contains the device
-                                           #      id, class specifier or feedback id that failed.
-                                           #                
-
-const 
-  XkbKeyboard* = 0
-  XkbNumberErrors* = 1
-  XkbErr_BadDevice* = 0x000000FF
-  XkbErr_BadClass* = 0x000000FE
-  XkbErr_BadId* = 0x000000FD #
-                             #      Keyboard Components Mask:
-                             #      - Specifies the components that follow a GetKeyboardByNameReply
-                             #                
-
-const 
-  XkbClientMapMask* = int(1) shl 0
-  XkbServerMapMask* = int(1) shl 1
-  XkbCompatMapMask* = int(1) shl 2
-  XkbIndicatorMapMask* = int(1) shl 3
-  XkbNamesMask* = int(1) shl 4
-  XkbGeometryMask* = int(1) shl 5
-  XkbControlsMask* = int(1) shl 6
-  XkbAllComponentsMask* = 0x0000007F #
-                                     #      AccessX Options Mask
-                                     #       - The 'accessXOptions' field of an XkbControlsRec specifies the
-                                     #         AccessX options that are currently in effect.
-                                     #       - The 'accessXTimeoutOptionsMask' and 'accessXTimeoutOptionsValues'
-                                     #         fields of an XkbControlsRec specify the Access X options to be
-                                     #         changed if the keyboard times out and the values to which they
-                                     #         should be changed.
-                                     #                
-
-const 
-  XkbAX_SKPressFBMask* = int(1) shl 0
-  XkbAX_SKAcceptFBMask* = int(1) shl 1
-  XkbAX_FeatureFBMask* = int(1) shl 2
-  XkbAX_SlowWarnFBMask* = int(1) shl 3
-  XkbAX_IndicatorFBMask* = int(1) shl 4
-  XkbAX_StickyKeysFBMask* = int(1) shl 5
-  XkbAX_TwoKeysMask* = int(1) shl 6
-  XkbAX_LatchToLockMask* = int(1) shl 7
-  XkbAX_SKReleaseFBMask* = int(1) shl 8
-  XkbAX_SKRejectFBMask* = int(1) shl 9
-  XkbAX_BKRejectFBMask* = int(1) shl 10
-  XkbAX_DumbBellFBMask* = int(1) shl 11
-  XkbAX_FBOptionsMask* = 0x00000F3F
-  XkbAX_SKOptionsMask* = 0x000000C0
-  XkbAX_AllOptionsMask* = 0x00000FFF #
-                                     #      XkbUseCoreKbd is used to specify the core keyboard without having
-                                     #                        to look up its X input extension identifier.
-                                     #      XkbUseCorePtr is used to specify the core pointer without having
-                                     #                        to look up its X input extension identifier.
-                                     #      XkbDfltXIClass is used to specify "don't care" any place that the
-                                     #                        XKB protocol is looking for an X Input Extension
-                                     #                        device class.
-                                     #      XkbDfltXIId is used to specify "don't care" any place that the
-                                     #                        XKB protocol is looking for an X Input Extension
-                                     #                        feedback identifier.
-                                     #      XkbAllXIClasses is used to get information about all device indicators,
-                                     #                        whether they're part of the indicator feedback class
-                                     #                        or the keyboard feedback class.
-                                     #      XkbAllXIIds is used to get information about all device indicator
-                                     #                        feedbacks without having to list them.
-                                     #      XkbXINone is used to indicate that no class or id has been specified.
-                                     #      XkbLegalXILedClass(c)  True if 'c' specifies a legal class with LEDs
-                                     #      XkbLegalXIBellClass(c) True if 'c' specifies a legal class with bells
-                                     #      XkbExplicitXIDevice(d) True if 'd' explicitly specifies a device
-                                     #      XkbExplicitXIClass(c)  True if 'c' explicitly specifies a device class
-                                     #      XkbExplicitXIId(c)     True if 'i' explicitly specifies a device id
-                                     #      XkbSingleXIClass(c)    True if 'c' specifies exactly one device class,
-                                     #                             including the default.
-                                     #      XkbSingleXIId(i)       True if 'i' specifies exactly one device
-                                     #                              identifier, including the default.
-                                     #                
-
-const 
-  XkbUseCoreKbd* = 0x00000100
-  XkbUseCorePtr* = 0x00000200
-  XkbDfltXIClass* = 0x00000300
-  XkbDfltXIId* = 0x00000400
-  XkbAllXIClasses* = 0x00000500
-  XkbAllXIIds* = 0x00000600
-  XkbXINone* = 0x0000FF00
-
-proc XkbLegalXILedClass*(c: int): bool
-proc XkbLegalXIBellClass*(c: int): bool
-proc XkbExplicitXIDevice*(c: int): bool
-proc XkbExplicitXIClass*(c: int): bool
-proc XkbExplicitXIId*(c: int): bool
-proc XkbSingleXIClass*(c: int): bool
-proc XkbSingleXIId*(c: int): bool
-const 
-  XkbNoModifier* = 0x000000FF
-  XkbNoShiftLevel* = 0x000000FF
-  XkbNoShape* = 0x000000FF
-  XkbNoIndicator* = 0x000000FF
-  XkbNoModifierMask* = 0
-  XkbAllModifiersMask* = 0x000000FF
-  XkbAllVirtualModsMask* = 0x0000FFFF
-  XkbNumKbdGroups* = 4
-  XkbMaxKbdGroup* = XkbNumKbdGroups - 1
-  XkbMaxMouseKeysBtn* = 4 #
-                          #      Group Index and Mask:
-                          #       - Indices into the kt_index array of a key type.
-                          #       - Mask specifies types to be changed for XkbChangeTypesOfKey
-                          #    
-
-const 
-  XkbGroup1Index* = 0
-  XkbGroup2Index* = 1
-  XkbGroup3Index* = 2
-  XkbGroup4Index* = 3
-  XkbAnyGroup* = 254
-  XkbAllGroups* = 255
-  XkbGroup1Mask* = 1 shl 0
-  XkbGroup2Mask* = 1 shl 1
-  XkbGroup3Mask* = 1 shl 2
-  XkbGroup4Mask* = 1 shl 3
-  XkbAnyGroupMask* = 1 shl 7
-  XkbAllGroupsMask* = 0x0000000F #
-                                 #      BuildCoreState: Given a keyboard group and a modifier state,
-                                 #                      construct the value to be reported an event.
-                                 #      GroupForCoreState:  Given the state reported in an event,
-                                 #                      determine the keyboard group.
-                                 #      IsLegalGroup:   Returns TRUE if 'g' is a valid group index.
-                                 #                
-
-proc XkbBuildCoreState*(m, g: int): int
-proc XkbGroupForCoreState*(s: int): int
-proc XkbIsLegalGroup*(g: int): bool
-  #
-  #      GroupsWrap values:
-  #       - The 'groupsWrap' field of an XkbControlsRec specifies the
-  #         treatment of out of range groups.
-  #       - Bits 6 and 7 of the group info field of a key symbol map
-  #         specify the interpretation of out of range groups for the
-  #         corresponding key.
-  #                
-const 
-  XkbWrapIntoRange* = 0x00000000
-  XkbClampIntoRange* = 0x00000040
-  XkbRedirectIntoRange* = 0x00000080 #
-                                     #      Action flags:  Reported in the 'flags' field of most key actions.
-                                     #      Interpretation depends on the type of the action; not all actions
-                                     #      accept all flags.
-                                     #
-                                     #      Option                    Used for Actions
-                                     #      ------                    ----------------
-                                     #      ClearLocks                SetMods, LatchMods, SetGroup, LatchGroup
-                                     #      LatchToLock               SetMods, LatchMods, SetGroup, LatchGroup
-                                     #      LockNoLock                LockMods, ISOLock, LockPtrBtn, LockDeviceBtn
-                                     #      LockNoUnlock              LockMods, ISOLock, LockPtrBtn, LockDeviceBtn
-                                     #      UseModMapMods             SetMods, LatchMods, LockMods, ISOLock
-                                     #      GroupAbsolute             SetGroup, LatchGroup, LockGroup, ISOLock
-                                     #      UseDfltButton             PtrBtn, LockPtrBtn
-                                     #      NoAcceleration            MovePtr
-                                     #      MoveAbsoluteX             MovePtr
-                                     #      MoveAbsoluteY             MovePtr
-                                     #      ISODfltIsGroup            ISOLock
-                                     #      ISONoAffectMods           ISOLock
-                                     #      ISONoAffectGroup          ISOLock
-                                     #      ISONoAffectPtr            ISOLock
-                                     #      ISONoAffectCtrls          ISOLock
-                                     #      MessageOnPress            ActionMessage
-                                     #      MessageOnRelease          ActionMessage
-                                     #      MessageGenKeyEvent        ActionMessage
-                                     #      AffectDfltBtn             SetPtrDflt
-                                     #      DfltBtnAbsolute           SetPtrDflt
-                                     #      SwitchApplication SwitchScreen
-                                     #      SwitchAbsolute            SwitchScreen
-                                     #                
-
-const 
-  XkbSA_ClearLocks* = int(1) shl 0
-  XkbSA_LatchToLock* = int(1) shl 1
-  XkbSA_LockNoLock* = int(1) shl 0
-  XkbSA_LockNoUnlock* = int(1) shl 1
-  XkbSA_UseModMapMods* = int(1) shl 2
-  XkbSA_GroupAbsolute* = int(1) shl 2
-  XkbSA_UseDfltButton* = 0
-  XkbSA_NoAcceleration* = int(1) shl 0
-  XkbSA_MoveAbsoluteX* = int(1) shl 1
-  XkbSA_MoveAbsoluteY* = int(1) shl 2
-  XkbSA_ISODfltIsGroup* = int(1) shl 7
-  XkbSA_ISONoAffectMods* = int(1) shl 6
-  XkbSA_ISONoAffectGroup* = int(1) shl 5
-  XkbSA_ISONoAffectPtr* = int(1) shl 4
-  XkbSA_ISONoAffectCtrls* = int(1) shl 3
-  XkbSA_ISOAffectMask* = 0x00000078
-  XkbSA_MessageOnPress* = int(1) shl 0
-  XkbSA_MessageOnRelease* = int(1) shl 1
-  XkbSA_MessageGenKeyEvent* = int(1) shl 2
-  XkbSA_AffectDfltBtn* = 1
-  XkbSA_DfltBtnAbsolute* = int(1) shl 2
-  XkbSA_SwitchApplication* = int(1) shl 0
-  XkbSA_SwitchAbsolute* = int(1) shl 2 #
-                                       #      The following values apply to the SA_DeviceValuator
-                                       #      action only.  Valuator operations specify the action
-                                       #      to be taken.   Values specified in the action are
-                                       #      multiplied by 2^scale before they are applied.
-                                       #                
-
-const 
-  XkbSA_IgnoreVal* = 0x00000000
-  XkbSA_SetValMin* = 0x00000010
-  XkbSA_SetValCenter* = 0x00000020
-  XkbSA_SetValMax* = 0x00000030
-  XkbSA_SetValRelative* = 0x00000040
-  XkbSA_SetValAbsolute* = 0x00000050
-  XkbSA_ValOpMask* = 0x00000070
-  XkbSA_ValScaleMask* = 0x00000007
-
-proc XkbSA_ValOp*(a: int): int
-proc XkbSA_ValScale*(a: int): int
-  #
-  #      Action types: specifies the type of a key action.  Reported in the
-  #      type field of all key actions.
-  #                
-const 
-  XkbSA_NoAction* = 0x00000000
-  XkbSA_SetMods* = 0x00000001
-  XkbSA_LatchMods* = 0x00000002
-  XkbSA_LockMods* = 0x00000003
-  XkbSA_SetGroup* = 0x00000004
-  XkbSA_LatchGroup* = 0x00000005
-  XkbSA_LockGroup* = 0x00000006
-  XkbSA_MovePtr* = 0x00000007
-  XkbSA_PtrBtn* = 0x00000008
-  XkbSA_LockPtrBtn* = 0x00000009
-  XkbSA_SetPtrDflt* = 0x0000000A
-  XkbSA_ISOLock* = 0x0000000B
-  XkbSA_Terminate* = 0x0000000C
-  XkbSA_SwitchScreen* = 0x0000000D
-  XkbSA_SetControls* = 0x0000000E
-  XkbSA_LockControls* = 0x0000000F
-  XkbSA_ActionMessage* = 0x00000010
-  XkbSA_RedirectKey* = 0x00000011
-  XkbSA_DeviceBtn* = 0x00000012
-  XkbSA_LockDeviceBtn* = 0x00000013
-  XkbSA_DeviceValuator* = 0x00000014
-  XkbSA_LastAction* = XkbSA_DeviceValuator
-  XkbSA_NumActions* = XkbSA_LastAction + 1
-
-const 
-  XkbSA_XFree86Private* = 0x00000086
-#
-#      Specifies the key actions that clear latched groups or modifiers.
-#                
-
-const  ##define        XkbSA_BreakLatch \
-       #        ((1<<XkbSA_NoAction)|(1<<XkbSA_PtrBtn)|(1<<XkbSA_LockPtrBtn)|\
-       #        (1<<XkbSA_Terminate)|(1<<XkbSA_SwitchScreen)|(1<<XkbSA_SetControls)|\
-       #        (1<<XkbSA_LockControls)|(1<<XkbSA_ActionMessage)|\
-       #        (1<<XkbSA_RedirectKey)|(1<<XkbSA_DeviceBtn)|(1<<XkbSA_LockDeviceBtn))
-       #
-  XkbSA_BreakLatch* = (1 shl XkbSA_PtrBtn) or (1 shl XkbSA_LockPtrBtn) or
-      (1 shl XkbSA_Terminate) or (1 shl XkbSA_SwitchScreen) or
-      (1 shl XkbSA_SetControls) or (1 shl XkbSA_LockControls) or
-      (1 shl XkbSA_ActionMessage) or (1 shl XkbSA_RedirectKey) or
-      (1 shl XkbSA_DeviceBtn) or (1 shl XkbSA_LockDeviceBtn) #
-                                                             #      Key Behavior Qualifier:
-                                                             #         KB_Permanent indicates that the behavior describes an unalterable
-                                                             #         characteristic of the keyboard, not an XKB software-simulation of
-                                                             #         the listed behavior.
-                                                             #      Key Behavior Types:
-                                                             #         Specifies the behavior of the underlying key.
-                                                             #                
-
-const 
-  XkbKB_Permanent* = 0x00000080
-  XkbKB_OpMask* = 0x0000007F
-  XkbKB_Default* = 0x00000000
-  XkbKB_Lock* = 0x00000001
-  XkbKB_RadioGroup* = 0x00000002
-  XkbKB_Overlay1* = 0x00000003
-  XkbKB_Overlay2* = 0x00000004
-  XkbKB_RGAllowNone* = 0x00000080 #
-                                  #      Various macros which describe the range of legal keycodes.
-                                  #                
-
-const 
-  XkbMinLegalKeyCode* = 8
-  XkbMaxLegalKeyCode* = 255
-  XkbMaxKeyCount* = XkbMaxLegalKeyCode - XkbMinLegalKeyCode + 1
-  XkbPerKeyBitArraySize* = (XkbMaxLegalKeyCode + 1) div 8
-
-proc XkbIsLegalKeycode*(k: int): bool
-type 
-  PXkbControlsPtr* = ptr TXkbControlsRec
-  TXkbControlsRec*{.final.} = object 
-    mk_dflt_btn*: int8
-    num_groups*: int8
-    groups_wrap*: int8
-    internal*: TXkbModsRec
-    ignore_lock*: TXkbModsRec
-    enabled_ctrls*: int16
-    repeat_delay*: int16
-    repeat_interval*: int16
-    slow_keys_delay*: int16
-    debounce_delay*: int16
-    mk_delay*: int16
-    mk_interval*: int16
-    mk_time_to_max*: int16
-    mk_max_speed*: int16
-    mk_curve*: int16
-    ax_options*: int16
-    ax_timeout*: int16
-    axt_opts_mask*: int16
-    axt_opts_values*: int16
-    axt_ctrls_mask*: int16
-    axt_ctrls_values*: int16
-    per_key_repeat*: array[0..XkbPerKeyBitArraySize - 1, int8]
-
-
-proc XkbAX_AnyFeedback*(c: PXkbControlsPtr): int16
-proc XkbAX_NeedOption*(c: PXkbControlsPtr, w: int16): int16
-proc XkbAX_NeedFeedback*(c: PXkbControlsPtr, w: int16): bool
-  #
-  #      Assorted constants and limits.
-  #                
-const 
-  XkbNumModifiers* = 8
-  XkbNumVirtualMods* = 16
-  XkbNumIndicators* = 32
-  XkbMaxRadioGroups* = 32
-  XkbAllRadioGroupsMask* = 0xFFFFFFFF
-  XkbMaxShiftLevel* = 63
-  XkbMaxSymsPerKey* = XkbMaxShiftLevel * XkbNumKbdGroups
-  XkbRGMaxMembers* = 12
-  XkbActionMessageLength* = 6
-  XkbKeyNameLength* = 4
-  XkbMaxRedirectCount* = 8
-  XkbGeomPtsPerMM* = 10
-  XkbGeomMaxColors* = 32
-  XkbGeomMaxLabelColors* = 3
-  XkbGeomMaxPriority* = 255
-
-type 
-  PXkbServerMapPtr* = ptr TXkbServerMapRec
-  TXkbServerMapRec*{.final.} = object 
-    num_acts*: int16
-    size_acts*: int16
-    acts*: ptr array[0..0xfff, TXkbAction]
-    behaviors*: PXkbBehavior
-    key_acts*: PWord
-    explicit*: PByte
-    vmods*: array[0..XkbNumVirtualMods - 1, int8]
-    vmodmap*: PWord
-
-
-proc XkbSMKeyActionsPtr*(m: PXkbServerMapPtr, k: int16): PXkbAction
-  #
-  #          Structures and access macros used primarily by clients
-  #        
-type 
-  PXkbSymMapPtr* = ptr TXkbSymMapRec
-  TXkbSymMapRec*{.final.} = object 
-    kt_index*: array[0..XkbNumKbdGroups - 1, int8]
-    group_info*: int8
-    width*: int8
-    offset*: int8
-
-
-type 
-  PXkbClientMapPtr* = ptr TXkbClientMapRec
-  TXkbClientMapRec*{.final.} = object 
-    size_types*: int8
-    num_types*: int8
-    types*: ptr array[0..0xffff, TXkbKeyTypeRec]
-    size_syms*: int16
-    num_syms*: int16
-    syms*: ptr array[0..0xffff, TKeySym]
-    key_sym_map*: ptr array[0..0xffff, TXkbSymMapRec]
-    modmap*: PByte
-
-
-proc XkbCMKeyGroupInfo*(m: PXkbClientMapPtr, k: int16): int8
-proc XkbCMKeyNumGroups*(m: PXkbClientMapPtr, k: int16): int8
-proc XkbCMKeyGroupWidth*(m: PXkbClientMapPtr, k: int16, g: int8): int8
-proc XkbCMKeyGroupsWidth*(m: PXkbClientMapPtr, k: int16): int8
-proc XkbCMKeyTypeIndex*(m: PXkbClientMapPtr, k: int16, g: int8): int8
-proc XkbCMKeyType*(m: PXkbClientMapPtr, k: int16, g: int8): PXkbKeyTypePtr
-proc XkbCMKeyNumSyms*(m: PXkbClientMapPtr, k: int16): int16
-proc XkbCMKeySymsOffset*(m: PXkbClientMapPtr, k: int16): int8
-  #
-  #          Compatibility structures and access macros
-  #        
-type 
-  PXkbSymInterpretPtr* = ptr TXkbSymInterpretRec
-  TXkbSymInterpretRec*{.final.} = object 
-    sym*: TKeySym
-    flags*: int8
-    match*: int8
-    mods*: int8
-    virtual_mod*: int8
-    act*: TXkbAnyAction
-
-
-type 
-  PXkbCompatMapPtr* = ptr TXkbCompatMapRec
-  TXkbCompatMapRec*{.final.} = object 
-    sym_interpret*: PXkbSymInterpretPtr
-    groups*: array[0..XkbNumKbdGroups - 1, TXkbModsRec]
-    num_si*: int16
-    size_si*: int16
-
-
-type 
-  PXkbIndicatorMapPtr* = ptr TXkbIndicatorMapRec
-  TXkbIndicatorMapRec*{.final.} = object 
-    flags*: int8
-    which_groups*: int8
-    groups*: int8
-    which_mods*: int8
-    mods*: TXkbModsRec
-    ctrls*: int16
-
-
-proc XkbIM_IsAuto*(i: PXkbIndicatorMapPtr): bool
-proc XkbIM_InUse*(i: PXkbIndicatorMapPtr): bool
-type 
-  PXkbIndicatorPtr* = ptr TXkbIndicatorRec
-  TXkbIndicatorRec*{.final.} = object 
-    phys_indicators*: int32
-    maps*: array[0..XkbNumIndicators - 1, TXkbIndicatorMapRec]
-
-
-type 
-  PXkbKeyNamePtr* = ptr TXkbKeyNameRec
-  TXkbKeyNameRec*{.final.} = object 
-    name*: array[0..XkbKeyNameLength - 1, Char]
-
-
-type 
-  PXkbKeyAliasPtr* = ptr TXkbKeyAliasRec
-  TXkbKeyAliasRec*{.final.} = object  #
-                                      #          Names for everything
-                                      #        
-    float*: array[0..XkbKeyNameLength - 1, Char]
-    alias*: array[0..XkbKeyNameLength - 1, Char]
-
-
-type 
-  PXkbNamesPtr* = ptr TXkbNamesRec
-  TXkbNamesRec*{.final.} = object  #
-                                   #      Key Type index and mask for the four standard key types.
-                                   #                
-    keycodes*: TAtom
-    geometry*: TAtom
-    symbols*: TAtom
-    types*: TAtom
-    compat*: TAtom
-    vmods*: array[0..XkbNumVirtualMods - 1, TAtom]
-    indicators*: array[0..XkbNumIndicators - 1, TAtom]
-    groups*: array[0..XkbNumKbdGroups - 1, TAtom]
-    keys*: PXkbKeyNamePtr
-    key_aliases*: PXkbKeyAliasPtr
-    radio_groups*: PAtom
-    phys_symbols*: TAtom
-    num_keys*: int8
-    num_key_aliases*: int8
-    num_rg*: int16
-
-
-const 
-  XkbOneLevelIndex* = 0
-  XkbTwoLevelIndex* = 1
-  XkbAlphabeticIndex* = 2
-  XkbKeypadIndex* = 3
-  XkbLastRequiredType* = XkbKeypadIndex
-  XkbNumRequiredTypes* = XkbLastRequiredType + 1
-  XkbMaxKeyTypes* = 255
-  XkbOneLevelMask* = 1 shl 0
-  XkbTwoLevelMask* = 1 shl 1
-  XkbAlphabeticMask* = 1 shl 2
-  XkbKeypadMask* = 1 shl 3
-  XkbAllRequiredTypes* = 0x0000000F
-
-proc XkbShiftLevel*(n: int8): int8
-proc XkbShiftLevelMask*(n: int8): int8
-  #
-  #      Extension name and version information
-  #                
-const 
-  XkbName* = "XKEYBOARD"
-  XkbMajorVersion* = 1
-  XkbMinorVersion* = 0 #
-                       #      Explicit map components:
-                       #       - Used in the 'explicit' field of an XkbServerMap.  Specifies
-                       #         the keyboard components that should _not_ be updated automatically
-                       #         in response to core protocol keyboard mapping requests.
-                       #                
-
-const 
-  XkbExplicitKeyTypesMask* = 0x0000000F
-  XkbExplicitKeyType1Mask* = 1 shl 0
-  XkbExplicitKeyType2Mask* = 1 shl 1
-  XkbExplicitKeyType3Mask* = 1 shl 2
-  XkbExplicitKeyType4Mask* = 1 shl 3
-  XkbExplicitInterpretMask* = 1 shl 4
-  XkbExplicitAutoRepeatMask* = 1 shl 5
-  XkbExplicitBehaviorMask* = 1 shl 6
-  XkbExplicitVModMapMask* = 1 shl 7
-  XkbAllExplicitMask* = 0x000000FF #
-                                   #      Symbol interpretations flags:
-                                   #       - Used in the flags field of a symbol interpretation
-                                   #                
-
-const 
-  XkbSI_AutoRepeat* = 1 shl 0
-  XkbSI_LockingKey* = 1 shl 1 #
-                              #      Symbol interpretations match specification:
-                              #       - Used in the match field of a symbol interpretation to specify
-                              #         the conditions under which an interpretation is used.
-                              #                
-
-const 
-  XkbSI_LevelOneOnly* = 0x00000080
-  XkbSI_OpMask* = 0x0000007F
-  XkbSI_NoneOf* = 0
-  XkbSI_AnyOfOrNone* = 1
-  XkbSI_AnyOf* = 2
-  XkbSI_AllOf* = 3
-  XkbSI_Exactly* = 4 #
-                     #      Indicator map flags:
-                     #       - Used in the flags field of an indicator map to indicate the
-                     #         conditions under which and indicator can be changed and the
-                     #         effects of changing the indicator.
-                     #                
-
-const 
-  XkbIM_NoExplicit* = int(1) shl 7
-  XkbIM_NoAutomatic* = int(1) shl 6
-  XkbIM_LEDDrivesKB* = int(1) shl 5 #
-                                    #      Indicator map component specifications:
-                                    #       - Used by the 'which_groups' and 'which_mods' fields of an indicator
-                                    #         map to specify which keyboard components should be used to drive
-                                    #         the indicator.
-                                    #                
-
-const 
-  XkbIM_UseBase* = int(1) shl 0
-  XkbIM_UseLatched* = int(1) shl 1
-  XkbIM_UseLocked* = int(1) shl 2
-  XkbIM_UseEffective* = int(1) shl 3
-  XkbIM_UseCompat* = int(1) shl 4
-  XkbIM_UseNone* = 0
-  XkbIM_UseAnyGroup* = XkbIM_UseBase or XkbIM_UseLatched or XkbIM_UseLocked or
-      XkbIM_UseEffective
-  XkbIM_UseAnyMods* = XkbIM_UseAnyGroup or XkbIM_UseCompat #
-                                                           #      GetByName components:
-                                                           #       - Specifies desired or necessary components to GetKbdByName request.
-                                                           #       - Reports the components that were found in a GetKbdByNameReply
-                                                           #                
-
-const 
-  XkbGBN_TypesMask* = int(1) shl 0
-  XkbGBN_CompatMapMask* = int(1) shl 1
-  XkbGBN_ClientSymbolsMask* = int(1) shl 2
-  XkbGBN_ServerSymbolsMask* = int(1) shl 3
-  XkbGBN_SymbolsMask* = XkbGBN_ClientSymbolsMask or XkbGBN_ServerSymbolsMask
-  XkbGBN_IndicatorMapMask* = int(1) shl 4
-  XkbGBN_KeyNamesMask* = int(1) shl 5
-  XkbGBN_GeometryMask* = int(1) shl 6
-  XkbGBN_OtherNamesMask* = int(1) shl 7
-  XkbGBN_AllComponentsMask* = 0x000000FF #
-                                         #       ListComponents flags
-                                         #                        
-
-const 
-  XkbLC_Hidden* = int(1) shl 0
-  XkbLC_Default* = int(1) shl 1
-  XkbLC_Partial* = int(1) shl 2
-  XkbLC_AlphanumericKeys* = int(1) shl 8
-  XkbLC_ModifierKeys* = int(1) shl 9
-  XkbLC_KeypadKeys* = int(1) shl 10
-  XkbLC_FunctionKeys* = int(1) shl 11
-  XkbLC_AlternateGroup* = int(1) shl 12 #
-                                        #      X Input Extension Interactions
-                                        #      - Specifies the possible interactions between XKB and the X input
-                                        #        extension
-                                        #      - Used to request (XkbGetDeviceInfo) or change (XKbSetDeviceInfo)
-                                        #        XKB information about an extension device.
-                                        #      - Reports the list of supported optional features in the reply to
-                                        #        XkbGetDeviceInfo or in an XkbExtensionDeviceNotify event.
-                                        #      XkbXI_UnsupportedFeature is reported in XkbExtensionDeviceNotify
-                                        #      events to indicate an attempt to use an unsupported feature.
-                                        #                
-
-const 
-  XkbXI_KeyboardsMask* = int(1) shl 0
-  XkbXI_ButtonActionsMask* = int(1) shl 1
-  XkbXI_IndicatorNamesMask* = int(1) shl 2
-  XkbXI_IndicatorMapsMask* = int(1) shl 3
-  XkbXI_IndicatorStateMask* = int(1) shl 4
-  XkbXI_UnsupportedFeatureMask* = int(1) shl 15
-  XkbXI_AllFeaturesMask* = 0x0000001F
-  XkbXI_AllDeviceFeaturesMask* = 0x0000001E
-  XkbXI_IndicatorsMask* = 0x0000001C
-  XkbAllExtensionDeviceEventsMask* = 0x0000801F #
-                                                #      Per-Client Flags:
-                                                #       - Specifies flags to be changed by the PerClientFlags request.
-                                                #                
-
-const 
-  XkbPCF_DetectableAutoRepeatMask* = int(1) shl 0
-  XkbPCF_GrabsUseXKBStateMask* = int(1) shl 1
-  XkbPCF_AutoResetControlsMask* = int(1) shl 2
-  XkbPCF_LookupStateWhenGrabbed* = int(1) shl 3
-  XkbPCF_SendEventUsesXKBState* = int(1) shl 4
-  XkbPCF_AllFlagsMask* = 0x0000001F #
-                                    #      Debugging flags and controls
-                                    #                
-
-const 
-  XkbDF_DisableLocks* = 1 shl 0
-
-type 
-  PXkbPropertyPtr* = ptr TXkbPropertyRec
-  TXkbPropertyRec*{.final.} = object 
-    name*: cstring
-    value*: cstring
-
-
-type 
-  PXkbColorPtr* = ptr TXkbColorRec
-  TXkbColorRec*{.final.} = object 
-    pixel*: int16
-    spec*: cstring
-
-
-type 
-  PXkbPointPtr* = ptr TXkbPointRec
-  TXkbPointRec*{.final.} = object 
-    x*: int16
-    y*: int16
-
-
-type 
-  PXkbBoundsPtr* = ptr TXkbBoundsRec
-  TXkbBoundsRec*{.final.} = object 
-    x1*: int16
-    y1*: int16
-    x2*: int16
-    y2*: int16
-
-
-proc XkbBoundsWidth*(b: PXkbBoundsPtr): int16
-proc XkbBoundsHeight*(b: PXkbBoundsPtr): int16
-type 
-  PXkbOutlinePtr* = ptr TXkbOutlineRec
-  TXkbOutlineRec*{.final.} = object 
-    num_points*: int16
-    sz_points*: int16
-    corner_radius*: int16
-    points*: PXkbPointPtr
-
-
-type 
-  PXkbShapePtr* = ptr TXkbShapeRec
-  TXkbShapeRec*{.final.} = object 
-    name*: TAtom
-    num_outlines*: int16
-    sz_outlines*: int16
-    outlines*: ptr array [0..0xffff, TXkbOutlineRec]
-    approx*: ptr array[0..0xffff, TXkbOutlineRec]
-    primary*: ptr array[0..0xffff, TXkbOutlineRec]
-    bounds*: TXkbBoundsRec
-
-
-proc XkbOutlineIndex*(s: PXkbShapePtr, o: PXkbOutlinePtr): int32
-type 
-  PXkbShapeDoodadPtr* = ptr TXkbShapeDoodadRec
-  TXkbShapeDoodadRec*{.final.} = object 
-    name*: TAtom
-    theType*: int8
-    priority*: int8
-    top*: int16
-    left*: int16
-    angle*: int16
-    color_ndx*: int16
-    shape_ndx*: int16
-
-
-type 
-  PXkbTextDoodadPtr* = ptr TXkbTextDoodadRec
-  TXkbTextDoodadRec*{.final.} = object 
-    name*: TAtom
-    theType*: int8
-    priority*: int8
-    top*: int16
-    left*: int16
-    angle*: int16
-    width*: int16
-    height*: int16
-    color_ndx*: int16
-    text*: cstring
-    font*: cstring
-
-
-type 
-  PXkbIndicatorDoodadPtr* = ptr TXkbIndicatorDoodadRec
-  TXkbIndicatorDoodadRec*{.final.} = object 
-    name*: TAtom
-    theType*: int8
-    priority*: int8
-    top*: int16
-    left*: int16
-    angle*: int16
-    shape_ndx*: int16
-    on_color_ndx*: int16
-    off_color_ndx*: int16
-
-
-type 
-  PXkbLogoDoodadPtr* = ptr TXkbLogoDoodadRec
-  TXkbLogoDoodadRec*{.final.} = object 
-    name*: TAtom
-    theType*: int8
-    priority*: int8
-    top*: int16
-    left*: int16
-    angle*: int16
-    color_ndx*: int16
-    shape_ndx*: int16
-    logo_name*: cstring
-
-
-type 
-  PXkbAnyDoodadPtr* = ptr TXkbAnyDoodadRec
-  TXkbAnyDoodadRec*{.final.} = object 
-    name*: TAtom
-    theType*: int8
-    priority*: int8
-    top*: int16
-    left*: int16
-    angle*: int16
-
-
-type 
-  PXkbDoodadPtr* = ptr TXkbDoodadRec
-  TXkbDoodadRec*{.final.} = object 
-    any*: TXkbAnyDoodadRec
-    shape*: TXkbShapeDoodadRec
-    text*: TXkbTextDoodadRec
-    indicator*: TXkbIndicatorDoodadRec
-    logo*: TXkbLogoDoodadRec
-
-
-const 
-  XkbUnknownDoodad* = 0
-  XkbOutlineDoodad* = 1
-  XkbSolidDoodad* = 2
-  XkbTextDoodad* = 3
-  XkbIndicatorDoodad* = 4
-  XkbLogoDoodad* = 5
-
-type 
-  PXkbKeyPtr* = ptr TXkbKeyRec
-  TXkbKeyRec*{.final.} = object 
-    name*: TXkbKeyNameRec
-    gap*: int16
-    shape_ndx*: int8
-    color_ndx*: int8
-
-
-type 
-  PXkbRowPtr* = ptr TXkbRowRec
-  TXkbRowRec*{.final.} = object 
-    top*: int16
-    left*: int16
-    num_keys*: int16
-    sz_keys*: int16
-    vertical*: int16
-    Keys*: PXkbKeyPtr
-    bounds*: TXkbBoundsRec
-
-
-type 
-  PXkbOverlayPtr* = ptr TXkbOverlayRec #forward for TXkbSectionRec use.
-                                       #Do not add more "type"
-  PXkbSectionPtr* = ptr TXkbSectionRec
-  TXkbSectionRec*{.final.} = object  #Do not add more "type"
-    name*: TAtom
-    priority*: int8
-    top*: int16
-    left*: int16
-    width*: int16
-    height*: int16
-    angle*: int16
-    num_rows*: int16
-    num_doodads*: int16
-    num_overlays*: int16
-    rows*: PXkbRowPtr
-    doodads*: PXkbDoodadPtr
-    bounds*: TXkbBoundsRec
-    overlays*: PXkbOverlayPtr
-
-  PXkbOverlayKeyPtr* = ptr TXkbOverlayKeyRec
-  TXkbOverlayKeyRec*{.final.} = object  #Do not add more "type"
-    over*: TXkbKeyNameRec
-    under*: TXkbKeyNameRec
-
-  PXkbOverlayRowPtr* = ptr TXkbOverlayRowRec
-  TXkbOverlayRowRec*{.final.} = object  #Do not add more "type"
-    row_under*: int16
-    num_keys*: int16
-    sz_keys*: int16
-    keys*: PXkbOverlayKeyPtr
-
-  TXkbOverlayRec*{.final.} = object 
-    name*: TAtom
-    section_under*: PXkbSectionPtr
-    num_rows*: int16
-    sz_rows*: int16
-    rows*: PXkbOverlayRowPtr
-    bounds*: PXkbBoundsPtr
-
-
-type 
-  PXkbGeometryRec* = ptr TXkbGeometryRec
-  PXkbGeometryPtr* = PXkbGeometryRec
-  TXkbGeometryRec*{.final.} = object 
-    name*: TAtom
-    width_mm*: int16
-    height_mm*: int16
-    label_font*: cstring
-    label_color*: PXkbColorPtr
-    base_color*: PXkbColorPtr
-    sz_properties*: int16
-    sz_colors*: int16
-    sz_shapes*: int16
-    sz_sections*: int16
-    sz_doodads*: int16
-    sz_key_aliases*: int16
-    num_properties*: int16
-    num_colors*: int16
-    num_shapes*: int16
-    num_sections*: int16
-    num_doodads*: int16
-    num_key_aliases*: int16
-    properties*: ptr array[0..0xffff, TXkbPropertyRec]
-    colors*: ptr array[0..0xffff, TXkbColorRec]
-    shapes*: ptr array[0..0xffff, TXkbShapeRec]
-    sections*: ptr array[0..0xffff, TXkbSectionRec]
-    key_aliases*: ptr array[0..0xffff, TXkbKeyAliasRec]
-
-
-const 
-  XkbGeomPropertiesMask* = 1 shl 0
-  XkbGeomColorsMask* = 1 shl 1
-  XkbGeomShapesMask* = 1 shl 2
-  XkbGeomSectionsMask* = 1 shl 3
-  XkbGeomDoodadsMask* = 1 shl 4
-  XkbGeomKeyAliasesMask* = 1 shl 5
-  XkbGeomAllMask* = 0x0000003F
-
-type 
-  PXkbGeometrySizesPtr* = ptr TXkbGeometrySizesRec
-  TXkbGeometrySizesRec*{.final.} = object  #
-                                           #          Tie it all together into one big keyboard description
-                                           #        
-    which*: int16
-    num_properties*: int16
-    num_colors*: int16
-    num_shapes*: int16
-    num_sections*: int16
-    num_doodads*: int16
-    num_key_aliases*: int16
-
-
-type 
-  PXkbDescPtr* = ptr TXkbDescRec
-  TXkbDescRec*{.final.} = object 
-    dpy*: PDisplay
-    flags*: int16
-    device_spec*: int16
-    min_key_code*: TKeyCode
-    max_key_code*: TKeyCode
-    ctrls*: PXkbControlsPtr
-    server*: PXkbServerMapPtr
-    map*: PXkbClientMapPtr
-    indicators*: PXkbIndicatorPtr
-    names*: PXkbNamesPtr
-    compat*: PXkbCompatMapPtr
-    geom*: PXkbGeometryPtr
-
-
-proc XkbKeyKeyTypeIndex*(d: PXkbDescPtr, k: int16, g: int8): int8
-proc XkbKeyKeyType*(d: PXkbDescPtr, k: int16, g: int8): PXkbKeyTypePtr
-proc XkbKeyGroupWidth*(d: PXkbDescPtr, k: int16, g: int8): int8
-proc XkbKeyGroupsWidth*(d: PXkbDescPtr, k: int16): int8
-proc XkbKeyGroupInfo*(d: PXkbDescPtr, k: int16): int8
-proc XkbKeyNumGroups*(d: PXkbDescPtr, k: int16): int8
-proc XkbKeyNumSyms*(d: PXkbDescPtr, k: int16): int16
-proc XkbKeySym*(d: PXkbDescPtr, k: int16, n: int16): TKeySym
-proc XkbKeySymEntry*(d: PXkbDescPtr, k: int16, sl: int16, g: int8): TKeySym
-proc XkbKeyAction*(d: PXkbDescPtr, k: int16, n: int16): PXkbAction
-proc XkbKeyActionEntry*(d: PXkbDescPtr, k: int16, sl: int16, g: int8): int8
-proc XkbKeyHasActions*(d: PXkbDescPtr, k: int16): bool
-proc XkbKeyNumActions*(d: PXkbDescPtr, k: int16): int16
-proc XkbKeyActionsPtr*(d: PXkbDescPtr, k: int16): PXkbAction
-proc XkbKeycodeInRange*(d: PXkbDescPtr, k: int16): bool
-proc XkbNumKeys*(d: PXkbDescPtr): int8
-  #
-  #          The following structures can be used to track changes
-  #          to a keyboard device
-  #        
-type 
-  PXkbMapChangesPtr* = ptr TXkbMapChangesRec
-  TXkbMapChangesRec*{.final.} = object 
-    changed*: int16
-    min_key_code*: TKeyCode
-    max_key_code*: TKeyCode
-    first_type*: int8
-    num_types*: int8
-    first_key_sym*: TKeyCode
-    num_key_syms*: int8
-    first_key_act*: TKeyCode
-    num_key_acts*: int8
-    first_key_behavior*: TKeyCode
-    num_key_behaviors*: int8
-    first_key_explicit*: TKeyCode
-    num_key_explicit*: int8
-    first_modmap_key*: TKeyCode
-    num_modmap_keys*: int8
-    first_vmodmap_key*: TKeyCode
-    num_vmodmap_keys*: int8
-    pad*: int8
-    vmods*: int16
-
-
-type 
-  PXkbControlsChangesPtr* = ptr TXkbControlsChangesRec
-  TXkbControlsChangesRec*{.final.} = object 
-    changed_ctrls*: int16
-    enabled_ctrls_changes*: int16
-    num_groups_changed*: bool
-
-
-type 
-  PXkbIndicatorChangesPtr* = ptr TXkbIndicatorChangesRec
-  TXkbIndicatorChangesRec*{.final.} = object 
-    state_changes*: int16
-    map_changes*: int16
-
-
-type 
-  PXkbNameChangesPtr* = ptr TXkbNameChangesRec
-  TXkbNameChangesRec*{.final.} = object 
-    changed*: int16
-    first_type*: int8
-    num_types*: int8
-    first_lvl*: int8
-    num_lvls*: int8
-    num_aliases*: int8
-    num_rg*: int8
-    first_key*: int8
-    num_keys*: int8
-    changed_vmods*: int16
-    changed_indicators*: int32
-    changed_groups*: int8
-
-
-type 
-  PXkbCompatChangesPtr* = ptr TXkbCompatChangesRec
-  TXkbCompatChangesRec*{.final.} = object 
-    changed_groups*: int8
-    first_si*: int16
-    num_si*: int16
-
-
-type 
-  PXkbChangesPtr* = ptr TXkbChangesRec
-  TXkbChangesRec*{.final.} = object  #
-                                     #          These data structures are used to construct a keymap from
-                                     #          a set of components or to list components in the server
-                                     #          database.
-                                     #        
-    device_spec*: int16
-    state_changes*: int16
-    map*: TXkbMapChangesRec
-    ctrls*: TXkbControlsChangesRec
-    indicators*: TXkbIndicatorChangesRec
-    names*: TXkbNameChangesRec
-    compat*: TXkbCompatChangesRec
-
-
-type 
-  PXkbComponentNamesPtr* = ptr TXkbComponentNamesRec
-  TXkbComponentNamesRec*{.final.} = object 
-    keymap*: ptr int16
-    keycodes*: ptr int16
-    types*: ptr int16
-    compat*: ptr int16
-    symbols*: ptr int16
-    geometry*: ptr int16
-
-
-type 
-  PXkbComponentNamePtr* = ptr TXkbComponentNameRec
-  TXkbComponentNameRec*{.final.} = object 
-    flags*: int16
-    name*: cstring
-
-
-type 
-  PXkbComponentListPtr* = ptr TXkbComponentListRec
-  TXkbComponentListRec*{.final.} = object  #
-                                           #          The following data structures describe and track changes to a
-                                           #          non-keyboard extension device
-                                           #        
-    num_keymaps*: int16
-    num_keycodes*: int16
-    num_types*: int16
-    num_compat*: int16
-    num_symbols*: int16
-    num_geometry*: int16
-    keymaps*: PXkbComponentNamePtr
-    keycodes*: PXkbComponentNamePtr
-    types*: PXkbComponentNamePtr
-    compat*: PXkbComponentNamePtr
-    symbols*: PXkbComponentNamePtr
-    geometry*: PXkbComponentNamePtr
-
-
-type 
-  PXkbDeviceLedInfoPtr* = ptr TXkbDeviceLedInfoRec
-  TXkbDeviceLedInfoRec*{.final.} = object 
-    led_class*: int16
-    led_id*: int16
-    phys_indicators*: int16
-    maps_present*: int16
-    names_present*: int16
-    state*: int16
-    names*: array[0..XkbNumIndicators - 1, TAtom]
-    maps*: array[0..XkbNumIndicators - 1, TXkbIndicatorMapRec]
-
-
-type 
-  PXkbDeviceInfoPtr* = ptr TXkbDeviceInfoRec
-  TXkbDeviceInfoRec*{.final.} = object 
-    name*: cstring
-    theType*: TAtom
-    device_spec*: int16
-    has_own_state*: bool
-    supported*: int16
-    unsupported*: int16
-    num_btns*: int16
-    btn_acts*: PXkbAction
-    sz_leds*: int16
-    num_leds*: int16
-    dflt_kbd_fb*: int16
-    dflt_led_fb*: int16
-    leds*: PXkbDeviceLedInfoPtr
-
-
-proc XkbXI_DevHasBtnActs*(d: PXkbDeviceInfoPtr): bool
-proc XkbXI_LegalDevBtn*(d: PXkbDeviceInfoPtr, b: int16): bool
-proc XkbXI_DevHasLeds*(d: PXkbDeviceInfoPtr): bool
-type 
-  PXkbDeviceLedChangesPtr* = ptr TXkbDeviceLedChangesRec
-  TXkbDeviceLedChangesRec*{.final.} = object 
-    led_class*: int16
-    led_id*: int16
-    defined*: int16           #names or maps changed
-    next*: PXkbDeviceLedChangesPtr
-
-
-type 
-  PXkbDeviceChangesPtr* = ptr TXkbDeviceChangesRec
-  TXkbDeviceChangesRec*{.final.} = object 
-    changed*: int16
-    first_btn*: int16
-    num_btns*: int16
-    leds*: TXkbDeviceLedChangesRec
-
-
-proc XkbShapeDoodadColor*(g: PXkbGeometryPtr, d: PXkbShapeDoodadPtr): PXkbColorPtr
-proc XkbShapeDoodadShape*(g: PXkbGeometryPtr, d: PXkbShapeDoodadPtr): PXkbShapePtr
-proc XkbSetShapeDoodadColor*(g: PXkbGeometryPtr, d: PXkbShapeDoodadPtr, 
-                             c: PXkbColorPtr)
-proc XkbSetShapeDoodadShape*(g: PXkbGeometryPtr, d: PXkbShapeDoodadPtr, 
-                             s: PXkbShapePtr)
-proc XkbTextDoodadColor*(g: PXkbGeometryPtr, d: PXkbTextDoodadPtr): PXkbColorPtr
-proc XkbSetTextDoodadColor*(g: PXkbGeometryPtr, d: PXkbTextDoodadPtr, 
-                            c: PXkbColorPtr)
-proc XkbIndicatorDoodadShape*(g: PXkbGeometryPtr, d: PXkbIndicatorDoodadPtr): PXkbShapeDoodadPtr
-proc XkbIndicatorDoodadOnColor*(g: PXkbGeometryPtr, d: PXkbIndicatorDoodadPtr): PXkbColorPtr
-proc XkbIndicatorDoodadOffColor*(g: PXkbGeometryPtr, d: PXkbIndicatorDoodadPtr): PXkbColorPtr
-proc XkbSetIndicatorDoodadOnColor*(g: PXkbGeometryPtr, 
-                                   d: PXkbIndicatorDoodadPtr, c: PXkbColorPtr)
-proc XkbSetIndicatorDoodadOffColor*(g: PXkbGeometryPtr, 
-                                    d: PXkbIndicatorDoodadPtr, c: PXkbColorPtr)
-proc XkbSetIndicatorDoodadShape*(g: PXkbGeometryPtr, d: PXkbIndicatorDoodadPtr, 
-                                 s: PXkbShapeDoodadPtr)
-proc XkbLogoDoodadColor*(g: PXkbGeometryPtr, d: PXkbLogoDoodadPtr): PXkbColorPtr
-proc XkbLogoDoodadShape*(g: PXkbGeometryPtr, d: PXkbLogoDoodadPtr): PXkbShapeDoodadPtr
-proc XkbSetLogoDoodadColor*(g: PXkbGeometryPtr, d: PXkbLogoDoodadPtr, 
-                            c: PXkbColorPtr)
-proc XkbSetLogoDoodadShape*(g: PXkbGeometryPtr, d: PXkbLogoDoodadPtr, 
-                            s: PXkbShapeDoodadPtr)
-proc XkbKeyShape*(g: PXkbGeometryPtr, k: PXkbKeyPtr): PXkbShapeDoodadPtr
-proc XkbKeyColor*(g: PXkbGeometryPtr, k: PXkbKeyPtr): PXkbColorPtr
-proc XkbSetKeyShape*(g: PXkbGeometryPtr, k: PXkbKeyPtr, s: PXkbShapeDoodadPtr)
-proc XkbSetKeyColor*(g: PXkbGeometryPtr, k: PXkbKeyPtr, c: PXkbColorPtr)
-proc XkbGeomColorIndex*(g: PXkbGeometryPtr, c: PXkbColorPtr): int32
-proc XkbAddGeomProperty*(geom: PXkbGeometryPtr, name: cstring, value: cstring): PXkbPropertyPtr{.
-    libx11c, importc: "XkbAddGeomProperty".}
-proc XkbAddGeomKeyAlias*(geom: PXkbGeometryPtr, alias: cstring, float: cstring): PXkbKeyAliasPtr{.
-    libx11c, importc: "XkbAddGeomKeyAlias".}
-proc XkbAddGeomColor*(geom: PXkbGeometryPtr, spec: cstring, pixel: int16): PXkbColorPtr{.
-    libx11c, importc: "XkbAddGeomColor".}
-proc XkbAddGeomOutline*(shape: PXkbShapePtr, sz_points: int16): PXkbOutlinePtr{.
-    libx11c, importc: "XkbAddGeomOutline".}
-proc XkbAddGeomShape*(geom: PXkbGeometryPtr, name: TAtom, sz_outlines: int16): PXkbShapePtr{.
-    libx11c, importc: "XkbAddGeomShape".}
-proc XkbAddGeomKey*(row: PXkbRowPtr): PXkbKeyPtr{.libx11c, 
-    importc: "XkbAddGeomKey".}
-proc XkbAddGeomRow*(section: PXkbSectionPtr, sz_keys: int16): PXkbRowPtr{.libx11c, importc: "XkbAddGeomRow".}
-proc XkbAddGeomSection*(geom: PXkbGeometryPtr, name: TAtom, sz_rows: int16, 
-                        sz_doodads: int16, sz_overlays: int16): PXkbSectionPtr{.
-    libx11c, importc: "XkbAddGeomSection".}
-proc XkbAddGeomOverlay*(section: PXkbSectionPtr, name: TAtom, sz_rows: int16): PXkbOverlayPtr{.
-    libx11c, importc: "XkbAddGeomOverlay".}
-proc XkbAddGeomOverlayRow*(overlay: PXkbOverlayPtr, row_under: int16, 
-                           sz_keys: int16): PXkbOverlayRowPtr{.libx11c, importc: "XkbAddGeomOverlayRow".}
-proc XkbAddGeomOverlayKey*(overlay: PXkbOverlayPtr, row: PXkbOverlayRowPtr, 
-                           over: cstring, under: cstring): PXkbOverlayKeyPtr{.
-    libx11c, importc: "XkbAddGeomOverlayKey".}
-proc XkbAddGeomDoodad*(geom: PXkbGeometryPtr, section: PXkbSectionPtr, 
-                       name: TAtom): PXkbDoodadPtr{.libx11c, 
-    importc: "XkbAddGeomDoodad".}
-proc XkbFreeGeomKeyAliases*(geom: PXkbGeometryPtr, first: int16, count: int16, 
-                            freeAll: bool){.libx11c, 
-    importc: "XkbFreeGeomKeyAliases".}
-proc XkbFreeGeomColors*(geom: PXkbGeometryPtr, first: int16, count: int16, 
-                        freeAll: bool){.libx11c, 
-                                        importc: "XkbFreeGeomColors".}
-proc XkbFreeGeomDoodads*(doodads: PXkbDoodadPtr, nDoodads: int16, freeAll: bool){.
-    libx11c, importc: "XkbFreeGeomDoodads".}
-proc XkbFreeGeomProperties*(geom: PXkbGeometryPtr, first: int16, count: int16, 
-                            freeAll: bool){.libx11c, 
-    importc: "XkbFreeGeomProperties".}
-proc XkbFreeGeomOverlayKeys*(row: PXkbOverlayRowPtr, first: int16, count: int16, 
-                             freeAll: bool){.libx11c, 
-    importc: "XkbFreeGeomOverlayKeys".}
-proc XkbFreeGeomOverlayRows*(overlay: PXkbOverlayPtr, first: int16, 
-                             count: int16, freeAll: bool){.libx11c, importc: "XkbFreeGeomOverlayRows".}
-proc XkbFreeGeomOverlays*(section: PXkbSectionPtr, first: int16, count: int16, 
-                          freeAll: bool){.libx11c, 
-    importc: "XkbFreeGeomOverlays".}
-proc XkbFreeGeomKeys*(row: PXkbRowPtr, first: int16, count: int16, freeAll: bool){.
-    libx11c, importc: "XkbFreeGeomKeys".}
-proc XkbFreeGeomRows*(section: PXkbSectionPtr, first: int16, count: int16, 
-                      freeAll: bool){.libx11c, 
-                                      importc: "XkbFreeGeomRows".}
-proc XkbFreeGeomSections*(geom: PXkbGeometryPtr, first: int16, count: int16, 
-                          freeAll: bool){.libx11c, 
-    importc: "XkbFreeGeomSections".}
-proc XkbFreeGeomPoints*(outline: PXkbOutlinePtr, first: int16, count: int16, 
-                        freeAll: bool){.libx11c, 
-                                        importc: "XkbFreeGeomPoints".}
-proc XkbFreeGeomOutlines*(shape: PXkbShapePtr, first: int16, count: int16, 
-                          freeAll: bool){.libx11c, 
-    importc: "XkbFreeGeomOutlines".}
-proc XkbFreeGeomShapes*(geom: PXkbGeometryPtr, first: int16, count: int16, 
-                        freeAll: bool){.libx11c, 
-                                        importc: "XkbFreeGeomShapes".}
-proc XkbFreeGeometry*(geom: PXkbGeometryPtr, which: int16, freeMap: bool){.
-    libx11c, importc: "XkbFreeGeometry".}
-proc XkbAllocGeomProps*(geom: PXkbGeometryPtr, nProps: int16): TStatus{.libx11c, importc: "XkbAllocGeomProps".}
-proc XkbAllocGeomKeyAliases*(geom: PXkbGeometryPtr, nAliases: int16): TStatus{.
-    libx11c, importc: "XkbAllocGeomKeyAliases".}
-proc XkbAllocGeomColors*(geom: PXkbGeometryPtr, nColors: int16): TStatus{.libx11c, importc: "XkbAllocGeomColors".}
-proc XkbAllocGeomShapes*(geom: PXkbGeometryPtr, nShapes: int16): TStatus{.libx11c, importc: "XkbAllocGeomShapes".}
-proc XkbAllocGeomSections*(geom: PXkbGeometryPtr, nSections: int16): TStatus{.
-    libx11c, importc: "XkbAllocGeomSections".}
-proc XkbAllocGeomOverlays*(section: PXkbSectionPtr, num_needed: int16): TStatus{.
-    libx11c, importc: "XkbAllocGeomOverlays".}
-proc XkbAllocGeomOverlayRows*(overlay: PXkbOverlayPtr, num_needed: int16): TStatus{.
-    libx11c, importc: "XkbAllocGeomOverlayRows".}
-proc XkbAllocGeomOverlayKeys*(row: PXkbOverlayRowPtr, num_needed: int16): TStatus{.
-    libx11c, importc: "XkbAllocGeomOverlayKeys".}
-proc XkbAllocGeomDoodads*(geom: PXkbGeometryPtr, nDoodads: int16): TStatus{.
-    libx11c, importc: "XkbAllocGeomDoodads".}
-proc XkbAllocGeomSectionDoodads*(section: PXkbSectionPtr, nDoodads: int16): TStatus{.
-    libx11c, importc: "XkbAllocGeomSectionDoodads".}
-proc XkbAllocGeomOutlines*(shape: PXkbShapePtr, nOL: int16): TStatus{.libx11c, importc: "XkbAllocGeomOutlines".}
-proc XkbAllocGeomRows*(section: PXkbSectionPtr, nRows: int16): TStatus{.libx11c, importc: "XkbAllocGeomRows".}
-proc XkbAllocGeomPoints*(ol: PXkbOutlinePtr, nPts: int16): TStatus{.libx11c, importc: "XkbAllocGeomPoints".}
-proc XkbAllocGeomKeys*(row: PXkbRowPtr, nKeys: int16): TStatus{.libx11c, importc: "XkbAllocGeomKeys".}
-proc XkbAllocGeometry*(xkb: PXkbDescPtr, sizes: PXkbGeometrySizesPtr): TStatus{.
-    libx11c, importc: "XkbAllocGeometry".}
-proc XkbSetGeometryProc*(dpy: PDisplay, deviceSpec: int16, geom: PXkbGeometryPtr): TStatus{.
-    libx11c, importc: "XkbSetGeometry".}
-proc XkbComputeShapeTop*(shape: PXkbShapePtr, bounds: PXkbBoundsPtr): bool{.
-    libx11c, importc: "XkbComputeShapeTop".}
-proc XkbComputeShapeBounds*(shape: PXkbShapePtr): bool{.libx11c, 
-    importc: "XkbComputeShapeBounds".}
-proc XkbComputeRowBounds*(geom: PXkbGeometryPtr, section: PXkbSectionPtr, 
-                          row: PXkbRowPtr): bool{.libx11c, 
-    importc: "XkbComputeRowBounds".}
-proc XkbComputeSectionBounds*(geom: PXkbGeometryPtr, section: PXkbSectionPtr): bool{.
-    libx11c, importc: "XkbComputeSectionBounds".}
-proc XkbFindOverlayForKey*(geom: PXkbGeometryPtr, wanted: PXkbSectionPtr, 
-                           under: cstring): cstring{.libx11c, 
-    importc: "XkbFindOverlayForKey".}
-proc XkbGetGeometryProc*(dpy: PDisplay, xkb: PXkbDescPtr): TStatus{.libx11c, importc: "XkbGetGeometry".}
-proc XkbGetNamedGeometry*(dpy: PDisplay, xkb: PXkbDescPtr, name: TAtom): TStatus{.
-    libx11c, importc: "XkbGetNamedGeometry".}
-when defined(XKB_IN_SERVER): 
-  proc SrvXkbAddGeomKeyAlias*(geom: PXkbGeometryPtr, alias: cstring, 
-                              float: cstring): PXkbKeyAliasPtr{.libx11c, importc: "XkbAddGeomKeyAlias".}
-  proc SrvXkbAddGeomColor*(geom: PXkbGeometryPtr, spec: cstring, pixel: int16): PXkbColorPtr{.
-      libx11c, importc: "XkbAddGeomColor".}
-  proc SrvXkbAddGeomDoodad*(geom: PXkbGeometryPtr, section: PXkbSectionPtr, 
-                            name: TAtom): PXkbDoodadPtr{.libx11c, 
-      importc: "XkbAddGeomDoodad".}
-  proc SrvXkbAddGeomKey*(geom: PXkbGeometryPtr, alias: cstring, float: cstring): PXkbKeyAliasPtr{.
-      libx11c, importc: "XkbAddGeomKeyAlias".}
-  proc SrvXkbAddGeomOutline*(shape: PXkbShapePtr, sz_points: int16): PXkbOutlinePtr{.
-      libx11c, importc: "XkbAddGeomOutline".}
-  proc SrvXkbAddGeomOverlay*(overlay: PXkbOverlayPtr, row: PXkbOverlayRowPtr, 
-                             over: cstring, under: cstring): PXkbOverlayKeyPtr{.
-      libx11c, importc: "XkbAddGeomOverlayKey".}
-  proc SrvXkbAddGeomOverlayRow*(overlay: PXkbOverlayPtr, row_under: int16, 
-                                sz_keys: int16): PXkbOverlayRowPtr{.libx11c, importc: "XkbAddGeomOverlayRow".}
-  proc SrvXkbAddGeomOverlayKey*(overlay: PXkbOverlayPtr, row: PXkbOverlayRowPtr, 
-                                over: cstring, under: cstring): PXkbOverlayKeyPtr{.
-      libx11c, importc: "XkbAddGeomOverlayKey".}
-  proc SrvXkbAddGeomProperty*(geom: PXkbGeometryPtr, name: cstring, 
-                              value: cstring): PXkbPropertyPtr{.libx11c, importc: "XkbAddGeomProperty".}
-  proc SrvXkbAddGeomRow*(section: PXkbSectionPtr, sz_keys: int16): PXkbRowPtr{.
-      libx11c, importc: "XkbAddGeomRow".}
-  proc SrvXkbAddGeomSection*(geom: PXkbGeometryPtr, name: TAtom, sz_rows: int16, 
-                             sz_doodads: int16, sz_overlays: int16): PXkbSectionPtr{.
-      libx11c, importc: "XkbAddGeomSection".}
-  proc SrvXkbAddGeomShape*(geom: PXkbGeometryPtr, name: TAtom, 
-                           sz_outlines: int16): PXkbShapePtr{.libx11c, importc: "XkbAddGeomShape".}
-  proc SrvXkbAllocGeomKeyAliases*(geom: PXkbGeometryPtr, nAliases: int16): TStatus{.
-      libx11c, importc: "XkbAllocGeomKeyAliases".}
-  proc SrvXkbAllocGeomColors*(geom: PXkbGeometryPtr, nColors: int16): TStatus{.
-      libx11c, importc: "XkbAllocGeomColors".}
-  proc SrvXkbAllocGeomDoodads*(geom: PXkbGeometryPtr, nDoodads: int16): TStatus{.
-      libx11c, importc: "XkbAllocGeomDoodads".}
-  proc SrvXkbAllocGeomKeys*(row: PXkbRowPtr, nKeys: int16): TStatus{.libx11c, importc: "XkbAllocGeomKeys".}
-  proc SrvXkbAllocGeomOutlines*(shape: PXkbShapePtr, nOL: int16): TStatus{.
-      libx11c, importc: "XkbAllocGeomOutlines".}
-  proc SrvXkbAllocGeomPoints*(ol: PXkbOutlinePtr, nPts: int16): TStatus{.libx11c, importc: "XkbAllocGeomPoints".}
-  proc SrvXkbAllocGeomProps*(geom: PXkbGeometryPtr, nProps: int16): TStatus{.
-      libx11c, importc: "XkbAllocGeomProps".}
-  proc SrvXkbAllocGeomRows*(section: PXkbSectionPtr, nRows: int16): TStatus{.
-      libx11c, importc: "XkbAllocGeomRows".}
-  proc SrvXkbAllocGeomSectionDoodads*(section: PXkbSectionPtr, nDoodads: int16): TStatus{.
-      libx11c, importc: "XkbAllocGeomSectionDoodads".}
-  proc SrvXkbAllocGeomSections*(geom: PXkbGeometryPtr, nSections: int16): TStatus{.
-      libx11c, importc: "XkbAllocGeomSections".}
-  proc SrvXkbAllocGeomOverlays*(section: PXkbSectionPtr, num_needed: int16): TStatus{.
-      libx11c, importc: "XkbAllocGeomOverlays".}
-  proc SrvXkbAllocGeomOverlayRows*(overlay: PXkbOverlayPtr, num_needed: int16): TStatus{.
-      libx11c, importc: "XkbAllocGeomOverlayRows".}
-  proc SrvXkbAllocGeomOverlayKeys*(row: PXkbOverlayRowPtr, num_needed: int16): TStatus{.
-      libx11c, importc: "XkbAllocGeomOverlayKeys".}
-  proc SrvXkbAllocGeomShapes*(geom: PXkbGeometryPtr, nShapes: int16): TStatus{.
-      libx11c, importc: "XkbAllocGeomShapes".}
-  proc SrvXkbAllocGeometry*(xkb: PXkbDescPtr, sizes: PXkbGeometrySizesPtr): TStatus{.
-      libx11c, importc: "XkbAllocGeometry".}
-  proc SrvXkbFreeGeomKeyAliases*(geom: PXkbGeometryPtr, first: int16, 
-                                 count: int16, freeAll: bool){.libx11c, importc: "XkbFreeGeomKeyAliases".}
-  proc SrvXkbFreeGeomColors*(geom: PXkbGeometryPtr, first: int16, count: int16, 
-                             freeAll: bool){.libx11c, 
-      importc: "XkbFreeGeomColors".}
-  proc SrvXkbFreeGeomDoodads*(doodads: PXkbDoodadPtr, nDoodads: int16, 
-                              freeAll: bool){.libx11c, 
-      importc: "XkbFreeGeomDoodads".}
-  proc SrvXkbFreeGeomProperties*(geom: PXkbGeometryPtr, first: int16, 
-                                 count: int16, freeAll: bool){.libx11c, importc: "XkbFreeGeomProperties".}
-  proc SrvXkbFreeGeomOverlayKeys*(row: PXkbOverlayRowPtr, first: int16, 
-                                  count: int16, freeAll: bool){.libx11c, importc: "XkbFreeGeomOverlayKeys".}
-  proc SrvXkbFreeGeomOverlayRows*(overlay: PXkbOverlayPtr, first: int16, 
-                                  count: int16, freeAll: bool){.libx11c, importc: "XkbFreeGeomOverlayRows".}
-  proc SrvXkbFreeGeomOverlays*(section: PXkbSectionPtr, first: int16, 
-                               count: int16, freeAll: bool){.libx11c, importc: "XkbFreeGeomOverlays".}
-  proc SrvXkbFreeGeomKeys*(row: PXkbRowPtr, first: int16, count: int16, 
-                           freeAll: bool){.libx11c, 
-      importc: "XkbFreeGeomKeys".}
-  proc SrvXkbFreeGeomRows*(section: PXkbSectionPtr, first: int16, count: int16, 
-                           freeAll: bool){.libx11c, 
-      importc: "XkbFreeGeomRows".}
-  proc SrvXkbFreeGeomSections*(geom: PXkbGeometryPtr, first: int16, 
-                               count: int16, freeAll: bool){.libx11c, importc: "XkbFreeGeomSections".}
-  proc SrvXkbFreeGeomPoints*(outline: PXkbOutlinePtr, first: int16, 
-                             count: int16, freeAll: bool){.libx11c, importc: "XkbFreeGeomPoints".}
-  proc SrvXkbFreeGeomOutlines*(shape: PXkbShapePtr, first: int16, count: int16, 
-                               freeAll: bool){.libx11c, 
-      importc: "XkbFreeGeomOutlines".}
-  proc SrvXkbFreeGeomShapes*(geom: PXkbGeometryPtr, first: int16, count: int16, 
-                             freeAll: bool){.libx11c, 
-      importc: "XkbFreeGeomShapes".}
-  proc SrvXkbFreeGeometry*(geom: PXkbGeometryPtr, which: int16, freeMap: bool){.
-      libx11c, importc: "XkbFreeGeometry".}
-# implementation
-
-import                        #************************************ xkb ************************************
-  xi
-
-proc XkbLegalXILedClass(c: int): bool = 
-  ##define XkbLegalXILedClass(c) (((c)==KbdFeedbackClass)||((c)==LedFeedbackClass)||
-  #                                ((c)==XkbDfltXIClass)||((c)==XkbAllXIClasses))
-  Result = (c == KbdFeedbackClass) or (c == LedFeedbackClass) or
-      (c == XkbDfltXIClass) or (c == XkbAllXIClasses)
-
-proc XkbLegalXIBellClass(c: int): bool = 
-  ##define XkbLegalXIBellClass(c) (((c)==KbdFeedbackClass)||((c)==BellFeedbackClass)||
-  #                                 ((c)==XkbDfltXIClass)||((c)==XkbAllXIClasses))
-  Result = (c == KbdFeedbackClass) or (c == BellFeedbackClass) or
-      (c == XkbDfltXIClass) or (c == XkbAllXIClasses)
-
-proc XkbExplicitXIDevice(c: int): bool = 
-  ##define XkbExplicitXIDevice(c) (((c)&(~0xff))==0)
-  Result = (c and (not 0x000000FF)) == 0
-
-proc XkbExplicitXIClass(c: int): bool = 
-  ##define XkbExplicitXIClass(c) (((c)&(~0xff))==0)
-  Result = (c and (not 0x000000FF)) == 0
-
-proc XkbExplicitXIId(c: int): bool = 
-  ##define XkbExplicitXIId(c) (((c)&(~0xff))==0)
-  Result = (c and (not 0x000000FF)) == 0
-
-proc XkbSingleXIClass(c: int): bool = 
-  ##define XkbSingleXIClass(c) ((((c)&(~0xff))==0)||((c)==XkbDfltXIClass))
-  Result = ((c and (not 0x000000FF)) == 0) or (c == XkbDfltXIClass)
-
-proc XkbSingleXIId(c: int): bool = 
-  ##define XkbSingleXIId(c) ((((c)&(~0xff))==0)||((c)==XkbDfltXIId))
-  Result = ((c and (not 0x000000FF)) == 0) or (c == XkbDfltXIId)
-
-proc XkbBuildCoreState(m, g: int): int = 
-  ##define XkbBuildCoreState(m,g) ((((g)&0x3)<<13)|((m)&0xff))
-  Result = ((g and 0x00000003) shl 13) or (m and 0x000000FF)
-
-proc XkbGroupForCoreState(s: int): int = 
-  ##define XkbGroupForCoreState(s) (((s)>>13)&0x3)
-  Result = (s shr 13) and 0x00000003
-
-proc XkbIsLegalGroup(g: int): bool = 
-  ##define XkbIsLegalGroup(g) (((g)>=0)&&((g)<XkbNumKbdGroups))
-  Result = (g >= 0) and (g < XkbNumKbdGroups)
-
-proc XkbSA_ValOp(a: int): int = 
-  ##define XkbSA_ValOp(a) ((a)&XkbSA_ValOpMask)
-  Result = a and XkbSA_ValOpMask
-
-proc XkbSA_ValScale(a: int): int = 
-  ##define XkbSA_ValScale(a) ((a)&XkbSA_ValScaleMask)
-  Result = a and XkbSA_ValScaleMask
-
-proc XkbIsModAction(a: PXkbAnyAction): bool = 
-  ##define XkbIsModAction(a) (((a)->type>=Xkb_SASetMods)&&((a)->type<=XkbSA_LockMods))
-  Result = (ze(a.theType) >= XkbSA_SetMods) and (ze(a.theType) <= XkbSA_LockMods)
-
-proc XkbIsGroupAction(a: PXkbAnyAction): bool = 
-  ##define XkbIsGroupAction(a) (((a)->type>=XkbSA_SetGroup)&&((a)->type<=XkbSA_LockGroup))
-  Result = (ze(a.theType) >= XkbSA_SetGroup) or (ze(a.theType) <= XkbSA_LockGroup)
-
-proc XkbIsPtrAction(a: PXkbAnyAction): bool = 
-  ##define XkbIsPtrAction(a) (((a)->type>=XkbSA_MovePtr)&&((a)->type<=XkbSA_SetPtrDflt))
-  Result = (ze(a.theType) >= XkbSA_MovePtr) and
-      (ze(a.theType) <= XkbSA_SetPtrDflt)
-
-proc XkbIsLegalKeycode(k: int): bool = 
-  ##define        XkbIsLegalKeycode(k)    (((k)>=XkbMinLegalKeyCode)&&((k)<=XkbMaxLegalKeyCode))
-  Result = (k >= XkbMinLegalKeyCode) and (k <= XkbMaxLegalKeyCode)
-
-proc XkbShiftLevel(n: int8): int8 = 
-  ##define XkbShiftLevel(n) ((n)-1)
-  Result = n - 1'i8
-
-proc XkbShiftLevelMask(n: int8): int8 = 
-  ##define XkbShiftLevelMask(n) (1<<((n)-1))
-  Result = 1'i8 shl (n - 1'i8)
-
-proc XkbCharToInt(v: int8): int16 = 
-  ##define XkbCharToInt(v) ((v)&0x80?(int)((v)|(~0xff)):(int)((v)&0x7f))
-  if ((v and 0x80'i8) != 0'i8): Result = v or (not 0xFF'i16)
-  else: Result = int16(v and 0x7F'i8)
-  
-proc XkbIntTo2Chars(i: int16, h, L: var int8) = 
-  ##define XkbIntTo2Chars(i,h,l) (((h)=((i>>8)&0xff)),((l)=((i)&0xff)))
-  h = toU8((i shr 8'i16) and 0x00FF'i16)
-  L = toU8(i and 0xFF'i16)
-
-proc Xkb2CharsToInt(h, L: int8): int16 = 
-  when defined(cpu64): 
-    ##define Xkb2CharsToInt(h,l) ((h)&0x80?(int)(((h)<<8)|(l)|(~0xffff)): (int)(((h)<<8)|(l)&0x7fff))
-    if (h and 0x80'i8) != 0'i8: 
-      Result = toU16((ze(h) shl 8) or ze(L) or not 0x0000FFFF)
-    else: 
-      Result = toU16((ze(h) shl 8) or ze(L) and 0x00007FFF)
-  else: 
-    ##define Xkb2CharsToInt(h,l) ((short)(((h)<<8)|(l)))
-    Result = toU16(ze(h) shl 8 or ze(L))
-
-proc XkbModLocks(s: PXkbStatePtr): int8 = 
-  ##define XkbModLocks(s) ((s)->locked_mods)
-  Result = s.locked_mods
-
-proc XkbStateMods(s: PXkbStatePtr): int16 = 
-  ##define XkbStateMods(s) ((s)->base_mods|(s)->latched_mods|XkbModLocks(s))
-  Result = s.base_mods or s.latched_mods or XkbModLocks(s)
-
-proc XkbGroupLock(s: PXkbStatePtr): int8 = 
-  ##define XkbGroupLock(s) ((s)->locked_group)
-  Result = s.locked_group
-
-proc XkbStateGroup(s: PXkbStatePtr): int16 = 
-  ##define XkbStateGroup(s) ((s)->base_group+(s)->latched_group+XkbGroupLock(s))
-  Result = S.base_group + (s.latched_group) + XkbGroupLock(s)
-
-proc XkbStateFieldFromRec(s: PXkbStatePtr): int = 
-  ##define XkbStateFieldFromRec(s) XkbBuildCoreState((s)->lookup_mods,(s)->group)
-  Result = XkbBuildCoreState(s.lookup_mods, s.group)
-
-proc XkbGrabStateFromRec(s: PXkbStatePtr): int = 
-  ##define XkbGrabStateFromRec(s) XkbBuildCoreState((s)->grab_mods,(s)->group)
-  Result = XkbBuildCoreState(s.grab_mods, s.group)
-
-proc XkbNumGroups(g: int16): int16 = 
-  ##define XkbNumGroups(g) ((g)&0x0f)
-  Result = g and 0x0000000F'i16
-
-proc XkbOutOfRangeGroupInfo(g: int16): int16 = 
-  ##define XkbOutOfRangeGroupInfo(g) ((g)&0xf0)
-  Result = g and 0x000000F0'i16
-
-proc XkbOutOfRangeGroupAction(g: int16): int16 = 
-  ##define XkbOutOfRangeGroupAction(g) ((g)&0xc0)
-  Result = g and 0x000000C0'i16
-
-proc XkbOutOfRangeGroupNumber(g: int16): int16 = 
-  ##define XkbOutOfRangeGroupNumber(g) (((g)&0x30)>>4)
-  Result = (g and 0x00000030'i16) shr 4'i16
-
-proc XkbSetGroupInfo(g, w, n: int16): int16 = 
-  ##define XkbSetGroupInfo(g,w,n) (((w)&0xc0)|(((n)&3)<<4)|((g)&0x0f))
-  Result = (w and 0x000000C0'i16) or 
-    ((n and 3'i16) shl 4'i16) or (g and 0x0000000F'i16)
-
-proc XkbSetNumGroups(g, n: int16): int16 = 
-  ##define XkbSetNumGroups(g,n) (((g)&0xf0)|((n)&0x0f))
-  Result = (g and 0x000000F0'i16) or (n and 0x0000000F'i16)
-
-proc XkbModActionVMods(a: PXkbModAction): int16 = 
-  ##define XkbModActionVMods(a) ((short)(((a)->vmods1<<8)|((a)->vmods2)))
-  Result = toU16((ze(a.vmods1) shl 8) or ze(a.vmods2))
-
-proc XkbSetModActionVMods(a: PXkbModAction, v: int8) = 
-  ##define XkbSetModActionVMods(a,v) (((a)->vmods1=(((v)>>8)&0xff)),(a)->vmods2=((v)&0xff))
-  a.vmods1 = toU8((ze(v) shr 8) and 0x000000FF)
-  a.vmods2 = toU8(ze(v) and 0x000000FF)
-
-proc XkbSAGroup(a: PXkbGroupAction): int8 = 
-  ##define XkbSAGroup(a) (XkbCharToInt((a)->group_XXX))
-  Result = int8(XkbCharToInt(a.group_XXX))
-
-proc XkbSASetGroupProc(a: PXkbGroupAction, g: int8) = 
-  ##define XkbSASetGroup(a,g) ((a)->group_XXX=(g))
-  a.group_XXX = g
-
-proc XkbPtrActionX(a: PXkbPtrAction): int16 = 
-  ##define XkbPtrActionX(a) (Xkb2CharsToInt((a)->high_XXX,(a)->low_XXX))
-  Result = int16(Xkb2CharsToInt(a.high_XXX, a.low_XXX))
-
-proc XkbPtrActionY(a: PXkbPtrAction): int16 = 
-  ##define XkbPtrActionY(a) (Xkb2CharsToInt((a)->high_YYY,(a)->low_YYY))
-  Result = int16(Xkb2CharsToInt(a.high_YYY, a.low_YYY))
-
-proc XkbSetPtrActionX(a: PXkbPtrAction, x: int8) = 
-  ##define XkbSetPtrActionX(a,x) (XkbIntTo2Chars(x,(a)->high_XXX,(a)->low_XXX))
-  XkbIntTo2Chars(x, a.high_XXX, a.low_XXX)
-
-proc XkbSetPtrActionY(a: PXkbPtrAction, y: int8) = 
-  ##define XkbSetPtrActionY(a,y) (XkbIntTo2Chars(y,(a)->high_YYY,(a)->low_YYY))
-  XkbIntTo2Chars(y, a.high_YYY, a.low_YYY)
-
-proc XkbSAPtrDfltValue(a: PXkbPtrDfltAction): int8 = 
-  ##define XkbSAPtrDfltValue(a) (XkbCharToInt((a)->valueXXX))
-  Result = int8(XkbCharToInt(a.valueXXX))
-
-proc XkbSASetPtrDfltValue(a: PXkbPtrDfltAction, c: pointer) = 
-  ##define XkbSASetPtrDfltValue(a,c) ((a)->valueXXX= ((c)&0xff))
-  a.valueXXX = toU8(cast[int](c))
-
-proc XkbSAScreen(a: PXkbSwitchScreenAction): int8 = 
-  ##define XkbSAScreen(a) (XkbCharToInt((a)->screenXXX))
-  Result = toU8(XkbCharToInt(a.screenXXX))
-
-proc XkbSASetScreen(a: PXkbSwitchScreenAction, s: pointer) = 
-  ##define XkbSASetScreen(a,s) ((a)->screenXXX= ((s)&0xff))
-  a.screenXXX = toU8(cast[int](s))
-
-proc XkbActionSetCtrls(a: PXkbCtrlsAction, c: int8) = 
-  ##define XkbActionSetCtrls(a,c) (((a)->ctrls3=(((c)>>24)&0xff)),((a)->ctrls2=(((c)>>16)&0xff)),
-  #                                 ((a)->ctrls1=(((c)>>8)&0xff)),((a)->ctrls0=((c)&0xff)))        
-  a.ctrls3 = toU8((ze(c) shr 24) and 0x000000FF)
-  a.ctrls2 = toU8((ze(c) shr 16) and 0x000000FF)
-  a.ctrls1 = toU8((ze(c) shr 8) and 0x000000FF)
-  a.ctrls0 = toU8(ze(c) and 0x000000FF)
-
-proc XkbActionCtrls(a: PXkbCtrlsAction): int16 = 
-  ##define XkbActionCtrls(a) ((((unsigned int)(a)->ctrls3)<<24)|(((unsigned int)(a)->ctrls2)<<16)|
-  #                            (((unsigned int)(a)->ctrls1)<<8)|((unsigned int)((a)->ctrls0)))      
-  Result = toU16((ze(a.ctrls3) shl 24) or (ze(a.ctrls2) shl 16) or 
-     (ze(a.ctrls1) shl 8) or ze(a.ctrls0))
-
-proc XkbSARedirectVMods(a: PXkbRedirectKeyAction): int16 = 
-  ##define XkbSARedirectVMods(a) ((((unsigned int)(a)->vmods1)<<8)|((unsigned int)(a)->vmods0))
-  Result = toU16((ze(a.vmods1) shl 8) or ze(a.vmods0))
-
-proc XkbSARedirectSetVMods(a: PXkbRedirectKeyAction, m: int8) = 
-  ##define XkbSARedirectSetVMods(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),((a)->vmods_mask0=((m)&0xff)))
-  a.vmods_mask1 = toU8((ze(m) shr 8) and 0x000000FF)
-  a.vmods_mask0 = toU8(ze(m) or 0x000000FF)
-
-proc XkbSARedirectVModsMask(a: PXkbRedirectKeyAction): int16 = 
-  ##define XkbSARedirectVModsMask(a) ((((unsigned int)(a)->vmods_mask1)<<8)|
-  #                                     ((unsigned int)(a)->vmods_mask0))
-  Result = toU16((ze(a.vmods_mask1) shl 8) or ze(a.vmods_mask0))
-
-proc XkbSARedirectSetVModsMask(a: PXkbRedirectKeyAction, m: int8) = 
-  ##define XkbSARedirectSetVModsMask(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),((a)->vmods_mask0=((m)&0xff)))
-  a.vmods_mask1 = toU8(ze(m) shr 8 and 0x000000FF)
-  a.vmods_mask0 = toU8(ze(m) and 0x000000FF)
-
-proc XkbAX_AnyFeedback(c: PXkbControlsPtr): int16 = 
-  ##define XkbAX_AnyFeedback(c) ((c)->enabled_ctrls&XkbAccessXFeedbackMask)
-  Result = toU16(ze(c.enabled_ctrls) and XkbAccessXFeedbackMask)
-
-proc XkbAX_NeedOption(c: PXkbControlsPtr, w: int16): int16 = 
-  ##define XkbAX_NeedOption(c,w) ((c)->ax_options&(w))
-  Result = toU16(ze(c.ax_options) and ze(w))
-
-proc XkbAX_NeedFeedback(c: PXkbControlsPtr, w: int16): bool = 
-  ##define XkbAX_NeedFeedback(c,w) (XkbAX_AnyFeedback(c)&&XkbAX_NeedOption(c,w))
-  Result = (XkbAX_AnyFeedback(c) > 0'i16) and (XkbAX_NeedOption(c, w) > 0'i16)
-
-proc XkbSMKeyActionsPtr(m: PXkbServerMapPtr, k: int16): PXkbAction = 
-  ##define XkbSMKeyActionsPtr(m,k) (&(m)->acts[(m)->key_acts[k]])
-  Result = addr(m.acts[ze(m.key_acts[ze(k)])])
-
-proc XkbCMKeyGroupInfo(m: PXkbClientMapPtr, k: int16): int8 = 
-  ##define XkbCMKeyGroupInfo(m,k) ((m)->key_sym_map[k].group_info)
-  Result = m.key_sym_map[ze(k)].group_info
-
-proc XkbCMKeyNumGroups(m: PXkbClientMapPtr, k: int16): int8 = 
-  ##define XkbCMKeyNumGroups(m,k) (XkbNumGroups((m)->key_sym_map[k].group_info))
-  Result = toU8(XkbNumGroups(m.key_sym_map[ze(k)].group_info))
-
-proc XkbCMKeyGroupWidth(m: PXkbClientMapPtr, k: int16, g: int8): int8 = 
-  ##define XkbCMKeyGroupWidth(m,k,g) (XkbCMKeyType(m,k,g)->num_levels)
-  Result = XkbCMKeyType(m, k, g).num_levels
-
-proc XkbCMKeyGroupsWidth(m: PXkbClientMapPtr, K: int16): int8 = 
-  ##define XkbCMKeyGroupsWidth(m,k) ((m)->key_sym_map[k].width)
-  Result = m.key_sym_map[ze(k)].width
-
-proc XkbCMKeyTypeIndex(m: PXkbClientMapPtr, k: int16, g: int8): int8 = 
-  ##define XkbCMKeyTypeIndex(m,k,g) ((m)->key_sym_map[k].kt_index[g&0x3])
-  Result = m.key_sym_map[ze(k)].kt_index[ze(g) and 0x00000003]
-
-proc XkbCMKeyType(m: PXkbClientMapPtr, k: int16, g: int8): PXkbKeyTypePtr = 
-  ##define XkbCMKeyType(m,k,g) (&(m)->types[XkbCMKeyTypeIndex(m,k,g)])
-  Result = addr(m.types[ze(XkbCMKeyTypeIndex(m, k, g))])
-
-proc XkbCMKeyNumSyms(m: PXkbClientMapPtr, k: int16): int16 = 
-  ##define XkbCMKeyNumSyms(m,k) (XkbCMKeyGroupsWidth(m,k)*XkbCMKeyNumGroups(m,k))
-  Result = toU16(ze(XkbCMKeyGroupsWidth(m, k)) or ze(XkbCMKeyNumGroups(m, k)))
-
-proc XkbCMKeySymsOffset(m: PXkbClientMapPtr, k: int16): int8 = 
-  ##define XkbCMKeySymsOffset(m,k) ((m)->key_sym_map[k].offset)
-  Result = m.key_sym_map[ze(k)].offset
-
-proc XkbCMKeySymsPtr*(m: PXkbClientMapPtr, k: int16): PKeySym = 
-  ##define XkbCMKeySymsPtr(m,k) (&(m)->syms[XkbCMKeySymsOffset(m,k)])
-  Result = addr(m.syms[ze(XkbCMKeySymsOffset(m, k))])
-
-proc XkbIM_IsAuto(i: PXkbIndicatorMapPtr): bool = 
-  ##define XkbIM_IsAuto(i) ((((i)->flags&XkbIM_NoAutomatic)==0)&&(((i)->which_groups&&(i)->groups)||
-  #                           ((i)->which_mods&&(i)->mods.mask)||  ((i)->ctrls)))
-  Result = ((ze(i.flags) and XkbIM_NoAutomatic) == 0) and
-      (((i.which_groups > 0'i8) and (i.groups > 0'i8)) or
-      ((i.which_mods > 0'i8) and (i.mods.mask > 0'i8)) or (i.ctrls > 0'i8))
-
-proc XkbIM_InUse(i: PXkbIndicatorMapPtr): bool = 
-  ##define XkbIM_InUse(i) (((i)->flags)||((i)->which_groups)||((i)->which_mods)||((i)->ctrls)) 
-  Result = (i.flags > 0'i8) or (i.which_groups > 0'i8) or (i.which_mods > 0'i8) or
-      (i.ctrls > 0'i8)
-
-proc XkbKeyKeyTypeIndex(d: PXkbDescPtr, k: int16, g: int8): int8 = 
-  ##define XkbKeyKeyTypeIndex(d,k,g)      (XkbCMKeyTypeIndex((d)->map,k,g))
-  Result = XkbCMKeyTypeIndex(d.map, k, g)
-
-proc XkbKeyKeyType(d: PXkbDescPtr, k: int16, g: int8): PXkbKeyTypePtr = 
-  ##define XkbKeyKeyType(d,k,g) (XkbCMKeyType((d)->map,k,g))
-  Result = XkbCMKeyType(d.map, k, g)
-
-proc XkbKeyGroupWidth(d: PXkbDescPtr, k: int16, g: int8): int8 = 
-  ##define XkbKeyGroupWidth(d,k,g) (XkbCMKeyGroupWidth((d)->map,k,g))
-  Result = XkbCMKeyGroupWidth(d.map, k, g)
-
-proc XkbKeyGroupsWidth(d: PXkbDescPtr, k: int16): int8 = 
-  ##define XkbKeyGroupsWidth(d,k) (XkbCMKeyGroupsWidth((d)->map,k))
-  Result = XkbCMKeyGroupsWidth(d.map, k)
-
-proc XkbKeyGroupInfo(d: PXkbDescPtr, k: int16): int8 = 
-  ##define XkbKeyGroupInfo(d,k) (XkbCMKeyGroupInfo((d)->map,(k)))
-  Result = XkbCMKeyGroupInfo(d.map, k)
-
-proc XkbKeyNumGroups(d: PXkbDescPtr, k: int16): int8 = 
-  ##define XkbKeyNumGroups(d,k) (XkbCMKeyNumGroups((d)->map,(k)))
-  Result = XkbCMKeyNumGroups(d.map, k)
-
-proc XkbKeyNumSyms(d: PXkbDescPtr, k: int16): int16 = 
-  ##define XkbKeyNumSyms(d,k) (XkbCMKeyNumSyms((d)->map,(k)))
-  Result = XkbCMKeyNumSyms(d.map, k)
-
-proc XkbKeySymsPtr*(d: PXkbDescPtr, k: int16): PKeySym = 
-  ##define XkbKeySymsPtr(d,k) (XkbCMKeySymsPtr((d)->map,(k)))
-  Result = XkbCMKeySymsPtr(d.map, k)
-
-proc XkbKeySym(d: PXkbDescPtr, k: int16, n: int16): TKeySym = 
-  ##define XkbKeySym(d,k,n) (XkbKeySymsPtr(d,k)[n])
-  Result = cast[ptr array[0..0xffff, TKeySym]](XkbKeySymsPtr(d, k))[ze(n)] # XXX: this seems strange!
-
-proc XkbKeySymEntry(d: PXkbDescPtr, k: int16, sl: int16, g: int8): TKeySym = 
-  ##define XkbKeySymEntry(d,k,sl,g) (XkbKeySym(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl))))
-  Result = XkbKeySym(d, k, toU16(ze(XkbKeyGroupsWidth(d, k)) * ze(g) + ze(sl)))
-
-proc XkbKeyAction(d: PXkbDescPtr, k: int16, n: int16): PXkbAction = 
-  ##define XkbKeyAction(d,k,n) (XkbKeyHasActions(d,k)?&XkbKeyActionsPtr(d,k)[n]:NULL)
-  #if (XkbKeyHasActions(d, k)): 
-  #  Result = XkbKeyActionsPtr(d, k)[ze(n)] #Buggy !!!
-  assert(false)
-  result = nil
-  
-proc XkbKeyActionEntry(d: PXkbDescPtr, k: int16, sl: int16, g: int8): int8 = 
-  ##define XkbKeyActionEntry(d,k,sl,g) (XkbKeyHasActions(d,k) ?
-  #                                      XkbKeyAction(d, k, ((XkbKeyGroupsWidth(d, k) * (g))+(sl))):NULL)
-  if XkbKeyHasActions(d, k): 
-    Result = XkbKeyGroupsWidth(d, k) *% g +% toU8(sl)
-  else: 
-    Result = 0'i8
-  
-proc XkbKeyHasActions(d: PXkbDescPtr, k: int16): bool = 
-  ##define XkbKeyHasActions(d,k) ((d)->server->key_acts[k]!=0)
-  Result = d.server.key_acts[ze(k)] != 0'i16
-
-proc XkbKeyNumActions(d: PXkbDescPtr, k: int16): int16 = 
-  ##define XkbKeyNumActions(d,k) (XkbKeyHasActions(d,k)?XkbKeyNumSyms(d,k):1)
-  if (XkbKeyHasActions(d, k)): Result = XkbKeyNumSyms(d, k)
-  else: Result = 1'i16
-  
-proc XkbKeyActionsPtr(d: PXkbDescPtr, k: int16): PXkbAction = 
-  ##define XkbKeyActionsPtr(d,k) (XkbSMKeyActionsPtr((d)->server,k))
-  Result = XkbSMKeyActionsPtr(d.server, k)
-
-proc XkbKeycodeInRange(d: PXkbDescPtr, k: int16): bool = 
-  ##define XkbKeycodeInRange(d,k) (((k)>=(d)->min_key_code)&& ((k)<=(d)->max_key_code))
-  Result = (char(toU8(k)) >= d.min_key_code) and (char(toU8(k)) <= d.max_key_code)
-
-proc XkbNumKeys(d: PXkbDescPtr): int8 = 
-  ##define XkbNumKeys(d) ((d)->max_key_code-(d)->min_key_code+1)
-  Result = toU8(ord(d.max_key_code) - ord(d.min_key_code) + 1)
-
-proc XkbXI_DevHasBtnActs(d: PXkbDeviceInfoPtr): bool = 
-  ##define XkbXI_DevHasBtnActs(d) (((d)->num_btns>0)&&((d)->btn_acts!=NULL))
-  Result = (d.num_btns > 0'i16) and (not (d.btn_acts == nil))
-
-proc XkbXI_LegalDevBtn(d: PXkbDeviceInfoPtr, b: int16): bool = 
-  ##define XkbXI_LegalDevBtn(d,b) (XkbXI_DevHasBtnActs(d)&&((b)<(d)->num_btns))
-  Result = XkbXI_DevHasBtnActs(d) and (b <% d.num_btns)
-
-proc XkbXI_DevHasLeds(d: PXkbDeviceInfoPtr): bool = 
-  ##define XkbXI_DevHasLeds(d) (((d)->num_leds>0)&&((d)->leds!=NULL))
-  Result = (d.num_leds > 0'i16) and (not (d.leds == nil))
-
-proc XkbBoundsWidth(b: PXkbBoundsPtr): int16 = 
-  ##define XkbBoundsWidth(b) (((b)->x2)-((b)->x1))
-  Result = (b.x2) - b.x1
-
-proc XkbBoundsHeight(b: PXkbBoundsPtr): int16 = 
-  ##define XkbBoundsHeight(b) (((b)->y2)-((b)->y1))
-  Result = (b.y2) - b.y1
-
-proc XkbOutlineIndex(s: PXkbShapePtr, o: PXkbOutlinePtr): int32 = 
-  ##define XkbOutlineIndex(s,o) ((int)((o)-&(s)->outlines[0]))
-  Result = int32((cast[TAddress](o) - cast[TAddress](addr(s.outlines[0]))) div sizeof(PXkbOutlinePtr))
-
-proc XkbShapeDoodadColor(g: PXkbGeometryPtr, d: PXkbShapeDoodadPtr): PXkbColorPtr = 
-  ##define XkbShapeDoodadColor(g,d) (&(g)->colors[(d)->color_ndx])
-  Result = addr((g.colors[ze(d.color_ndx)]))
-
-proc XkbShapeDoodadShape(g: PXkbGeometryPtr, d: PXkbShapeDoodadPtr): PXkbShapePtr = 
-  ##define XkbShapeDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx])
-  Result = addr(g.shapes[ze(d.shape_ndx)])
-
-proc XkbSetShapeDoodadColor(g: PXkbGeometryPtr, d: PXkbShapeDoodadPtr, 
-                            c: PXkbColorPtr) = 
-  ##define XkbSetShapeDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0])
-  d.color_ndx = toU16((cast[TAddress](c) - cast[TAddress](addr(g.colors[0]))) div sizeof(TXkbColorRec))
-
-proc XkbSetShapeDoodadShape(g: PXkbGeometryPtr, d: PXkbShapeDoodadPtr, 
-                            s: PXkbShapePtr) = 
-  ##define XkbSetShapeDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0])
-  d.shape_ndx = toU16((cast[TAddress](s) - cast[TAddress](addr(g.shapes[0]))) div sizeof(TXkbShapeRec))
-
-proc XkbTextDoodadColor(g: PXkbGeometryPtr, d: PXkbTextDoodadPtr): PXkbColorPtr = 
-  ##define XkbTextDoodadColor(g,d) (&(g)->colors[(d)->color_ndx])
-  Result = addr(g.colors[ze(d.color_ndx)])
-
-proc XkbSetTextDoodadColor(g: PXkbGeometryPtr, d: PXkbTextDoodadPtr, 
-                           c: PXkbColorPtr) = 
-  ##define XkbSetTextDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0])
-  d.color_ndx = toU16((cast[TAddress](c) - cast[TAddress](addr(g.colors[0]))) div sizeof(TXkbColorRec))
-
-proc XkbIndicatorDoodadShape(g: PXkbGeometryPtr, d: PXkbIndicatorDoodadPtr): PXkbShapeDoodadPtr = 
-  ##define XkbIndicatorDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx])
-  Result = cast[PXkbShapeDoodadPtr](addr(g.shapes[ze(d.shape_ndx)]))
-
-proc XkbIndicatorDoodadOnColor(g: PXkbGeometryPtr, d: PXkbIndicatorDoodadPtr): PXkbColorPtr = 
-  ##define XkbIndicatorDoodadOnColor(g,d) (&(g)->colors[(d)->on_color_ndx])
-  Result = addr(g.colors[ze(d.on_color_ndx)])
-
-proc XkbIndicatorDoodadOffColor(g: PXkbGeometryPtr, d: PXkbIndicatorDoodadPtr): PXkbColorPtr = 
-  ##define XkbIndicatorDoodadOffColor(g,d) (&(g)->colors[(d)->off_color_ndx])
-  Result = addr(g.colors[ze(d.off_color_ndx)])
-
-proc XkbSetIndicatorDoodadOnColor(g: PXkbGeometryPtr, d: PXkbIndicatorDoodadPtr, 
-                                  c: PXkbColorPtr) = 
-  ##define XkbSetIndicatorDoodadOnColor(g,d,c) ((d)->on_color_ndx= (c)-&(g)->colors[0])
-  d.on_color_ndx = toU16((cast[TAddress](c) - cast[TAddress](addr(g.colors[0]))) div sizeof(TXkbColorRec))
-
-proc XkbSetIndicatorDoodadOffColor(g: PXkbGeometryPtr, 
-                                   d: PXkbIndicatorDoodadPtr, c: PXkbColorPtr) = 
-  ##define        XkbSetIndicatorDoodadOffColor(g,d,c) ((d)->off_color_ndx= (c)-&(g)->colors[0])
-  d.off_color_ndx = toU16((cast[TAddress](c) - cast[TAddress](addr(g.colors[0]))) div sizeof(TxkbColorRec))
-
-proc XkbSetIndicatorDoodadShape(g: PXkbGeometryPtr, d: PXkbIndicatorDoodadPtr, 
-                                s: PXkbShapeDoodadPtr) = 
-  ##define XkbSetIndicatorDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0])
-  d.shape_ndx = toU16((cast[TAddress](s) - (cast[TAddress](addr(g.shapes[0])))) div sizeof(TXkbShapeRec))
-
-proc XkbLogoDoodadColor(g: PXkbGeometryPtr, d: PXkbLogoDoodadPtr): PXkbColorPtr = 
-  ##define XkbLogoDoodadColor(g,d) (&(g)->colors[(d)->color_ndx])
-  Result = addr(g.colors[ze(d.color_ndx)])
-
-proc XkbLogoDoodadShape(g: PXkbGeometryPtr, d: PXkbLogoDoodadPtr): PXkbShapeDoodadPtr = 
-  ##define XkbLogoDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx])
-  Result = cast[PXkbShapeDoodadPtr](addr(g.shapes[ze(d.shape_ndx)]))
-
-proc XkbSetLogoDoodadColor(g: PXkbGeometryPtr, d: PXkbLogoDoodadPtr, 
-                           c: PXkbColorPtr) = 
-  ##define XkbSetLogoDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0])
-  d.color_ndx = toU16((cast[TAddress](c) - cast[TAddress](addr(g.colors[0]))) div sizeof(TXkbColorRec))
-
-proc XkbSetLogoDoodadShape(g: PXkbGeometryPtr, d: PXkbLogoDoodadPtr, 
-                           s: PXkbShapeDoodadPtr) = 
-  ##define XkbSetLogoDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0])
-  d.shape_ndx = toU16((cast[TAddress](s) - cast[TAddress](addr(g.shapes[0]))) div sizeof(TXkbShapeRec))
-
-proc XkbKeyShape(g: PXkbGeometryPtr, k: PXkbKeyPtr): PXkbShapeDoodadPtr = 
-  ##define XkbKeyShape(g,k) (&(g)->shapes[(k)->shape_ndx])
-  Result = cast[PXkbShapeDoodadPtr](addr(g.shapes[ze(k.shape_ndx)]))
-
-proc XkbKeyColor(g: PXkbGeometryPtr, k: PXkbKeyPtr): PXkbColorPtr = 
-  ##define XkbKeyColor(g,k) (&(g)->colors[(k)->color_ndx])
-  Result = addr(g.colors[ze(k.color_ndx)])
-
-proc XkbSetKeyShape(g: PXkbGeometryPtr, k: PXkbKeyPtr, s: PXkbShapeDoodadPtr) = 
-  ##define XkbSetKeyShape(g,k,s) ((k)->shape_ndx= (s)-&(g)->shapes[0])
-  k.shape_ndx = toU8((cast[TAddress](s) - cast[TAddress](addr(g.shapes[0]))) div sizeof(TXkbShapeRec))
-
-proc XkbSetKeyColor(g: PXkbGeometryPtr, k: PXkbKeyPtr, c: PXkbColorPtr) = 
-  ##define XkbSetKeyColor(g,k,c) ((k)->color_ndx= (c)-&(g)->colors[0])
-  k.color_ndx = toU8((cast[TAddress](c) - cast[TAddress](addr(g.colors[0]))) div sizeof(TxkbColorRec))
-
-proc XkbGeomColorIndex(g: PXkbGeometryPtr, c: PXkbColorPtr): int32 = 
-  ##define XkbGeomColorIndex(g,c) ((int)((c)-&(g)->colors[0]))
-  Result = toU16((cast[TAddress](c) - (cast[TAddress](addr(g.colors[0])))) div sizeof(TxkbColorRec))
diff --git a/lib/wrappers/x11/xkblib.nim b/lib/wrappers/x11/xkblib.nim
deleted file mode 100644
index 1b450f289..000000000
--- a/lib/wrappers/x11/xkblib.nim
+++ /dev/null
@@ -1,661 +0,0 @@
-# $Xorg: XKBlib.h,v 1.6 2000/08/17 19:45:03 cpqbld Exp $
-#************************************************************
-#Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
-#
-#Permission to use, copy, modify, and distribute this
-#software and its documentation for any purpose and without
-#fee is hereby granted, provided that the above copyright
-#notice appear in all copies and that both that copyright
-#notice and this permission notice appear in supporting
-#documentation, and that the name of Silicon Graphics not be
-#used in advertising or publicity pertaining to distribution
-#of the software without specific prior written permission.
-#Silicon Graphics makes no representation about the suitability
-#of this software for any purpose. It is provided "as is"
-#without any express or implied warranty.
-#
-#SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-#SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-#AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-#GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-#DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING `from` LOSS OF USE,
-#DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-#OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION  WITH
-#THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-#********************************************************/
-# $XFree86: xc/lib/X11/XKBlib.h,v 3.3 2001/08/01 00:44:38 tsi Exp $
-#
-# Pascal Convertion was made by Ido Kannner - kanerido@actcom.net.il
-#
-#Thanks:
-#         I want to thanks to oliebol for putting up with all of the problems that was found
-#         while translating this code. ;)
-#
-#         I want to thanks #fpc channel in freenode irc, for helping me, and to put up with my
-#         wierd questions ;)
-#
-#         Thanks for mmc in #xlib on freenode irc And so for the channel itself for the helping me to
-#         understanding some of the problems I had converting this headers and pointing me to resources
-#         that helped translating this headers.
-#
-# Ido
-#
-#History:
-#        2004/10/15        - Fixed a bug of accessing second based records by removing "paced record" and
-#                            chnaged it to "reocrd" only.
-#        2004/10/10        - Added to TXkbGetAtomNameFunc and TXkbInternAtomFunc the cdecl call.
-#        2004/10/06 - 09   - Convertion `from` the c header of XKBlib.h
-#
-#
-
-import 
-  X, Xlib, XKB
-
-
-include "x11pragma.nim"
-
-
-type 
-  PXkbAnyEvent* = ptr TXkbAnyEvent
-  TXkbAnyEvent*{.final.} = object 
-    theType*: int16           # XkbAnyEvent
-    serial*: int32            # # of last req processed by server
-    send_event*: bool         # is this `from` a SendEvent request?
-    display*: PDisplay        # Display the event was read `from`
-    time*: TTime              # milliseconds;
-    xkb_type*: int16          # XKB event minor code
-    device*: int16            # device ID
-  
-
-type 
-  PXkbNewKeyboardNotifyEvent* = ptr TXkbNewKeyboardNotifyEvent
-  TXkbNewKeyboardNotifyEvent*{.final.} = object 
-    theType*: int16           # XkbAnyEvent
-    serial*: int32            # of last req processed by server
-    send_event*: bool         # is this `from` a SendEvent request?
-    display*: PDisplay        # Display the event was read `from`
-    time*: TTime              # milliseconds
-    xkb_type*: int16          # XkbNewKeyboardNotify
-    device*: int16            # device ID
-    old_device*: int16        # device ID of previous keyboard
-    min_key_code*: int16      # minimum key code
-    max_key_code*: int16      # maximum key code
-    old_min_key_code*: int16  # min key code of previous kbd
-    old_max_key_code*: int16  # max key code of previous kbd
-    changed*: int16           # changed aspects of the keyboard
-    req_major*: int8          # major and minor opcode of req
-    req_minor*: int8          # that caused change, if applicable
-  
-
-type 
-  PXkbMapNotifyEvent* = ptr TXkbMapNotifyEvent
-  TXkbMapNotifyEvent*{.final.} = object 
-    theType*: int16           # XkbAnyEvent
-    serial*: int32            # of last req processed by server
-    send_event*: bool         # is this `from` a SendEvent request
-    display*: PDisplay        # Display the event was read `from`
-    time*: TTime              # milliseconds
-    xkb_type*: int16          # XkbMapNotify
-    device*: int16            # device ID
-    changed*: int16           # fields which have been changed
-    flags*: int16             # reserved
-    first_type*: int16        # first changed key type
-    num_types*: int16         # number of changed key types
-    min_key_code*: TKeyCode
-    max_key_code*: TKeyCode
-    first_key_sym*: TKeyCode
-    first_key_act*: TKeyCode
-    first_key_behavior*: TKeyCode
-    first_key_explicit*: TKeyCode
-    first_modmap_key*: TKeyCode
-    first_vmodmap_key*: TKeyCode
-    num_key_syms*: int16
-    num_key_acts*: int16
-    num_key_behaviors*: int16
-    num_key_explicit*: int16
-    num_modmap_keys*: int16
-    num_vmodmap_keys*: int16
-    vmods*: int16             # mask of changed virtual mods
-  
-
-type 
-  PXkbStateNotifyEvent* = ptr TXkbStateNotifyEvent
-  TXkbStateNotifyEvent*{.final.} = object 
-    theType*: int16           # XkbAnyEvent
-    serial*: int32            # # of last req processed by server
-    send_event*: bool         # is this `from` a SendEvent request?
-    display*: PDisplay        # Display the event was read `from`
-    time*: TTime              # milliseconds
-    xkb_type*: int16          # XkbStateNotify
-    device*: int16            # device ID
-    changed*: int16           # mask of changed state components
-    group*: int16             # keyboard group
-    base_group*: int16        # base keyboard group
-    latched_group*: int16     # latched keyboard group
-    locked_group*: int16      # locked keyboard group
-    mods*: int16              # modifier state
-    base_mods*: int16         # base modifier state
-    latched_mods*: int16      # latched modifiers
-    locked_mods*: int16       # locked modifiers
-    compat_state*: int16      # compatibility state
-    grab_mods*: int8          # mods used for grabs
-    compat_grab_mods*: int8   # grab mods for non-XKB clients
-    lookup_mods*: int8        # mods sent to clients
-    compat_lookup_mods*: int8 # mods sent to non-XKB clients
-    ptr_buttons*: int16       # pointer button state
-    keycode*: TKeyCode        # keycode that caused the change
-    event_type*: int8         # KeyPress or KeyRelease
-    req_major*: int8          # Major opcode of request
-    req_minor*: int8          # Minor opcode of request
-  
-
-type 
-  PXkbControlsNotifyEvent* = ptr TXkbControlsNotifyEvent
-  TXkbControlsNotifyEvent*{.final.} = object 
-    theType*: int16           # XkbAnyEvent
-    serial*: int32            # of last req processed by server
-    send_event*: bool         # is this `from` a SendEvent request?
-    display*: PDisplay        # Display the event was read `from`
-    time*: TTime              # milliseconds
-    xkb_type*: int16          # XkbControlsNotify
-    device*: int16            # device ID
-    changed_ctrls*: int16     # controls with changed sub-values
-    enabled_ctrls*: int16     # controls currently enabled
-    enabled_ctrl_changes*: int16 # controls just {en,dis}abled
-    num_groups*: int16        # total groups on keyboard
-    keycode*: TKeyCode        # key that caused change or 0
-    event_type*: int8         # type of event that caused change
-    req_major*: int8          # if keycode==0, major and minor
-    req_minor*: int8          # opcode of req that caused change
-  
-
-type 
-  PXkbIndicatorNotifyEvent* = ptr TXkbIndicatorNotifyEvent
-  TXkbIndicatorNotifyEvent*{.final.} = object 
-    theType*: int16           # XkbAnyEvent
-    serial*: int32            # of last req processed by server
-    send_event*: bool         # is this `from` a SendEvent request?
-    display*: PDisplay        # Display the event was read `from`
-    time*: TTime              # milliseconds
-    xkb_type*: int16          # XkbIndicatorNotify
-    device*: int16            # device
-    changed*: int16           # indicators with new state or map
-    state*: int16             # current state of all indicators
-  
-
-type 
-  PXkbNamesNotifyEvent* = ptr TXkbNamesNotifyEvent
-  TXkbNamesNotifyEvent*{.final.} = object 
-    theType*: int16           # XkbAnyEvent
-    serial*: int32            # of last req processed by server
-    send_event*: bool         # is this `from` a SendEvent request?
-    display*: PDisplay        # Display the event was read `from`
-    time*: TTime              # milliseconds
-    xkb_type*: int16          # XkbNamesNotify
-    device*: int16            # device ID
-    changed*: int32           # names that have changed
-    first_type*: int16        # first key type with new name
-    num_types*: int16         # number of key types with new names
-    first_lvl*: int16         # first key type new new level names
-    num_lvls*: int16          # # of key types w/new level names
-    num_aliases*: int16       # total number of key aliases
-    num_radio_groups*: int16  # total number of radio groups
-    changed_vmods*: int16     # virtual modifiers with new names
-    changed_groups*: int16    # groups with new names
-    changed_indicators*: int16 # indicators with new names
-    first_key*: int16         # first key with new name
-    num_keys*: int16          # number of keys with new names
-  
-
-type 
-  PXkbCompatMapNotifyEvent* = ptr TXkbCompatMapNotifyEvent
-  TXkbCompatMapNotifyEvent*{.final.} = object 
-    theType*: int16           # XkbAnyEvent
-    serial*: int32            # of last req processed by server
-    send_event*: bool         # is this `from` a SendEvent request?
-    display*: PDisplay        # Display the event was read `from`
-    time*: TTime              # milliseconds
-    xkb_type*: int16          # XkbCompatMapNotify
-    device*: int16            # device ID
-    changed_groups*: int16    # groups with new compat maps
-    first_si*: int16          # first new symbol interp
-    num_si*: int16            # number of new symbol interps
-    num_total_si*: int16      # total # of symbol interps
-  
-
-type 
-  PXkbBellNotifyEvent* = ptr TXkbBellNotifyEvent
-  TXkbBellNotifyEvent*{.final.} = object 
-    theType*: int16           # XkbAnyEvent
-    serial*: int32            # of last req processed by server
-    send_event*: bool         # is this `from` a SendEvent request?
-    display*: PDisplay        # Display the event was read `from`
-    time*: TTime              # milliseconds
-    xkb_type*: int16          # XkbBellNotify
-    device*: int16            # device ID
-    percent*: int16           # requested volume as a % of maximum
-    pitch*: int16             # requested pitch in Hz
-    duration*: int16          # requested duration in useconds
-    bell_class*: int16        # (input extension) feedback class
-    bell_id*: int16           # (input extension) ID of feedback
-    name*: TAtom              # "name" of requested bell
-    window*: TWindow          # window associated with event
-    event_only*: bool         # "event only" requested
-  
-
-type 
-  PXkbActionMessageEvent* = ptr TXkbActionMessageEvent
-  TXkbActionMessageEvent*{.final.} = object 
-    theType*: int16           # XkbAnyEvent
-    serial*: int32            # of last req processed by server
-    send_event*: bool         # is this `from` a SendEvent request?
-    display*: PDisplay        # Display the event was read `from`
-    time*: TTime              # milliseconds
-    xkb_type*: int16          # XkbActionMessage
-    device*: int16            # device ID
-    keycode*: TKeyCode        # key that generated the event
-    press*: bool              # true if act caused by key press
-    key_event_follows*: bool  # true if key event also generated
-    group*: int16             # effective group
-    mods*: int16              # effective mods
-    message*: array[0..XkbActionMessageLength, Char] # message -- leave space for NUL
-  
-
-type 
-  PXkbAccessXNotifyEvent* = ptr TXkbAccessXNotifyEvent
-  TXkbAccessXNotifyEvent*{.final.} = object 
-    theType*: int16           # XkbAnyEvent
-    serial*: int32            # of last req processed by server
-    send_event*: bool         # is this `from` a SendEvent request?
-    display*: PDisplay        # Display the event was read `from`
-    time*: TTime              # milliseconds
-    xkb_type*: int16          # XkbAccessXNotify
-    device*: int16            # device ID
-    detail*: int16            # XkbAXN_*
-    keycode*: int16           # key of event
-    sk_delay*: int16          # current slow keys delay
-    debounce_delay*: int16    # current debounce delay
-  
-
-type 
-  PXkbExtensionDeviceNotifyEvent* = ptr TXkbExtensionDeviceNotifyEvent
-  TXkbExtensionDeviceNotifyEvent*{.final.} = object 
-    theType*: int16           # XkbAnyEvent
-    serial*: int32            # of last req processed by server
-    send_event*: bool         # is this `from` a SendEvent request?
-    display*: PDisplay        # Display the event was read `from`
-    time*: TTime              # milliseconds
-    xkb_type*: int16          # XkbExtensionDeviceNotify
-    device*: int16            # device ID
-    reason*: int16            # reason for the event
-    supported*: int16         # mask of supported features
-    unsupported*: int16       # mask of unsupported features
-                              # that some app tried to use
-    first_btn*: int16         # first button that changed
-    num_btns*: int16          # range of buttons changed
-    leds_defined*: int16      # indicators with names or maps
-    led_state*: int16         # current state of the indicators
-    led_class*: int16         # feedback class for led changes
-    led_id*: int16            # feedback id for led changes
-  
-
-type 
-  PXkbEvent* = ptr TXkbEvent
-  TXkbEvent*{.final.} = object 
-    theType*: int16
-    any*: TXkbAnyEvent
-    new_kbd*: TXkbNewKeyboardNotifyEvent
-    map*: TXkbMapNotifyEvent
-    state*: TXkbStateNotifyEvent
-    ctrls*: TXkbControlsNotifyEvent
-    indicators*: TXkbIndicatorNotifyEvent
-    names*: TXkbNamesNotifyEvent
-    compat*: TXkbCompatMapNotifyEvent
-    bell*: TXkbBellNotifyEvent
-    message*: TXkbActionMessageEvent
-    accessx*: TXkbAccessXNotifyEvent
-    device*: TXkbExtensionDeviceNotifyEvent
-    core*: TXEvent
-
-
-type
-  PXkbKbdDpyStatePtr* = ptr TXkbKbdDpyStateRec
-  TXkbKbdDpyStateRec*{.final.} = object  # XkbOpenDisplay error codes 
-
-const 
-  XkbOD_Success* = 0
-  XkbOD_BadLibraryVersion* = 1
-  XkbOD_ConnectionRefused* = 2
-  XkbOD_NonXkbServer* = 3
-  XkbOD_BadServerVersion* = 4 # Values for XlibFlags 
-
-const 
-  XkbLC_ForceLatin1Lookup* = 1 shl 0
-  XkbLC_ConsumeLookupMods* = 1 shl 1
-  XkbLC_AlwaysConsumeShiftAndLock* = 1 shl 2
-  XkbLC_IgnoreNewKeyboards* = 1 shl 3
-  XkbLC_ControlFallback* = 1 shl 4
-  XkbLC_ConsumeKeysOnComposeFail* = 1 shl 29
-  XkbLC_ComposeLED* = 1 shl 30
-  XkbLC_BeepOnComposeFail* = 1 shl 31
-  XkbLC_AllComposeControls* = 0xC0000000
-  XkbLC_AllControls* = 0xC000001F
-
-proc XkbIgnoreExtension*(ignore: bool): bool{.libx11c, 
-    importc: "XkbIgnoreExtension".}
-proc XkbOpenDisplay*(name: cstring, ev_rtrn, err_rtrn, major_rtrn, minor_rtrn, 
-                                    reason: ptr int16): PDisplay{.libx11c, importc: "XkbOpenDisplay".}
-proc XkbQueryExtension*(dpy: PDisplay, opcodeReturn, eventBaseReturn, 
-                                       errorBaseReturn, majorRtrn, minorRtrn: ptr int16): bool{.
-    libx11c, importc: "XkbQueryExtension".}
-proc XkbUseExtension*(dpy: PDisplay, major_rtrn, minor_rtrn: ptr int16): bool{.
-    libx11c, importc: "XkbUseExtension".}
-proc XkbLibraryVersion*(libMajorRtrn, libMinorRtrn: ptr int16): bool{.libx11c, importc: "XkbLibraryVersion".}
-proc XkbSetXlibControls*(dpy: PDisplay, affect, values: int16): int16{.libx11c, importc: "XkbSetXlibControls".}
-proc XkbGetXlibControls*(dpy: PDisplay): int16{.libx11c, 
-    importc: "XkbGetXlibControls".}
-type 
-  TXkbInternAtomFunc* = proc (dpy: PDisplay, name: cstring, only_if_exists: bool): TAtom{.
-      cdecl.}
-
-type 
-  TXkbGetAtomNameFunc* = proc (dpy: PDisplay, atom: TAtom): cstring{.cdecl.}
-
-proc XkbSetAtomFuncs*(getAtom: TXkbInternAtomFunc, getName: TXkbGetAtomNameFunc){.
-    libx11c, importc: "XkbSetAtomFuncs".}
-proc XkbKeycodeToKeysym*(dpy: PDisplay, kc: TKeyCode, group, level: int16): TKeySym{.
-    libx11c, importc: "XkbKeycodeToKeysym".}
-proc XkbKeysymToModifiers*(dpy: PDisplay, ks: TKeySym): int16{.libx11c, importc: "XkbKeysymToModifiers".}
-proc XkbLookupKeySym*(dpy: PDisplay, keycode: TKeyCode, 
-                      modifiers, modifiers_return: int16, keysym_return: PKeySym): bool{.
-    libx11c, importc: "XkbLookupKeySym".}
-proc XkbLookupKeyBinding*(dpy: PDisplay, sym_rtrn: TKeySym, mods: int16, 
-                          buffer: cstring, nbytes: int16, extra_rtrn: ptr int16): int16{.
-    libx11c, importc: "XkbLookupKeyBinding".}
-proc XkbTranslateKeyCode*(xkb: PXkbDescPtr, keycode: TKeyCode, 
-                          modifiers, modifiers_return: int16, 
-                          keysym_return: PKeySym): bool{.libx11c, 
-    importc: "XkbTranslateKeyCode".}
-proc XkbTranslateKeySym*(dpy: PDisplay, sym_return: TKeySym, modifiers: int16, 
-                         buffer: cstring, nbytes: int16, extra_rtrn: ptr int16): int16{.
-    libx11c, importc: "XkbTranslateKeySym".}
-proc XkbSetAutoRepeatRate*(dpy: PDisplay, deviceSpec, delay, interval: int16): bool{.
-    libx11c, importc: "XkbSetAutoRepeatRate".}
-proc XkbGetAutoRepeatRate*(dpy: PDisplay, deviceSpec: int16, 
-                           delayRtrn, intervalRtrn: PWord): bool{.libx11c, importc: "XkbGetAutoRepeatRate".}
-proc XkbChangeEnabledControls*(dpy: PDisplay, deviceSpec, affect, values: int16): bool{.
-    libx11c, importc: "XkbChangeEnabledControls".}
-proc XkbDeviceBell*(dpy: PDisplay, win: TWindow, 
-                    deviceSpec, bellClass, bellID, percent: int16, name: TAtom): bool{.
-    libx11c, importc: "XkbDeviceBell".}
-proc XkbForceDeviceBell*(dpy: PDisplay, 
-                         deviceSpec, bellClass, bellID, percent: int16): bool{.
-    libx11c, importc: "XkbForceDeviceBell".}
-proc XkbDeviceBellEvent*(dpy: PDisplay, win: TWindow, 
-                         deviceSpec, bellClass, bellID, percent: int16, 
-                         name: TAtom): bool{.libx11c, 
-    importc: "XkbDeviceBellEvent".}
-proc XkbBell*(dpy: PDisplay, win: TWindow, percent: int16, name: TAtom): bool{.
-    libx11c, importc: "XkbBell".}
-proc XkbForceBell*(dpy: PDisplay, percent: int16): bool{.libx11c, 
-    importc: "XkbForceBell".}
-proc XkbBellEvent*(dpy: PDisplay, win: TWindow, percent: int16, name: TAtom): bool{.
-    libx11c, importc: "XkbBellEvent".}
-proc XkbSelectEvents*(dpy: PDisplay, deviceID, affect, values: int16): bool{.
-    libx11c, importc: "XkbSelectEvents".}
-proc XkbSelectEventDetails*(dpy: PDisplay, deviceID, eventType: int16, 
-                            affect, details: int32): bool{.libx11c, importc: "XkbSelectEventDetails".}
-proc XkbNoteMapChanges*(old: PXkbMapChangesPtr, new: PXkbMapNotifyEvent, 
-                        wanted: int16){.libx11c, 
-                                        importc: "XkbNoteMapChanges".}
-proc XkbNoteNameChanges*(old: PXkbNameChangesPtr, new: PXkbNamesNotifyEvent, 
-                         wanted: int16){.libx11c, 
-    importc: "XkbNoteNameChanges".}
-proc XkbGetIndicatorState*(dpy: PDisplay, deviceSpec: int16, pStateRtrn: PWord): TStatus{.
-    libx11c, importc: "XkbGetIndicatorState".}
-proc XkbGetDeviceIndicatorState*(dpy: PDisplay, 
-                                 deviceSpec, ledClass, ledID: int16, 
-                                 pStateRtrn: PWord): TStatus{.libx11c, importc: "XkbGetDeviceIndicatorState".}
-proc XkbGetIndicatorMap*(dpy: PDisplay, which: int32, desc: PXkbDescPtr): TStatus{.
-    libx11c, importc: "XkbGetIndicatorMap".}
-proc XkbSetIndicatorMap*(dpy: PDisplay, which: int32, desc: PXkbDescPtr): bool{.
-    libx11c, importc: "XkbSetIndicatorMap".}
-proc XkbNoteIndicatorMapChanges*(o, n: PXkbIndicatorChangesPtr, w: int16)
-proc XkbNoteIndicatorStateChanges*(o, n: PXkbIndicatorChangesPtr, w: int16)
-proc XkbGetIndicatorMapChanges*(d: PDisplay, x: PXkbDescPtr, 
-                                c: PXkbIndicatorChangesPtr): TStatus
-proc XkbChangeIndicatorMaps*(d: PDisplay, x: PXkbDescPtr, 
-                             c: PXkbIndicatorChangesPtr): bool
-proc XkbGetNamedIndicator*(dpy: PDisplay, name: TAtom, pNdxRtrn: ptr int16, 
-                           pStateRtrn: ptr bool, pMapRtrn: PXkbIndicatorMapPtr, 
-                           pRealRtrn: ptr bool): bool{.libx11c, 
-    importc: "XkbGetNamedIndicator".}
-proc XkbGetNamedDeviceIndicator*(dpy: PDisplay, 
-                                 deviceSpec, ledClass, ledID: int16, 
-                                 name: TAtom, pNdxRtrn: ptr int16, 
-                                 pStateRtrn: ptr bool, 
-                                 pMapRtrn: PXkbIndicatorMapPtr, 
-                                 pRealRtrn: ptr bool): bool{.libx11c, importc: "XkbGetNamedDeviceIndicator".}
-proc XkbSetNamedIndicator*(dpy: PDisplay, name: TAtom, 
-                           changeState, state, createNewMap: bool, 
-                           pMap: PXkbIndicatorMapPtr): bool{.libx11c, importc: "XkbSetNamedIndicator".}
-proc XkbSetNamedDeviceIndicator*(dpy: PDisplay, 
-                                 deviceSpec, ledClass, ledID: int16, 
-                                 name: TAtom, 
-                                 changeState, state, createNewMap: bool, 
-                                 pMap: PXkbIndicatorMapPtr): bool{.libx11c, importc: "XkbSetNamedDeviceIndicator".}
-proc XkbLockModifiers*(dpy: PDisplay, deviceSpec, affect, values: int16): bool{.
-    libx11c, importc: "XkbLockModifiers".}
-proc XkbLatchModifiers*(dpy: PDisplay, deviceSpec, affect, values: int16): bool{.
-    libx11c, importc: "XkbLatchModifiers".}
-proc XkbLockGroup*(dpy: PDisplay, deviceSpec, group: int16): bool{.libx11c, importc: "XkbLockGroup".}
-proc XkbLatchGroup*(dpy: PDisplay, deviceSpec, group: int16): bool{.libx11c, importc: "XkbLatchGroup".}
-proc XkbSetServerInternalMods*(dpy: PDisplay, deviceSpec, affectReal, 
-    realValues, affectVirtual, virtualValues: int16): bool{.libx11c, importc: "XkbSetServerInternalMods".}
-proc XkbSetIgnoreLockMods*(dpy: PDisplay, deviceSpec, affectReal, realValues, 
-    affectVirtual, virtualValues: int16): bool{.libx11c, 
-    importc: "XkbSetIgnoreLockMods".}
-proc XkbVirtualModsToReal*(dpy: PDisplay, virtual_mask: int16, mask_rtrn: PWord): bool{.
-    libx11c, importc: "XkbVirtualModsToReal".}
-proc XkbComputeEffectiveMap*(xkb: PXkbDescPtr, theType: PXkbKeyTypePtr, 
-                             map_rtrn: PByte): bool{.libx11c, 
-    importc: "XkbComputeEffectiveMap".}
-proc XkbInitCanonicalKeyTypes*(xkb: PXkbDescPtr, which: int16, keypadVMod: int16): TStatus{.
-    libx11c, importc: "XkbInitCanonicalKeyTypes".}
-proc XkbAllocKeyboard*(): PXkbDescPtr{.libx11c, 
-                                       importc: "XkbAllocKeyboard".}
-proc XkbFreeKeyboard*(xkb: PXkbDescPtr, which: int16, freeDesc: bool){.libx11c, importc: "XkbFreeKeyboard".}
-proc XkbAllocClientMap*(xkb: PXkbDescPtr, which, nTypes: int16): TStatus{.libx11c, importc: "XkbAllocClientMap".}
-proc XkbAllocServerMap*(xkb: PXkbDescPtr, which, nActions: int16): TStatus{.
-    libx11c, importc: "XkbAllocServerMap".}
-proc XkbFreeClientMap*(xkb: PXkbDescPtr, what: int16, freeMap: bool){.libx11c, importc: "XkbFreeClientMap".}
-proc XkbFreeServerMap*(xkb: PXkbDescPtr, what: int16, freeMap: bool){.libx11c, importc: "XkbFreeServerMap".}
-proc XkbAddKeyType*(xkb: PXkbDescPtr, name: TAtom, map_count: int16, 
-                    want_preserve: bool, num_lvls: int16): PXkbKeyTypePtr{.
-    libx11c, importc: "XkbAddKeyType".}
-proc XkbAllocIndicatorMaps*(xkb: PXkbDescPtr): TStatus{.libx11c, 
-    importc: "XkbAllocIndicatorMaps".}
-proc XkbFreeIndicatorMaps*(xkb: PXkbDescPtr){.libx11c, 
-    importc: "XkbFreeIndicatorMaps".}
-proc XkbGetMap*(dpy: PDisplay, which, deviceSpec: int16): PXkbDescPtr{.libx11c, importc: "XkbGetMap".}
-proc XkbGetUpdatedMap*(dpy: PDisplay, which: int16, desc: PXkbDescPtr): TStatus{.
-    libx11c, importc: "XkbGetUpdatedMap".}
-proc XkbGetMapChanges*(dpy: PDisplay, xkb: PXkbDescPtr, 
-                       changes: PXkbMapChangesPtr): TStatus{.libx11c, importc: "XkbGetMapChanges".}
-proc XkbRefreshKeyboardMapping*(event: PXkbMapNotifyEvent): TStatus{.libx11c, importc: "XkbRefreshKeyboardMapping".}
-proc XkbGetKeyTypes*(dpy: PDisplay, first, num: int16, xkb: PXkbDescPtr): TStatus{.
-    libx11c, importc: "XkbGetKeyTypes".}
-proc XkbGetKeySyms*(dpy: PDisplay, first, num: int16, xkb: PXkbDescPtr): TStatus{.
-    libx11c, importc: "XkbGetKeySyms".}
-proc XkbGetKeyActions*(dpy: PDisplay, first, num: int16, xkb: PXkbDescPtr): TStatus{.
-    libx11c, importc: "XkbGetKeyActions".}
-proc XkbGetKeyBehaviors*(dpy: PDisplay, firstKey, nKeys: int16, 
-                         desc: PXkbDescPtr): TStatus{.libx11c, 
-    importc: "XkbGetKeyBehaviors".}
-proc XkbGetVirtualMods*(dpy: PDisplay, which: int16, desc: PXkbDescPtr): TStatus{.
-    libx11c, importc: "XkbGetVirtualMods".}
-proc XkbGetKeyExplicitComponents*(dpy: PDisplay, firstKey, nKeys: int16, 
-                                  desc: PXkbDescPtr): TStatus{.libx11c, importc: "XkbGetKeyExplicitComponents".}
-proc XkbGetKeyModifierMap*(dpy: PDisplay, firstKey, nKeys: int16, 
-                           desc: PXkbDescPtr): TStatus{.libx11c, 
-    importc: "XkbGetKeyModifierMap".}
-proc XkbAllocControls*(xkb: PXkbDescPtr, which: int16): TStatus{.libx11c, importc: "XkbAllocControls".}
-proc XkbFreeControls*(xkb: PXkbDescPtr, which: int16, freeMap: bool){.libx11c, importc: "XkbFreeControls".}
-proc XkbGetControls*(dpy: PDisplay, which: int32, desc: PXkbDescPtr): TStatus{.
-    libx11c, importc: "XkbGetControls".}
-proc XkbSetControls*(dpy: PDisplay, which: int32, desc: PXkbDescPtr): bool{.
-    libx11c, importc: "XkbSetControls".}
-proc XkbNoteControlsChanges*(old: PXkbControlsChangesPtr, 
-                             new: PXkbControlsNotifyEvent, wanted: int16){.
-    libx11c, importc: "XkbNoteControlsChanges".}
-proc XkbGetControlsChanges*(d: PDisplay, x: PXkbDescPtr, 
-                            c: PXkbControlsChangesPtr): TStatus
-proc XkbChangeControls*(d: PDisplay, x: PXkbDescPtr, c: PXkbControlsChangesPtr): bool
-proc XkbAllocCompatMap*(xkb: PXkbDescPtr, which, nInterpret: int16): TStatus{.
-    libx11c, importc: "XkbAllocCompatMap".}
-proc XkbFreeCompatMap*(xkib: PXkbDescPtr, which: int16, freeMap: bool){.libx11c, importc: "XkbFreeCompatMap".}
-proc XkbGetCompatMap*(dpy: PDisplay, which: int16, xkb: PXkbDescPtr): TStatus{.
-    libx11c, importc: "XkbGetCompatMap".}
-proc XkbSetCompatMap*(dpy: PDisplay, which: int16, xkb: PXkbDescPtr, 
-                      updateActions: bool): bool{.libx11c, 
-    importc: "XkbSetCompatMap".}
-proc XkbAddSymInterpret*(xkb: PXkbDescPtr, si: PXkbSymInterpretPtr, 
-                         updateMap: bool, changes: PXkbChangesPtr): PXkbSymInterpretPtr{.
-    libx11c, importc: "XkbAddSymInterpret".}
-proc XkbAllocNames*(xkb: PXkbDescPtr, which: int16, 
-                    nTotalRG, nTotalAliases: int16): TStatus{.libx11c, importc: "XkbAllocNames".}
-proc XkbGetNames*(dpy: PDisplay, which: int16, desc: PXkbDescPtr): TStatus{.
-    libx11c, importc: "XkbGetNames".}
-proc XkbSetNames*(dpy: PDisplay, which, firstType, nTypes: int16, 
-                  desc: PXkbDescPtr): bool{.libx11c, 
-    importc: "XkbSetNames".}
-proc XkbChangeNames*(dpy: PDisplay, xkb: PXkbDescPtr, 
-                     changes: PXkbNameChangesPtr): bool{.libx11c, 
-    importc: "XkbChangeNames".}
-proc XkbFreeNames*(xkb: PXkbDescPtr, which: int16, freeMap: bool){.libx11c, importc: "XkbFreeNames".}
-proc XkbGetState*(dpy: PDisplay, deviceSpec: int16, rtrnState: PXkbStatePtr): TStatus{.
-    libx11c, importc: "XkbGetState".}
-proc XkbSetMap*(dpy: PDisplay, which: int16, desc: PXkbDescPtr): bool{.libx11c, importc: "XkbSetMap".}
-proc XkbChangeMap*(dpy: PDisplay, desc: PXkbDescPtr, changes: PXkbMapChangesPtr): bool{.
-    libx11c, importc: "XkbChangeMap".}
-proc XkbSetDetectableAutoRepeat*(dpy: PDisplay, detectable: bool, 
-                                 supported: ptr bool): bool{.libx11c, importc: "XkbSetDetectableAutoRepeat".}
-proc XkbGetDetectableAutoRepeat*(dpy: PDisplay, supported: ptr bool): bool{.
-    libx11c, importc: "XkbGetDetectableAutoRepeat".}
-proc XkbSetAutoResetControls*(dpy: PDisplay, changes: int16, 
-                              auto_ctrls, auto_values: PWord): bool{.libx11c, importc: "XkbSetAutoResetControls".}
-proc XkbGetAutoResetControls*(dpy: PDisplay, auto_ctrls, auto_ctrl_values: PWord): bool{.
-    libx11c, importc: "XkbGetAutoResetControls".}
-proc XkbSetPerClientControls*(dpy: PDisplay, change: int16, values: PWord): bool{.
-    libx11c, importc: "XkbSetPerClientControls".}
-proc XkbGetPerClientControls*(dpy: PDisplay, ctrls: PWord): bool{.libx11c, importc: "XkbGetPerClientControls".}
-proc XkbCopyKeyType*(`from`, into: PXkbKeyTypePtr): TStatus{.libx11c, importc: "XkbCopyKeyType".}
-proc XkbCopyKeyTypes*(`from`, into: PXkbKeyTypePtr, num_types: int16): TStatus{.
-    libx11c, importc: "XkbCopyKeyTypes".}
-proc XkbResizeKeyType*(xkb: PXkbDescPtr, type_ndx, map_count: int16, 
-                       want_preserve: bool, new_num_lvls: int16): TStatus{.
-    libx11c, importc: "XkbResizeKeyType".}
-proc XkbResizeKeySyms*(desc: PXkbDescPtr, forKey, symsNeeded: int16): PKeySym{.
-    libx11c, importc: "XkbResizeKeySyms".}
-proc XkbResizeKeyActions*(desc: PXkbDescPtr, forKey, actsNeeded: int16): PXkbAction{.
-    libx11c, importc: "XkbResizeKeyActions".}
-proc XkbChangeTypesOfKey*(xkb: PXkbDescPtr, key, num_groups: int16, 
-                          groups: int16, newTypes: ptr int16, 
-                          pChanges: PXkbMapChangesPtr): TStatus{.libx11c, importc: "XkbChangeTypesOfKey".}
-    
-proc XkbListComponents*(dpy: PDisplay, deviceSpec: int16, 
-                        ptrns: PXkbComponentNamesPtr, max_inout: ptr int16): PXkbComponentListPtr{.
-    libx11c, importc: "XkbListComponents".}
-proc XkbFreeComponentList*(list: PXkbComponentListPtr){.libx11c, 
-    importc: "XkbFreeComponentList".}
-proc XkbGetKeyboard*(dpy: PDisplay, which, deviceSpec: int16): PXkbDescPtr{.
-    libx11c, importc: "XkbGetKeyboard".}
-proc XkbGetKeyboardByName*(dpy: PDisplay, deviceSpec: int16, 
-                           names: PXkbComponentNamesPtr, want, need: int16, 
-                           load: bool): PXkbDescPtr{.libx11c, 
-    importc: "XkbGetKeyboardByName".}
-    
-proc XkbKeyTypesForCoreSymbols*(xkb: PXkbDescPtr, 
-                                map_width: int16,  # keyboard device
-                                core_syms: PKeySym,  # always mapWidth symbols
-                                protected: int16,  # explicit key types
-                                types_inout: ptr int16,  # always four type indices
-                                xkb_syms_rtrn: PKeySym): int16{.libx11c, importc: "XkbKeyTypesForCoreSymbols".}
-  # must have enough space
-proc XkbApplyCompatMapToKey*(xkb: PXkbDescPtr,  
-                             key: TKeyCode,  # key to be updated
-                             changes: PXkbChangesPtr): bool{.libx11c, importc: "XkbApplyCompatMapToKey".}
-  # resulting changes to map
-proc XkbUpdateMapFromCore*(xkb: PXkbDescPtr,  
-                           first_key: TKeyCode,  # first changed key
-                           num_keys,
-                           map_width: int16, 
-                           core_keysyms: PKeySym,  # symbols `from` core keymap
-                           changes: PXkbChangesPtr): bool{.libx11c, importc: "XkbUpdateMapFromCore".}
-
-proc XkbAddDeviceLedInfo*(devi: PXkbDeviceInfoPtr, ledClass, ledId: int16): PXkbDeviceLedInfoPtr{.
-    libx11c, importc: "XkbAddDeviceLedInfo".}
-proc XkbResizeDeviceButtonActions*(devi: PXkbDeviceInfoPtr, newTotal: int16): TStatus{.
-    libx11c, importc: "XkbResizeDeviceButtonActions".}
-proc XkbAllocDeviceInfo*(deviceSpec, nButtons, szLeds: int16): PXkbDeviceInfoPtr{.
-    libx11c, importc: "XkbAllocDeviceInfo".}
-proc XkbFreeDeviceInfo*(devi: PXkbDeviceInfoPtr, which: int16, freeDevI: bool){.
-    libx11c, importc: "XkbFreeDeviceInfo".}
-proc XkbNoteDeviceChanges*(old: PXkbDeviceChangesPtr, 
-                           new: PXkbExtensionDeviceNotifyEvent, wanted: int16){.
-    libx11c, importc: "XkbNoteDeviceChanges".}
-proc XkbGetDeviceInfo*(dpy: PDisplay, which, deviceSpec, ledClass, ledID: int16): PXkbDeviceInfoPtr{.
-    libx11c, importc: "XkbGetDeviceInfo".}
-proc XkbGetDeviceInfoChanges*(dpy: PDisplay, devi: PXkbDeviceInfoPtr, 
-                              changes: PXkbDeviceChangesPtr): TStatus{.libx11c, importc: "XkbGetDeviceInfoChanges".}
-proc XkbGetDeviceButtonActions*(dpy: PDisplay, devi: PXkbDeviceInfoPtr, 
-                                all: bool, first, nBtns: int16): TStatus{.libx11c, importc: "XkbGetDeviceButtonActions".}
-proc XkbGetDeviceLedInfo*(dpy: PDisplay, devi: PXkbDeviceInfoPtr, 
-                          ledClass, ledId, which: int16): TStatus{.libx11c, importc: "XkbGetDeviceLedInfo".}
-proc XkbSetDeviceInfo*(dpy: PDisplay, which: int16, devi: PXkbDeviceInfoPtr): bool{.
-    libx11c, importc: "XkbSetDeviceInfo".}
-proc XkbChangeDeviceInfo*(dpy: PDisplay, desc: PXkbDeviceInfoPtr, 
-                          changes: PXkbDeviceChangesPtr): bool{.libx11c, importc: "XkbChangeDeviceInfo".}
-proc XkbSetDeviceLedInfo*(dpy: PDisplay, devi: PXkbDeviceInfoPtr, 
-                          ledClass, ledID, which: int16): bool{.libx11c, importc: "XkbSetDeviceLedInfo".}
-proc XkbSetDeviceButtonActions*(dpy: PDisplay, devi: PXkbDeviceInfoPtr, 
-                                first, nBtns: int16): bool{.libx11c, importc: "XkbSetDeviceButtonActions".}
-
-proc XkbToControl*(c: int8): int8{.libx11c, 
-                                   importc: "XkbToControl".}
-
-proc XkbSetDebuggingFlags*(dpy: PDisplay, mask, flags: int16, msg: cstring, 
-                           ctrls_mask, ctrls, rtrn_flags, rtrn_ctrls: int16): bool{.
-    libx11c, importc: "XkbSetDebuggingFlags".}
-proc XkbApplyVirtualModChanges*(xkb: PXkbDescPtr, changed: int16, 
-                                changes: PXkbChangesPtr): bool{.libx11c, importc: "XkbApplyVirtualModChanges".}
-
-# implementation
-
-proc XkbNoteIndicatorMapChanges(o, n: PXkbIndicatorChangesPtr, w: int16) = 
-  ##define XkbNoteIndicatorMapChanges(o,n,w) ((o)->map_changes|=((n)->map_changes&(w)))
-  o.map_changes = o.map_changes or (n.map_changes and w)
-
-proc XkbNoteIndicatorStateChanges(o, n: PXkbIndicatorChangesPtr, w: int16) = 
-  ##define XkbNoteIndicatorStateChanges(o,n,w) ((o)->state_changes|=((n)->state_changes&(w)))
-  o.state_changes = o.state_changes or (n.state_changes and (w))
-
-proc XkbGetIndicatorMapChanges(d: PDisplay, x: PXkbDescPtr, 
-                               c: PXkbIndicatorChangesPtr): TStatus = 
-  ##define XkbGetIndicatorMapChanges(d,x,c) (XkbGetIndicatorMap((d),(c)->map_changes,x)
-  Result = XkbGetIndicatorMap(d, c.map_changes, x)
-
-proc XkbChangeIndicatorMaps(d: PDisplay, x: PXkbDescPtr, 
-                            c: PXkbIndicatorChangesPtr): bool = 
-  ##define XkbChangeIndicatorMaps(d,x,c) (XkbSetIndicatorMap((d),(c)->map_changes,x))
-  Result = XkbSetIndicatorMap(d, c.map_changes, x)
-
-proc XkbGetControlsChanges(d: PDisplay, x: PXkbDescPtr, 
-                           c: PXkbControlsChangesPtr): TStatus = 
-  ##define XkbGetControlsChanges(d,x,c) XkbGetControls(d,(c)->changed_ctrls,x)
-  Result = XkbGetControls(d, c.changed_ctrls, x)
-
-proc XkbChangeControls(d: PDisplay, x: PXkbDescPtr, c: PXkbControlsChangesPtr): bool = 
-  ##define XkbChangeControls(d,x,c) XkbSetControls(d,(c)->changed_ctrls,x)
-  Result = XkbSetControls(d, c.changed_ctrls, x)
diff --git a/lib/wrappers/x11/xlib.nim b/lib/wrappers/x11/xlib.nim
deleted file mode 100644
index 5ccacdd45..000000000
--- a/lib/wrappers/x11/xlib.nim
+++ /dev/null
@@ -1,2027 +0,0 @@
-
-import 
-  x
-
-include "x11pragma.nim"
-
-type
-  cunsigned* = cint
-  Pcint* = ptr cint
-  PPcint* = ptr Pcint
-  PPcuchar* = ptr ptr cuchar
-  PWideChar* = ptr int16
-  PPChar* = ptr cstring
-  PPPChar* = ptr ptr cstring
-  Pculong* = ptr culong
-  Pcuchar* = cstring
-  Pcuint* = ptr cuint
-  Pcushort* = ptr uint16
-#  Automatically converted by H2Pas 0.99.15 from xlib.h
-#  The following command line parameters were used:
-#    -p
-#    -T
-#    -S
-#    -d
-#    -c
-#    xlib.h
-
-const 
-  XlibSpecificationRelease* = 6
-
-type 
-  PXPointer* = ptr TXPointer
-  TXPointer* = ptr char
-  PBool* = ptr TBool
-  TBool* = int           #cint?
-  PStatus* = ptr TStatus
-  TStatus* = cint
-
-const 
-  QueuedAlready* = 0
-  QueuedAfterReading* = 1
-  QueuedAfterFlush* = 2
-
-type 
-  PPXExtData* = ptr PXExtData
-  PXExtData* = ptr TXExtData
-  TXExtData*{.final.} = object 
-    number*: cint
-    next*: PXExtData
-    free_private*: proc (extension: PXExtData): cint{.cdecl.}
-    private_data*: TXPointer
-
-  PXExtCodes* = ptr TXExtCodes
-  TXExtCodes*{.final.} = object 
-    extension*: cint
-    major_opcode*: cint
-    first_event*: cint
-    first_error*: cint
-
-  PXPixmapFormatValues* = ptr TXPixmapFormatValues
-  TXPixmapFormatValues*{.final.} = object 
-    depth*: cint
-    bits_per_pixel*: cint
-    scanline_pad*: cint
-
-  PXGCValues* = ptr TXGCValues
-  TXGCValues*{.final.} = object 
-    function*: cint
-    plane_mask*: culong
-    foreground*: culong
-    background*: culong
-    line_width*: cint
-    line_style*: cint
-    cap_style*: cint
-    join_style*: cint
-    fill_style*: cint
-    fill_rule*: cint
-    arc_mode*: cint
-    tile*: TPixmap
-    stipple*: TPixmap
-    ts_x_origin*: cint
-    ts_y_origin*: cint
-    font*: TFont
-    subwindow_mode*: cint
-    graphics_exposures*: TBool
-    clip_x_origin*: cint
-    clip_y_origin*: cint
-    clip_mask*: TPixmap
-    dash_offset*: cint
-    dashes*: cchar
-
-  PXGC* = ptr TXGC
-  TXGC*{.final.} = object 
-  TGC* = PXGC
-  PGC* = ptr TGC
-  PVisual* = ptr TVisual
-  TVisual*{.final.} = object 
-    ext_data*: PXExtData
-    visualid*: TVisualID
-    c_class*: cint
-    red_mask*, green_mask*, blue_mask*: culong
-    bits_per_rgb*: cint
-    map_entries*: cint
-
-  PDepth* = ptr TDepth
-  TDepth*{.final.} = object 
-    depth*: cint
-    nvisuals*: cint
-    visuals*: PVisual
-
-  PXDisplay* = ptr TXDisplay
-  TXDisplay*{.final.} = object 
-  PScreen* = ptr TScreen
-  TScreen*{.final.} = object 
-    ext_data*: PXExtData
-    display*: PXDisplay
-    root*: TWindow
-    width*, height*: cint
-    mwidth*, mheight*: cint
-    ndepths*: cint
-    depths*: PDepth
-    root_depth*: cint
-    root_visual*: PVisual
-    default_gc*: TGC
-    cmap*: TColormap
-    white_pixel*: culong
-    black_pixel*: culong
-    max_maps*, min_maps*: cint
-    backing_store*: cint
-    save_unders*: TBool
-    root_input_mask*: clong
-
-  PScreenFormat* = ptr TScreenFormat
-  TScreenFormat*{.final.} = object 
-    ext_data*: PXExtData
-    depth*: cint
-    bits_per_pixel*: cint
-    scanline_pad*: cint
-
-  PXSetWindowAttributes* = ptr TXSetWindowAttributes
-  TXSetWindowAttributes*{.final.} = object 
-    background_pixmap*: TPixmap
-    background_pixel*: culong
-    border_pixmap*: TPixmap
-    border_pixel*: culong
-    bit_gravity*: cint
-    win_gravity*: cint
-    backing_store*: cint
-    backing_planes*: culong
-    backing_pixel*: culong
-    save_under*: TBool
-    event_mask*: clong
-    do_not_propagate_mask*: clong
-    override_redirect*: TBool
-    colormap*: TColormap
-    cursor*: TCursor
-
-  PXWindowAttributes* = ptr TXWindowAttributes
-  TXWindowAttributes*{.final.} = object 
-    x*, y*: cint
-    width*, height*: cint
-    border_width*: cint
-    depth*: cint
-    visual*: PVisual
-    root*: TWindow
-    c_class*: cint
-    bit_gravity*: cint
-    win_gravity*: cint
-    backing_store*: cint
-    backing_planes*: culong
-    backing_pixel*: culong
-    save_under*: TBool
-    colormap*: TColormap
-    map_installed*: TBool
-    map_state*: cint
-    all_event_masks*: clong
-    your_event_mask*: clong
-    do_not_propagate_mask*: clong
-    override_redirect*: TBool
-    screen*: PScreen
-
-  PXHostAddress* = ptr TXHostAddress
-  TXHostAddress*{.final.} = object 
-    family*: cint
-    len*: cint
-    address*: cstring
-
-  PXServerInterpretedAddress* = ptr TXServerInterpretedAddress
-  TXServerInterpretedAddress*{.final.} = object 
-    typelength*: cint
-    valuelength*: cint
-    theType*: cstring
-    value*: cstring
-
-  PXImage* = ptr TXImage
-  TF*{.final.} = object 
-    create_image*: proc (para1: PXDisplay, para2: PVisual, para3: cuint, 
-                         para4: cint, para5: cint, para6: cstring, para7: cuint, 
-                         para8: cuint, para9: cint, para10: cint): PXImage{.
-        cdecl.}
-    destroy_image*: proc (para1: PXImage): cint{.cdecl.}
-    get_pixel*: proc (para1: PXImage, para2: cint, para3: cint): culong{.cdecl.}
-    put_pixel*: proc (para1: PXImage, para2: cint, para3: cint, para4: culong): cint{.
-        cdecl.}
-    sub_image*: proc (para1: PXImage, para2: cint, para3: cint, para4: cuint, 
-                      para5: cuint): PXImage{.cdecl.}
-    add_pixel*: proc (para1: PXImage, para2: clong): cint{.cdecl.}
-
-  TXImage*{.final.} = object 
-    width*, height*: cint
-    xoffset*: cint
-    format*: cint
-    data*: cstring
-    byte_order*: cint
-    bitmap_unit*: cint
-    bitmap_bit_order*: cint
-    bitmap_pad*: cint
-    depth*: cint
-    bytes_per_line*: cint
-    bits_per_pixel*: cint
-    red_mask*: culong
-    green_mask*: culong
-    blue_mask*: culong
-    obdata*: TXPointer
-    f*: TF
-
-  PXWindowChanges* = ptr TXWindowChanges
-  TXWindowChanges*{.final.} = object 
-    x*, y*: cint
-    width*, height*: cint
-    border_width*: cint
-    sibling*: TWindow
-    stack_mode*: cint
-
-  PXColor* = ptr TXColor
-  TXColor*{.final.} = object 
-    pixel*: culong
-    red*, green*, blue*: cushort
-    flags*: cchar
-    pad*: cchar
-
-  PXSegment* = ptr TXSegment
-  TXSegment*{.final.} = object 
-    x1*, y1*, x2*, y2*: cshort
-
-  PXPoint* = ptr TXPoint
-  TXPoint*{.final.} = object 
-    x*, y*: cshort
-
-  PXRectangle* = ptr TXRectangle
-  TXRectangle*{.final.} = object 
-    x*, y*: cshort
-    width*, height*: cushort
-
-  PXArc* = ptr TXArc
-  TXArc*{.final.} = object 
-    x*, y*: cshort
-    width*, height*: cushort
-    angle1*, angle2*: cshort
-
-  PXKeyboardControl* = ptr TXKeyboardControl
-  TXKeyboardControl*{.final.} = object 
-    key_click_percent*: cint
-    bell_percent*: cint
-    bell_pitch*: cint
-    bell_duration*: cint
-    led*: cint
-    led_mode*: cint
-    key*: cint
-    auto_repeat_mode*: cint
-
-  PXKeyboardState* = ptr TXKeyboardState
-  TXKeyboardState*{.final.} = object 
-    key_click_percent*: cint
-    bell_percent*: cint
-    bell_pitch*, bell_duration*: cuint
-    led_mask*: culong
-    global_auto_repeat*: cint
-    auto_repeats*: array[0..31, cchar]
-
-  PXTimeCoord* = ptr TXTimeCoord
-  TXTimeCoord*{.final.} = object 
-    time*: TTime
-    x*, y*: cshort
-
-  PXModifierKeymap* = ptr TXModifierKeymap
-  TXModifierKeymap*{.final.} = object 
-    max_keypermod*: cint
-    modifiermap*: PKeyCode
-
-  PDisplay* = ptr TDisplay
-  TDisplay* = TXDisplay
-  PXPrivate* = ptr TXPrivate
-  TXPrivate*{.final.} = object 
-  PXrmHashBucketRec* = ptr TXrmHashBucketRec
-  TXrmHashBucketRec*{.final.} = object 
-  PXPrivDisplay* = ptr TXPrivDisplay
-  TXPrivDisplay*{.final.} = object 
-    ext_data*: PXExtData
-    private1*: PXPrivate
-    fd*: cint
-    private2*: cint
-    proto_major_version*: cint
-    proto_minor_version*: cint
-    vendor*: cstring
-    private3*: TXID
-    private4*: TXID
-    private5*: TXID
-    private6*: cint
-    resource_alloc*: proc (para1: PXDisplay): TXID{.cdecl.}
-    byte_order*: cint
-    bitmap_unit*: cint
-    bitmap_pad*: cint
-    bitmap_bit_order*: cint
-    nformats*: cint
-    pixmap_format*: PScreenFormat
-    private8*: cint
-    release*: cint
-    private9*, private10*: PXPrivate
-    qlen*: cint
-    last_request_read*: culong
-    request*: culong
-    private11*: TXPointer
-    private12*: TXPointer
-    private13*: TXPointer
-    private14*: TXPointer
-    max_request_size*: cunsigned
-    db*: PXrmHashBucketRec
-    private15*: proc (para1: PXDisplay): cint{.cdecl.}
-    display_name*: cstring
-    default_screen*: cint
-    nscreens*: cint
-    screens*: PScreen
-    motion_buffer*: culong
-    private16*: culong
-    min_keycode*: cint
-    max_keycode*: cint
-    private17*: TXPointer
-    private18*: TXPointer
-    private19*: cint
-    xdefaults*: cstring
-
-  PXKeyEvent* = ptr TXKeyEvent
-  TXKeyEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    send_event*: TBool
-    display*: PDisplay
-    window*: TWindow
-    root*: TWindow
-    subwindow*: TWindow
-    time*: TTime
-    x*, y*: cint
-    x_root*, y_root*: cint
-    state*: cuint
-    keycode*: cuint
-    same_screen*: TBool
-
-  PXKeyPressedEvent* = ptr TXKeyPressedEvent
-  TXKeyPressedEvent* = TXKeyEvent
-  PXKeyReleasedEvent* = ptr TXKeyReleasedEvent
-  TXKeyReleasedEvent* = TXKeyEvent
-  PXButtonEvent* = ptr TXButtonEvent
-  TXButtonEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    send_event*: TBool
-    display*: PDisplay
-    window*: TWindow
-    root*: TWindow
-    subwindow*: TWindow
-    time*: TTime
-    x*, y*: cint
-    x_root*, y_root*: cint
-    state*: cuint
-    button*: cuint
-    same_screen*: TBool
-
-  PXButtonPressedEvent* = ptr TXButtonPressedEvent
-  TXButtonPressedEvent* = TXButtonEvent
-  PXButtonReleasedEvent* = ptr TXButtonReleasedEvent
-  TXButtonReleasedEvent* = TXButtonEvent
-  PXMotionEvent* = ptr TXMotionEvent
-  TXMotionEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    send_event*: TBool
-    display*: PDisplay
-    window*: TWindow
-    root*: TWindow
-    subwindow*: TWindow
-    time*: TTime
-    x*, y*: cint
-    x_root*, y_root*: cint
-    state*: cuint
-    is_hint*: cchar
-    same_screen*: TBool
-
-  PXPointerMovedEvent* = ptr TXPointerMovedEvent
-  TXPointerMovedEvent* = TXMotionEvent
-  PXCrossingEvent* = ptr TXCrossingEvent
-  TXCrossingEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    send_event*: TBool
-    display*: PDisplay
-    window*: TWindow
-    root*: TWindow
-    subwindow*: TWindow
-    time*: TTime
-    x*, y*: cint
-    x_root*, y_root*: cint
-    mode*: cint
-    detail*: cint
-    same_screen*: TBool
-    focus*: TBool
-    state*: cuint
-
-  PXEnterWindowEvent* = ptr TXEnterWindowEvent
-  TXEnterWindowEvent* = TXCrossingEvent
-  PXLeaveWindowEvent* = ptr TXLeaveWindowEvent
-  TXLeaveWindowEvent* = TXCrossingEvent
-  PXFocusChangeEvent* = ptr TXFocusChangeEvent
-  TXFocusChangeEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    send_event*: TBool
-    display*: PDisplay
-    window*: TWindow
-    mode*: cint
-    detail*: cint
-
-  PXFocusInEvent* = ptr TXFocusInEvent
-  TXFocusInEvent* = TXFocusChangeEvent
-  PXFocusOutEvent* = ptr TXFocusOutEvent
-  TXFocusOutEvent* = TXFocusChangeEvent
-  PXKeymapEvent* = ptr TXKeymapEvent
-  TXKeymapEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    send_event*: TBool
-    display*: PDisplay
-    window*: TWindow
-    key_vector*: array[0..31, cchar]
-
-  PXExposeEvent* = ptr TXExposeEvent
-  TXExposeEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    send_event*: TBool
-    display*: PDisplay
-    window*: TWindow
-    x*, y*: cint
-    width*, height*: cint
-    count*: cint
-
-  PXGraphicsExposeEvent* = ptr TXGraphicsExposeEvent
-  TXGraphicsExposeEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    send_event*: TBool
-    display*: PDisplay
-    drawable*: TDrawable
-    x*, y*: cint
-    width*, height*: cint
-    count*: cint
-    major_code*: cint
-    minor_code*: cint
-
-  PXNoExposeEvent* = ptr TXNoExposeEvent
-  TXNoExposeEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    send_event*: TBool
-    display*: PDisplay
-    drawable*: TDrawable
-    major_code*: cint
-    minor_code*: cint
-
-  PXVisibilityEvent* = ptr TXVisibilityEvent
-  TXVisibilityEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    send_event*: TBool
-    display*: PDisplay
-    window*: TWindow
-    state*: cint
-
-  PXCreateWindowEvent* = ptr TXCreateWindowEvent
-  TXCreateWindowEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    send_event*: TBool
-    display*: PDisplay
-    parent*: TWindow
-    window*: TWindow
-    x*, y*: cint
-    width*, height*: cint
-    border_width*: cint
-    override_redirect*: TBool
-
-  PXDestroyWindowEvent* = ptr TXDestroyWindowEvent
-  TXDestroyWindowEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    send_event*: TBool
-    display*: PDisplay
-    event*: TWindow
-    window*: TWindow
-
-  PXUnmapEvent* = ptr TXUnmapEvent
-  TXUnmapEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    send_event*: TBool
-    display*: PDisplay
-    event*: TWindow
-    window*: TWindow
-    from_configure*: TBool
-
-  PXMapEvent* = ptr TXMapEvent
-  TXMapEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    send_event*: TBool
-    display*: PDisplay
-    event*: TWindow
-    window*: TWindow
-    override_redirect*: TBool
-
-  PXMapRequestEvent* = ptr TXMapRequestEvent
-  TXMapRequestEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    send_event*: TBool
-    display*: PDisplay
-    parent*: TWindow
-    window*: TWindow
-
-  PXReparentEvent* = ptr TXReparentEvent
-  TXReparentEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    send_event*: TBool
-    display*: PDisplay
-    event*: TWindow
-    window*: TWindow
-    parent*: TWindow
-    x*, y*: cint
-    override_redirect*: TBool
-
-  PXConfigureEvent* = ptr TXConfigureEvent
-  TXConfigureEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    send_event*: TBool
-    display*: PDisplay
-    event*: TWindow
-    window*: TWindow
-    x*, y*: cint
-    width*, height*: cint
-    border_width*: cint
-    above*: TWindow
-    override_redirect*: TBool
-
-  PXGravityEvent* = ptr TXGravityEvent
-  TXGravityEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    send_event*: TBool
-    display*: PDisplay
-    event*: TWindow
-    window*: TWindow
-    x*, y*: cint
-
-  PXResizeRequestEvent* = ptr TXResizeRequestEvent
-  TXResizeRequestEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    send_event*: TBool
-    display*: PDisplay
-    window*: TWindow
-    width*, height*: cint
-
-  PXConfigureRequestEvent* = ptr TXConfigureRequestEvent
-  TXConfigureRequestEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    send_event*: TBool
-    display*: PDisplay
-    parent*: TWindow
-    window*: TWindow
-    x*, y*: cint
-    width*, height*: cint
-    border_width*: cint
-    above*: TWindow
-    detail*: cint
-    value_mask*: culong
-
-  PXCirculateEvent* = ptr TXCirculateEvent
-  TXCirculateEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    send_event*: TBool
-    display*: PDisplay
-    event*: TWindow
-    window*: TWindow
-    place*: cint
-
-  PXCirculateRequestEvent* = ptr TXCirculateRequestEvent
-  TXCirculateRequestEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    send_event*: TBool
-    display*: PDisplay
-    parent*: TWindow
-    window*: TWindow
-    place*: cint
-
-  PXPropertyEvent* = ptr TXPropertyEvent
-  TXPropertyEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    send_event*: TBool
-    display*: PDisplay
-    window*: TWindow
-    atom*: TAtom
-    time*: TTime
-    state*: cint
-
-  PXSelectionClearEvent* = ptr TXSelectionClearEvent
-  TXSelectionClearEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    send_event*: TBool
-    display*: PDisplay
-    window*: TWindow
-    selection*: TAtom
-    time*: TTime
-
-  PXSelectionRequestEvent* = ptr TXSelectionRequestEvent
-  TXSelectionRequestEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    send_event*: TBool
-    display*: PDisplay
-    owner*: TWindow
-    requestor*: TWindow
-    selection*: TAtom
-    target*: TAtom
-    property*: TAtom
-    time*: TTime
-
-  PXSelectionEvent* = ptr TXSelectionEvent
-  TXSelectionEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    send_event*: TBool
-    display*: PDisplay
-    requestor*: TWindow
-    selection*: TAtom
-    target*: TAtom
-    property*: TAtom
-    time*: TTime
-
-  PXColormapEvent* = ptr TXColormapEvent
-  TXColormapEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    send_event*: TBool
-    display*: PDisplay
-    window*: TWindow
-    colormap*: TColormap
-    c_new*: TBool
-    state*: cint
-
-  PXClientMessageEvent* = ptr TXClientMessageEvent
-  TXClientMessageEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    send_event*: TBool
-    display*: PDisplay
-    window*: TWindow
-    message_type*: TAtom
-    format*: cint
-    data*: array[0..4, clong] # using clong here to be 32/64-bit dependent
-        # as the original C union
-
-  PXMappingEvent* = ptr TXMappingEvent
-  TXMappingEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    send_event*: TBool
-    display*: PDisplay
-    window*: TWindow
-    request*: cint
-    first_keycode*: cint
-    count*: cint
-
-  PXErrorEvent* = ptr TXErrorEvent
-  TXErrorEvent*{.final.} = object 
-    theType*: cint
-    display*: PDisplay
-    resourceid*: TXID
-    serial*: culong
-    error_code*: cuchar
-    request_code*: cuchar
-    minor_code*: cuchar
-
-  PXAnyEvent* = ptr TXAnyEvent
-  TXAnyEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    send_event*: TBool
-    display*: PDisplay
-    window*: TWindow
-
-  PXEvent* = ptr TXEvent
-  TXEvent*{.final.} = object 
-    theType*: cint
-    pad*: array[0..22, clong] #
-                              #       case longint of
-                              #          0 : ( theType : cint );
-                              #          1 : ( xany : TXAnyEvent );
-                              #          2 : ( xkey : TXKeyEvent );
-                              #          3 : ( xbutton : TXButtonEvent );
-                              #          4 : ( xmotion : TXMotionEvent );
-                              #          5 : ( xcrossing : TXCrossingEvent );
-                              #          6 : ( xfocus : TXFocusChangeEvent );
-                              #          7 : ( xexpose : TXExposeEvent );
-                              #          8 : ( xgraphicsexpose : TXGraphicsExposeEvent );
-                              #          9 : ( xnoexpose : TXNoExposeEvent );
-                              #          10 : ( xvisibility : TXVisibilityEvent );
-                              #          11 : ( xcreatewindow : TXCreateWindowEvent );
-                              #          12 : ( xdestroywindow : TXDestroyWindowEvent );
-                              #          13 : ( xunmap : TXUnmapEvent );
-                              #          14 : ( xmap : TXMapEvent );
-                              #          15 : ( xmaprequest : TXMapRequestEvent );
-                              #          16 : ( xreparent : TXReparentEvent );
-                              #          17 : ( xconfigure : TXConfigureEvent );
-                              #          18 : ( xgravity : TXGravityEvent );
-                              #          19 : ( xresizerequest : TXResizeRequestEvent );
-                              #          20 : ( xconfigurerequest : TXConfigureRequestEvent );
-                              #          21 : ( xcirculate : TXCirculateEvent );
-                              #          22 : ( xcirculaterequest : TXCirculateRequestEvent );
-                              #          23 : ( xproperty : TXPropertyEvent );
-                              #          24 : ( xselectionclear : TXSelectionClearEvent );
-                              #          25 : ( xselectionrequest : TXSelectionRequestEvent );
-                              #          26 : ( xselection : TXSelectionEvent );
-                              #          27 : ( xcolormap : TXColormapEvent );
-                              #          28 : ( xclient : TXClientMessageEvent );
-                              #          29 : ( xmapping : TXMappingEvent );
-                              #          30 : ( xerror : TXErrorEvent );
-                              #          31 : ( xkeymap : TXKeymapEvent );
-                              #          32 : ( pad : array[0..23] of clong );
-                              #          
-  
-
-proc xclient*(e: PXEvent): PXClientMessageEvent =
-    ## Treats XEvent as XClientMessageEvent
-    return cast[PXClientMessageEvent](e)
-
-proc xclient*(e: var TXEvent): PXClientMessageEvent =
-    return xclient(PXEvent(e.addr))
-
-type 
-  PXCharStruct* = ptr TXCharStruct
-  TXCharStruct*{.final.} = object 
-    lbearing*: cshort
-    rbearing*: cshort
-    width*: cshort
-    ascent*: cshort
-    descent*: cshort
-    attributes*: cushort
-
-  PXFontProp* = ptr TXFontProp
-  TXFontProp*{.final.} = object 
-    name*: TAtom
-    card32*: culong
-
-  PPPXFontStruct* = ptr PPXFontStruct
-  PPXFontStruct* = ptr PXFontStruct
-  PXFontStruct* = ptr TXFontStruct
-  TXFontStruct*{.final.} = object 
-    ext_data*: PXExtData
-    fid*: TFont
-    direction*: cunsigned
-    min_char_or_byte2*: cunsigned
-    max_char_or_byte2*: cunsigned
-    min_byte1*: cunsigned
-    max_byte1*: cunsigned
-    all_chars_exist*: TBool
-    default_char*: cunsigned
-    n_properties*: cint
-    properties*: PXFontProp
-    min_bounds*: TXCharStruct
-    max_bounds*: TXCharStruct
-    per_char*: PXCharStruct
-    ascent*: cint
-    descent*: cint
-
-  PXTextItem* = ptr TXTextItem
-  TXTextItem*{.final.} = object 
-    chars*: cstring
-    nchars*: cint
-    delta*: cint
-    font*: TFont
-
-  PXChar2b* = ptr TXChar2b
-  TXChar2b*{.final.} = object 
-    byte1*: cuchar
-    byte2*: cuchar
-
-  PXTextItem16* = ptr TXTextItem16
-  TXTextItem16*{.final.} = object 
-    chars*: PXChar2b
-    nchars*: cint
-    delta*: cint
-    font*: TFont
-
-  PXEDataObject* = ptr TXEDataObject
-  TXEDataObject*{.final.} = object 
-    display*: PDisplay        #case longint of
-                              #          0 : ( display : PDisplay );
-                              #          1 : ( gc : TGC );
-                              #          2 : ( visual : PVisual );
-                              #          3 : ( screen : PScreen );
-                              #          4 : ( pixmap_format : PScreenFormat );
-                              #          5 : ( font : PXFontStruct );
-  
-  PXFontSetExtents* = ptr TXFontSetExtents
-  TXFontSetExtents*{.final.} = object 
-    max_ink_extent*: TXRectangle
-    max_logical_extent*: TXRectangle
-
-  PXOM* = ptr TXOM
-  TXOM*{.final.} = object 
-  PXOC* = ptr TXOC
-  TXOC*{.final.} = object 
-  TXFontSet* = PXOC
-  PXFontSet* = ptr TXFontSet
-  PXmbTextItem* = ptr TXmbTextItem
-  TXmbTextItem*{.final.} = object 
-    chars*: cstring
-    nchars*: cint
-    delta*: cint
-    font_set*: TXFontSet
-
-  PXwcTextItem* = ptr TXwcTextItem
-  TXwcTextItem*{.final.} = object 
-    chars*: PWideChar         #wchar_t*
-    nchars*: cint
-    delta*: cint
-    font_set*: TXFontSet
-
-
-const 
-  XNRequiredCharSet* = "requiredCharSet"
-  XNQueryOrientation* = "queryOrientation"
-  XNBaseFontName* = "baseFontName"
-  XNOMAutomatic* = "omAutomatic"
-  XNMissingCharSet* = "missingCharSet"
-  XNDefaultString* = "defaultString"
-  XNOrientation* = "orientation"
-  XNDirectionalDependentDrawing* = "directionalDependentDrawing"
-  XNContextualDrawing* = "contextualDrawing"
-  XNFontInfo* = "fontInfo"
-
-type 
-  PXOMCharSetList* = ptr TXOMCharSetList
-  TXOMCharSetList*{.final.} = object 
-    charset_count*: cint
-    charset_list*: PPChar
-
-  PXOrientation* = ptr TXOrientation
-  TXOrientation* = enum 
-    XOMOrientation_LTR_TTB, XOMOrientation_RTL_TTB, XOMOrientation_TTB_LTR, 
-    XOMOrientation_TTB_RTL, XOMOrientation_Context
-  PXOMOrientation* = ptr TXOMOrientation
-  TXOMOrientation*{.final.} = object 
-    num_orientation*: cint
-    orientation*: PXOrientation
-
-  PXOMFontInfo* = ptr TXOMFontInfo
-  TXOMFontInfo*{.final.} = object 
-    num_font*: cint
-    font_struct_list*: ptr PXFontStruct
-    font_name_list*: PPChar
-
-  PXIM* = ptr TXIM
-  TXIM*{.final.} = object 
-  PXIC* = ptr TXIC
-  TXIC*{.final.} = object 
-  TXIMProc* = proc (para1: TXIM, para2: TXPointer, para3: TXPointer){.cdecl.}
-  TXICProc* = proc (para1: TXIC, para2: TXPointer, para3: TXPointer): TBool{.
-      cdecl.}
-  TXIDProc* = proc (para1: PDisplay, para2: TXPointer, para3: TXPointer){.cdecl.}
-  PXIMStyle* = ptr TXIMStyle
-  TXIMStyle* = culong
-  PXIMStyles* = ptr TXIMStyles
-  TXIMStyles*{.final.} = object 
-    count_styles*: cushort
-    supported_styles*: PXIMStyle
-
-
-const 
-  XIMPreeditArea* = 0x00000001
-  XIMPreeditCallbacks* = 0x00000002
-  XIMPreeditPosition* = 0x00000004
-  XIMPreeditNothing* = 0x00000008
-  XIMPreeditNone* = 0x00000010
-  XIMStatusArea* = 0x00000100
-  XIMStatusCallbacks* = 0x00000200
-  XIMStatusNothing* = 0x00000400
-  XIMStatusNone* = 0x00000800
-  XNVaNestedList* = "XNVaNestedList"
-  XNQueryInputStyle* = "queryInputStyle"
-  XNClientWindow* = "clientWindow"
-  XNInputStyle* = "inputStyle"
-  XNFocusWindow* = "focusWindow"
-  XNResourceName* = "resourceName"
-  XNResourceClass* = "resourceClass"
-  XNGeometryCallback* = "geometryCallback"
-  XNDestroyCallback* = "destroyCallback"
-  XNFilterEvents* = "filterEvents"
-  XNPreeditStartCallback* = "preeditStartCallback"
-  XNPreeditDoneCallback* = "preeditDoneCallback"
-  XNPreeditDrawCallback* = "preeditDrawCallback"
-  XNPreeditCaretCallback* = "preeditCaretCallback"
-  XNPreeditStateNotifyCallback* = "preeditStateNotifyCallback"
-  XNPreeditAttributes* = "preeditAttributes"
-  XNStatusStartCallback* = "statusStartCallback"
-  XNStatusDoneCallback* = "statusDoneCallback"
-  XNStatusDrawCallback* = "statusDrawCallback"
-  XNStatusAttributes* = "statusAttributes"
-  XNArea* = "area"
-  XNAreaNeeded* = "areaNeeded"
-  XNSpotLocation* = "spotLocation"
-  XNColormap* = "colorMap"
-  XNStdColormap* = "stdColorMap"
-  XNForeground* = "foreground"
-  XNBackground* = "background"
-  XNBackgroundPixmap* = "backgroundPixmap"
-  XNFontSet* = "fontSet"
-  XNLineSpace* = "lineSpace"
-  XNCursor* = "cursor"
-  XNQueryIMValuesList* = "queryIMValuesList"
-  XNQueryICValuesList* = "queryICValuesList"
-  XNVisiblePosition* = "visiblePosition"
-  XNR6PreeditCallback* = "r6PreeditCallback"
-  XNStringConversionCallback* = "stringConversionCallback"
-  XNStringConversion* = "stringConversion"
-  XNResetState* = "resetState"
-  XNHotKey* = "hotKey"
-  XNHotKeyState* = "hotKeyState"
-  XNPreeditState* = "preeditState"
-  XNSeparatorofNestedList* = "separatorofNestedList"
-  XBufferOverflow* = - (1)
-  XLookupNone* = 1
-  XLookupChars* = 2
-  XLookupKeySymVal* = 3
-  XLookupBoth* = 4
-
-type 
-  PXVaNestedList* = ptr TXVaNestedList
-  TXVaNestedList* = pointer
-  PXIMCallback* = ptr TXIMCallback
-  TXIMCallback*{.final.} = object 
-    client_data*: TXPointer
-    callback*: TXIMProc
-
-  PXICCallback* = ptr TXICCallback
-  TXICCallback*{.final.} = object 
-    client_data*: TXPointer
-    callback*: TXICProc
-
-  PXIMFeedback* = ptr TXIMFeedback
-  TXIMFeedback* = culong
-
-const 
-  XIMReverse* = 1
-  XIMUnderline* = 1 shl 1
-  XIMHighlight* = 1 shl 2
-  XIMPrimary* = 1 shl 5
-  XIMSecondary* = 1 shl 6
-  XIMTertiary* = 1 shl 7
-  XIMVisibleToForward* = 1 shl 8
-  XIMVisibleToBackword* = 1 shl 9
-  XIMVisibleToCenter* = 1 shl 10
-
-type 
-  PXIMText* = ptr TXIMText
-  TXIMText*{.final.} = object 
-    len*: cushort
-    feedback*: PXIMFeedback
-    encoding_is_wchar*: TBool
-    multi_byte*: cstring
-
-  PXIMPreeditState* = ptr TXIMPreeditState
-  TXIMPreeditState* = culong
-
-const 
-  XIMPreeditUnKnown* = 0
-  XIMPreeditEnable* = 1
-  XIMPreeditDisable* = 1 shl 1
-
-type 
-  PXIMPreeditStateNotifyCallbackStruct* = ptr TXIMPreeditStateNotifyCallbackStruct
-  TXIMPreeditStateNotifyCallbackStruct*{.final.} = object 
-    state*: TXIMPreeditState
-
-  PXIMResetState* = ptr TXIMResetState
-  TXIMResetState* = culong
-
-const 
-  XIMInitialState* = 1
-  XIMPreserveState* = 1 shl 1
-
-type 
-  PXIMStringConversionFeedback* = ptr TXIMStringConversionFeedback
-  TXIMStringConversionFeedback* = culong
-
-const 
-  XIMStringConversionLeftEdge* = 0x00000001
-  XIMStringConversionRightEdge* = 0x00000002
-  XIMStringConversionTopEdge* = 0x00000004
-  XIMStringConversionBottomEdge* = 0x00000008
-  XIMStringConversionConcealed* = 0x00000010
-  XIMStringConversionWrapped* = 0x00000020
-
-type 
-  PXIMStringConversionText* = ptr TXIMStringConversionText
-  TXIMStringConversionText*{.final.} = object 
-    len*: cushort
-    feedback*: PXIMStringConversionFeedback
-    encoding_is_wchar*: TBool
-    mbs*: cstring
-
-  PXIMStringConversionPosition* = ptr TXIMStringConversionPosition
-  TXIMStringConversionPosition* = cushort
-  PXIMStringConversionType* = ptr TXIMStringConversionType
-  TXIMStringConversionType* = cushort
-
-const 
-  XIMStringConversionBuffer* = 0x00000001
-  XIMStringConversionLine* = 0x00000002
-  XIMStringConversionWord* = 0x00000003
-  XIMStringConversionChar* = 0x00000004
-
-type 
-  PXIMStringConversionOperation* = ptr TXIMStringConversionOperation
-  TXIMStringConversionOperation* = cushort
-
-const 
-  XIMStringConversionSubstitution* = 0x00000001
-  XIMStringConversionRetrieval* = 0x00000002
-
-type 
-  PXIMCaretDirection* = ptr TXIMCaretDirection
-  TXIMCaretDirection* = enum 
-    XIMForwardChar, XIMBackwardChar, XIMForwardWord, XIMBackwardWord, 
-    XIMCaretUp, XIMCaretDown, XIMNextLine, XIMPreviousLine, XIMLineStart, 
-    XIMLineEnd, XIMAbsolutePosition, XIMDontChange
-  PXIMStringConversionCallbackStruct* = ptr TXIMStringConversionCallbackStruct
-  TXIMStringConversionCallbackStruct*{.final.} = object 
-    position*: TXIMStringConversionPosition
-    direction*: TXIMCaretDirection
-    operation*: TXIMStringConversionOperation
-    factor*: cushort
-    text*: PXIMStringConversionText
-
-  PXIMPreeditDrawCallbackStruct* = ptr TXIMPreeditDrawCallbackStruct
-  TXIMPreeditDrawCallbackStruct*{.final.} = object 
-    caret*: cint
-    chg_first*: cint
-    chg_length*: cint
-    text*: PXIMText
-
-  PXIMCaretStyle* = ptr TXIMCaretStyle
-  TXIMCaretStyle* = enum 
-    XIMIsInvisible, XIMIsPrimary, XIMIsSecondary
-  PXIMPreeditCaretCallbackStruct* = ptr TXIMPreeditCaretCallbackStruct
-  TXIMPreeditCaretCallbackStruct*{.final.} = object 
-    position*: cint
-    direction*: TXIMCaretDirection
-    style*: TXIMCaretStyle
-
-  PXIMStatusDataType* = ptr TXIMStatusDataType
-  TXIMStatusDataType* = enum 
-    XIMTextType, XIMBitmapType
-  PXIMStatusDrawCallbackStruct* = ptr TXIMStatusDrawCallbackStruct
-  TXIMStatusDrawCallbackStruct*{.final.} = object 
-    theType*: TXIMStatusDataType
-    bitmap*: TPixmap
-
-  PXIMHotKeyTrigger* = ptr TXIMHotKeyTrigger
-  TXIMHotKeyTrigger*{.final.} = object 
-    keysym*: TKeySym
-    modifier*: cint
-    modifier_mask*: cint
-
-  PXIMHotKeyTriggers* = ptr TXIMHotKeyTriggers
-  TXIMHotKeyTriggers*{.final.} = object 
-    num_hot_key*: cint
-    key*: PXIMHotKeyTrigger
-
-  PXIMHotKeyState* = ptr TXIMHotKeyState
-  TXIMHotKeyState* = culong
-
-const 
-  XIMHotKeyStateON* = 0x00000001
-  XIMHotKeyStateOFF* = 0x00000002
-
-type 
-  PXIMValuesList* = ptr TXIMValuesList
-  TXIMValuesList*{.final.} = object 
-    count_values*: cushort
-    supported_values*: PPChar
-
-
-type 
-  funcdisp* = proc (display: PDisplay): cint{.cdecl.}
-  funcifevent* = proc (display: PDisplay, event: PXEvent, p: TXPointer): TBool{.
-      cdecl.}
-  chararr32* = array[0..31, char]
-
-const 
-  AllPlanes*: culong = culong(not 0)
-
-proc XLoadQueryFont*(para1: PDisplay, para2: cstring): PXFontStruct{.libx11.}
-proc XQueryFont*(para1: PDisplay, para2: TXID): PXFontStruct{.libx11.}
-proc XGetMotionEvents*(para1: PDisplay, para2: TWindow, para3: TTime, 
-                       para4: TTime, para5: Pcint): PXTimeCoord{.libx11.}
-proc XDeleteModifiermapEntry*(para1: PXModifierKeymap, para2: TKeyCode, 
-                              para3: cint): PXModifierKeymap{.libx11.}
-proc XGetModifierMapping*(para1: PDisplay): PXModifierKeymap{.libx11.}
-proc XInsertModifiermapEntry*(para1: PXModifierKeymap, para2: TKeyCode, 
-                              para3: cint): PXModifierKeymap{.libx11.}
-proc XNewModifiermap*(para1: cint): PXModifierKeymap{.libx11.}
-proc XCreateImage*(para1: PDisplay, para2: PVisual, para3: cuint, para4: cint, 
-                   para5: cint, para6: cstring, para7: cuint, para8: cuint, 
-                   para9: cint, para10: cint): PXImage{.libx11.}
-proc XInitImage*(para1: PXImage): TStatus{.libx11.}
-proc XGetImage*(para1: PDisplay, para2: TDrawable, para3: cint, para4: cint, 
-                para5: cuint, para6: cuint, para7: culong, para8: cint): PXImage{.
-    libx11.}
-proc XGetSubImage*(para1: PDisplay, para2: TDrawable, para3: cint, para4: cint, 
-                   para5: cuint, para6: cuint, para7: culong, para8: cint, 
-                   para9: PXImage, para10: cint, para11: cint): PXImage{.libx11.}
-proc XOpenDisplay*(para1: cstring): PDisplay{.libx11.}
-proc XrmInitialize*(){.libx11.}
-proc XFetchBytes*(para1: PDisplay, para2: Pcint): cstring{.libx11.}
-proc XFetchBuffer*(para1: PDisplay, para2: Pcint, para3: cint): cstring{.libx11.}
-proc XGetAtomName*(para1: PDisplay, para2: TAtom): cstring{.libx11.}
-proc XGetAtomNames*(para1: PDisplay, para2: PAtom, para3: cint, para4: PPchar): TStatus{.
-    libx11.}
-proc XGetDefault*(para1: PDisplay, para2: cstring, para3: cstring): cstring{.
-    libx11.}
-proc XDisplayName*(para1: cstring): cstring{.libx11.}
-proc XKeysymToString*(para1: TKeySym): cstring{.libx11.}
-proc XSynchronize*(para1: PDisplay, para2: TBool): funcdisp{.libx11.}
-proc XSetAfterFunction*(para1: PDisplay, para2: funcdisp): funcdisp{.libx11.}
-proc XInternAtom*(para1: PDisplay, para2: cstring, para3: TBool): TAtom{.libx11.}
-proc XInternAtoms*(para1: PDisplay, para2: PPchar, para3: cint, para4: TBool, 
-                   para5: PAtom): TStatus{.libx11.}
-proc XCopyColormapAndFree*(para1: PDisplay, para2: TColormap): TColormap{.libx11.}
-proc XCreateColormap*(para1: PDisplay, para2: TWindow, para3: PVisual, 
-                      para4: cint): TColormap{.libx11.}
-proc XCreatePixmapCursor*(para1: PDisplay, para2: TPixmap, para3: TPixmap, 
-                          para4: PXColor, para5: PXColor, para6: cuint, 
-                          para7: cuint): TCursor{.libx11.}
-proc XCreateGlyphCursor*(para1: PDisplay, para2: TFont, para3: TFont, 
-                         para4: cuint, para5: cuint, para6: PXColor, 
-                         para7: PXColor): TCursor{.libx11.}
-proc XCreateFontCursor*(para1: PDisplay, para2: cuint): TCursor{.libx11.}
-proc XLoadFont*(para1: PDisplay, para2: cstring): TFont{.libx11.}
-proc XCreateGC*(para1: PDisplay, para2: TDrawable, para3: culong, 
-                para4: PXGCValues): TGC{.libx11.}
-proc XGContextFromGC*(para1: TGC): TGContext{.libx11.}
-proc XFlushGC*(para1: PDisplay, para2: TGC){.libx11.}
-proc XCreatePixmap*(para1: PDisplay, para2: TDrawable, para3: cuint, 
-                    para4: cuint, para5: cuint): TPixmap{.libx11.}
-proc XCreateBitmapFromData*(para1: PDisplay, para2: TDrawable, para3: cstring, 
-                            para4: cuint, para5: cuint): TPixmap{.libx11.}
-proc XCreatePixmapFromBitmapData*(para1: PDisplay, para2: TDrawable, 
-                                  para3: cstring, para4: cuint, para5: cuint, 
-                                  para6: culong, para7: culong, para8: cuint): TPixmap{.
-    libx11.}
-proc XCreateSimpleWindow*(para1: PDisplay, para2: TWindow, para3: cint, 
-                          para4: cint, para5: cuint, para6: cuint, para7: cuint, 
-                          para8: culong, para9: culong): TWindow{.libx11.}
-proc XGetSelectionOwner*(para1: PDisplay, para2: TAtom): TWindow{.libx11.}
-proc XCreateWindow*(para1: PDisplay, para2: TWindow, para3: cint, para4: cint, 
-                    para5: cuint, para6: cuint, para7: cuint, para8: cint, 
-                    para9: cuint, para10: PVisual, para11: culong, 
-                    para12: PXSetWindowAttributes): TWindow{.libx11.}
-proc XListInstalledColormaps*(para1: PDisplay, para2: TWindow, para3: Pcint): PColormap{.
-    libx11.}
-proc XListFonts*(para1: PDisplay, para2: cstring, para3: cint, para4: Pcint): PPChar{.
-    libx11.}
-proc XListFontsWithInfo*(para1: PDisplay, para2: cstring, para3: cint, 
-                         para4: Pcint, para5: PPXFontStruct): PPChar{.libx11.}
-proc XGetFontPath*(para1: PDisplay, para2: Pcint): PPChar{.libx11.}
-proc XListExtensions*(para1: PDisplay, para2: Pcint): PPChar{.libx11.}
-proc XListProperties*(para1: PDisplay, para2: TWindow, para3: Pcint): PAtom{.
-    libx11.}
-proc XListHosts*(para1: PDisplay, para2: Pcint, para3: PBool): PXHostAddress{.
-    libx11.}
-proc XKeycodeToKeysym*(para1: PDisplay, para2: TKeyCode, para3: cint): TKeySym{.
-    libx11.}
-proc XLookupKeysym*(para1: PXKeyEvent, para2: cint): TKeySym{.libx11.}
-proc XGetKeyboardMapping*(para1: PDisplay, para2: TKeyCode, para3: cint, 
-                          para4: Pcint): PKeySym{.libx11.}
-proc XStringToKeysym*(para1: cstring): TKeySym{.libx11.}
-proc XMaxRequestSize*(para1: PDisplay): clong{.libx11.}
-proc XExtendedMaxRequestSize*(para1: PDisplay): clong{.libx11.}
-proc XResourceManagerString*(para1: PDisplay): cstring{.libx11.}
-proc XScreenResourceString*(para1: PScreen): cstring{.libx11.}
-proc XDisplayMotionBufferSize*(para1: PDisplay): culong{.libx11.}
-proc XVisualIDFromVisual*(para1: PVisual): TVisualID{.libx11.}
-proc XInitThreads*(): TStatus{.libx11.}
-proc XLockDisplay*(para1: PDisplay){.libx11.}
-proc XUnlockDisplay*(para1: PDisplay){.libx11.}
-proc XInitExtension*(para1: PDisplay, para2: cstring): PXExtCodes{.libx11.}
-proc XAddExtension*(para1: PDisplay): PXExtCodes{.libx11.}
-proc XFindOnExtensionList*(para1: PPXExtData, para2: cint): PXExtData{.libx11.}
-proc XEHeadOfExtensionList*(para1: TXEDataObject): PPXExtData{.libx11.}
-proc XRootWindow*(para1: PDisplay, para2: cint): TWindow{.libx11.}
-proc XDefaultRootWindow*(para1: PDisplay): TWindow{.libx11.}
-proc XRootWindowOfScreen*(para1: PScreen): TWindow{.libx11.}
-proc XDefaultVisual*(para1: PDisplay, para2: cint): PVisual{.libx11.}
-proc XDefaultVisualOfScreen*(para1: PScreen): PVisual{.libx11.}
-proc XDefaultGC*(para1: PDisplay, para2: cint): TGC{.libx11.}
-proc XDefaultGCOfScreen*(para1: PScreen): TGC{.libx11.}
-proc XBlackPixel*(para1: PDisplay, para2: cint): culong{.libx11.}
-proc XWhitePixel*(para1: PDisplay, para2: cint): culong{.libx11.}
-proc XAllPlanes*(): culong{.libx11.}
-proc XBlackPixelOfScreen*(para1: PScreen): culong{.libx11.}
-proc XWhitePixelOfScreen*(para1: PScreen): culong{.libx11.}
-proc XNextRequest*(para1: PDisplay): culong{.libx11.}
-proc XLastKnownRequestProcessed*(para1: PDisplay): culong{.libx11.}
-proc XServerVendor*(para1: PDisplay): cstring{.libx11.}
-proc XDisplayString*(para1: PDisplay): cstring{.libx11.}
-proc XDefaultColormap*(para1: PDisplay, para2: cint): TColormap{.libx11.}
-proc XDefaultColormapOfScreen*(para1: PScreen): TColormap{.libx11.}
-proc XDisplayOfScreen*(para1: PScreen): PDisplay{.libx11.}
-proc XScreenOfDisplay*(para1: PDisplay, para2: cint): PScreen{.libx11.}
-proc XDefaultScreenOfDisplay*(para1: PDisplay): PScreen{.libx11.}
-proc XEventMaskOfScreen*(para1: PScreen): clong{.libx11.}
-proc XScreenNumberOfScreen*(para1: PScreen): cint{.libx11.}
-type 
-  TXErrorHandler* = proc (para1: PDisplay, para2: PXErrorEvent): cint{.cdecl.}
-
-proc XSetErrorHandler*(para1: TXErrorHandler): TXErrorHandler{.libx11.}
-type 
-  TXIOErrorHandler* = proc (para1: PDisplay): cint{.cdecl.}
-
-proc XSetIOErrorHandler*(para1: TXIOErrorHandler): TXIOErrorHandler{.libx11.}
-proc XListPixmapFormats*(para1: PDisplay, para2: Pcint): PXPixmapFormatValues{.
-    libx11.}
-proc XListDepths*(para1: PDisplay, para2: cint, para3: Pcint): Pcint{.libx11.}
-proc XReconfigureWMWindow*(para1: PDisplay, para2: TWindow, para3: cint, 
-                           para4: cuint, para5: PXWindowChanges): TStatus{.
-    libx11.}
-proc XGetWMProtocols*(para1: PDisplay, para2: TWindow, para3: PPAtom, 
-                      para4: Pcint): TStatus{.libx11.}
-proc XSetWMProtocols*(para1: PDisplay, para2: TWindow, para3: PAtom, para4: cint): TStatus{.
-    libx11.}
-proc XIconifyWindow*(para1: PDisplay, para2: TWindow, para3: cint): TStatus{.
-    libx11.}
-proc XWithdrawWindow*(para1: PDisplay, para2: TWindow, para3: cint): TStatus{.
-    libx11.}
-proc XGetCommand*(para1: PDisplay, para2: TWindow, para3: PPPchar, para4: Pcint): TStatus{.
-    libx11.}
-proc XGetWMColormapWindows*(para1: PDisplay, para2: TWindow, para3: PPWindow, 
-                            para4: Pcint): TStatus{.libx11.}
-proc XSetWMColormapWindows*(para1: PDisplay, para2: TWindow, para3: PWindow, 
-                            para4: cint): TStatus{.libx11.}
-proc XFreeStringList*(para1: PPchar){.libx11.}
-proc XSetTransientForHint*(para1: PDisplay, para2: TWindow, para3: TWindow): cint{.
-    libx11.}
-proc XActivateScreenSaver*(para1: PDisplay): cint{.libx11.}
-proc XAddHost*(para1: PDisplay, para2: PXHostAddress): cint{.libx11.}
-proc XAddHosts*(para1: PDisplay, para2: PXHostAddress, para3: cint): cint{.
-    libx11.}
-proc XAddToExtensionList*(para1: PPXExtData, para2: PXExtData): cint{.libx11.}
-proc XAddToSaveSet*(para1: PDisplay, para2: TWindow): cint{.libx11.}
-proc XAllocColor*(para1: PDisplay, para2: TColormap, para3: PXColor): TStatus{.
-    libx11.}
-proc XAllocColorCells*(para1: PDisplay, para2: TColormap, para3: TBool, 
-                       para4: Pculong, para5: cuint, para6: Pculong, 
-                       para7: cuint): TStatus{.libx11.}
-proc XAllocColorPlanes*(para1: PDisplay, para2: TColormap, para3: TBool, 
-                        para4: Pculong, para5: cint, para6: cint, para7: cint, 
-                        para8: cint, para9: Pculong, para10: Pculong, 
-                        para11: Pculong): TStatus{.libx11.}
-proc XAllocNamedColor*(para1: PDisplay, para2: TColormap, para3: cstring, 
-                       para4: PXColor, para5: PXColor): TStatus{.libx11.}
-proc XAllowEvents*(para1: PDisplay, para2: cint, para3: TTime): cint{.libx11.}
-proc XAutoRepeatOff*(para1: PDisplay): cint{.libx11.}
-proc XAutoRepeatOn*(para1: PDisplay): cint{.libx11.}
-proc XBell*(para1: PDisplay, para2: cint): cint{.libx11.}
-proc XBitmapBitOrder*(para1: PDisplay): cint{.libx11.}
-proc XBitmapPad*(para1: PDisplay): cint{.libx11.}
-proc XBitmapUnit*(para1: PDisplay): cint{.libx11.}
-proc XCellsOfScreen*(para1: PScreen): cint{.libx11.}
-proc XChangeActivePointerGrab*(para1: PDisplay, para2: cuint, para3: TCursor, 
-                               para4: TTime): cint{.libx11.}
-proc XChangeGC*(para1: PDisplay, para2: TGC, para3: culong, para4: PXGCValues): cint{.
-    libx11.}
-proc XChangeKeyboardControl*(para1: PDisplay, para2: culong, 
-                             para3: PXKeyboardControl): cint{.libx11.}
-proc XChangeKeyboardMapping*(para1: PDisplay, para2: cint, para3: cint, 
-                             para4: PKeySym, para5: cint): cint{.libx11.}
-proc XChangePointerControl*(para1: PDisplay, para2: TBool, para3: TBool, 
-                            para4: cint, para5: cint, para6: cint): cint{.libx11.}
-proc XChangeProperty*(para1: PDisplay, para2: TWindow, para3: TAtom, 
-                      para4: TAtom, para5: cint, para6: cint, para7: Pcuchar, 
-                      para8: cint): cint{.libx11.}
-proc XChangeSaveSet*(para1: PDisplay, para2: TWindow, para3: cint): cint{.libx11.}
-proc XChangeWindowAttributes*(para1: PDisplay, para2: TWindow, para3: culong, 
-                              para4: PXSetWindowAttributes): cint{.libx11.}
-proc XCheckIfEvent*(para1: PDisplay, para2: PXEvent, para3: funcifevent, 
-                    para4: TXPointer): TBool{.libx11.}
-proc XCheckMaskEvent*(para1: PDisplay, para2: clong, para3: PXEvent): TBool{.
-    libx11.}
-proc XCheckTypedEvent*(para1: PDisplay, para2: cint, para3: PXEvent): TBool{.
-    libx11.}
-proc XCheckTypedWindowEvent*(para1: PDisplay, para2: TWindow, para3: cint, 
-                             para4: PXEvent): TBool{.libx11.}
-proc XCheckWindowEvent*(para1: PDisplay, para2: TWindow, para3: clong, 
-                        para4: PXEvent): TBool{.libx11.}
-proc XCirculateSubwindows*(para1: PDisplay, para2: TWindow, para3: cint): cint{.
-    libx11.}
-proc XCirculateSubwindowsDown*(para1: PDisplay, para2: TWindow): cint{.libx11.}
-proc XCirculateSubwindowsUp*(para1: PDisplay, para2: TWindow): cint{.libx11.}
-proc XClearArea*(para1: PDisplay, para2: TWindow, para3: cint, para4: cint, 
-                 para5: cuint, para6: cuint, para7: TBool): cint{.libx11.}
-proc XClearWindow*(para1: PDisplay, para2: TWindow): cint{.libx11.}
-proc XCloseDisplay*(para1: PDisplay): cint{.libx11.}
-proc XConfigureWindow*(para1: PDisplay, para2: TWindow, para3: cuint, 
-                       para4: PXWindowChanges): cint{.libx11.}
-proc XConnectionNumber*(para1: PDisplay): cint{.libx11.}
-proc XConvertSelection*(para1: PDisplay, para2: TAtom, para3: TAtom, 
-                        para4: TAtom, para5: TWindow, para6: TTime): cint{.
-    libx11.}
-proc XCopyArea*(para1: PDisplay, para2: TDrawable, para3: TDrawable, para4: TGC, 
-                para5: cint, para6: cint, para7: cuint, para8: cuint, 
-                para9: cint, para10: cint): cint{.libx11.}
-proc XCopyGC*(para1: PDisplay, para2: TGC, para3: culong, para4: TGC): cint{.
-    libx11.}
-proc XCopyPlane*(para1: PDisplay, para2: TDrawable, para3: TDrawable, 
-                 para4: TGC, para5: cint, para6: cint, para7: cuint, 
-                 para8: cuint, para9: cint, para10: cint, para11: culong): cint{.
-    libx11.}
-proc XDefaultDepth*(para1: PDisplay, para2: cint): cint{.libx11.}
-proc XDefaultDepthOfScreen*(para1: PScreen): cint{.libx11.}
-proc XDefaultScreen*(para1: PDisplay): cint{.libx11.}
-proc XDefineCursor*(para1: PDisplay, para2: TWindow, para3: TCursor): cint{.
-    libx11.}
-proc XDeleteProperty*(para1: PDisplay, para2: TWindow, para3: TAtom): cint{.
-    libx11.}
-proc XDestroyWindow*(para1: PDisplay, para2: TWindow): cint{.libx11.}
-proc XDestroySubwindows*(para1: PDisplay, para2: TWindow): cint{.libx11.}
-proc XDoesBackingStore*(para1: PScreen): cint{.libx11.}
-proc XDoesSaveUnders*(para1: PScreen): TBool{.libx11.}
-proc XDisableAccessControl*(para1: PDisplay): cint{.libx11.}
-proc XDisplayCells*(para1: PDisplay, para2: cint): cint{.libx11.}
-proc XDisplayHeight*(para1: PDisplay, para2: cint): cint{.libx11.}
-proc XDisplayHeightMM*(para1: PDisplay, para2: cint): cint{.libx11.}
-proc XDisplayKeycodes*(para1: PDisplay, para2: Pcint, para3: Pcint): cint{.
-    libx11.}
-proc XDisplayPlanes*(para1: PDisplay, para2: cint): cint{.libx11.}
-proc XDisplayWidth*(para1: PDisplay, para2: cint): cint{.libx11.}
-proc XDisplayWidthMM*(para1: PDisplay, para2: cint): cint{.libx11.}
-proc XDrawArc*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: cint, 
-               para5: cint, para6: cuint, para7: cuint, para8: cint, para9: cint): cint{.
-    libx11.}
-proc XDrawArcs*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: PXArc, 
-                para5: cint): cint{.libx11.}
-proc XDrawImageString*(para1: PDisplay, para2: TDrawable, para3: TGC, 
-                       para4: cint, para5: cint, para6: cstring, para7: cint): cint{.
-    libx11.}
-proc XDrawImageString16*(para1: PDisplay, para2: TDrawable, para3: TGC, 
-                         para4: cint, para5: cint, para6: PXChar2b, para7: cint): cint{.
-    libx11.}
-proc XDrawLine*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: cint, 
-                para5: cint, para6: cint, para7: cint): cint{.libx11.}
-proc XDrawLines*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: PXPoint, 
-                 para5: cint, para6: cint): cint{.libx11.}
-proc XDrawPoint*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: cint, 
-                 para5: cint): cint{.libx11.}
-proc XDrawPoints*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: PXPoint, 
-                  para5: cint, para6: cint): cint{.libx11.}
-proc XDrawRectangle*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: cint, 
-                     para5: cint, para6: cuint, para7: cuint): cint{.libx11.}
-proc XDrawRectangles*(para1: PDisplay, para2: TDrawable, para3: TGC, 
-                      para4: PXRectangle, para5: cint): cint{.libx11.}
-proc XDrawSegments*(para1: PDisplay, para2: TDrawable, para3: TGC, 
-                    para4: PXSegment, para5: cint): cint{.libx11.}
-proc XDrawString*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: cint, 
-                  para5: cint, para6: cstring, para7: cint): cint{.libx11.}
-proc XDrawString16*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: cint, 
-                    para5: cint, para6: PXChar2b, para7: cint): cint{.libx11.}
-proc XDrawText*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: cint, 
-                para5: cint, para6: PXTextItem, para7: cint): cint{.libx11.}
-proc XDrawText16*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: cint, 
-                  para5: cint, para6: PXTextItem16, para7: cint): cint{.libx11.}
-proc XEnableAccessControl*(para1: PDisplay): cint{.libx11.}
-proc XEventsQueued*(para1: PDisplay, para2: cint): cint{.libx11.}
-proc XFetchName*(para1: PDisplay, para2: TWindow, para3: PPchar): TStatus{.
-    libx11.}
-proc XFillArc*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: cint, 
-               para5: cint, para6: cuint, para7: cuint, para8: cint, para9: cint): cint{.
-    libx11.}
-proc XFillArcs*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: PXArc, 
-                para5: cint): cint{.libx11.}
-proc XFillPolygon*(para1: PDisplay, para2: TDrawable, para3: TGC, 
-                   para4: PXPoint, para5: cint, para6: cint, para7: cint): cint{.
-    libx11.}
-proc XFillRectangle*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: cint, 
-                     para5: cint, para6: cuint, para7: cuint): cint{.libx11.}
-proc XFillRectangles*(para1: PDisplay, para2: TDrawable, para3: TGC, 
-                      para4: PXRectangle, para5: cint): cint{.libx11.}
-proc XFlush*(para1: PDisplay): cint{.libx11.}
-proc XForceScreenSaver*(para1: PDisplay, para2: cint): cint{.libx11.}
-proc XFree*(para1: pointer): cint{.libx11.}
-proc XFreeColormap*(para1: PDisplay, para2: TColormap): cint{.libx11.}
-proc XFreeColors*(para1: PDisplay, para2: TColormap, para3: Pculong, 
-                  para4: cint, para5: culong): cint{.libx11.}
-proc XFreeCursor*(para1: PDisplay, para2: TCursor): cint{.libx11.}
-proc XFreeExtensionList*(para1: PPchar): cint{.libx11.}
-proc XFreeFont*(para1: PDisplay, para2: PXFontStruct): cint{.libx11.}
-proc XFreeFontInfo*(para1: PPchar, para2: PXFontStruct, para3: cint): cint{.
-    libx11.}
-proc XFreeFontNames*(para1: PPchar): cint{.libx11.}
-proc XFreeFontPath*(para1: PPchar): cint{.libx11.}
-proc XFreeGC*(para1: PDisplay, para2: TGC): cint{.libx11.}
-proc XFreeModifiermap*(para1: PXModifierKeymap): cint{.libx11.}
-proc XFreePixmap*(para1: PDisplay, para2: TPixmap): cint{.libx11.}
-proc XGeometry*(para1: PDisplay, para2: cint, para3: cstring, para4: cstring, 
-                para5: cuint, para6: cuint, para7: cuint, para8: cint, 
-                para9: cint, para10: Pcint, para11: Pcint, para12: Pcint, 
-                para13: Pcint): cint{.libx11.}
-proc XGetErrorDatabaseText*(para1: PDisplay, para2: cstring, para3: cstring, 
-                            para4: cstring, para5: cstring, para6: cint): cint{.
-    libx11.}
-proc XGetErrorText*(para1: PDisplay, para2: cint, para3: cstring, para4: cint): cint{.
-    libx11.}
-proc XGetFontProperty*(para1: PXFontStruct, para2: TAtom, para3: Pculong): TBool{.
-    libx11.}
-proc XGetGCValues*(para1: PDisplay, para2: TGC, para3: culong, para4: PXGCValues): TStatus{.
-    libx11.}
-proc XGetGeometry*(para1: PDisplay, para2: TDrawable, para3: PWindow, 
-                   para4: Pcint, para5: Pcint, para6: Pcuint, para7: Pcuint, 
-                   para8: Pcuint, para9: Pcuint): TStatus{.libx11.}
-proc XGetIconName*(para1: PDisplay, para2: TWindow, para3: PPchar): TStatus{.
-    libx11.}
-proc XGetInputFocus*(para1: PDisplay, para2: PWindow, para3: Pcint): cint{.
-    libx11.}
-proc XGetKeyboardControl*(para1: PDisplay, para2: PXKeyboardState): cint{.libx11.}
-proc XGetPointerControl*(para1: PDisplay, para2: Pcint, para3: Pcint, 
-                         para4: Pcint): cint{.libx11.}
-proc XGetPointerMapping*(para1: PDisplay, para2: Pcuchar, para3: cint): cint{.
-    libx11.}
-proc XGetScreenSaver*(para1: PDisplay, para2: Pcint, para3: Pcint, para4: Pcint, 
-                      para5: Pcint): cint{.libx11.}
-proc XGetTransientForHint*(para1: PDisplay, para2: TWindow, para3: PWindow): TStatus{.
-    libx11.}
-proc XGetWindowProperty*(para1: PDisplay, para2: TWindow, para3: TAtom, 
-                         para4: clong, para5: clong, para6: TBool, para7: TAtom, 
-                         para8: PAtom, para9: Pcint, para10: Pculong, 
-                         para11: Pculong, para12: PPcuchar): cint{.libx11.}
-proc XGetWindowAttributes*(para1: PDisplay, para2: TWindow, 
-                           para3: PXWindowAttributes): TStatus{.libx11.}
-proc XGrabButton*(para1: PDisplay, para2: cuint, para3: cuint, para4: TWindow, 
-                  para5: TBool, para6: cuint, para7: cint, para8: cint, 
-                  para9: TWindow, para10: TCursor): cint{.libx11.}
-proc XGrabKey*(para1: PDisplay, para2: cint, para3: cuint, para4: TWindow, 
-               para5: TBool, para6: cint, para7: cint): cint{.libx11.}
-proc XGrabKeyboard*(para1: PDisplay, para2: TWindow, para3: TBool, para4: cint, 
-                    para5: cint, para6: TTime): cint{.libx11.}
-proc XGrabPointer*(para1: PDisplay, para2: TWindow, para3: TBool, para4: cuint, 
-                   para5: cint, para6: cint, para7: TWindow, para8: TCursor, 
-                   para9: TTime): cint{.libx11.}
-proc XGrabServer*(para1: PDisplay): cint{.libx11.}
-proc XHeightMMOfScreen*(para1: PScreen): cint{.libx11.}
-proc XHeightOfScreen*(para1: PScreen): cint{.libx11.}
-proc XIfEvent*(para1: PDisplay, para2: PXEvent, para3: funcifevent, 
-               para4: TXPointer): cint{.libx11.}
-proc XImageByteOrder*(para1: PDisplay): cint{.libx11.}
-proc XInstallColormap*(para1: PDisplay, para2: TColormap): cint{.libx11.}
-proc XKeysymToKeycode*(para1: PDisplay, para2: TKeySym): TKeyCode{.libx11.}
-proc XKillClient*(para1: PDisplay, para2: TXID): cint{.libx11.}
-proc XLookupColor*(para1: PDisplay, para2: TColormap, para3: cstring, 
-                   para4: PXColor, para5: PXColor): TStatus{.libx11.}
-proc XLowerWindow*(para1: PDisplay, para2: TWindow): cint{.libx11.}
-proc XMapRaised*(para1: PDisplay, para2: TWindow): cint{.libx11.}
-proc XMapSubwindows*(para1: PDisplay, para2: TWindow): cint{.libx11.}
-proc XMapWindow*(para1: PDisplay, para2: TWindow): cint{.libx11.}
-proc XMaskEvent*(para1: PDisplay, para2: clong, para3: PXEvent): cint{.libx11.}
-proc XMaxCmapsOfScreen*(para1: PScreen): cint{.libx11.}
-proc XMinCmapsOfScreen*(para1: PScreen): cint{.libx11.}
-proc XMoveResizeWindow*(para1: PDisplay, para2: TWindow, para3: cint, 
-                        para4: cint, para5: cuint, para6: cuint): cint{.libx11.}
-proc XMoveWindow*(para1: PDisplay, para2: TWindow, para3: cint, para4: cint): cint{.
-    libx11.}
-proc XNextEvent*(para1: PDisplay, para2: PXEvent): cint{.libx11.}
-proc XNoOp*(para1: PDisplay): cint{.libx11.}
-proc XParseColor*(para1: PDisplay, para2: TColormap, para3: cstring, 
-                  para4: PXColor): TStatus{.libx11.}
-proc XParseGeometry*(para1: cstring, para2: Pcint, para3: Pcint, para4: Pcuint, 
-                     para5: Pcuint): cint{.libx11.}
-proc XPeekEvent*(para1: PDisplay, para2: PXEvent): cint{.libx11.}
-proc XPeekIfEvent*(para1: PDisplay, para2: PXEvent, para3: funcifevent, 
-                   para4: TXPointer): cint{.libx11.}
-proc XPending*(para1: PDisplay): cint{.libx11.}
-proc XPlanesOfScreen*(para1: PScreen): cint{.libx11.}
-proc XProtocolRevision*(para1: PDisplay): cint{.libx11.}
-proc XProtocolVersion*(para1: PDisplay): cint{.libx11.}
-proc XPutBackEvent*(para1: PDisplay, para2: PXEvent): cint{.libx11.}
-proc XPutImage*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: PXImage, 
-                para5: cint, para6: cint, para7: cint, para8: cint, 
-                para9: cuint, para10: cuint): cint{.libx11.}
-proc XQLength*(para1: PDisplay): cint{.libx11.}
-proc XQueryBestCursor*(para1: PDisplay, para2: TDrawable, para3: cuint, 
-                       para4: cuint, para5: Pcuint, para6: Pcuint): TStatus{.
-    libx11.}
-proc XQueryBestSize*(para1: PDisplay, para2: cint, para3: TDrawable, 
-                     para4: cuint, para5: cuint, para6: Pcuint, para7: Pcuint): TStatus{.
-    libx11.}
-proc XQueryBestStipple*(para1: PDisplay, para2: TDrawable, para3: cuint, 
-                        para4: cuint, para5: Pcuint, para6: Pcuint): TStatus{.
-    libx11.}
-proc XQueryBestTile*(para1: PDisplay, para2: TDrawable, para3: cuint, 
-                     para4: cuint, para5: Pcuint, para6: Pcuint): TStatus{.
-    libx11.}
-proc XQueryColor*(para1: PDisplay, para2: TColormap, para3: PXColor): cint{.
-    libx11.}
-proc XQueryColors*(para1: PDisplay, para2: TColormap, para3: PXColor, 
-                   para4: cint): cint{.libx11.}
-proc XQueryExtension*(para1: PDisplay, para2: cstring, para3: Pcint, 
-                      para4: Pcint, para5: Pcint): TBool{.libx11.}
-  #?
-proc XQueryKeymap*(para1: PDisplay, para2: chararr32): cint{.libx11.}
-proc XQueryPointer*(para1: PDisplay, para2: TWindow, para3: PWindow, 
-                    para4: PWindow, para5: Pcint, para6: Pcint, para7: Pcint, 
-                    para8: Pcint, para9: Pcuint): TBool{.libx11.}
-proc XQueryTextExtents*(para1: PDisplay, para2: TXID, para3: cstring, 
-                        para4: cint, para5: Pcint, para6: Pcint, para7: Pcint, 
-                        para8: PXCharStruct): cint{.libx11.}
-proc XQueryTextExtents16*(para1: PDisplay, para2: TXID, para3: PXChar2b, 
-                          para4: cint, para5: Pcint, para6: Pcint, para7: Pcint, 
-                          para8: PXCharStruct): cint{.libx11.}
-proc XQueryTree*(para1: PDisplay, para2: TWindow, para3: PWindow, 
-                 para4: PWindow, para5: PPWindow, para6: Pcuint): TStatus{.
-    libx11.}
-proc XRaiseWindow*(para1: PDisplay, para2: TWindow): cint{.libx11.}
-proc XReadBitmapFile*(para1: PDisplay, para2: TDrawable, para3: cstring, 
-                      para4: Pcuint, para5: Pcuint, para6: PPixmap, 
-                      para7: Pcint, para8: Pcint): cint{.libx11.}
-proc XReadBitmapFileData*(para1: cstring, para2: Pcuint, para3: Pcuint, 
-                          para4: PPcuchar, para5: Pcint, para6: Pcint): cint{.
-    libx11.}
-proc XRebindKeysym*(para1: PDisplay, para2: TKeySym, para3: PKeySym, 
-                    para4: cint, para5: Pcuchar, para6: cint): cint{.libx11.}
-proc XRecolorCursor*(para1: PDisplay, para2: TCursor, para3: PXColor, 
-                     para4: PXColor): cint{.libx11.}
-proc XRefreshKeyboardMapping*(para1: PXMappingEvent): cint{.libx11.}
-proc XRemoveFromSaveSet*(para1: PDisplay, para2: TWindow): cint{.libx11.}
-proc XRemoveHost*(para1: PDisplay, para2: PXHostAddress): cint{.libx11.}
-proc XRemoveHosts*(para1: PDisplay, para2: PXHostAddress, para3: cint): cint{.
-    libx11.}
-proc XReparentWindow*(para1: PDisplay, para2: TWindow, para3: TWindow, 
-                      para4: cint, para5: cint): cint{.libx11.}
-proc XResetScreenSaver*(para1: PDisplay): cint{.libx11.}
-proc XResizeWindow*(para1: PDisplay, para2: TWindow, para3: cuint, para4: cuint): cint{.
-    libx11.}
-proc XRestackWindows*(para1: PDisplay, para2: PWindow, para3: cint): cint{.
-    libx11.}
-proc XRotateBuffers*(para1: PDisplay, para2: cint): cint{.libx11.}
-proc XRotateWindowProperties*(para1: PDisplay, para2: TWindow, para3: PAtom, 
-                              para4: cint, para5: cint): cint{.libx11.}
-proc XScreenCount*(para1: PDisplay): cint{.libx11.}
-proc XSelectInput*(para1: PDisplay, para2: TWindow, para3: clong): cint{.libx11.}
-proc XSendEvent*(para1: PDisplay, para2: TWindow, para3: TBool, para4: clong, 
-                 para5: PXEvent): TStatus{.libx11.}
-proc XSetAccessControl*(para1: PDisplay, para2: cint): cint{.libx11.}
-proc XSetArcMode*(para1: PDisplay, para2: TGC, para3: cint): cint{.libx11.}
-proc XSetBackground*(para1: PDisplay, para2: TGC, para3: culong): cint{.libx11.}
-proc XSetClipMask*(para1: PDisplay, para2: TGC, para3: TPixmap): cint{.libx11.}
-proc XSetClipOrigin*(para1: PDisplay, para2: TGC, para3: cint, para4: cint): cint{.
-    libx11.}
-proc XSetClipRectangles*(para1: PDisplay, para2: TGC, para3: cint, para4: cint, 
-                         para5: PXRectangle, para6: cint, para7: cint): cint{.
-    libx11.}
-proc XSetCloseDownMode*(para1: PDisplay, para2: cint): cint{.libx11.}
-proc XSetCommand*(para1: PDisplay, para2: TWindow, para3: PPchar, para4: cint): cint{.
-    libx11.}
-proc XSetDashes*(para1: PDisplay, para2: TGC, para3: cint, para4: cstring, 
-                 para5: cint): cint{.libx11.}
-proc XSetFillRule*(para1: PDisplay, para2: TGC, para3: cint): cint{.libx11.}
-proc XSetFillStyle*(para1: PDisplay, para2: TGC, para3: cint): cint{.libx11.}
-proc XSetFont*(para1: PDisplay, para2: TGC, para3: TFont): cint{.libx11.}
-proc XSetFontPath*(para1: PDisplay, para2: PPchar, para3: cint): cint{.libx11.}
-proc XSetForeground*(para1: PDisplay, para2: TGC, para3: culong): cint{.libx11.}
-proc XSetFunction*(para1: PDisplay, para2: TGC, para3: cint): cint{.libx11.}
-proc XSetGraphicsExposures*(para1: PDisplay, para2: TGC, para3: TBool): cint{.
-    libx11.}
-proc XSetIconName*(para1: PDisplay, para2: TWindow, para3: cstring): cint{.
-    libx11.}
-proc XSetInputFocus*(para1: PDisplay, para2: TWindow, para3: cint, para4: TTime): cint{.
-    libx11.}
-proc XSetLineAttributes*(para1: PDisplay, para2: TGC, para3: cuint, para4: cint, 
-                         para5: cint, para6: cint): cint{.libx11.}
-proc XSetModifierMapping*(para1: PDisplay, para2: PXModifierKeymap): cint{.
-    libx11.}
-proc XSetPlaneMask*(para1: PDisplay, para2: TGC, para3: culong): cint{.libx11.}
-proc XSetPointerMapping*(para1: PDisplay, para2: Pcuchar, para3: cint): cint{.
-    libx11.}
-proc XSetScreenSaver*(para1: PDisplay, para2: cint, para3: cint, para4: cint, 
-                      para5: cint): cint{.libx11.}
-proc XSetSelectionOwner*(para1: PDisplay, para2: TAtom, para3: TWindow, 
-                         para4: TTime): cint{.libx11.}
-proc XSetState*(para1: PDisplay, para2: TGC, para3: culong, para4: culong, 
-                para5: cint, para6: culong): cint{.libx11.}
-proc XSetStipple*(para1: PDisplay, para2: TGC, para3: TPixmap): cint{.libx11.}
-proc XSetSubwindowMode*(para1: PDisplay, para2: TGC, para3: cint): cint{.libx11.}
-proc XSetTSOrigin*(para1: PDisplay, para2: TGC, para3: cint, para4: cint): cint{.
-    libx11.}
-proc XSetTile*(para1: PDisplay, para2: TGC, para3: TPixmap): cint{.libx11.}
-proc XSetWindowBackground*(para1: PDisplay, para2: TWindow, para3: culong): cint{.
-    libx11.}
-proc XSetWindowBackgroundPixmap*(para1: PDisplay, para2: TWindow, para3: TPixmap): cint{.
-    libx11.}
-proc XSetWindowBorder*(para1: PDisplay, para2: TWindow, para3: culong): cint{.
-    libx11.}
-proc XSetWindowBorderPixmap*(para1: PDisplay, para2: TWindow, para3: TPixmap): cint{.
-    libx11.}
-proc XSetWindowBorderWidth*(para1: PDisplay, para2: TWindow, para3: cuint): cint{.
-    libx11.}
-proc XSetWindowColormap*(para1: PDisplay, para2: TWindow, para3: TColormap): cint{.
-    libx11.}
-proc XStoreBuffer*(para1: PDisplay, para2: cstring, para3: cint, para4: cint): cint{.
-    libx11.}
-proc XStoreBytes*(para1: PDisplay, para2: cstring, para3: cint): cint{.libx11.}
-proc XStoreColor*(para1: PDisplay, para2: TColormap, para3: PXColor): cint{.
-    libx11.}
-proc XStoreColors*(para1: PDisplay, para2: TColormap, para3: PXColor, 
-                   para4: cint): cint{.libx11.}
-proc XStoreName*(para1: PDisplay, para2: TWindow, para3: cstring): cint{.libx11.}
-proc XStoreNamedColor*(para1: PDisplay, para2: TColormap, para3: cstring, 
-                       para4: culong, para5: cint): cint{.libx11.}
-proc XSync*(para1: PDisplay, para2: TBool): cint{.libx11.}
-proc XTextExtents*(para1: PXFontStruct, para2: cstring, para3: cint, 
-                   para4: Pcint, para5: Pcint, para6: Pcint, para7: PXCharStruct): cint{.
-    libx11.}
-proc XTextExtents16*(para1: PXFontStruct, para2: PXChar2b, para3: cint, 
-                     para4: Pcint, para5: Pcint, para6: Pcint, 
-                     para7: PXCharStruct): cint{.libx11.}
-proc XTextWidth*(para1: PXFontStruct, para2: cstring, para3: cint): cint{.libx11.}
-proc XTextWidth16*(para1: PXFontStruct, para2: PXChar2b, para3: cint): cint{.
-    libx11.}
-proc XTranslateCoordinates*(para1: PDisplay, para2: TWindow, para3: TWindow, 
-                            para4: cint, para5: cint, para6: Pcint, 
-                            para7: Pcint, para8: PWindow): TBool{.libx11.}
-proc XUndefineCursor*(para1: PDisplay, para2: TWindow): cint{.libx11.}
-proc XUngrabButton*(para1: PDisplay, para2: cuint, para3: cuint, para4: TWindow): cint{.
-    libx11.}
-proc XUngrabKey*(para1: PDisplay, para2: cint, para3: cuint, para4: TWindow): cint{.
-    libx11.}
-proc XUngrabKeyboard*(para1: PDisplay, para2: TTime): cint{.libx11.}
-proc XUngrabPointer*(para1: PDisplay, para2: TTime): cint{.libx11.}
-proc XUngrabServer*(para1: PDisplay): cint{.libx11.}
-proc XUninstallColormap*(para1: PDisplay, para2: TColormap): cint{.libx11.}
-proc XUnloadFont*(para1: PDisplay, para2: TFont): cint{.libx11.}
-proc XUnmapSubwindows*(para1: PDisplay, para2: TWindow): cint{.libx11.}
-proc XUnmapWindow*(para1: PDisplay, para2: TWindow): cint{.libx11.}
-proc XVendorRelease*(para1: PDisplay): cint{.libx11.}
-proc XWarpPointer*(para1: PDisplay, para2: TWindow, para3: TWindow, para4: cint, 
-                   para5: cint, para6: cuint, para7: cuint, para8: cint, 
-                   para9: cint): cint{.libx11.}
-proc XWidthMMOfScreen*(para1: PScreen): cint{.libx11.}
-proc XWidthOfScreen*(para1: PScreen): cint{.libx11.}
-proc XWindowEvent*(para1: PDisplay, para2: TWindow, para3: clong, para4: PXEvent): cint{.
-    libx11.}
-proc XWriteBitmapFile*(para1: PDisplay, para2: cstring, para3: TPixmap, 
-                       para4: cuint, para5: cuint, para6: cint, para7: cint): cint{.
-    libx11.}
-proc XSupportsLocale*(): TBool{.libx11.}
-proc XSetLocaleModifiers*(para1: cstring): cstring{.libx11.}
-proc XOpenOM*(para1: PDisplay, para2: PXrmHashBucketRec, para3: cstring, 
-              para4: cstring): TXOM{.libx11.}
-proc XCloseOM*(para1: TXOM): TStatus{.libx11.}
-proc XSetOMValues*(para1: TXOM): cstring{.varargs, libx11.}
-proc XGetOMValues*(para1: TXOM): cstring{.varargs, libx11.}
-proc XDisplayOfOM*(para1: TXOM): PDisplay{.libx11.}
-proc XLocaleOfOM*(para1: TXOM): cstring{.libx11.}
-proc XCreateOC*(para1: TXOM): TXOC{.varargs, libx11.}
-proc XDestroyOC*(para1: TXOC){.libx11.}
-proc XOMOfOC*(para1: TXOC): TXOM{.libx11.}
-proc XSetOCValues*(para1: TXOC): cstring{.varargs, libx11.}
-proc XGetOCValues*(para1: TXOC): cstring{.varargs, libx11.}
-proc XCreateFontSet*(para1: PDisplay, para2: cstring, para3: PPPchar, 
-                     para4: Pcint, para5: PPchar): TXFontSet{.libx11.}
-proc XFreeFontSet*(para1: PDisplay, para2: TXFontSet){.libx11.}
-proc XFontsOfFontSet*(para1: TXFontSet, para2: PPPXFontStruct, para3: PPPchar): cint{.
-    libx11.}
-proc XBaseFontNameListOfFontSet*(para1: TXFontSet): cstring{.libx11.}
-proc XLocaleOfFontSet*(para1: TXFontSet): cstring{.libx11.}
-proc XContextDependentDrawing*(para1: TXFontSet): TBool{.libx11.}
-proc XDirectionalDependentDrawing*(para1: TXFontSet): TBool{.libx11.}
-proc XContextualDrawing*(para1: TXFontSet): TBool{.libx11.}
-proc XExtentsOfFontSet*(para1: TXFontSet): PXFontSetExtents{.libx11.}
-proc XmbTextEscapement*(para1: TXFontSet, para2: cstring, para3: cint): cint{.
-    libx11.}
-proc XwcTextEscapement*(para1: TXFontSet, para2: PWideChar, para3: cint): cint{.
-    libx11.}
-proc Xutf8TextEscapement*(para1: TXFontSet, para2: cstring, para3: cint): cint{.
-    libx11.}
-proc XmbTextExtents*(para1: TXFontSet, para2: cstring, para3: cint, 
-                     para4: PXRectangle, para5: PXRectangle): cint{.libx11.}
-proc XwcTextExtents*(para1: TXFontSet, para2: PWideChar, para3: cint, 
-                     para4: PXRectangle, para5: PXRectangle): cint{.libx11.}
-proc Xutf8TextExtents*(para1: TXFontSet, para2: cstring, para3: cint, 
-                       para4: PXRectangle, para5: PXRectangle): cint{.libx11.}
-proc XmbTextPerCharExtents*(para1: TXFontSet, para2: cstring, para3: cint, 
-                            para4: PXRectangle, para5: PXRectangle, para6: cint, 
-                            para7: Pcint, para8: PXRectangle, para9: PXRectangle): TStatus{.
-    libx11.}
-proc XwcTextPerCharExtents*(para1: TXFontSet, para2: PWideChar, para3: cint, 
-                            para4: PXRectangle, para5: PXRectangle, para6: cint, 
-                            para7: Pcint, para8: PXRectangle, para9: PXRectangle): TStatus{.
-    libx11.}
-proc Xutf8TextPerCharExtents*(para1: TXFontSet, para2: cstring, para3: cint, 
-                              para4: PXRectangle, para5: PXRectangle, 
-                              para6: cint, para7: Pcint, para8: PXRectangle, 
-                              para9: PXRectangle): TStatus{.libx11.}
-proc XmbDrawText*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: cint, 
-                  para5: cint, para6: PXmbTextItem, para7: cint){.libx11.}
-proc XwcDrawText*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: cint, 
-                  para5: cint, para6: PXwcTextItem, para7: cint){.libx11.}
-proc Xutf8DrawText*(para1: PDisplay, para2: TDrawable, para3: TGC, para4: cint, 
-                    para5: cint, para6: PXmbTextItem, para7: cint){.libx11.}
-proc XmbDrawString*(para1: PDisplay, para2: TDrawable, para3: TXFontSet, 
-                    para4: TGC, para5: cint, para6: cint, para7: cstring, 
-                    para8: cint){.libx11.}
-proc XwcDrawString*(para1: PDisplay, para2: TDrawable, para3: TXFontSet, 
-                    para4: TGC, para5: cint, para6: cint, para7: PWideChar, 
-                    para8: cint){.libx11.}
-proc Xutf8DrawString*(para1: PDisplay, para2: TDrawable, para3: TXFontSet, 
-                      para4: TGC, para5: cint, para6: cint, para7: cstring, 
-                      para8: cint){.libx11.}
-proc XmbDrawImageString*(para1: PDisplay, para2: TDrawable, para3: TXFontSet, 
-                         para4: TGC, para5: cint, para6: cint, para7: cstring, 
-                         para8: cint){.libx11.}
-proc XwcDrawImageString*(para1: PDisplay, para2: TDrawable, para3: TXFontSet, 
-                         para4: TGC, para5: cint, para6: cint, para7: PWideChar, 
-                         para8: cint){.libx11.}
-proc Xutf8DrawImageString*(para1: PDisplay, para2: TDrawable, para3: TXFontSet, 
-                           para4: TGC, para5: cint, para6: cint, para7: cstring, 
-                           para8: cint){.libx11.}
-proc XOpenIM*(para1: PDisplay, para2: PXrmHashBucketRec, para3: cstring, 
-              para4: cstring): TXIM{.libx11.}
-proc XCloseIM*(para1: TXIM): TStatus{.libx11.}
-proc XGetIMValues*(para1: TXIM): cstring{.varargs, libx11.}
-proc XSetIMValues*(para1: TXIM): cstring{.varargs, libx11.}
-proc XDisplayOfIM*(para1: TXIM): PDisplay{.libx11.}
-proc XLocaleOfIM*(para1: TXIM): cstring{.libx11.}
-proc XCreateIC*(para1: TXIM): TXIC{.varargs, libx11.}
-proc XDestroyIC*(para1: TXIC){.libx11.}
-proc XSetICFocus*(para1: TXIC){.libx11.}
-proc XUnsetICFocus*(para1: TXIC){.libx11.}
-proc XwcResetIC*(para1: TXIC): PWideChar{.libx11.}
-proc XmbResetIC*(para1: TXIC): cstring{.libx11.}
-proc Xutf8ResetIC*(para1: TXIC): cstring{.libx11.}
-proc XSetICValues*(para1: TXIC): cstring{.varargs, libx11.}
-proc XGetICValues*(para1: TXIC): cstring{.varargs, libx11.}
-proc XIMOfIC*(para1: TXIC): TXIM{.libx11.}
-proc XFilterEvent*(para1: PXEvent, para2: TWindow): TBool{.libx11.}
-proc XmbLookupString*(para1: TXIC, para2: PXKeyPressedEvent, para3: cstring, 
-                      para4: cint, para5: PKeySym, para6: PStatus): cint{.libx11.}
-proc XwcLookupString*(para1: TXIC, para2: PXKeyPressedEvent, para3: PWideChar, 
-                      para4: cint, para5: PKeySym, para6: PStatus): cint{.libx11.}
-proc Xutf8LookupString*(para1: TXIC, para2: PXKeyPressedEvent, para3: cstring, 
-                        para4: cint, para5: PKeySym, para6: PStatus): cint{.
-    libx11.}
-proc XVaCreateNestedList*(unused: cint): TXVaNestedList{.varargs, libx11.}
-proc XRegisterIMInstantiateCallback*(para1: PDisplay, para2: PXrmHashBucketRec, 
-                                     para3: cstring, para4: cstring, 
-                                     para5: TXIDProc, para6: TXPointer): TBool{.
-    libx11.}
-proc XUnregisterIMInstantiateCallback*(para1: PDisplay, 
-                                       para2: PXrmHashBucketRec, para3: cstring, 
-                                       para4: cstring, para5: TXIDProc, 
-                                       para6: TXPointer): TBool{.libx11.}
-type 
-  TXConnectionWatchProc* = proc (para1: PDisplay, para2: TXPointer, para3: cint, 
-                                 para4: TBool, para5: PXPointer){.cdecl.}
-
-proc XInternalConnectionNumbers*(para1: PDisplay, para2: PPcint, para3: Pcint): TStatus{.
-    libx11.}
-proc XProcessInternalConnection*(para1: PDisplay, para2: cint){.libx11.}
-proc XAddConnectionWatch*(para1: PDisplay, para2: TXConnectionWatchProc, 
-                          para3: TXPointer): TStatus{.libx11.}
-proc XRemoveConnectionWatch*(para1: PDisplay, para2: TXConnectionWatchProc, 
-                             para3: TXPointer){.libx11.}
-proc XSetAuthorization*(para1: cstring, para2: cint, para3: cstring, para4: cint){.
-    libx11.}
-  #
-  #  _Xmbtowc?
-  #  _Xwctomb?
-  #
-#when defined(MACROS): 
-proc ConnectionNumber*(dpy: PDisplay): cint
-proc RootWindow*(dpy: PDisplay, scr: cint): TWindow
-proc DefaultScreen*(dpy: PDisplay): cint
-proc DefaultRootWindow*(dpy: PDisplay): TWindow
-proc DefaultVisual*(dpy: PDisplay, scr: cint): PVisual
-proc DefaultGC*(dpy: PDisplay, scr: cint): TGC
-proc BlackPixel*(dpy: PDisplay, scr: cint): culong
-proc WhitePixel*(dpy: PDisplay, scr: cint): culong
-proc QLength*(dpy: PDisplay): cint
-proc DisplayWidth*(dpy: PDisplay, scr: cint): cint
-proc DisplayHeight*(dpy: PDisplay, scr: cint): cint
-proc DisplayWidthMM*(dpy: PDisplay, scr: cint): cint
-proc DisplayHeightMM*(dpy: PDisplay, scr: cint): cint
-proc DisplayPlanes*(dpy: PDisplay, scr: cint): cint
-proc DisplayCells*(dpy: PDisplay, scr: cint): cint
-proc ScreenCount*(dpy: PDisplay): cint
-proc ServerVendor*(dpy: PDisplay): cstring
-proc ProtocolVersion*(dpy: PDisplay): cint
-proc ProtocolRevision*(dpy: PDisplay): cint
-proc VendorRelease*(dpy: PDisplay): cint
-proc DisplayString*(dpy: PDisplay): cstring
-proc DefaultDepth*(dpy: PDisplay, scr: cint): cint
-proc DefaultColormap*(dpy: PDisplay, scr: cint): TColormap
-proc BitmapUnit*(dpy: PDisplay): cint
-proc BitmapBitOrder*(dpy: PDisplay): cint
-proc BitmapPad*(dpy: PDisplay): cint
-proc ImageByteOrder*(dpy: PDisplay): cint
-proc NextRequest*(dpy: PDisplay): culong
-proc LastKnownRequestProcessed*(dpy: PDisplay): culong
-proc ScreenOfDisplay*(dpy: PDisplay, scr: cint): PScreen
-proc DefaultScreenOfDisplay*(dpy: PDisplay): PScreen
-proc DisplayOfScreen*(s: PScreen): PDisplay
-proc RootWindowOfScreen*(s: PScreen): TWindow
-proc BlackPixelOfScreen*(s: PScreen): culong
-proc WhitePixelOfScreen*(s: PScreen): culong
-proc DefaultColormapOfScreen*(s: PScreen): TColormap
-proc DefaultDepthOfScreen*(s: PScreen): cint
-proc DefaultGCOfScreen*(s: PScreen): TGC
-proc DefaultVisualOfScreen*(s: PScreen): PVisual
-proc WidthOfScreen*(s: PScreen): cint
-proc HeightOfScreen*(s: PScreen): cint
-proc WidthMMOfScreen*(s: PScreen): cint
-proc HeightMMOfScreen*(s: PScreen): cint
-proc PlanesOfScreen*(s: PScreen): cint
-proc CellsOfScreen*(s: PScreen): cint
-proc MinCmapsOfScreen*(s: PScreen): cint
-proc MaxCmapsOfScreen*(s: PScreen): cint
-proc DoesSaveUnders*(s: PScreen): TBool
-proc DoesBackingStore*(s: PScreen): cint
-proc EventMaskOfScreen*(s: PScreen): clong
-proc XAllocID*(dpy: PDisplay): TXID
-# implementation
-
-#when defined(MACROS):
-template privDisp : expr = cast[PXPrivDisplay](dpy)
- 
-proc ConnectionNumber(dpy: PDisplay): cint = 
-  privDisp.fd
-
-proc RootWindow(dpy: PDisplay, scr: cint): TWindow = 
-  ScreenOfDisplay(dpy, scr).root
-
-proc DefaultScreen(dpy: PDisplay): cint = 
-  privDisp.default_screen
-
-proc DefaultRootWindow(dpy: PDisplay): TWindow = 
-  ScreenOfDisplay(dpy, DefaultScreen(dpy)).root
-
-proc DefaultVisual(dpy: PDisplay, scr: cint): PVisual = 
-  ScreenOfDisplay(dpy, scr).root_visual
-
-proc DefaultGC(dpy: PDisplay, scr: cint): TGC = 
-  ScreenOfDisplay(dpy, scr).default_gc
-
-proc BlackPixel(dpy: PDisplay, scr: cint): culong = 
-  ScreenOfDisplay(dpy, scr).black_pixel
-
-proc WhitePixel(dpy: PDisplay, scr: cint): culong = 
-  ScreenOfDisplay(dpy, scr).white_pixel
-
-proc QLength(dpy: PDisplay): cint = 
-  privDisp.qlen
-
-proc DisplayWidth(dpy: PDisplay, scr: cint): cint = 
-  ScreenOfDisplay(dpy, scr).width
-
-proc DisplayHeight(dpy: PDisplay, scr: cint): cint = 
-  ScreenOfDisplay(dpy, scr).height
-
-proc DisplayWidthMM(dpy: PDisplay, scr: cint): cint = 
-  ScreenOfDisplay(dpy, scr).mwidth
-
-proc DisplayHeightMM(dpy: PDisplay, scr: cint): cint = 
-  ScreenOfDisplay(dpy, scr).mheight
-
-proc DisplayPlanes(dpy: PDisplay, scr: cint): cint = 
-  ScreenOfDisplay(dpy, scr).root_depth
-
-proc DisplayCells(dpy: PDisplay, scr: cint): cint = 
-  DefaultVisual(dpy, scr).map_entries
-
-proc ScreenCount(dpy: PDisplay): cint = 
-  privDisp.nscreens
-
-proc ServerVendor(dpy: PDisplay): cstring = 
-  privDisp.vendor
-
-proc ProtocolVersion(dpy: PDisplay): cint = 
-  privDisp.proto_major_version
-
-proc ProtocolRevision(dpy: PDisplay): cint = 
-  privDisp.proto_minor_version
-
-proc VendorRelease(dpy: PDisplay): cint = 
-  privDisp.release
-
-proc DisplayString(dpy: PDisplay): cstring = 
-  privDisp.display_name
-
-proc DefaultDepth(dpy: PDisplay, scr: cint): cint = 
-  ScreenOfDisplay(dpy, scr).root_depth
-
-proc DefaultColormap(dpy: PDisplay, scr: cint): TColormap = 
-  ScreenOfDisplay(dpy, scr).cmap
-
-proc BitmapUnit(dpy: PDisplay): cint = 
-  privDisp.bitmap_unit
-
-proc BitmapBitOrder(dpy: PDisplay): cint = 
-  privDisp.bitmap_bit_order
-
-proc BitmapPad(dpy: PDisplay): cint = 
-  privDisp.bitmap_pad
-
-proc ImageByteOrder(dpy: PDisplay): cint = 
-  privDisp.byte_order
-
-import unsigned
-proc NextRequest(dpy: PDisplay): culong = 
-  privDisp.request + 1.culong
-
-proc LastKnownRequestProcessed(dpy: PDisplay): culong = 
-  privDisp.last_request_read
-
-# from fowltek/pointer_arithm, required for ScreenOfDisplay()
-proc offset[A] (some: ptr A; b: int): ptr A =
-  cast[ptr A](cast[int](some) + (b * sizeof(A)))
-proc ScreenOfDisplay(dpy: PDisplay, scr: cint): PScreen =
-  #addr(((privDisp.screens)[scr])) 
-  privDisp.screens.offset(scr.int)
-
-proc DefaultScreenOfDisplay(dpy: PDisplay): PScreen = 
-  ScreenOfDisplay(dpy, DefaultScreen(dpy))
-
-proc DisplayOfScreen(s: PScreen): PDisplay = 
-  s.display
-
-proc RootWindowOfScreen(s: PScreen): TWindow = 
-  s.root
-
-proc BlackPixelOfScreen(s: PScreen): culong = 
-  s.black_pixel
-
-proc WhitePixelOfScreen(s: PScreen): culong = 
-  s.white_pixel
-
-proc DefaultColormapOfScreen(s: PScreen): TColormap = 
-  s.cmap
-
-proc DefaultDepthOfScreen(s: PScreen): cint = 
-  s.root_depth
-
-proc DefaultGCOfScreen(s: PScreen): TGC = 
-  s.default_gc
-
-proc DefaultVisualOfScreen(s: PScreen): PVisual = 
-  s.root_visual
-
-proc WidthOfScreen(s: PScreen): cint = 
-  s.width
-
-proc HeightOfScreen(s: PScreen): cint = 
-  s.height
-
-proc WidthMMOfScreen(s: PScreen): cint = 
-  s.mwidth
-
-proc HeightMMOfScreen(s: PScreen): cint = 
-  s.mheight
-
-proc PlanesOfScreen(s: PScreen): cint = 
-  s.root_depth
-
-proc CellsOfScreen(s: PScreen): cint = 
-  DefaultVisualOfScreen(s).map_entries
-
-proc MinCmapsOfScreen(s: PScreen): cint = 
-  s.min_maps
-
-proc MaxCmapsOfScreen(s: PScreen): cint = 
-  s.max_maps
-
-proc DoesSaveUnders(s: PScreen): TBool = 
-  s.save_unders
-
-proc DoesBackingStore(s: PScreen): cint = 
-  s.backing_store
-
-proc EventMaskOfScreen(s: PScreen): clong = 
-  s.root_input_mask
-
-proc XAllocID(dpy: PDisplay): TXID = 
-  privDisp.resource_alloc(dpy)
diff --git a/lib/wrappers/x11/xrandr.nim b/lib/wrappers/x11/xrandr.nim
deleted file mode 100644
index ee6f1705b..000000000
--- a/lib/wrappers/x11/xrandr.nim
+++ /dev/null
@@ -1,194 +0,0 @@
-#
-#  $XFree86: xc/lib/Xrandr/Xrandr.h,v 1.9 2002/09/29 23:39:44 keithp Exp $
-# 
-#  Copyright (C) 2000 Compaq Computer Corporation, Inc.
-#  Copyright (C) 2002 Hewlett-Packard Company, Inc.
-# 
-#  Permission to use, copy, modify, distribute, and sell this software and its
-#  documentation for any purpose is hereby granted without fee, provided that
-#  the above copyright notice appear in all copies and that both that
-#  copyright notice and this permission notice appear in supporting
-#  documentation, and that the name of Compaq not be used in advertising or
-#  publicity pertaining to distribution of the software without specific,
-#  written prior permission.  HP makes no representations about the
-#  suitability of this software for any purpose.  It is provided "as is"
-#  without express or implied warranty.
-# 
-#  HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
-#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL COMPAQ
-#  BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-#  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
-#  OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
-#  CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-# 
-#  Author:  Jim Gettys, HP Labs, HP.
-#
-
-import 
-  x, xlib
-
-const 
-  libXrandr* = "libXrandr.so"
-  
-# * $XFree86: xc/include/extensions/randr.h,v 1.4 2001/11/24 07:24:58 keithp Exp $
-# *
-# * Copyright (C) 2000, Compaq Computer Corporation, 
-# * Copyright (C) 2002, Hewlett Packard, Inc.
-# *
-# * Permission to use, copy, modify, distribute, and sell this software and its
-# * documentation for any purpose is hereby granted without fee, provided that
-# * the above copyright notice appear in all copies and that both that
-# * copyright notice and this permission notice appear in supporting
-# * documentation, and that the name of Compaq or HP not be used in advertising
-# * or publicity pertaining to distribution of the software without specific,
-# * written prior permission.  HP makes no representations about the
-# * suitability of this software for any purpose.  It is provided "as is"
-# * without express or implied warranty.
-# *
-# * HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
-# * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HP
-# * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
-# * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
-# * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-# *
-# * Author:  Jim Gettys, HP Labs, Hewlett-Packard, Inc.
-# *
-
-type 
-  PRotation* = ptr TRotation
-  TRotation* = cushort
-  PSizeID* = ptr TSizeID
-  TSizeID* = cushort
-  PSubpixelOrder* = ptr TSubpixelOrder
-  TSubpixelOrder* = cushort
-
-const 
-  RANDR_NAME* = "RANDR"
-  RANDR_MAJOR* = 1
-  RANDR_MINOR* = 1
-  RRNumberErrors* = 0
-  RRNumberEvents* = 1
-  constX_RRQueryVersion* = 0 # we skip 1 to make old clients fail pretty immediately 
-  X_RROldGetScreenInfo* = 1
-  X_RR1_0SetScreenConfig* = 2 # V1.0 apps share the same set screen config request id 
-  constX_RRSetScreenConfig* = 2
-  X_RROldScreenChangeSelectInput* = 3 # 3 used to be ScreenChangeSelectInput; deprecated 
-  constX_RRSelectInput* = 4
-  constX_RRGetScreenInfo* = 5      # used in XRRSelectInput 
-  RRScreenChangeNotifyMask* = 1 shl 0
-  RRScreenChangeNotify* = 0   # used in the rotation field; rotation and reflection in 0.1 proto. 
-  RR_Rotate_0* = 1
-  RR_Rotate_90* = 2
-  RR_Rotate_180* = 4
-  RR_Rotate_270* = 8          # new in 1.0 protocol, to allow reflection of screen 
-  RR_Reflect_X* = 16
-  RR_Reflect_Y* = 32
-  RRSetConfigSuccess* = 0
-  RRSetConfigInvalidConfigTime* = 1
-  RRSetConfigInvalidTime* = 2
-  RRSetConfigFailed* = 3
-
-type 
-  PXRRScreenSize* = ptr TXRRScreenSize
-  TXRRScreenSize*{.final.} = object  #
-                                     #   Events.
-                                     #
-    width*, height*: cint
-    mwidth*, mheight*: cint
-
-  TXRRScreenChangeNotifyEvent*{.final.} = object  # internal representation is private to the library 
-    typ*: cint                # event base 
-    serial*: culong           # # of last request processed by server 
-    send_event*: TBool        # true if this came from a SendEvent request 
-    display*: PDisplay        # Display the event was read from 
-    window*: TWindow          # window which selected for this event 
-    root*: TWindow            # Root window for changed screen 
-    timestamp*: TTime         # when the screen change occurred 
-    config_timestamp*: TTime  # when the last configuration change 
-    size_index*: TSizeID
-    subpixel_order*: TSubpixelOrder
-    rotation*: TRotation
-    width*: cint
-    height*: cint
-    mwidth*: cint
-    mheight*: cint
-
-  PXRRScreenConfiguration* = ptr TXRRScreenConfiguration
-  TXRRScreenConfiguration*{.final.} = object 
-
-proc XRRQueryExtension*(dpy: PDisplay, event_basep, error_basep: Pcint): TBool{.
-    cdecl, dynlib: libXrandr, importc.}
-proc XRRQueryVersion*(dpy: PDisplay, major_versionp: Pcint, 
-                      minor_versionp: Pcint): TStatus{.cdecl, dynlib: libXrandr, 
-    importc.}
-proc XRRGetScreenInfo*(dpy: PDisplay, draw: TDrawable): PXRRScreenConfiguration{.
-    cdecl, dynlib: libXrandr, importc.}
-proc XRRFreeScreenConfigInfo*(config: PXRRScreenConfiguration){.cdecl, 
-    dynlib: libXrandr, importc.}
-  #
-  #  Note that screen configuration changes are only permitted if the client can
-  #  prove it has up to date configuration information.  We are trying to
-  #  insist that it become possible for screens to change dynamically, so
-  #  we want to ensure the client knows what it is talking about when requesting
-  #  changes.
-  #
-proc XRRSetScreenConfig*(dpy: PDisplay, config: PXRRScreenConfiguration, 
-                         draw: TDrawable, size_index: cint, rotation: TRotation, 
-                         timestamp: TTime): TStatus{.cdecl, dynlib: libXrandr, 
-    importc.}
-  # added in v1.1, sorry for the lame name 
-proc XRRSetScreenConfigAndRate*(dpy: PDisplay, config: PXRRScreenConfiguration, 
-                                draw: TDrawable, size_index: cint, 
-                                rotation: TRotation, rate: cshort, 
-                                timestamp: TTime): TStatus{.cdecl, 
-    dynlib: libXrandr, importc.}
-proc XRRConfigRotations*(config: PXRRScreenConfiguration, 
-                         current_rotation: PRotation): TRotation{.cdecl, 
-    dynlib: libXrandr, importc.}
-proc XRRConfigTimes*(config: PXRRScreenConfiguration, config_timestamp: PTime): TTime{.
-    cdecl, dynlib: libXrandr, importc.}
-proc XRRConfigSizes*(config: PXRRScreenConfiguration, nsizes: Pcint): PXRRScreenSize{.
-    cdecl, dynlib: libXrandr, importc.}
-proc XRRConfigRates*(config: PXRRScreenConfiguration, sizeID: cint, 
-                     nrates: Pcint): ptr int16{.cdecl, dynlib: libXrandr, importc.}
-proc XRRConfigCurrentConfiguration*(config: PXRRScreenConfiguration, 
-                                    rotation: PRotation): TSizeID{.cdecl, 
-    dynlib: libXrandr, importc.}
-proc XRRConfigCurrentRate*(config: PXRRScreenConfiguration): cshort{.cdecl, 
-    dynlib: libXrandr, importc.}
-proc XRRRootToScreen*(dpy: PDisplay, root: TWindow): cint{.cdecl, 
-    dynlib: libXrandr, importc.}
-  #
-  #  returns the screen configuration for the specified screen; does a lazy
-  #  evalution to delay getting the information, and caches the result.
-  #  These routines should be used in preference to XRRGetScreenInfo
-  #  to avoid unneeded round trips to the X server.  These are new
-  #  in protocol version 0.1.
-  #
-proc XRRScreenConfig*(dpy: PDisplay, screen: cint): PXRRScreenConfiguration{.
-    cdecl, dynlib: libXrandr, importc.}
-proc XRRConfig*(screen: PScreen): PXRRScreenConfiguration{.cdecl, 
-    dynlib: libXrandr, importc.}
-proc XRRSelectInput*(dpy: PDisplay, window: TWindow, mask: cint){.cdecl, 
-    dynlib: libXrandr, importc.}
-  #
-  #  the following are always safe to call, even if RandR is not implemented 
-  #  on a screen 
-  #
-proc XRRRotations*(dpy: PDisplay, screen: cint, current_rotation: PRotation): TRotation{.
-    cdecl, dynlib: libXrandr, importc.}
-proc XRRSizes*(dpy: PDisplay, screen: cint, nsizes: Pcint): PXRRScreenSize{.
-    cdecl, dynlib: libXrandr, importc.}
-proc XRRRates*(dpy: PDisplay, screen: cint, sizeID: cint, nrates: Pcint): ptr int16{.
-    cdecl, dynlib: libXrandr, importc.}
-proc XRRTimes*(dpy: PDisplay, screen: cint, config_timestamp: PTime): TTime{.
-    cdecl, dynlib: libXrandr, importc.}
-  #
-  #  intended to take RRScreenChangeNotify,  or 
-  #  ConfigureNotify (on the root window)
-  #  returns 1 if it is an event type it understands, 0 if not
-  #
-proc XRRUpdateConfiguration*(event: PXEvent): cint{.cdecl, dynlib: libXrandr, 
-    importc.}
-# implementation
diff --git a/lib/wrappers/x11/xrender.nim b/lib/wrappers/x11/xrender.nim
deleted file mode 100644
index c4b2b364d..000000000
--- a/lib/wrappers/x11/xrender.nim
+++ /dev/null
@@ -1,241 +0,0 @@
-
-import 
-  x, xlib
-
-when defined(use_pkg_config) or defined(use_pkg_config_static):
-    {.pragma: libxrender, cdecl, importc.}
-    when defined(use_pkg_config):
-        {.passl: gorge("pkg-config xrender --libs").}
-    else:
-        {.passl: gorge("pkg-config xrender --static --libs").}
-else:
-    when defined(macosx):
-        const 
-          libXrender* = "libXrender.dylib"
-    else:
-        const 
-          libXrender* = "libXrender.so"
-
-    
-    {.pragma: libxrender, dynlib: libXrender, cdecl, importc.}
-#const 
-#  libXrender* = "libXrender.so"
-
-#
-#  Automatically converted by H2Pas 0.99.15 from xrender.h
-#  The following command line parameters were used:
-#    -p
-#    -T
-#    -S
-#    -d
-#    -c
-#    xrender.h
-#
-
-type 
-  PGlyph* = ptr TGlyph
-  TGlyph* = int32
-  PGlyphSet* = ptr TGlyphSet
-  TGlyphSet* = int32
-  PPicture* = ptr TPicture
-  TPicture* = int32
-  PPictFormat* = ptr TPictFormat
-  TPictFormat* = int32
-
-const 
-  RENDER_NAME* = "RENDER"
-  RENDER_MAJOR* = 0
-  RENDER_MINOR* = 0
-  constX_RenderQueryVersion* = 0
-  X_RenderQueryPictFormats* = 1
-  X_RenderQueryPictIndexValues* = 2
-  X_RenderQueryDithers* = 3
-  constX_RenderCreatePicture* = 4
-  constX_RenderChangePicture* = 5
-  X_RenderSetPictureClipRectangles* = 6
-  constX_RenderFreePicture* = 7
-  constX_RenderComposite* = 8
-  X_RenderScale* = 9
-  X_RenderTrapezoids* = 10
-  X_RenderTriangles* = 11
-  X_RenderTriStrip* = 12
-  X_RenderTriFan* = 13
-  X_RenderColorTrapezoids* = 14
-  X_RenderColorTriangles* = 15
-  X_RenderTransform* = 16
-  constX_RenderCreateGlyphSet* = 17
-  constX_RenderReferenceGlyphSet* = 18
-  constX_RenderFreeGlyphSet* = 19
-  constX_RenderAddGlyphs* = 20
-  constX_RenderAddGlyphsFromPicture* = 21
-  constX_RenderFreeGlyphs* = 22
-  constX_RenderCompositeGlyphs8* = 23
-  constX_RenderCompositeGlyphs16* = 24
-  constX_RenderCompositeGlyphs32* = 25
-  BadPictFormat* = 0
-  BadPicture* = 1
-  BadPictOp* = 2
-  BadGlyphSet* = 3
-  BadGlyph* = 4
-  RenderNumberErrors* = BadGlyph + 1
-  PictTypeIndexed* = 0
-  PictTypeDirect* = 1
-  PictOpClear* = 0
-  PictOpSrc* = 1
-  PictOpDst* = 2
-  PictOpOver* = 3
-  PictOpOverReverse* = 4
-  PictOpIn* = 5
-  PictOpInReverse* = 6
-  PictOpOut* = 7
-  PictOpOutReverse* = 8
-  PictOpAtop* = 9
-  PictOpAtopReverse* = 10
-  PictOpXor* = 11
-  PictOpAdd* = 12
-  PictOpSaturate* = 13
-  PictOpMaximum* = 13
-  PolyEdgeSharp* = 0
-  PolyEdgeSmooth* = 1
-  PolyModePrecise* = 0
-  PolyModeImprecise* = 1
-  CPRepeat* = 1 shl 0
-  CPAlphaMap* = 1 shl 1
-  CPAlphaXOrigin* = 1 shl 2
-  CPAlphaYOrigin* = 1 shl 3
-  CPClipXOrigin* = 1 shl 4
-  CPClipYOrigin* = 1 shl 5
-  CPClipMask* = 1 shl 6
-  CPGraphicsExposure* = 1 shl 7
-  CPSubwindowMode* = 1 shl 8
-  CPPolyEdge* = 1 shl 9
-  CPPolyMode* = 1 shl 10
-  CPDither* = 1 shl 11
-  CPLastBit* = 11
-
-type 
-  PXRenderDirectFormat* = ptr TXRenderDirectFormat
-  TXRenderDirectFormat*{.final.} = object 
-    red*: int16
-    redMask*: int16
-    green*: int16
-    greenMask*: int16
-    blue*: int16
-    blueMask*: int16
-    alpha*: int16
-    alphaMask*: int16
-
-  PXRenderPictFormat* = ptr TXRenderPictFormat
-  TXRenderPictFormat*{.final.} = object 
-    id*: TPictFormat
-    thetype*: int32
-    depth*: int32
-    direct*: TXRenderDirectFormat
-    colormap*: TColormap
-
-
-const 
-  PictFormatID* = 1 shl 0
-  PictFormatType* = 1 shl 1
-  PictFormatDepth* = 1 shl 2
-  PictFormatRed* = 1 shl 3
-  PictFormatRedMask* = 1 shl 4
-  PictFormatGreen* = 1 shl 5
-  PictFormatGreenMask* = 1 shl 6
-  PictFormatBlue* = 1 shl 7
-  PictFormatBlueMask* = 1 shl 8
-  PictFormatAlpha* = 1 shl 9
-  PictFormatAlphaMask* = 1 shl 10
-  PictFormatColormap* = 1 shl 11
-
-type 
-  PXRenderVisual* = ptr TXRenderVisual
-  TXRenderVisual*{.final.} = object 
-    visual*: PVisual
-    format*: PXRenderPictFormat
-
-  PXRenderDepth* = ptr TXRenderDepth
-  TXRenderDepth*{.final.} = object 
-    depth*: int32
-    nvisuals*: int32
-    visuals*: PXRenderVisual
-
-  PXRenderScreen* = ptr TXRenderScreen
-  TXRenderScreen*{.final.} = object 
-    depths*: PXRenderDepth
-    ndepths*: int32
-    fallback*: PXRenderPictFormat
-
-  PXRenderInfo* = ptr TXRenderInfo
-  TXRenderInfo*{.final.} = object 
-    format*: PXRenderPictFormat
-    nformat*: int32
-    screen*: PXRenderScreen
-    nscreen*: int32
-    depth*: PXRenderDepth
-    ndepth*: int32
-    visual*: PXRenderVisual
-    nvisual*: int32
-
-  PXRenderPictureAttributes* = ptr TXRenderPictureAttributes
-  TXRenderPictureAttributes*{.final.} = object 
-    repeat*: TBool
-    alpha_map*: TPicture
-    alpha_x_origin*: int32
-    alpha_y_origin*: int32
-    clip_x_origin*: int32
-    clip_y_origin*: int32
-    clip_mask*: TPixmap
-    graphics_exposures*: TBool
-    subwindow_mode*: int32
-    poly_edge*: int32
-    poly_mode*: int32
-    dither*: TAtom
-
-  PXGlyphInfo* = ptr TXGlyphInfo
-  TXGlyphInfo*{.final.} = object 
-    width*: int16
-    height*: int16
-    x*: int16
-    y*: int16
-    xOff*: int16
-    yOff*: int16
-
-
-proc XRenderQueryExtension*(dpy: PDisplay, event_basep: ptr int32, 
-                            error_basep: ptr int32): TBool{.libxrender.}
-proc XRenderQueryVersion*(dpy: PDisplay, major_versionp: ptr int32, 
-                          minor_versionp: ptr int32): TStatus{.libxrender.}
-proc XRenderQueryFormats*(dpy: PDisplay): TStatus{.libxrender.}
-proc XRenderFindVisualFormat*(dpy: PDisplay, visual: PVisual): PXRenderPictFormat{.
-    libxrender.}
-proc XRenderFindFormat*(dpy: PDisplay, mask: int32, 
-                        `template`: PXRenderPictFormat, count: int32): PXRenderPictFormat{.
-    libxrender.}
-proc XRenderCreatePicture*(dpy: PDisplay, drawable: TDrawable, 
-                           format: PXRenderPictFormat, valuemask: int32, 
-                           attributes: PXRenderPictureAttributes): TPicture{.
-    libxrender.}
-proc XRenderChangePicture*(dpy: PDisplay, picture: TPicture, valuemask: int32, 
-                           attributes: PXRenderPictureAttributes){.libxrender.}
-proc XRenderFreePicture*(dpy: PDisplay, picture: TPicture){.libxrender.}
-proc XRenderComposite*(dpy: PDisplay, op: int32, src: TPicture, mask: TPicture, 
-                       dst: TPicture, src_x: int32, src_y: int32, mask_x: int32, 
-                       mask_y: int32, dst_x: int32, dst_y: int32, width: int32, 
-                       height: int32){.libxrender.}
-proc XRenderCreateGlyphSet*(dpy: PDisplay, format: PXRenderPictFormat): TGlyphSet{.
-    libxrender.}
-proc XRenderReferenceGlyphSet*(dpy: PDisplay, existing: TGlyphSet): TGlyphSet{.
-    libxrender.}
-proc XRenderFreeGlyphSet*(dpy: PDisplay, glyphset: TGlyphSet){.libxrender.}
-proc XRenderAddGlyphs*(dpy: PDisplay, glyphset: TGlyphSet, gids: PGlyph, 
-                       glyphs: PXGlyphInfo, nglyphs: int32, images: cstring, 
-                       nbyte_images: int32){.libxrender.}
-proc XRenderFreeGlyphs*(dpy: PDisplay, glyphset: TGlyphSet, gids: PGlyph, 
-                        nglyphs: int32){.libxrender.}
-proc XRenderCompositeString8*(dpy: PDisplay, op: int32, src: TPicture, 
-                              dst: TPicture, maskFormat: PXRenderPictFormat, 
-                              glyphset: TGlyphSet, xSrc: int32, ySrc: int32, 
-                              xDst: int32, yDst: int32, str: cstring, 
-                              nchar: int32){.libxrender.}
-# implementation
diff --git a/lib/wrappers/x11/xresource.nim b/lib/wrappers/x11/xresource.nim
deleted file mode 100644
index f553b4413..000000000
--- a/lib/wrappers/x11/xresource.nim
+++ /dev/null
@@ -1,200 +0,0 @@
-
-import 
-  x, xlib
-
-#const 
-#  libX11* = "libX11.so"
-
-#
-#  Automatically converted by H2Pas 0.99.15 from xresource.h
-#  The following command line parameters were used:
-#    -p
-#    -T
-#    -S
-#    -d
-#    -c
-#    xresource.h
-#
-
-proc Xpermalloc*(para1: int32): cstring{.cdecl, dynlib: libX11, importc.}
-type 
-  PXrmQuark* = ptr TXrmQuark
-  TXrmQuark* = int32
-  TXrmQuarkList* = PXrmQuark
-  PXrmQuarkList* = ptr TXrmQuarkList
-
-proc NULLQUARK*(): TXrmQuark
-type 
-  PXrmString* = ptr TXrmString
-  TXrmString* = ptr char
-
-proc NULLSTRING*(): TXrmString
-proc XrmStringToQuark*(para1: cstring): TXrmQuark{.cdecl, dynlib: libX11, 
-    importc.}
-proc XrmPermStringToQuark*(para1: cstring): TXrmQuark{.cdecl, dynlib: libX11, 
-    importc.}
-proc XrmQuarkToString*(para1: TXrmQuark): TXrmString{.cdecl, dynlib: libX11, 
-    importc.}
-proc XrmUniqueQuark*(): TXrmQuark{.cdecl, dynlib: libX11, importc.}
-when defined(MACROS): 
-  proc XrmStringsEqual*(a1, a2: cstring): bool
-type 
-  PXrmBinding* = ptr TXrmBinding
-  TXrmBinding* = enum 
-    XrmBindTightly, XrmBindLoosely
-  TXrmBindingList* = PXrmBinding
-  PXrmBindingList* = ptr TXrmBindingList
-
-proc XrmStringToQuarkList*(para1: cstring, para2: TXrmQuarkList){.cdecl, 
-    dynlib: libX11, importc.}
-proc XrmStringToBindingQuarkList*(para1: cstring, para2: TXrmBindingList, 
-                                  para3: TXrmQuarkList){.cdecl, dynlib: libX11, 
-    importc.}
-type 
-  PXrmName* = ptr TXrmName
-  TXrmName* = TXrmQuark
-  PXrmNameList* = ptr TXrmNameList
-  TXrmNameList* = TXrmQuarkList
-
-when defined(MACROS): 
-  proc XrmNameToString*(name: int32): TXrmString
-  proc XrmStringToName*(str: cstring): int32
-  proc XrmStringToNameList*(str: cstring, name: PXrmQuark)
-type 
-  PXrmClass* = ptr TXrmClass
-  TXrmClass* = TXrmQuark
-  PXrmClassList* = ptr TXrmClassList
-  TXrmClassList* = TXrmQuarkList
-
-when defined(MACROS): 
-  proc XrmClassToString*(c_class: int32): TXrmString
-  proc XrmStringToClass*(c_class: cstring): int32
-  proc XrmStringToClassList*(str: cstring, c_class: PXrmQuark)
-type 
-  PXrmRepresentation* = ptr TXrmRepresentation
-  TXrmRepresentation* = TXrmQuark
-
-when defined(MACROS): 
-  proc XrmStringToRepresentation*(str: cstring): int32
-  proc XrmRepresentationToString*(thetype: int32): TXrmString
-type 
-  PXrmValue* = ptr TXrmValue
-  TXrmValue*{.final.} = object 
-    size*: int32
-    address*: TXPointer
-
-  TXrmValuePtr* = PXrmValue
-  PXrmValuePtr* = ptr TXrmValuePtr
-  PXrmHashBucketRec* = ptr TXrmHashBucketRec
-  TXrmHashBucketRec*{.final.} = object 
-  TXrmHashBucket* = PXrmHashBucketRec
-  PXrmHashBucket* = ptr TXrmHashBucket
-  PXrmHashTable* = ptr TXrmHashTable
-  TXrmHashTable* = ptr TXrmHashBucket
-  TXrmDatabase* = PXrmHashBucketRec
-  PXrmDatabase* = ptr TXrmDatabase
-
-proc XrmDestroyDatabase*(para1: TXrmDatabase){.cdecl, dynlib: libX11, importc.}
-proc XrmQPutResource*(para1: PXrmDatabase, para2: TXrmBindingList, 
-                      para3: TXrmQuarkList, para4: TXrmRepresentation, 
-                      para5: PXrmValue){.cdecl, dynlib: libX11, importc.}
-proc XrmPutResource*(para1: PXrmDatabase, para2: cstring, para3: cstring, 
-                     para4: PXrmValue){.cdecl, dynlib: libX11, importc.}
-proc XrmQPutStringResource*(para1: PXrmDatabase, para2: TXrmBindingList, 
-                            para3: TXrmQuarkList, para4: cstring){.cdecl, 
-    dynlib: libX11, importc.}
-proc XrmPutStringResource*(para1: PXrmDatabase, para2: cstring, para3: cstring){.
-    cdecl, dynlib: libX11, importc.}
-proc XrmPutLineResource*(para1: PXrmDatabase, para2: cstring){.cdecl, 
-    dynlib: libX11, importc.}
-proc XrmQGetResource*(para1: TXrmDatabase, para2: TXrmNameList, 
-                      para3: TXrmClassList, para4: PXrmRepresentation, 
-                      para5: PXrmValue): TBool{.cdecl, dynlib: libX11, importc.}
-proc XrmGetResource*(para1: TXrmDatabase, para2: cstring, para3: cstring, 
-                     para4: PPchar, para5: PXrmValue): TBool{.cdecl, 
-    dynlib: libX11, importc.}
-  # There is no definition of TXrmSearchList 
-  #function XrmQGetSearchList(para1:TXrmDatabase; para2:TXrmNameList; para3:TXrmClassList; para4:TXrmSearchList; para5:longint):TBool;cdecl;external libX11;
-  #function XrmQGetSearchResource(para1:TXrmSearchList; para2:TXrmName; para3:TXrmClass; para4:PXrmRepresentation; para5:PXrmValue):TBool;cdecl;external libX11;
-proc XrmSetDatabase*(para1: PDisplay, para2: TXrmDatabase){.cdecl, 
-    dynlib: libX11, importc.}
-proc XrmGetDatabase*(para1: PDisplay): TXrmDatabase{.cdecl, dynlib: libX11, 
-    importc.}
-proc XrmGetFileDatabase*(para1: cstring): TXrmDatabase{.cdecl, dynlib: libX11, 
-    importc.}
-proc XrmCombineFileDatabase*(para1: cstring, para2: PXrmDatabase, para3: TBool): TStatus{.
-    cdecl, dynlib: libX11, importc.}
-proc XrmGetStringDatabase*(para1: cstring): TXrmDatabase{.cdecl, dynlib: libX11, 
-    importc.}
-proc XrmPutFileDatabase*(para1: TXrmDatabase, para2: cstring){.cdecl, 
-    dynlib: libX11, importc.}
-proc XrmMergeDatabases*(para1: TXrmDatabase, para2: PXrmDatabase){.cdecl, 
-    dynlib: libX11, importc.}
-proc XrmCombineDatabase*(para1: TXrmDatabase, para2: PXrmDatabase, para3: TBool){.
-    cdecl, dynlib: libX11, importc.}
-const 
-  XrmEnumAllLevels* = 0
-  XrmEnumOneLevel* = 1
-
-type 
-  funcbool* = proc (): TBool {.cdecl.}
-
-proc XrmEnumerateDatabase*(para1: TXrmDatabase, para2: TXrmNameList, 
-                           para3: TXrmClassList, para4: int32, para5: funcbool, 
-                           para6: TXPointer): TBool{.cdecl, dynlib: libX11, 
-    importc.}
-proc XrmLocaleOfDatabase*(para1: TXrmDatabase): cstring{.cdecl, dynlib: libX11, 
-    importc.}
-type 
-  PXrmOptionKind* = ptr TXrmOptionKind
-  TXrmOptionKind* = enum 
-    XrmoptionNoArg, XrmoptionIsArg, XrmoptionStickyArg, XrmoptionSepArg, 
-    XrmoptionResArg, XrmoptionSkipArg, XrmoptionSkipLine, XrmoptionSkipNArgs
-  PXrmOptionDescRec* = ptr TXrmOptionDescRec
-  TXrmOptionDescRec*{.final.} = object 
-    option*: cstring
-    specifier*: cstring
-    argKind*: TXrmOptionKind
-    value*: TXPointer
-
-  TXrmOptionDescList* = PXrmOptionDescRec
-  PXrmOptionDescList* = ptr TXrmOptionDescList
-
-proc XrmParseCommand*(para1: PXrmDatabase, para2: TXrmOptionDescList, 
-                      para3: int32, para4: cstring, para5: ptr int32, 
-                      para6: PPchar){.cdecl, dynlib: libX11, importc.}
-# implementation
-
-proc NULLQUARK(): TXrmQuark = 
-  result = TXrmQuark(0)
-
-proc NULLSTRING(): TXrmString = 
-  result = nil
-
-when defined(MACROS): 
-  proc XrmStringsEqual(a1, a2: cstring): bool = 
-    result = (strcomp(a1, a2)) == 0
-
-  proc XrmNameToString(name: int32): TXrmString = 
-    result = XrmQuarkToString(name)
-
-  proc XrmStringToName(str: cstring): int32 = 
-    result = XrmStringToQuark(str)
-
-  proc XrmStringToNameList(str: cstring, name: PXrmQuark) = 
-    XrmStringToQuarkList(str, name)
-
-  proc XrmClassToString(c_class: int32): TXrmString = 
-    result = XrmQuarkToString(c_class)
-
-  proc XrmStringToClass(c_class: cstring): int32 = 
-    result = XrmStringToQuark(c_class)
-
-  proc XrmStringToClassList(str: cstring, c_class: PXrmQuark) = 
-    XrmStringToQuarkList(str, c_class)
-
-  proc XrmStringToRepresentation(str: cstring): int32 = 
-    result = XrmStringToQuark(str)
-
-  proc XrmRepresentationToString(thetype: int32): TXrmString = 
-    result = XrmQuarkToString(thetype)
diff --git a/lib/wrappers/x11/xshm.nim b/lib/wrappers/x11/xshm.nim
deleted file mode 100644
index e56bd87b1..000000000
--- a/lib/wrappers/x11/xshm.nim
+++ /dev/null
@@ -1,77 +0,0 @@
-
-import 
-  x, xlib
-
-#const 
-#  libX11* = "libX11.so"
-
-#
-#  Automatically converted by H2Pas 0.99.15 from xshm.h
-#  The following command line parameters were used:
-#    -p
-#    -T
-#    -S
-#    -d
-#    -c
-#    xshm.h
-#
-
-const 
-  constX_ShmQueryVersion* = 0
-  constX_ShmAttach* = 1
-  constX_ShmDetach* = 2
-  constX_ShmPutImage* = 3
-  constX_ShmGetImage* = 4
-  constX_ShmCreatePixmap* = 5
-  ShmCompletion* = 0
-  ShmNumberEvents* = ShmCompletion + 1
-  BadShmSeg* = 0
-  ShmNumberErrors* = BadShmSeg + 1
-
-type 
-  PShmSeg* = ptr TShmSeg
-  TShmSeg* = culong
-  PXShmCompletionEvent* = ptr TXShmCompletionEvent
-  TXShmCompletionEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong
-    send_event*: TBool
-    display*: PDisplay
-    drawable*: TDrawable
-    major_code*: cint
-    minor_code*: cint
-    shmseg*: TShmSeg
-    offset*: culong
-
-  PXShmSegmentInfo* = ptr TXShmSegmentInfo
-  TXShmSegmentInfo*{.final.} = object 
-    shmseg*: TShmSeg
-    shmid*: cint
-    shmaddr*: cstring
-    readOnly*: TBool
-
-
-proc XShmQueryExtension*(para1: PDisplay): TBool{.cdecl, dynlib: libX11, importc.}
-proc XShmGetEventBase*(para1: PDisplay): cint{.cdecl, dynlib: libX11, importc.}
-proc XShmQueryVersion*(para1: PDisplay, para2: Pcint, para3: Pcint, para4: PBool): TBool{.
-    cdecl, dynlib: libX11, importc.}
-proc XShmPixmapFormat*(para1: PDisplay): cint{.cdecl, dynlib: libX11, importc.}
-proc XShmAttach*(para1: PDisplay, para2: PXShmSegmentInfo): TStatus{.cdecl, 
-    dynlib: libX11, importc.}
-proc XShmDetach*(para1: PDisplay, para2: PXShmSegmentInfo): TStatus{.cdecl, 
-    dynlib: libX11, importc.}
-proc XShmPutImage*(para1: PDisplay, para2: TDrawable, para3: TGC, 
-                   para4: PXImage, para5: cint, para6: cint, para7: cint, 
-                   para8: cint, para9: cuint, para10: cuint, para11: TBool): TStatus{.
-    cdecl, dynlib: libX11, importc.}
-proc XShmGetImage*(para1: PDisplay, para2: TDrawable, para3: PXImage, 
-                   para4: cint, para5: cint, para6: culong): TStatus{.cdecl, 
-    dynlib: libX11, importc.}
-proc XShmCreateImage*(para1: PDisplay, para2: PVisual, para3: cuint, 
-                      para4: cint, para5: cstring, para6: PXShmSegmentInfo, 
-                      para7: cuint, para8: cuint): PXImage{.cdecl, 
-    dynlib: libX11, importc.}
-proc XShmCreatePixmap*(para1: PDisplay, para2: TDrawable, para3: cstring, 
-                       para4: PXShmSegmentInfo, para5: cuint, para6: cuint, 
-                       para7: cuint): TPixmap{.cdecl, dynlib: libX11, importc.}
-# implementation
diff --git a/lib/wrappers/x11/xutil.nim b/lib/wrappers/x11/xutil.nim
deleted file mode 100644
index 9a3435aa5..000000000
--- a/lib/wrappers/x11/xutil.nim
+++ /dev/null
@@ -1,412 +0,0 @@
-
-import 
-  x, xlib, keysym, unsigned
-
-#const 
-#  libX11* = "libX11.so"
-
-#
-#  Automatically converted by H2Pas 0.99.15 from xutil.h
-#  The following command line parameters were used:
-#    -p
-#    -T
-#    -S
-#    -d
-#    -c
-#    xutil.h
-#
-
-const 
-  NoValue* = 0x00000000
-  XValue* = 0x00000001
-  YValue* = 0x00000002
-  WidthValue* = 0x00000004
-  HeightValue* = 0x00000008
-  AllValues* = 0x0000000F
-  XNegative* = 0x00000010
-  YNegative* = 0x00000020
-
-type 
-  TCPoint*{.final.} = object 
-    x*: cint
-    y*: cint
-
-  PXSizeHints* = ptr TXSizeHints
-  TXSizeHints*{.final.} = object 
-    flags*: clong
-    x*, y*: cint
-    width*, height*: cint
-    min_width*, min_height*: cint
-    max_width*, max_height*: cint
-    width_inc*, height_inc*: cint
-    min_aspect*, max_aspect*: TCPoint
-    base_width*, base_height*: cint
-    win_gravity*: cint
-
-
-const 
-  USPosition* = 1 shl 0
-  USSize* = 1 shl 1
-  PPosition* = 1 shl 2
-  PSize* = 1 shl 3
-  PMinSize* = 1 shl 4
-  PMaxSize* = 1 shl 5
-  PResizeInc* = 1 shl 6
-  PAspect* = 1 shl 7
-  PBaseSize* = 1 shl 8
-  PWinGravity* = 1 shl 9
-  PAllHints* = PPosition or PSize or PMinSize or PMaxSize or PResizeInc or
-      PAspect
-
-type 
-  PXWMHints* = ptr TXWMHints
-  TXWMHints*{.final.} = object 
-    flags*: clong
-    input*: TBool
-    initial_state*: cint
-    icon_pixmap*: TPixmap
-    icon_window*: TWindow
-    icon_x*, icon_y*: cint
-    icon_mask*: TPixmap
-    window_group*: TXID
-
-
-const 
-  InputHint* = 1 shl 0
-  StateHint* = 1 shl 1
-  IconPixmapHint* = 1 shl 2
-  IconWindowHint* = 1 shl 3
-  IconPositionHint* = 1 shl 4
-  IconMaskHint* = 1 shl 5
-  WindowGroupHint* = 1 shl 6
-  AllHints* = InputHint or StateHint or IconPixmapHint or IconWindowHint or
-      IconPositionHint or IconMaskHint or WindowGroupHint
-  XUrgencyHint* = 1 shl 8
-  WithdrawnState* = 0
-  NormalState* = 1
-  IconicState* = 3
-  DontCareState* = 0
-  ZoomState* = 2
-  InactiveState* = 4
-
-type 
-  PXTextProperty* = ptr TXTextProperty
-  TXTextProperty*{.final.} = object 
-    value*: pcuchar
-    encoding*: TAtom
-    format*: cint
-    nitems*: culong
-
-
-const 
-  XNoMemory* = - 1
-  XLocaleNotSupported* = - 2
-  XConverterNotFound* = - 3
-
-type 
-  PXICCEncodingStyle* = ptr TXICCEncodingStyle
-  TXICCEncodingStyle* = enum 
-    XStringStyle, XCompoundTextStyle, XTextStyle, XStdICCTextStyle, 
-    XUTF8StringStyle
-  PPXIconSize* = ptr PXIconSize
-  PXIconSize* = ptr TXIconSize
-  TXIconSize*{.final.} = object 
-    min_width*, min_height*: cint
-    max_width*, max_height*: cint
-    width_inc*, height_inc*: cint
-
-  PXClassHint* = ptr TXClassHint
-  TXClassHint*{.final.} = object 
-    res_name*: cstring
-    res_class*: cstring
-
-
-type 
-  PXComposeStatus* = ptr TXComposeStatus
-  TXComposeStatus*{.final.} = object 
-    compose_ptr*: TXPointer
-    chars_matched*: cint
-
-
-type 
-  PXRegion* = ptr TXRegion
-  TXRegion*{.final.} = object 
-  TRegion* = PXRegion
-  PRegion* = ptr TRegion
-
-const 
-  RectangleOut* = 0
-  RectangleIn* = 1
-  RectanglePart* = 2
-
-type 
-  PXVisualInfo* = ptr TXVisualInfo
-  TXVisualInfo*{.final.} = object 
-    visual*: PVisual
-    visualid*: TVisualID
-    screen*: cint
-    depth*: cint
-    class*: cint
-    red_mask*: culong
-    green_mask*: culong
-    blue_mask*: culong
-    colormap_size*: cint
-    bits_per_rgb*: cint
-
-
-const 
-  VisualNoMask* = 0x00000000
-  VisualIDMask* = 0x00000001
-  VisualScreenMask* = 0x00000002
-  VisualDepthMask* = 0x00000004
-  VisualClassMask* = 0x00000008
-  VisualRedMaskMask* = 0x00000010
-  VisualGreenMaskMask* = 0x00000020
-  VisualBlueMaskMask* = 0x00000040
-  VisualColormapSizeMask* = 0x00000080
-  VisualBitsPerRGBMask* = 0x00000100
-  VisualAllMask* = 0x000001FF
-
-type 
-  PPXStandardColormap* = ptr PXStandardColormap
-  PXStandardColormap* = ptr TXStandardColormap
-  TXStandardColormap*{.final.} = object 
-    colormap*: TColormap
-    red_max*: culong
-    red_mult*: culong
-    green_max*: culong
-    green_mult*: culong
-    blue_max*: culong
-    blue_mult*: culong
-    base_pixel*: culong
-    visualid*: TVisualID
-    killid*: TXID
-
-
-const 
-  BitmapSuccess* = 0
-  BitmapOpenFailed* = 1
-  BitmapFileInvalid* = 2
-  BitmapNoMemory* = 3
-  XCSUCCESS* = 0
-  XCNOMEM* = 1
-  XCNOENT* = 2
-  ReleaseByFreeingColormap*: TXID = TXID(1)
-
-type 
-  PXContext* = ptr TXContext
-  TXContext* = cint
-
-proc XAllocClassHint*(): PXClassHint{.cdecl, dynlib: libX11, importc.}
-proc XAllocIconSize*(): PXIconSize{.cdecl, dynlib: libX11, importc.}
-proc XAllocSizeHints*(): PXSizeHints{.cdecl, dynlib: libX11, importc.}
-proc XAllocStandardColormap*(): PXStandardColormap{.cdecl, dynlib: libX11, 
-    importc.}
-proc XAllocWMHints*(): PXWMHints{.cdecl, dynlib: libX11, importc.}
-proc XClipBox*(para1: TRegion, para2: PXRectangle): cint{.cdecl, dynlib: libX11, 
-    importc.}
-proc XCreateRegion*(): TRegion{.cdecl, dynlib: libX11, importc.}
-proc XDefaultString*(): cstring{.cdecl, dynlib: libX11, importc.}
-proc XDeleteContext*(para1: PDisplay, para2: TXID, para3: TXContext): cint{.
-    cdecl, dynlib: libX11, importc.}
-proc XDestroyRegion*(para1: TRegion): cint{.cdecl, dynlib: libX11, importc.}
-proc XEmptyRegion*(para1: TRegion): cint{.cdecl, dynlib: libX11, importc.}
-proc XEqualRegion*(para1: TRegion, para2: TRegion): cint{.cdecl, dynlib: libX11, 
-    importc.}
-proc XFindContext*(para1: PDisplay, para2: TXID, para3: TXContext, 
-                   para4: PXPointer): cint{.cdecl, dynlib: libX11, importc.}
-proc XGetClassHint*(para1: PDisplay, para2: TWindow, para3: PXClassHint): TStatus{.
-    cdecl, dynlib: libX11, importc.}
-proc XGetIconSizes*(para1: PDisplay, para2: TWindow, para3: PPXIconSize, 
-                    para4: Pcint): TStatus{.cdecl, dynlib: libX11, importc.}
-proc XGetNormalHints*(para1: PDisplay, para2: TWindow, para3: PXSizeHints): TStatus{.
-    cdecl, dynlib: libX11, importc.}
-proc XGetRGBColormaps*(para1: PDisplay, para2: TWindow, 
-                       para3: PPXStandardColormap, para4: Pcint, para5: TAtom): TStatus{.
-    cdecl, dynlib: libX11, importc.}
-proc XGetSizeHints*(para1: PDisplay, para2: TWindow, para3: PXSizeHints, 
-                    para4: TAtom): TStatus{.cdecl, dynlib: libX11, importc.}
-proc XGetStandardColormap*(para1: PDisplay, para2: TWindow, 
-                           para3: PXStandardColormap, para4: TAtom): TStatus{.
-    cdecl, dynlib: libX11, importc.}
-proc XGetTextProperty*(para1: PDisplay, para2: TWindow, para3: PXTextProperty, 
-                       para4: TAtom): TStatus{.cdecl, dynlib: libX11, importc.}
-proc XGetVisualInfo*(para1: PDisplay, para2: clong, para3: PXVisualInfo, 
-                     para4: Pcint): PXVisualInfo{.cdecl, dynlib: libX11, importc.}
-proc XGetWMClientMachine*(para1: PDisplay, para2: TWindow, para3: PXTextProperty): TStatus{.
-    cdecl, dynlib: libX11, importc.}
-proc XGetWMHints*(para1: PDisplay, para2: TWindow): PXWMHints{.cdecl, 
-    dynlib: libX11, importc.}
-proc XGetWMIconName*(para1: PDisplay, para2: TWindow, para3: PXTextProperty): TStatus{.
-    cdecl, dynlib: libX11, importc.}
-proc XGetWMName*(para1: PDisplay, para2: TWindow, para3: PXTextProperty): TStatus{.
-    cdecl, dynlib: libX11, importc.}
-proc XGetWMNormalHints*(para1: PDisplay, para2: TWindow, para3: PXSizeHints, 
-                        para4: ptr int): TStatus{.cdecl, dynlib: libX11, importc.}
-proc XGetWMSizeHints*(para1: PDisplay, para2: TWindow, para3: PXSizeHints, 
-                      para4: ptr int, para5: TAtom): TStatus{.cdecl, 
-    dynlib: libX11, importc.}
-proc XGetZoomHints*(para1: PDisplay, para2: TWindow, para3: PXSizeHints): TStatus{.
-    cdecl, dynlib: libX11, importc.}
-proc XIntersectRegion*(para1: TRegion, para2: TRegion, para3: TRegion): cint{.
-    cdecl, dynlib: libX11, importc.}
-proc XConvertCase*(para1: TKeySym, para2: PKeySym, para3: PKeySym){.cdecl, 
-    dynlib: libX11, importc.}
-proc XLookupString*(para1: PXKeyEvent, para2: cstring, para3: cint, 
-                    para4: PKeySym, para5: PXComposeStatus): cint{.cdecl, 
-    dynlib: libX11, importc.}
-proc XMatchVisualInfo*(para1: PDisplay, para2: cint, para3: cint, para4: cint, 
-                       para5: PXVisualInfo): TStatus{.cdecl, dynlib: libX11, 
-    importc.}
-proc XOffsetRegion*(para1: TRegion, para2: cint, para3: cint): cint{.cdecl, 
-    dynlib: libX11, importc.}
-proc XPointInRegion*(para1: TRegion, para2: cint, para3: cint): TBool{.cdecl, 
-    dynlib: libX11, importc.}
-proc XPolygonRegion*(para1: PXPoint, para2: cint, para3: cint): TRegion{.cdecl, 
-    dynlib: libX11, importc.}
-proc XRectInRegion*(para1: TRegion, para2: cint, para3: cint, para4: cuint, 
-                    para5: cuint): cint{.cdecl, dynlib: libX11, importc.}
-proc XSaveContext*(para1: PDisplay, para2: TXID, para3: TXContext, 
-                   para4: cstring): cint{.cdecl, dynlib: libX11, importc.}
-proc XSetClassHint*(para1: PDisplay, para2: TWindow, para3: PXClassHint): cint{.
-    cdecl, dynlib: libX11, importc.}
-proc XSetIconSizes*(para1: PDisplay, para2: TWindow, para3: PXIconSize, 
-                    para4: cint): cint{.cdecl, dynlib: libX11, importc.}
-proc XSetNormalHints*(para1: PDisplay, para2: TWindow, para3: PXSizeHints): cint{.
-    cdecl, dynlib: libX11, importc.}
-proc XSetRGBColormaps*(para1: PDisplay, para2: TWindow, 
-                       para3: PXStandardColormap, para4: cint, para5: TAtom){.
-    cdecl, dynlib: libX11, importc.}
-proc XSetSizeHints*(para1: PDisplay, para2: TWindow, para3: PXSizeHints, 
-                    para4: TAtom): cint{.cdecl, dynlib: libX11, importc.}
-proc XSetStandardProperties*(para1: PDisplay, para2: TWindow, para3: cstring, 
-                             para4: cstring, para5: TPixmap, para6: PPchar, 
-                             para7: cint, para8: PXSizeHints): cint{.cdecl, 
-    dynlib: libX11, importc.}
-proc XSetTextProperty*(para1: PDisplay, para2: TWindow, para3: PXTextProperty, 
-                       para4: TAtom){.cdecl, dynlib: libX11, importc.}
-proc XSetWMClientMachine*(para1: PDisplay, para2: TWindow, para3: PXTextProperty){.
-    cdecl, dynlib: libX11, importc.}
-proc XSetWMHints*(para1: PDisplay, para2: TWindow, para3: PXWMHints): cint{.
-    cdecl, dynlib: libX11, importc.}
-proc XSetWMIconName*(para1: PDisplay, para2: TWindow, para3: PXTextProperty){.
-    cdecl, dynlib: libX11, importc.}
-proc XSetWMName*(para1: PDisplay, para2: TWindow, para3: PXTextProperty){.cdecl, 
-    dynlib: libX11, importc.}
-proc XSetWMNormalHints*(para1: PDisplay, para2: TWindow, para3: PXSizeHints){.
-    cdecl, dynlib: libX11, importc.}
-proc XSetWMProperties*(para1: PDisplay, para2: TWindow, para3: PXTextProperty, 
-                       para4: PXTextProperty, para5: PPchar, para6: cint, 
-                       para7: PXSizeHints, para8: PXWMHints, para9: PXClassHint){.
-    cdecl, dynlib: libX11, importc.}
-proc XmbSetWMProperties*(para1: PDisplay, para2: TWindow, para3: cstring, 
-                         para4: cstring, para5: PPchar, para6: cint, 
-                         para7: PXSizeHints, para8: PXWMHints, 
-                         para9: PXClassHint){.cdecl, dynlib: libX11, importc.}
-proc Xutf8SetWMProperties*(para1: PDisplay, para2: TWindow, para3: cstring, 
-                           para4: cstring, para5: PPchar, para6: cint, 
-                           para7: PXSizeHints, para8: PXWMHints, 
-                           para9: PXClassHint){.cdecl, dynlib: libX11, importc.}
-proc XSetWMSizeHints*(para1: PDisplay, para2: TWindow, para3: PXSizeHints, 
-                      para4: TAtom){.cdecl, dynlib: libX11, importc.}
-proc XSetRegion*(para1: PDisplay, para2: TGC, para3: TRegion): cint{.cdecl, 
-    dynlib: libX11, importc.}
-proc XSetStandardColormap*(para1: PDisplay, para2: TWindow, 
-                           para3: PXStandardColormap, para4: TAtom){.cdecl, 
-    dynlib: libX11, importc.}
-proc XSetZoomHints*(para1: PDisplay, para2: TWindow, para3: PXSizeHints): cint{.
-    cdecl, dynlib: libX11, importc.}
-proc XShrinkRegion*(para1: TRegion, para2: cint, para3: cint): cint{.cdecl, 
-    dynlib: libX11, importc.}
-proc XStringListToTextProperty*(para1: PPchar, para2: cint, 
-                                para3: PXTextProperty): TStatus{.cdecl, 
-    dynlib: libX11, importc.}
-proc XSubtractRegion*(para1: TRegion, para2: TRegion, para3: TRegion): cint{.
-    cdecl, dynlib: libX11, importc.}
-proc XmbTextListToTextProperty*(para1: PDisplay, para2: PPchar, para3: cint, 
-                                para4: TXICCEncodingStyle, para5: PXTextProperty): cint{.
-    cdecl, dynlib: libX11, importc.}
-proc XwcTextListToTextProperty*(para1: PDisplay, para2: ptr ptr int16, para3: cint, 
-                                para4: TXICCEncodingStyle, para5: PXTextProperty): cint{.
-    cdecl, dynlib: libX11, importc.}
-proc Xutf8TextListToTextProperty*(para1: PDisplay, para2: PPchar, para3: cint, 
-                                  para4: TXICCEncodingStyle, 
-                                  para5: PXTextProperty): cint{.cdecl, 
-    dynlib: libX11, importc.}
-proc XwcFreeStringList*(para1: ptr ptr int16){.cdecl, dynlib: libX11, importc.}
-proc XTextPropertyToStringList*(para1: PXTextProperty, para2: PPPchar, 
-                                para3: Pcint): TStatus{.cdecl, dynlib: libX11, 
-    importc.}
-proc XmbTextPropertyToTextList*(para1: PDisplay, para2: PXTextProperty, 
-                                para3: PPPchar, para4: Pcint): cint{.cdecl, 
-    dynlib: libX11, importc.}
-proc XwcTextPropertyToTextList*(para1: PDisplay, para2: PXTextProperty, 
-                                para3: ptr ptr ptr int16, para4: Pcint): cint{.cdecl, 
-    dynlib: libX11, importc.}
-proc Xutf8TextPropertyToTextList*(para1: PDisplay, para2: PXTextProperty, 
-                                  para3: PPPchar, para4: Pcint): cint{.cdecl, 
-    dynlib: libX11, importc.}
-proc XUnionRectWithRegion*(para1: PXRectangle, para2: TRegion, para3: TRegion): cint{.
-    cdecl, dynlib: libX11, importc.}
-proc XUnionRegion*(para1: TRegion, para2: TRegion, para3: TRegion): cint{.cdecl, 
-    dynlib: libX11, importc.}
-proc XWMGeometry*(para1: PDisplay, para2: cint, para3: cstring, para4: cstring, 
-                  para5: cuint, para6: PXSizeHints, para7: Pcint, para8: Pcint, 
-                  para9: Pcint, para10: Pcint, para11: Pcint): cint{.cdecl, 
-    dynlib: libX11, importc.}
-proc XXorRegion*(para1: TRegion, para2: TRegion, para3: TRegion): cint{.cdecl, 
-    dynlib: libX11, importc.}
-#when defined(MACROS): 
-proc XDestroyImage*(ximage: PXImage): cint
-proc XGetPixel*(ximage: PXImage, x, y: cint): culong
-proc XPutPixel*(ximage: PXImage, x, y: cint, pixel: culong): cint
-proc XSubImage*(ximage: PXImage, x, y: cint, width, height: cuint): PXImage
-proc XAddPixel*(ximage: PXImage, value: clong): cint
-proc IsKeypadKey*(keysym: TKeySym): bool
-proc IsPrivateKeypadKey*(keysym: TKeySym): bool
-proc IsCursorKey*(keysym: TKeySym): bool
-proc IsPFKey*(keysym: TKeySym): bool
-proc IsFunctionKey*(keysym: TKeySym): bool
-proc IsMiscFunctionKey*(keysym: TKeySym): bool
-proc IsModifierKey*(keysym: TKeySym): bool
-  #function XUniqueContext : TXContext;
-  #function XStringToContext(_string : Pchar) : TXContext;
-# implementation
-
-#when defined(MACROS): 
-proc XDestroyImage(ximage: PXImage): cint = 
-  ximage.f.destroy_image(ximage)
-
-proc XGetPixel(ximage: PXImage, x, y: cint): culong = 
-  ximage.f.get_pixel(ximage, x, y)
-
-proc XPutPixel(ximage: PXImage, x, y: cint, pixel: culong): cint = 
-  ximage.f.put_pixel(ximage, x, y, pixel)
-
-proc XSubImage(ximage: PXImage, x, y: cint, width, height: cuint): PXImage = 
-  ximage.f.sub_image(ximage, x, y, width, height)
-
-proc XAddPixel(ximage: PXImage, value: clong): cint = 
-  ximage.f.add_pixel(ximage, value)
-
-proc IsKeypadKey(keysym: TKeySym): bool = 
-  (keysym >= XK_KP_Space) and (keysym <= XK_KP_Equal)
-
-proc IsPrivateKeypadKey(keysym: TKeySym): bool = 
-  (keysym >= 0x11000000.TKeySym) and (keysym <= 0x1100FFFF.TKeySym)
-
-proc IsCursorKey(keysym: TKeySym): bool = 
-  (keysym >= XK_Home) and (keysym < XK_Select)
-
-proc IsPFKey(keysym: TKeySym): bool = 
-  (keysym >= XK_KP_F1) and (keysym <= XK_KP_F4)
-
-proc IsFunctionKey(keysym: TKeySym): bool = 
-  (keysym >= XK_F1) and (keysym <= XK_F35)
-
-proc IsMiscFunctionKey(keysym: TKeySym): bool = 
-  (keysym >= XK_Select) and (keysym <= XK_Break)
-
-proc IsModifierKey(keysym: TKeySym): bool = 
-  ((keysym >= XK_Shift_L) And (keysym <= XK_Hyper_R)) Or
-      (keysym == XK_Mode_switch) Or (keysym == XK_Num_Lock)
diff --git a/lib/wrappers/x11/xv.nim b/lib/wrappers/x11/xv.nim
deleted file mode 100644
index 45ab61418..000000000
--- a/lib/wrappers/x11/xv.nim
+++ /dev/null
@@ -1,84 +0,0 @@
-#***********************************************************
-#Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
-#and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
-#
-#                        All Rights Reserved
-#
-#Permission to use, copy, modify, and distribute this software and its 
-#documentation for any purpose and without fee is hereby granted, 
-#provided that the above copyright notice appear in all copies and that
-#both that copyright notice and this permission notice appear in 
-#supporting documentation, and that the names of Digital or MIT not be
-#used in advertising or publicity pertaining to distribution of the
-#software without specific, written prior permission.  
-#
-#DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-#ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-#DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-#ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-#WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-#ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-#SOFTWARE.
-#
-#******************************************************************
-# $XFree86: xc/include/extensions/Xv.h,v 1.3 1999/05/23 06:33:22 dawes Exp $ 
-
-import 
-  x
-
-const 
-  XvName* = "libXVideo.so"
-  XvVersion* = 2
-  XvRevision* = 2             # Symbols 
-
-type 
-  TXvPortID* = TXID
-  TXvEncodingID* = TXID
-
-const 
-  XvNone* = 0
-  XvInput* = 0
-  XvOutput* = 1
-  XvInputMask* = 1 shl XvInput
-  XvOutputMask* = 1 shl XvOutput
-  XvVideoMask* = 0x00000004
-  XvStillMask* = 0x00000008
-  XvImageMask* = 0x00000010   # These two are not client viewable 
-  XvPixmapMask* = 0x00010000
-  XvWindowMask* = 0x00020000
-  XvGettable* = 0x00000001
-  XvSettable* = 0x00000002
-  XvRGB* = 0
-  XvYUV* = 1
-  XvPacked* = 0
-  XvPlanar* = 1
-  XvTopToBottom* = 0
-  XvBottomToTop* = 1          # Events 
-  XvVideoNotify* = 0
-  XvPortNotify* = 1
-  XvNumEvents* = 2            # Video Notify Reasons 
-  XvStarted* = 0
-  XvStopped* = 1
-  XvBusy* = 2
-  XvPreempted* = 3
-  XvHardError* = 4
-  XvLastReason* = 4
-  XvNumReasons* = XvLastReason + 1
-  XvStartedMask* = 1 shl XvStarted
-  XvStoppedMask* = 1 shl XvStopped
-  XvBusyMask* = 1 shl XvBusy
-  XvPreemptedMask* = 1 shl XvPreempted
-  XvHardErrorMask* = 1 shl XvHardError
-  XvAnyReasonMask* = (1 shl XvNumReasons) - 1
-  XvNoReasonMask* = 0         # Errors 
-  XvBadPort* = 0
-  XvBadEncoding* = 1
-  XvBadControl* = 2
-  XvNumErrors* = 3            # Status 
-  XvBadExtension* = 1
-  XvAlreadyGrabbed* = 2
-  XvInvalidTime* = 3
-  XvBadReply* = 4
-  XvBadAlloc* = 5
-
-# implementation
diff --git a/lib/wrappers/x11/xvlib.nim b/lib/wrappers/x11/xvlib.nim
deleted file mode 100644
index 19fd0d000..000000000
--- a/lib/wrappers/x11/xvlib.nim
+++ /dev/null
@@ -1,234 +0,0 @@
-#***********************************************************
-#Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
-#and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
-#
-#                        All Rights Reserved
-#
-#Permission to use, copy, modify, and distribute this software and its 
-#documentation for any purpose and without fee is hereby granted, 
-#provided that the above copyright notice appear in all copies and that
-#both that copyright notice and this permission notice appear in 
-#supporting documentation, and that the names of Digital or MIT not be
-#used in advertising or publicity pertaining to distribution of the
-#software without specific, written prior permission.  
-#
-#DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-#ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-#DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-#ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-#WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-#ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-#SOFTWARE.
-#
-#******************************************************************
-# $XFree86: xc/include/extensions/Xvlib.h,v 1.3 1999/12/11 19:28:48 mvojkovi Exp $ 
-#*
-#** File: 
-#**
-#**   Xvlib.h --- Xv library public header file
-#**
-#** Author: 
-#**
-#**   David Carver (Digital Workstation Engineering/Project Athena)
-#**
-#** Revisions:
-#**
-#**   26.06.91 Carver
-#**     - changed XvFreeAdaptors to XvFreeAdaptorInfo
-#**     - changed XvFreeEncodings to XvFreeEncodingInfo
-#**
-#**   11.06.91 Carver
-#**     - changed SetPortControl to SetPortAttribute
-#**     - changed GetPortControl to GetPortAttribute
-#**     - changed QueryBestSize
-#**
-#**   05.15.91 Carver
-#**     - version 2.0 upgrade
-#**
-#**   01.24.91 Carver
-#**     - version 1.4 upgrade
-#**
-#*
-
-import 
-  x, xlib, xshm, xv
-
-const 
-  libXv* = "libXv.so"
-
-type 
-  PXvRational* = ptr TXvRational
-  TXvRational*{.final.} = object 
-    numerator*: cint
-    denominator*: cint
-
-  PXvAttribute* = ptr TXvAttribute
-  TXvAttribute*{.final.} = object 
-    flags*: cint              # XvGettable, XvSettable 
-    min_value*: cint
-    max_value*: cint
-    name*: cstring
-
-  PPXvEncodingInfo* = ptr PXvEncodingInfo
-  PXvEncodingInfo* = ptr TXvEncodingInfo
-  TXvEncodingInfo*{.final.} = object 
-    encoding_id*: TXvEncodingID
-    name*: cstring
-    width*: culong
-    height*: culong
-    rate*: TXvRational
-    num_encodings*: culong
-
-  PXvFormat* = ptr TXvFormat
-  TXvFormat*{.final.} = object 
-    depth*: cchar
-    visual_id*: culong
-
-  PPXvAdaptorInfo* = ptr PXvAdaptorInfo
-  PXvAdaptorInfo* = ptr TXvAdaptorInfo
-  TXvAdaptorInfo*{.final.} = object 
-    base_id*: TXvPortID
-    num_ports*: culong
-    thetype*: cchar
-    name*: cstring
-    num_formats*: culong
-    formats*: PXvFormat
-    num_adaptors*: culong
-
-  PXvVideoNotifyEvent* = ptr TXvVideoNotifyEvent
-  TXvVideoNotifyEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong           # # of last request processed by server 
-    send_event*: TBool        # true if this came from a SendEvent request 
-    display*: PDisplay        # Display the event was read from 
-    drawable*: TDrawable      # drawable 
-    reason*: culong           # what generated this event 
-    port_id*: TXvPortID       # what port 
-    time*: TTime              # milliseconds 
-  
-  PXvPortNotifyEvent* = ptr TXvPortNotifyEvent
-  TXvPortNotifyEvent*{.final.} = object 
-    theType*: cint
-    serial*: culong           # # of last request processed by server 
-    send_event*: TBool        # true if this came from a SendEvent request 
-    display*: PDisplay        # Display the event was read from 
-    port_id*: TXvPortID       # what port 
-    time*: TTime              # milliseconds 
-    attribute*: TAtom         # atom that identifies attribute 
-    value*: clong             # value of attribute 
-  
-  PXvEvent* = ptr TXvEvent
-  TXvEvent*{.final.} = object 
-    pad*: array[0..23, clong] #case longint of
-                              #      0 : (
-                              #            theType : cint;
-                              #	  );
-                              #      1 : (
-                              #            xvvideo : TXvVideoNotifyEvent;
-                              #          );
-                              #      2 : (
-                              #            xvport : TXvPortNotifyEvent;
-                              #          );
-                              #      3 : (
-                              #            
-                              #          );
-  
-  PXvImageFormatValues* = ptr TXvImageFormatValues
-  TXvImageFormatValues*{.final.} = object 
-    id*: cint                 # Unique descriptor for the format 
-    theType*: cint            # XvRGB, XvYUV 
-    byte_order*: cint         # LSBFirst, MSBFirst 
-    guid*: array[0..15, cchar] # Globally Unique IDentifier 
-    bits_per_pixel*: cint
-    format*: cint             # XvPacked, XvPlanar 
-    num_planes*: cint         # for RGB formats only 
-    depth*: cint
-    red_mask*: cuint
-    green_mask*: cuint
-    blue_mask*: cuint         # for YUV formats only 
-    y_sample_bits*: cuint
-    u_sample_bits*: cuint
-    v_sample_bits*: cuint
-    horz_y_period*: cuint
-    horz_u_period*: cuint
-    horz_v_period*: cuint
-    vert_y_period*: cuint
-    vert_u_period*: cuint
-    vert_v_period*: cuint
-    component_order*: array[0..31, char] # eg. UYVY 
-    scanline_order*: cint     # XvTopToBottom, XvBottomToTop 
-  
-  PXvImage* = ptr TXvImage
-  TXvImage*{.final.} = object 
-    id*: cint
-    width*, height*: cint
-    data_size*: cint          # bytes 
-    num_planes*: cint
-    pitches*: pcint           # bytes 
-    offsets*: pcint           # bytes 
-    data*: pointer
-    obdata*: TXPointer
-
-
-proc XvQueryExtension*(display: PDisplay, p_version, p_revision, p_requestBase, 
-    p_eventBase, p_errorBase: pcuint): cint{.cdecl, dynlib: libXv, importc.}
-proc XvQueryAdaptors*(display: PDisplay, window: TWindow, p_nAdaptors: pcuint, 
-                      p_pAdaptors: PPXvAdaptorInfo): cint{.cdecl, dynlib: libXv, 
-    importc.}
-proc XvQueryEncodings*(display: PDisplay, port: TXvPortID, p_nEncoding: pcuint, 
-                       p_pEncoding: PPXvEncodingInfo): cint{.cdecl, 
-    dynlib: libXv, importc.}
-proc XvPutVideo*(display: PDisplay, port: TXvPortID, d: TDrawable, gc: TGC, 
-                 vx, vy: cint, vw, vh: cuint, dx, dy: cint, dw, dh: cuint): cint{.
-    cdecl, dynlib: libXv, importc.}
-proc XvPutStill*(display: PDisplay, port: TXvPortID, d: TDrawable, gc: TGC, 
-                 vx, vy: cint, vw, vh: cuint, dx, dy: cint, dw, dh: cuint): cint{.
-    cdecl, dynlib: libXv, importc.}
-proc XvGetVideo*(display: PDisplay, port: TXvPortID, d: TDrawable, gc: TGC, 
-                 vx, vy: cint, vw, vh: cuint, dx, dy: cint, dw, dh: cuint): cint{.
-    cdecl, dynlib: libXv, importc.}
-proc XvGetStill*(display: PDisplay, port: TXvPortID, d: TDrawable, gc: TGC, 
-                 vx, vy: cint, vw, vh: cuint, dx, dy: cint, dw, dh: cuint): cint{.
-    cdecl, dynlib: libXv, importc.}
-proc XvStopVideo*(display: PDisplay, port: TXvPortID, drawable: TDrawable): cint{.
-    cdecl, dynlib: libXv, importc.}
-proc XvGrabPort*(display: PDisplay, port: TXvPortID, time: TTime): cint{.cdecl, 
-    dynlib: libXv, importc.}
-proc XvUngrabPort*(display: PDisplay, port: TXvPortID, time: TTime): cint{.
-    cdecl, dynlib: libXv, importc.}
-proc XvSelectVideoNotify*(display: PDisplay, drawable: TDrawable, onoff: TBool): cint{.
-    cdecl, dynlib: libXv, importc.}
-proc XvSelectPortNotify*(display: PDisplay, port: TXvPortID, onoff: TBool): cint{.
-    cdecl, dynlib: libXv, importc.}
-proc XvSetPortAttribute*(display: PDisplay, port: TXvPortID, attribute: TAtom, 
-                         value: cint): cint{.cdecl, dynlib: libXv, importc.}
-proc XvGetPortAttribute*(display: PDisplay, port: TXvPortID, attribute: TAtom, 
-                         p_value: pcint): cint{.cdecl, dynlib: libXv, importc.}
-proc XvQueryBestSize*(display: PDisplay, port: TXvPortID, motion: TBool, 
-                      vid_w, vid_h, drw_w, drw_h: cuint, 
-                      p_actual_width, p_actual_height: pcuint): cint{.cdecl, 
-    dynlib: libXv, importc.}
-proc XvQueryPortAttributes*(display: PDisplay, port: TXvPortID, number: pcint): PXvAttribute{.
-    cdecl, dynlib: libXv, importc.}
-proc XvFreeAdaptorInfo*(adaptors: PXvAdaptorInfo){.cdecl, dynlib: libXv, importc.}
-proc XvFreeEncodingInfo*(encodings: PXvEncodingInfo){.cdecl, dynlib: libXv, 
-    importc.}
-proc XvListImageFormats*(display: PDisplay, port_id: TXvPortID, 
-                         count_return: pcint): PXvImageFormatValues{.cdecl, 
-    dynlib: libXv, importc.}
-proc XvCreateImage*(display: PDisplay, port: TXvPortID, id: cint, data: pointer, 
-                    width, height: cint): PXvImage{.cdecl, dynlib: libXv, 
-    importc.}
-proc XvPutImage*(display: PDisplay, id: TXvPortID, d: TDrawable, gc: TGC, 
-                 image: PXvImage, src_x, src_y: cint, src_w, src_h: cuint, 
-                 dest_x, dest_y: cint, dest_w, dest_h: cuint): cint{.cdecl, 
-    dynlib: libXv, importc.}
-proc XvShmPutImage*(display: PDisplay, id: TXvPortID, d: TDrawable, gc: TGC, 
-                    image: PXvImage, src_x, src_y: cint, src_w, src_h: cuint, 
-                    dest_x, dest_y: cint, dest_w, dest_h: cuint, 
-                    send_event: TBool): cint{.cdecl, dynlib: libXv, importc.}
-proc XvShmCreateImage*(display: PDisplay, port: TXvPortID, id: cint, 
-                       data: pointer, width, height: cint, 
-                       shminfo: PXShmSegmentInfo): PXvImage{.cdecl, 
-    dynlib: libXv, importc.}
-# implementation