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
34 35 36 |
# File 'lib/sdl2/window.rb', line 34 def self.centered_display(x) self::CENTERED_MASK | x end |
.is_centered(x) ⇒ Object
40 41 42 |
# File 'lib/sdl2/window.rb', line 40 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.
28 29 30 |
# File 'lib/sdl2/window.rb', line 28 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>`
20 21 22 |
# File 'lib/sdl2/window.rb', line 20 def self.undefined_display(x) self::UNEDFINED_MASK|x end |