Class: Plushie::Event::Window
- Inherits:
-
Data
- Object
- Data
- Plushie::Event::Window
- Defined in:
- lib/plushie/event.rb
Overview
Window lifecycle events (open, close, resize, move, focus, etc.). Triggered by window manager actions or user interaction with window chrome. Subscribe via Subscription.on_window_close, on_window_open, on_window_resize, etc.
Instance Attribute Summary collapse
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#height [Float, nil] window height (for :resized, :opened)([Float, nil]() ⇒ Object
readonly
Window lifecycle events (open, close, resize, move, focus, etc.).
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#path [String, nil] file path (for :file_dropped, :file_hovered)([String, nil]() ⇒ Object
readonly
Window lifecycle events (open, close, resize, move, focus, etc.).
-
#scale_factor ⇒ Object
readonly
Returns the value of attribute scale_factor.
-
#scale_factor [Float, nil] display scale factor (for :rescaled)([Float, nil]() ⇒ Object
readonly
Window lifecycle events (open, close, resize, move, focus, etc.).
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#type [Symbol] :opened, :close_requested, :closed,([Symbol], : close_requested, : closed) ⇒ Object
readonly
:resized, :rescaled, :moved, :focused, :unfocused, :file_dropped, :file_hovered, :files_hovered_left.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
-
#width [Float, nil] window width (for :resized, :opened)([Float, nil]() ⇒ Object
readonly
Window lifecycle events (open, close, resize, move, focus, etc.).
-
#window_id ⇒ Object
readonly
Returns the value of attribute window_id.
-
#window_id [String, nil] ID of the affected window([String, nil]) ⇒ Object
readonly
Window lifecycle events (open, close, resize, move, focus, etc.).
-
#x ⇒ Object
readonly
Returns the value of attribute x.
-
#x [Float, nil] window x position (for :moved)([Float, nil]() ⇒ Object
readonly
Window lifecycle events (open, close, resize, move, focus, etc.).
-
#y ⇒ Object
readonly
Returns the value of attribute y.
-
#y [Float, nil] window y position (for :moved)([Float, nil]() ⇒ Object
readonly
Window lifecycle events (open, close, resize, move, focus, etc.).
Instance Method Summary collapse
-
#initialize(type:, window_id: nil, x: nil, y: nil, width: nil, height: nil, scale_factor: nil, path: nil) ⇒ Window
constructor
A new instance of Window.
Constructor Details
#initialize(type:, window_id: nil, x: nil, y: nil, width: nil, height: nil, scale_factor: nil, path: nil) ⇒ Window
Returns a new instance of Window.
165 166 167 168 |
# File 'lib/plushie/event.rb', line 165 def initialize(type:, window_id: nil, x: nil, y: nil, width: nil, height: nil, scale_factor: nil, path: nil) super end |
Instance Attribute Details
#height ⇒ Object (readonly)
Returns the value of attribute height
163 164 165 |
# File 'lib/plushie/event.rb', line 163 def height @height end |
#height [Float, nil] window height (for :resized, :opened)([Float, nil]() ⇒ Object (readonly)
Window lifecycle events (open, close, resize, move, focus, etc.). Triggered by window manager actions or user interaction with window chrome. Subscribe via Subscription.on_window_close, on_window_open, on_window_resize, etc.
163 164 165 166 167 168 169 |
# File 'lib/plushie/event.rb', line 163 Window = Data.define(:type, :window_id, :x, :y, :width, :height, :scale_factor, :path) do def initialize(type:, window_id: nil, x: nil, y: nil, width: nil, height: nil, scale_factor: nil, path: nil) super end end |
#path ⇒ Object (readonly)
Returns the value of attribute path
163 164 165 |
# File 'lib/plushie/event.rb', line 163 def path @path end |
#path [String, nil] file path (for :file_dropped, :file_hovered)([String, nil]() ⇒ Object (readonly)
Window lifecycle events (open, close, resize, move, focus, etc.). Triggered by window manager actions or user interaction with window chrome. Subscribe via Subscription.on_window_close, on_window_open, on_window_resize, etc.
163 164 165 166 167 168 169 |
# File 'lib/plushie/event.rb', line 163 Window = Data.define(:type, :window_id, :x, :y, :width, :height, :scale_factor, :path) do def initialize(type:, window_id: nil, x: nil, y: nil, width: nil, height: nil, scale_factor: nil, path: nil) super end end |
#scale_factor ⇒ Object (readonly)
Returns the value of attribute scale_factor
163 164 165 |
# File 'lib/plushie/event.rb', line 163 def scale_factor @scale_factor end |
#scale_factor [Float, nil] display scale factor (for :rescaled)([Float, nil]() ⇒ Object (readonly)
Window lifecycle events (open, close, resize, move, focus, etc.). Triggered by window manager actions or user interaction with window chrome. Subscribe via Subscription.on_window_close, on_window_open, on_window_resize, etc.
163 164 165 166 167 168 169 |
# File 'lib/plushie/event.rb', line 163 Window = Data.define(:type, :window_id, :x, :y, :width, :height, :scale_factor, :path) do def initialize(type:, window_id: nil, x: nil, y: nil, width: nil, height: nil, scale_factor: nil, path: nil) super end end |
#type ⇒ Object (readonly)
Returns the value of attribute type
163 164 165 |
# File 'lib/plushie/event.rb', line 163 def type @type end |
#type [Symbol] :opened, :close_requested, :closed,([Symbol], : close_requested, : closed) ⇒ Object (readonly)
:resized, :rescaled, :moved, :focused, :unfocused, :file_dropped, :file_hovered, :files_hovered_left
163 164 165 166 167 168 169 |
# File 'lib/plushie/event.rb', line 163 Window = Data.define(:type, :window_id, :x, :y, :width, :height, :scale_factor, :path) do def initialize(type:, window_id: nil, x: nil, y: nil, width: nil, height: nil, scale_factor: nil, path: nil) super end end |
#width ⇒ Object (readonly)
Returns the value of attribute width
163 164 165 |
# File 'lib/plushie/event.rb', line 163 def width @width end |
#width [Float, nil] window width (for :resized, :opened)([Float, nil]() ⇒ Object (readonly)
Window lifecycle events (open, close, resize, move, focus, etc.). Triggered by window manager actions or user interaction with window chrome. Subscribe via Subscription.on_window_close, on_window_open, on_window_resize, etc.
163 164 165 166 167 168 169 |
# File 'lib/plushie/event.rb', line 163 Window = Data.define(:type, :window_id, :x, :y, :width, :height, :scale_factor, :path) do def initialize(type:, window_id: nil, x: nil, y: nil, width: nil, height: nil, scale_factor: nil, path: nil) super end end |
#window_id ⇒ Object (readonly)
Returns the value of attribute window_id
163 164 165 |
# File 'lib/plushie/event.rb', line 163 def window_id @window_id end |
#window_id [String, nil] ID of the affected window([String, nil]) ⇒ Object (readonly)
Window lifecycle events (open, close, resize, move, focus, etc.). Triggered by window manager actions or user interaction with window chrome. Subscribe via Subscription.on_window_close, on_window_open, on_window_resize, etc.
163 164 165 166 167 168 169 |
# File 'lib/plushie/event.rb', line 163 Window = Data.define(:type, :window_id, :x, :y, :width, :height, :scale_factor, :path) do def initialize(type:, window_id: nil, x: nil, y: nil, width: nil, height: nil, scale_factor: nil, path: nil) super end end |
#x ⇒ Object (readonly)
Returns the value of attribute x
163 164 165 |
# File 'lib/plushie/event.rb', line 163 def x @x end |
#x [Float, nil] window x position (for :moved)([Float, nil]() ⇒ Object (readonly)
Window lifecycle events (open, close, resize, move, focus, etc.). Triggered by window manager actions or user interaction with window chrome. Subscribe via Subscription.on_window_close, on_window_open, on_window_resize, etc.
163 164 165 166 167 168 169 |
# File 'lib/plushie/event.rb', line 163 Window = Data.define(:type, :window_id, :x, :y, :width, :height, :scale_factor, :path) do def initialize(type:, window_id: nil, x: nil, y: nil, width: nil, height: nil, scale_factor: nil, path: nil) super end end |
#y ⇒ Object (readonly)
Returns the value of attribute y
163 164 165 |
# File 'lib/plushie/event.rb', line 163 def y @y end |
#y [Float, nil] window y position (for :moved)([Float, nil]() ⇒ Object (readonly)
Window lifecycle events (open, close, resize, move, focus, etc.). Triggered by window manager actions or user interaction with window chrome. Subscribe via Subscription.on_window_close, on_window_open, on_window_resize, etc.
163 164 165 166 167 168 169 |
# File 'lib/plushie/event.rb', line 163 Window = Data.define(:type, :window_id, :x, :y, :width, :height, :scale_factor, :path) do def initialize(type:, window_id: nil, x: nil, y: nil, width: nil, height: nil, scale_factor: nil, path: nil) super end end |