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([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, :resized, :moved, :focused, :unfocused, :file_dropped, :file_hovered([Symbol], : close_requested, : resized, : moved, : focused, : unfocused, : file_dropped, : file_hovered) ⇒ Object
readonly
Window lifecycle events (open, close, resize, move, focus, etc.).
-
#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.
146 147 148 149 |
# File 'lib/plushie/event.rb', line 146 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
144 145 146 |
# File 'lib/plushie/event.rb', line 144 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.
144 145 146 147 148 149 150 |
# File 'lib/plushie/event.rb', line 144 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
144 145 146 |
# File 'lib/plushie/event.rb', line 144 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.
144 145 146 147 148 149 150 |
# File 'lib/plushie/event.rb', line 144 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
144 145 146 |
# File 'lib/plushie/event.rb', line 144 def scale_factor @scale_factor end |
#scale_factor [Float, nil] display scale factor([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.
144 145 146 147 148 149 150 |
# File 'lib/plushie/event.rb', line 144 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
144 145 146 |
# File 'lib/plushie/event.rb', line 144 def type @type end |
#type [Symbol] :opened, :close_requested, :resized, :moved, :focused, :unfocused, :file_dropped, :file_hovered([Symbol], : close_requested, : resized, : moved, : focused, : unfocused, : file_dropped, : file_hovered) ⇒ 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.
144 145 146 147 148 149 150 |
# File 'lib/plushie/event.rb', line 144 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
144 145 146 |
# File 'lib/plushie/event.rb', line 144 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.
144 145 146 147 148 149 150 |
# File 'lib/plushie/event.rb', line 144 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
144 145 146 |
# File 'lib/plushie/event.rb', line 144 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.
144 145 146 147 148 149 150 |
# File 'lib/plushie/event.rb', line 144 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
144 145 146 |
# File 'lib/plushie/event.rb', line 144 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.
144 145 146 147 148 149 150 |
# File 'lib/plushie/event.rb', line 144 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
144 145 146 |
# File 'lib/plushie/event.rb', line 144 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.
144 145 146 147 148 149 150 |
# File 'lib/plushie/event.rb', line 144 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 |