win-ffi 0.3.0
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.
- 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,24 @@
|
|
|
1
|
+
require 'win-ffi/enums/kernel32'
|
|
2
|
+
|
|
3
|
+
module WinFFI
|
|
4
|
+
module Kernel32
|
|
5
|
+
SoundFlags = enum :sound_flags,
|
|
6
|
+
[
|
|
7
|
+
:SYNC, 0x0000, # play synchronously (default)
|
|
8
|
+
:ASYNC, 0x0001, # play asynchronously
|
|
9
|
+
:NODEFAULT, 0x0002, # silence (!default) if sound not found
|
|
10
|
+
:MEMORY, 0x0004, # pszSound points to a memory file
|
|
11
|
+
:LOOP, 0x0008, # loop the sound until next sndPlaySound
|
|
12
|
+
:NOSTOP, 0x0010, # don:t stop any currently playing sound
|
|
13
|
+
|
|
14
|
+
:NOWAIT, 8192, # don:t wait if the driver is busy
|
|
15
|
+
:ALIAS, 65536, # name is a registry alias
|
|
16
|
+
:ALIAS_ID, 1114112,# alias is a predefined ID
|
|
17
|
+
:FILENAME, 131072, # name is file name
|
|
18
|
+
:RESOURCE, 262148, # name is resource name or atom
|
|
19
|
+
|
|
20
|
+
:PURGE, 0x0040, # purge non-static events for task
|
|
21
|
+
:APPLICATION, 0x0080, # look for application specific association
|
|
22
|
+
]
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
module WinFFI
|
|
2
|
+
|
|
3
|
+
extend LibBase
|
|
4
|
+
|
|
5
|
+
LR = enum :lr,
|
|
6
|
+
[
|
|
7
|
+
:DEFAULTCOLOR, 0x00000000, # The default flag; it does nothing. All it means is "not :MONOCHROME".
|
|
8
|
+
|
|
9
|
+
:MONOCHROME, 0x00000001, # Loads the image in black and white.
|
|
10
|
+
|
|
11
|
+
:LOADTRANSPARENT, 0x00000020, # Retrieves the color value of the first pixel in the image and replaces the
|
|
12
|
+
# corresponding entry in the color table with the default window color (COLOR_WINDOW). All pixels in the image
|
|
13
|
+
# that use that entry become the default window color. This value applies only to images that have corresponding
|
|
14
|
+
# color tables.
|
|
15
|
+
|
|
16
|
+
:DEFAULTSIZE, 0x00000040, # Uses the width or height specified by the system metric values for cursors or icons,
|
|
17
|
+
# if the cxDesired or cyDesired values are set to zero. If this flag is not specified and cxDesired and
|
|
18
|
+
# cyDesired are set to zero, the function uses the actual resource size. If the resource contains multiple
|
|
19
|
+
# images, the function uses the size of the first image.
|
|
20
|
+
|
|
21
|
+
:LOADFROMFILE, 0x00000010, # Loads the stand-alone image from the file specified by lpszName (icon, cursor, or
|
|
22
|
+
# bitmap file).
|
|
23
|
+
|
|
24
|
+
:LOADMAP3DCOLORS, 0x00001000, # Searches the color table for the image and replaces the following shades of gray
|
|
25
|
+
# with the corresponding 3-D color.
|
|
26
|
+
#Dk Gray, RGB(128,128,128) with COLOR_3DSHADOW
|
|
27
|
+
#Gray, RGB(192,192,192) with COLOR_3DFACE
|
|
28
|
+
#Lt Gray, RGB(223,223,223) with COLOR_3DLIGHT
|
|
29
|
+
# Do not use this option if you are loading a bitmap with a color depth greater than 8bpp.
|
|
30
|
+
|
|
31
|
+
:CREATEDIBSECTION, 0x00002000, # When the uType parameter specifies IMAGE_BITMAP, causes the function to return
|
|
32
|
+
# a DIB section bitmap rather than a compatible bitmap. This flag is useful for loading a bitmap without mapping
|
|
33
|
+
# it to the colors of the display device.
|
|
34
|
+
# Do not use this option if you are loading a bitmap with a color depth greater than 8bpp.
|
|
35
|
+
# If fuLoad includes both the :LOADTRANSPARENT and :LOADMAP3DCOLORS values, :LOADTRANSPARENT takes precedence.
|
|
36
|
+
# However, the color table entry is replaced with COLOR_3DFACE rather than COLOR_WINDOW.
|
|
37
|
+
|
|
38
|
+
:SHARED, 0x00008000, # Shares the image handle if the image is loaded multiple times. If :SHARED is not set, a
|
|
39
|
+
# second call to LoadImage for the same resource will load the image again and return a different handle.
|
|
40
|
+
# When you use this flag, the system will destroy the resource when it is no longer needed.
|
|
41
|
+
# Do not use :SHARED for images that have non-standard sizes, that may change after loading, or that are loaded
|
|
42
|
+
# from a file. When loading a system icon or cursor, you must use :SHARED or the function will fail to load the
|
|
43
|
+
# resource. This function finds the first image in the cache with the requested resource name, regardless of the
|
|
44
|
+
# size requested.
|
|
45
|
+
|
|
46
|
+
:VGACOLOR, 0x00000080, # Uses true VGA colors.
|
|
47
|
+
]
|
|
48
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
require 'win-ffi/enums/netapi32'
|
|
2
|
+
|
|
3
|
+
module WinFFI
|
|
4
|
+
module Netapi32
|
|
5
|
+
NetApiStatus = enum :net_api_status,
|
|
6
|
+
[
|
|
7
|
+
:NERR_Success, 0,
|
|
8
|
+
:NERR_InvalidComputer, 2351,
|
|
9
|
+
:NERR_NotPrimary, 2226,
|
|
10
|
+
:NERR_SpeGroupOp, 2234,
|
|
11
|
+
:NERR_LastAdmin, 2452,
|
|
12
|
+
:NERR_BadPassword, 2203,
|
|
13
|
+
:NERR_PasswordTooShort, 2245,
|
|
14
|
+
:NERR_UserNotFound, 2221,
|
|
15
|
+
:ERROR_ACCESS_DENIED, 5,
|
|
16
|
+
:ERROR_NOT_ENOUGH_MEMORY, 8,
|
|
17
|
+
:ERROR_INVALID_PARAMETER, 87,
|
|
18
|
+
:ERROR_INVALID_NAME, 123,
|
|
19
|
+
:ERROR_INVALID_LEVEL, 124,
|
|
20
|
+
:ERROR_SESSION_CREDENTIAL_CONFLICT, 1219,
|
|
21
|
+
:RPC_S_SERVER_UNAVAILABLE, 2147944122,
|
|
22
|
+
:RPC_E_REMOTE_DISABLED, 2147549468,
|
|
23
|
+
]
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
module WinFII
|
|
2
|
+
# Obsolete processor info constants
|
|
3
|
+
|
|
4
|
+
PROCESSOR_INTEL_386 = 386
|
|
5
|
+
PROCESSOR_INTEL_486 = 486
|
|
6
|
+
PROCESSOR_INTEL_PENTIUM = 586
|
|
7
|
+
PROCESSOR_INTEL_IA64 = 2200
|
|
8
|
+
PROCESSOR_AMD_X8664 = 8664
|
|
9
|
+
|
|
10
|
+
# Suite mask constants
|
|
11
|
+
#VersionSuitMask = enum :version_suit_mask, [
|
|
12
|
+
#
|
|
13
|
+
#]
|
|
14
|
+
VER_SERVER_NT = 0x80000000
|
|
15
|
+
VER_WORKSTATION_NT = 0x40000000
|
|
16
|
+
VER_SUITE_SMALLBUSINESS = 0x00000001
|
|
17
|
+
VER_SUITE_ENTERPRISE = 0x00000002
|
|
18
|
+
VER_SUITE_BACKOFFICE = 0x00000004
|
|
19
|
+
VER_SUITE_COMMUNICATIONS = 0x00000008
|
|
20
|
+
VER_SUITE_TERMINAL = 0x00000010
|
|
21
|
+
VER_SUITE_SMALLBUSINESS_RESTRICTED = 0x00000020
|
|
22
|
+
VER_SUITE_EMBEDDEDNT = 0x00000040
|
|
23
|
+
VER_SUITE_DATACENTER = 0x00000080
|
|
24
|
+
VER_SUITE_SINGLEUSERTS = 0x00000100
|
|
25
|
+
VER_SUITE_PERSONAL = 0x00000200
|
|
26
|
+
VER_SUITE_BLADE = 0x00000400
|
|
27
|
+
VER_SUITE_EMBEDDED_RESTRICTED = 0x00000800
|
|
28
|
+
VER_SUITE_SECURITY_APPLIANCE = 0x00001000
|
|
29
|
+
VER_SUITE_STORAGE_SERVER = 0x00002000
|
|
30
|
+
VER_SUITE_COMPUTE_SERVER = 0x00004000
|
|
31
|
+
|
|
32
|
+
# Product mask constants
|
|
33
|
+
|
|
34
|
+
VER_NT_WORKSTATION = 0x0000001
|
|
35
|
+
VER_NT_DOMAIN_CONTROLLER = 0x0000002
|
|
36
|
+
VER_NT_SERVER = 0x0000003
|
|
37
|
+
|
|
38
|
+
# Platform definitions
|
|
39
|
+
|
|
40
|
+
VER_PLATFORM_WIN32s = 0
|
|
41
|
+
VER_PLATFORM_WIN32_WINDOWS = 1
|
|
42
|
+
VER_PLATFORM_WIN32_NT = 2
|
|
43
|
+
|
|
44
|
+
# Version info type constants
|
|
45
|
+
|
|
46
|
+
VER_MINORVERSION = 0x0000001
|
|
47
|
+
VER_MAJORVERSION = 0x0000002
|
|
48
|
+
VER_BUILDNUMBER = 0x0000004
|
|
49
|
+
VER_PLATFORMID = 0x0000008
|
|
50
|
+
VER_SERVICEPACKMINOR = 0x0000010
|
|
51
|
+
VER_SERVICEPACKMAJOR = 0x0000020
|
|
52
|
+
VER_SUITENAME = 0x0000040
|
|
53
|
+
VER_PRODUCT_TYPE = 0x0000080
|
|
54
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
require 'win-ffi/enums/user32'
|
|
2
|
+
|
|
3
|
+
module WinFFI
|
|
4
|
+
module User32
|
|
5
|
+
AppendMenuFlags = enum :append_menu_flags,
|
|
6
|
+
[
|
|
7
|
+
:UNCHECKED, 0x00000000,
|
|
8
|
+
:STRING, 0x00000000,
|
|
9
|
+
:ENABLED, 0x00000000,
|
|
10
|
+
:GRAYED, 0x00000001,
|
|
11
|
+
:DISABLED, 0x00000002,
|
|
12
|
+
:BITMAP, 0x00000004,
|
|
13
|
+
:CHECKED, 0x00000008,
|
|
14
|
+
:POPUP, 0x00000010,
|
|
15
|
+
:MENUBARBREAK, 0x00000020,
|
|
16
|
+
:MENUBREAK, 0x00000040,
|
|
17
|
+
:OWNERDRAW, 0x00000100,
|
|
18
|
+
:SEPARATOR, 0x00000800
|
|
19
|
+
]
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
require 'win-ffi/enums/user32'
|
|
2
|
+
|
|
3
|
+
module WinFFI
|
|
4
|
+
module User32
|
|
5
|
+
# Border flags
|
|
6
|
+
BorderFlags = enum :border_flags,
|
|
7
|
+
[
|
|
8
|
+
:LEFT, 0x0001,
|
|
9
|
+
:TOP, 0x0002,
|
|
10
|
+
:TOPLEFT, 0x0003,
|
|
11
|
+
:RIGHT, 0x0004,
|
|
12
|
+
:TOPRIGHT, 0x0006,
|
|
13
|
+
:BOTTOM, 0x0008,
|
|
14
|
+
:BOTTOMLEFT, 0x0009,
|
|
15
|
+
:DIAGONAL, 0x0010,
|
|
16
|
+
:BOTTOMRIGHT, 0x0012,
|
|
17
|
+
:RECT, 0x0015,
|
|
18
|
+
:DIAGONAL_ENDTOPLEFT, 0x0019,
|
|
19
|
+
:DIAGONAL_ENDTOPRIGHT, 0x0022,
|
|
20
|
+
:DIAGONAL_ENDBOTTOMLEFT, 0x0025,
|
|
21
|
+
:DIAGONAL_ENDBOTTOMRIGHT, 0x0028,
|
|
22
|
+
:MIDDLE, 0x0800, # Fill in the middle
|
|
23
|
+
:SOFT, 0x1000, # For softer buttons
|
|
24
|
+
:ADJUST, 0x2000, # Calculate the space left over
|
|
25
|
+
:FLAT, 0x4000, # For flat rather than 3D borders
|
|
26
|
+
:MONO, 0x8000 # For monochrome borders
|
|
27
|
+
]
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
require 'win-ffi/enums/user32'
|
|
2
|
+
|
|
3
|
+
module WinFFI
|
|
4
|
+
module User32
|
|
5
|
+
ClipboardFormats = enum :clipboard_formats,
|
|
6
|
+
[
|
|
7
|
+
:TEXT, 1,
|
|
8
|
+
:BITMAP, 2,
|
|
9
|
+
:METAFILEPICT, 3,
|
|
10
|
+
:SYLK, 4,
|
|
11
|
+
:DIF, 5,
|
|
12
|
+
:TIFF, 6,
|
|
13
|
+
:OEMTEXT, 7,
|
|
14
|
+
:DIB, 8,
|
|
15
|
+
:PALETTE, 9,
|
|
16
|
+
:PENDATA, 10,
|
|
17
|
+
:RIFF, 11,
|
|
18
|
+
:WAVE, 12,
|
|
19
|
+
:UNICODETEXT, 13,
|
|
20
|
+
:ENHMETAFILE, 14,
|
|
21
|
+
:HDROP, 15,
|
|
22
|
+
:LOCALE, 16,
|
|
23
|
+
:MAX, 18, # Assume Windows 2000 or later
|
|
24
|
+
:OWNERDISPLAY, 0x0080,
|
|
25
|
+
:DSPTEXT, 0x0081,
|
|
26
|
+
:DSPBITMAP, 0x0082,
|
|
27
|
+
:DSPMETAFILEPICT, 0x0083,
|
|
28
|
+
:DSPENHMETAFILE, 0x008E
|
|
29
|
+
]
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require 'win-ffi/enums/user32'
|
|
2
|
+
|
|
3
|
+
module WinFFI
|
|
4
|
+
module User32
|
|
5
|
+
DeviceNotifyFlags = enum :device_notify_flags,
|
|
6
|
+
[
|
|
7
|
+
:WINDOW_HANDLE, 0x00000000, # The hRecipient parameter is a window handle.
|
|
8
|
+
|
|
9
|
+
:SERVICE_HANDLE, 0x00000001, # The hRecipient parameter is a service status handle.
|
|
10
|
+
|
|
11
|
+
# In addition, you can specify the following value.
|
|
12
|
+
:ALL_INTERFACE_CLASSES, 0x00000004, # Notifies the recipient of device interface events for all device interface
|
|
13
|
+
# classes. (The dbcc_classguid member is ignored.) This value can be used only if the dbch_devicetype member is
|
|
14
|
+
# DBT_DEVTYP_DEVICEINTERFACE.
|
|
15
|
+
]
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
require 'win-ffi/enums/user32'
|
|
2
|
+
|
|
3
|
+
module WinFFI
|
|
4
|
+
module User32
|
|
5
|
+
DrawCaptionFlags = enum :draw_caption_flags,
|
|
6
|
+
[
|
|
7
|
+
:ACTIVE, 0x0001,
|
|
8
|
+
:SMALLCAP, 0x0002,
|
|
9
|
+
:ICON, 0x0004,
|
|
10
|
+
:TEXT, 0x0008,
|
|
11
|
+
:INBUTTON, 0x0010,
|
|
12
|
+
:GRADIENT, 0x0020,
|
|
13
|
+
:BUTTONS, 0x1000
|
|
14
|
+
]
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
require 'win-ffi/enums/user32'
|
|
2
|
+
|
|
3
|
+
module WinFFI
|
|
4
|
+
module User32
|
|
5
|
+
DrawFrameControlStateFlags = enum :draw_frame_control_state_flags,
|
|
6
|
+
[
|
|
7
|
+
:CAPTIONCLOSE, 0x0000,
|
|
8
|
+
:CAPTIONMIN, 0x0001,
|
|
9
|
+
:CAPTIONMAX, 0x0002,
|
|
10
|
+
:CAPTIONRESTORE, 0x0003,
|
|
11
|
+
:CAPTIONHELP, 0x0004,
|
|
12
|
+
|
|
13
|
+
:MENUARROW, 0x0000,
|
|
14
|
+
:MENUCHECK, 0x0001,
|
|
15
|
+
:MENUBULLET, 0x0002,
|
|
16
|
+
:MENUARROWRIGHT, 0x0004,
|
|
17
|
+
:SCROLLUP, 0x0000,
|
|
18
|
+
:SCROLLDOWN, 0x0001,
|
|
19
|
+
:SCROLLLEFT, 0x0002,
|
|
20
|
+
:SCROLLRIGHT, 0x0003,
|
|
21
|
+
:SCROLLCOMBOBOX, 0x0005,
|
|
22
|
+
:SCROLLSIZEGRIP, 0x0008,
|
|
23
|
+
:SCROLLSIZEGRIPRIGHT, 0x0010,
|
|
24
|
+
|
|
25
|
+
:BUTTONCHECK, 0x0000,
|
|
26
|
+
:BUTTONRADIOIMAGE, 0x0001,
|
|
27
|
+
:BUTTONRADIOMASK, 0x0002,
|
|
28
|
+
:BUTTONRADIO, 0x0004,
|
|
29
|
+
:BUTTON3STATE, 0x0008,
|
|
30
|
+
:BUTTONPUSH, 0x0010,
|
|
31
|
+
|
|
32
|
+
:INACTIVE, 0x0100,
|
|
33
|
+
:PUSHED, 0x0200,
|
|
34
|
+
:CHECKED, 0x0400,
|
|
35
|
+
|
|
36
|
+
:TRANSPARENT, 0x0800,
|
|
37
|
+
:HOT, 0x1000,
|
|
38
|
+
|
|
39
|
+
:ADJUSTRECT, 0x2000,
|
|
40
|
+
:FLAT, 0x4000,
|
|
41
|
+
:MONO, 0x8000,
|
|
42
|
+
]
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
require 'win-ffi/enums/user32'
|
|
2
|
+
|
|
3
|
+
module WinFFI
|
|
4
|
+
module User32
|
|
5
|
+
# 3D border styles
|
|
6
|
+
EdgeFlags = enum :border_flags,
|
|
7
|
+
[
|
|
8
|
+
:RAISEDOUTER, 0x0001,
|
|
9
|
+
:SUNKENOUTER, 0x0002,
|
|
10
|
+
:OUTER, 0x0003,
|
|
11
|
+
:RAISEDINNER, 0x0004,
|
|
12
|
+
:RAISED, 0x0005,
|
|
13
|
+
:ETCHED, 0x0006,
|
|
14
|
+
:SUNKENINNER, 0x0008,
|
|
15
|
+
:BUMP, 0x0009,
|
|
16
|
+
:SUNKEN, 0x0010,
|
|
17
|
+
:INNER, 0x0012,
|
|
18
|
+
]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
require 'win-ffi/enums/user32'
|
|
2
|
+
|
|
3
|
+
module WinFFI
|
|
4
|
+
module User32
|
|
5
|
+
FEEDBACK_TYPE = enum :feedback_type,
|
|
6
|
+
[
|
|
7
|
+
:TOUCH_CONTACTVISUALIZATION, 1,
|
|
8
|
+
:PEN_BARRELVISUALIZATION, 2,
|
|
9
|
+
:PEN_TAP, 3,
|
|
10
|
+
:PEN_DOUBLETAP, 4,
|
|
11
|
+
:PEN_PRESSANDHOLD, 5,
|
|
12
|
+
:PEN_RIGHTTAP, 6,
|
|
13
|
+
:TOUCH_TAP, 7,
|
|
14
|
+
:TOUCH_DOUBLETAP, 8,
|
|
15
|
+
:TOUCH_PRESSANDHOLD, 9,
|
|
16
|
+
:TOUCH_RIGHTTAP, 10,
|
|
17
|
+
:GESTURE_PRESSANDTAP, 11,
|
|
18
|
+
:MAX, 0xFFFFFFFF
|
|
19
|
+
]
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
require 'win-ffi/enums/user32'
|
|
2
|
+
|
|
3
|
+
module WinFFI
|
|
4
|
+
module User32
|
|
5
|
+
Icon = enum :icon,
|
|
6
|
+
[
|
|
7
|
+
:SMALL, 0,
|
|
8
|
+
:BIG, 1
|
|
9
|
+
]
|
|
10
|
+
#if(_WIN32_WINNT >= 0x0501)
|
|
11
|
+
#define ICON_SMALL2 2
|
|
12
|
+
#endif /* _WIN32_WINNT >= 0x0501 */
|
|
13
|
+
if WindowsVersion >= :xp
|
|
14
|
+
Icon.instance_variable_get(:@kv_map)[:SMALL2] = 2
|
|
15
|
+
Icon.instance_variable_get(:@vk_map)[2] = :SMALL2
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
require 'win-ffi/enums/user32'
|
|
2
|
+
|
|
3
|
+
module WinFFI
|
|
4
|
+
module User32
|
|
5
|
+
KeyEventFlags = enum :key_event_flags,
|
|
6
|
+
[
|
|
7
|
+
:EXTENDEDKEY, 0x0001, # If specified, the scan code was preceded by a prefix byte having the value 0xE0 (224).
|
|
8
|
+
:KEYUP, 0x0002, # If specified, the key is being released. If not specified, the key is being depressed.
|
|
9
|
+
]
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
require 'win-ffi/enums/user32'
|
|
2
|
+
|
|
3
|
+
module WinFFI
|
|
4
|
+
module User32
|
|
5
|
+
KeyboardLayoutFlags = enum :keyboard_layout_flags,
|
|
6
|
+
[
|
|
7
|
+
:ACTIVATE, 0x00000001, # If the specified input locale identifier is not already loaded, the function loads
|
|
8
|
+
# and activates the input locale identifier for the current thread.
|
|
9
|
+
|
|
10
|
+
:SUBSTITUTE_OK, 0x00000002, # Substitutes the specified input locale identifier with another locale preferred
|
|
11
|
+
# by the user. The system starts with this flag set, and it is recommended that your application always use
|
|
12
|
+
# this flag. The substitution occurs only if the registry key HKEY_CURRENT_USER\Keyboard\Layout\Substitutes
|
|
13
|
+
# explicitly defines a substitution locale. For example, if the key includes the value name "00000409" with
|
|
14
|
+
# value "00010409", loading the U.S. English layout ("00000409") causes the Dvorak U.S. English layout
|
|
15
|
+
# ("00010409") to be loaded instead. The system uses :SUBSTITUTE_OK when booting, and it is recommended that
|
|
16
|
+
# all applications use this value when loading input locale identifiers to ensure that the user's preference
|
|
17
|
+
# is selected.
|
|
18
|
+
|
|
19
|
+
:REORDER, 0x00000008, # If this bit is set, the system's circular list of loaded locale identifiers is
|
|
20
|
+
# reordered by moving the locale identifier to the head of the list. If this bit is not set, the list is rotated
|
|
21
|
+
# without a change of order. For example, if a user had an English locale identifier active, as well as having
|
|
22
|
+
# French, German, and Spanish locale identifiers loaded (in that order), then activating the German locale
|
|
23
|
+
# identifier with the KLF_REORDER bit set would produce the following order: German, English, French, Spanish.
|
|
24
|
+
# Activating the German locale identifier without the KLF_REORDER bit set would produce the following order:
|
|
25
|
+
# German, Spanish, English, French. If less than three locale identifiers are loaded, the value of this flag is
|
|
26
|
+
# irrelevant.
|
|
27
|
+
|
|
28
|
+
:REPLACELANG, 0x00000010, # If the new input locale identifier has the same language identifier as a current
|
|
29
|
+
# input locale identifier, the new input locale identifier replaces the current one as the input locale
|
|
30
|
+
# identifier for that language. If this value is not provided and the input locale identifiers have the same
|
|
31
|
+
# language identifiers, the current input locale identifier is not replaced and the function returns NULL.
|
|
32
|
+
|
|
33
|
+
:NOTELLSHELL, 0x00000080, # Prevents a ShellProc hook procedure from receiving an HSHELL_LANGUAGE hook code when
|
|
34
|
+
# the new input locale identifier is loaded. This value is typically used when an application loads multiple
|
|
35
|
+
# input locale identifiers one after another. Applying this value to all but the last input locale identifier
|
|
36
|
+
# delays the shell's processing until all input locale identifiers have been added.
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
:SETFORPROCESS, 0x00000100, #This flag is valid only with :ACTIVATE. Activates the specified input locale
|
|
40
|
+
# identifier for the entire process and sends the WM_INPUTLANGCHANGE message to the current thread's Focus or
|
|
41
|
+
# Active window. Typically, LoadKeyboardLayout activates an input locale identifier only for the current thread.
|
|
42
|
+
|
|
43
|
+
:SHIFTLOCK, 0x00010000, # This is used with KLF_RESET. See KLF_RESET for an explanation.
|
|
44
|
+
#KLF_UNLOADPREVIOUS #This flag is unsupported. Use the UnloadKeyboardLayout function instead.
|
|
45
|
+
|
|
46
|
+
:RESET, 0x40000000, # If set but KLF_SHIFTLOCK is not set, the Caps Lock state is turned off by pressing the
|
|
47
|
+
# Caps Lock key again. If set and KLF_SHIFTLOCK is also set, the Caps Lock state is turned off by pressing
|
|
48
|
+
# either SHIFT key. These two methods are mutually exclusive, and the setting persists as part of the User's
|
|
49
|
+
# profile in the registry.
|
|
50
|
+
]
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
require 'win-ffi/enums/user32'
|
|
2
|
+
|
|
3
|
+
module WinFFI
|
|
4
|
+
module User32
|
|
5
|
+
KeyboardModifiers = enum :keyboard_modifiers,
|
|
6
|
+
[
|
|
7
|
+
:alt, 0x0001, #Either ALT key must be held down.
|
|
8
|
+
:control, 0x0002, #Either CTRL key must be held down.
|
|
9
|
+
:ctrl, 0x0002,
|
|
10
|
+
:norepeat, 0x4000, #Changes the hotkey behavior so that the keyboard auto-repeat does not yield multiple hotkey notifications.
|
|
11
|
+
#Windows Vista and Windows XP/2000: This flag is not supported.
|
|
12
|
+
:shift, 0x0004, #Either SHIFT key must be held down.
|
|
13
|
+
:windows, 0x0008, #Either WINDOWS key was held down. These keys are labeled with the Windows logo. Keyboard shortcuts that involve the WINDOWS key are reserved for use by the operating system.
|
|
14
|
+
]
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
require 'win-ffi/enums/user32'
|
|
2
|
+
|
|
3
|
+
module WinFFI
|
|
4
|
+
module User32
|
|
5
|
+
LayeredWindowAttributesFlags = enum :layered_window_attributes_flags,
|
|
6
|
+
[
|
|
7
|
+
:COLORKEY, 0x00000001, #Use crKey as the transparency color.
|
|
8
|
+
:ALPHA, 0x00000002, # Use bAlpha to determine the opacity of the layered window.
|
|
9
|
+
:OPAQUE, 0x00000004, # Draw an opaque layered window.
|
|
10
|
+
]
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
require 'win-ffi/enums/user32'
|
|
2
|
+
|
|
3
|
+
module WinFFI
|
|
4
|
+
module User32
|
|
5
|
+
MapVirtualKey = enum :map_virtual_key,
|
|
6
|
+
[
|
|
7
|
+
:VK_TO_VSC, 0, # uCode is a virtual-key code and is translated into a scan code. If it is a virtual-key code t
|
|
8
|
+
# hat does not distinguish between left- and right-hand keys, the left-hand scan code is returned. If there is
|
|
9
|
+
# no translation, the function returns 0.
|
|
10
|
+
|
|
11
|
+
:VSC_TO_VK, 1, #uCode is a scan code and is translated into a virtual-key code that does not distinguish between
|
|
12
|
+
# left-hand right-hand keys. If there is no translation, the function returns 0.
|
|
13
|
+
|
|
14
|
+
:VK_TO_CHAR, 2, # uCode is a virtual-key code and is translated into an unshifted character value in the
|
|
15
|
+
# low-order word of the return value. Dead keys (diacritics) are indicated by setting the top bit of the return
|
|
16
|
+
# value. If there is no translation, the function returns 0.
|
|
17
|
+
|
|
18
|
+
:VSC_TO_VK_EX, 3, # uCode is a scan code and is translated into a virtual-key code that distinguishes between
|
|
19
|
+
# left- and right-hand keys. If there is no translation, the function returns 0.
|
|
20
|
+
]
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
require 'win-ffi/enums/user32'
|
|
2
|
+
|
|
3
|
+
module WinFFI
|
|
4
|
+
module User32
|
|
5
|
+
MouseEventFlags = enum :mouse_event_flags,
|
|
6
|
+
[
|
|
7
|
+
:MOVE, 0x0001, # Movement occurred.
|
|
8
|
+
:LEFTDOWN, 0x0002, # The left button is down.
|
|
9
|
+
:LEFTUP, 0x0004, # The left button is up.
|
|
10
|
+
:RIGHTDOWN, 0x0008, # The right button is down.
|
|
11
|
+
:RIGHTUP, 0x0010, # The right button is up.
|
|
12
|
+
:MIDDLEDOWN, 0x0020, # The middle button is down.
|
|
13
|
+
:MIDDLEUP, 0x0040, # The middle button is up.
|
|
14
|
+
:XDOWN, 0x0080, # An X button was pressed.
|
|
15
|
+
:XUP, 0x0100, # An X button was released.
|
|
16
|
+
:WHEEL, 0x0800, # The wheel has been moved, if the mouse has a wheel. The amount of movement is specified in
|
|
17
|
+
# dwData, # The wheel button is rotated.
|
|
18
|
+
:HWHEEL, 0x01000, # The wheel button is tilted.
|
|
19
|
+
:ABSOLUTE, 0x8000, # The dx and dy parameters contain normalized absolute coordinates. If not set, those
|
|
20
|
+
# parameters contain relative data: the change in position since the last reported position. This flag can be
|
|
21
|
+
# set, or not set, regardless of what kind of mouse or mouse-like device, if any, is connected to the system.
|
|
22
|
+
# For further information about relative mouse motion, see the following Remarks section.
|
|
23
|
+
]
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
require 'win-ffi/enums/user32'
|
|
2
|
+
|
|
3
|
+
module WinFFI
|
|
4
|
+
module User32
|
|
5
|
+
MouseKeysFlags = enum :mouse_keys_flags,
|
|
6
|
+
[
|
|
7
|
+
:ctrl, 0x0008, #The CTRL key is down.
|
|
8
|
+
:lbutton, 0x0001, #The left mouse button is down.
|
|
9
|
+
:mbutton, 0x0010, #The middle mouse button is down.
|
|
10
|
+
:rbutton, 0x0002, #The right mouse button is down.
|
|
11
|
+
:shift, 0x0004, #The SHIFT key is down.
|
|
12
|
+
:xbutton1, 0x0020, #The first X button is down.
|
|
13
|
+
:xbutton2, 0x0040 #The second X button is down.
|
|
14
|
+
]
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require 'win-ffi/enums/user32'
|
|
2
|
+
|
|
3
|
+
module WinFFI
|
|
4
|
+
module User32
|
|
5
|
+
|
|
6
|
+
MWMO = enum :mwmo, [
|
|
7
|
+
:ALERTABLE, 0x0002, # The function also returns if an APC has been queued to the thread with QueueUserAPC while
|
|
8
|
+
# the thread is in the waiting state.
|
|
9
|
+
|
|
10
|
+
:INPUTAVAILABLE, 0x0004, # The function returns if input exists for the queue, even if the input has been seen
|
|
11
|
+
# (but not removed) using a call to another function, such as PeekMessage.
|
|
12
|
+
|
|
13
|
+
:WAITALL, 0x0001, # The function returns when all objects in the pHandles array are signaled and an input event
|
|
14
|
+
# has been received, all at the same time.
|
|
15
|
+
]
|
|
16
|
+
end
|
|
17
|
+
end
|