Class: Fzeet::WindowMethods::Long
- Inherits:
-
Object
- Object
- Fzeet::WindowMethods::Long
- Defined in:
- lib/fzeet/Window/WindowMethods.rb
Instance Method Summary collapse
- #[](c) ⇒ Object
- #[]=(c, l) ⇒ Object
-
#initialize(window) ⇒ Long
constructor
A new instance of Long.
Constructor Details
#initialize(window) ⇒ Long
Returns a new instance of Long.
43 |
# File 'lib/fzeet/Window/WindowMethods.rb', line 43 def initialize(window) @window = window end |
Instance Method Details
#[](c) ⇒ Object
45 46 47 48 49 50 51 |
# File 'lib/fzeet/Window/WindowMethods.rb', line 45 def [](c) Windows.SetLastError(0) Windows.GetWindowLong(@window.handle, Fzeet.constant(c, :gwl_, :gwlp_, :dwl_)).tap { |result| raise 'GetWindowLong failed.' if result == 0 && Windows.GetLastError() != 0 } end |
#[]=(c, l) ⇒ Object
53 54 55 56 57 58 59 |
# File 'lib/fzeet/Window/WindowMethods.rb', line 53 def []=(c, l) Windows.SetLastError(0) Windows.SetWindowLong(@window.handle, Fzeet.constant(c, :gwl_, :gwlp_, :dwl_), l).tap { |result| raise 'SetWindowLong failed.' if result == 0 && Windows.GetLastError() != 0 } end |