Struct speedy2d::window::WindowHelper[][src]

pub struct WindowHelper<UserEventType = ()> where
    UserEventType: 'static, 
{ /* fields omitted */ }
Expand description

A set of helper methods to perform actions on a crate::Window.

Implementations

Causes the event loop to stop processing events, and terminate the application.

Note: The event loop will stop only once the current callback has returned, rather than terminating immediately.

Once the event loop has stopped, the entire process will end with error code 0, even if other threads are running.

If your WindowHandler struct implements Drop, it will be safely destructed before exiting.

No further callbacks will be given once this function has been called.

Sets the window icon from the provided RGBA pixels.

On Windows, the base icon size is 16x16, however a multiple of this (e.g. 32x32) should be provided for high-resolution displays.

Sets the visibility of the mouse cursor.

Grabs the cursor, preventing it from leaving the window.

Set to false to prevent the user from resizing the window.

Request that the window is redrawn.

This will cause the WindowHandler::on_draw callback to be invoked on the next frame.

Sets the window title.

Sets the window fullscreen mode.

Sets the window size in pixels. This is the window’s inner size, excluding the border.

Sets the position of the window in pixels. If multiple monitors are in use, this will be the distance from the top left of the display area, spanning all the monitors.

Sets the window size in scaled device-independent pixels. This is the window’s inner size, excluding the border.

Sets the position of the window in scaled device-independent pixels. If multiple monitors are in use, this will be the distance from the top left of the display area, spanning all the monitors.

Gets the window’s scale factor.

Creates a UserEventSender, which can be used to post custom events to this event loop from another thread.

See UserEventSender::send_event, WindowHandler::on_user_event.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.