win-ffi 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (271) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +36 -0
  3. data/lib/win-ffi/enums/color_types.rb +61 -0
  4. data/lib/win-ffi/enums/comctl32/init_common_controls.rb +32 -0
  5. data/lib/win-ffi/enums/comctl32/window/style/window_class_style.rb +7 -0
  6. data/lib/win-ffi/enums/comctl32.rb +5 -0
  7. data/lib/win-ffi/enums/comdlg32/find_replace.rb +28 -0
  8. data/lib/win-ffi/enums/comdlg32/font.rb +33 -0
  9. data/lib/win-ffi/enums/extended_name_format.rb +17 -0
  10. data/lib/win-ffi/enums/firmware_type.rb +12 -0
  11. data/lib/win-ffi/enums/gdi32/device_context.rb +29 -0
  12. data/lib/win-ffi/enums/gdi32/dib.rb +8 -0
  13. data/lib/win-ffi/enums/gdi32/hatch_styles.rb +15 -0
  14. data/lib/win-ffi/enums/gdi32/pfd_flags.rb +28 -0
  15. data/lib/win-ffi/enums/gdi32/pfd_layer_type.rb +7 -0
  16. data/lib/win-ffi/enums/gdi32/pfd_type.rb +7 -0
  17. data/lib/win-ffi/enums/gdi32/raster_operations.rb +22 -0
  18. data/lib/win-ffi/enums/gdi32.rb +90 -0
  19. data/lib/win-ffi/enums/kernel32/activation_context.rb +17 -0
  20. data/lib/win-ffi/enums/kernel32/computer_name_format.rb +19 -0
  21. data/lib/win-ffi/enums/kernel32/format_message_flags.rb +16 -0
  22. data/lib/win-ffi/enums/kernel32/get_module_handle_ex_flag.rb +7 -0
  23. data/lib/win-ffi/enums/kernel32/global_alloc_flags.rb +14 -0
  24. data/lib/win-ffi/enums/kernel32/handle.rb +9 -0
  25. data/lib/win-ffi/enums/kernel32/heap_flags.rb +14 -0
  26. data/lib/win-ffi/enums/kernel32/local_flags.rb +20 -0
  27. data/lib/win-ffi/enums/kernel32/memory.rb +12 -0
  28. data/lib/win-ffi/enums/kernel32/memory_flags.rb +22 -0
  29. data/lib/win-ffi/enums/kernel32/memory_protection_constants.rb +20 -0
  30. data/lib/win-ffi/enums/kernel32/set_error_mode_flags.rb +11 -0
  31. data/lib/win-ffi/enums/kernel32/sound_flags.rb +24 -0
  32. data/lib/win-ffi/enums/kernel32/volume.rb +13 -0
  33. data/lib/win-ffi/enums/kernel32.rb +5 -0
  34. data/lib/win-ffi/enums/lr.rb +48 -0
  35. data/lib/win-ffi/enums/netapi21/net_api_status.rb +25 -0
  36. data/lib/win-ffi/enums/netapi32.rb +5 -0
  37. data/lib/win-ffi/enums/system_info.rb +54 -0
  38. data/lib/win-ffi/enums/user32/append_menu_flags.rb +21 -0
  39. data/lib/win-ffi/enums/user32/border_flags.rb +29 -0
  40. data/lib/win-ffi/enums/user32/clipboard_formats.rb +31 -0
  41. data/lib/win-ffi/enums/user32/device_notify_flags.rb +17 -0
  42. data/lib/win-ffi/enums/user32/draw_caption_flags.rb +16 -0
  43. data/lib/win-ffi/enums/user32/draw_frame_control_flags.rb +15 -0
  44. data/lib/win-ffi/enums/user32/draw_frame_control_state_flags.rb +44 -0
  45. data/lib/win-ffi/enums/user32/edge_flags.rb +20 -0
  46. data/lib/win-ffi/enums/user32/feedback_type.rb +21 -0
  47. data/lib/win-ffi/enums/user32/get_ancestor_flags.rb +12 -0
  48. data/lib/win-ffi/enums/user32/icon.rb +19 -0
  49. data/lib/win-ffi/enums/user32/image.rb +12 -0
  50. data/lib/win-ffi/enums/user32/key_event_flags.rb +11 -0
  51. data/lib/win-ffi/enums/user32/keyboard_layout_flags.rb +57 -0
  52. data/lib/win-ffi/enums/user32/keyboard_modifiers.rb +16 -0
  53. data/lib/win-ffi/enums/user32/layered_window_attributes_flags.rb +12 -0
  54. data/lib/win-ffi/enums/user32/map_virtual_key.rb +22 -0
  55. data/lib/win-ffi/enums/user32/message_filter.rb +11 -0
  56. data/lib/win-ffi/enums/user32/mouse_event_flags.rb +25 -0
  57. data/lib/win-ffi/enums/user32/mouse_keys_flags.rb +16 -0
  58. data/lib/win-ffi/enums/user32/mwmo.rb +17 -0
  59. data/lib/win-ffi/enums/user32/ocr.rb +32 -0
  60. data/lib/win-ffi/enums/user32/oic.rb +26 -0
  61. data/lib/win-ffi/enums/user32/pen_flags.rb +12 -0
  62. data/lib/win-ffi/enums/user32/pen_mask.rb +14 -0
  63. data/lib/win-ffi/enums/user32/pointer_flags.rb +82 -0
  64. data/lib/win-ffi/enums/user32/pointer_input_type.rb +13 -0
  65. data/lib/win-ffi/enums/user32/process_dpi_awareness.rb +12 -0
  66. data/lib/win-ffi/enums/user32/queue_status_flags.rb +36 -0
  67. data/lib/win-ffi/enums/user32/rim.rb +12 -0
  68. data/lib/win-ffi/enums/user32/touch_injection_flags.rb +13 -0
  69. data/lib/win-ffi/enums/user32/touch_mask.rb +13 -0
  70. data/lib/win-ffi/enums/user32/user_object_information_flags.rb +22 -0
  71. data/lib/win-ffi/enums/user32/virtual_key_flags.rb +214 -0
  72. data/lib/win-ffi/enums/user32/window/animate_window_flags.rb +31 -0
  73. data/lib/win-ffi/enums/user32/window/broadcast_system_flags.rb +20 -0
  74. data/lib/win-ffi/enums/user32/window/broadcast_system_message_flags.rb +12 -0
  75. data/lib/win-ffi/enums/user32/window/combo_box_message.rb +53 -0
  76. data/lib/win-ffi/enums/user32/window/get_class_long_flags.rb +34 -0
  77. data/lib/win-ffi/enums/user32/window/get_window_flags.rb +38 -0
  78. data/lib/win-ffi/enums/user32/window/get_window_long_flags.rb +16 -0
  79. data/lib/win-ffi/enums/user32/window/menu_flags.rb +54 -0
  80. data/lib/win-ffi/enums/user32/window/message_box_flags.rb +90 -0
  81. data/lib/win-ffi/enums/user32/window/message_box_return.rb +18 -0
  82. data/lib/win-ffi/enums/user32/window/notification/button_notification.rb +20 -0
  83. data/lib/win-ffi/enums/user32/window/notification/edit_notification.rb +19 -0
  84. data/lib/win-ffi/enums/user32/window/notification/static_notification.rb +13 -0
  85. data/lib/win-ffi/enums/user32/window/peek_message_flags.rb +13 -0
  86. data/lib/win-ffi/enums/user32/window/set_window_pos_flags.rb +48 -0
  87. data/lib/win-ffi/enums/user32/window/show_window_flags.rb +41 -0
  88. data/lib/win-ffi/enums/user32/window/smto.rb +22 -0
  89. data/lib/win-ffi/enums/user32/window/style/button_control_style.rb +37 -0
  90. data/lib/win-ffi/enums/user32/window/style/combo_box_style.rb +22 -0
  91. data/lib/win-ffi/enums/user32/window/style/edit_style.rb +23 -0
  92. data/lib/win-ffi/enums/user32/window/style/static_style.rb +45 -0
  93. data/lib/win-ffi/enums/user32/window/style/window_class_style.rb +50 -0
  94. data/lib/win-ffi/enums/user32/window/style/window_style.rb +85 -0
  95. data/lib/win-ffi/enums/user32/window/style/window_style_ex.rb +98 -0
  96. data/lib/win-ffi/enums/user32/window/system_menu_command.rb +37 -0
  97. data/lib/win-ffi/enums/user32/window/system_metrics_flags.rb +300 -0
  98. data/lib/win-ffi/enums/user32/window/system_parameters_info_action.rb +225 -0
  99. data/lib/win-ffi/enums/user32/window/system_parameters_info_flags.rb +246 -0
  100. data/lib/win-ffi/enums/user32/window/track_popup_menu_flags.rb +70 -0
  101. data/lib/win-ffi/enums/user32/window/window_long.rb +22 -0
  102. data/lib/win-ffi/enums/user32/window/window_messages.rb +222 -0
  103. data/lib/win-ffi/enums/user32/window_hook.rb +56 -0
  104. data/lib/win-ffi/enums/user32.rb +5 -0
  105. data/lib/win-ffi/functions/advapi32/process.rb +33 -0
  106. data/lib/win-ffi/functions/advapi32/system_info.rb +17 -0
  107. data/lib/win-ffi/functions/comctl32/control.rb +11 -0
  108. data/lib/win-ffi/functions/comctl32/listbox.rb +20 -0
  109. data/lib/win-ffi/functions/comctl32.rb +7 -0
  110. data/lib/win-ffi/functions/comdlg32/color.rb +9 -0
  111. data/lib/win-ffi/functions/comdlg32/error.rb +6 -0
  112. data/lib/win-ffi/functions/comdlg32/find_replace.rb +9 -0
  113. data/lib/win-ffi/functions/comdlg32/font.rb +9 -0
  114. data/lib/win-ffi/functions/comdlg32.rb +7 -0
  115. data/lib/win-ffi/functions/gdi32/bitmap.rb +275 -0
  116. data/lib/win-ffi/functions/gdi32/brush.rb +54 -0
  117. data/lib/win-ffi/functions/gdi32/device_context.rb +126 -0
  118. data/lib/win-ffi/functions/gdi32/filled_shape.rb +68 -0
  119. data/lib/win-ffi/functions/gdi32/font.rb +9 -0
  120. data/lib/win-ffi/functions/gdi32/metafile.rb +173 -0
  121. data/lib/win-ffi/functions/gdi32/opengl.rb +29 -0
  122. data/lib/win-ffi/functions/gdi32/painting_drawing.rb +50 -0
  123. data/lib/win-ffi/functions/gdi32/text.rb +376 -0
  124. data/lib/win-ffi/functions/gdi32.rb +7 -0
  125. data/lib/win-ffi/functions/kernel32/activation.rb +22 -0
  126. data/lib/win-ffi/functions/kernel32/dll.rb +92 -0
  127. data/lib/win-ffi/functions/kernel32/error.rb +28 -0
  128. data/lib/win-ffi/functions/kernel32/filesystem.rb +22 -0
  129. data/lib/win-ffi/functions/kernel32/handle.rb +29 -0
  130. data/lib/win-ffi/functions/kernel32/memory.rb +478 -0
  131. data/lib/win-ffi/functions/kernel32/process.rb +359 -0
  132. data/lib/win-ffi/functions/kernel32/resource.rb +141 -0
  133. data/lib/win-ffi/functions/kernel32/sound.rb +10 -0
  134. data/lib/win-ffi/functions/kernel32/string.rb +38 -0
  135. data/lib/win-ffi/functions/kernel32/system_info.rb +183 -0
  136. data/lib/win-ffi/functions/kernel32/time.rb +220 -0
  137. data/lib/win-ffi/functions/kernel32/volume.rb +130 -0
  138. data/lib/win-ffi/functions/kernel32.rb +15 -0
  139. data/lib/win-ffi/functions/msimg32/bitmap.rb +46 -0
  140. data/lib/win-ffi/functions/msvcrt/handle.rb +13 -0
  141. data/lib/win-ffi/functions/netapi32/network_management.rb +13 -0
  142. data/lib/win-ffi/functions/netapi32.rb +7 -0
  143. data/lib/win-ffi/functions/ntdll/system_info.rb +14 -0
  144. data/lib/win-ffi/functions/secur32/system_info.rb +30 -0
  145. data/lib/win-ffi/functions/shell32/icon.rb +49 -0
  146. data/lib/win-ffi/functions/shutdown.rb +84 -0
  147. data/lib/win-ffi/functions/thread.rb +230 -0
  148. data/lib/win-ffi/functions/user32/accessibility.rb +23 -0
  149. data/lib/win-ffi/functions/user32/authorization.rb +19 -0
  150. data/lib/win-ffi/functions/user32/bitmap.rb +11 -0
  151. data/lib/win-ffi/functions/user32/brush.rb +10 -0
  152. data/lib/win-ffi/functions/user32/caret.rb +36 -0
  153. data/lib/win-ffi/functions/user32/clipboard.rb +84 -0
  154. data/lib/win-ffi/functions/user32/controls/button.rb +23 -0
  155. data/lib/win-ffi/functions/user32/controls/combobox.rb +29 -0
  156. data/lib/win-ffi/functions/user32/controls/listbox.rb +25 -0
  157. data/lib/win-ffi/functions/user32/controls/scrollbar.rb +95 -0
  158. data/lib/win-ffi/functions/user32/cursor.rb +74 -0
  159. data/lib/win-ffi/functions/user32/dde.rb +214 -0
  160. data/lib/win-ffi/functions/user32/desktop.rb +76 -0
  161. data/lib/win-ffi/functions/user32/device.rb +17 -0
  162. data/lib/win-ffi/functions/user32/device_context.rb +62 -0
  163. data/lib/win-ffi/functions/user32/display.rb +37 -0
  164. data/lib/win-ffi/functions/user32/error.rb +10 -0
  165. data/lib/win-ffi/functions/user32/filled_shape.rb +23 -0
  166. data/lib/win-ffi/functions/user32/gesture.rb +38 -0
  167. data/lib/win-ffi/functions/user32/hook.rb +123 -0
  168. data/lib/win-ffi/functions/user32/icon.rb +98 -0
  169. data/lib/win-ffi/functions/user32/input.rb +23 -0
  170. data/lib/win-ffi/functions/user32/keyboard.rb +177 -0
  171. data/lib/win-ffi/functions/user32/keyboard_accelerators.rb +37 -0
  172. data/lib/win-ffi/functions/user32/mouse.rb +60 -0
  173. data/lib/win-ffi/functions/user32/multiple_display_monitors.rb +43 -0
  174. data/lib/win-ffi/functions/user32/multiple_document_interface.rb +44 -0
  175. data/lib/win-ffi/functions/user32/painting_drawing.rb +173 -0
  176. data/lib/win-ffi/functions/user32/pointer.rb +154 -0
  177. data/lib/win-ffi/functions/user32/power.rb +28 -0
  178. data/lib/win-ffi/functions/user32/print.rb +14 -0
  179. data/lib/win-ffi/functions/user32/process.rb +30 -0
  180. data/lib/win-ffi/functions/user32/raw_input.rb +55 -0
  181. data/lib/win-ffi/functions/user32/rect.rb +67 -0
  182. data/lib/win-ffi/functions/user32/resource.rb +28 -0
  183. data/lib/win-ffi/functions/user32/shell.rb +29 -0
  184. data/lib/win-ffi/functions/user32/string.rb +98 -0
  185. data/lib/win-ffi/functions/user32/text.rb +48 -0
  186. data/lib/win-ffi/functions/user32/touch.rb +69 -0
  187. data/lib/win-ffi/functions/user32/transform.rb +22 -0
  188. data/lib/win-ffi/functions/user32/window/configuration.rb +15 -0
  189. data/lib/win-ffi/functions/user32/window/dialog.rb +167 -0
  190. data/lib/win-ffi/functions/user32/window/menu.rb +245 -0
  191. data/lib/win-ffi/functions/user32/window/message.rb +168 -0
  192. data/lib/win-ffi/functions/user32/window/properties.rb +50 -0
  193. data/lib/win-ffi/functions/user32/window/timer.rb +37 -0
  194. data/lib/win-ffi/functions/user32/window/window.rb +546 -0
  195. data/lib/win-ffi/functions/user32/window/window_class.rb +109 -0
  196. data/lib/win-ffi/functions/user32/window/window_proc.rb +29 -0
  197. data/lib/win-ffi/functions/user32/window_station.rb +39 -0
  198. data/lib/win-ffi/functions/user32.rb +161 -0
  199. data/lib/win-ffi/functions/winmm.rb +547 -0
  200. data/lib/win-ffi/functions/wtsapi32/process.rb +12 -0
  201. data/lib/win-ffi/lib_base.rb +54 -0
  202. data/lib/win-ffi/struct.rb +15 -0
  203. data/lib/win-ffi/structs/comctl32/init_common_controls_ex.rb +10 -0
  204. data/lib/win-ffi/structs/comdlg32/choose_color.rb +23 -0
  205. data/lib/win-ffi/structs/comdlg32/choose_font.rb +28 -0
  206. data/lib/win-ffi/structs/comdlg32/find_replace.rb +24 -0
  207. data/lib/win-ffi/structs/gdi32/abc.rb +9 -0
  208. data/lib/win-ffi/structs/gdi32/abcfloat.rb +10 -0
  209. data/lib/win-ffi/structs/gdi32/bitmap.rb +13 -0
  210. data/lib/win-ffi/structs/gdi32/bitmap_info.rb +11 -0
  211. data/lib/win-ffi/structs/gdi32/bitmap_info_header.rb +17 -0
  212. data/lib/win-ffi/structs/gdi32/blend_function.rb +10 -0
  213. data/lib/win-ffi/structs/gdi32/display_device.rb +12 -0
  214. data/lib/win-ffi/structs/gdi32/handle_table.rb +7 -0
  215. data/lib/win-ffi/structs/gdi32/kerning_pair.rb +9 -0
  216. data/lib/win-ffi/structs/gdi32/log_brush.rb +10 -0
  217. data/lib/win-ffi/structs/gdi32/log_font.rb +20 -0
  218. data/lib/win-ffi/structs/gdi32/meta_file_pict.rb +10 -0
  219. data/lib/win-ffi/structs/gdi32/palette_entry.rb +10 -0
  220. data/lib/win-ffi/structs/gdi32/pixel_format_descriptor.rb +57 -0
  221. data/lib/win-ffi/structs/gdi32/rgb_quad.rb +10 -0
  222. data/lib/win-ffi/structs/kernel32/actctx.rb +22 -0
  223. data/lib/win-ffi/structs/netapi32/wksta_info_100.rb +9 -0
  224. data/lib/win-ffi/structs/os_version_info.rb +10 -0
  225. data/lib/win-ffi/structs/os_version_info_ex.rb +70 -0
  226. data/lib/win-ffi/structs/paint_struct.rb +12 -0
  227. data/lib/win-ffi/structs/point.rb +10 -0
  228. data/lib/win-ffi/structs/rect.rb +28 -0
  229. data/lib/win-ffi/structs/size.rb +6 -0
  230. data/lib/win-ffi/structs/user32/controls/combobox_info.rb +13 -0
  231. data/lib/win-ffi/structs/user32/controls/scroll_info.rb +13 -0
  232. data/lib/win-ffi/structs/user32/controls/scrollbar_info.rb +13 -0
  233. data/lib/win-ffi/structs/user32/cursor_info.rb +10 -0
  234. data/lib/win-ffi/structs/user32/display_device.rb +12 -0
  235. data/lib/win-ffi/structs/user32/draw_text_params.rb +11 -0
  236. data/lib/win-ffi/structs/user32/icon_info.rb +11 -0
  237. data/lib/win-ffi/structs/user32/icon_info_ex.rb +15 -0
  238. data/lib/win-ffi/structs/user32/last_input_info.rb +8 -0
  239. data/lib/win-ffi/structs/user32/mouse_move_point.rb +10 -0
  240. data/lib/win-ffi/structs/user32/msg.rb +16 -0
  241. data/lib/win-ffi/structs/user32/pointer_info.rb +25 -0
  242. data/lib/win-ffi/structs/user32/pointer_pen_info.rb +18 -0
  243. data/lib/win-ffi/structs/user32/pointer_touch_info.rb +17 -0
  244. data/lib/win-ffi/structs/user32/raw_input_device_list.rb +10 -0
  245. data/lib/win-ffi/structs/user32/raw_input_header.rb +10 -0
  246. data/lib/win-ffi/structs/user32/touch_hit_testing_input.rb +11 -0
  247. data/lib/win-ffi/structs/user32/touch_hit_testing_proximity_evaluation.rb +8 -0
  248. data/lib/win-ffi/structs/user32/track_mouse_event.rb +10 -0
  249. data/lib/win-ffi/structs/user32/window/alt_tab_info.rb +17 -0
  250. data/lib/win-ffi/structs/user32/window/bs_info.rb +12 -0
  251. data/lib/win-ffi/structs/user32/window/create_struct.rb +22 -0
  252. data/lib/win-ffi/structs/user32/window/dlg_template.rb +13 -0
  253. data/lib/win-ffi/structs/user32/window/flashw_info.rb +11 -0
  254. data/lib/win-ffi/structs/user32/window/gui_thread_info.rb +17 -0
  255. data/lib/win-ffi/structs/user32/window/luid.rb +8 -0
  256. data/lib/win-ffi/structs/user32/window/menu_info.rb +13 -0
  257. data/lib/win-ffi/structs/user32/window/menu_item_info.rb +18 -0
  258. data/lib/win-ffi/structs/user32/window/menu_item_template.rb +9 -0
  259. data/lib/win-ffi/structs/user32/window/menubar_info.rb +12 -0
  260. data/lib/win-ffi/structs/user32/window/msgbox_params.rb +16 -0
  261. data/lib/win-ffi/structs/user32/window/non_client_metrics.rb +29 -0
  262. data/lib/win-ffi/structs/user32/window/title_bar_info.rb +9 -0
  263. data/lib/win-ffi/structs/user32/window/tpm_params.rb +8 -0
  264. data/lib/win-ffi/structs/user32/window/update_layered_window_info.rb +22 -0
  265. data/lib/win-ffi/structs/user32/window/window_placement.rb +32 -0
  266. data/lib/win-ffi/structs/user32/window/window_pos.rb +46 -0
  267. data/lib/win-ffi/structs/user32/window/wndclass.rb +19 -0
  268. data/lib/win-ffi/structs/user32/window/wndclassex.rb +40 -0
  269. data/lib/win-ffi/version.rb +3 -0
  270. data/lib/win-ffi.rb +42 -0
  271. metadata +363 -0
@@ -0,0 +1,173 @@
1
+ require 'win-ffi/functions/user32'
2
+
3
+ require 'win-ffi/enums/user32/draw_caption_flags'
4
+ require 'win-ffi/enums/user32/edge_flags'
5
+ require 'win-ffi/enums/user32/border_flags'
6
+ require 'win-ffi/enums/user32/draw_frame_control_flags'
7
+ require 'win-ffi/enums/user32/draw_frame_control_state_flags'
8
+
9
+ require 'win-ffi/structs/rect'
10
+ require 'win-ffi/structs/paint_struct'
11
+
12
+ module WinFFI
13
+ module User32
14
+ #HDC BeginPaint(
15
+ # _In_ HWND hwnd,
16
+ # _Out_ LPPAINTSTRUCT lpPaint )
17
+ attach_function 'BeginPaint', [:hwnd, PAINTSTRUCT.ptr], :hdc
18
+
19
+ #BOOL DrawAnimatedRects(
20
+ # _In_ HWND hwnd,
21
+ # _In_ int idAni,
22
+ # const RECT *lprcFrom,
23
+ # const RECT *lprcTo )
24
+ attach_function 'DrawAnimatedRects', [:hwnd, :int, RECT.ptr, RECT.ptr], :bool
25
+
26
+ #BOOL DrawCaption(
27
+ # _In_ HWND hwnd,
28
+ # _In_ HDC hdc,
29
+ # _In_ LPCRECT lprc,
30
+ # _In_ UINT uFlags )
31
+ attach_function 'DrawCaption', [:hwnd, :hdc, RECT.ptr, DrawCaptionFlags], :bool
32
+
33
+ #BOOL DrawEdge(
34
+ # _In_ HDC hdc,
35
+ # _Inout_ LPRECT qrc,
36
+ # _In_ UINT edge,
37
+ # _In_ UINT grfFlags )
38
+ attach_function 'DrawEdge', [:hdc, RECT.ptr, EdgeFlags, BorderFlags], :bool
39
+
40
+ #BOOL DrawFocusRect(
41
+ # _In_ HDC hDC,
42
+ # _In_ const RECT *lprc )
43
+ attach_function 'DrawFocusRect', [:hdc, RECT.ptr], :bool
44
+
45
+ #BOOL DrawFrameControl(
46
+ # _In_ HDC hdc,
47
+ # _In_ LPRECT lprc,
48
+ # _In_ UINT uType,
49
+ # _In_ UINT uState )
50
+ attach_function 'DrawFrameControl', [:hdc, RECT.ptr, DrawFrameControlFlags, DrawFrameControlStateFlags], :bool
51
+
52
+ #BOOL DrawState(
53
+ # _In_ HDC hdc,
54
+ # _In_ HBRUSH hbr,
55
+ # _In_ DRAWSTATEPROC lpOutputFunc,
56
+ # _In_ LPARAM lData,
57
+ # _In_ WPARAM wData,
58
+ # _In_ int x,
59
+ # _In_ int y,
60
+ # _In_ int cx,
61
+ # _In_ int cy,
62
+ # _In_ UINT fuFlags )
63
+ attach_function 'DrawStateA', [:hdc, :pointer, :lparam, :wparam, :int, :int, :int, :int, :uint], :bool
64
+ attach_function 'DrawStateW', [:hdc, :hbrush, :pointer, :lparam, :wparam, :int, :int, :int, :int, :uint], :bool
65
+
66
+ #BOOL CALLBACK DrawStateProc(
67
+ # _In_ HDC hdc,
68
+ # _In_ LPARAM lData,
69
+ # _In_ WPARAM wData,
70
+ # _In_ int cx,
71
+ # _In_ int cy )
72
+ callback 'DrawStateProc', [:hdc, :lparam, :wparam, :int, :int], :bool
73
+
74
+ #BOOL EndPaint(
75
+ # _In_ HWND hWnd,
76
+ # _In_ const PAINTSTRUCT *lpPaint )
77
+ attach_function 'EndPaint', [:hwnd, PAINTSTRUCT.ptr], :bool
78
+
79
+ #int ExcludeUpdateRgn(
80
+ # _In_ HDC hDC,
81
+ # _In_ HWND hWnd )
82
+ attach_function 'ExcludeUpdateRgn', [:hdc, :hwnd], :int
83
+
84
+ #HDC GetWindowDC( _In_ HWND hWnd )
85
+ attach_function 'GetWindowDC', [:hwnd], :hdc
86
+
87
+ #BOOL GetUpdateRect(
88
+ # _In_ HWND hWnd,
89
+ # _Out_ LPRECT lpRect,
90
+ # _In_ BOOL bErase )
91
+ attach_function 'GetUpdateRect', [:hwnd, RECT.ptr, :bool], :bool
92
+
93
+ #int GetUpdateRgn(
94
+ # _In_ HWND hWnd,
95
+ # _In_ HRGN hRgn,
96
+ # _In_ BOOL bErase )
97
+ attach_function 'GetUpdateRgn', [:hwnd, :hrgn, :bool], :int
98
+
99
+ #int GetWindowRgn(
100
+ # _In_ HWND hWnd,
101
+ # _In_ HRGN hRgn)
102
+ attach_function 'GetWindowRgn', [:hwnd, :hrgn], :int
103
+
104
+ #int GetWindowRgnBox(
105
+ # _In_ HWND hWnd,
106
+ # _Out_ LPRECT lprc )
107
+ attach_function 'GetWindowRgnBox', [:hwnd, RECT.ptr], :int
108
+
109
+ #BOOL GrayString(
110
+ # _In_ HDC hDC,
111
+ # _In_ HBRUSH hBrush,
112
+ # _In_ GRAYSTRINGPROC lpOutputFunc,
113
+ # _In_ LPARAM lpData,
114
+ # _In_ int nCount,
115
+ # _In_ int X,
116
+ # _In_ int Y,
117
+ # _In_ int nWidth,
118
+ # _In_ int nHeight )
119
+ attach_function 'GrayStringA', [:hdc, :hbrush, :pointer, :lparam, :int, :int, :int, :int, :int], :bool
120
+ attach_function 'GrayStringW', [:hdc, :hbrush, :pointer, :lparam, :int, :int, :int, :int, :int], :bool
121
+
122
+ #BOOL InvalidateRect(
123
+ # __in HWND hWnd,
124
+ # __in const RECT *lpRect,
125
+ # __in BOOL bErase)
126
+ attach_function 'InvalidateRect', [:hwnd, RECT.ptr, :bool], :bool
127
+
128
+ #BOOL InvalidateRgn(
129
+ # _In_ HWND hWnd,
130
+ # _In_ HRGN hRgn,
131
+ # _In_ BOOL bErase )
132
+ attach_function 'InvalidateRgn', [:hwnd, :hrgn, :bool], :bool
133
+
134
+ #BOOL LockWindowUpdate( _In_ HWND hWndLock )
135
+ attach_function 'LockWindowUpdate', [:hwnd], :bool
136
+
137
+ #BOOL CALLBACK OutputProc(
138
+ # _In_ HDC hdc,
139
+ # _In_ LPARAM lpData,
140
+ # _In_ int cchData )
141
+ callback 'OutputProc', [:hdc, :lparam, :int], :bool
142
+
143
+ #BOOL PaintDesktop( _In_ HDC hdc )
144
+ attach_function 'PaintDesktop', [:hdc], :bool
145
+
146
+ #BOOL RedrawWindow(
147
+ # _In_ HWND hWnd,
148
+ # _In_ const RECT *lprcUpdate,
149
+ # _In_ HRGN hrgnUpdate,
150
+ # _In_ UINT flags )
151
+ attach_function 'RedrawWindow', [:hwnd, RECT, :hrgn], :bool
152
+
153
+ #int SetWindowRgn(
154
+ # _In_ HWND hWnd,
155
+ # _In_ HRGN hRgn,
156
+ # _In_ BOOL bRedraw )
157
+ attach_function 'SetWindowRgn', [:hwnd, :hrgn, :bool], :int
158
+
159
+ #BOOL UpdateWindow(
160
+ # __int HWND hWnd)
161
+ attach_function 'UpdateWindow', [:hwnd], :bool
162
+
163
+ #BOOL ValidateRect(
164
+ # __in HWND hWnd,
165
+ # __in const RECT *lpRect)
166
+ attach_function 'ValidateRect', [:hwnd, RECT.ptr], :bool
167
+
168
+ #BOOL ValidateRgn(
169
+ # _In_ HWND hWnd,
170
+ # _In_ HRGN hRgn )
171
+ attach_function 'ValidateRgn', [:hwnd, :hrgn], :bool
172
+ end
173
+ end
@@ -0,0 +1,154 @@
1
+ require 'win-ffi/functions/user32'
2
+
3
+ require 'win-ffi/enums/user32/pointer_input_type'
4
+
5
+ require 'win-ffi/structs/user32/pointer_info'
6
+ require 'win-ffi/structs/user32/pointer_pen_info'
7
+ require 'win-ffi/structs/user32/pointer_touch_info'
8
+
9
+ module WinFFI
10
+ module User32
11
+ #BOOL WINAPI EnableMouseInPointer( _In_ BOOL fEnable )
12
+ attach_function 'EnableMouseInPointer', [:bool], :bool
13
+
14
+ #BOOL WINAPI GetPointerCursorId (
15
+ # _In_ UINT32 pointerId,
16
+ # _Out_ UINT32 *cursorId )
17
+ attach_function 'GetPointerCursorId', [:uint32, :uint32], :bool
18
+
19
+ #WINUSERAPI BOOL WINAPI WINAPI GetPointerDevice(
20
+ # _In_ HANDLE device,
21
+ # _Out_ POINTER_DEVICE_INFO *pointerDevice )
22
+ attach_function 'GetPointerDevice', [:handle, :pointer], :bool
23
+
24
+ #BOOL GetPointerDeviceCursors(
25
+ # _In_ HANDLE device,
26
+ # _Inout_ UINT32 *cursorCount,
27
+ # _Out_opt_ POINTER_DEVICE_CURSOR_INFO *deviceCursors )
28
+ attach_function 'GetPointerDeviceCursors', [:handle, :pointer, :pointer], :bool
29
+
30
+ #BOOL GetPointerDeviceProperties(
31
+ # _In_ HANDLE device,
32
+ # _Inout_ UINT32 *propertyCount,
33
+ # _Out_opt_ POINTER_DEVICE_PROPERTY *pointerProperties )
34
+ attach_function 'GetPointerDeviceProperties', [:handle, :pointer, :pointer], :bool
35
+
36
+ #BOOL GetPointerDeviceRects(
37
+ # _In_ HANDLE device,
38
+ # _Out_ RECT *pointerDeviceRect,
39
+ # _Out_ RECT *displayRect )
40
+ attach_function 'GetPointerDeviceRects', [:handle, RECT.ptr, RECT.ptr], :bool
41
+
42
+ #WINUSERAPI BOOL WINAPI WINAPI GetPointerDevices(
43
+ # _Inout_ UINT32 deviceCount,
44
+ # _Out_opt_ POINTER_DEVICE_INFO *pointerDevices )
45
+ attach_function 'GetPointerDevices', [:uint32, :pointer], :bool
46
+
47
+ #BOOL WINAPI GetPointerFrameInfo(
48
+ # _In_ UINT32 pointerId,
49
+ # _Inout_ UINT32 *pointerCount,
50
+ # _Out_ POINTER_INFO *pointerInfo )
51
+ attach_function 'GetPointerFrameInfo', [:uint32, :pointer, POINTER_INFO.ptr], :bool
52
+
53
+ #BOOL WINAPI GetPointerFrameInfoHistory(
54
+ # _In_ UINT32 pointerId,
55
+ # _Inout_ UINT32 *entriesCount,
56
+ # _Inout_ UINT32 *pointerCount,
57
+ # _Out_ POINTER_INFO * pointerInfo )
58
+ attach_function 'GetPointerFrameInfoHistory', [:uint32, :pointer, :pointer, POINTER_INFO.ptr], :bool
59
+
60
+ #BOOL WINAPI GetPointerFramePenInfo(
61
+ # _In_ UINT32 pointerId,
62
+ # _Inout_ UINT32 *pointerCount,
63
+ # _Out_ POINTER_PEN_INFO *penInfo )
64
+ attach_function 'GetPointerFramePenInfo', [:uint32, :pointer, POINTER_PEN_INFO.ptr], :bool
65
+
66
+ #BOOL WINAPI GetPointerFramePenInfoHistory(
67
+ # _In_ UINT32 pointerId,
68
+ # _Inout_ UINT32 *entriesCount,
69
+ # _Inout_ UINT32 *pointerCount,
70
+ # _Out_opt_ POINTER_PEN_INFO *penInfo )
71
+ attach_function 'GetPointerFramePenInfoHistory', [:uint32, :pointer, :pointer, POINTER_PEN_INFO.ptr], :bool
72
+
73
+ #BOOL WINAPI GetPointerFrameTouchInfo(
74
+ # _In_ UINT32 pointerId,
75
+ # _Inout_ UINT32 *pointerCount,
76
+ # _Out_ POINTER_TOUCH_INFO *touchInfo )
77
+ attach_function 'GetPointerFrameTouchInfo', [:uint32, :pointer, POINTER_TOUCH_INFO.ptr], :bool
78
+
79
+ #BOOL WINAPI GetPointerFrameTouchInfoHistory(
80
+ # _In_ UINT32 pointerId,
81
+ # _Inout_ UINT32 *entriesCount,
82
+ # _Inout_ UINT32 *pointerCount,
83
+ # _Out_ POINTER_TOUCH_INFO *touchInfo )
84
+ attach_function 'GetPointerFrameTouchInfoHistory', [:uint32, :pointer, :pointer, POINTER_TOUCH_INFO.ptr], :bool
85
+
86
+ #BOOL WINAPI GetPointerInfo(
87
+ # _In_ UINT32 pointerId,
88
+ # _Out_ POINTER_INFO *pointerInfo )
89
+ attach_function 'GetPointerInfo', [:uint32, POINTER_INFO.ptr], :bool
90
+
91
+ #BOOL WINAPI GetPointerInfoHistory(
92
+ # _In_ UINT32 pointerId,
93
+ # _Inout_ UINT32 *entriesCount,
94
+ # _Out_opt_ POINTER_INFO *pointerInfo )
95
+ attach_function 'GetPointerInfoHistory', [:uint32, :pointer, POINTER_INFO.ptr], :bool
96
+
97
+ if WindowsVersion >= 8.1
98
+ #BOOL WINAPI GetPointerInputTransform(
99
+ # _In_ UINT32 pointerId,
100
+ # _In_ UINT32 historyCount,
101
+ # _Out_ UINT32 *inputTransform )
102
+ attach_function 'GetPointerInputTransform', [:uint, :uint, :pointer], :bool
103
+ end
104
+
105
+ #BOOL WINAPI GetPointerPenInfo(
106
+ # _In_ UINT32 pointerId,
107
+ # _Out_ POINTER_PEN_INFO *penInfo )
108
+ attach_function 'GetPointerPenInfo', [:uint32, POINTER_PEN_INFO.ptr], :bool
109
+
110
+ #BOOL WINAPI GetPointerPenInfoHistory(
111
+ # _In_ UINT32 pointerId,
112
+ # _Inout_ UINT32 *entriesCount,
113
+ # _Out_opt_ POINTER_PEN_INFO *penInfo )
114
+ attach_function 'GetPointerPenInfoHistory', [:uint32, :pointer, POINTER_PEN_INFO.ptr], :bool
115
+
116
+ #BOOL WINAPI GetPointerTouchInfo(
117
+ # _In_ UINT32 pointerId,
118
+ # _Out_ POINTER_TOUCH_INFO *touchInfo )
119
+ attach_function 'GetPointerTouchInfo', [:uint32, POINTER_TOUCH_INFO.ptr], :bool
120
+
121
+ #BOOL WINAPI GetPointerTouchInfoHistory(
122
+ # _In_ UINT32 pointerId,
123
+ # _Inout_ UINT32 *entriesCount,
124
+ # _Out_opt_ POINTER_TOUCH_INFO *touchInfo )
125
+ attach_function 'GetPointerTouchInfoHistory', [:uint32, :pointer, POINTER_TOUCH_INFO.ptr], :bool
126
+
127
+ #BOOL WINAPI GetPointerType (
128
+ # _In_ UINT32 pointerId,
129
+ # _Out_ POINTER_INPUT_TYPE *pointerType )
130
+ attach_function 'GetPointerType', [:uint32, PointerInputType], :bool
131
+
132
+ #BOOL GetRawPointerDeviceData(
133
+ # _In_ UINT32 pointerId,
134
+ # _In_ UINT32 historyCount,
135
+ # _In_ UINT32 propertiesCount,
136
+ # _In_ POINTER_DEVICE_PROPERTY *pProperties,
137
+ # _Out_ LONG *pValues )
138
+ attach_function 'GetRawPointerDeviceData', [:uint32, :uint32, :uint32, :pointer, :pointer], :bool
139
+
140
+ #DWORD WINAPI GetUnpredictedMessagePos(void)
141
+ attach_function 'GetUnpredictedMessagePos', [], :dword
142
+
143
+ #BOOL WINAPI IsMousePointerEnabled(void)
144
+ #attach_function 'IsMousePointerEnabled', [], :bool
145
+
146
+ #WINUSERAPI BOOL WINAPI RegisterPointerDeviceNotifications(
147
+ # _In_ HWND window,
148
+ # _In_ BOOL notifyRange )
149
+ attach_function 'RegisterPointerDeviceNotifications', [:hwnd, :bool], :bool
150
+
151
+ #BOOL WINAPI SkipPointerFrameMessages( _In_ UINT32 pointerId )
152
+ attach_function 'SkipPointerFrameMessages', [:uint32], :bool
153
+ end
154
+ end
@@ -0,0 +1,28 @@
1
+ require 'win-ffi/functions/user32'
2
+
3
+ require 'win-ffi/enums/user32/device_notify_flags'
4
+
5
+ module WinFFI
6
+ module User32
7
+ if WindowsVersion >= :vista
8
+ #HPOWERNOTIFY WINAPI RegisterPowerSettingNotification(
9
+ # _In_ HANDLE hRecipient,
10
+ # _In_ LPCGUID PowerSettingGuid,
11
+ # _In_ DWORD Flags )
12
+ attach_function 'RegisterPowerSettingNotification', [:handle, :pointer, DeviceNotifyFlags], :pointer
13
+
14
+ #BOOL WINAPI UnregisterPowerSettingNotification( _In_ HPOWERNOTIFY Handle )
15
+ attach_function 'UnregisterPowerSettingNotification', [:pointer], :bool
16
+ if WindowsVersion >= 8
17
+
18
+ #HPOWERNOTIFY WINUSERAPI RegisterSuspendResumeNotification(
19
+ # _In_ PDEVICE_NOTIFY_SUBSCRIBE_PARAMETERS hRecipient,
20
+ # _In_ DWORD Flags )
21
+ attach_function 'RegisterSuspendResumeNotification', [:pointer, :dword], :pointer
22
+
23
+ #BOOL WINUSERAPI UnregisterSuspendResumeNotification( _Inout_ HPOWERNOTIFY RegistrationHandle )
24
+ attach_function 'UnregisterSuspendResumeNotification', [:pointer], :bool
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,14 @@
1
+ require 'win-ffi/functions/user32'
2
+
3
+ module WinFFI
4
+ module User32
5
+ #BOOL WINAPI IsWindowRedirectedForPrint( _In_ HWND hWnd )
6
+ attach_function 'IsWindowRedirectedForPrint', [:hwnd], :bool
7
+
8
+ #BOOL PrintWindow(
9
+ # HWND hwnd,
10
+ # HDC hdcBlt,
11
+ # UINT nFlags )
12
+ attach_function 'PrintWindow', [:hwnd, :hdc, :uint], :bool
13
+ end
14
+ end
@@ -0,0 +1,30 @@
1
+ require 'win-ffi/functions/user32'
2
+
3
+ module WinFFI
4
+ module User32
5
+ #DWORD WINAPI GetGuiResources(
6
+ # _In_ HANDLE hProcess,
7
+ # _In_ DWORD uiFlags )
8
+ attach_function 'GetGuiResources', [:handle, :dword], :dword
9
+
10
+ if WindowsVersion >= 8
11
+ #BOOL WINAPI IsImmersiveProcess( _In_ HANDLE hProcess )
12
+ attach_function 'IsImmersiveProcess', [:handle], :bool
13
+
14
+ #Windows Store Apps
15
+ #BOOL WINAPI SetProcessRestrictionExemption( BOOL fEnableExemption )
16
+ attach_function 'SetProcessRestrictionExemption', [:bool], :bool
17
+ end
18
+
19
+ #BOOL WINAPI UserHandleGrantAccess(
20
+ # _In_ HANDLE hUserHandle,
21
+ # _In_ HANDLE hJob,
22
+ # _In_ BOOL bGrant )
23
+ attach_function 'UserHandleGrantAccess', [:handle, :handle, :bool], :bool
24
+
25
+ #DWORD WINAPI WaitForInputIdle(
26
+ # _In_ HANDLE hProcess,
27
+ # _In_ DWORD dwMilliseconds )
28
+ attach_function 'WaitForInputIdle', [:handle, :dword], :dword
29
+ end
30
+ end
@@ -0,0 +1,55 @@
1
+ require 'win-ffi/functions/user32'
2
+
3
+ require 'win-ffi/structs/user32/raw_input_device_list'
4
+
5
+ module WinFFI
6
+ module User32
7
+ #TODO RAWINPUT struct
8
+
9
+ #LRESULT WINAPI DefRawInputProc(
10
+ # _In_ PRAWINPUT *paRawInput,
11
+ # _In_ INT nInput,
12
+ # _In_ UINT cbSizeHeader )
13
+ attach_function 'DefRawInputProc', [:pointer, :int, :uint], :lresult
14
+
15
+ #UINT WINAPI GetRawInputBuffer(
16
+ # _Out_opt_ PRAWINPUT pData,
17
+ # _Inout_ PUINT pcbSize,
18
+ # _In_ UINT cbSizeHeader )
19
+ attach_function 'GetRawInputBuffer', [:pointer, :pointer, :uint], :uint
20
+
21
+ #UINT WINAPI GetRawInputData(
22
+ # _In_ HRAWINPUT hRawInput,
23
+ # _In_ UINT uiCommand,
24
+ # _Out_opt_ LPVOID pData,
25
+ # _Inout_ PUINT pcbSize,
26
+ # _In_ UINT cbSizeHeader )
27
+ attach_function 'GetRawInputData', [:pointer, :uint, :pointer, :pointer, :uint], :uint
28
+
29
+ #UINT WINAPI GetRawInputDeviceInfo(
30
+ # _In_opt_ HANDLE hDevice,
31
+ # _In_ UINT uiCommand,
32
+ # _Inout_opt_ LPVOID pData,
33
+ # _Inout_ PUINT pcbSize )
34
+ attach_function 'GetRawInputDeviceInfoA', [:handle, :uint, :pointer, :pointer], :uint
35
+ attach_function 'GetRawInputDeviceInfoW', [:handle, :uint, :pointer, :pointer], :uint
36
+
37
+ #UINT WINAPI GetRawInputDeviceList(
38
+ # _Out_opt_ PRAWINPUTDEVICELIST pRawInputDeviceList,
39
+ # _Inout_ PUINT puiNumDevices,
40
+ # _In_ UINT cbSize )
41
+ attach_function 'GetRawInputDeviceList', [RAWINPUTDEVICELIST.ptr, :pointer, :uint], :uint
42
+
43
+ #UINT WINAPI GetRegisteredRawInputDevices(
44
+ # _Out_opt_ PRAWINPUTDEVICE pRawInputDevices,
45
+ # _Inout_ PUINT puiNumDevices,
46
+ # _In_ UINT cbSize )
47
+ attach_function 'GetRegisteredRawInputDevices', [RAWINPUTDEVICELIST.ptr, :pointer, :uint], :uint
48
+
49
+ #BOOL WINAPI RegisterRawInputDevices(
50
+ # _In_ PCRAWINPUTDEVICE pRawInputDevices,
51
+ # _In_ UINT uiNumDevices,
52
+ # _In_ UINT cbSize )
53
+ attach_function 'RegisterRawInputDevices', [:pointer , :uint, :uint], :bool
54
+ end
55
+ end
@@ -0,0 +1,67 @@
1
+ require 'win-ffi/functions/user32'
2
+
3
+ require 'win-ffi/structs/rect'
4
+
5
+ module WinFFI
6
+ module User32
7
+ #BOOL CopyRect(
8
+ # _Out_ LPRECT lprcDst,
9
+ # _In_ const RECT *lprcSrc )
10
+ attach_function 'CopyRect', [RECT.ptr, RECT.ptr], :bool
11
+
12
+ #BOOL EqualRect(
13
+ # _In_ const RECT *lprc1,
14
+ # _In_ const RECT *lprc2 )
15
+ attach_function 'EqualRect', [RECT.ptr, RECT.ptr], :bool
16
+
17
+ #BOOL InflateRect(
18
+ # _Inout_ LPRECT lprc,
19
+ # _In_ int dx,
20
+ # _In_ int dy )
21
+ attach_function 'InflateRect', [RECT.ptr, :int, :int], :bool
22
+
23
+ #BOOL IntersectRect(
24
+ # _Out_ LPRECT lprcDst,
25
+ # _In_ const RECT *lprcSrc1,
26
+ # _In_ const RECT *lprcSrc2 )
27
+ attach_function 'IntersectRect', [RECT.ptr, RECT.ptr, RECT.ptr], :bool
28
+
29
+ #BOOL IsRectEmpty( _In_ const RECT *lprc )
30
+ attach_function 'IsRectEmpty', [RECT.ptr], :bool
31
+
32
+ #BOOL OffsetRect(
33
+ # _Inout_ LPRECT lprc,
34
+ # _In_ int dx,
35
+ # _In_ int dy )
36
+ attach_function 'OffsetRect', [RECT.ptr, :int, :int], :bool
37
+
38
+ #BOOL PtInRect(
39
+ # _In_ const RECT *lprc,
40
+ # _In_ POINT pt )
41
+ attach_function 'PtInRect', [RECT.ptr, POINT], :bool
42
+
43
+ #BOOL SetRect(
44
+ # _Out_ LPRECT lprc,
45
+ # _In_ int xLeft,
46
+ # _In_ int yTop,
47
+ # _In_ int xRight,
48
+ # _In_ int yBottom )
49
+ attach_function 'SetRect', [RECT.ptr, :int, :int, :int, :int], :bool
50
+
51
+ #BOOL SetRectEmpty( _Out_ LPRECT lprc )
52
+ attach_function 'SetRectEmpty', [RECT.ptr], :bool
53
+
54
+ #BOOL SubtractRect(
55
+ # _Out_ LPRECT lprcDst,
56
+ # _In_ const RECT *lprcSrc1,
57
+ # _In_ const RECT *lprcSrc2 )
58
+ attach_function 'SubtractRect', [RECT.ptr, RECT.ptr, RECT.ptr], :bool
59
+
60
+ #BOOL UnionRect(
61
+ # _Out_ LPRECT lprcDst,
62
+ # _In_ const RECT *lprcSrc1,
63
+ # _In_ const RECT *lprcSrc2 )
64
+ attach_function 'UnionRect', [RECT.ptr, RECT.ptr, RECT.ptr], :bool
65
+
66
+ end
67
+ end
@@ -0,0 +1,28 @@
1
+ require 'win-ffi/functions/user32'
2
+
3
+ require 'win-ffi/enums/user32/image'
4
+ require 'win-ffi/enums/user32/ocr'
5
+ require 'win-ffi/enums/user32/oic'
6
+ require 'win-ffi/enums/lr'
7
+
8
+ module WinFFI
9
+ module User32
10
+ #HANDLE WINAPI CopyImage(
11
+ # _In_ HANDLE hImage,
12
+ # _In_ UINT uType,
13
+ # _In_ int cxDesired,
14
+ # _In_ int cyDesired,
15
+ # _In_ UINT fuFlags )
16
+ attach_function 'CopyImage', [:handle, :uint, :int, :int, LR], :handle
17
+
18
+ #HANDLE LoadImage(
19
+ # __in_opt HINSTANCE hinst,
20
+ # __in LPCTSTR lpszName,
21
+ # __in UINT uType,
22
+ # __in int cxDesired,
23
+ # __in int cyDesired,
24
+ # __in UINT fuLoad)
25
+ attach_function 'LoadImageA', [:hinstance, :pointer, Image, :int, :int, :uint], :handle
26
+ attach_function 'LoadImageW', [:hinstance, :pointer, Image, :int, :int, :uint], :handle
27
+ end
28
+ end
@@ -0,0 +1,29 @@
1
+ require 'win-ffi/functions/user32'
2
+
3
+ module WinFFI
4
+ module User32
5
+ #DWORD GetMenuContextHelpId( HMENU hmenu )
6
+ attach_function 'GetMenuContextHelpId', [:hmenu], :dword
7
+
8
+ #DWORD GetWindowContextHelpId( HWND hwnd )
9
+ attach_function 'GetWindowContextHelpId', [:hwnd], :dword
10
+
11
+ #BOOL SetMenuContextHelpId(
12
+ # HMENU hmenu,
13
+ # DWORD dwContextHelpId )
14
+ attach_function 'SetMenuContextHelpId', [:hmenu, :dword], :bool
15
+
16
+ #BOOL SetWindowContextHelpId(
17
+ # HWND hwnd,
18
+ # DWORD dwContextHelpId )
19
+ attach_function 'SetWindowContextHelpId', [:hwnd, :dword], :bool
20
+
21
+ #BOOL WinHelp(
22
+ # HWND hWndMain,
23
+ # LPCTSTR lpszHelp,
24
+ # UINT uCommand,
25
+ # ULONG_PTR dwData )
26
+ attach_function 'WinHelpA', [:hwnd, :string, :uint, :ulong], :bool
27
+ attach_function 'WinHelpW', [:hwnd, :string, :uint, :ulong], :bool
28
+ end
29
+ end
@@ -0,0 +1,98 @@
1
+ require 'win-ffi/functions/user32'
2
+
3
+ module WinFFI
4
+ module User32
5
+ #LPTSTR WINAPI CharLower( _Inout_ LPTSTR lpsz )
6
+ attach_function 'CharLowerA', [:string], :string
7
+ attach_function 'CharLowerW', [:string], :string
8
+
9
+ #DWORD WINAPI CharLowerBuff(
10
+ # _Inout_ LPTSTR lpsz,
11
+ # _In_ DWORD cchLength )
12
+ attach_function 'CharLowerBuffA', [:string, :dword], :dword
13
+ attach_function 'CharLowerBuffW', [:string, :dword], :dword
14
+
15
+ #LPTSTR WINAPI CharNext( _In_ LPCTSTR lpsz )
16
+ attach_function 'CharNextA', [:string], :string
17
+ attach_function 'CharNextW', [:string], :string
18
+
19
+ #LPSTR WINAPI CharNextExA(
20
+ # _In_ WORD CodePage,
21
+ # _In_ LPCSTR lpCurrentChar,
22
+ # _In_ DWORD dwFlags )
23
+ attach_function 'CharNextExA', [:ushort, :string, :dword], :string
24
+
25
+ #LPTSTR WINAPI CharPrev(
26
+ # _In_ LPCTSTR lpszStart,
27
+ # _In_ LPCTSTR lpszCurrent )
28
+ attach_function 'CharPrevA', [:string, :string], :string
29
+ attach_function 'CharPrevW', [:string, :string], :string
30
+
31
+ #LPSTR WINAPI CharPrevExA(
32
+ # _In_ WORD CodePage,
33
+ # _In_ LPCSTR lpStart,
34
+ # _In_ LPCSTR lpCurrentChar,
35
+ # _In_ DWORD dwFlags )
36
+ attach_function 'CharPrevExA', [:word, :string, :string, :dword], :string
37
+
38
+ #BOOL WINAPI CharToOem(
39
+ # _In_ LPCTSTR lpszSrc,
40
+ # _Out_ LPSTR lpszDst )
41
+ attach_function 'CharToOemA', [:string, :string], :bool
42
+ attach_function 'CharToOemW', [:string, :string], :bool
43
+
44
+ #BOOL WINAPI CharToOemBuff(
45
+ # _In_ LPCTSTR lpszSrc,
46
+ # _Out_ LPSTR lpszDst,
47
+ # _In_ DWORD cchDstLength )
48
+ attach_function 'CharToOemBuffA', [:string, :string, :dword], :bool
49
+ attach_function 'CharToOemBuffW', [:string, :string, :dword], :bool
50
+
51
+ #LPTSTR WINAPI CharUpper( _Inout_ LPTSTR lpsz )
52
+ attach_function 'CharUpperA', [:string], :string
53
+ attach_function 'CharUpperW', [:string], :string
54
+
55
+ #DWORD WINAPI CharUpperBuff(
56
+ # _Inout_ LPTSTR lpsz,
57
+ # _In_ DWORD cchLength )
58
+ attach_function 'CharUpperBuffA', [:string, :dword], :dword
59
+ attach_function 'CharUpperBuffW', [:string, :dword], :dword
60
+
61
+ #BOOL WINAPI IsCharAlpha( _In_ TCHAR ch )
62
+ attach_function 'IsCharAlphaA', [:char], :bool
63
+ attach_function 'IsCharAlphaW', [:char], :bool
64
+
65
+ #BOOL WINAPI IsCharAlphaNumeric( _In_ TCHAR ch )
66
+ attach_function 'IsCharAlphaNumericA', [:char], :bool
67
+ attach_function 'IsCharAlphaNumericW', [:char], :bool
68
+
69
+ #BOOL WINAPI IsCharLower( _In_ TCHAR ch )
70
+ attach_function 'IsCharLowerA', [:char], :bool
71
+ attach_function 'IsCharLowerW', [:char], :bool
72
+
73
+ #BOOL WINAPI IsCharUpper( _In_ TCHAR ch )
74
+ attach_function 'IsCharUpperA', [:char], :bool
75
+ attach_function 'IsCharUpperW', [:char], :bool
76
+
77
+ #int WINAPI LoadString(
78
+ # _In_opt_ HINSTANCE hInstance,
79
+ # _In_ UINT uID,
80
+ # _Out_ LPTSTR lpBuffer,
81
+ # _In_ int nBufferMax )
82
+ attach_function 'LoadStringA', [:hinstance, :uint, :string, :int], :int
83
+ attach_function 'LoadStringW', [:hinstance, :uint, :string, :int], :int
84
+
85
+ #BOOL WINAPI OemToChar(
86
+ # _In_ LPCSTR lpszSrc,
87
+ # _Out_ LPTSTR lpszDst )
88
+ attach_function 'OemToCharA', [:string, :string], :bool
89
+ attach_function 'OemToCharW', [:string, :string], :bool
90
+
91
+ #BOOL WINAPI OemToCharBuff(
92
+ # _In_ LPCSTR lpszSrc,
93
+ # _Out_ LPTSTR lpszDst,
94
+ # _In_ DWORD cchDstLength )
95
+ attach_function 'OemToCharBuffA', [:string, :string, :dword], :bool
96
+ attach_function 'OemToCharBuffW', [:string, :string, :dword], :bool
97
+ end
98
+ end