Module: SDL2::WINDOWPOS
- Includes:
- EnumerableConstants
- Defined in:
- lib/sdl2/window.rb
Overview
Used to indicate that you don’t care what the window position is.
Constant Summary collapse
- UNEDFINED_MASK =
0x1FFF0000
- UNDEFINED =
undefined_display(0)
- CENTERED_MASK =
0x2FFF0000
- CENTERED =
centered_display(0)
Class Method Summary collapse
- .centered_display(x) ⇒ Object
- .is_centered(x) ⇒ Object
-
.is_undefined(x) ⇒ Object
SDL_video.h doesn’t have much documentation on this, I think it is used internally, but may be useful for applications.
-
.undefined_display(x) ⇒ Object
Used to generate the UNDEFINED constant, which if I understand correctly is just UNDEFINED_MASK anyways.
Methods included from EnumerableConstants
Class Method Details
.centered_display(x) ⇒ Object
51 52 53 |
# File 'lib/sdl2/window.rb', line 51 def self.centered_display(x) self::CENTERED_MASK | x end |
.is_centered(x) ⇒ Object
57 58 59 |
# File 'lib/sdl2/window.rb', line 57 def self.is_centered(x) (((x)&0xFFFF0000) == self::CENTERED_MASK) end |
.is_undefined(x) ⇒ Object
SDL_video.h doesn’t have much documentation on this, I think it is used internally, but may be useful for applications.
45 46 47 |
# File 'lib/sdl2/window.rb', line 45 def self.is_undefined(x) (((x)&0xFFFFF00000) == self::UNDEFINED_MASK) end |
.undefined_display(x) ⇒ Object
Used to generate the UNDEFINED constant, which if I understand correctly is just UNDEFINED_MASK anyways. I think this is to encourage divers/applications to write specific undefined codes? ‘</ramble>`
37 38 39 |
# File 'lib/sdl2/window.rb', line 37 def self.undefined_display(x) self::UNEDFINED_MASK|x end |