Struct glfw::Window [] [src]

pub struct Window {
    pub glfw: Glfw,
    pub is_shared: bool,
    // some fields omitted
}

A struct that wraps a *GLFWwindow handle.

Fields

Methods

impl Window
[src]

[src]

Returns the address of the specified client API or extension function if it is supported by the context associated with this Window. If this Window is not the current context, it will make it the current context.

Wrapper for glfwGetProcAddress.

[src]

Wrapper for glfwCreateWindow.

[src]

Calling this method forces the destructor to be called, closing the window.

[src]

Returns a render context that can be shared between tasks, allowing for concurrent rendering.

[src]

Wrapper for glfwWindowShouldClose.

[src]

Wrapper for glfwSetWindowShouldClose.

[src]

Sets the title of the window.

Wrapper for glfwSetWindowTitle.

[src]

Wrapper for glfwGetWindowPos.

[src]

Wrapper for glfwSetWindowPos.

[src]

Wrapper for glfwGetWindowSize.

[src]

Wrapper for glfwSetWindowSize.

[src]

Wrapper for glfwGetWindowFrameSize

Returns (left, top, right, bottom) edge window frame sizes, in screen coordinates.

[src]

Wrapper for glfwGetFramebufferSize.

[src]

Wrapper for glfwSetWindowAspectRatio.

[src]

Wrapper for glfwSetWindowSizeLimits.

[src]

Wrapper for glfwIconifyWindow.

[src]

Wrapper for glfwRestoreWindow.

[src]

Wrapper for glfwMaximizeWindow

[src]

Wrapper for glfwShowWindow.

[src]

Wrapper for glfwHideWindow.

[src]

Returns whether the window is fullscreen or windowed.

Example

Be careful when using this code, it's not being tested!
window.with_window_mode(|mode| {
    match mode {
        glfw::Windowed => println!("Windowed"),
        glfw::FullScreen(m) => println!("FullScreen({})", m.get_name()),
    }
});

[src]

Returns whether the window is fullscreen or windowed.

Variant that can accept an FnMut closure.

Example

Be careful when using this code, it's not being tested!
window.with_window_mode(|mode| {
    match mode {
        glfw::Windowed => println!("Windowed"),
        glfw::FullScreen(m) => println!("FullScreen({})", m.get_name()),
    }
});

[src]

Wrapper for glfwSetWindowMonitor

[src]

Wrapper for glfwFocusWindow

It is NOT recommended to use this function, as it steals focus from other applications and can be extremely disruptive to the user.

[src]

Wrapper for glfwGetWindowAttrib called with FOCUSED.

[src]

Wrapper for glfwGetWindowAttrib called with ICONIFIED.

[src]

Wrapper for glfwGetWindowattrib called with MAXIMIZED.

[src]

Wrapper for glfwGetWindowAttrib called with CLIENT_API.

[src]

Wrapper for glfwGetWindowAttrib called with CONTEXT_VERSION_MAJOR, CONTEXT_VERSION_MINOR and CONTEXT_REVISION.

Returns

The client API version of the window's context in a version struct.

[src]

Wrapper for glfwGetWindowAttrib called with CONTEXT_ROBUSTNESS.

[src]

Wrapper for glfwGetWindowAttrib called with OPENGL_FORWARD_COMPAT.

[src]

Wrapper for glfwGetWindowAttrib called with OPENGL_DEBUG_CONTEXT.

[src]

Wrapper for glfwGetWindowAttrib called with OPENGL_PROFILE.

[src]

Wrapper for glfwGetWindowAttrib called with RESIZABLE.

[src]

Wrapper for glfwGetWindowAttrib called with VISIBLE.

[src]

Wrapper for glfwGetWindowAttrib called with DECORATED.

[src]

Wrapper for glfwSetWindowPosCallback.

[src]

Starts or stops polling for all available events

[src]

Wrapper for glfwSetWindowSizeCallback.

[src]

Wrapper for glfwSetWindowCloseCallback.

[src]

Wrapper for glfwSetWindowRefreshCallback.

[src]

Wrapper for glfwSetWindowFocusCallback.

[src]

Wrapper for glfwSetWindowIconifyCallback.

[src]

Wrapper for glfwSetFramebufferSizeCallback.

[src]

Wrapper for glfwSetFramebufferSizeCallback.

[src]

Wrapper for glfwGetInputMode called with CURSOR.

[src]

Wrapper for glfwSetInputMode called with CURSOR.

[src]

Wrapper for glfwSetCursor using Cursor

The window will take ownership of the cursor, and will not Drop it until it is replaced or the window itself is destroyed.

Returns the previously set Cursor or None if no cursor was set.

[src]

Sets the window icon via glfwSetWindowIcon from a set a set of vectors containing pixels in RGBA format (one pixel per 32-bit integer)

[src]

Wrapper for glfwGetInputMode called with STICKY_KEYS.

[src]

Wrapper for glfwSetInputMode called with STICKY_KEYS.

[src]

Wrapper for glfwGetInputMode called with STICKY_MOUSE_BUTTONS.

[src]

Wrapper for glfwSetInputMode called with STICKY_MOUSE_BUTTONS.

[src]

Wrapper for glfwGetKey.

[src]

Wrapper for glfwGetMouseButton.

[src]

Wrapper for glfwGetCursorPos.

[src]

Wrapper for glfwSetCursorPos.

[src]

Wrapper for glfwSetKeyCallback.

[src]

Wrapper for glfwSetCharCallback.

[src]

Wrapper for glfwSetCharModsCallback

[src]

Wrapper for glfwSetMouseButtonCallback.

[src]

Wrapper for glfwSetCursorPosCallback.

[src]

Wrapper for glfwSetCursorEnterCallback.

[src]

Wrapper for glfwSetScrollCallback.

[src]

Wrapper for glfwGetClipboardString.

[src]

Wrapper for glfwGetClipboardString.

[src]

Wrapper for glfwGetX11Window

[src]

Wrapper for glfwGetGLXContext

Trait Implementations

impl Drop for Window
[src]

[src]

Closes the window and performs the necessary cleanups. This will block until all associated RenderContexts were also dropped, and emit a debug! message to that effect.

Wrapper for glfwDestroyWindow.

impl Context for Window
[src]

[src]

Returns the pointer to the underlying GLFWwindow.

[src]

Swaps the front and back buffers of the window. If the swap interval is greater than zero, the GPU driver waits the specified number of screen updates before swapping the buffers. Read more

[src]

Returns true if the window is the current context.

[src]

Wrapper for glfwMakeContextCurrent