abstract class
Eagle::Platform::Base
- Eagle::Platform::Base
- Reference
- Object
Overview
The interface a platform backend implements. Eagle.platform returns the active one.
Defined in:
eagle/platform/base.crInstance Method Summary
-
#base_path : String
Folder containing the executable.
-
#clipboard : String
Clipboard text.
-
#clipboard=(s : String)
Sets the clipboard text.
-
#close : Nil
Destroys the window and shuts the backend down.
-
#close_audio : Nil
Closes the audio output.
-
#cursor_visible=(v : Bool)
Shows or hides the cursor.
-
#drawable_size : Tuple(Int32, Int32)
Framebuffer size in pixels.
-
#fullscreen=(v : Bool)
Enters or leaves fullscreen.
-
#gamepad_name(id : Int32) : String | Nil
The product name of a controller.
-
#gamepad_rumble(id : Int32, low : Float32, high : Float32, ms : Int32) : Nil
Vibrates a controller.
-
#gl_proc(name : String) : Pointer(Void)
Looks up an OpenGL function pointer.
-
#message_box(title : String, message : String) : Nil
Shows a native message box, for fatal errors.
-
#mouse_position : Vec2
Current mouse position.
-
#now : Float64
Monotonic time in seconds.
-
#open(config : WindowConfig) : Nil
Creates the window and graphics context.
-
#open_audio(sample_rate : Int32, buffer_frames : Int32) : Int32
Opens a stereo float output.
-
#poll_events(& : Event -> ) : Nil
Yields each pending event.
-
#pref_path(org : String, app : String) : String
A writable folder for saves and settings, per organization and app.
-
#queue_audio(frames : Slice(Float32)) : Nil
Queues interleaved stereo samples for playback.
-
#queued_audio_frames : Int32
Frames queued and not yet played.
-
#relative_mouse=(v : Bool)
Captures or releases the mouse.
-
#sleep(seconds : Float64) : Nil
Sleeps for seconds.
-
#swap : Nil
Presents the frame.
-
#text_input=(enabled : Bool)
Starts or stops OS text input.
-
#title=(t : String)
Sets the window title.
-
#vsync=(v : Bool)
Turns vsync on or off.
-
#window_size : Tuple(Int32, Int32)
Window size in logical points.
Instance Method Detail
Vibrates a controller.
Shows a native message box, for fatal errors.
Opens a stereo float output. Returns the actual sample rate, or 0 on failure.
A writable folder for saves and settings, per organization and app.
Queues interleaved stereo samples for playback.