Module: Plushie::Command::Window
- Defined in:
- lib/plushie/command/window.rb
Overview
Window operation commands.
== Lifecycle close_window
== Sizing and position resize_window, move_window, set_min_size, set_max_size, set_resize_increments, set_resizable
== Window state maximize_window, minimize_window, toggle_maximize, set_window_mode, toggle_decorations, set_window_level
== Focus and interaction focus_window, drag_window, drag_resize_window, request_attention, show_system_menu
== Input enable_mouse_passthrough, disable_mouse_passthrough
== Visuals set_icon, screenshot
Class Method Summary collapse
- .allow_automatic_tabbing(enabled) ⇒ Cmd
- .close_window(window_id) ⇒ Cmd
- .disable_mouse_passthrough(window_id) ⇒ Cmd
- .drag_resize_window(window_id, direction) ⇒ Cmd
- .drag_window(window_id) ⇒ Cmd
- .enable_mouse_passthrough(window_id) ⇒ Cmd
-
.focus_window(window_id) ⇒ Cmd
Bring window to front and give it focus.
- .maximize_window(window_id, maximized = true) ⇒ Cmd
- .minimize_window(window_id, minimized = true) ⇒ Cmd
- .move_window(window_id, x, y) ⇒ Cmd
- .request_attention(window_id, urgency) ⇒ Cmd
- .resize_window(window_id, width, height) ⇒ Cmd
- .screenshot(window_id, tag) ⇒ Cmd
- .set_icon(window_id, rgba_data, width, height) ⇒ Cmd
- .set_max_size(window_id, width, height) ⇒ Cmd
- .set_min_size(window_id, width, height) ⇒ Cmd
- .set_resizable(window_id, resizable) ⇒ Cmd
- .set_resize_increments(window_id, width, height) ⇒ Cmd
- .set_window_level(window_id, level) ⇒ Cmd
- .set_window_mode(window_id, mode) ⇒ Cmd
- .show_system_menu(window_id) ⇒ Cmd
- .toggle_decorations(window_id) ⇒ Cmd
- .toggle_maximize(window_id) ⇒ Cmd
Class Method Details
.allow_automatic_tabbing(enabled) ⇒ Cmd
143 |
# File 'lib/plushie/command/window.rb', line 143 def allow_automatic_tabbing(enabled) = Cmd.new(type: :system_op, payload: {op: "allow_automatic_tabbing", enabled:}) |
.close_window(window_id) ⇒ Cmd
33 |
# File 'lib/plushie/command/window.rb', line 33 def close_window(window_id) = Cmd.new(type: :window_op, payload: {op: "close", window_id:}) |
.disable_mouse_passthrough(window_id) ⇒ Cmd
122 |
# File 'lib/plushie/command/window.rb', line 122 def disable_mouse_passthrough(window_id) = Cmd.new(type: :window_op, payload: {op: "mouse_passthrough", window_id:, enabled: false}) |
.drag_resize_window(window_id, direction) ⇒ Cmd
87 |
# File 'lib/plushie/command/window.rb', line 87 def drag_resize_window(window_id, direction) = Cmd.new(type: :window_op, payload: {op: "drag_resize", window_id:, direction: direction.to_s}) |
.drag_window(window_id) ⇒ Cmd
82 |
# File 'lib/plushie/command/window.rb', line 82 def drag_window(window_id) = Cmd.new(type: :window_op, payload: {op: "drag", window_id:}) |
.enable_mouse_passthrough(window_id) ⇒ Cmd
118 |
# File 'lib/plushie/command/window.rb', line 118 def enable_mouse_passthrough(window_id) = Cmd.new(type: :window_op, payload: {op: "mouse_passthrough", window_id:, enabled: true}) |
.focus_window(window_id) ⇒ Cmd
Bring window to front and give it focus.
73 |
# File 'lib/plushie/command/window.rb', line 73 def focus_window(window_id) = Cmd.new(type: :window_op, payload: {op: "gain_focus", window_id:}) |
.maximize_window(window_id, maximized = true) ⇒ Cmd
50 |
# File 'lib/plushie/command/window.rb', line 50 def maximize_window(window_id, maximized = true) = Cmd.new(type: :window_op, payload: {op: "maximize", window_id:, maximized:}) |
.minimize_window(window_id, minimized = true) ⇒ Cmd
55 |
# File 'lib/plushie/command/window.rb', line 55 def minimize_window(window_id, minimized = true) = Cmd.new(type: :window_op, payload: {op: "minimize", window_id:, minimized:}) |
.move_window(window_id, x, y) ⇒ Cmd
45 |
# File 'lib/plushie/command/window.rb', line 45 def move_window(window_id, x, y) = Cmd.new(type: :window_op, payload: {op: "move", window_id:, x:, y:}) |
.request_attention(window_id, urgency) ⇒ Cmd
92 |
# File 'lib/plushie/command/window.rb', line 92 def request_attention(window_id, urgency) = Cmd.new(type: :window_op, payload: {op: "request_attention", window_id:, urgency: urgency&.to_s}) |
.resize_window(window_id, width, height) ⇒ Cmd
39 |
# File 'lib/plushie/command/window.rb', line 39 def resize_window(window_id, width, height) = Cmd.new(type: :window_op, payload: {op: "resize", window_id:, width:, height:}) |
.screenshot(window_id, tag) ⇒ Cmd
97 |
# File 'lib/plushie/command/window.rb', line 97 def screenshot(window_id, tag) = Cmd.new(type: :window_query, payload: {op: "screenshot", window_id:, tag: tag.to_s}) |
.set_icon(window_id, rgba_data, width, height) ⇒ Cmd
133 |
# File 'lib/plushie/command/window.rb', line 133 def set_icon(window_id, rgba_data, width, height) = Cmd.new(type: :window_op, payload: {op: "set_icon", window_id:, icon_data: rgba_data, width:, height:}) |
.set_max_size(window_id, width, height) ⇒ Cmd
114 |
# File 'lib/plushie/command/window.rb', line 114 def set_max_size(window_id, width, height) = Cmd.new(type: :window_op, payload: {op: "set_max_size", window_id:, width:, height:}) |
.set_min_size(window_id, width, height) ⇒ Cmd
108 |
# File 'lib/plushie/command/window.rb', line 108 def set_min_size(window_id, width, height) = Cmd.new(type: :window_op, payload: {op: "set_min_size", window_id:, width:, height:}) |
.set_resizable(window_id, resizable) ⇒ Cmd
102 |
# File 'lib/plushie/command/window.rb', line 102 def set_resizable(window_id, resizable) = Cmd.new(type: :window_op, payload: {op: "set_resizable", window_id:, resizable:}) |
.set_resize_increments(window_id, width, height) ⇒ Cmd
139 |
# File 'lib/plushie/command/window.rb', line 139 def set_resize_increments(window_id, width, height) = Cmd.new(type: :window_op, payload: {op: "set_resize_increments", window_id:, width:, height:}) |
.set_window_level(window_id, level) ⇒ Cmd
78 |
# File 'lib/plushie/command/window.rb', line 78 def set_window_level(window_id, level) = Cmd.new(type: :window_op, payload: {op: "set_level", window_id:, level: level.to_s}) |
.set_window_mode(window_id, mode) ⇒ Cmd
60 |
# File 'lib/plushie/command/window.rb', line 60 def set_window_mode(window_id, mode) = Cmd.new(type: :window_op, payload: {op: "set_mode", window_id:, mode: mode.to_s}) |
.show_system_menu(window_id) ⇒ Cmd
126 |
# File 'lib/plushie/command/window.rb', line 126 def (window_id) = Cmd.new(type: :window_op, payload: {op: "show_system_menu", window_id:}) |