win-ffi 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +36 -0
- data/lib/win-ffi/enums/color_types.rb +61 -0
- data/lib/win-ffi/enums/comctl32/init_common_controls.rb +32 -0
- data/lib/win-ffi/enums/comctl32/window/style/window_class_style.rb +7 -0
- data/lib/win-ffi/enums/comctl32.rb +5 -0
- data/lib/win-ffi/enums/comdlg32/find_replace.rb +28 -0
- data/lib/win-ffi/enums/comdlg32/font.rb +33 -0
- data/lib/win-ffi/enums/extended_name_format.rb +17 -0
- data/lib/win-ffi/enums/firmware_type.rb +12 -0
- data/lib/win-ffi/enums/gdi32/device_context.rb +29 -0
- data/lib/win-ffi/enums/gdi32/dib.rb +8 -0
- data/lib/win-ffi/enums/gdi32/hatch_styles.rb +15 -0
- data/lib/win-ffi/enums/gdi32/pfd_flags.rb +28 -0
- data/lib/win-ffi/enums/gdi32/pfd_layer_type.rb +7 -0
- data/lib/win-ffi/enums/gdi32/pfd_type.rb +7 -0
- data/lib/win-ffi/enums/gdi32/raster_operations.rb +22 -0
- data/lib/win-ffi/enums/gdi32.rb +90 -0
- data/lib/win-ffi/enums/kernel32/activation_context.rb +17 -0
- data/lib/win-ffi/enums/kernel32/computer_name_format.rb +19 -0
- data/lib/win-ffi/enums/kernel32/format_message_flags.rb +16 -0
- data/lib/win-ffi/enums/kernel32/get_module_handle_ex_flag.rb +7 -0
- data/lib/win-ffi/enums/kernel32/global_alloc_flags.rb +14 -0
- data/lib/win-ffi/enums/kernel32/handle.rb +9 -0
- data/lib/win-ffi/enums/kernel32/heap_flags.rb +14 -0
- data/lib/win-ffi/enums/kernel32/local_flags.rb +20 -0
- data/lib/win-ffi/enums/kernel32/memory.rb +12 -0
- data/lib/win-ffi/enums/kernel32/memory_flags.rb +22 -0
- data/lib/win-ffi/enums/kernel32/memory_protection_constants.rb +20 -0
- data/lib/win-ffi/enums/kernel32/set_error_mode_flags.rb +11 -0
- data/lib/win-ffi/enums/kernel32/sound_flags.rb +24 -0
- data/lib/win-ffi/enums/kernel32/volume.rb +13 -0
- data/lib/win-ffi/enums/kernel32.rb +5 -0
- data/lib/win-ffi/enums/lr.rb +48 -0
- data/lib/win-ffi/enums/netapi21/net_api_status.rb +25 -0
- data/lib/win-ffi/enums/netapi32.rb +5 -0
- data/lib/win-ffi/enums/system_info.rb +54 -0
- data/lib/win-ffi/enums/user32/append_menu_flags.rb +21 -0
- data/lib/win-ffi/enums/user32/border_flags.rb +29 -0
- data/lib/win-ffi/enums/user32/clipboard_formats.rb +31 -0
- data/lib/win-ffi/enums/user32/device_notify_flags.rb +17 -0
- data/lib/win-ffi/enums/user32/draw_caption_flags.rb +16 -0
- data/lib/win-ffi/enums/user32/draw_frame_control_flags.rb +15 -0
- data/lib/win-ffi/enums/user32/draw_frame_control_state_flags.rb +44 -0
- data/lib/win-ffi/enums/user32/edge_flags.rb +20 -0
- data/lib/win-ffi/enums/user32/feedback_type.rb +21 -0
- data/lib/win-ffi/enums/user32/get_ancestor_flags.rb +12 -0
- data/lib/win-ffi/enums/user32/icon.rb +19 -0
- data/lib/win-ffi/enums/user32/image.rb +12 -0
- data/lib/win-ffi/enums/user32/key_event_flags.rb +11 -0
- data/lib/win-ffi/enums/user32/keyboard_layout_flags.rb +57 -0
- data/lib/win-ffi/enums/user32/keyboard_modifiers.rb +16 -0
- data/lib/win-ffi/enums/user32/layered_window_attributes_flags.rb +12 -0
- data/lib/win-ffi/enums/user32/map_virtual_key.rb +22 -0
- data/lib/win-ffi/enums/user32/message_filter.rb +11 -0
- data/lib/win-ffi/enums/user32/mouse_event_flags.rb +25 -0
- data/lib/win-ffi/enums/user32/mouse_keys_flags.rb +16 -0
- data/lib/win-ffi/enums/user32/mwmo.rb +17 -0
- data/lib/win-ffi/enums/user32/ocr.rb +32 -0
- data/lib/win-ffi/enums/user32/oic.rb +26 -0
- data/lib/win-ffi/enums/user32/pen_flags.rb +12 -0
- data/lib/win-ffi/enums/user32/pen_mask.rb +14 -0
- data/lib/win-ffi/enums/user32/pointer_flags.rb +82 -0
- data/lib/win-ffi/enums/user32/pointer_input_type.rb +13 -0
- data/lib/win-ffi/enums/user32/process_dpi_awareness.rb +12 -0
- data/lib/win-ffi/enums/user32/queue_status_flags.rb +36 -0
- data/lib/win-ffi/enums/user32/rim.rb +12 -0
- data/lib/win-ffi/enums/user32/touch_injection_flags.rb +13 -0
- data/lib/win-ffi/enums/user32/touch_mask.rb +13 -0
- data/lib/win-ffi/enums/user32/user_object_information_flags.rb +22 -0
- data/lib/win-ffi/enums/user32/virtual_key_flags.rb +214 -0
- data/lib/win-ffi/enums/user32/window/animate_window_flags.rb +31 -0
- data/lib/win-ffi/enums/user32/window/broadcast_system_flags.rb +20 -0
- data/lib/win-ffi/enums/user32/window/broadcast_system_message_flags.rb +12 -0
- data/lib/win-ffi/enums/user32/window/combo_box_message.rb +53 -0
- data/lib/win-ffi/enums/user32/window/get_class_long_flags.rb +34 -0
- data/lib/win-ffi/enums/user32/window/get_window_flags.rb +38 -0
- data/lib/win-ffi/enums/user32/window/get_window_long_flags.rb +16 -0
- data/lib/win-ffi/enums/user32/window/menu_flags.rb +54 -0
- data/lib/win-ffi/enums/user32/window/message_box_flags.rb +90 -0
- data/lib/win-ffi/enums/user32/window/message_box_return.rb +18 -0
- data/lib/win-ffi/enums/user32/window/notification/button_notification.rb +20 -0
- data/lib/win-ffi/enums/user32/window/notification/edit_notification.rb +19 -0
- data/lib/win-ffi/enums/user32/window/notification/static_notification.rb +13 -0
- data/lib/win-ffi/enums/user32/window/peek_message_flags.rb +13 -0
- data/lib/win-ffi/enums/user32/window/set_window_pos_flags.rb +48 -0
- data/lib/win-ffi/enums/user32/window/show_window_flags.rb +41 -0
- data/lib/win-ffi/enums/user32/window/smto.rb +22 -0
- data/lib/win-ffi/enums/user32/window/style/button_control_style.rb +37 -0
- data/lib/win-ffi/enums/user32/window/style/combo_box_style.rb +22 -0
- data/lib/win-ffi/enums/user32/window/style/edit_style.rb +23 -0
- data/lib/win-ffi/enums/user32/window/style/static_style.rb +45 -0
- data/lib/win-ffi/enums/user32/window/style/window_class_style.rb +50 -0
- data/lib/win-ffi/enums/user32/window/style/window_style.rb +85 -0
- data/lib/win-ffi/enums/user32/window/style/window_style_ex.rb +98 -0
- data/lib/win-ffi/enums/user32/window/system_menu_command.rb +37 -0
- data/lib/win-ffi/enums/user32/window/system_metrics_flags.rb +300 -0
- data/lib/win-ffi/enums/user32/window/system_parameters_info_action.rb +225 -0
- data/lib/win-ffi/enums/user32/window/system_parameters_info_flags.rb +246 -0
- data/lib/win-ffi/enums/user32/window/track_popup_menu_flags.rb +70 -0
- data/lib/win-ffi/enums/user32/window/window_long.rb +22 -0
- data/lib/win-ffi/enums/user32/window/window_messages.rb +222 -0
- data/lib/win-ffi/enums/user32/window_hook.rb +56 -0
- data/lib/win-ffi/enums/user32.rb +5 -0
- data/lib/win-ffi/functions/advapi32/process.rb +33 -0
- data/lib/win-ffi/functions/advapi32/system_info.rb +17 -0
- data/lib/win-ffi/functions/comctl32/control.rb +11 -0
- data/lib/win-ffi/functions/comctl32/listbox.rb +20 -0
- data/lib/win-ffi/functions/comctl32.rb +7 -0
- data/lib/win-ffi/functions/comdlg32/color.rb +9 -0
- data/lib/win-ffi/functions/comdlg32/error.rb +6 -0
- data/lib/win-ffi/functions/comdlg32/find_replace.rb +9 -0
- data/lib/win-ffi/functions/comdlg32/font.rb +9 -0
- data/lib/win-ffi/functions/comdlg32.rb +7 -0
- data/lib/win-ffi/functions/gdi32/bitmap.rb +275 -0
- data/lib/win-ffi/functions/gdi32/brush.rb +54 -0
- data/lib/win-ffi/functions/gdi32/device_context.rb +126 -0
- data/lib/win-ffi/functions/gdi32/filled_shape.rb +68 -0
- data/lib/win-ffi/functions/gdi32/font.rb +9 -0
- data/lib/win-ffi/functions/gdi32/metafile.rb +173 -0
- data/lib/win-ffi/functions/gdi32/opengl.rb +29 -0
- data/lib/win-ffi/functions/gdi32/painting_drawing.rb +50 -0
- data/lib/win-ffi/functions/gdi32/text.rb +376 -0
- data/lib/win-ffi/functions/gdi32.rb +7 -0
- data/lib/win-ffi/functions/kernel32/activation.rb +22 -0
- data/lib/win-ffi/functions/kernel32/dll.rb +92 -0
- data/lib/win-ffi/functions/kernel32/error.rb +28 -0
- data/lib/win-ffi/functions/kernel32/filesystem.rb +22 -0
- data/lib/win-ffi/functions/kernel32/handle.rb +29 -0
- data/lib/win-ffi/functions/kernel32/memory.rb +478 -0
- data/lib/win-ffi/functions/kernel32/process.rb +359 -0
- data/lib/win-ffi/functions/kernel32/resource.rb +141 -0
- data/lib/win-ffi/functions/kernel32/sound.rb +10 -0
- data/lib/win-ffi/functions/kernel32/string.rb +38 -0
- data/lib/win-ffi/functions/kernel32/system_info.rb +183 -0
- data/lib/win-ffi/functions/kernel32/time.rb +220 -0
- data/lib/win-ffi/functions/kernel32/volume.rb +130 -0
- data/lib/win-ffi/functions/kernel32.rb +15 -0
- data/lib/win-ffi/functions/msimg32/bitmap.rb +46 -0
- data/lib/win-ffi/functions/msvcrt/handle.rb +13 -0
- data/lib/win-ffi/functions/netapi32/network_management.rb +13 -0
- data/lib/win-ffi/functions/netapi32.rb +7 -0
- data/lib/win-ffi/functions/ntdll/system_info.rb +14 -0
- data/lib/win-ffi/functions/secur32/system_info.rb +30 -0
- data/lib/win-ffi/functions/shell32/icon.rb +49 -0
- data/lib/win-ffi/functions/shutdown.rb +84 -0
- data/lib/win-ffi/functions/thread.rb +230 -0
- data/lib/win-ffi/functions/user32/accessibility.rb +23 -0
- data/lib/win-ffi/functions/user32/authorization.rb +19 -0
- data/lib/win-ffi/functions/user32/bitmap.rb +11 -0
- data/lib/win-ffi/functions/user32/brush.rb +10 -0
- data/lib/win-ffi/functions/user32/caret.rb +36 -0
- data/lib/win-ffi/functions/user32/clipboard.rb +84 -0
- data/lib/win-ffi/functions/user32/controls/button.rb +23 -0
- data/lib/win-ffi/functions/user32/controls/combobox.rb +29 -0
- data/lib/win-ffi/functions/user32/controls/listbox.rb +25 -0
- data/lib/win-ffi/functions/user32/controls/scrollbar.rb +95 -0
- data/lib/win-ffi/functions/user32/cursor.rb +74 -0
- data/lib/win-ffi/functions/user32/dde.rb +214 -0
- data/lib/win-ffi/functions/user32/desktop.rb +76 -0
- data/lib/win-ffi/functions/user32/device.rb +17 -0
- data/lib/win-ffi/functions/user32/device_context.rb +62 -0
- data/lib/win-ffi/functions/user32/display.rb +37 -0
- data/lib/win-ffi/functions/user32/error.rb +10 -0
- data/lib/win-ffi/functions/user32/filled_shape.rb +23 -0
- data/lib/win-ffi/functions/user32/gesture.rb +38 -0
- data/lib/win-ffi/functions/user32/hook.rb +123 -0
- data/lib/win-ffi/functions/user32/icon.rb +98 -0
- data/lib/win-ffi/functions/user32/input.rb +23 -0
- data/lib/win-ffi/functions/user32/keyboard.rb +177 -0
- data/lib/win-ffi/functions/user32/keyboard_accelerators.rb +37 -0
- data/lib/win-ffi/functions/user32/mouse.rb +60 -0
- data/lib/win-ffi/functions/user32/multiple_display_monitors.rb +43 -0
- data/lib/win-ffi/functions/user32/multiple_document_interface.rb +44 -0
- data/lib/win-ffi/functions/user32/painting_drawing.rb +173 -0
- data/lib/win-ffi/functions/user32/pointer.rb +154 -0
- data/lib/win-ffi/functions/user32/power.rb +28 -0
- data/lib/win-ffi/functions/user32/print.rb +14 -0
- data/lib/win-ffi/functions/user32/process.rb +30 -0
- data/lib/win-ffi/functions/user32/raw_input.rb +55 -0
- data/lib/win-ffi/functions/user32/rect.rb +67 -0
- data/lib/win-ffi/functions/user32/resource.rb +28 -0
- data/lib/win-ffi/functions/user32/shell.rb +29 -0
- data/lib/win-ffi/functions/user32/string.rb +98 -0
- data/lib/win-ffi/functions/user32/text.rb +48 -0
- data/lib/win-ffi/functions/user32/touch.rb +69 -0
- data/lib/win-ffi/functions/user32/transform.rb +22 -0
- data/lib/win-ffi/functions/user32/window/configuration.rb +15 -0
- data/lib/win-ffi/functions/user32/window/dialog.rb +167 -0
- data/lib/win-ffi/functions/user32/window/menu.rb +245 -0
- data/lib/win-ffi/functions/user32/window/message.rb +168 -0
- data/lib/win-ffi/functions/user32/window/properties.rb +50 -0
- data/lib/win-ffi/functions/user32/window/timer.rb +37 -0
- data/lib/win-ffi/functions/user32/window/window.rb +546 -0
- data/lib/win-ffi/functions/user32/window/window_class.rb +109 -0
- data/lib/win-ffi/functions/user32/window/window_proc.rb +29 -0
- data/lib/win-ffi/functions/user32/window_station.rb +39 -0
- data/lib/win-ffi/functions/user32.rb +161 -0
- data/lib/win-ffi/functions/winmm.rb +547 -0
- data/lib/win-ffi/functions/wtsapi32/process.rb +12 -0
- data/lib/win-ffi/lib_base.rb +54 -0
- data/lib/win-ffi/struct.rb +15 -0
- data/lib/win-ffi/structs/comctl32/init_common_controls_ex.rb +10 -0
- data/lib/win-ffi/structs/comdlg32/choose_color.rb +23 -0
- data/lib/win-ffi/structs/comdlg32/choose_font.rb +28 -0
- data/lib/win-ffi/structs/comdlg32/find_replace.rb +24 -0
- data/lib/win-ffi/structs/gdi32/abc.rb +9 -0
- data/lib/win-ffi/structs/gdi32/abcfloat.rb +10 -0
- data/lib/win-ffi/structs/gdi32/bitmap.rb +13 -0
- data/lib/win-ffi/structs/gdi32/bitmap_info.rb +11 -0
- data/lib/win-ffi/structs/gdi32/bitmap_info_header.rb +17 -0
- data/lib/win-ffi/structs/gdi32/blend_function.rb +10 -0
- data/lib/win-ffi/structs/gdi32/display_device.rb +12 -0
- data/lib/win-ffi/structs/gdi32/handle_table.rb +7 -0
- data/lib/win-ffi/structs/gdi32/kerning_pair.rb +9 -0
- data/lib/win-ffi/structs/gdi32/log_brush.rb +10 -0
- data/lib/win-ffi/structs/gdi32/log_font.rb +20 -0
- data/lib/win-ffi/structs/gdi32/meta_file_pict.rb +10 -0
- data/lib/win-ffi/structs/gdi32/palette_entry.rb +10 -0
- data/lib/win-ffi/structs/gdi32/pixel_format_descriptor.rb +57 -0
- data/lib/win-ffi/structs/gdi32/rgb_quad.rb +10 -0
- data/lib/win-ffi/structs/kernel32/actctx.rb +22 -0
- data/lib/win-ffi/structs/netapi32/wksta_info_100.rb +9 -0
- data/lib/win-ffi/structs/os_version_info.rb +10 -0
- data/lib/win-ffi/structs/os_version_info_ex.rb +70 -0
- data/lib/win-ffi/structs/paint_struct.rb +12 -0
- data/lib/win-ffi/structs/point.rb +10 -0
- data/lib/win-ffi/structs/rect.rb +28 -0
- data/lib/win-ffi/structs/size.rb +6 -0
- data/lib/win-ffi/structs/user32/controls/combobox_info.rb +13 -0
- data/lib/win-ffi/structs/user32/controls/scroll_info.rb +13 -0
- data/lib/win-ffi/structs/user32/controls/scrollbar_info.rb +13 -0
- data/lib/win-ffi/structs/user32/cursor_info.rb +10 -0
- data/lib/win-ffi/structs/user32/display_device.rb +12 -0
- data/lib/win-ffi/structs/user32/draw_text_params.rb +11 -0
- data/lib/win-ffi/structs/user32/icon_info.rb +11 -0
- data/lib/win-ffi/structs/user32/icon_info_ex.rb +15 -0
- data/lib/win-ffi/structs/user32/last_input_info.rb +8 -0
- data/lib/win-ffi/structs/user32/mouse_move_point.rb +10 -0
- data/lib/win-ffi/structs/user32/msg.rb +16 -0
- data/lib/win-ffi/structs/user32/pointer_info.rb +25 -0
- data/lib/win-ffi/structs/user32/pointer_pen_info.rb +18 -0
- data/lib/win-ffi/structs/user32/pointer_touch_info.rb +17 -0
- data/lib/win-ffi/structs/user32/raw_input_device_list.rb +10 -0
- data/lib/win-ffi/structs/user32/raw_input_header.rb +10 -0
- data/lib/win-ffi/structs/user32/touch_hit_testing_input.rb +11 -0
- data/lib/win-ffi/structs/user32/touch_hit_testing_proximity_evaluation.rb +8 -0
- data/lib/win-ffi/structs/user32/track_mouse_event.rb +10 -0
- data/lib/win-ffi/structs/user32/window/alt_tab_info.rb +17 -0
- data/lib/win-ffi/structs/user32/window/bs_info.rb +12 -0
- data/lib/win-ffi/structs/user32/window/create_struct.rb +22 -0
- data/lib/win-ffi/structs/user32/window/dlg_template.rb +13 -0
- data/lib/win-ffi/structs/user32/window/flashw_info.rb +11 -0
- data/lib/win-ffi/structs/user32/window/gui_thread_info.rb +17 -0
- data/lib/win-ffi/structs/user32/window/luid.rb +8 -0
- data/lib/win-ffi/structs/user32/window/menu_info.rb +13 -0
- data/lib/win-ffi/structs/user32/window/menu_item_info.rb +18 -0
- data/lib/win-ffi/structs/user32/window/menu_item_template.rb +9 -0
- data/lib/win-ffi/structs/user32/window/menubar_info.rb +12 -0
- data/lib/win-ffi/structs/user32/window/msgbox_params.rb +16 -0
- data/lib/win-ffi/structs/user32/window/non_client_metrics.rb +29 -0
- data/lib/win-ffi/structs/user32/window/title_bar_info.rb +9 -0
- data/lib/win-ffi/structs/user32/window/tpm_params.rb +8 -0
- data/lib/win-ffi/structs/user32/window/update_layered_window_info.rb +22 -0
- data/lib/win-ffi/structs/user32/window/window_placement.rb +32 -0
- data/lib/win-ffi/structs/user32/window/window_pos.rb +46 -0
- data/lib/win-ffi/structs/user32/window/wndclass.rb +19 -0
- data/lib/win-ffi/structs/user32/window/wndclassex.rb +40 -0
- data/lib/win-ffi/version.rb +3 -0
- data/lib/win-ffi.rb +42 -0
- metadata +363 -0
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'win-ffi/enums/user32'
|
2
|
+
|
3
|
+
module WinFFI
|
4
|
+
module User32
|
5
|
+
OCR = enum :ocr,
|
6
|
+
[
|
7
|
+
:NORMAL, 32512,
|
8
|
+
:IBEAM, 32513,
|
9
|
+
:WAIT, 32514,
|
10
|
+
:CROSS, 32515,
|
11
|
+
:UP, 32516,
|
12
|
+
:SIZE, 32640, # OBSOLETE: use OCR_SIZEALL
|
13
|
+
:ICON, 32641, # OBSOLETE: use OCR_NORMAL
|
14
|
+
:SIZENWSE, 32642,
|
15
|
+
:SIZENESW, 32643,
|
16
|
+
:SIZEWE, 32644,
|
17
|
+
:SIZENS, 32645,
|
18
|
+
:SIZEALL, 32646,
|
19
|
+
:ICOCUR, 32647, # OBSOLETE: use OIC_WINLOGO
|
20
|
+
:NO, 32648,
|
21
|
+
:APPSTARTING,32650
|
22
|
+
]
|
23
|
+
|
24
|
+
#if(WINVER >= 0x0500)
|
25
|
+
#define OCR_HAND 32649
|
26
|
+
#endif /* WINVER >= 0x0500 */
|
27
|
+
if WindowsVersion >= 2000
|
28
|
+
OCR.instance_variable_get(:@kv_map)[:HAND] = 32649
|
29
|
+
OCR.instance_variable_get(:@vk_map)[32649] = :HAND
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'win-ffi/enums/user32'
|
2
|
+
|
3
|
+
module WinFFI
|
4
|
+
module User32
|
5
|
+
OIC = enum :oic,
|
6
|
+
[
|
7
|
+
:SAMPLE, 32512,
|
8
|
+
:HAND, 32513,
|
9
|
+
:QUES, 32514,
|
10
|
+
:BANG, 32515,
|
11
|
+
:NOTE, 32516,
|
12
|
+
:WINLOGO, 32517,
|
13
|
+
:WARNING, 32515,
|
14
|
+
:ERROR, 32513,
|
15
|
+
:INFORMATION, 32516
|
16
|
+
]
|
17
|
+
|
18
|
+
#if(WINVER >= 0x0600)
|
19
|
+
#define OIC_SHIELD 32518
|
20
|
+
#endif /* WINVER >= 0x0600 */
|
21
|
+
if WindowsVersion >= :vista
|
22
|
+
OIC.instance_variable_get(:@kv_map)[:SHIELD] = 32518
|
23
|
+
OIC.instance_variable_get(:@vk_map)[32518] = :SHIELD
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'win-ffi/enums/user32'
|
2
|
+
|
3
|
+
module WinFFI
|
4
|
+
module User32
|
5
|
+
PenFlags = enum :pen_flags,
|
6
|
+
[
|
7
|
+
:PEN_FLAG_BARREL, 0x00000001, # The barrel button is pressed.
|
8
|
+
:PEN_FLAG_INVERTED, 0x00000002, # The pen is inverted.
|
9
|
+
:PEN_FLAG_ERASER, 0x00000004, # The eraser button is pressed.
|
10
|
+
]
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'win-ffi/enums/user32'
|
2
|
+
|
3
|
+
module WinFFI
|
4
|
+
module User32
|
5
|
+
PenMask = enum :pen_mask,
|
6
|
+
[
|
7
|
+
:PEN_MASK_NONE, 0x00000000, # Default. None of the optional fields are valid.
|
8
|
+
:PEN_MASK_PRESSURE, 0x00000001, # pressure of the POINTER_PEN_INFO structure is valid.
|
9
|
+
:PEN_MASK_ROTATION, 0x00000002, # rotation of the POINTER_PEN_INFO structure is valid.
|
10
|
+
:PEN_MASK_TILT_X, 0x00000004, # tiltX of the POINTER_PEN_INFO structure is valid.
|
11
|
+
:PEN_MASK_TILT_Y, 0x00000008, # tiltY of the POINTER_PEN_INFO structure is valid.
|
12
|
+
]
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
require 'win-ffi/enums/user32'
|
2
|
+
|
3
|
+
module WinFFI
|
4
|
+
module User32
|
5
|
+
PointerFlags = enum :pointer_flags,
|
6
|
+
[
|
7
|
+
:NONE, 0x00000000, # Default
|
8
|
+
|
9
|
+
:NEW, 0x00000001, # Indicates the arrival of a new pointer.
|
10
|
+
|
11
|
+
:INRANGE, 0x00000002, # Indicates that this pointer continues to exist. When this flag is not set,
|
12
|
+
# it indicates the pointer has left detection range. This flag is typically not set only when a hovering pointer
|
13
|
+
# leaves detection range (POINTER_FLAG_UPDATE is set) or when a pointer in contact with a window surface leaves
|
14
|
+
# detection range (POINTER_FLAG_UP is set).
|
15
|
+
|
16
|
+
:INCONTACT, 0x00000004, #Indicates that this pointer is in contact with the digitizer surface.
|
17
|
+
# When this flag is not set, it indicates a hovering pointer.
|
18
|
+
|
19
|
+
:FIRSTBUTTON, 0x00000010, # Indicates a primary action, analogous to a left mouse button down.
|
20
|
+
#A touch pointer has this flag set when it is in contact with the digitizer surface.
|
21
|
+
#A pen pointer has this flag set when it is in contact with the digitizer surface with no buttons pressed.
|
22
|
+
#A mouse pointer has this flag set when the left mouse button is down.
|
23
|
+
|
24
|
+
:SECONDBUTTON, 0x00000020, # Indicates a secondary action, analogous to a right mouse button down.
|
25
|
+
#A touch pointer does not use this flag. A pen pointer has this flag set when it is in contact with the
|
26
|
+
# digitizer surface with the pen barrel button pressed.A mouse pointer has this flag set when the right mouse
|
27
|
+
# button is down.
|
28
|
+
|
29
|
+
:THIRDBUTTON, 0x00000040, # Analogous to a mouse wheel button down. A touch pointer does not use
|
30
|
+
# this flag. A pen pointer does not use this flag. A mouse pointer has this flag set when the mouse wheel button
|
31
|
+
# is down.
|
32
|
+
|
33
|
+
:FOURTHBUTTON, 0x00000080, # Analogous to a first extended mouse (XButton1) button down.
|
34
|
+
# A touch pointer does not use this flag.
|
35
|
+
# A pen pointer does not use this flag.
|
36
|
+
# A mouse pointer has this flag set when the first extended mouse (XBUTTON1) button is down.
|
37
|
+
|
38
|
+
:FIFTHBUTTON, 0x00000100, # Analogous to a second extended mouse (XButton2) button down.
|
39
|
+
# A touch pointer does not use this flag.
|
40
|
+
# A pen pointer does not use this flag.
|
41
|
+
# A mouse pointer has this flag set when the second extended mouse (XBUTTON2) button is down.
|
42
|
+
|
43
|
+
:PRIMARY, 0x00002000, # Indicates that this pointer has been designated as the primary pointer.
|
44
|
+
# A primary pointer is a single pointer that can perform actions beyond those available to non-primary pointers.
|
45
|
+
# For example, when a primary pointer makes contact with a window’s surface, it may provide the window an
|
46
|
+
# opportunity to activate by sending it a WM_POINTERACTIVATE message. The primary pointer is identified from all
|
47
|
+
# current user interactions on the system (mouse, touch, pen, and so on). As such, the primary pointer might not
|
48
|
+
# be associated with your app. The first contact in a multi-touch interaction is set as the primary pointer.
|
49
|
+
# Once a primary pointer is identified, all contacts must be lifted before a new contact can be identified as a
|
50
|
+
# primary pointer. For apps that don't process pointer input, only the primary pointer's events are promoted to
|
51
|
+
# mouse events.
|
52
|
+
|
53
|
+
:CONFIDENCE, 0x000004000, # Confidence is a suggestion from the source device about whether the
|
54
|
+
# pointer represents an intended or accidental interaction, which is especially relevant for PT_TOUCH pointers
|
55
|
+
# where an accidental interaction (such as with the palm of the hand) can trigger input. The presence of this
|
56
|
+
# flag indicates that the source device has high confidence that this input is part of an intended interaction.
|
57
|
+
|
58
|
+
:POINTER_FLAG_CANCELED, 0x000008000, #Indicates that the pointer is departing in an abnormal manner, such as
|
59
|
+
# when the system receives invalid input for the pointer or when a device with active pointers departs abruptly.
|
60
|
+
# If the application receiving the input is in a position to do so, it should treat the interaction as not
|
61
|
+
# completed and reverse any effects of the concerned pointer.
|
62
|
+
|
63
|
+
:POINTER_FLAG_DOWN, 0x00010000, # Indicates that this pointer transitioned to a down state; that is, it made
|
64
|
+
# contact with the digitizer surface.
|
65
|
+
|
66
|
+
:POINTER_FLAG_UPDATE, 0x00020000, # Indicates that this is a simple update that does not include pointer state
|
67
|
+
# changes.
|
68
|
+
|
69
|
+
:POINTER_FLAG_UP, 0x00040000, # Indicates that this pointer transitioned to an up state; that is, it broke
|
70
|
+
# contact with the digitizer surface.
|
71
|
+
|
72
|
+
:POINTER_FLAG_WHEEL, 0x00080000, # Indicates input associated with a pointer wheel. For mouse pointers, this is
|
73
|
+
# equivalent to the action of the mouse scroll wheel (WM_MOUSEWHEEL).
|
74
|
+
|
75
|
+
:POINTER_FLAG_HWHEEL, 0x00100000, # Indicates input associated with a pointer h-wheel. For mouse pointers, this
|
76
|
+
# is equivalent to the action of the mouse horizontal scroll wheel (WM_MOUSEHWHEEL).
|
77
|
+
|
78
|
+
:POINTER_FLAG_CAPTURECHANGED, 0x00200000, # Indicates that this pointer was captured by (associated with)
|
79
|
+
# another element and the original element has lost capture (see WM_POINTERCAPTURECHANGED)
|
80
|
+
]
|
81
|
+
end
|
82
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'win-ffi/enums/user32'
|
2
|
+
|
3
|
+
module WinFFI
|
4
|
+
module User32
|
5
|
+
ProcessDpiAwareness = enum :process_dpi_awareness,
|
6
|
+
[
|
7
|
+
:Process_DPI_Unaware, 0, # DPI unaware
|
8
|
+
:Process_System_DPI_Aware, 1, # System DPI aware
|
9
|
+
:Process_Per_Monitor_DPI_Aware, 2, # Per monitor DPI aware
|
10
|
+
]
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'win-ffi/enums/user32'
|
2
|
+
|
3
|
+
module WinFFI
|
4
|
+
module User32
|
5
|
+
QueueStatusFlags = enum :queue_status_flags, [
|
6
|
+
:KEY, 0x0001, # A WM_KEYUP, WM_KEYDOWN, WM_SYSKEYUP, or WM_SYSKEYDOWN message is in the queue.
|
7
|
+
|
8
|
+
:MOUSEMOVE, 0x0002, # A WM_MOUSEMOVE message is in the queue.
|
9
|
+
|
10
|
+
:MOUSEBUTTON, 0x0004, # A mouse-button message (WM_LBUTTONUP, WM_RBUTTONDOWN, and so on).
|
11
|
+
|
12
|
+
:POSTMESSAGE, 0x0008, # A posted message (other than those listed here) is in the queue.
|
13
|
+
|
14
|
+
:TIMER, 0x0010, # A WM_TIMER message is in the queue.
|
15
|
+
|
16
|
+
:PAINT, 0x0020, # A WM_PAINT message is in the queue.
|
17
|
+
|
18
|
+
:SENDMESSAGE, 0x0040, # A message sent by another thread or application is in the queue.
|
19
|
+
|
20
|
+
:HOTKEY, 0x0080, # A WM_HOTKEY message is in the queue.
|
21
|
+
|
22
|
+
:ALLPOSTMESSAGE, 0x0100, # A posted message (other than those listed here) is in the queue.
|
23
|
+
|
24
|
+
:RAWINPUT, 0x0400, #A raw input message is in the queue. For more information, see Raw Input.
|
25
|
+
#Windows 2000: This flag is not supported.
|
26
|
+
|
27
|
+
:MOUSE, 0x0006, #(:MOUSEMOVE | :MOUSEBUTTON), # A WM_MOUSEMOVE message or mouse-button message
|
28
|
+
# (WM_LBUTTONUP, WM_RBUTTONDOWN, and so on).
|
29
|
+
:INPUT, 0x0407, #(:MOUSE | :KEY | :RAWINPUT), # An input message is in the queue.
|
30
|
+
:ALLEVENTS, 0x04B7, # (:INPUT | :POSTMESSAGE | :TIMER | :PAINT | :HOTKEY), # An input, WM_TIMER, WM_PAINT,
|
31
|
+
# WM_HOTKEY, or posted message is in the queue.
|
32
|
+
:ALLINPUT, 0x04FF, # (:INPUT | :POSTMESSAGE | :TIMER | :PAINT | :HOTKEY | :SENDMESSAGE), # Any message is in the
|
33
|
+
# queue.
|
34
|
+
]
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'win-ffi/enums/user32'
|
2
|
+
|
3
|
+
module WinFFI
|
4
|
+
module User32
|
5
|
+
RIM = enum :rim,
|
6
|
+
[
|
7
|
+
:TYPEMOUSE, 0, # The device is a mouse.
|
8
|
+
:TYPEKEYBOARD, 1, # The device is a keyboard.
|
9
|
+
:TYPEHID, 2, # The device is an HID that is not a keyboard and not a mouse.
|
10
|
+
]
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'win-ffi/enums/user32'
|
2
|
+
|
3
|
+
module WinFFI
|
4
|
+
module User32
|
5
|
+
TouchInjectionFlags = enum :touch_injection_flags,
|
6
|
+
[
|
7
|
+
:TOUCH_FEEDBACK_DEFAULT, 0x1, # Specifies default touch visualizations.
|
8
|
+
:TOUCH_FEEDBACK_INDIRECT, 0x2, # Specifies indirect touch visualizations.
|
9
|
+
:TOUCH_FEEDBACK_NONE, 0x3, # Specifies no touch visualizations.
|
10
|
+
:MAX_TOUCH_COUNT, 256, # Specifies the maximum number of simultaneous contacts.
|
11
|
+
]
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'win-ffi/enums/user32'
|
2
|
+
|
3
|
+
module WinFFI
|
4
|
+
module User32
|
5
|
+
TouchMask = enum :touch_mask,
|
6
|
+
[
|
7
|
+
:TOUCH_MASK_NONE, 0x00000000, #Default. None of the optional fields are valid.
|
8
|
+
:TOUCH_MASK_CONTACTAREA, 0x00000001, #rcContact of the POINTER_TOUCH_INFO structure is valid.
|
9
|
+
:TOUCH_MASK_ORIENTATION, 0x00000002, #orientation of the POINTER_TOUCH_INFO structure is valid.
|
10
|
+
:TOUCH_MASK_PRESSURE, 0x00000004, #pressure of the POINTER_TOUCH_INFO structure is valid.
|
11
|
+
]
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'win-ffi/enums/user32'
|
2
|
+
|
3
|
+
module WinFFI
|
4
|
+
module User32
|
5
|
+
UserObjectInformationFlags = enum :user_object_information_flags, [
|
6
|
+
:FLAGS, 1, # The handle flags. The pvInfo parameter must point to a USEROBJECTFLAGS structure.
|
7
|
+
:NAME, 2, # The name of the object, as a string.
|
8
|
+
:TYPE, 3, # The type name of the object, as a string.
|
9
|
+
:USER_SID, 4, # The SID structure that identifies the user that is currently associated with the specified
|
10
|
+
# object. If no user is associated with the object, the value returned in the buffer pointed to by
|
11
|
+
# lpnLengthNeeded is zero. Note that SID is a variable length structure. You will usually make a call to
|
12
|
+
# GetUserObjectInformation to determine the length of the SID before retrieving its value.
|
13
|
+
|
14
|
+
:HEAPSIZE, 5, # The size of the desktop heap, in KB, as a ULONG value. The hObj parameter must be a handle to a
|
15
|
+
# desktop object, otherwise, the function fails.
|
16
|
+
# Windows Server 2003 and Windows XP/2000: This value is not supported.
|
17
|
+
|
18
|
+
:IO, 6, # TRUE if the hObj parameter is a handle to the desktop object that is receiving input from the user.
|
19
|
+
# FALSE otherwise. Windows Server 2003 and Windows XP/2000: This value is not supported.
|
20
|
+
]
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,214 @@
|
|
1
|
+
require 'win-ffi/enums/user32'
|
2
|
+
|
3
|
+
module WinFFI
|
4
|
+
module User32
|
5
|
+
VirtualKeyFlags = enum :virtual_key_flags,
|
6
|
+
[
|
7
|
+
:lbutton, 0x01, #Left mouse button
|
8
|
+
:rbutton, 0x02, #Right mouse button
|
9
|
+
:cancel, 0x03, #Control-break processing
|
10
|
+
:mbutton, 0x04, #Middle mouse button (three-button mouse)
|
11
|
+
:xbutton1, 0x05, #X1 mouse button
|
12
|
+
:xbutton2, 0x06, #X2 mouse button
|
13
|
+
#-, 0x07, #Undefined
|
14
|
+
:backspace, 0x08, #BACKSPACE key
|
15
|
+
:tab, 0x09, #TAB key
|
16
|
+
#-, 0x0A-0B, #Reserved
|
17
|
+
:clear, 0x0C, #CLEAR key
|
18
|
+
:enter, 0x0D, #ENTER key
|
19
|
+
#:return, 0x0D, #ENTER key
|
20
|
+
#-, 0x0E-0F, #Undefined
|
21
|
+
:shift, 0x10, #SHIFT key
|
22
|
+
:control, 0x11, #CTRL key
|
23
|
+
:menu, 0x12, #ALT key
|
24
|
+
:pause, 0x13, #PAUSE key
|
25
|
+
:capital, 0x14, #CAPS LOCK key
|
26
|
+
:kana, 0x15, #IME Kana mode
|
27
|
+
:hanguel, 0x15, #IME Hanguel mode (maintained for compatibility; use :HANGUL)
|
28
|
+
:hangul, 0x15, #IME Hangul mode
|
29
|
+
#-, 0x16, #Undefined
|
30
|
+
:junja, 0x17, #IME Junja mode
|
31
|
+
:final, 0x18, #IME final mode
|
32
|
+
:hanja, 0x19, #IME Hanja mode
|
33
|
+
:kanji, 0x19, #IME Kanji mode
|
34
|
+
#-, 0x1A, #Undefined
|
35
|
+
:esc, 0x1B, #ESC key
|
36
|
+
#:escape, 0x1B, #ESC key
|
37
|
+
:convert, 0x1C, #IME convert
|
38
|
+
:nonconvert, 0x1D, #IME nonconvert
|
39
|
+
:accept, 0x1E, #IME accept
|
40
|
+
:modechange, 0x1F, #IME mode change request
|
41
|
+
:space, 0x20, #SPACEBAR
|
42
|
+
:prior, 0x21, #PAGE UP key
|
43
|
+
:next, 0x22, #PAGE DOWN key
|
44
|
+
:end, 0x23, #END key
|
45
|
+
:home, 0x24, #HOME key
|
46
|
+
:left, 0x25, #LEFT ARROW key
|
47
|
+
:up, 0x26, #UP ARROW key
|
48
|
+
:right, 0x27, #RIGHT ARROW key
|
49
|
+
:down, 0x28, #DOWN ARROW key
|
50
|
+
:select, 0x29, #SELECT key
|
51
|
+
:print, 0x2A, #PRINT key
|
52
|
+
:execute, 0x2B, #EXECUTE key
|
53
|
+
:snapshot, 0x2C, #PRINT SCREEN key
|
54
|
+
:ins, 0x2D, #INS key
|
55
|
+
:insert, 0x2D, #INS key
|
56
|
+
:del, 0x2E, #DEL key
|
57
|
+
:delete, 0x2E, #DEL key
|
58
|
+
:help, 0x2F, #HELP
|
59
|
+
:n0, 0x30,
|
60
|
+
:n1, 0x31,
|
61
|
+
:n2, 0x32,
|
62
|
+
:n3, 0x33,
|
63
|
+
:n4, 0x34,
|
64
|
+
:n5, 0x35,
|
65
|
+
:n6, 0x36,
|
66
|
+
:n7, 0x37,
|
67
|
+
:n8, 0x38,
|
68
|
+
:n9, 0x39,
|
69
|
+
:'0', 0x30,
|
70
|
+
:'1', 0x31,
|
71
|
+
:'2', 0x32,
|
72
|
+
:'3', 0x33,
|
73
|
+
:'4', 0x34,
|
74
|
+
:'5', 0x35,
|
75
|
+
:'6', 0x36,
|
76
|
+
:'7', 0x37,
|
77
|
+
:'8', 0x38,
|
78
|
+
:'9', 0x39,
|
79
|
+
#-, 0x3A-40, #Undefined,
|
80
|
+
:a, 0x41,
|
81
|
+
:b, 0x42,
|
82
|
+
:c, 0x43,
|
83
|
+
:d, 0x44,
|
84
|
+
:e, 0x45,
|
85
|
+
:f, 0x46,
|
86
|
+
:g, 0x47,
|
87
|
+
:h, 0x48,
|
88
|
+
:i, 0x49,
|
89
|
+
:j, 0x4A,
|
90
|
+
:k, 0x4B,
|
91
|
+
:l, 0x4C,
|
92
|
+
:m, 0x4D,
|
93
|
+
:n, 0x4E,
|
94
|
+
:o, 0x4F,
|
95
|
+
:p, 0x50,
|
96
|
+
:q, 0x51,
|
97
|
+
:r, 0x52,
|
98
|
+
:s, 0x53,
|
99
|
+
:t, 0x54,
|
100
|
+
:u, 0x55,
|
101
|
+
:v, 0x56,
|
102
|
+
:w, 0x57,
|
103
|
+
:x, 0x58,
|
104
|
+
:y, 0x59,
|
105
|
+
:z, 0x5A,
|
106
|
+
:lwin, 0x5B, #Left Windows key (Natural keyboard)
|
107
|
+
:rwin, 0x5C, #Right Windows_key (Natural keyboard)
|
108
|
+
:apps, 0x5D, #Applications_key (Natural keyboard)
|
109
|
+
#-, 0x5E, #Reserved
|
110
|
+
:sleep, 0x5F, #Computer Sleep key
|
111
|
+
:numpad0, 0x60, #Numeric keypad 0 key
|
112
|
+
:numpad1, 0x61, #Numeric keypad 1 key
|
113
|
+
:numpad2, 0x62, #Numeric keypad 2 key
|
114
|
+
:numpad3, 0x63, #Numeric keypad 3 key
|
115
|
+
:numpad4, 0x64, #Numeric keypad 4 key
|
116
|
+
:numpad6, 0x66, #Numeric keypad 6 key
|
117
|
+
:numpad7, 0x67, #Numeric keypad 7 key
|
118
|
+
:numpad8, 0x68, #Numeric keypad 8 key
|
119
|
+
:numpad5, 0x65, #Numeric keypad 5 key
|
120
|
+
:numpad9, 0x69, #Numeric keypad 9 key
|
121
|
+
:multiply, 0x6A, #Multiply key
|
122
|
+
:add, 0x6B, #Add key
|
123
|
+
:separator, 0x6C, #Separator key
|
124
|
+
:subtract, 0x6D, #Subtract key
|
125
|
+
:decimal, 0x6E, #Decimal key
|
126
|
+
:divide, 0x6F, #Divide key
|
127
|
+
:f1, 0x70, #F1_key
|
128
|
+
:f2, 0x71, #F2_key
|
129
|
+
:f3, 0x72, #F3_key
|
130
|
+
:f4, 0x73, #F4_key
|
131
|
+
:f5, 0x74, #F5_key
|
132
|
+
:f6, 0x75, #F6_key
|
133
|
+
:f7, 0x76, #F7_key
|
134
|
+
:f8, 0x77, #F8_key
|
135
|
+
:f9, 0x78, #F9_key
|
136
|
+
:f10, 0x79, #F10_key
|
137
|
+
:f11, 0x7A, #F11_key
|
138
|
+
:f12, 0x7B, #F12_key
|
139
|
+
:f13, 0x7C, #F13_key
|
140
|
+
:f14, 0x7D, #F14_key
|
141
|
+
:f15, 0x7E, #F15_key
|
142
|
+
:f16, 0x7F, #F16_key
|
143
|
+
:f17, 0x80, #F17_key
|
144
|
+
:f18, 0x81, #F18_key
|
145
|
+
:f19, 0x82, #F19_key
|
146
|
+
:f20, 0x83, #F20_key
|
147
|
+
:f21, 0x84, #F21_key
|
148
|
+
:f22, 0x85, #F22_key
|
149
|
+
:f23, 0x86, #F23_key
|
150
|
+
:f24, 0x87, #F24_key
|
151
|
+
#-, 0x88-8F, #Unassigned
|
152
|
+
:numlock, 0x90, #NUM LOCK_key
|
153
|
+
:scroll, 0x91, #SCROLL LOCK_key,
|
154
|
+
# 0x92-96, #OEM specific
|
155
|
+
#-, 0x97-9F, #Unassigned
|
156
|
+
:lshift, 0xA0, #Left SHIFT_key
|
157
|
+
:rshift, 0xA1, #Right SHIFT_key
|
158
|
+
:lcontrol, 0xA2, #Left CONTROL_key
|
159
|
+
:rcontrol, 0xA3, #Right CONTROL_key
|
160
|
+
:lmenu, 0xA4, #Left MENU_key
|
161
|
+
:rmenu, 0xA5, #Right MENU_key
|
162
|
+
:browser_back, 0xA6, #Browser Back_key
|
163
|
+
:browser_forward, 0xA7, #Browser Forward_key
|
164
|
+
:browser_refresh, 0xA8, #Browser Refresh_key
|
165
|
+
:browser_stop, 0xA9, #Browser Stop_key
|
166
|
+
:browser_search, 0xAA, #Browser Search_key
|
167
|
+
:browser_favorites, 0xAB, #Browser Favorites_key
|
168
|
+
:browser_home, 0xAC, #Browser Start and Home_key
|
169
|
+
:volume_mute, 0xAD, #Volume Mute_key
|
170
|
+
:volume_down, 0xAE, #Volume Down_key
|
171
|
+
:volume_up, 0xAF, #Volume Up_key
|
172
|
+
:media_next_track, 0xB0, #Next Track_key
|
173
|
+
:media_prev_track, 0xB1, #Previous Track_key
|
174
|
+
:media_stop, 0xB2, #Stop Media_key
|
175
|
+
:media_play_pause, 0xB3, #Play/Pause Media_key
|
176
|
+
:launch_mail, 0xB4, #Start Mail_key
|
177
|
+
:launch_media_select, 0xB5, #Select Media_key
|
178
|
+
:launch_app1, 0xB6, #Start Application 1_key
|
179
|
+
:launch_app2, 0xB7, #Start Application 2_key
|
180
|
+
#-, 0xB8-B9, Reserved
|
181
|
+
:oem_1, 0xBA, #Used for miscellaneous characters; it can vary by_keyboard. For the US standard_keyboard, the ';:'_key
|
182
|
+
:oem_plus, 0xBB, #For any country/region, the '+'_key
|
183
|
+
:oem_comma, 0xBC, #For any country/region, the ','_key
|
184
|
+
:oem_minus, 0xBD, #For any country/region, the '-'_key
|
185
|
+
:oem_period, 0xBE, #For any country/region, the '.'_key
|
186
|
+
:oem_2, 0xBF, #Used for miscellaneous characters; it can vary by_keyboard. For the US standard_keyboard, the '/?'_key
|
187
|
+
:oem_3, 0xC0, #Used for miscellaneous characters; it can vary by_keyboard. For the US standard_keyboard, the '`~'_key
|
188
|
+
#-, 0xC1-D7, Reserved
|
189
|
+
#-, 0xD8-DA, Assigned
|
190
|
+
:oem_4, 0xDB, #Used for miscellaneous characters; it can vary by_keyboard. For the US standard_keyboard, the '[{'_key
|
191
|
+
:oem_5, 0xDC, #Used for miscellaneous characters; it can vary by_keyboard. For the US standard_keyboard, the '\|'_key
|
192
|
+
:oem_6, 0xDD, #Used for miscellaneous characters; it can vary by_keyboard. For the US standard_keyboard, the ']}'_key
|
193
|
+
:oem_7, 0xDE, #Used for miscellaneous characters; it can vary by_keyboard. For the US standard_keyboard, the 'single-quote/double-quote'_key
|
194
|
+
:oem_8, 0xDF, #Used for miscellaneous characters; it can vary by_keyboard.
|
195
|
+
#-, 0xE0, Reserved
|
196
|
+
# 0xE1, OEM Specific
|
197
|
+
:oem_102, 0xE2, #Either the angle bracket_key or the backslash_key on the RT 102-key_keyboard,
|
198
|
+
# 0xE3-E4, #OEM specific
|
199
|
+
:process, 0xE5, #IME PROCESS_key,
|
200
|
+
# 0xE6, #OEM specific
|
201
|
+
:packet, 0xE7, #Used to pass Unicode characters as if they were_keystrokes. The :PACKET_key is the low word of a 32-bit Virtual_key value used for non-keyboard input methods. For more information, see Remark in_keyBDINPUT, SendInput, WM_KEYDOWN, and WM_KEYUP
|
202
|
+
#-, 0xE8, #Unassigned,
|
203
|
+
# 0xE9-F5, #OEM specific
|
204
|
+
:attn, 0xF6, #Attn_key
|
205
|
+
:crsel, 0xF7, #CrSel_key
|
206
|
+
:exsel, 0xF8, #ExSel_key
|
207
|
+
:ereof, 0xF9, #Erase EOF_key
|
208
|
+
:play, 0xFA, #Play_key
|
209
|
+
:zoom, 0xFB, #Zoom_key
|
210
|
+
:noname, 0xFC, #Reserved
|
211
|
+
:pa1, 0xFD, #PA1_key
|
212
|
+
]
|
213
|
+
end
|
214
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'win-ffi/enums/user32'
|
2
|
+
|
3
|
+
module WinFFI
|
4
|
+
module User32
|
5
|
+
AnimateWindowFlags = enum :animate_window, [
|
6
|
+
:HOR_POSITIVE, 0x00000001, # Animates the window from left to right. This flag can be used with roll or slide
|
7
|
+
# animation. It is ignored when used with AW_CENTER or AW_BLEND.
|
8
|
+
|
9
|
+
:HOR_NEGATIVE, 0x00000002, # Animates the window from right to left. This flag can be used with roll or slide
|
10
|
+
# animation. It is ignored when used with AW_CENTER or AW_BLEND.
|
11
|
+
|
12
|
+
:SLIDE, 0x00040000, # Uses slide animation. By default, roll animation is used. This flag is ignored when used
|
13
|
+
# with AW_CENTER.
|
14
|
+
|
15
|
+
:VER_POSITIVE, 0x00000004, # Animates the window from top to bottom. This flag can be used with roll or slide
|
16
|
+
# animation. It is ignored when used with AW_CENTER or AW_BLEND.
|
17
|
+
|
18
|
+
:VER_NEGATIVE, 0x00000008, # Animates the window from bottom to top. This flag can be used with roll or slide
|
19
|
+
# animation. It is ignored when used with AW_CENTER or AW_BLEND.
|
20
|
+
|
21
|
+
:CENTER, 0x00000010, # Makes the window appear to collapse inward if AW_HIDE is used or expand outward if the
|
22
|
+
# AW_HIDE is not used. The various direction flags have no effect.
|
23
|
+
|
24
|
+
:HIDE, 0x00010000, # Hides the window. By default, the window is shown.
|
25
|
+
|
26
|
+
:ACTIVATE, 0x00020000, # Activates the window. Do not use this value with AW_HIDE.
|
27
|
+
|
28
|
+
:BLEND, 0x00080000, # Uses a fade effect. This flag can be used only if hwnd is a top-level window.
|
29
|
+
]
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'win-ffi/enums/user32'
|
2
|
+
|
3
|
+
module WinFFI
|
4
|
+
module User32
|
5
|
+
BroadcastSystemFlags = enum :broadcast_system_flags,
|
6
|
+
[
|
7
|
+
:QUERY, 0x00000001,
|
8
|
+
:IGNORECURRENTTASK, 0x00000002,
|
9
|
+
:FLUSHDISK, 0x00000004,
|
10
|
+
:NOHANG, 0x00000008,
|
11
|
+
:POSTMESSAGE, 0x00000010,
|
12
|
+
:NOTIMEOUTIFNOTHUNG, 0x00000040,
|
13
|
+
:FORCEIFHUNG, 0x00000020,
|
14
|
+
:ALLOWSFW, 0x00000080,
|
15
|
+
:SENDNOTIFYMESSAGE, 0x00000100,
|
16
|
+
:RETURNHDESK, 0x00000200,
|
17
|
+
:LUID, 0x00000400
|
18
|
+
]
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'win-ffi/enums/user32'
|
2
|
+
|
3
|
+
module WinFFI
|
4
|
+
module User32
|
5
|
+
BroadcastSystemMessageFlags = enum :broadcast_system_message_flags,
|
6
|
+
[
|
7
|
+
:ALLCOMPONENTS, 0x00000000, #Broadcast to all system components.
|
8
|
+
:APPLICATIONS, 0x00000008, # Broadcast to applications.
|
9
|
+
:ALLDESKTOPS, 0x00000010, # Broadcast to all desktops. Requires the SE_TCB_NAME privilege.
|
10
|
+
]
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
require 'win-ffi/enums/user32'
|
2
|
+
|
3
|
+
module WinFFI
|
4
|
+
module User32
|
5
|
+
ComboBoxMessage = enum :combo_box_message,
|
6
|
+
[
|
7
|
+
:GETEDITSEL, 0x0140,
|
8
|
+
:LIMITTEXT, 0x0141,
|
9
|
+
:SETEDITSEL, 0x0142,
|
10
|
+
:ADDSTRING, 0x0143,
|
11
|
+
:DELETESTRING, 0x0144,
|
12
|
+
:DIR, 0x0145,
|
13
|
+
:GETCOUNT, 0x0146,
|
14
|
+
:GETCURSEL, 0x0147,
|
15
|
+
:GETLBTEXT, 0x0148,
|
16
|
+
:GETLBTEXTLEN, 0x0149,
|
17
|
+
:INSERTSTRING, 0x014A,
|
18
|
+
:RESETCONTENT, 0x014B,
|
19
|
+
:FINDSTRING, 0x014C,
|
20
|
+
:SELECTSTRING, 0x014D,
|
21
|
+
:SETCURSEL, 0x014E,
|
22
|
+
:SHOWDROPDOWN, 0x014F,
|
23
|
+
:GETITEMDATA, 0x0150,
|
24
|
+
:SETITEMDATA, 0x0151,
|
25
|
+
:GETDROPPEDCONTROLRECT, 0x0152,
|
26
|
+
:SETITEMHEIGHT, 0x0153,
|
27
|
+
:GETITEMHEIGHT, 0x0154,
|
28
|
+
:SETEXTENDEDUI, 0x0155,
|
29
|
+
:GETEXTENDEDUI, 0x0156,
|
30
|
+
:GETDROPPEDSTATE, 0x0157,
|
31
|
+
:FINDSTRINGEXACT, 0x0158,
|
32
|
+
:SETLOCALE, 0x0159,
|
33
|
+
:GETLOCALE, 0x015A,
|
34
|
+
:GETTOPINDEX, 0x015b,
|
35
|
+
:MSGMAX, 0x015B,
|
36
|
+
:SETTOPINDEX, 0x015c,
|
37
|
+
:GETHORIZONTALEXTENT, 0x015d,
|
38
|
+
:SETHORIZONTALEXTENT, 0x015e,
|
39
|
+
:GETDROPPEDWIDTH, 0x015f,
|
40
|
+
:SETDROPPEDWIDTH, 0x0160,
|
41
|
+
:INITSTORAGE, 0x0161,
|
42
|
+
:MSGMAX, 0x0162,
|
43
|
+
:MULTIPLEADDSTRING, 0x0163,
|
44
|
+
:MSGMAX, 0x0163,
|
45
|
+
]
|
46
|
+
if WindowsVersion >= :xp
|
47
|
+
ComboBoxMessage.instance_variable_get(:@kv_map)[:GETCOMBOBOXINFO] = 0x0164
|
48
|
+
ComboBoxMessage.instance_variable_get(:@kv_map)[:MSGMAX] = 0x0165
|
49
|
+
ComboBoxMessage.instance_variable_get(:@kv_map)[0x0164] = :GETCOMBOBOXINFO
|
50
|
+
ComboBoxMessage.instance_variable_get(:@kv_map)[0x0165] = :MSGMAX
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|