Module: RbSDL2::Window::Flash
- Included in:
- RbSDL2::Window
- Defined in:
- lib/rb_sdl2/window/flash.rb
Constant Summary collapse
- SDL_FLASH_CANCEL =
0
- SDL_FLASH_BRIEFLY =
1
- SDL_FLASH_UNTIL_FOCUSED =
2
Instance Method Summary collapse
Instance Method Details
#flash(bool = true) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/rb_sdl2/window/flash.rb', line 8 def flash(bool = true) operation = bool ? SDL_FLASH_UNTIL_FOCUSED : SDL_FLASH_CANCEL err = ::SDL.FlashWindow(self, operation) raise RbSDL2Error if err < 0 bool end |
#flash! ⇒ Object
15 16 17 18 19 |
# File 'lib/rb_sdl2/window/flash.rb', line 15 def flash! err = ::SDL.FlashWindow(self, SDL_FLASH_BRIEFLY) raise RbSDL2Error if err < 0 self end |