Add glfwSetWindowIcon

Adds support for setting window icons programmatically on platforms
where this makes sense.

Fixes #453.
Closes #467.
This commit is contained in:
Camilla Berglund
2016-03-07 14:55:30 +01:00
parent 793eef1d0a
commit b823f7151e
14 changed files with 299 additions and 55 deletions

View File

@@ -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