Module: AMS::Window
- Defined in:
- docs/ams/window.rb
Overview
Windows only!
The Window namespace contains functions that are associated with Windows window.
Class Method Summary collapse
-
.adjust_rect(rect, style, style_ex, b_menu) ⇒ Array<Integer>
Adjust window rect.
-
.bring_to_top(handle) ⇒ Boolean
Bring window to the top of Z order.
-
.client_to_screen(handle, x, y) ⇒ Array<Integer>
Convert client coordinates to screen coordinates.
-
.close(handle) ⇒ Boolean
Close window.
-
.draw_menu_bar(handle) ⇒ Boolean
Update menu bar of a specific window.
-
.enable_input(handle, b_state) ⇒ Boolean
Enable/Disable keyboard and mouse input to a specific window.
-
.find_child_window_by_caption(parent_handle, caption, include_sub_childs = false, full_match = true, case_sensitive = true) ⇒ Integer?
Find handle to a child window with a specific caption.
-
.find_child_window_by_class_name(parent_handle, class_name, include_sub_childs = false, full_match = true, case_sensitive = true) ⇒ Integer?
Find handle to a child window with a specific class name.
-
.find_window_by_caption(caption, full_match = true, case_sensitive = true) ⇒ Integer?
Find handle to a window with a specific caption.
-
.find_window_by_class_name(class_name, full_match = true, case_sensitive = true) ⇒ Integer?
Find handle to a window with a specific class name.
-
.get_active ⇒ Integer
Get active window.
-
.get_ancestor(handle, flag) ⇒ Integer?
Get window ancestor.
-
.get_caption(handle) ⇒ String
Get window text.
-
.get_child_windows(parent_handle, include_sub_childs = false, include_hidden = true) ⇒ Array<Integer>
Get all child windows belonging to a parent window.
-
.get_class_long(handle, index) ⇒ Integer
Get class long.
-
.get_class_name(handle) ⇒ String
Get class name of a window.
-
.get_client_rect(handle) ⇒ Array<Integer>
Get upper-left and lower-right coordinates of the window's client area in client coordinates, relative to the upper-left corner of the window's client area.
-
.get_executable_name(handle) ⇒ String?
Get executable name of a window.
-
.get_executable_path(handle) ⇒ String?
Get full executable path of a window.
-
.get_keyboard_focus ⇒ Integer?
Get window containing keyboard focus.
-
.get_layered_attributes(handle) ⇒ Array<(Array<Integer>, Integer, Integer)>
Get layered attributes of a window.
-
.get_long(handle, index) ⇒ Integer
Get window long.
-
.get_menu(handle) ⇒ Integer?
Get window menu.
-
.get_module_hanlde(handle) ⇒ Integer?
Get module instance handle of a window.
-
.get_origin(handle) ⇒ Array<Integer>
Get coordinates of the upper-left corner of a window.
-
.get_parent(handle) ⇒ Integer?
Get parent window of a window.
-
.get_placement(handle) ⇒ Array<(Integer, Integer, Integer, Array<Integer>, Array<Integer>, Array<Integer>)>
Get window placement.
-
.get_process_id(handle) ⇒ Integer
Get process identifier of a window.
-
.get_process_windows(process_id, include_hidden = true) ⇒ Array<Integer>
Get all windows belonging to a process.
-
.get_rect(handle) ⇒ Array<Integer>
Get upper-left and lower-right coordinates of a window in screen coordinates, relative to the upper-left corner of the screen.
-
.get_related(handle, command) ⇒ Integer?
Get related window of a window.
-
.get_size(handle) ⇒ Array<Integer>
Get size of a window.
-
.get_thread_id(handle) ⇒ Integer
Get thread identifier of a window.
-
.get_thread_windows(thread_id, include_hidden = true) ⇒ Array<Integer>
Get all windows belonging to a thread.
-
.get_windows(include_hidden = true) ⇒ Array<Integer>
Get all windows.
-
.is_active?(handle) ⇒ Boolean
Determine whether window is active.
-
.is_child?(handle, parent_handle) ⇒ Boolean
Determine whether window is a child window of a specific parent window.
-
.is_input_enabled?(handle) ⇒ Boolean
Determine whether keyboard and mouse input is enabled in a specific window.
-
.is_maximized?(handle) ⇒ Boolean
Determine whether window is maximized.
-
.is_minimized?(handle) ⇒ Boolean
Determine whether window is minimized.
-
.is_resizeable?(handle) ⇒ Boolean
Determine whether window is resizeable.
-
.is_restored?(handle) ⇒ Boolean
Determine whether window is restored; not maximized nor minimized.
-
.is_unicode?(handle) ⇒ Boolean
Determine whether window is unicode.
-
.is_valid?(handle) ⇒ Boolean
Determine whether handle is a reference to a valid window.
-
.is_visible?(handle) ⇒ Boolean
Determine whether window is visible.
-
.lock_update(handle) ⇒ Boolean
Lock window update.
-
.map_point(handle_from, handle_to, x, y) ⇒ Array<Integer>
Convert (map) a point from a coordinate space relative to one window to a coordinate space relative to another window.
-
.move(handle, x, y, width, height, b_repaint = true) ⇒ Boolean
Move window.
-
.peek_message(handle, msg_filter_min, msg_filter_max, remove_flag) ⇒ Array?
Peek message of a specific window.
-
.peek_message2(handle, msg_filter_min, msg_filter_max, remove_flag) ⇒ Boolean
Peek message of a specific window.
-
.post_message(handle, message, wParam, lParam) ⇒ Boolean
Post message to a specific window.
-
.refresh(handle) ⇒ Boolean
Refresh window.
-
.screen_to_client(handle, x, y) ⇒ Array<Integer>
Convert screen coordinates to client coordinates.
-
.send_message(handle, message, wParam, lParam) ⇒ Integer
Send message to a specific window.
-
.set_active(handle) ⇒ Integer
Set active window.
-
.set_background_color(handle, color, b_activate = true) ⇒ Boolean
Set window background color.
-
.set_caption(handle, caption) ⇒ Boolean
Set window text.
-
.set_class_long(handle, index, long) ⇒ Integer
Set class long.
-
.set_icon(handle, full_path) ⇒ Boolean
Modify window icon.
-
.set_keyboard_focus(handle) ⇒ Integer
Set keyboard focus to a window.
-
.set_layered_attributes(handle, color, opacity, flags) ⇒ Boolean
Set layered attributes of a window.
-
.set_long(handle, index, long) ⇒ Integer
Set window long.
-
.set_menu(handle, menu_handle) ⇒ Boolean
Set window menu.
-
.set_origin(handle, x, y, b_activate = true) ⇒ Boolean
Set coordinates of the upper-left corner of a window.
-
.set_parent(handle, parent_handle) ⇒ Integer?
Set parent window of a window.
-
.set_placement(handle, flags, show_cmd, min_pt, max_pt, rect) ⇒ Boolean
Set Window Placement.
-
.set_pos(handle, handle_insert_after, x, y, cx, cy, flags) ⇒ Boolean
Set window position.
-
.set_rect(handle, x1, y1, x2, y2, b_activate = true) ⇒ Boolean
Set upper-left and lower-right coordinates of a window.
-
.set_resizeable(handle, b_state, b_activate = true) ⇒ Boolean
Set window resizeable.
-
.set_size(handle, w, h, b_activate = true) ⇒ Boolean
Set size of a window.
-
.show(handle, state) ⇒ Boolean
Set show state of a window.
Class Method Details
.adjust_rect(rect, style, style_ex, b_menu) ⇒ Array<Integer>
Adjust window rect.
.bring_to_top(handle) ⇒ Boolean
Bring window to the top of Z order. If window is a top-level window, it is activated. If window is a child window, the top-level parent window associated with the child window is activated.
.client_to_screen(handle, x, y) ⇒ Array<Integer>
Convert client coordinates to screen coordinates.
.close(handle) ⇒ Boolean
This function behaves the same way as clicking the 'X' button.
Close window.
.draw_menu_bar(handle) ⇒ Boolean
Update menu bar of a specific window.
.enable_input(handle, b_state) ⇒ Boolean
Enable/Disable keyboard and mouse input to a specific window.
.find_child_window_by_caption(parent_handle, caption, include_sub_childs = false, full_match = true, case_sensitive = true) ⇒ Integer?
Find handle to a child window with a specific caption.
.find_child_window_by_class_name(parent_handle, class_name, include_sub_childs = false, full_match = true, case_sensitive = true) ⇒ Integer?
Find handle to a child window with a specific class name.
.find_window_by_caption(caption, full_match = true, case_sensitive = true) ⇒ Integer?
Find handle to a window with a specific caption.
.find_window_by_class_name(class_name, full_match = true, case_sensitive = true) ⇒ Integer?
Find handle to a window with a specific class name.
.get_active ⇒ Integer
Get active window.
.get_ancestor(handle, flag) ⇒ Integer?
Get window ancestor.
.get_caption(handle) ⇒ String
Get window text.
.get_child_windows(parent_handle, include_sub_childs = false, include_hidden = true) ⇒ Array<Integer>
Get all child windows belonging to a parent window.
.get_class_long(handle, index) ⇒ Integer
Get class long.
.get_class_name(handle) ⇒ String
Get class name of a window.
.get_client_rect(handle) ⇒ Array<Integer>
Get upper-left and lower-right coordinates of the window's client area in client coordinates, relative to the upper-left corner of the window's client area. Because coordinates are relative to the upper-left corner of the client area, the coordinates of the upper-left corner are (0,0).
.get_executable_name(handle) ⇒ String?
Get executable name of a window.
.get_executable_path(handle) ⇒ String?
Get full executable path of a window.
.get_keyboard_focus ⇒ Integer?
Get window containing keyboard focus.
.get_layered_attributes(handle) ⇒ Array<(Array<Integer>, Integer, Integer)>
Get layered attributes of a window.
.get_long(handle, index) ⇒ Integer
Get window long.
.get_menu(handle) ⇒ Integer?
Get window menu.
.get_module_hanlde(handle) ⇒ Integer?
Get module instance handle of a window.
.get_origin(handle) ⇒ Array<Integer>
Get coordinates of the upper-left corner of a window.
.get_parent(handle) ⇒ Integer?
Get parent window of a window.
.get_placement(handle) ⇒ Array<(Integer, Integer, Integer, Array<Integer>, Array<Integer>, Array<Integer>)>
Get window placement.
.get_process_id(handle) ⇒ Integer
Get process identifier of a window.
.get_process_windows(process_id, include_hidden = true) ⇒ Array<Integer>
Get all windows belonging to a process.
.get_rect(handle) ⇒ Array<Integer>
Get upper-left and lower-right coordinates of a window in screen coordinates, relative to the upper-left corner of the screen.
.get_related(handle, command) ⇒ Integer?
Get related window of a window.
.get_size(handle) ⇒ Array<Integer>
Get size of a window.
.get_thread_id(handle) ⇒ Integer
Get thread identifier of a window.
.get_thread_windows(thread_id, include_hidden = true) ⇒ Array<Integer>
Get all windows belonging to a thread.
.get_windows(include_hidden = true) ⇒ Array<Integer>
Get all windows.
.is_active?(handle) ⇒ Boolean
Determine whether window is active.
.is_child?(handle, parent_handle) ⇒ Boolean
Determine whether window is a child window of a specific parent window.
.is_input_enabled?(handle) ⇒ Boolean
Determine whether keyboard and mouse input is enabled in a specific window.
.is_maximized?(handle) ⇒ Boolean
Determine whether window is maximized.
.is_minimized?(handle) ⇒ Boolean
Determine whether window is minimized.
.is_resizeable?(handle) ⇒ Boolean
Determine whether window is resizeable.
.is_restored?(handle) ⇒ Boolean
Determine whether window is restored; not maximized nor minimized.
.is_unicode?(handle) ⇒ Boolean
Determine whether window is unicode.
.is_valid?(handle) ⇒ Boolean
Determine whether handle is a reference to a valid window.
.is_visible?(handle) ⇒ Boolean
Determine whether window is visible.
.lock_update(handle) ⇒ Boolean
This method is usually called before and after setting window styles, followed by set_pos to update setting.
Lock window update.
.map_point(handle_from, handle_to, x, y) ⇒ Array<Integer>
Convert (map) a point from a coordinate space relative to one window to a coordinate space relative to another window.
.move(handle, x, y, width, height, b_repaint = true) ⇒ Boolean
Move window.
.peek_message(handle, msg_filter_min, msg_filter_max, remove_flag) ⇒ Array?
Peek message of a specific window.
.peek_message2(handle, msg_filter_min, msg_filter_max, remove_flag) ⇒ Boolean
Peek message of a specific window.
.post_message(handle, message, wParam, lParam) ⇒ Boolean
Post message to a specific window.
.refresh(handle) ⇒ Boolean
Refresh window.
.screen_to_client(handle, x, y) ⇒ Array<Integer>
Convert screen coordinates to client coordinates.
.send_message(handle, message, wParam, lParam) ⇒ Integer
Send message to a specific window.
.set_active(handle) ⇒ Integer
Set active window.
.set_background_color(handle, color, b_activate = true) ⇒ Boolean
Set window background color.
.set_caption(handle, caption) ⇒ Boolean
Set window text.
.set_class_long(handle, index, long) ⇒ Integer
Set class long.
.set_icon(handle, full_path) ⇒ Boolean
Modify window icon.
.set_keyboard_focus(handle) ⇒ Integer
Set keyboard focus to a window.
.set_layered_attributes(handle, color, opacity, flags) ⇒ Boolean
Set layered attributes of a window.
.set_long(handle, index, long) ⇒ Integer
Set window long.
.set_menu(handle, menu_handle) ⇒ Boolean
Set window menu.
.set_origin(handle, x, y, b_activate = true) ⇒ Boolean
Set coordinates of the upper-left corner of a window.
.set_parent(handle, parent_handle) ⇒ Integer?
Set parent window of a window.
.set_placement(handle, flags, show_cmd, min_pt, max_pt, rect) ⇒ Boolean
Set Window Placement.
.set_pos(handle, handle_insert_after, x, y, cx, cy, flags) ⇒ Boolean
Set window position.
.set_rect(handle, x1, y1, x2, y2, b_activate = true) ⇒ Boolean
Set upper-left and lower-right coordinates of a window.
.set_resizeable(handle, b_state, b_activate = true) ⇒ Boolean
Set window resizeable.
.set_size(handle, w, h, b_activate = true) ⇒ Boolean
Set size of a window.
.show(handle, state) ⇒ Boolean
Set show state of a window.