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,275 @@
|
|
|
1
|
+
require 'win-ffi/functions/gdi32'
|
|
2
|
+
|
|
3
|
+
require 'win-ffi/structs/gdi32/rgb_quad'
|
|
4
|
+
require 'win-ffi/structs/gdi32/bitmap'
|
|
5
|
+
require 'win-ffi/structs/gdi32/bitmap_info'
|
|
6
|
+
require 'win-ffi/structs/gdi32/blend_function'
|
|
7
|
+
|
|
8
|
+
module WinFFI
|
|
9
|
+
module Gdi32
|
|
10
|
+
#BOOL BitBlt(
|
|
11
|
+
# _In_ HDC hdcDest,
|
|
12
|
+
# _In_ int nXDest,
|
|
13
|
+
# _In_ int nYDest,
|
|
14
|
+
# _In_ int nWidth,
|
|
15
|
+
# _In_ int nHeight,
|
|
16
|
+
# _In_ HDC hdcSrc,
|
|
17
|
+
# _In_ int nXSrc,
|
|
18
|
+
# _In_ int nYSrc,
|
|
19
|
+
# _In_ DWORD dwRop )
|
|
20
|
+
attach_function 'BitBlt', [:hdc, :int, :int, :int, :int, :hdc, :int, :int, :dword], :bool
|
|
21
|
+
|
|
22
|
+
#HBITMAP CreateBitmap(
|
|
23
|
+
# _In_ int nWidth,
|
|
24
|
+
# _In_ int nHeight,
|
|
25
|
+
# _In_ UINT cPlanes,
|
|
26
|
+
# _In_ UINT cBitsPerPel,
|
|
27
|
+
# _In_ const VOID *lpvBits )
|
|
28
|
+
attach_function 'CreateBitmap', [:int, :int, :uint, :uint, :pointer], :hbitmap
|
|
29
|
+
|
|
30
|
+
#HBITMAP CreateBitmapIndirect( _In_ const BITMAP *lpbm )
|
|
31
|
+
attach_function 'CreateBitmapIndirect', [BITMAP.ptr], :hbitmap
|
|
32
|
+
|
|
33
|
+
#HBITMAP CreateCompatibleBitmap(
|
|
34
|
+
# _In_ HDC hdc,
|
|
35
|
+
# _In_ int nWidth,
|
|
36
|
+
# _In_ int nHeight )
|
|
37
|
+
attach_function 'CreateCompatibleBitmap', [:hdc, :int, :int], :hbitmap
|
|
38
|
+
|
|
39
|
+
#HBITMAP CreateDIBitmap(
|
|
40
|
+
# _In_ HDC hdc,
|
|
41
|
+
# _In_ const BITMAPINFOHEADER *lpbmih,
|
|
42
|
+
# _In_ DWORD fdwInit,
|
|
43
|
+
# _In_ const VOID *lpbInit,
|
|
44
|
+
# _In_ const BITMAPINFO *lpbmi,
|
|
45
|
+
# _In_ UINT fuUsage )
|
|
46
|
+
attach_function 'CreateDIBitmap', [:hdc, :pointer, :dword, :pointer, :pointer], :hbitmap
|
|
47
|
+
|
|
48
|
+
#HBITMAP CreateDIBSection(
|
|
49
|
+
# _In_ HDC hdc,
|
|
50
|
+
# _In_ const BITMAPINFO *pbmi,
|
|
51
|
+
# _In_ UINT iUsage,
|
|
52
|
+
# _Out_ VOID **ppvBits,
|
|
53
|
+
# _In_ HANDLE hSection,
|
|
54
|
+
# _In_ DWORD dwOffset )
|
|
55
|
+
attach_function 'CreateDIBSection', [:hdc, :pointer, :uint, :pointer, :handle, :dword], :hbitmap
|
|
56
|
+
|
|
57
|
+
#[This function is provided only for compatibility with 16-bit versions of Windows. Applications should use the CreateCompatibleBitmap function.]
|
|
58
|
+
#HBITMAP CreateDiscardableBitmap(
|
|
59
|
+
# _In_ HDC hdc,
|
|
60
|
+
# _In_ int nWidth,
|
|
61
|
+
# _In_ int nHeight )
|
|
62
|
+
attach_function 'CreateDiscardableBitmap', [:hdc, :int, :int], :hbitmap
|
|
63
|
+
|
|
64
|
+
#BOOL ExtFloodFill(
|
|
65
|
+
# _In_ HDC hdc,
|
|
66
|
+
# _In_ int nXStart,
|
|
67
|
+
# _In_ int nYStart,
|
|
68
|
+
# _In_ COLORREF crColor,
|
|
69
|
+
# _In_ UINT fuFillType )
|
|
70
|
+
attach_function 'ExtFloodFill', [:hdc, :int, :int, :colorref, :uint], :bool
|
|
71
|
+
|
|
72
|
+
#BOOL FloodFill(
|
|
73
|
+
# _In_ HDC hdc,
|
|
74
|
+
# _In_ int nXStart,
|
|
75
|
+
# _In_ int nYStart,
|
|
76
|
+
# _In_ COLORREF crFill )
|
|
77
|
+
attach_function 'FloodFill', [:hdc, :int, :int, :colorref], :bool
|
|
78
|
+
|
|
79
|
+
#BOOL GdiAlphaBlend(
|
|
80
|
+
# _In_ HDC hdcDest,
|
|
81
|
+
# _In_ int xoriginDest,
|
|
82
|
+
# _In_ int yoriginDest,
|
|
83
|
+
# _In_ int wDest,
|
|
84
|
+
# _In_ int hDest,
|
|
85
|
+
# _In_ HDC hdcSrc,
|
|
86
|
+
# _In_ int xoriginSrc,
|
|
87
|
+
# _In_ int yoriginSrc,
|
|
88
|
+
# _In_ int wSrc,
|
|
89
|
+
# _In_ int hSrc,
|
|
90
|
+
# _In_ BLENDFUNCTION ftn )
|
|
91
|
+
attach_function 'GdiAlphaBlend', [:hdc, :int, :int, :int, :int, :hdc, :int, :int, :int, :int, BLENDFUNCTION], :bool
|
|
92
|
+
|
|
93
|
+
#BOOL GdiGradientFill(
|
|
94
|
+
# _In_ HDC hdc,
|
|
95
|
+
# _In_ PTRIVERTEX pVertex,
|
|
96
|
+
# _In_ ULONG dwNumVertex,
|
|
97
|
+
# _In_ PVOID pMesh,
|
|
98
|
+
# _In_ ULONG dwNumMesh,
|
|
99
|
+
# _In_ ULONG dwMode )
|
|
100
|
+
attach_function 'GdiGradientFill', [:hdc, :pointer, :ulong, :pointer, :ulong, :ulong], :bool
|
|
101
|
+
|
|
102
|
+
#BOOL GdiTransparentBlt(
|
|
103
|
+
# _In_ HDC hdcDest,
|
|
104
|
+
# _In_ int xoriginDest,
|
|
105
|
+
# _In_ int yoriginDest,
|
|
106
|
+
# _In_ int wDest,
|
|
107
|
+
# _In_ int hDest,
|
|
108
|
+
# _In_ HDC hdcSrc,
|
|
109
|
+
# _In_ int xoriginSrc,
|
|
110
|
+
# _In_ int yoriginSrc,
|
|
111
|
+
# _In_ int wSrc,
|
|
112
|
+
# _In_ int hSrc,
|
|
113
|
+
# _In_ UINT crTransparent )
|
|
114
|
+
attach_function 'GdiTransparentBlt', [:hdc, :int, :int, :int, :int, :hdc, :int, :int, :int, :int, :uint], :bool
|
|
115
|
+
|
|
116
|
+
#LONG GetBitmapBits(
|
|
117
|
+
# _In_ HBITMAP hbmp,
|
|
118
|
+
# _In_ LONG cbBuffer,
|
|
119
|
+
# _Out_ LPVOID lpvBits )
|
|
120
|
+
attach_function 'GetBitmapBits', [:hbitmap, :long, :pointer], :long
|
|
121
|
+
|
|
122
|
+
#BOOL GetBitmapDimensionEx(
|
|
123
|
+
# _In_ HBITMAP hBitmap,
|
|
124
|
+
# _Out_ LPSIZE lpDimension )
|
|
125
|
+
attach_function 'GetBitmapDimensionEx', [:hbitmap, SIZE.ptr], :bool
|
|
126
|
+
|
|
127
|
+
#UINT GetDIBColorTable(
|
|
128
|
+
# _In_ HDC hdc,
|
|
129
|
+
# _In_ UINT uStartIndex,
|
|
130
|
+
# _In_ UINT cEntries,
|
|
131
|
+
# _Out_ RGBQUAD *pColors )
|
|
132
|
+
attach_function 'GetDIBColorTable', [:hdc, :uint, :uint, :pointer], :uint
|
|
133
|
+
|
|
134
|
+
#int GetDIBits(
|
|
135
|
+
# _In_ HDC hdc,
|
|
136
|
+
# _In_ HBITMAP hbmp,
|
|
137
|
+
# _In_ UINT uStartScan,
|
|
138
|
+
# _In_ UINT cScanLines,
|
|
139
|
+
# _Out_ LPVOID lpvBits,
|
|
140
|
+
# _Inout_ LPBITMAPINFO lpbi,
|
|
141
|
+
# _In_ UINT uUsage )
|
|
142
|
+
attach_function 'GetDIBits', [:hdc, :hbitmap, :uint, :uint, :pointer, :pointer, :uint], :int
|
|
143
|
+
|
|
144
|
+
#COLORREF GetPixel(
|
|
145
|
+
# _In_ HDC hdc,
|
|
146
|
+
# _In_ int nXPos,
|
|
147
|
+
# _In_ int nYPos )
|
|
148
|
+
attach_function 'GetPixel', [:hdc, :int, :int], :colorref
|
|
149
|
+
|
|
150
|
+
#int GetStretchBltMode( _In_ HDC hdc )
|
|
151
|
+
attach_function 'GetStretchBltMode', [:hdc], :int
|
|
152
|
+
|
|
153
|
+
#BOOL MaskBlt(
|
|
154
|
+
# _In_ HDC hdcDest,
|
|
155
|
+
# _In_ int nXDest,
|
|
156
|
+
# _In_ int nYDest,
|
|
157
|
+
# _In_ int nWidth,
|
|
158
|
+
# _In_ int nHeight,
|
|
159
|
+
# _In_ HDC hdcSrc,
|
|
160
|
+
# _In_ int nXSrc,
|
|
161
|
+
# _In_ int nYSrc,
|
|
162
|
+
# _In_ HBITMAP hbmMask,
|
|
163
|
+
# _In_ int xMask,
|
|
164
|
+
# _In_ int yMask,
|
|
165
|
+
# _In_ DWORD dwRop )
|
|
166
|
+
attach_function 'MaskBlt', [:hdc, :int, :int, :int, :int, :hdc, :int, :int, :hbitmap, :int, :int, :dword], :bool
|
|
167
|
+
|
|
168
|
+
#BOOL PlgBlt(
|
|
169
|
+
# _In_ HDC hdcDest,
|
|
170
|
+
# _In_ const POINT *lpPoint,
|
|
171
|
+
# _In_ HDC hdcSrc,
|
|
172
|
+
# _In_ int nXSrc,
|
|
173
|
+
# _In_ int nYSrc,
|
|
174
|
+
# _In_ int nWidth,
|
|
175
|
+
# _In_ int nHeight,
|
|
176
|
+
# _In_ HBITMAP hbmMask,
|
|
177
|
+
# _In_ int xMask,
|
|
178
|
+
# _In_ int yMask )
|
|
179
|
+
attach_function 'PlgBlt', [:hdc, POINT.ptr, :hdc, :int, :int, :int, :int, :hbitmap, :int, :int], :bool
|
|
180
|
+
|
|
181
|
+
#LONG SetBitmapBits(
|
|
182
|
+
# _In_ HBITMAP hbmp,
|
|
183
|
+
# _In_ DWORD cBytes,
|
|
184
|
+
# _In_ const VOID *lpBits )
|
|
185
|
+
attach_function 'SetBitmapBits', [:hbitmap, :dword, :pointer], :long
|
|
186
|
+
|
|
187
|
+
#BOOL SetBitmapDimensionEx(
|
|
188
|
+
# _In_ HBITMAP hBitmap,
|
|
189
|
+
# _In_ int nWidth,
|
|
190
|
+
# _In_ int nHeight,
|
|
191
|
+
# _Out_ LPSIZE lpSize )
|
|
192
|
+
attach_function 'SetBitmapDimensionEx', [:hbitmap, :int, :int, SIZE.ptr], :bool
|
|
193
|
+
|
|
194
|
+
#UINT SetDIBColorTable(
|
|
195
|
+
# _In_ HDC hdc,
|
|
196
|
+
# _In_ UINT uStartIndex,
|
|
197
|
+
# _In_ UINT cEntries,
|
|
198
|
+
# _In_ const RGBQUAD *pColors )
|
|
199
|
+
attach_function 'SetDIBColorTable', [:hdc, :uint, :uint, RGBQUAD.ptr], :uint
|
|
200
|
+
|
|
201
|
+
#int SetDIBits(
|
|
202
|
+
# _In_ HDC hdc,
|
|
203
|
+
# _In_ HBITMAP hbmp,
|
|
204
|
+
# _In_ UINT uStartScan,
|
|
205
|
+
# _In_ UINT cScanLines,
|
|
206
|
+
# _In_ const VOID *lpvBits,
|
|
207
|
+
# _In_ const BITMAPINFO *lpbmi,
|
|
208
|
+
# _In_ UINT fuColorUse )
|
|
209
|
+
attach_function 'SetDIBits', [:hdc, :hbitmap, :uint, :uint, :pointer, BITMAPINFO.ptr, :uint], :int
|
|
210
|
+
|
|
211
|
+
#int SetDIBitsToDevice(
|
|
212
|
+
# _In_ HDC hdc,
|
|
213
|
+
# _In_ int XDest,
|
|
214
|
+
# _In_ int YDest,
|
|
215
|
+
# _In_ DWORD dwWidth,
|
|
216
|
+
# _In_ DWORD dwHeight,
|
|
217
|
+
# _In_ int XSrc,
|
|
218
|
+
# _In_ int YSrc,
|
|
219
|
+
# _In_ UINT uStartScan,
|
|
220
|
+
# _In_ UINT cScanLines,
|
|
221
|
+
# _In_ const VOID *lpvBits,
|
|
222
|
+
# _In_ const BITMAPINFO *lpbmi,
|
|
223
|
+
# _In_ UINT fuColorUse )
|
|
224
|
+
attach_function 'SetDIBitsToDevice', [:hdc, :int, :int, :dword, :dword, :int, :int, :uint, :uint, :pointer, BITMAPINFO.ptr, :uint], :int
|
|
225
|
+
|
|
226
|
+
#COLORREF SetPixel(
|
|
227
|
+
# _In_ HDC hdc,
|
|
228
|
+
# _In_ int X,
|
|
229
|
+
# _In_ int Y,
|
|
230
|
+
# _In_ COLORREF crColor )
|
|
231
|
+
attach_function 'SetPixel', [:hdc, :int, :int, :colorref], :colorref
|
|
232
|
+
|
|
233
|
+
#BOOL SetPixelV(
|
|
234
|
+
# _In_ HDC hdc,
|
|
235
|
+
# _In_ int X,
|
|
236
|
+
# _In_ int Y,
|
|
237
|
+
# _In_ COLORREF crColor )
|
|
238
|
+
attach_function 'SetPixelV', [:hdc, :int, :int, :colorref], :bool
|
|
239
|
+
|
|
240
|
+
#int SetStretchBltMode(
|
|
241
|
+
# _In_ HDC hdc,
|
|
242
|
+
# _In_ int iStretchMode )
|
|
243
|
+
attach_function 'SetStretchBltMode', [:hdc, :int], :int
|
|
244
|
+
|
|
245
|
+
#BOOL StretchBlt(
|
|
246
|
+
# _In_ HDC hdcDest,
|
|
247
|
+
# _In_ int nXOriginDest,
|
|
248
|
+
# _In_ int nYOriginDest,
|
|
249
|
+
# _In_ int nWidthDest,
|
|
250
|
+
# _In_ int nHeightDest,
|
|
251
|
+
# _In_ HDC hdcSrc,
|
|
252
|
+
# _In_ int nXOriginSrc,
|
|
253
|
+
# _In_ int nYOriginSrc,
|
|
254
|
+
# _In_ int nWidthSrc,
|
|
255
|
+
# _In_ int nHeightSrc,
|
|
256
|
+
# _In_ DWORD dwRop )
|
|
257
|
+
attach_function 'StretchBlt', [:hdc, :int, :int, :int, :int, :hdc, :int, :int, :int, :int, :dword], :bool
|
|
258
|
+
|
|
259
|
+
#int StretchDIBits(
|
|
260
|
+
# _In_ HDC hdc,
|
|
261
|
+
# _In_ int XDest,
|
|
262
|
+
# _In_ int YDest,
|
|
263
|
+
# _In_ int nDestWidth,
|
|
264
|
+
# _In_ int nDestHeight,
|
|
265
|
+
# _In_ int XSrc,
|
|
266
|
+
# _In_ int YSrc,
|
|
267
|
+
# _In_ int nSrcWidth,
|
|
268
|
+
# _In_ int nSrcHeight,
|
|
269
|
+
# _In_ const VOID *lpBits,
|
|
270
|
+
# _In_ const BITMAPINFO *lpBitsInfo,
|
|
271
|
+
# _In_ UINT iUsage,
|
|
272
|
+
# _In_ DWORD dwRop )
|
|
273
|
+
attach_function 'StretchDIBits', [:hdc, :int, :int, :int, :int, :int, :int, :int, :int, :pointer, BITMAPINFO.ptr, :uint, :dword], :int
|
|
274
|
+
end
|
|
275
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
require 'win-ffi/functions/gdi32'
|
|
2
|
+
|
|
3
|
+
require 'win-ffi/enums/gdi32/hatch_styles'
|
|
4
|
+
|
|
5
|
+
require 'win-ffi/structs/gdi32/log_brush'
|
|
6
|
+
|
|
7
|
+
module WinFFI
|
|
8
|
+
module Gdi32
|
|
9
|
+
#HBRUSH CreateBrushIndirect( _In_ const LOGBRUSH *lplb )
|
|
10
|
+
attach_function 'CreateBrushIndirect', [LOGBRUSH.ptr], :hbrush
|
|
11
|
+
|
|
12
|
+
#HBRUSH CreateDIBPatternBrush(
|
|
13
|
+
# _In_ HGLOBAL hglbDIBPacked,
|
|
14
|
+
# _In_ UINT fuColorSpec )
|
|
15
|
+
attach_function 'CreateDIBPatternBrush', [:hglobal, :uint], :hbrush
|
|
16
|
+
|
|
17
|
+
#HBRUSH CreateDIBPatternBrushPt(
|
|
18
|
+
# _In_ const VOID *lpPackedDIB,
|
|
19
|
+
# _In_ UINT iUsage )
|
|
20
|
+
attach_function 'CreateDIBPatternBrushPt', [:pointer, :uint], :hbrush
|
|
21
|
+
|
|
22
|
+
#HBRUSH CreateHatchBrush(
|
|
23
|
+
# _In_ int fnStyle,
|
|
24
|
+
# _In_ COLORREF clrref )
|
|
25
|
+
attach_function 'CreateHatchBrush', [HatchStyles, :colorref], :hbrush
|
|
26
|
+
|
|
27
|
+
#HBRUSH CreatePatternBrush( _In_ HBITMAP hbmp )
|
|
28
|
+
attach_function 'CreatePatternBrush', [:hbitmap], :hbrush
|
|
29
|
+
|
|
30
|
+
#HBRUSH CreateSolidBrush( _In_ COLORREF crColor )
|
|
31
|
+
attach_function 'CreateSolidBrush', [:colorref], :hbrush
|
|
32
|
+
|
|
33
|
+
#BOOL GetBrushOrgEx(
|
|
34
|
+
# _In_ HDC hdc,
|
|
35
|
+
# _Out_ LPPOINT lppt )
|
|
36
|
+
attach_function 'GetBrushOrgEx', [:hdc, POINT.ptr], :bool
|
|
37
|
+
|
|
38
|
+
#BOOL PatBlt(
|
|
39
|
+
# _In_ HDC hdc,
|
|
40
|
+
# _In_ int nXLeft,
|
|
41
|
+
# _In_ int nYLeft,
|
|
42
|
+
# _In_ int nWidth,
|
|
43
|
+
# _In_ int nHeight,
|
|
44
|
+
# _In_ DWORD dwRop )
|
|
45
|
+
attach_function 'PatBlt', [:hdc, :int, :int, :int, :int, :dword], :bool
|
|
46
|
+
|
|
47
|
+
#BOOL SetBrushOrgEx(
|
|
48
|
+
# _In_ HDC hdc,
|
|
49
|
+
# _In_ int nXOrg,
|
|
50
|
+
# _In_ int nYOrg,
|
|
51
|
+
# _Out_ LPPOINT lppt )
|
|
52
|
+
attach_function 'SetBrushOrgEx', [:hdc, :int, :int, POINT.ptr], :bool
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
require 'win-ffi/functions/gdi32'
|
|
2
|
+
|
|
3
|
+
require 'win-ffi/structs/point'
|
|
4
|
+
|
|
5
|
+
module WinFFI
|
|
6
|
+
module Gdi32
|
|
7
|
+
#BOOL CancelDC( _In_ HDC hdc )
|
|
8
|
+
attach_function 'CancelDC', [:hdc], :bool
|
|
9
|
+
|
|
10
|
+
#HDC CreateCompatibleDC( _In_ HDC hdc )
|
|
11
|
+
attach_function 'CreateCompatibleDC', [:hdc], :hdc
|
|
12
|
+
|
|
13
|
+
#HDC CreateDC(
|
|
14
|
+
# LPCTSTR lpszDriver,
|
|
15
|
+
# _In_ LPCTSTR lpszDevice,
|
|
16
|
+
# LPCTSTR lpszOutput,
|
|
17
|
+
# _In_ const DEVMODE *lpInitData )
|
|
18
|
+
attach_function 'CreateDCA', [:string, :string, :pointer, :pointer], :hdc
|
|
19
|
+
attach_function 'CreateDCW', [:string, :string, :pointer, :pointer], :hdc
|
|
20
|
+
|
|
21
|
+
#HDC CreateIC(
|
|
22
|
+
# _In_ LPCTSTR lpszDriver,
|
|
23
|
+
# _In_ LPCTSTR lpszDevice,
|
|
24
|
+
# LPCTSTR lpszOutput,
|
|
25
|
+
# _In_ const DEVMODE *lpdvmInit )
|
|
26
|
+
attach_function 'CreateICA', [:string, :string, :pointer, :pointer], :hdc
|
|
27
|
+
attach_function 'CreateICW', [:string, :string, :pointer, :pointer], :hdc
|
|
28
|
+
|
|
29
|
+
#BOOL DeleteDC( _In_ HDC hdc )
|
|
30
|
+
attach_function 'DeleteDC', [:hdc], :bool
|
|
31
|
+
|
|
32
|
+
#BOOL DeleteObject( _In_ HGDIOBJ hObject )
|
|
33
|
+
attach_function 'DeleteObject', [:hgdiobj], :bool
|
|
34
|
+
|
|
35
|
+
#int DrawEscape(
|
|
36
|
+
# _In_ HDC hdc,
|
|
37
|
+
# _In_ int nEscape,
|
|
38
|
+
# _In_ int cbInput,
|
|
39
|
+
# _In_ LPCSTR lpszInData )
|
|
40
|
+
attach_function 'DrawEscape', [:hdc, :int, :int, :pointer], :int
|
|
41
|
+
|
|
42
|
+
#TODO
|
|
43
|
+
#int EnumObjects(
|
|
44
|
+
# _In_ HDC hdc,
|
|
45
|
+
# _In_ int nObjectType,
|
|
46
|
+
# _In_ GOBJENUMPROC lpObjectFunc,
|
|
47
|
+
# _In_ LPARAM lParam )
|
|
48
|
+
attach_function 'EnumObjects', [:hdc, :int, :pointer, :lparam], :int
|
|
49
|
+
|
|
50
|
+
#int CALLBACK EnumObjectsProc(
|
|
51
|
+
# _In_ LPVOID lpLogObject,
|
|
52
|
+
# _In_ LPARAM lpData )
|
|
53
|
+
callback 'EnumObjectsProc', [:pointer, :lparam], :int
|
|
54
|
+
|
|
55
|
+
#HGDIOBJ GetCurrentObject(
|
|
56
|
+
# _In_ HDC hdc,
|
|
57
|
+
# _In_ UINT uObjectType )
|
|
58
|
+
attach_function 'GetCurrentObject', [:hdc, :uint], :hgdiobj
|
|
59
|
+
|
|
60
|
+
#COLORREF GetDCBrushColor( _In_ HDC hdc )
|
|
61
|
+
attach_function 'GetDCBrushColor', [:hdc], :colorref
|
|
62
|
+
|
|
63
|
+
#BOOL GetDCOrgEx(
|
|
64
|
+
# _In_ HDC hdc,
|
|
65
|
+
# _Out_ LPPOINT lpPoint )
|
|
66
|
+
attach_function 'GetDCOrgEx', [:hdc, POINT.ptr], :bool
|
|
67
|
+
|
|
68
|
+
#COLORREF GetDCPenColor( _In_ HDC hdc )
|
|
69
|
+
attach_function 'GetDCPenColor', [:hdc], :colorref
|
|
70
|
+
|
|
71
|
+
#int GetDeviceCaps(
|
|
72
|
+
# _In_ HDC hdc,
|
|
73
|
+
# _In_ int nIndex )
|
|
74
|
+
attach_function 'GetDeviceCaps', [:hdc, :int], :int
|
|
75
|
+
|
|
76
|
+
#DWORD GetLayout( _In_ HDC hdc )
|
|
77
|
+
attach_function 'GetLayout', [:hdc], :dword
|
|
78
|
+
|
|
79
|
+
#int GetObject(
|
|
80
|
+
# _In_ HGDIOBJ hgdiobj,
|
|
81
|
+
# _In_ int cbBuffer,
|
|
82
|
+
# _Out_ LPVOID lpvObject )
|
|
83
|
+
attach_function 'GetObjectA', [:hgdiobj, :int, :pointer], :int
|
|
84
|
+
attach_function 'GetObjectW', [:hgdiobj, :int, :pointer], :int
|
|
85
|
+
|
|
86
|
+
#DWORD GetObjectType( _In_ HGDIOBJ h )
|
|
87
|
+
attach_function 'GetObjectType', [:hgdiobj], :dword
|
|
88
|
+
|
|
89
|
+
#HGDIOBJ GetStockObject( _In_ int fnObject )
|
|
90
|
+
attach_function 'GetStockObject', [:int], :hgdiobj
|
|
91
|
+
|
|
92
|
+
#HDC ResetDC(
|
|
93
|
+
# _In_ HDC hdc,
|
|
94
|
+
# _In_ const DEVMODE *lpInitData )
|
|
95
|
+
attach_function 'ResetDCA', [:hdc, :pointer], :hdc
|
|
96
|
+
attach_function 'ResetDCW', [:hdc, :pointer], :hdc
|
|
97
|
+
|
|
98
|
+
#BOOL RestoreDC(
|
|
99
|
+
# _In_ HDC hdc,
|
|
100
|
+
# _In_ int nSavedDC )
|
|
101
|
+
attach_function 'RestoreDC', [:hdc, :int], :bool
|
|
102
|
+
|
|
103
|
+
#int SaveDC( _In_ HDC hdc )
|
|
104
|
+
attach_function 'SaveDC', [:hdc], :int
|
|
105
|
+
|
|
106
|
+
#HGDIOBJ SelectObject(
|
|
107
|
+
# _In_ HDC hdc,
|
|
108
|
+
# _In_ HGDIOBJ hgdiobj )
|
|
109
|
+
attach_function 'SelectObject', [:hdc, :hgdiobj], :hgdiobj
|
|
110
|
+
|
|
111
|
+
#COLORREF SetDCBrushColor(
|
|
112
|
+
# _In_ HDC hdc,
|
|
113
|
+
# _In_ COLORREF crColor )
|
|
114
|
+
attach_function 'SetDCBrushColor', [:hdc, :colorref], :colorref
|
|
115
|
+
|
|
116
|
+
#COLORREF SetDCPenColor(
|
|
117
|
+
# _In_ HDC hdc,
|
|
118
|
+
# _In_ COLORREF crColor )
|
|
119
|
+
attach_function 'SetDCPenColor', [:hdc, :colorref], :colorref
|
|
120
|
+
|
|
121
|
+
#DWORD SetLayout(
|
|
122
|
+
# _In_ HDC hdc,
|
|
123
|
+
# _In_ DWORD dwLayout )
|
|
124
|
+
attach_function 'SetLayout', [:hdc, :dword], :dword
|
|
125
|
+
end
|
|
126
|
+
end
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
require 'win-ffi/functions/gdi32'
|
|
2
|
+
|
|
3
|
+
module WinFFI
|
|
4
|
+
module Gdi32
|
|
5
|
+
#BOOL Chord(
|
|
6
|
+
# _In_ HDC hdc,
|
|
7
|
+
# _In_ int nLeftRect,
|
|
8
|
+
# _In_ int nTopRect,
|
|
9
|
+
# _In_ int nRightRect,
|
|
10
|
+
# _In_ int nBottomRect,
|
|
11
|
+
# _In_ int nXRadial1,
|
|
12
|
+
# _In_ int nYRadial1,
|
|
13
|
+
# _In_ int nXRadial2,
|
|
14
|
+
# _In_ int nYRadial2 )
|
|
15
|
+
attach_function 'Chord', [:hdc, :int, :int, :int, :int, :int, :int, :int, :int], :bool
|
|
16
|
+
|
|
17
|
+
#BOOL Ellipse(
|
|
18
|
+
# _In_ HDC hdc,
|
|
19
|
+
# _In_ int nLeftRect,
|
|
20
|
+
# _In_ int nTopRect,
|
|
21
|
+
# _In_ int nRightRect,
|
|
22
|
+
# _In_ int nBottomRect )
|
|
23
|
+
attach_function 'Ellipse', [:hdc, :int, :int, :int, :int], :bool
|
|
24
|
+
|
|
25
|
+
#BOOL Pie(
|
|
26
|
+
# _In_ HDC hdc,
|
|
27
|
+
# _In_ int nLeftRect,
|
|
28
|
+
# _In_ int nTopRect,
|
|
29
|
+
# _In_ int nRightRect,
|
|
30
|
+
# _In_ int nBottomRect,
|
|
31
|
+
# _In_ int nXRadial1,
|
|
32
|
+
# _In_ int nYRadial1,
|
|
33
|
+
# _In_ int nXRadial2,
|
|
34
|
+
# _In_ int nYRadial2 )
|
|
35
|
+
attach_function 'Pie', [:hdc, :int, :int, :int, :int, :int, :int, :int, :int], :bool
|
|
36
|
+
|
|
37
|
+
#BOOL Polygon(
|
|
38
|
+
# _In_ HDC hdc,
|
|
39
|
+
# _In_ const POINT *lpPoints,
|
|
40
|
+
# _In_ int nCount )
|
|
41
|
+
attach_function 'Polygon', [:hdc, POINT.ptr, :int], :bool
|
|
42
|
+
|
|
43
|
+
#BOOL PolyPolygon(
|
|
44
|
+
# _In_ HDC hdc,
|
|
45
|
+
# _In_ const POINT *lpPoints,
|
|
46
|
+
# _In_ const INT *lpPolyCounts,
|
|
47
|
+
# _In_ int nCount )
|
|
48
|
+
attach_function 'PolyPolygon', [:hdc, POINT.ptr, :pointer, :int], :bool
|
|
49
|
+
|
|
50
|
+
#BOOL Rectangle(
|
|
51
|
+
# _In_ HDC hdc,
|
|
52
|
+
# _In_ int nLeftRect,
|
|
53
|
+
# _In_ int nTopRect,
|
|
54
|
+
# _In_ int nRightRect,
|
|
55
|
+
# _In_ int nBottomRect )
|
|
56
|
+
attach_function 'Rectangle', [:hdc, :int, :int, :int, :int], :bool
|
|
57
|
+
|
|
58
|
+
#BOOL RoundRect(
|
|
59
|
+
# _In_ HDC hdc,
|
|
60
|
+
# _In_ int nLeftRect,
|
|
61
|
+
# _In_ int nTopRect,
|
|
62
|
+
# _In_ int nRightRect,
|
|
63
|
+
# _In_ int nBottomRect,
|
|
64
|
+
# _In_ int nWidth,
|
|
65
|
+
# _In_ int nHeight )
|
|
66
|
+
attach_function 'RoundRect', [:hdc, :int, :int, :int, :int, :int, :int], :bool
|
|
67
|
+
end
|
|
68
|
+
end
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
require 'win-ffi/functions/gdi32'
|
|
2
|
+
|
|
3
|
+
module WinFFI
|
|
4
|
+
module Gdi32
|
|
5
|
+
# HFONT CreateFontIndirect(_In_ const LOGFONT *lplf)
|
|
6
|
+
attach_function 'CreateFontIndirectA', [LOGFONT.ptr(:in)], :pointer
|
|
7
|
+
attach_function 'CreateFontIndirectW', [LOGFONT.ptr(:in)], :pointer
|
|
8
|
+
end
|
|
9
|
+
end
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
require 'win-ffi/functions/gdi32'
|
|
2
|
+
|
|
3
|
+
require 'win-ffi/structs/gdi32/handle_table'
|
|
4
|
+
require 'win-ffi/structs/gdi32/meta_file_pict'
|
|
5
|
+
require 'win-ffi/structs/gdi32/palette_entry'
|
|
6
|
+
|
|
7
|
+
module WinFFI
|
|
8
|
+
module Gdi32
|
|
9
|
+
|
|
10
|
+
typedef :pointer, :henhmetafile
|
|
11
|
+
|
|
12
|
+
#HENHMETAFILE CloseEnhMetaFile( _In_ HDC hdc )
|
|
13
|
+
attach_function 'CloseEnhMetaFile', [:hdc], :henhmetafile
|
|
14
|
+
|
|
15
|
+
#HMETAFILE CloseMetaFile( _In_ HDC hdc )
|
|
16
|
+
attach_function 'CloseMetaFile', [:hdc], :hmetafile
|
|
17
|
+
|
|
18
|
+
#HENHMETAFILE CopyEnhMetaFile(
|
|
19
|
+
# _In_ HENHMETAFILE hemfSrc,
|
|
20
|
+
# _In_ LPCTSTR lpszFile )
|
|
21
|
+
attach_function 'CopyEnhMetaFileA', [:henhmetafile, :string], :henhmetafile
|
|
22
|
+
attach_function 'CopyEnhMetaFileW', [:henhmetafile, :string], :henhmetafile
|
|
23
|
+
|
|
24
|
+
#HMETAFILE CopyMetaFile(
|
|
25
|
+
# _In_ HMETAFILE hmfSrc,
|
|
26
|
+
# _In_ LPCTSTR lpszFile )
|
|
27
|
+
attach_function 'CopyMetaFileA', [:hmetafile, :string], :hmetafile
|
|
28
|
+
attach_function 'CopyMetaFileW', [:hmetafile, :string], :hmetafile
|
|
29
|
+
|
|
30
|
+
#HDC CreateEnhMetaFile(
|
|
31
|
+
# _In_ HDC hdcRef,
|
|
32
|
+
# _In_ LPCTSTR lpFilename,
|
|
33
|
+
# _In_ const RECT *lpRect,
|
|
34
|
+
# _In_ LPCTSTR lpDescription )
|
|
35
|
+
attach_function 'CreateEnhMetaFileA', [:hdc, :string, RECT.ptr, :string], :hdc
|
|
36
|
+
attach_function 'CreateEnhMetaFileW', [:hdc, :string, RECT.ptr, :string], :hdc
|
|
37
|
+
|
|
38
|
+
#HDC CreateMetaFile( _In_ LPCTSTR lpszFile )
|
|
39
|
+
attach_function 'CreateMetaFileA', [:string], :hdc
|
|
40
|
+
attach_function 'CreateMetaFileW', [:string], :hdc
|
|
41
|
+
|
|
42
|
+
#BOOL DeleteEnhMetaFile( _In_ HENHMETAFILE hemf )
|
|
43
|
+
attach_function 'DeleteEnhMetaFile', [:henhmetafile], :bool
|
|
44
|
+
|
|
45
|
+
#BOOL DeleteMetaFile( _In_ HMETAFILE hmf )
|
|
46
|
+
attach_function 'DeleteMetaFile', [:hmetafile], :bool
|
|
47
|
+
|
|
48
|
+
#TODO
|
|
49
|
+
#int CALLBACK EnhMetaFileProc(
|
|
50
|
+
# _In_ HDC hDC,
|
|
51
|
+
# _In_ HANDLETABLE *lpHTable,
|
|
52
|
+
# _In_ const ENHMETARECORD *lpEMFR,
|
|
53
|
+
# _In_ int nObj,
|
|
54
|
+
# _In_ LPARAM lpData )
|
|
55
|
+
callback 'EnhMetaFileProc', [:hdc, HANDLETABLE.ptr, :pointer, :int, :lparam], :int
|
|
56
|
+
|
|
57
|
+
#BOOL EnumEnhMetaFile(
|
|
58
|
+
# _In_ HDC hdc,
|
|
59
|
+
# _In_ HENHMETAFILE hemf,
|
|
60
|
+
# _In_ ENHMFENUMPROC lpEnhMetaFunc,
|
|
61
|
+
# _In_ LPVOID lpData,
|
|
62
|
+
# _In_ const RECT *lpRect )
|
|
63
|
+
attach_function 'EnumEnhMetaFile', [:hdc, :henhmetafile, :pointer, :pointer, RECT.ptr], :bool
|
|
64
|
+
|
|
65
|
+
#BOOL EnumMetaFile(
|
|
66
|
+
# _In_ HDC hdc,
|
|
67
|
+
# _In_ HMETAFILE hmf,
|
|
68
|
+
# _In_ MFENUMPROC lpMetaFunc,
|
|
69
|
+
# _In_ LPARAM lParam )
|
|
70
|
+
attach_function 'EnumMetaFile', [:hdc, :hmetafile, :pointer, :lparam], :bool
|
|
71
|
+
|
|
72
|
+
#TODO
|
|
73
|
+
#int CALLBACK EnumMetaFileProc(
|
|
74
|
+
# _In_ HDC hDC,
|
|
75
|
+
# _In_ HANDLETABLE *lpHTable,
|
|
76
|
+
# _In_ METARECORD *lpMFR,
|
|
77
|
+
# _In_ int nObj,
|
|
78
|
+
# _In_ LPARAM lpClientData )
|
|
79
|
+
callback 'EnumMetaFileProc', [:hdc, HANDLETABLE.ptr, :pointer, :int, :lparam], :int
|
|
80
|
+
|
|
81
|
+
#BOOL GdiComment(
|
|
82
|
+
# _In_ HDC hdc,
|
|
83
|
+
# _In_ UINT cbSize,
|
|
84
|
+
# _In_ const BYTE *lpData )
|
|
85
|
+
attach_function 'GdiComment', [:hdc, :uint, :pointer], :bool
|
|
86
|
+
|
|
87
|
+
#HENHMETAFILE GetEnhMetaFile( _In_ LPCTSTR lpszMetaFile )
|
|
88
|
+
attach_function 'GetEnhMetaFileA', [:string], :henhmetafile
|
|
89
|
+
attach_function 'GetEnhMetaFileW', [:string], :henhmetafile
|
|
90
|
+
|
|
91
|
+
#UINT GetEnhMetaFileBits(
|
|
92
|
+
# _In_ HENHMETAFILE hemf,
|
|
93
|
+
# _In_ UINT cbBuffer,
|
|
94
|
+
# _Out_ LPBYTE lpbBuffer )
|
|
95
|
+
attach_function 'GetEnhMetaFileBits', [:henhmetafile, :uint, :pointer], :uint
|
|
96
|
+
|
|
97
|
+
#UINT GetEnhMetaFileDescription(
|
|
98
|
+
# _In_ HENHMETAFILE hemf,
|
|
99
|
+
# _In_ UINT cchBuffer,
|
|
100
|
+
# _Out_ LPTSTR lpszDescription )
|
|
101
|
+
attach_function 'GetEnhMetaFileDescriptionA', [:henhmetafile, :uint, :string], :uint
|
|
102
|
+
attach_function 'GetEnhMetaFileDescriptionW', [:henhmetafile, :uint, :string], :uint
|
|
103
|
+
|
|
104
|
+
#TODO ENHMETAHEADER struct
|
|
105
|
+
#UINT GetEnhMetaFileHeader(
|
|
106
|
+
# _In_ HENHMETAFILE hemf,
|
|
107
|
+
# _In_ UINT cbBuffer,
|
|
108
|
+
# _Out_ LPENHMETAHEADER lpemh )
|
|
109
|
+
attach_function 'GetEnhMetaFileHeader', [:henhmetafile, :uint, :pointer], :uint
|
|
110
|
+
|
|
111
|
+
#UINT GetEnhMetaFilePaletteEntries(
|
|
112
|
+
# _In_ HENHMETAFILE hemf,
|
|
113
|
+
# _In_ UINT cEntries,
|
|
114
|
+
# _Out_ LPPALETTEENTRY lppe )
|
|
115
|
+
attach_function 'GetEnhMetaFilePaletteEntries', [:henhmetafile, :uint, PALETTEENTRY.ptr], :uint
|
|
116
|
+
|
|
117
|
+
#UINT GetMetaFileBitsEx(
|
|
118
|
+
# _In_ HMETAFILE hmf,
|
|
119
|
+
# _In_ UINT nSize,
|
|
120
|
+
# _Out_ LPVOID lpvData )
|
|
121
|
+
attach_function 'GetMetaFileBitsEx', [:hmetafile, :uint, :pointer], :uint
|
|
122
|
+
|
|
123
|
+
#UINT GetWinMetaFileBits(
|
|
124
|
+
# _In_ HENHMETAFILE hemf,
|
|
125
|
+
# _In_ UINT cbBuffer,
|
|
126
|
+
# _Out_ LPBYTE lpbBuffer,
|
|
127
|
+
# _In_ INT fnMapMode,
|
|
128
|
+
# _In_ HDC hdcRef )
|
|
129
|
+
attach_function 'GetWinMetaFileBits', [:henhmetafile, :uint, :pointer, :int, :hdc], :uint
|
|
130
|
+
|
|
131
|
+
#BOOL PlayEnhMetaFile(
|
|
132
|
+
# _In_ HDC hdc,
|
|
133
|
+
# _In_ HENHMETAFILE hemf,
|
|
134
|
+
# _In_ const RECT *lpRect )
|
|
135
|
+
attach_function 'PlayEnhMetaFile', [:hdc, :henhmetafile, RECT.ptr], :bool
|
|
136
|
+
|
|
137
|
+
#BOOL PlayEnhMetaFileRecord(
|
|
138
|
+
# _In_ HDC hdc,
|
|
139
|
+
# _In_ LPHANDLETABLE lpHandletable,
|
|
140
|
+
# _In_ const ENHMETARECORD *lpEnhMetaRecord,
|
|
141
|
+
# _In_ UINT nHandles )
|
|
142
|
+
attach_function 'PlayEnhMetaFileRecord', [:hdc, :pointer, :pointer, :uint], :bool
|
|
143
|
+
|
|
144
|
+
#BOOL PlayMetaFile(
|
|
145
|
+
# _In_ HDC hdc,
|
|
146
|
+
# _In_ HMETAFILE hmf )
|
|
147
|
+
attach_function 'PlayMetaFile', [:hdc, :hmetafile], :bool
|
|
148
|
+
|
|
149
|
+
#BOOL PlayMetaFileRecord(
|
|
150
|
+
# _In_ HDC hdc,
|
|
151
|
+
# _In_ LPHANDLETABLE lpHandletable,
|
|
152
|
+
# _In_ LPMETARECORD lpMetaRecord,
|
|
153
|
+
# _In_ UINT nHandles )
|
|
154
|
+
attach_function 'PlayMetaFileRecord', [:hdc, HANDLETABLE.ptr, :pointer, :uint], :bool
|
|
155
|
+
|
|
156
|
+
#HENHMETAFILE SetEnhMetaFileBits(
|
|
157
|
+
# _In_ UINT cbBuffer,
|
|
158
|
+
# _In_ const BYTE *lpData )
|
|
159
|
+
attach_function 'SetEnhMetaFileBits', [:uint, :pointer], :henhmetafile
|
|
160
|
+
|
|
161
|
+
#HMETAFILE SetMetaFileBitsEx(
|
|
162
|
+
# _In_ UINT nSize,
|
|
163
|
+
# _In_ const BYTE *lpData )
|
|
164
|
+
attach_function 'SetMetaFileBitsEx', [:uint, :pointer], :hmetafile
|
|
165
|
+
|
|
166
|
+
#HENHMETAFILE SetWinMetaFileBits(
|
|
167
|
+
# _In_ UINT cbBuffer,
|
|
168
|
+
# _In_ const BYTE *lpbBuffer,
|
|
169
|
+
# _In_ HDC hdcRef,
|
|
170
|
+
# _In_ const METAFILEPICT *lpmfp )
|
|
171
|
+
attach_function 'SetWinMetaFileBits', [:uint, :pointer, :hdc, METAFILEPICT.ptr], :henhmetafile
|
|
172
|
+
end
|
|
173
|
+
end
|