class CrystGLUT::Window
- CrystGLUT::Window
- Reference
- Object
Defined in:
cryst_glut/window.crConstant Summary
-
NUM_KEYCODES =
1256
Constructors
Instance Method Summary
-
#dispose
Terminates the window
-
#enable_cursor(enabled : Bool)
Enables or disables the cursor icon
-
#get_height : Int32
Returns the height of the window
-
#get_keys_down
returns the keys that are currently down
-
#get_mouse_buttons_down
returns the mouse buttons that are currently
-
#get_mouse_x : Float32
returns the x coordinate of the mouse
-
#get_mouse_y : Float32
Returns the y coordinate of the mouse
-
#get_width : Int32
Returns the width of the window
-
#is_close_requested : Bool
Checks if the window has requested to close
-
#is_key_down(key_code : Int32 | UInt8) : Bool
checks if the key is down
-
#is_mouse_down(key_code : Int32) : Bool
checks if the mouse key is down
-
#on_display(&block : -> )
Assigns a block to manage rendering the display
-
#open
Opens the window
-
#render
Process queued OpenGL commands
-
#set_cursor(cursor : LibC::Int)
Changes the icon of the cursor.
-
#set_mouse_position(x : Float32, y : Float32)
sets the position of the mouse within the window
Constructor Detail
Instance Method Detail
def set_cursor(cursor : LibC::Int)
#
Changes the icon of the cursor. Look up glutSetCursor for valid values.