pub struct Window<'video> { /* private fields */ }
Expand description

A window made by SDL2.

Implementations§

Gets a window from the window id, or None if does not exist.

Gets a grabbed window, or None if does not exist.

Gets a focused window, or None if does not exist.

Returns the state of the window.

Returns the display at the window, or None if unavailable.

Returns the window id.

Returns the pixel format of the window context.

Shows the window.

Hides the window.

Raises the window.

Explicitly sets the input focus to the window.

You almost want to use Window::raise instead of this. This might give focus to a window that is completely obscured by other windows.

Make the window full screen.

Errors

Returns Err if failed to make it full screen.

Maximizes the window.

Minimizes the window.

Restores the window from maximization/minimization.

Sets an icon from a surface for the window.

Returns whether the window is showing the screen keyboard.

Makes the window surface.

Gets a kind of the underlying subsystem.

Trait Implementations§

Returns the border widths of the window. Read more
Returns the brightness of the window.
Sets the brightness of the Window. Read more
Returns the maximum size of the window.
Returns the minimum size of the window.
Returns the current size of the window.
Returns the opacity of the window.
Returns the position of the window.
Returns the title of the window.
Sets the maximum size of the window.
Sets the minimum size of the window.
Sets the current size of the window.
Sets the opacity of the window. Read more
Sets the position of the window.
Sets the title of the window.
Sets whether the window is resizable.
Adds a frame to the window.
Removes a frame from the window.
Sets context to the window. Read more
Formats the value using the given formatter. Read more
Executes the destructor for this type. Read more
Returns the gamma ramps of the window. Read more
Sets the gamma ramps of the window. Read more

Downcasts into a raw window handle.

Grabs the mouse.
Ungrabs the mouse.
Returns whether the window is grabbing the mouse.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.