x11 0.0.1a2 → 0.0.1a3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. data/lib/X11/X.rb +14 -9
  2. data/lib/X11/X/c.rb +21 -20
  3. data/lib/X11/XKBlib.rb +29 -0
  4. data/lib/X11/Xatom.rb +152 -136
  5. data/lib/X11/Xatom/c.rb +15 -15
  6. data/lib/X11/Xdefs.rb +7 -7
  7. data/lib/X11/Xdefs/c.rb +20 -20
  8. data/lib/X11/Xlib.rb +19 -7
  9. data/lib/X11/Xlib/c.rb +21 -8
  10. data/lib/X11/Xlib/c/functions.rb +373 -27
  11. data/lib/X11/Xlib/c/type/any_event.rb +13 -13
  12. data/lib/X11/Xlib/c/type/button_event.rb +23 -23
  13. data/lib/X11/Xlib/c/type/circulate_event.rb +15 -15
  14. data/lib/X11/Xlib/c/type/circulate_request_event.rb +15 -15
  15. data/lib/X11/Xlib/c/type/client_message_event.rb +22 -22
  16. data/lib/X11/Xlib/c/type/colormap_event.rb +16 -16
  17. data/lib/X11/Xlib/c/type/configure_event.rb +21 -21
  18. data/lib/X11/Xlib/c/type/configure_request_event.rb +22 -22
  19. data/lib/X11/Xlib/c/type/create_window_event.rb +20 -20
  20. data/lib/X11/Xlib/c/type/crossing_event.rb +25 -25
  21. data/lib/X11/Xlib/c/type/destroy_window_event.rb +14 -14
  22. data/lib/X11/Xlib/c/type/display.rb +52 -52
  23. data/lib/X11/Xlib/c/type/error_event.rb +15 -15
  24. data/lib/X11/Xlib/c/type/event.rb +43 -43
  25. data/lib/X11/Xlib/c/type/expose_event.rb +18 -18
  26. data/lib/X11/Xlib/c/type/focus_change_event.rb +15 -15
  27. data/lib/X11/Xlib/c/type/gc.rb +10 -10
  28. data/lib/X11/Xlib/c/type/gc_values.rb +54 -0
  29. data/lib/X11/Xlib/c/type/generic_event.rb +14 -14
  30. data/lib/X11/Xlib/c/type/generic_event_cookie.rb +16 -16
  31. data/lib/X11/Xlib/c/type/graphics_expose_event.rb +21 -21
  32. data/lib/X11/Xlib/c/type/gravity_event.rb +16 -16
  33. data/lib/X11/Xlib/c/type/image.rb +56 -0
  34. data/lib/X11/Xlib/c/type/key_event.rb +23 -23
  35. data/lib/X11/Xlib/c/type/key_sym.rb +15 -15
  36. data/lib/X11/Xlib/c/type/keymap_event.rb +14 -14
  37. data/lib/X11/Xlib/c/type/map_event.rb +15 -15
  38. data/lib/X11/Xlib/c/type/map_request_event.rb +18 -18
  39. data/lib/X11/Xlib/c/type/mapping_event.rb +16 -16
  40. data/lib/X11/Xlib/c/type/motion_event.rb +23 -23
  41. data/lib/X11/Xlib/c/type/no_expose_event.rb +15 -15
  42. data/lib/X11/Xlib/c/type/point.rb +33 -0
  43. data/lib/X11/Xlib/c/type/property_event.rb +16 -16
  44. data/lib/X11/Xlib/c/type/reparent_event.rb +18 -18
  45. data/lib/X11/Xlib/c/type/resize_request_event.rb +15 -15
  46. data/lib/X11/Xlib/c/type/screen.rb +27 -27
  47. data/lib/X11/Xlib/c/type/selection_clear_event.rb +15 -15
  48. data/lib/X11/Xlib/c/type/selection_event.rb +17 -17
  49. data/lib/X11/Xlib/c/type/selection_request_event.rb +18 -18
  50. data/lib/X11/Xlib/c/type/status.rb +15 -15
  51. data/lib/X11/Xlib/c/type/unmap_event.rb +15 -15
  52. data/lib/X11/Xlib/c/type/visibility_event.rb +14 -14
  53. data/lib/X11/Xlib/c/type/visual.rb +16 -16
  54. data/lib/X11/Xlib/c/type/window_attributes.rb +31 -31
  55. data/lib/X11/Xlib/c/types.rb +9 -7
  56. data/lib/X11/Xlib/display.rb +257 -174
  57. data/lib/X11/Xlib/display/extensions.rb +56 -0
  58. data/lib/X11/Xlib/drawable.rb +48 -0
  59. data/lib/X11/Xlib/error.rb +100 -0
  60. data/lib/X11/Xlib/event.rb +66 -37
  61. data/lib/X11/Xlib/event/any.rb +8 -10
  62. data/lib/X11/Xlib/event/button_press.rb +9 -20
  63. data/lib/X11/Xlib/event/button_release.rb +9 -20
  64. data/lib/X11/Xlib/event/circulate_notify.rb +11 -12
  65. data/lib/X11/Xlib/event/circulate_request.rb +11 -12
  66. data/lib/X11/Xlib/event/client_message.rb +11 -13
  67. data/lib/X11/Xlib/event/colormap_notify.rb +12 -13
  68. data/lib/X11/Xlib/event/configure_notify.rb +17 -18
  69. data/lib/X11/Xlib/event/configure_request.rb +18 -19
  70. data/lib/X11/Xlib/event/create_notify.rb +16 -17
  71. data/lib/X11/Xlib/event/destroy_notify.rb +10 -11
  72. data/lib/X11/Xlib/event/enter_notify.rb +10 -8
  73. data/lib/X11/Xlib/event/expose.rb +15 -16
  74. data/lib/X11/Xlib/event/focus_in.rb +9 -12
  75. data/lib/X11/Xlib/event/focus_out.rb +9 -12
  76. data/lib/X11/Xlib/event/generic.rb +35 -0
  77. data/lib/X11/Xlib/event/generic/button.rb +46 -0
  78. data/lib/X11/Xlib/event/generic/crossing.rb +48 -0
  79. data/lib/X11/Xlib/{window/properties/property/class.rb → event/generic/focus_change.rb} +16 -14
  80. data/lib/X11/Xlib/event/generic/key.rb +46 -0
  81. data/lib/X11/Xlib/event/generic/motion.rb +46 -0
  82. data/lib/X11/Xlib/event/generic_event.rb +12 -14
  83. data/lib/X11/Xlib/event/graphics_expose.rb +15 -14
  84. data/lib/X11/Xlib/event/gravity_notify.rb +12 -13
  85. data/lib/X11/Xlib/event/helper.rb +123 -91
  86. data/lib/X11/Xlib/event/key_press.rb +9 -20
  87. data/lib/X11/Xlib/event/key_release.rb +9 -20
  88. data/lib/X11/Xlib/event/keymap_notify.rb +13 -14
  89. data/lib/X11/Xlib/event/leave_notify.rb +10 -20
  90. data/lib/X11/Xlib/event/map_notify.rb +11 -12
  91. data/lib/X11/Xlib/event/map_request.rb +10 -11
  92. data/lib/X11/Xlib/event/mapping_notify.rb +11 -13
  93. data/lib/X11/Xlib/event/motion_notify.rb +10 -20
  94. data/lib/X11/Xlib/event/no_expose.rb +8 -9
  95. data/lib/X11/Xlib/event/property_notify.rb +12 -13
  96. data/lib/X11/Xlib/event/reparent_notify.rb +14 -15
  97. data/lib/X11/Xlib/event/resize_request.rb +11 -12
  98. data/lib/X11/Xlib/event/selection_clear.rb +10 -12
  99. data/lib/X11/Xlib/event/selection_notify.rb +13 -15
  100. data/lib/X11/Xlib/event/selection_request.rb +14 -16
  101. data/lib/X11/Xlib/event/unmap_notify.rb +11 -12
  102. data/lib/X11/Xlib/event/visibility_notify.rb +10 -11
  103. data/lib/X11/Xlib/events.rb +11 -7
  104. data/lib/X11/Xlib/exceptions.rb +10 -10
  105. data/lib/X11/Xlib/graphic_context.rb +69 -0
  106. data/lib/X11/Xlib/graphic_context/functions.rb +50 -0
  107. data/lib/X11/Xlib/{window/properties/property/command.rb → graphic_context/values.rb} +17 -13
  108. data/lib/X11/Xlib/hints.rb +19 -18
  109. data/lib/X11/Xlib/hints/flags.rb +15 -15
  110. data/lib/X11/Xlib/hints/icon.rb +14 -16
  111. data/lib/X11/Xlib/id.rb +75 -0
  112. data/lib/X11/Xlib/image.rb +64 -0
  113. data/lib/X11/Xlib/keysym.rb +53 -26
  114. data/lib/X11/Xlib/mask.rb +81 -55
  115. data/lib/X11/Xlib/pixmap.rb +60 -0
  116. data/lib/X11/Xlib/planes.rb +50 -0
  117. data/lib/X11/Xlib/revert_to.rb +10 -10
  118. data/lib/X11/Xlib/screen.rb +48 -31
  119. data/lib/X11/Xlib/status.rb +56 -56
  120. data/lib/X11/Xlib/transform.rb +25 -25
  121. data/lib/X11/Xlib/visual.rb +19 -19
  122. data/lib/X11/Xlib/window.rb +399 -188
  123. data/lib/X11/Xlib/window/attributes.rb +74 -41
  124. data/lib/X11/Xlib/window/properties.rb +57 -38
  125. data/lib/X11/Xlib/window/properties/property.rb +135 -70
  126. data/lib/X11/Xlib/window/properties/property/net_virtual_root.rb +13 -13
  127. data/lib/X11/Xlib/window/properties/property/parser.rb +45 -35
  128. data/lib/X11/Xlib/window/properties/property/parser/arc.rb +18 -16
  129. data/lib/X11/Xlib/window/properties/property/parser/atom.rb +14 -10
  130. data/lib/X11/Xlib/window/properties/property/parser/cardinal.rb +14 -9
  131. data/lib/X11/Xlib/window/properties/property/parser/hints.rb +17 -16
  132. data/lib/X11/Xlib/window/properties/property/parser/integer.rb +39 -0
  133. data/lib/X11/Xlib/window/properties/property/parser/state.rb +39 -0
  134. data/lib/X11/Xlib/window/properties/property/parser/string.rb +59 -0
  135. data/lib/X11/Xlib/window/properties/property/parser/window.rb +39 -0
  136. data/lib/X11/Xmd.rb +7 -7
  137. data/lib/X11/Xmd/c.rb +19 -19
  138. data/lib/X11/Xregion.rb +32 -0
  139. data/lib/X11/Xregion/c.rb +29 -0
  140. data/lib/X11/Xregion/c/type/box.rb +35 -0
  141. data/lib/X11/Xregion/c/type/point_block.rb +33 -0
  142. data/lib/X11/Xregion/c/type/rectangle.rb +35 -0
  143. data/lib/X11/Xregion/c/type/region.rb +35 -0
  144. data/lib/X11/Xregion/c/types.rb +32 -0
  145. data/lib/X11/Xutil.rb +12 -17
  146. data/lib/X11/Xutil/c.rb +7 -10
  147. data/lib/X11/Xutil/c/functions.rb +7 -7
  148. data/lib/X11/Xutil/c/type/class_hint.rb +10 -10
  149. data/lib/X11/Xutil/c/type/region.rb +31 -0
  150. data/lib/X11/Xutil/c/type/text_property.rb +12 -12
  151. data/lib/X11/Xutil/c/types.rb +8 -7
  152. data/lib/X11/Xutil/state.rb +43 -0
  153. data/lib/X11/Xutil/window.rb +28 -28
  154. data/lib/X11/cursorfont.rb +7 -7
  155. data/lib/X11/cursorfont/c.rb +8 -8
  156. data/lib/X11/cursorfont/font.rb +113 -113
  157. data/lib/X11/extension.rb +65 -0
  158. data/lib/X11/extensions.rb +105 -126
  159. data/lib/X11/extensions/Xrandr.rb +49 -0
  160. data/lib/X11/extensions/Xrandr/c.rb +30 -0
  161. data/lib/X11/extensions/Xrandr/c/functions.rb +106 -0
  162. data/lib/X11/extensions/Xrandr/c/type/crtc_gamma.rb +35 -0
  163. data/lib/X11/extensions/Xrandr/c/type/crtc_info.rb +43 -0
  164. data/lib/X11/extensions/Xrandr/c/type/crtc_transform_attributes.rb +39 -0
  165. data/lib/X11/extensions/Xrandr/c/type/mode_info.rb +45 -0
  166. data/lib/X11/extensions/Xrandr/c/type/output_info.rb +46 -0
  167. data/lib/X11/extensions/Xrandr/c/type/panning.rb +44 -0
  168. data/lib/X11/extensions/Xrandr/c/type/property_info.rb +36 -0
  169. data/lib/X11/extensions/Xrandr/c/type/screen_resources.rb +39 -0
  170. data/lib/X11/extensions/Xrandr/c/type/screen_size.rb +35 -0
  171. data/lib/X11/extensions/Xrandr/c/types.rb +48 -0
  172. data/lib/X11/extensions/Xrandr/crtc.rb +70 -0
  173. data/lib/X11/extensions/Xrandr/crtc/gamma.rb +100 -0
  174. data/lib/X11/extensions/Xrandr/crtc/info.rb +62 -0
  175. data/lib/X11/extensions/Xrandr/crtc/panning.rb +74 -0
  176. data/lib/X11/extensions/Xrandr/event.rb +29 -0
  177. data/lib/X11/extensions/Xrandr/output.rb +59 -0
  178. data/lib/X11/extensions/Xrandr/output/info.rb +105 -0
  179. data/lib/X11/extensions/Xrandr/output/properties.rb +78 -0
  180. data/lib/X11/extensions/Xrandr/output/properties/property.rb +161 -0
  181. data/lib/X11/extensions/Xrandr/output/properties/property/info.rb +73 -0
  182. data/lib/X11/extensions/Xrandr/output/properties/property/parser.rb +73 -0
  183. data/lib/X11/extensions/Xrandr/output/properties/property/parser/atom.rb +39 -0
  184. data/lib/X11/extensions/Xrandr/output/properties/property/parser/integer.rb +43 -0
  185. data/lib/X11/extensions/Xrandr/screen.rb +49 -0
  186. data/lib/X11/extensions/Xrandr/screen/backlight.rb +76 -0
  187. data/lib/X11/extensions/Xrandr/screen_resources.rb +81 -0
  188. data/lib/X11/extensions/Xrandr/window.rb +41 -0
  189. data/lib/X11/extensions/Xrender.rb +34 -0
  190. data/lib/X11/extensions/Xrender/c.rb +30 -0
  191. data/lib/X11/extensions/Xrender/c/functions.rb +50 -0
  192. data/lib/X11/extensions/Xrender/c/type/anim_cursor.rb +33 -0
  193. data/lib/X11/extensions/Xrender/c/type/circle.rb +34 -0
  194. data/lib/X11/extensions/Xrender/c/type/conical_gradient.rb +33 -0
  195. data/lib/X11/extensions/Xrender/c/type/filters.rb +35 -0
  196. data/lib/X11/extensions/Xrender/c/type/glyph_elt16.rb +36 -0
  197. data/lib/X11/extensions/Xrender/c/type/glyph_elt32.rb +36 -0
  198. data/lib/X11/extensions/Xrender/c/type/glyph_elt8.rb +36 -0
  199. data/lib/X11/extensions/Xrender/c/type/glyph_info.rb +37 -0
  200. data/lib/X11/extensions/Xrender/c/type/index_value.rb +36 -0
  201. data/lib/X11/extensions/Xrender/c/type/line_fixed.rb +33 -0
  202. data/lib/X11/extensions/Xrender/c/type/linear_gradient.rb +33 -0
  203. data/lib/X11/extensions/Xrender/c/type/point_double.rb +33 -0
  204. data/lib/X11/extensions/Xrender/c/type/point_fixed.rb +33 -0
  205. data/lib/X11/extensions/Xrender/c/type/radial_gradient.rb +33 -0
  206. data/lib/X11/extensions/Xrender/c/type/render_color.rb +35 -0
  207. data/lib/X11/extensions/Xrender/c/type/render_direct_format.rb +39 -0
  208. data/lib/X11/extensions/Xrender/c/type/render_pict_format.rb +36 -0
  209. data/lib/X11/extensions/Xrender/c/type/render_picture_attributes.rb +44 -0
  210. data/lib/X11/extensions/Xrender/c/type/span_fix.rb +34 -0
  211. data/lib/X11/extensions/Xrender/c/type/transform.rb +32 -0
  212. data/lib/X11/extensions/Xrender/c/type/trap.rb +33 -0
  213. data/lib/X11/extensions/Xrender/c/type/trapezoid.rb +35 -0
  214. data/lib/X11/extensions/Xrender/c/type/triangle.rb +34 -0
  215. data/lib/X11/extensions/Xrender/c/types.rb +56 -0
  216. data/lib/X11/extensions/Xrender/mask.rb +48 -0
  217. data/lib/X11/extensions/randr.rb +29 -0
  218. data/lib/X11/extensions/randr/c.rb +38 -0
  219. data/lib/X11/extensions/render.rb +29 -0
  220. data/lib/X11/extensions/render/c.rb +34 -0
  221. data/lib/X11/extensions/xf86vmode.rb +42 -0
  222. data/lib/X11/extensions/xf86vmode/c.rb +30 -0
  223. data/lib/X11/extensions/xf86vmode/c/functions.rb +59 -0
  224. data/lib/X11/extensions/xf86vmode/c/type/gamma.rb +34 -0
  225. data/lib/X11/extensions/xf86vmode/c/type/mode_info.rb +44 -0
  226. data/lib/X11/extensions/xf86vmode/c/type/mode_line.rb +43 -0
  227. data/lib/X11/extensions/xf86vmode/c/type/monitor.rb +38 -0
  228. data/lib/X11/extensions/xf86vmode/c/type/sync_range.rb +33 -0
  229. data/lib/X11/extensions/xf86vmode/c/types.rb +36 -0
  230. data/lib/X11/extensions/xf86vmode/screen.rb +53 -0
  231. data/lib/X11/extensions/xf86vmode/screen/gamma.rb +79 -0
  232. data/lib/X11/extensions/xf86vmode/screen/gamma/ramp.rb +86 -0
  233. data/lib/X11/keysym.rb +7 -25
  234. data/lib/X11/misc/temperature.rb +458 -0
  235. data/lib/X11/simple.rb +8 -7
  236. data/lib/X11/simple/display.rb +35 -37
  237. data/lib/X11/simple/window.rb +39 -19
  238. data/lib/X11/window_manager.rb +32 -0
  239. data/lib/X11/window_manager/desktops.rb +82 -0
  240. data/lib/X11/window_manager/desktops/desktop.rb +78 -0
  241. data/lib/X11/window_manager/supports.rb +56 -0
  242. data/lib/X11/window_manager/supports/feature.rb +46 -0
  243. data/lib/X11/window_manager/window.rb +102 -0
  244. data/lib/X11/window_manager/window_manager.rb +73 -0
  245. metadata +216 -66
@@ -1,26 +1,26 @@
1
1
  #--
2
2
  # Copyleft meh. [http://meh.paranoid.pk | meh@paranoici.org]
3
- #
3
+ #
4
4
  # Redistribution and use in source and binary forms, with or without modification, are
5
5
  # permitted provided that the following conditions are met:
6
- #
6
+ #
7
7
  # 1. Redistributions of source code must retain the above copyright notice, this list of
8
8
  # conditions and the following disclaimer.
9
- #
9
+ #
10
10
  # 2. Redistributions in binary form must reproduce the above copyright notice, this list
11
11
  # of conditions and the following disclaimer in the documentation and/or other materials
12
12
  # provided with the distribution.
13
- #
14
- # THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ''AS IS'' AND ANY EXPRESS OR IMPLIED
13
+ #
14
+ # THIS SOFTWARE IS PROVIDED BY meh ''AS IS'' AND ANY EXPRESS OR IMPLIED
15
15
  # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
16
- # FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR
16
+ # FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL meh OR
17
17
  # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
18
  # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
19
19
  # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20
20
  # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
21
21
  # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
22
22
  # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
- #
23
+ #
24
24
  # The views and conclusions contained in the software and documentation are those of the
25
25
  # authors and should not be interpreted as representing official policies, either expressed
26
26
  # or implied.
@@ -31,17 +31,17 @@ require 'X11/Xdefs'
31
31
  module X11; module C
32
32
 
33
33
  module Atom
34
- extend FFI::DataConverter
34
+ extend FFI::DataConverter
35
35
 
36
- native_type :ulong
36
+ native_type :ulong
37
37
 
38
- def self.to_native (value, ctx)
39
- value.to_ffi
40
- end
38
+ def self.to_native (value, ctx)
39
+ value.to_ffi
40
+ end
41
41
 
42
- def self.from_native (value, ctx)
43
- X11::Atom.new(value)
44
- end
42
+ def self.from_native (value, ctx)
43
+ X11::Atom.new(value)
44
+ end
45
45
  end
46
46
 
47
47
  FFI.typedef Atom, :Atom
@@ -1,26 +1,26 @@
1
1
  #--
2
2
  # Copyleft meh. [http://meh.paranoid.pk | meh@paranoici.org]
3
- #
3
+ #
4
4
  # Redistribution and use in source and binary forms, with or without modification, are
5
5
  # permitted provided that the following conditions are met:
6
- #
6
+ #
7
7
  # 1. Redistributions of source code must retain the above copyright notice, this list of
8
8
  # conditions and the following disclaimer.
9
- #
9
+ #
10
10
  # 2. Redistributions in binary form must reproduce the above copyright notice, this list
11
11
  # of conditions and the following disclaimer in the documentation and/or other materials
12
12
  # provided with the distribution.
13
- #
14
- # THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ''AS IS'' AND ANY EXPRESS OR IMPLIED
13
+ #
14
+ # THIS SOFTWARE IS PROVIDED BY meh ''AS IS'' AND ANY EXPRESS OR IMPLIED
15
15
  # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
16
- # FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR
16
+ # FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL meh OR
17
17
  # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
18
  # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
19
19
  # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20
20
  # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
21
21
  # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
22
22
  # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
- #
23
+ #
24
24
  # The views and conclusions contained in the software and documentation are those of the
25
25
  # authors and should not be interpreted as representing official policies, either expressed
26
26
  # or implied.
@@ -1,26 +1,26 @@
1
1
  #--
2
2
  # Copyleft meh. [http://meh.paranoid.pk | meh@paranoici.org]
3
- #
3
+ #
4
4
  # Redistribution and use in source and binary forms, with or without modification, are
5
5
  # permitted provided that the following conditions are met:
6
- #
6
+ #
7
7
  # 1. Redistributions of source code must retain the above copyright notice, this list of
8
8
  # conditions and the following disclaimer.
9
- #
9
+ #
10
10
  # 2. Redistributions in binary form must reproduce the above copyright notice, this list
11
11
  # of conditions and the following disclaimer in the documentation and/or other materials
12
12
  # provided with the distribution.
13
- #
14
- # THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ''AS IS'' AND ANY EXPRESS OR IMPLIED
13
+ #
14
+ # THIS SOFTWARE IS PROVIDED BY meh ''AS IS'' AND ANY EXPRESS OR IMPLIED
15
15
  # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
16
- # FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR
16
+ # FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL meh OR
17
17
  # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
18
  # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
19
19
  # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20
20
  # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
21
21
  # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
22
22
  # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
- #
23
+ #
24
24
  # The views and conclusions contained in the software and documentation are those of the
25
25
  # authors and should not be interpreted as representing official policies, either expressed
26
26
  # or implied.
@@ -34,25 +34,25 @@ module X11; module C
34
34
  ffi_lib_add 'X11'
35
35
 
36
36
  module Bool
37
- extend FFI::DataConverter
37
+ extend FFI::DataConverter
38
38
 
39
- native_type :int
39
+ native_type :int
40
40
 
41
- def self.to_native (value, ctx)
42
- value ? 1 : 0
43
- end
41
+ def self.to_native (value, ctx)
42
+ value ? 1 : 0
43
+ end
44
44
 
45
- def self.from_native (value, ctx)
46
- !value.zero?
47
- end
45
+ def self.from_native (value, ctx)
46
+ !value.zero?
47
+ end
48
48
  end
49
49
 
50
50
  module ::FFI
51
- typedef Bool, :Bool
52
- typedef :ulong, :XID
53
- typedef :ulong, :Mask
54
- typedef :XID, :Font
55
- typedef :ulong, :FSID
51
+ typedef Bool, :Bool
52
+ typedef :ulong, :XID
53
+ typedef :ulong, :Mask
54
+ typedef :XID, :Font
55
+ typedef :ulong, :FSID
56
56
  end
57
57
 
58
58
  end; end
@@ -1,43 +1,55 @@
1
1
  #--
2
2
  # Copyleft meh. [http://meh.paranoid.pk | meh@paranoici.org]
3
- #
3
+ #
4
4
  # Redistribution and use in source and binary forms, with or without modification, are
5
5
  # permitted provided that the following conditions are met:
6
- #
6
+ #
7
7
  # 1. Redistributions of source code must retain the above copyright notice, this list of
8
8
  # conditions and the following disclaimer.
9
- #
9
+ #
10
10
  # 2. Redistributions in binary form must reproduce the above copyright notice, this list
11
11
  # of conditions and the following disclaimer in the documentation and/or other materials
12
12
  # provided with the distribution.
13
- #
14
- # THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ''AS IS'' AND ANY EXPRESS OR IMPLIED
13
+ #
14
+ # THIS SOFTWARE IS PROVIDED BY meh ''AS IS'' AND ANY EXPRESS OR IMPLIED
15
15
  # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
16
- # FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR
16
+ # FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL meh OR
17
17
  # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
18
  # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
19
19
  # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20
20
  # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
21
21
  # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
22
22
  # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
- #
23
+ #
24
24
  # The views and conclusions contained in the software and documentation are those of the
25
25
  # authors and should not be interpreted as representing official policies, either expressed
26
26
  # or implied.
27
27
  #++
28
28
 
29
+ require 'X11/X'
30
+
29
31
  require 'X11/Xlib/exceptions'
30
32
  require 'X11/Xlib/transform'
31
33
 
32
34
  require 'X11/Xlib/c'
35
+ require 'X11/Xlib/error'
33
36
 
34
37
  require 'X11/Xlib/display'
35
38
  require 'X11/Xlib/screen'
39
+ require 'X11/Xlib/id'
40
+ require 'X11/Xlib/drawable'
36
41
  require 'X11/Xlib/window'
42
+ require 'X11/Xlib/pixmap'
37
43
  require 'X11/Xlib/visual'
38
44
  require 'X11/Xlib/keysym'
45
+ require 'X11/Xlib/hints'
46
+ require 'X11/Xlib/image'
47
+ require 'X11/Xlib/graphic_context'
39
48
 
40
49
  require 'X11/Xlib/status'
41
50
  require 'X11/Xlib/event'
42
51
  require 'X11/Xlib/mask'
43
52
  require 'X11/Xlib/revert_to'
53
+ require 'X11/Xlib/planes'
54
+
55
+ require 'X11/Xutil'
@@ -1,26 +1,26 @@
1
1
  #--
2
2
  # Copyleft meh. [http://meh.paranoid.pk | meh@paranoici.org]
3
- #
3
+ #
4
4
  # Redistribution and use in source and binary forms, with or without modification, are
5
5
  # permitted provided that the following conditions are met:
6
- #
6
+ #
7
7
  # 1. Redistributions of source code must retain the above copyright notice, this list of
8
8
  # conditions and the following disclaimer.
9
- #
9
+ #
10
10
  # 2. Redistributions in binary form must reproduce the above copyright notice, this list
11
11
  # of conditions and the following disclaimer in the documentation and/or other materials
12
12
  # provided with the distribution.
13
- #
14
- # THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ''AS IS'' AND ANY EXPRESS OR IMPLIED
13
+ #
14
+ # THIS SOFTWARE IS PROVIDED BY meh ''AS IS'' AND ANY EXPRESS OR IMPLIED
15
15
  # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
16
- # FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR
16
+ # FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL meh OR
17
17
  # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
18
  # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
19
19
  # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20
20
  # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
21
21
  # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
22
22
  # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
- #
23
+ #
24
24
  # The views and conclusions contained in the software and documentation are those of the
25
25
  # authors and should not be interpreted as representing official policies, either expressed
26
26
  # or implied.
@@ -29,7 +29,20 @@
29
29
  require 'X11/extensions'
30
30
 
31
31
  module X11; module C
32
- ffi_lib_add 'X11'
32
+ ffi_lib_add 'X11'
33
+
34
+ refine_singleton_method :attach_function do |old, name, *rest|
35
+ old.call(name, *rest)
36
+
37
+ refine_singleton_method name do |old, *args, &block|
38
+ old.call(*args, &block).tap {
39
+ # XXX: this is an ugly hack while we wait for FFI.raise
40
+ if error = X11::Error.pop
41
+ raise error
42
+ end
43
+ }
44
+ end
45
+ end
33
46
  end; end
34
47
 
35
48
  require 'X11/Xlib/c/types'
@@ -1,26 +1,26 @@
1
1
  #--
2
2
  # Copyleft meh. [http://meh.paranoid.pk | meh@paranoici.org]
3
- #
3
+ #
4
4
  # Redistribution and use in source and binary forms, with or without modification, are
5
5
  # permitted provided that the following conditions are met:
6
- #
6
+ #
7
7
  # 1. Redistributions of source code must retain the above copyright notice, this list of
8
8
  # conditions and the following disclaimer.
9
- #
9
+ #
10
10
  # 2. Redistributions in binary form must reproduce the above copyright notice, this list
11
11
  # of conditions and the following disclaimer in the documentation and/or other materials
12
12
  # provided with the distribution.
13
- #
14
- # THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ''AS IS'' AND ANY EXPRESS OR IMPLIED
13
+ #
14
+ # THIS SOFTWARE IS PROVIDED BY meh ''AS IS'' AND ANY EXPRESS OR IMPLIED
15
15
  # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
16
- # FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR
16
+ # FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL meh OR
17
17
  # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
18
  # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
19
19
  # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20
20
  # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
21
21
  # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
22
22
  # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
- #
23
+ #
24
24
  # The views and conclusions contained in the software and documentation are those of the
25
25
  # authors and should not be interpreted as representing official policies, either expressed
26
26
  # or implied.
@@ -28,42 +28,388 @@
28
28
 
29
29
  module X11; module C
30
30
 
31
- attach_function :XFree, [:pointer], :int
31
+ attach_function :XLoadQueryFont, [:pointer, :string], :pointer
32
+ attach_function :XQueryFont, [:pointer, :XID], :pointer
33
+
34
+ attach_function :XGetMotionEvents, [:pointer, :Window, :Time, :Time, :pointer], :pointer
35
+
36
+ attach_function :XDeleteModifiermapEntry, [:pointer, :KeyCode, :int], :pointer
37
+ attach_function :XGetModifierMapping, [:pointer], :pointer
38
+ attach_function :XInsertModifiermapEntry, [:pointer, :KeyCode, :int], :pointer
39
+ attach_function :XNewModifiermap, [:int], :pointer
40
+
41
+ attach_function :XCreateImage, [:pointer, :pointer, :uint, :int, :int, :pointer, :int, :int, :int, :int], :pointer
42
+ attach_function :XInitImage, [:pointer], :Status
43
+ attach_function :XGetImage, [:pointer, :Drawable, :int, :int, :uint, :uint, :ulong, :int], :pointer
44
+ attach_function :XGetSubImage, [:pointer, :Drawable, :int, :int, :uint, :uint, :ulong, :int, :pointer, :int, :int], :pointer
32
45
 
33
46
  attach_function :XOpenDisplay, [:string], :pointer
47
+ attach_function :XrmInitialize, [], :void
48
+
49
+ attach_function :XFetchBytes, [:pointer, :int], :pointer
50
+ attach_function :XFetchBuffer, [:pointer, :pointer, :int], :pointer
51
+
52
+ attach_function :XGetAtomName, [:pointer, :Atom], :string
53
+ attach_function :XGetAtomNames, [:pointer, :pointer, :int, :pointer], :Status
54
+
55
+ attach_function :XGetDefault, [:pointer, :string, :string], :string
56
+ attach_function :XDisplayName, [:string], :string
57
+
58
+ attach_function :XKeysymToString, [:KeySym], :string
59
+
60
+ attach_function :XInternAtom, [:pointer, :string, :Bool], :Atom
61
+ attach_function :XInternAtoms, [:pointer, :pointer, :int, :Bool, :pointer], :Status
62
+
63
+ attach_function :XCopyColormapAndFree, [:pointer, :Colormap], :Colormap
64
+ attach_function :XCreateColormap, [:pointer, :Window, :pointer, :int], :Colormap
65
+
66
+ attach_function :XCreatePixmapCursor, [:pointer, :Pixmap, :Pixmap, :pointer, :pointer, :uint, :uint], :Cursor
67
+ attach_function :XCreateGlyphCursor, [:pointer, :Font, :Font, :uint, :uint, :pointer, :pointer], :Cursor
68
+ attach_function :XCreateFontCursor, [:pointer, :uint], :Cursor
69
+
70
+ attach_function :XLoadFont, [:pointer, :string], :Font
71
+
72
+ attach_function :XCreateGC, [:pointer, :Drawable, :ulong, :pointer], :GC
73
+ attach_function :XGContextFromGC, [:GC], :GContext
74
+ attach_function :XFlushGC, [:pointer, :GC], :void
75
+
76
+ attach_function :XCreatePixmap, [:pointer, :Drawable, :uint, :uint, :uint], :Pixmap
77
+ attach_function :XCreateBitmapFromData, [:pointer, :Drawable, :pointer, :int, :int], :Pixmap
78
+ attach_function :XCreatePixmapFromBitmapData, [:pointer, :Drawable, :pointer, :uint, :uint, :ulong, :ulong, :uint], :Pixmap
79
+
80
+ attach_function :XCreateSimpleWindow, [:pointer, :Window, :int, :int, :uint, :uint, :uint, :ulong, :ulong], :Window
81
+ attach_function :XGetSelectionOwner, [:pointer, :Atom], :Window
82
+ attach_function :XCreateWindow, [:pointer, :Window, :int, :int, :uint, :uint, :uint, :int, :uint, :pointer, :ulong, :pointer], :Window
83
+
84
+ attach_function :XListInstalledColormaps, [:pointer, :Window, :pointer], :pointer
85
+ attach_function :XListFonts, [:pointer, :string, :int, :pointer], :pointer
86
+ attach_function :XListFontsWithInfo, [:pointer, :string, :int, :pointer, :pointer], :pointer
87
+ attach_function :XGetFontPath, [:pointer, :int], :pointer
88
+ attach_function :XListExtensions, [:pointer, :pointer], :pointer
89
+ attach_function :XListProperties, [:pointer, :Window, :pointer], :pointer
90
+ attach_function :XListHosts, [:pointer, :pointer, :pointer], :pointer
91
+
92
+ attach_function :XKeycodeToKeysym, [:pointer, :KeyCode, :int], :KeySym
93
+ attach_function :XLookupKeysym, [:pointer, :int], :KeySym
94
+ attach_function :XGetKeyboardMapping, [:pointer, :KeyCode, :int, :pointer], :pointer
95
+ attach_function :XStringToKeysym, [:string], :KeySym
96
+
97
+ attach_function :XMaxRequestSize, [:pointer], :long
98
+ attach_function :XExtendedMaxRequestSize, [:pointer], :long
99
+
100
+ attach_function :XResourceManagerString, [:pointer], :string
101
+ attach_function :XScreenResourceString, [:pointer], :string
102
+
103
+ attach_function :XDisplayMotionBufferSize, [:pointer], :ulong
104
+
105
+ attach_function :XVisualIDFromVisual, [:pointer], :VisualID
106
+
107
+ # multithread routines
108
+ attach_function :XInitThreads, [], :Status
109
+ attach_function :XLockDisplay, [:pointer], :void
110
+ attach_function :XUnlockDisplay, [:pointer], :void
111
+
112
+ # routines for dealing with extensions
113
+ attach_function :XInitExtension, [:pointer, :string], :pointer
114
+ attach_function :XAddExtension, [:pointer], :pointer
115
+ attach_function :XFindOnExtensionList, [:pointer, :int], :pointer
116
+ #attach_function :XEHeadOfExtensionList, [XEDataObject], :pointer
117
+
118
+ # these are routines for which there are also macros
119
+ attach_function :XRootWindow, [:pointer, :int], :Window
120
+ attach_function :XDefaultRootWindow, [:pointer], :Window
121
+ attach_function :XRootWindowOfScreen, [:pointer], :Window
122
+ attach_function :XDefaultVisual, [:pointer, :int], :pointer
123
+ attach_function :XDefaultVisualOfScreen, [:pointer], :pointer
124
+ attach_function :XDefaultGC, [:pointer, :int], :GC
125
+ attach_function :XDefaultGCOfScreen, [:pointer], :GC
126
+ attach_function :XBlackPixel, [:pointer, :int], :ulong
127
+ attach_function :XWhitePixel, [:pointer, :int], :ulong
128
+ attach_function :XAllPlanes, [], :ulong
129
+ attach_function :XBlackPixelOfScreen, [:pointer], :ulong
130
+ attach_function :XWhitePixelOfScreen, [:pointer], :ulong
131
+ attach_function :XNextRequest, [:pointer], :ulong
132
+ attach_function :XLastKnownRequestProcessed, [:pointer], :ulong
133
+ attach_function :XServerVendor, [:pointer], :string
134
+ attach_function :XDisplayString, [:pointer], :string
135
+ attach_function :XDefaultColormap, [:pointer, :int], :Colormap
136
+ attach_function :XDefaultColormapOfScreen, [:pointer], :Colormap
137
+ attach_function :XDisplayOfScreen, [:pointer], :pointer
138
+ attach_function :XScreenOfDisplay, [:pointer, :int], :pointer
139
+ attach_function :XDefaultScreenOfDisplay, [:pointer], :pointer
140
+ attach_function :XEventMaskOfScreen, [:pointer], :long
141
+ attach_function :XScreenNumberOfScreen, [:pointer], :int
142
+
143
+ attach_function :XSetErrorHandler, [:pointer], :pointer
144
+ attach_function :XSetIOErrorHandler, [:pointer], :pointer
145
+
146
+ attach_function :XListPixmapFormats, [:pointer, :pointer], :pointer
147
+ attach_function :XListDepths, [:pointer, :int, :pointer], :pointer
148
+
149
+ # ICCCM routines for things that don't require special include files
150
+ attach_function :XReconfigureWMWindow, [:pointer, :Window, :int, :uint, :pointer], :Status
151
+ attach_function :XGetWMProtocols, [:pointer, :Window, :pointer, :pointer], :Status
152
+ attach_function :XSetWMProtocols, [:pointer, :Window, :pointer, :int], :Status
153
+ attach_function :XIconifyWindow, [:pointer, :Window, :int], :Status
154
+ attach_function :XWithdrawWindow, [:pointer, :Window, :int], :Status
155
+ attach_function :XGetCommand, [:pointer, :Window, :pointer, :pointer], :Status
156
+ attach_function :XGetWMColormapWindows, [:pointer, :Window, :pointer, :pointer], :Status
157
+ attach_function :XSetWMColormapWindows, [:pointer, :Window, :pointer, :int], :Status
158
+ attach_function :XFreeStringList, [:pointer], :void
159
+ attach_function :XSetTransientForHint, [:pointer, :Window, :Window], :int
160
+
161
+ # The following are given in alphabetical order
162
+ attach_function :XActivateScreenSaver, [:pointer], :int
163
+ attach_function :XAddHost, [:pointer, :pointer], :int
164
+ attach_function :XAddHosts, [:pointer, :pointer, :int], :int
165
+ attach_function :XAddToExtensionList, [:pointer, :pointer], :int
166
+ attach_function :XAddToSaveSet, [:pointer, :Window], :int
167
+ attach_function :XAllocColor, [:pointer, :Colormap, :pointer], :Status
168
+ attach_function :XAllocColorCells, [:pointer, :Colormap, :Bool, :pointer, :uint, :pointer, :uint], :Status
169
+ attach_function :XAllocColorPlanes, [:pointer, :Colormap,:Bool, :pointer, :int, :int, :int, :int, :pointer, :pointer, :pointer], :Status
170
+ attach_function :XAllocNamedColor, [:pointer, :Colormap, :string, :pointer, :pointer], :Status
171
+ attach_function :XAllowEvents, [:pointer, :int, :Time], :int
172
+ attach_function :XAutoRepeatOff, [:pointer], :int
173
+ attach_function :XAutoRepeatOn, [:pointer], :int
174
+ attach_function :XBell, [:pointer, :int], :int
175
+ attach_function :XBitmapBitOrder, [:pointer], :int
176
+ attach_function :XBitmapPad, [:pointer], :int
177
+ attach_function :XBitmapUnit, [:pointer], :int
178
+ attach_function :XCellsOfScreen, [:pointer], :int
179
+ attach_function :XChangeActivePointerGrab, [:pointer, :uint, :Cursor, :Time], :int
180
+ attach_function :XChangeGC, [:pointer, :GC, :ulong, :pointer], :int
181
+ attach_function :XChangeKeyboardControl, [:pointer, :ulong, :pointer], :int
182
+ attach_function :XChangePointerControl, [:pointer, :Bool, :Bool, :int, :int, :int], :int
183
+ attach_function :XChangeProperty, [:pointer, :Window, :Atom, :Atom, :int, :int, :pointer, :int], :int
184
+ attach_function :XChangeSaveSet, [:pointer, :Window, :int], :int
185
+ attach_function :XChangeWindowAttributes, [:pointer, :Window, :ulong, :pointer], :int
186
+ attach_function :XCheckIfEvent, [:pointer, :pointer, :pointer, :pointer], :Bool
187
+ attach_function :XCheckMaskEvent, [:pointer, :long, :pointer], :Bool
188
+ attach_function :XCheckTypedEvent, [:pointer, :int, :pointer], :Bool
189
+ attach_function :XCheckTypedWindowEvent, [:pointer, :Window, :int, :pointer], :Bool
190
+ attach_function :XCheckWindowEvent, [:pointer, :Window, :long, :pointer], :Bool
191
+ attach_function :XCirculateSubwindows, [:pointer, :Window, :int], :int
192
+ attach_function :XCirculateSubwindowsDown, [:pointer, :Window], :int
193
+ attach_function :XCirculateSubwindowsUp, [:pointer, :Window], :int
194
+ attach_function :XClearArea, [:pointer, :Window, :int, :int, :uint, :uint, :Bool], :int
195
+ attach_function :XClearWindow, [:pointer, :Window], :int
34
196
  attach_function :XCloseDisplay, [:pointer], :int
197
+ attach_function :XConfigureWindow, [:pointer, :Window, :uint, :pointer], :int
198
+ attach_function :XConnectionNumber, [:pointer], :int
199
+ attach_function :XConvertSelection, [:pointer, :Atom, :Atom, :Atom, :Window, :Time], :int
200
+ attach_function :XCopyArea, [:pointer, :Drawable, :Drawable, :GC, :int, :int, :uint, :uint, :int, :int], :int
201
+ attach_function :XCopyGC, [:pointer, :GC, :ulong, :GC], :int
202
+ attach_function :XCopyPlane, [:pointer, :Drawable, :Drawable, :GC, :int, :int, :uint, :uint, :int, :int, :ulong], :int
203
+ attach_function :XDefaultDepth, [:pointer, :int], :int
204
+ attach_function :XDefaultDepthOfScreen, [:pointer], :int
205
+ attach_function :XDefaultScreen, [:pointer], :int
206
+ attach_function :XDefineCursor, [:pointer, :Window, :Cursor], :int
207
+ attach_function :XDeleteProperty, [:pointer, :Window, :Atom], :int
208
+ attach_function :XDestroyWindow, [:pointer, :Window], :int
209
+ attach_function :XDestroySubwindows, [:pointer, :Window], :int
210
+ attach_function :XDoesBackingStore, [:pointer], :int
211
+ attach_function :XDoesSaveUnders, [:pointer], :Bool
212
+ attach_function :XDisableAccessControl, [:pointer], :int
213
+ attach_function :XDisplayCells, [:pointer, :int], :int
214
+ attach_function :XDisplayHeight, [:pointer, :int], :int
215
+ attach_function :XDisplayHeightMM, [:pointer, :int], :int
216
+ attach_function :XDisplayKeycodes, [:pointer, :pointer, :pointer], :int
217
+ attach_function :XDisplayPlanes, [:pointer, :int], :int
218
+ attach_function :XDisplayWidth, [:pointer, :int], :int
219
+ attach_function :XDisplayWidthMM, [:pointer, :int], :int
220
+ attach_function :XDrawArc, [:pointer, :Drawable, :GC, :int, :int, :uint, :uint, :int, :int], :int
221
+ attach_function :XDrawArcs, [:pointer, :Drawable, :GC, :pointer, :int], :int
222
+ attach_function :XDrawImageString, [:pointer, :Drawable, :GC, :int, :int, :pointer, :int], :int
223
+ attach_function :XDrawImageString16, [:pointer, :Drawable, :GC, :int, :int, :pointer, :int], :int
224
+ attach_function :XDrawLine, [:pointer, :Drawable, :GC, :int, :int, :int, :int], :int
225
+ attach_function :XDrawLines, [:pointer, :Drawable, :GC, :pointer, :int, :int], :int
226
+ attach_function :XDrawPoint, [:pointer, :Drawable, :GC, :int, :int], :int
227
+ attach_function :XDrawPoints, [:pointer, :Drawable, :GC, :pointer, :int, :int], :int
228
+ attach_function :XDrawRectangle, [:pointer, :Drawable, :GC, :int, :int, :uint, :uint], :int
229
+ attach_function :XDrawRectangles, [:pointer, :Drawable, :GC, :pointer, :int], :int
230
+ attach_function :XDrawSegments, [:pointer, :Drawable, :GC, :pointer, :int], :int
231
+ attach_function :XDrawString, [:pointer, :Drawable, :GC, :int, :int, :pointer, :int], :int
232
+ attach_function :XDrawString16, [:pointer, :Drawable, :GC, :int, :int, :pointer, :int], :int
233
+ attach_function :XDrawText, [:pointer, :Drawable, :GC, :int, :int, :pointer, :int], :int
234
+ attach_function :XDrawText16, [:pointer, :Drawable, :GC, :int, :int, :pointer, :int], :int
235
+ attach_function :XEnableAccessControl, [:pointer], :int
236
+ attach_function :XEventsQueued, [:pointer, :int], :int
237
+ attach_function :XFetchName, [:pointer, :Window, :pointer], :Status
238
+ attach_function :XFillArc, [:pointer, :Drawable, :GC, :int, :int, :uint, :uint, :int, :int], :int
239
+ attach_function :XFillArcs, [:pointer, :Drawable, :GC, :pointer, :int], :int
240
+ attach_function :XFillPolygon, [:pointer, :Drawable, :GC, :pointer, :int, :int, :int], :int
241
+ attach_function :XFillRectangle, [:pointer, :Drawable, :GC, :int, :int, :uint, :uint], :int
242
+ attach_function :XFillRectangles, [:pointer, :Drawable, :GC, :pointer, :int], :int
35
243
  attach_function :XFlush, [:pointer], :int
244
+ attach_function :XForceScreenSaver, [:pointer, :int], :int
245
+ attach_function :XFree, [:pointer], :int
246
+ attach_function :XFreeColormap, [:pointer, :Colormap], :int
247
+ attach_function :XFreeColors, [:pointer, :Colormap, :pointer, :int, :ulong], :int
248
+ attach_function :XFreeCursor, [:pointer, :Cursor], :int
249
+ attach_function :XFreeExtensionList, [:pointer], :int
250
+ attach_function :XFreeFont, [:pointer, :pointer], :int
251
+ attach_function :XFreeFontInfo, [:pointer, :pointer, :int], :int
252
+ attach_function :XFreeFontNames, [:pointer], :int
253
+ attach_function :XFreeFontPath, [:pointer], :int
254
+ attach_function :XFreeGC, [:pointer, :GC], :int
255
+ attach_function :XFreeModifiermap, [:pointer], :int
256
+ attach_function :XFreePixmap, [:pointer, :Pixmap], :int
257
+ attach_function :XGeometry, [:pointer, :int, :pointer, :pointer, :uint, :uint, :uint, :int, :int, :pointer, :pointer, :pointer, :pointer], :int
258
+ attach_function :XGetErrorDatabaseText, [:pointer, :string, :string, :string, :pointer, :int], :int
259
+ attach_function :XGetErrorText, [:pointer, :int, :pointer, :int], :int
260
+ attach_function :XGetFontProperty, [:pointer, :Atom, :ulong], :Bool
261
+ attach_function :XGetGCValues, [:pointer, :GC, :ulong, :pointer], :Status
262
+ attach_function :XGetGeometry, [:pointer, :Drawable, :pointer, :pointer, :pointer, :pointer, :pointer, :pointer, :pointer], :Status
263
+ attach_function :XGetIconName, [:pointer, :Window, :pointer], :Status
36
264
  attach_function :XGetInputFocus, [:pointer, :pointer, :pointer], :int
37
- attach_function :XSetInputFocus, [:pointer, :Window, :int, :Time], :int
38
-
265
+ attach_function :XGetKeyboardControl, [:pointer, :pointer], :int
266
+ attach_function :XGetPointerControl, [:pointer, :pointer, :pointer, :pointer], :int
267
+ attach_function :XGetPointerMapping, [:pointer, :pointer, :int], :int
268
+ attach_function :XGetScreenSaver, [:pointer, :pointer, :pointer, :pointer, :pointer], :int
269
+ attach_function :XGetTransientForHint, [:pointer, :Window, :pointer], :Status
270
+ attach_function :XGetWindowProperty, [:pointer, :Window, :Atom, :long, :long, :Bool, :Atom, :pointer, :pointer, :pointer, :pointer, :pointer], :int
271
+ attach_function :XGetWindowAttributes, [:pointer, :Window, :pointer], :Status
39
272
  attach_function :XGrabButton, [:pointer, :uint, :uint, :Window, :Bool, :uint, :int, :int, :Window, :Cursor], :int
40
273
  attach_function :XGrabKey, [:pointer, :int, :uint, :Window, :Bool, :int, :int], :int
41
274
  attach_function :XGrabKeyboard, [:pointer, :Window, :Bool, :int, :int, :Time], :int
42
275
  attach_function :XGrabPointer, [:pointer, :Window, :Bool, :uint, :int, :int, :Window, :Cursor, :Time], :int
276
+ attach_function :XGrabServer, [:pointer], :int
277
+ attach_function :XHeightOfScreen, [:pointer], :int
278
+ attach_function :XIfEvent, [:pointer, :pointer, :pointer, :pointer], :int
279
+ attach_function :XImageByteOrder, [:pointer], :int
280
+ attach_function :XInstallColormap, [:pointer, :Colormap], :int
281
+ attach_function :XKeysymToKeycode, [:pointer, :KeySym], :KeyCode
282
+ attach_function :XKillClient, [:pointer, :XID], :int
283
+ attach_function :XLookupColor, [:pointer, :Colormap, :string, :pointer, :pointer], :Status
284
+ attach_function :XLowerWindow, [:pointer, :Window], :int
285
+ attach_function :XMapRaised, [:pointer, :Window], :int
286
+ attach_function :XMapSubwindows, [:pointer, :Window], :int
287
+ attach_function :XMapWindow, [:pointer, :Window], :int
288
+ attach_function :XMaskEvent, [:pointer, :long, :pointer], :int
289
+ attach_function :XMaxCmapsOfScreen, [:pointer], :int
290
+ attach_function :XMinCmapsOfScreen, [:pointer], :int
291
+ attach_function :XMoveResizeWindow, [:pointer, :Window, :int, :int, :uint, :uint], :int
292
+ attach_function :XMoveWindow, [:pointer, :Window, :int, :int], :int
293
+ attach_function :XNextEvent, [:pointer, :pointer], :int
294
+ attach_function :XNoOp, [:pointer], :int
295
+ attach_function :XParseColor, [:pointer, :Colormap, :string, :pointer], :Status
296
+ attach_function :XParseGeometry, [:string, :pointer, :pointer, :pointer, :pointer], :int
297
+ attach_function :XPeekEvent, [:pointer, :pointer], :int
298
+ attach_function :XPeekIfEvent, [:pointer, :pointer, :pointer, :pointer], :int
299
+ attach_function :XPending, [:pointer], :int
300
+ attach_function :XPlanesOfScreen, [:pointer], :int
301
+ attach_function :XProtocolRevision, [:pointer], :int
302
+ attach_function :XProtocolVersion, [:pointer], :int
303
+ attach_function :XPutBackEvent, [:pointer, :pointer], :int
304
+ attach_function :XPutImage, [:pointer, :Drawable, :GC, :pointer, :int, :int, :int, :int, :uint, :uint], :int
305
+ attach_function :XQLength, [:pointer], :int
306
+ attach_function :XQueryBestCursor, [:pointer, :Drawable, :uint, :uint, :pointer, :pointer], :int
307
+ attach_function :XQueryBestSize, [:pointer, :int, :Drawable, :uint, :uint, :pointer, :pointer], :int
308
+ attach_function :XQueryBestStipple, [:pointer, :Drawable, :uint, :uint, :pointer, :pointer], :int
309
+ attach_function :XQueryBestTile, [:pointer, :Drawable, :uint, :uint, :pointer, :pointer], :int
310
+ attach_function :XQueryColor, [:pointer, :Colormap, :pointer], :int
311
+ attach_function :XQueryColors, [:pointer, :Colormap, :pointer, :int], :int
312
+ attach_function :XQueryExtension, [:pointer, :string, :pointer, :pointer, :pointer], :Bool
313
+ attach_function :XQueryKeymap, [:pointer, :pointer], :int
43
314
  attach_function :XQueryPointer, [:pointer, :Window, :pointer, :pointer, :pointer, :pointer, :pointer, :pointer, :pointer], :Bool
44
-
315
+ attach_function :XQueryTextExtents, [:pointer, :XID, :string, :int, :pointer, :pointer, :pointer, :pointer], :int
316
+ attach_function :XQueryTextExtents16, [:pointer, :XID, :pointer, :int, :pointer, :pointer, :pointer, :pointer], :int
317
+ attach_function :XQueryTree, [:pointer, :Window, :pointer, :pointer, :pointer, :pointer], :Status
318
+ attach_function :XRaiseWindow, [:pointer, :Window], :int
319
+ attach_function :XReadBitmapFile, [:pointer, :Drawable, :string, :pointer, :pointer, :pointer, :pointer, :pointer], :int
320
+ attach_function :XReadBitmapFileData, [:string, :pointer, :pointer, :pointer, :pointer, :pointer], :int
321
+ attach_function :XRebindKeysym, [:pointer, :KeySym, :pointer, :int, :string, :int], :int
322
+ attach_function :XRecolorCursor, [:pointer, :Cursor, :pointer, :pointer], :int
323
+ attach_function :XRefreshKeyboardMapping, [:pointer], :int
324
+ attach_function :XRemoveFromSaveSet, [:pointer, :Window], :int
325
+ attach_function :XRemoveHost, [:pointer, :pointer], :int
326
+ attach_function :XRemoveHosts, [:pointer, :pointer, :int], :int
327
+ attach_function :XReparentWindow, [:pointer, :Window, :Window, :int, :int], :int
328
+ attach_function :XResetScreenSaver, [:pointer], :int
329
+ attach_function :XResizeWindow, [:pointer, :Window, :uint, :uint], :int
330
+ attach_function :XRestackWindows, [:pointer, :pointer, :int], :int
331
+ attach_function :XRotateBuffers, [:pointer, :int], :int
332
+ attach_function :XRotateWindowProperties, [:pointer, :Window, :pointer, :int, :int], :int
333
+ attach_function :XScreenCount, [:pointer], :int
334
+ attach_function :XSelectInput, [:pointer, :Window, :long], :int
335
+ attach_function :XSendEvent, [:pointer, :Window, :Bool, :long, :pointer], :Status
336
+ attach_function :XSetAccessControl, [:pointer, :int], :int
337
+ attach_function :XSetArcMode, [:pointer, :GC, :int], :int
338
+ attach_function :XSetBackground, [:pointer, :GC, :ulong], :int
339
+ attach_function :XSetClipMask, [:pointer, :GC, :Pixmap], :int
340
+ attach_function :XSetClipOrigin, [:pointer, :GC, :int, :int], :int
341
+ attach_function :XSetClipRectangles, [:pointer, :GC, :int, :int, :pointer, :int, :int], :int
342
+ attach_function :XSetCloseDownMode, [:pointer, :int], :int
343
+ attach_function :XSetCommand, [:pointer, :Window, :pointer, :int], :int
344
+ attach_function :XSetDashes, [:pointer, :GC, :int, :pointer, :int], :int
345
+ attach_function :XSetFillRule, [:pointer, :GC, :int], :int
346
+ attach_function :XSetFillStyle, [:pointer, :GC, :int], :int
347
+ attach_function :XSetFont, [:pointer, :GC, :Font], :int
348
+ attach_function :XSetFontPath, [:pointer, :pointer, :int], :int
349
+ attach_function :XSetForeground, [:pointer, :GC, :ulong], :int
350
+ attach_function :XSetFunction, [:pointer, :GC, :int], :int
351
+ attach_function :XSetGraphicsExposures, [:pointer, :GC, :Bool], :int
352
+ attach_function :XSetIconName, [:pointer, :Window, :string], :int
353
+ attach_function :XSetInputFocus, [:pointer, :Window, :int, :Time], :int
354
+ attach_function :XSetLineAttributes, [:pointer, :GC, :uint, :int, :int, :int], :int
355
+ attach_function :XSetModifierMapping, [:pointer, :pointer], :int
356
+ attach_function :XSetPlaneMask, [:pointer, :GC, :ulong], :int
357
+ attach_function :XSetPointerMapping, [:pointer, :pointer, :int], :int
358
+ attach_function :XSetScreenSaver, [:pointer, :int, :int, :int, :int], :int
359
+ attach_function :XSetSelectionOwner, [:pointer, :Atom, :Window, :Time], :int
360
+ attach_function :XSetState, [:pointer, :GC, :ulong, :ulong, :int, :ulong], :int
361
+ attach_function :XSetStipple, [:pointer, :GC, :Pixmap], :int
362
+ attach_function :XSetSubwindowMode, [:pointer, :GC, :int], :int
363
+ attach_function :XSetTSOrigin, [:pointer, :GC, :int, :int], :int
364
+ attach_function :XSetTile, [:pointer, :GC, :Pixmap], :int
365
+ attach_function :XSetWindowBackground, [:pointer, :Window, :ulong], :int
366
+ attach_function :XSetWindowBackgroundPixmap, [:pointer, :Window, :Pixmap], :int
367
+ attach_function :XSetWindowBorder, [:pointer, :Window, :ulong], :int
368
+ attach_function :XSetWindowBorderPixmap, [:pointer, :Window, :Pixmap], :int
369
+ attach_function :XSetWindowBorderWidth, [:pointer, :Window, :uint], :int
370
+ attach_function :XSetWindowColormap, [:pointer, :Window, :Colormap], :int
371
+ attach_function :XStoreBuffer, [:pointer, :pointer, :int, :int], :int
372
+ attach_function :XStoreBytes, [:pointer, :pointer, :int], :int
373
+ attach_function :XStoreColor, [:pointer, :Colormap, :pointer], :int
374
+ attach_function :XStoreColors, [:pointer, :Colormap, :pointer, :int], :int
375
+ attach_function :XStoreName, [:pointer, :Window, :string], :int
376
+ attach_function :XStoreNamedColor, [:pointer, :Colormap, :string, :ulong, :int], :int
377
+ attach_function :XSync, [:pointer, :Bool], :int
378
+ attach_function :XTextExtents, [:pointer, :string, :int, :pointer, :pointer, :pointer, :pointer], :int
379
+ attach_function :XTextExtents16, [:pointer, :pointer, :int, :pointer, :pointer, :pointer, :pointer], :int
380
+ attach_function :XTextWidth, [:pointer, :string, :int], :int
381
+ attach_function :XTextWidth16, [:pointer, :pointer, :int], :int
382
+ attach_function :XTranslateCoordinates, [:pointer, :Window, :Window, :int, :int, :pointer, :pointer, :pointer], :Bool
383
+ attach_function :XUndefineCursor, [:pointer, :Window], :int
45
384
  attach_function :XUngrabButton, [:pointer, :uint, :uint, :Window], :int
46
385
  attach_function :XUngrabKey, [:pointer, :int, :uint, :Window], :int
47
386
  attach_function :XUngrabKeyboard, [:pointer, :Time], :int
48
387
  attach_function :XUngrabPointer, [:pointer, :Time], :int
388
+ attach_function :XUngrabServer, [:pointer], :int
389
+ attach_function :XUninstallColormap, [:pointer, :Colormap], :int
390
+ attach_function :XUnloadFont, [:pointer, :Font], :int
391
+ attach_function :XUnmapSubwindows, [:pointer, :Window], :int
392
+ attach_function :XUnmapWindow, [:pointer, :Window], :int
393
+ attach_function :XVendorRelease, [:pointer], :int
394
+ attach_function :XWarpPointer, [:pointer, :Window, :Window, :int, :int, :uint, :uint, :int, :int], :int
395
+ attach_function :XWidthMMOfScreen, [:pointer], :int
396
+ attach_function :XWindowEvent, [:pointer, :Window, :long, :pointer], :int
397
+ attach_function :XWriteBitmapFile, [:pointer, :string, :Pixmap, :uint, :uint, :int, :int], :int
49
398
 
50
- attach_function :XGetWindowAttributes, [:pointer, :Window, :pointer], :int
51
- attach_function :XMoveResizeWindow, [:pointer, :Window, :int, :int, :uint, :uint], :int
52
- attach_function :XMoveWindow, [:pointer, :Window, :int, :int], :int
53
- attach_function :XResizeWindow, [:pointer, :Window, :uint, :uint], :int
54
- attach_function :XRaiseWindow, [:pointer, :Window], :int
55
- attach_function :XQueryTree, [:pointer, :Window, :pointer, :pointer, :pointer, :pointer], :Status
56
- attach_function :XListProperties, [:pointer, :Window, :pointer], :pointer
57
- attach_function :XGetWindowProperty, [:pointer, :Window, :Atom, :long, :long, :Bool, :Atom, :pointer, :pointer, :pointer, :pointer, :pointer], :Status
399
+ attach_function :XSupportsLocale, [], :Bool
400
+ attach_function :XSetLocaleModifiers, [:pointer], :int
58
401
 
59
- attach_function :XAllowEvents, [:pointer, :int, :Time], :int
60
- attach_function :XNextEvent, [:pointer, :pointer], :int
61
- attach_function :XMaskEvent, [:pointer, :long, :pointer], :int
62
- attach_function :XCheckTypedEvent, [:pointer, :int, :pointer], :Bool
63
- attach_function :XWindowEvent, [:pointer, :Window, :long, :pointer], :int
402
+ # XXX: XOM and XOC, XIC, XIM, what the fuck.
64
403
 
65
- attach_function :XStringToKeysym, [:string], :KeySym
66
- attach_function :XKeysymToString, [:KeySym], :string
67
- attach_function :XKeysymToKeycode, [:pointer, :KeySym], :KeyCode
404
+ attach_function :XFilterEvent, [:pointer, :Window], :Bool
405
+
406
+ attach_function :XInternalConnectionNumbers, [:pointer, :pointer, :pointer], :Status
407
+ attach_function :XProcessInternalConnection, [:pointer, :int], :void
408
+ attach_function :XAddConnectionWatch, [:pointer, :pointer, :pointer], :Status
409
+ attach_function :XRemoveConnectionWatch, [:pointer, :pointer, :pointer], :void
410
+ attach_function :XSetAuthorization, [:string, :int, :pointer, :int], :void
411
+
412
+ attach_function :XGetEventData, [:pointer, :pointer], :Bool
413
+ attach_function :XFreeEventData, [:pointer, :pointer], :void
68
414
 
69
415
  end; end