Enum glfw::WindowHint[][src]

pub enum WindowHint {
Show 42 variants RedBits(Option<u32>), GreenBits(Option<u32>), BlueBits(Option<u32>), AlphaBits(Option<u32>), DepthBits(Option<u32>), StencilBits(Option<u32>), AccumRedBits(Option<u32>), AccumGreenBits(Option<u32>), AccumBlueBits(Option<u32>), AccumAlphaBits(Option<u32>), AuxBuffers(Option<u32>), Stereo(bool), Samples(Option<u32>), SRgbCapable(bool), RefreshRate(Option<u32>), ClientApi(ClientApiHint), ContextVersionMajor(u32), ContextVersionMinor(u32), ContextVersion(u32u32), ContextRobustness(ContextRobustnessHint), OpenGlForwardCompat(bool), OpenGlDebugContext(bool), OpenGlProfile(OpenGlProfileHint), Resizable(bool), Visible(bool), Decorated(bool), AutoIconify(bool), Floating(bool), Focused(bool), ContextNoError(bool), ContextCreationApi(ContextCreationApi), ContextReleaseBehavior(ContextReleaseBehavior), DoubleBuffer(bool), CenterCursor(bool), TransparentFramebuffer(bool), FocusOnShow(bool), ScaleToMonitor(bool), CocoaRetinaFramebuffer(bool), CocoaFrameName(Option<String>), CocoaGraphicsSwitching(bool), X11ClassName(Option<String>), X11InstanceName(Option<String>),
}
Expand description

Window hints that can be set using the window_hint function.

Variants

RedBits(Option<u32>)

Specifies the desired bit depth of the red component of the default framebuffer.

Tuple Fields of RedBits

0: Option<u32>
GreenBits(Option<u32>)

Specifies the desired bit depth of the green component of the default framebuffer.

Tuple Fields of GreenBits

0: Option<u32>
BlueBits(Option<u32>)

Specifies the desired bit depth of the blue component of the default framebuffer.

Tuple Fields of BlueBits

0: Option<u32>
AlphaBits(Option<u32>)

Specifies the desired bit depth of the alpha component of the default framebuffer.

Tuple Fields of AlphaBits

0: Option<u32>
DepthBits(Option<u32>)

Specifies the desired bit depth of the depth component of the default framebuffer.

Tuple Fields of DepthBits

0: Option<u32>
StencilBits(Option<u32>)

Specifies the desired bit depth of the stencil component of the default framebuffer.

Tuple Fields of StencilBits

0: Option<u32>
AccumRedBits(Option<u32>)

Specifies the desired bit depth of the red component of the accumulation framebuffer.

Tuple Fields of AccumRedBits

0: Option<u32>
AccumGreenBits(Option<u32>)

Specifies the desired bit depth of the green component of the accumulation framebuffer.

Tuple Fields of AccumGreenBits

0: Option<u32>
AccumBlueBits(Option<u32>)

Specifies the desired bit depth of the blue component of the accumulation framebuffer.

Tuple Fields of AccumBlueBits

0: Option<u32>
AccumAlphaBits(Option<u32>)

Specifies the desired bit depth of the alpha component of the accumulation framebuffer.

Tuple Fields of AccumAlphaBits

0: Option<u32>
AuxBuffers(Option<u32>)

Specifies the desired number of auxiliary buffers.

Tuple Fields of AuxBuffers

0: Option<u32>
Stereo(bool)

Specifies whether to use stereoscopic rendering.

Tuple Fields of Stereo

0: bool
Samples(Option<u32>)

Specifies the desired number of samples to use for multisampling. Zero disables multisampling.

Tuple Fields of Samples

0: Option<u32>
SRgbCapable(bool)

Specifies whether the framebuffer should be sRGB capable.

Tuple Fields of SRgbCapable

0: bool
RefreshRate(Option<u32>)

Specifies the desired refresh rate for full screen windows. If set to None, the highest available refresh rate will be used.

This hint is ignored for windowed mode windows.

Tuple Fields of RefreshRate

0: Option<u32>
ClientApi(ClientApiHint)

Specifies which ClientApi to create the context for.

Tuple Fields of ClientApi

0: ClientApiHint
ContextVersionMajor(u32)

Specifies the major client API version that the created context must be compatible with.

Window creation will fail if the resulting OpenGL version is less than the one requested.

Tuple Fields of ContextVersionMajor

0: u32
ContextVersionMinor(u32)

Specifies the minor client API version that the created context must be compatible with.

Window creation will fail if the resulting OpenGL version is less than the one requested.

Tuple Fields of ContextVersionMinor

0: u32
ContextVersion(u32u32)

Specifies the client API version that the created context must be compatible with. This is the same as successive calls to window_hint function with the ContextVersionMajor and ContextVersionMinor hints.

Window creation will fail if the resulting OpenGL version is less than the one requested.

If ContextVersion(1, 0) is requested, most drivers will provide the highest available context.

Tuple Fields of ContextVersion

0: u321: u32
ContextRobustness(ContextRobustnessHint)

Specifies the ContextRobustness strategy to be used.

Tuple Fields of ContextRobustness

0: ContextRobustnessHint
OpenGlForwardCompat(bool)

Specifies whether the OpenGL context should be forward-compatible, i.e. one where all functionality deprecated in the requested version of OpenGL is removed. This may only be used if the requested OpenGL version is 3.0 or above.

If another client API is requested, this hint is ignored.

Tuple Fields of OpenGlForwardCompat

0: bool
OpenGlDebugContext(bool)

Specifies whether to create a debug OpenGL context, which may have additional error and performance issue reporting functionality.

If another client API is requested, this hint is ignored.

Tuple Fields of OpenGlDebugContext

0: bool
OpenGlProfile(OpenGlProfileHint)

Specifies which OpenGL profile to create the context for. If requesting an OpenGL version below 3.2, OpenGlAnyProfile must be used.

If another client API is requested, this hint is ignored.

Tuple Fields of OpenGlProfile

0: OpenGlProfileHint
Resizable(bool)

Specifies whether the window will be resizable by the user. Even if this is set to false, the window can still be resized using the Window::set_size function.

This hint is ignored for fullscreen windows.

Tuple Fields of Resizable

0: bool
Visible(bool)

Specifies whether the window will be visible on creation.

This hint is ignored for fullscreen windows.

Tuple Fields of Visible

0: bool
Decorated(bool)

Specifies whether the window will have platform-specific decorations such as a border, a close widget, etc.

This hint is ignored for full screen windows.

Tuple Fields of Decorated

0: bool
AutoIconify(bool)

Specifies whether the (full screen) window will automatically iconify and restore the previous video mode on input focus loss.

This hint is ignored for windowed mode windows.

Tuple Fields of AutoIconify

0: bool
Floating(bool)

Specifies whether the window will be floating above other regular windows, also called topmost or always-on-top.

This hint is ignored for full screen windows.

Tuple Fields of Floating

0: bool
Focused(bool)

Specifies whether the windowed mode window will be given input focus when created.

This hint is ignored for full screen and initially hidden windows.

Tuple Fields of Focused

0: bool
ContextNoError(bool)

Specifies whether the OpenGL or OpenGL ES contexts do not emit errors, allowing for better performance in some situations.

Tuple Fields of ContextNoError

0: bool
ContextCreationApi(ContextCreationApi)

Specifies which context creation API to use to create the context.

Tuple Fields of ContextCreationApi

0: ContextCreationApi
ContextReleaseBehavior(ContextReleaseBehavior)

Specifies the behavior of the OpenGL pipeline when a context is transferred between threads

Tuple Fields of ContextReleaseBehavior

0: ContextReleaseBehavior
DoubleBuffer(bool)

Specifies whether the framebuffer should be double buffered.

You nearly always want to use double buffering.

Note that setting this to false will make swap_buffers do nothing useful, and your scene will have to be displayed some other way.

Tuple Fields of DoubleBuffer

0: bool
CenterCursor(bool)

Speficies whether the cursor should be centered over newly created full screen windows.

This hint is ignored for windowed mode windows.

Tuple Fields of CenterCursor

0: bool
TransparentFramebuffer(bool)

Specifies whether the window framebuffer will be transparent.

If enabled and supported by the system, the window framebuffer alpha channel will be used to combine the framebuffer with the background. This does not affect window decorations.

Tuple Fields of TransparentFramebuffer

0: bool
FocusOnShow(bool)

Specifies whether the window will be given input focus when Window::show is called.

Tuple Fields of FocusOnShow

0: bool
ScaleToMonitor(bool)

Specifies whether the window content area should be resized based on the monitor current scale of any monitor it is placed on.

This includes the initial placement when the window is created.

Tuple Fields of ScaleToMonitor

0: bool
CocoaRetinaFramebuffer(bool)

Specifies whether to use full resolution framebuffers on Retina displays.

This is ignored on platforms besides macOS.

Tuple Fields of CocoaRetinaFramebuffer

0: bool
CocoaFrameName(Option<String>)

Specifies the UTF-8 encoded name to use for autosaving the window frame, or if empty disables frame autosaving for the window.

This is ignored on platforms besides macOS.

Tuple Fields of CocoaFrameName

0: Option<String>
CocoaGraphicsSwitching(bool)

Specifies whether to in participate in Automatic Graphics Switching, i.e. to allow the system to choose the integrated GPU for the OpenGL context and move it between GPUs if necessary or whether to force it to always run on the discrete GPU.

Simpler programs and tools may want to enable this to save power, while games and other applications performing advanced rendering will want to leave it disabled.

This only affects systems with both integrated and discrete GPUs. This is ignored on platforms besides macOS.

Tuple Fields of CocoaGraphicsSwitching

0: bool
X11ClassName(Option<String>)

Specifies the desired ASCII-encoded class part of the ICCCM WM_CLASS window property.

Tuple Fields of X11ClassName

0: Option<String>
X11InstanceName(Option<String>)

Specifies the desired ASCII-encoded instance part of the ICCCM WM_CLASS window property.

Tuple Fields of X11InstanceName

0: Option<String>

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. 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.