mirror of
https://github.com/glfw/glfw.git
synced 2026-08-27 05:35:53 +02:00
Add glfwSetWindowIcon
Adds support for setting window icons programmatically on platforms where this makes sense. Fixes #453. Closes #467.
This commit is contained in:
@@ -32,6 +32,11 @@ GLFW now supports window maximization with @ref glfwMaximizeWindow and the
|
||||
[GLFW_MAXIMIZED](@ref window_attribs_wnd) window hint and attribute.
|
||||
|
||||
|
||||
@subsection news_32_icon Window icon support
|
||||
|
||||
GLFW now supports setting the icon of windows with @ref glfwSetWindowIcon.
|
||||
|
||||
|
||||
@subsection news_32_focus Window input focus control
|
||||
|
||||
GLFW now supports giving windows input focus with @ref glfwFocusWindow.
|
||||
|
||||
@@ -617,6 +617,26 @@ glfwSetWindowTitle(window, u8"This is always a UTF-8 string");
|
||||
@endcode
|
||||
|
||||
|
||||
@subsection window_icon Window icon
|
||||
|
||||
Decorated windows have icons on some platforms. You can set this icon by
|
||||
specifying a list of candidate images with @ref glfwSetWindowIcon.
|
||||
|
||||
@code
|
||||
GLFWimage images[2];
|
||||
images[0] = load_icon("my_icon.png");
|
||||
images[1] = load_icon("my_icon_small.png");
|
||||
|
||||
glfwSetWindowIcon(window, 2, images);
|
||||
@endcode
|
||||
|
||||
To revert to the default window icon, pass in an empty image array.
|
||||
|
||||
@code
|
||||
glfwSetWindowIcon(window, 0, NULL);
|
||||
@endcode
|
||||
|
||||
|
||||
@subsection window_monitor Window monitor
|
||||
|
||||
Full screen windows are associated with a specific monitor. You can get the
|
||||
|
||||
Reference in New Issue
Block a user