abstract class RenderLoop::Window(Key, MouseButton)

Overview

Produces an abstraction around a window object so you can use any window context you want. The generics Key and MouseButton are enums that define the available values.

TODO maybe pass in the cursor as a generic as well so we we can reduce boilerplate.

Defined in:

render_loop/window.cr

Instance Method Summary

Instance Method Detail

abstract def cursor_position : RenderLoop::Position #

[View source]
abstract def cursor_position=(position : RenderLoop::Position) #

[View source]
abstract def cursor_visible=(visible : Bool) #

abstract def cursor_visible? : Bool


[View source]
abstract def destroy #

[View source]
abstract def key_pressed?(k : Key) : Bool #

[View source]
def keys : Array(Key) #

[View source]
abstract def mouse_button_pressed?(b : MouseButton) : Bool #

[View source]
def mouse_buttons : Array(MouseButton) #

[View source]
abstract def render #

This gives the window an opportunity to paint to the screen


[View source]
abstract def should_close? : Bool #

[View source]
abstract def size(s : RenderLoop::Size) #

[View source]
abstract def size : RenderLoop::Size #

[View source]
abstract def startup #

[View source]