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,546 @@
|
|
1
|
+
require 'win-ffi/functions/user32'
|
2
|
+
|
3
|
+
require_relative '../../../enums/user32/window/animate_window_flags'
|
4
|
+
require_relative '../../../enums/user32/window/get_window_flags'
|
5
|
+
require_relative '../../../enums/user32/window/set_window_pos_flags'
|
6
|
+
require_relative '../../../enums/user32/window/show_window_flags'
|
7
|
+
require_relative '../../../enums/user32/window/system_metrics_flags'
|
8
|
+
require_relative '../../../enums/user32/window/track_popup_menu_flags'
|
9
|
+
require_relative '../../../enums/user32/window/style/window_style'
|
10
|
+
require_relative '../../../enums/user32/window/style/window_style_ex'
|
11
|
+
require_relative '../../../enums/user32/get_ancestor_flags'
|
12
|
+
require_relative '../../../enums/user32/message_filter'
|
13
|
+
|
14
|
+
require_relative '../../../structs/user32/window/alt_tab_info'
|
15
|
+
require_relative '../../../structs/user32/window/flashw_info'
|
16
|
+
require_relative '../../../structs/user32/window/gui_thread_info'
|
17
|
+
require_relative '../../../structs/user32/window/update_layered_window_info'
|
18
|
+
require_relative '../../../structs/user32/window/title_bar_info'
|
19
|
+
require_relative '../../../structs/user32/window/window_placement'
|
20
|
+
|
21
|
+
module WinFFI
|
22
|
+
module User32
|
23
|
+
|
24
|
+
typedef :pointer, :hdwp
|
25
|
+
|
26
|
+
#BOOL WINAPI AdjustWindowRect(
|
27
|
+
# _Inout_ LPRECT lpRect,
|
28
|
+
# _In_ DWORD dwStyle, // except WS_OVERLAPPED
|
29
|
+
# _In_ BOOL bMenu )
|
30
|
+
attach_function 'AdjustWindowRect', [WinFFI::RECT.ptr, WindowStyle, :bool], :bool
|
31
|
+
|
32
|
+
#BOOL WINAPI AdjustWindowRectEx(
|
33
|
+
# _Inout_ LPRECT lpRect,
|
34
|
+
# _In_ DWORD dwStyle, // except WS_OVERLAPPED
|
35
|
+
# _In_ BOOL bMenu,
|
36
|
+
# _In_ DWORD dwExStyle )
|
37
|
+
attach_function 'AdjustWindowRectEx', [WinFFI::RECT.ptr, WindowStyle, :bool, WindowStyleEx], :bool
|
38
|
+
|
39
|
+
# BOOL WINAPI AllowSetForegroundWindow( _In_ DWORD dwProcessId )
|
40
|
+
attach_function 'AllowSetForegroundWindow', [:dword], :bool
|
41
|
+
|
42
|
+
#BOOL WINAPI AnimateWindow(
|
43
|
+
# _In_ HWND hwnd,
|
44
|
+
# _In_ DWORD dwTime,
|
45
|
+
# _In_ DWORD dwFlags )
|
46
|
+
attach_function 'AnimateWindow', [:hwnd, :dword, AnimateWindowFlags], :bool
|
47
|
+
|
48
|
+
#BOOL WINAPI AnyPopup( void )
|
49
|
+
attach_function 'AnyPopup', [ ], :bool
|
50
|
+
|
51
|
+
#UINT WINAPI ArrangeIconicWindows( _In_ HWND hWnd )
|
52
|
+
attach_function 'ArrangeIconicWindows', [:hwnd], :uint
|
53
|
+
|
54
|
+
#HDWP WINAPI BeginDeferWindowPos( _In_ int nNumWindows )
|
55
|
+
attach_function 'BeginDeferWindowPos', [:int], :hdwp
|
56
|
+
|
57
|
+
#BOOL WINAPI BringWindowToTop(_In_ HWND hWnd )
|
58
|
+
attach_function 'BringWindowToTop', [:hwnd], :bool
|
59
|
+
|
60
|
+
#WORD WINAPI CascadeWindows(
|
61
|
+
# _In_opt_ HWND hwndParent,
|
62
|
+
# _In_ UINT wHow,
|
63
|
+
# _In_opt_ const RECT *lpRect,
|
64
|
+
# _In_ UINT cKids,
|
65
|
+
# _In_opt_ const HWND *lpKids )
|
66
|
+
attach_function 'CascadeWindows', [:hwnd, :uint, WinFFI::RECT.ptr, :uint, :pointer], :word
|
67
|
+
|
68
|
+
#HWND WINAPI ChildWindowFromPoint(
|
69
|
+
# _In_ HWND hWndParent,
|
70
|
+
# _In_ POINT Point )
|
71
|
+
attach_function 'ChildWindowFromPoint', [:hwnd, POINT], :hwnd
|
72
|
+
|
73
|
+
#HWND WINAPI ChildWindowFromPointEx(
|
74
|
+
# _In_ HWND hwndParent,
|
75
|
+
# _In_ POINT pt,
|
76
|
+
# _In_ UINT uFlags )
|
77
|
+
attach_function 'ChildWindowFromPointEx', [:hwnd, POINT, :uint], :hwnd
|
78
|
+
|
79
|
+
#Actually minimizes
|
80
|
+
#BOOL CloseWindow( __in HWND hWnd )
|
81
|
+
attach_function 'CloseWindow', [:hwnd], :bool
|
82
|
+
|
83
|
+
#void WINAPI CreateOwnedToolWindow(
|
84
|
+
# _In_ IInspectable *pOwnerWindow,
|
85
|
+
# _In_opt_ LPCTSTR lpWindowNTitle,
|
86
|
+
# _In_ int x,
|
87
|
+
# _In_ int y,
|
88
|
+
# _In_ UINT32 nWidth,
|
89
|
+
# _In_ UINT32 nHeight,
|
90
|
+
# _Out_ IInspectable **ppWindow)
|
91
|
+
#attach_function 'CreateOwnedToolWindow', [:pointer, :string, :int, :int, :uint32, :uint32, :pointer], :void
|
92
|
+
|
93
|
+
class << self
|
94
|
+
def CreateWindowA(lpClassName, lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)
|
95
|
+
CreateWindowExA(0, lpClassName, lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)
|
96
|
+
end
|
97
|
+
|
98
|
+
def CreateWindowW(lpClassName, lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)
|
99
|
+
CreateWindowExW(0, lpClassName, lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
#HWND CreateWindowEx(
|
104
|
+
# __in DWORD dwExStyle,
|
105
|
+
# __in_opt LPCTSTR lpClassName,
|
106
|
+
# __in_opt LPCTSTR lpWindowName,
|
107
|
+
# __in DWORD dwStyle,
|
108
|
+
# __in int x,
|
109
|
+
# __in int y,
|
110
|
+
# __in int nWidth,
|
111
|
+
# __in int nHeight,
|
112
|
+
# __in_opt HWND hWndParent,
|
113
|
+
# __in_opt HMENU hMenu,
|
114
|
+
# __in_opt HINSTANCE hInstance,
|
115
|
+
# __in_opt LPVOID lpParam )
|
116
|
+
attach_function 'CreateWindowExA', [:dword, :pointer, :buffer_in , :dword, :int, :int, :int, :int, :hwnd, :hmenu, :hinstance, :pointer], :hwnd
|
117
|
+
attach_function 'CreateWindowExW', [:dword, :pointer, :buffer_in , :dword, :int, :int, :int, :int, :hwnd, :hmenu, :hinstance, :pointer], :hwnd
|
118
|
+
|
119
|
+
#HDWP WINAPI DeferWindowPos(
|
120
|
+
# _In_ HDWP hWinPosInfo,
|
121
|
+
# _In_ HWND hWnd,
|
122
|
+
# _In_opt_ HWND hWndInsertAfter,
|
123
|
+
# _In_ int x,
|
124
|
+
# _In_ int y,
|
125
|
+
# _In_ int cx,
|
126
|
+
# _In_ int cy,
|
127
|
+
# _In_ UINT uFlags )
|
128
|
+
attach_function 'DeferWindowPos', [:pointer, :hwnd, :hwnd, :int, :int, :int, :int, SetWindowPosFlags], :hdwp
|
129
|
+
|
130
|
+
#BOOL WINAPI DeregisterShellHookWindow( _In_ HWND hWnd )
|
131
|
+
attach_function 'DeregisterShellHookWindow', [:hwnd], :bool
|
132
|
+
|
133
|
+
#BOOL DestroyWindow(
|
134
|
+
# __in HWND hWnd)
|
135
|
+
attach_function 'DestroyWindow', [:hwnd], :bool
|
136
|
+
|
137
|
+
#BOOL WINAPI EndDeferWindowPos( _In_ HDWP hWinPosInfo )
|
138
|
+
attach_function 'EndDeferWindowPos', [:hdwp], :bool
|
139
|
+
|
140
|
+
#BOOL WINAPI EndTask(
|
141
|
+
# _In_ HWND hWnd,
|
142
|
+
# _In_ BOOL fShutDown,
|
143
|
+
# _In_ BOOL fForce )
|
144
|
+
attach_function 'EndTask', [:hwnd, :bool, :bool], :bool
|
145
|
+
|
146
|
+
#BOOL WINAPI EnumChildWindows(
|
147
|
+
# _In_opt_ HWND hWndParent,
|
148
|
+
# _In_ WNDENUMPROC lpEnumFunc,
|
149
|
+
# _In_ LPARAM lParam )
|
150
|
+
attach_function 'EnumChildWindows', [:hwnd, :pointer, :lparam], :bool
|
151
|
+
|
152
|
+
#BOOL WINAPI EnumThreadWindows(
|
153
|
+
# _In_ DWORD dwThreadId,
|
154
|
+
# _In_ WNDENUMPROC lpfn,
|
155
|
+
# _In_ LPARAM lParam )
|
156
|
+
attach_function 'EnumThreadWindows', [:dword, :pointer, :lparam], :bool
|
157
|
+
|
158
|
+
#BOOL CALLBACK EnumThreadWndProc(
|
159
|
+
# _In_ HWND hwnd,
|
160
|
+
# _In_ LPARAM lParam )
|
161
|
+
callback 'EnumThreadWndProc', [:hwnd, :lparam], :bool
|
162
|
+
|
163
|
+
#TODO
|
164
|
+
#BOOL WINAPI EnumWindows(
|
165
|
+
# _In_ WNDENUMPROC lpEnumFunc,
|
166
|
+
# _In_ LPARAM lParam )
|
167
|
+
attach_function 'EnumWindows', [:pointer, :lparam], :bool
|
168
|
+
|
169
|
+
#HWND WINAPI FindWindow(
|
170
|
+
# _In_opt_ LPCTSTR lpClassName,
|
171
|
+
# _In_opt_ LPCTSTR lpWindowName )
|
172
|
+
attach_function 'FindWindowA', [:buffer_in, :buffer_in], :hwnd
|
173
|
+
attach_function 'FindWindowW', [:buffer_in, :buffer_in], :hwnd
|
174
|
+
|
175
|
+
#HWND WINAPI FindWindowEx(
|
176
|
+
# _In_opt_ HWND hwndParent,
|
177
|
+
# _In_opt_ HWND hwndChildAfter,
|
178
|
+
# _In_opt_ LPCTSTR lpszClass,
|
179
|
+
# _In_opt_ LPCTSTR lpszWindow )
|
180
|
+
attach_function 'FindWindowExA', [:hwnd, :hwnd, :buffer_in, :buffer_in], :hwnd
|
181
|
+
attach_function 'FindWindowExW', [:hwnd, :hwnd, :buffer_in, :buffer_in], :hwnd
|
182
|
+
|
183
|
+
#BOOL WINAPI FlashWindow(
|
184
|
+
# _In_ HWND hWnd,
|
185
|
+
# _In_ BOOL bInvert )
|
186
|
+
attach_function 'FlashWindow', [:hwnd, :bool], :bool
|
187
|
+
|
188
|
+
#BOOL WINAPI FlashWindowEx( _In_ PFLASHWINFO pfwi )
|
189
|
+
attach_function 'FlashWindowEx', [FlashwInfo.ptr], :bool
|
190
|
+
|
191
|
+
#BOOL WINAPI GetAltTabInfo(
|
192
|
+
# _In_opt_ HWND hwnd,
|
193
|
+
# _In_ int iItem,
|
194
|
+
# _Inout_ PALTTABINFO pati,
|
195
|
+
# _Out_opt_ LPTSTR pszItemText,
|
196
|
+
# _In_ UINT cchItemText )
|
197
|
+
attach_function 'GetAltTabInfoA', [:hwnd, :int, AltTabInfo.ptr, :string, :uint], :bool
|
198
|
+
attach_function 'GetAltTabInfoW', [:hwnd, :int, AltTabInfo.ptr, :string, :uint], :bool
|
199
|
+
|
200
|
+
#HWND WINAPI GetAncestor(
|
201
|
+
# _In_ HWND hwnd,
|
202
|
+
# _In_ UINT gaFlags )
|
203
|
+
attach_function 'GetAncestor', [:hwnd, GetAncestorFlags], :hwnd
|
204
|
+
|
205
|
+
#BOOL GetClientRect(
|
206
|
+
# __in HWND hWnd,
|
207
|
+
# __out LPRECT lpRect)
|
208
|
+
attach_function 'GetClientRect', [:hwnd, WinFFI::RECT.ptr], :bool
|
209
|
+
|
210
|
+
#HWND GetDesktopWindow(void)
|
211
|
+
attach_function 'GetDesktopWindow', [], :hwnd
|
212
|
+
|
213
|
+
#HWND WINAPI GetForegroundWindow(void)
|
214
|
+
attach_function 'GetForegroundWindow', [], :hwnd
|
215
|
+
|
216
|
+
#BOOL WINAPI GetGUIThreadInfo(
|
217
|
+
# _In_ DWORD idThread,
|
218
|
+
# _Inout_ LPGUITHREADINFO lpgui )
|
219
|
+
attach_function 'GetGUIThreadInfo', [:dword, GuiThreadInfo.ptr], :bool
|
220
|
+
|
221
|
+
#HWND WINAPI GetLastActivePopup( _In_ HWND hWnd )
|
222
|
+
attach_function 'GetLastActivePopup', [:hwnd], :hwnd
|
223
|
+
|
224
|
+
#HWND WINAPI GetNextWindow(
|
225
|
+
# _In_ HWND hWnd,
|
226
|
+
# _In_ UINT wCmd )
|
227
|
+
#attach_function 'GetNextWindow', [:hwnd, GetWindowFlags], :hwnd
|
228
|
+
|
229
|
+
#HWND WINAPI GetParent( _In_ HWND hWnd )
|
230
|
+
attach_function 'GetParent', [:hwnd], :hwnd
|
231
|
+
|
232
|
+
#BOOL WINAPI GetProcessDefaultLayout( _Out_ DWORD *pdwDefaultLayout )
|
233
|
+
attach_function 'GetProcessDefaultLayout', [:pointer], :bool
|
234
|
+
|
235
|
+
#HWND GetShellWindow(void)
|
236
|
+
attach_function 'GetShellWindow', [], :hwnd
|
237
|
+
|
238
|
+
#DWORD WINAPI GetSysColor( _In_ int nIndex )
|
239
|
+
attach_function 'GetSysColor', [WinFFI::ColorTypes], :dword
|
240
|
+
|
241
|
+
#int WINAPI GetSystemMetrics( _In_ int nIndex )
|
242
|
+
attach_function 'GetSystemMetrics', [SystemMetricsFlags], :int
|
243
|
+
|
244
|
+
#BOOL WINAPI GetTitleBarInfo(
|
245
|
+
# _In_ HWND hwnd,
|
246
|
+
# _Inout_ PTITLEBARINFO pti )
|
247
|
+
attach_function 'GetTitleBarInfo', [:hwnd, TitleBarInfo.ptr], :bool
|
248
|
+
|
249
|
+
#HWND WINAPI GetTopWindow( _In_opt_ HWND hWnd )
|
250
|
+
attach_function 'GetTopWindow', [:hwnd], :hwnd
|
251
|
+
|
252
|
+
#HWND WINAPI GetWindow(
|
253
|
+
# _In_ HWND hWnd,
|
254
|
+
# _In_ UINT uCmd )
|
255
|
+
attach_function 'GetWindow', [:hwnd, GetWindowFlags], :hwnd
|
256
|
+
|
257
|
+
#TODO
|
258
|
+
#BOOL GetWindowInfo(
|
259
|
+
# __in HWND hwnd,
|
260
|
+
# __inout PWINDOWINFO pwi)
|
261
|
+
attach_function 'GetWindowInfo', [:hwnd, :pointer], :bool
|
262
|
+
|
263
|
+
#UINT WINAPI GetWindowModuleFileName(
|
264
|
+
# _In_ HWND hwnd,
|
265
|
+
# _Out_ LPTSTR lpszFileName,
|
266
|
+
# _In_ UINT cchFileNameMax )
|
267
|
+
attach_function 'GetWindowModuleFileName', [:hwnd, :string, :uint], :uint
|
268
|
+
attach_function 'GetWindowModuleFileNameA', [:hwnd, :string, :uint], :uint
|
269
|
+
attach_function 'GetWindowModuleFileNameW', [:hwnd, :string, :uint], :uint
|
270
|
+
|
271
|
+
#BOOL GetWindowPlacement(
|
272
|
+
# __in HWND hWnd,
|
273
|
+
# __inout WINDOWPLACEMENT *lpwndpl)
|
274
|
+
attach_function 'GetWindowPlacement', [:hwnd, WindowPlacement.ptr], :bool
|
275
|
+
|
276
|
+
#BOOL GetWindowRect(
|
277
|
+
# __in HWND hWnd,
|
278
|
+
# __out LPRECT lpRect)
|
279
|
+
attach_function 'GetWindowRect', [:hwnd, RECT.ptr], :void
|
280
|
+
|
281
|
+
#int WINAPI GetWindowText(
|
282
|
+
# _In_ HWND hWnd,
|
283
|
+
# _Out_ LPTSTR lpString,
|
284
|
+
# _In_ int nMaxCount )
|
285
|
+
attach_function 'GetWindowTextA', [:hwnd, :pointer, :int], :int
|
286
|
+
attach_function 'GetWindowTextW', [:hwnd, :pointer, :int], :int
|
287
|
+
|
288
|
+
#int WINAPI GetWindowTextLength( _In_ HWND hWnd )
|
289
|
+
attach_function 'GetWindowTextLengthA', [:hwnd], :int
|
290
|
+
attach_function 'GetWindowTextLengthW', [:hwnd], :int
|
291
|
+
|
292
|
+
#DWORD WINAPI GetWindowThreadProcessId(
|
293
|
+
# _In_ HWND hWnd,
|
294
|
+
# _Out_opt_ LPDWORD lpdwProcessId )
|
295
|
+
attach_function 'GetWindowThreadProcessId', [:hwnd, :pointer], :dword
|
296
|
+
|
297
|
+
#int WINAPI InternalGetWindowText(
|
298
|
+
# _In_ HWND hWnd,
|
299
|
+
# _Out_ LPWSTR lpString,
|
300
|
+
# _In_ int nMaxCount )
|
301
|
+
attach_function 'InternalGetWindowText', [:hwnd, :string, :int], :int
|
302
|
+
|
303
|
+
#BOOL WINAPI IsChild(
|
304
|
+
# _In_ HWND hWndParent,
|
305
|
+
# _In_ HWND hWnd )
|
306
|
+
attach_function 'IsChild', [:hwnd, :hwnd], :bool
|
307
|
+
|
308
|
+
#BOOL WINAPI IsHungAppWindow( _In_ HWND hWnd )
|
309
|
+
attach_function 'IsHungAppWindow', [:hwnd], :bool
|
310
|
+
|
311
|
+
#BOOL WINAPI IsIconic( _In_ HWND hWnd )
|
312
|
+
attach_function 'IsIconic', [:hwnd], :bool
|
313
|
+
|
314
|
+
#BOOL WINAPI IsWindow( _In_opt_ HWND hWnd )
|
315
|
+
attach_function 'IsWindow', [:hwnd], :bool
|
316
|
+
|
317
|
+
#BOOL WINAPI IsWindowUnicode( _In_ HWND hWnd )
|
318
|
+
attach_function 'IsWindowUnicode', [:hwnd], :bool
|
319
|
+
|
320
|
+
#BOOL WINAPI IsWindowVisible( _In_ HWND hWnd )
|
321
|
+
attach_function 'IsWindowVisible', [:hwnd], :bool
|
322
|
+
|
323
|
+
#BOOL WINAPI IsZoomed( _In_ HWND hWnd )
|
324
|
+
attach_function 'IsZoomed', [:hwnd], :bool
|
325
|
+
|
326
|
+
#BOOL WINAPI LockSetForegroundWindow( _In_ UINT uLockCode )
|
327
|
+
attach_function 'LockSetForegroundWindow', [:uint], :bool
|
328
|
+
|
329
|
+
#BOOL WINAPI MoveWindow(
|
330
|
+
# __in HWND hWnd,
|
331
|
+
# __in int X,
|
332
|
+
# __in int Y,
|
333
|
+
# __in int nWidth,
|
334
|
+
# __in int nHeight,
|
335
|
+
# __in BOOL bRepaint)
|
336
|
+
attach_function 'MoveWindow', [:hwnd, :int, :int, :int, :int, :bool], :bool
|
337
|
+
|
338
|
+
#BOOL WINAPI OpenIcon( _In_ HWND hWnd )
|
339
|
+
attach_function 'OpenIcon', [:hwnd], :bool
|
340
|
+
|
341
|
+
#HWND WINAPI RealChildWindowFromPoint(
|
342
|
+
# _In_ HWND hwndParent,
|
343
|
+
# _In_ POINT ptParentClientCoords )
|
344
|
+
attach_function 'RealChildWindowFromPoint', [:hwnd, WinFFI::POINT], :hwnd
|
345
|
+
|
346
|
+
#UINT WINAPI RealGetWindowClass(
|
347
|
+
# _In_ HWND hwnd,
|
348
|
+
# _Out_ LPTSTR pszType,
|
349
|
+
# _In_ UINT cchType )
|
350
|
+
attach_function 'RealGetWindowClass', [:hwnd, :string, :uint], :uint
|
351
|
+
attach_function 'RealGetWindowClassA', [:hwnd, :string, :uint], :uint
|
352
|
+
attach_function 'RealGetWindowClassW', [:hwnd, :string, :uint], :uint
|
353
|
+
|
354
|
+
#BOOL WINAPI RegisterShellHookWindow( _In_ HWND hWnd )
|
355
|
+
attach_function 'RegisterShellHookWindow', [:hwnd], :bool
|
356
|
+
|
357
|
+
#BOOL WINAPI SetForegroundWindow( _In_ HWND hWnd )
|
358
|
+
attach_function 'SetForegroundWindow', [:hwnd], :bool
|
359
|
+
|
360
|
+
#BOOL WINAPI SetLayeredWindowAttributes(
|
361
|
+
# _In_ HWND hwnd,
|
362
|
+
# _In_ COLORREF crKey,
|
363
|
+
# _In_ BYTE bAlpha,
|
364
|
+
# _In_ DWORD dwFlags )
|
365
|
+
attach_function 'SetLayeredWindowAttributes', [:hwnd, :colorref, :byte, LayeredWindowAttributesFlags], :bool
|
366
|
+
|
367
|
+
#HWND WINAPI SetParent(
|
368
|
+
# _In_ HWND hWndChild,
|
369
|
+
# _In_opt_ HWND hWndNewParent )
|
370
|
+
attach_function 'SetParent', [:hwnd, :hwnd], :hwnd
|
371
|
+
|
372
|
+
#BOOL WINAPI SetProcessDefaultLayout( _In_ DWORD dwDefaultLayout )
|
373
|
+
attach_function 'SetProcessDefaultLayout', [:dword], :bool
|
374
|
+
|
375
|
+
#BOOL WINAPI SetSysColors(
|
376
|
+
# _In_ int cElements,
|
377
|
+
# _In_ const INT *lpaElements,
|
378
|
+
# _In_ const COLORREF *lpaRgbValues )
|
379
|
+
attach_function 'SetSysColors', [:int, :pointer, :pointer], :bool
|
380
|
+
|
381
|
+
#BOOL WINAPI SetWindowPos(
|
382
|
+
# _In_ HWND hWnd,
|
383
|
+
# _In_opt_ HWND hWndInsertAfter,
|
384
|
+
# _In_ int X,
|
385
|
+
# _In_ int Y,
|
386
|
+
# _In_ int cx,
|
387
|
+
# _In_ int cy,
|
388
|
+
# _In_ UINT uFlags )
|
389
|
+
attach_function 'SetWindowPos', [:hwnd, :hwnd, :int, :int, :int, :int, SetWindowPosFlags], :bool
|
390
|
+
|
391
|
+
#BOOL SetWindowPlacement(
|
392
|
+
# __in HWND hWnd,
|
393
|
+
# __inout WINDOWPLACEMENT *lpwndpl)
|
394
|
+
attach_function 'SetWindowPlacement', [:hwnd, WindowPlacement.ptr], :bool
|
395
|
+
|
396
|
+
#BOOL WINAPI SetWindowText(
|
397
|
+
# __in HWND hWnd,
|
398
|
+
# __in_opt LPCTSTR lpString)
|
399
|
+
attach_function 'SetWindowTextA', [:hwnd, :string], :bool
|
400
|
+
attach_function 'SetWindowTextW', [:hwnd, :string], :bool
|
401
|
+
|
402
|
+
#BOOL WINAPI ShowOwnedPopups(
|
403
|
+
# _In_ HWND hWnd,
|
404
|
+
# _In_ BOOL fShow )
|
405
|
+
attach_function 'ShowOwnedPopups', [:hwnd, :bool], :bool
|
406
|
+
|
407
|
+
#BOOL ShowWindow(
|
408
|
+
# __in HWND hWnd,
|
409
|
+
# __in int nCmdShow)
|
410
|
+
attach_function 'ShowWindow', [:hwnd, ShowWindowFlags], :bool
|
411
|
+
|
412
|
+
#BOOL WINAPI ShowWindowAsync(
|
413
|
+
# _In_ HWND hWnd,
|
414
|
+
# _In_ int nCmdShow )
|
415
|
+
attach_function 'ShowWindowAsync', [:hwnd, :int], :bool
|
416
|
+
|
417
|
+
# [This function is not intended for general use. It may be altered or unavailable in subsequent versions of Windows.]
|
418
|
+
#VOID WINAPI SwitchToThisWindow(
|
419
|
+
# _In_ HWND hWnd,
|
420
|
+
# _In_ BOOL fAltTab )
|
421
|
+
attach_function 'SwitchToThisWindow', [:hwnd, :bool], :void
|
422
|
+
|
423
|
+
#WORD WINAPI TileWindows(
|
424
|
+
# _In_opt_ HWND hwndParent,
|
425
|
+
# _In_ UINT wHow,
|
426
|
+
# _In_opt_ const RECT *lpRect,
|
427
|
+
# _In_ UINT cKids,
|
428
|
+
# _In_opt_ const HWND *lpKids )
|
429
|
+
attach_function 'TileWindows', [:hwnd, :uint, WinFFI::RECT.ptr, :uint, :pointer], :word
|
430
|
+
|
431
|
+
#BOOL WINAPI UpdateLayeredWindow(
|
432
|
+
# _In_ HWND hwnd,
|
433
|
+
# _In_opt_ HDC hdcDst,
|
434
|
+
# _In_opt_ POINT *pptDst,
|
435
|
+
# _In_opt_ SIZE *psize,
|
436
|
+
# _In_opt_ HDC hdcSrc,
|
437
|
+
# _In_opt_ POINT *pptSrc,
|
438
|
+
# _In_ COLORREF crKey,
|
439
|
+
# _In_opt_ BLENDFUNCTION *pblend,
|
440
|
+
# _In_ DWORD dwFlags )
|
441
|
+
attach_function 'UpdateLayeredWindow', [:hwnd, :hdc, WinFFI::POINT.ptr, WinFFI::SIZE.ptr, :hdc, WinFFI::POINT.ptr, :colorref, :pointer, LayeredWindowAttributesFlags], :bool
|
442
|
+
|
443
|
+
#HWND WINAPI WindowFromPoint( _In_ POINT Point )
|
444
|
+
attach_function 'WindowFromPoint', [WinFFI::POINT], :hwnd
|
445
|
+
|
446
|
+
#int CALLBACK WinMain(
|
447
|
+
# _In_ HINSTANCE hInstance,
|
448
|
+
# _In_ HINSTANCE hPrevInstance,
|
449
|
+
# _In_ LPSTR lpCmdLine,
|
450
|
+
# _In_ int nCmdShow )
|
451
|
+
callback 'WinMain', [:hinstance, :hinstance, :string, :int], :int
|
452
|
+
|
453
|
+
if WindowsVersion >= :xp
|
454
|
+
|
455
|
+
#BOOL WINAPI GetLayeredWindowAttributes(
|
456
|
+
# _In_ HWND hwnd,
|
457
|
+
# _Out_opt_ COLORREF *pcrKey,
|
458
|
+
# _Out_opt_ BYTE *pbAlpha,
|
459
|
+
# _Out_opt_ DWORD *pdwFlags )
|
460
|
+
attach_function 'GetLayeredWindowAttributes', [:hwnd, :pointer, :pointer, :pointer], :bool
|
461
|
+
|
462
|
+
#BOOL WINAPI IsGUIThread( _In_ BOOL bConvert )
|
463
|
+
attach_function 'IsGUIThread', [:bool], :bool
|
464
|
+
|
465
|
+
if WindowsVersion >= :vista
|
466
|
+
|
467
|
+
#BOOL WINAPI ChangeWindowMessageFilter(
|
468
|
+
# _In_ UINT message,
|
469
|
+
# _In_ DWORD dwFlag )
|
470
|
+
attach_function 'ChangeWindowMessageFilter', [:uint, MessageFilter], :bool
|
471
|
+
|
472
|
+
#BOOL WINAPI GetWindowMinimizeRect (
|
473
|
+
# HWND hwndToQuery,
|
474
|
+
# RECT* pRect )
|
475
|
+
attach_function 'GetWindowMinimizeRect', [:hwnd, WinFFI::RECT.ptr], :bool
|
476
|
+
|
477
|
+
#BOOL WINAPI IsProcessDPIAware(void)
|
478
|
+
attach_function 'IsProcessDPIAware', [], :bool
|
479
|
+
|
480
|
+
#BOOL WINAPI LogicalToPhysicalPoint(
|
481
|
+
# _In_ HWND hWnd,
|
482
|
+
# _Inout_ LPPOINT lpPoint )
|
483
|
+
attach_function 'LogicalToPhysicalPoint', [:hwnd, WinFFI::POINT.ptr], :bool
|
484
|
+
|
485
|
+
#BOOL WINAPI PhysicalToLogicalPoint(
|
486
|
+
# _In_ HWND hWnd,
|
487
|
+
# _Inout_ LPPOINT lpPoint )
|
488
|
+
attach_function 'PhysicalToLogicalPoint', [:hwnd, WinFFI::POINT.ptr], :bool
|
489
|
+
|
490
|
+
#BOOL WINAPI SetProcessDPIAware(void)
|
491
|
+
attach_function 'SetProcessDPIAware', [], :bool
|
492
|
+
|
493
|
+
#BOOL WINAPI SoundSentry(void)
|
494
|
+
attach_function 'SoundSentry', [], :bool
|
495
|
+
|
496
|
+
#BOOL WINAPI UpdateLayeredWindowIndirect(
|
497
|
+
# _In_ HWND hwnd,
|
498
|
+
# _In_ const UPDATELAYEREDWINDOWINFO *pULWInfo )
|
499
|
+
attach_function 'UpdateLayeredWindowIndirect', [:hwnd, UpdateLayeredWindowInfo.ptr], :bool
|
500
|
+
|
501
|
+
#HWND WINAPI WindowFromPhysicalPoint( _In_ POINT Point )
|
502
|
+
attach_function 'WindowFromPhysicalPoint', [WinFFI::POINT], :hwnd
|
503
|
+
|
504
|
+
if WindowsVersion >= 7
|
505
|
+
|
506
|
+
#BOOL WINAPI CalculatePopupWindowPosition(
|
507
|
+
# _In_ const POINT *anchorPoint,
|
508
|
+
# _In_ const SIZE *windowSize,
|
509
|
+
# _In_ UINT flags,
|
510
|
+
# _In_opt_ RECT *excludeRect,
|
511
|
+
# _Out_ RECT *popupWindowPosition )
|
512
|
+
attach_function 'CalculatePopupWindowPosition', [:pointer, :pointer, TrackPopupMenuFlags, RECT.ptr, RECT.ptr], :bool
|
513
|
+
|
514
|
+
#BOOL WINAPI ChangeWindowMessageFilterEx(
|
515
|
+
# _In_ HWND hWnd,
|
516
|
+
# _In_ UINT message,
|
517
|
+
# _In_ DWORD action,
|
518
|
+
# _Inout_opt_ PCHANGEFILTERSTRUCT pChangeFilterStruct )
|
519
|
+
attach_function 'ChangeWindowMessageFilterEx', [:hwnd, :uint, :dword, :pointer], :bool
|
520
|
+
|
521
|
+
#BOOL WINAPI GetWindowDisplayAffinity(
|
522
|
+
# _In_ HWND hWnd,
|
523
|
+
# _Out_ DWORD *dwAffinity )
|
524
|
+
attach_function 'GetWindowDisplayAffinity', [:hwnd, :pointer], :bool
|
525
|
+
|
526
|
+
#BOOL WINAPI SetWindowDisplayAffinity(
|
527
|
+
# _In_ HWND hWnd,
|
528
|
+
# _In_ DWORD dwAffinity )
|
529
|
+
attach_function 'SetWindowDisplayAffinity', [:hwnd, :dword], :bool
|
530
|
+
|
531
|
+
if WindowsVersion >= 8.1
|
532
|
+
|
533
|
+
#HRESULT WINAPI GetProcessDPIAwareness(
|
534
|
+
# _In_ HANDLE hprocess,
|
535
|
+
# _Out_ PROCESS_DPI_AWARENESS *value )
|
536
|
+
attach_function 'GetProcessDPIAwareness', [:handle, :pointer], :hresult
|
537
|
+
|
538
|
+
#HRESULT WINAPI SetProcessDPIAwareness(
|
539
|
+
# _In_ PROCESS_DPI_AWARENESS value )
|
540
|
+
attach_function 'SetProcessDPIAwareness', [:pointer], :hresult
|
541
|
+
end
|
542
|
+
end
|
543
|
+
end
|
544
|
+
end
|
545
|
+
end
|
546
|
+
end
|
@@ -0,0 +1,109 @@
|
|
1
|
+
require 'win-ffi/functions/user32'
|
2
|
+
|
3
|
+
require 'win-ffi/enums/user32/window/get_class_long_flags'
|
4
|
+
require 'win-ffi/enums/user32/window/window_long'
|
5
|
+
require 'win-ffi/enums/user32/window/get_window_long_flags'
|
6
|
+
|
7
|
+
require 'win-ffi/structs/user32/window/wndclass'
|
8
|
+
require 'win-ffi/structs/user32/window/wndclassex'
|
9
|
+
|
10
|
+
module WinFFI
|
11
|
+
module User32
|
12
|
+
#BOOL WINAPI GetClassInfo(
|
13
|
+
# _In_opt_ HINSTANCE hInstance,
|
14
|
+
# _In_ LPCTSTR lpClassName,
|
15
|
+
# _Out_ LPWNDCLASS lpWndClass )
|
16
|
+
attach_function 'GetClassInfoA', [:hinstance, :pointer, WNDCLASS.ptr], :bool
|
17
|
+
attach_function 'GetClassInfoW', [:hinstance, :pointer, WNDCLASS.ptr], :bool
|
18
|
+
|
19
|
+
#BOOL WINAPI GetClassInfoEx(
|
20
|
+
# _In_opt_ HINSTANCE hinst,
|
21
|
+
# _In_ LPCTSTR lpszClass,
|
22
|
+
# _Out_ LPWNDCLASSEX lpwcx )
|
23
|
+
attach_function 'GetClassInfoExA', [:hinstance, :pointer, WNDCLASSEX.ptr], :bool
|
24
|
+
attach_function 'GetClassInfoExW', [:hinstance, :pointer, WNDCLASSEX.ptr], :bool
|
25
|
+
|
26
|
+
#DWORD WINAPI GetClassLong(
|
27
|
+
# __in HWND hWnd,
|
28
|
+
# __in int nIndex)
|
29
|
+
attach_function 'GetClassLongA', [:hwnd, GetClassLongFlags], :dword
|
30
|
+
attach_function 'GetClassLongW', [:hwnd, GetClassLongFlags], :dword
|
31
|
+
|
32
|
+
#ULONG_PTR WINAPI GetClassLongPtr(
|
33
|
+
# __in HWND hWnd,
|
34
|
+
# __in int nIndex)
|
35
|
+
#attach_function 'GetClassLongPtrA', [:hwnd, ClassLong], :ulong
|
36
|
+
#attach_function 'GetClassLongPtrW', [:hwnd, ClassLong], :ulong
|
37
|
+
|
38
|
+
#int WINAPI GetClassName(
|
39
|
+
# _In_ HWND hWnd,
|
40
|
+
# _Out_ LPTSTR lpClassName,
|
41
|
+
# _In_ int nMaxCount )
|
42
|
+
attach_function 'GetClassNameA', [:hwnd, :string, :int], :int
|
43
|
+
attach_function 'GetClassNameW', [:hwnd, :string, :int], :int
|
44
|
+
|
45
|
+
#WORD WINAPI GetClassWord(
|
46
|
+
# _In_ HWND hWnd,
|
47
|
+
# _In_ int nIndex )
|
48
|
+
attach_function 'GetClassWord', [:hwnd, :int], :word
|
49
|
+
|
50
|
+
#LONG WINAPI GetWindowLong(
|
51
|
+
# __in HWND hWnd,
|
52
|
+
# __in int nIndex)
|
53
|
+
attach_function 'GetWindowLongA', [:hwnd, GetWindowLongFlags], :long
|
54
|
+
attach_function 'GetWindowLongW', [:hwnd, GetWindowLongFlags], :long
|
55
|
+
|
56
|
+
#ATOM WINAPI RegisterClass( _In_ const WNDCLASS *lpWndClass )
|
57
|
+
attach_function 'RegisterClassA', [WNDCLASS.ptr], :atom
|
58
|
+
attach_function 'RegisterClassW', [WNDCLASS.ptr], :atom
|
59
|
+
|
60
|
+
#ATOM RegisterClassEx( __in const WNDCLASSEX *lpwcx )
|
61
|
+
attach_function 'RegisterClassExA', [:pointer], :atom
|
62
|
+
attach_function 'RegisterClassExW', [:pointer], :atom
|
63
|
+
|
64
|
+
#DWORD WINAPI SetClassLong(
|
65
|
+
# __in HWND hWnd,
|
66
|
+
# __in int nIndex,
|
67
|
+
# __in LONG dwNewLong)
|
68
|
+
attach_function 'SetClassLongA', [:hwnd, GetClassLongFlags, :long], :dword
|
69
|
+
attach_function 'SetClassLongW', [:hwnd, GetClassLongFlags, :long], :dword
|
70
|
+
|
71
|
+
#WORD WINAPI SetClassWord(
|
72
|
+
# _In_ HWND hWnd,
|
73
|
+
# _In_ int nIndex,
|
74
|
+
# _In_ WORD wNewWord )
|
75
|
+
attach_function 'SetClassWord', [:hwnd, :int, :word], :word
|
76
|
+
|
77
|
+
#LONG WINAPI SetWindowLong(
|
78
|
+
# __in HWND hWnd,
|
79
|
+
# __in int nIndex,
|
80
|
+
# __in LONG dwNewLong)
|
81
|
+
attach_function 'SetWindowLongA', [:hwnd, GetWindowLongFlags, :long], :long
|
82
|
+
attach_function 'SetWindowLongW', [:hwnd, GetWindowLongFlags, :long], :long
|
83
|
+
|
84
|
+
#BOOL UnregisterClass(
|
85
|
+
# __in LPCTSTR lpClassName,
|
86
|
+
# __in_opt HINSTANCE hInstance)
|
87
|
+
attach_function 'UnregisterClassA', [:pointer, :hinstance], :bool
|
88
|
+
attach_function 'UnregisterClassW', [:pointer, :hinstance], :bool
|
89
|
+
|
90
|
+
begin
|
91
|
+
#LONG_PTR WINAPI GetWindowLongPtr(
|
92
|
+
# __in HWND hWnd,
|
93
|
+
# __in int nIndex)
|
94
|
+
attach_function 'GetWindowLongPtr', [:hwnd, :int], :pointer
|
95
|
+
attach_function 'GetWindowLongPtrA', [:hwnd, :int], :pointer
|
96
|
+
attach_function 'GetWindowLongPtrW', [:hwnd, :int], :pointer
|
97
|
+
|
98
|
+
#LONG_PTR WINAPI SetWindowLongPtr(
|
99
|
+
# __in HWND hWnd,
|
100
|
+
# __in int nIndex,
|
101
|
+
# __in LONG_PTR dwNewLong)
|
102
|
+
attach_function 'SetWindowLongPtr', [:hwnd, GetWindowLongFlags, :pointer], :pointer
|
103
|
+
attach_function 'SetWindowLongPtrA', [:hwnd, GetWindowLongFlags, :pointer], :pointer
|
104
|
+
attach_function 'SetWindowLongPtrW', [:hwnd, GetWindowLongFlags, :pointer], :pointer
|
105
|
+
rescue FFI::NotFoundError
|
106
|
+
# In 32-bit Windows, these methods are aliases for GetWindowLong and SetWindowLong
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'win-ffi/functions/user32'
|
2
|
+
|
3
|
+
module WinFFI
|
4
|
+
module User32
|
5
|
+
#LRESULT DefWindowProc(
|
6
|
+
# __in HWND hWnd,
|
7
|
+
# __in UINT Msg,
|
8
|
+
# __in WPARAM wParam,
|
9
|
+
# __in LPARAM lParam)
|
10
|
+
attach_function 'DefWindowProcA', [:hwnd, :uint, :wparam, :lparam], :lresult
|
11
|
+
attach_function 'DefWindowProcW', [:hwnd, :uint, :wparam, :lparam], :lresult
|
12
|
+
|
13
|
+
#LRESULT WINAPI CallWindowProc(
|
14
|
+
# _In_ WNDPROC lpPrevWndFunc,
|
15
|
+
# _In_ HWND hWnd,
|
16
|
+
# _In_ UINT Msg,
|
17
|
+
# _In_ WPARAM wParam,
|
18
|
+
# _In_ LPARAM lParam )
|
19
|
+
attach_function 'CallWindowProcA', [:pointer, :hwnd, :uint, :wparam, :lparam], :lresult
|
20
|
+
attach_function 'CallWindowProcW', [:pointer, :hwnd, :uint, :wparam, :lparam], :lresult
|
21
|
+
|
22
|
+
#LRESULT CALLBACK WindowProc(
|
23
|
+
# _In_ HWND hwnd,
|
24
|
+
# _In_ UINT uMsg,
|
25
|
+
# _In_ WPARAM wParam,
|
26
|
+
# _In_ LPARAM lParam )
|
27
|
+
WindowProc = callback :WindowProc, [:hwnd, :uint, :wparam, :lparam], :lresult
|
28
|
+
end
|
29
|
+
end
|