mirror of
https://github.com/glfw/glfw.git
synced 2026-01-11 15:23:17 +01:00
Add glfwGetWindowTitle
This adds a function for querying the current title of a window. This currently returns a copy of the last title set via GLFW. Fixes #1448 Closes #1909 Closes #2482
This commit is contained in:
@@ -41,6 +41,12 @@ to whatever window is behind it. This can also be changed after window
|
||||
creation with the matching [window attribute](@ref GLFW_MOUSE_PASSTHROUGH_attrib).
|
||||
|
||||
|
||||
#### Ability to get a window's title {#features_34_get_window_title}
|
||||
|
||||
GLFW now supports retrieving a window's title with the @ref glfwGetWindowTitle
|
||||
function.
|
||||
|
||||
|
||||
#### Wayland libdecor decorations {#wayland_libdecor_34}
|
||||
|
||||
GLFW now supports improved fallback window decorations via
|
||||
@@ -253,6 +259,7 @@ then GLFW will fail to initialize.
|
||||
- @ref glfwGetPlatform
|
||||
- @ref glfwPlatformSupported
|
||||
- @ref glfwInitVulkanLoader
|
||||
- @ref glfwGetWindowTitle
|
||||
|
||||
|
||||
#### New types in version 3.4 {#types_34}
|
||||
|
||||
@@ -919,6 +919,15 @@ If you are using C++11 or C11, you can use a UTF-8 string literal.
|
||||
glfwSetWindowTitle(window, u8"This is always a UTF-8 string");
|
||||
```
|
||||
|
||||
The window title can be retrieved with @ref glfwGetWindowTitle.
|
||||
|
||||
```c
|
||||
const char* title = glfwGetWindowTitle(window);
|
||||
```
|
||||
|
||||
The title returned is an internally managed copy of the title set
|
||||
by @ref glfwCreateWindow or @ref glfwSetWindowTitle. It does not
|
||||
include any additional text which may be appended by the platform.
|
||||
|
||||
### Window icon {#window_icon}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user