mirror of
https://github.com/glfw/glfw.git
synced 2024-11-14 02:31:46 +00:00
Finish deprecating charmods callback
This commit is contained in:
parent
df434c839a
commit
b8df6ae3c1
@ -171,6 +171,7 @@ information on what to include when reporting a bug.
|
|||||||
[OSMesa](https://www.mesa3d.org/osmesa.html) (#281)
|
[OSMesa](https://www.mesa3d.org/osmesa.html) (#281)
|
||||||
- Added `GenerateMappings.cmake` script for updating gamepad mappings
|
- Added `GenerateMappings.cmake` script for updating gamepad mappings
|
||||||
- Deprecated window parameter of clipboard string functions
|
- Deprecated window parameter of clipboard string functions
|
||||||
|
- Deprecated charmods callback
|
||||||
- Removed `GLFW_USE_RETINA` compile-time option
|
- Removed `GLFW_USE_RETINA` compile-time option
|
||||||
- Removed `GLFW_USE_CHDIR` compile-time option
|
- Removed `GLFW_USE_CHDIR` compile-time option
|
||||||
- Removed `GLFW_USE_MENUBAR` compile-time option
|
- Removed `GLFW_USE_MENUBAR` compile-time option
|
||||||
|
@ -186,8 +186,7 @@ encode the code points into UTF-8 or any other encoding you prefer.
|
|||||||
Because an `unsigned int` is 32 bits long on all platforms supported by GLFW,
|
Because an `unsigned int` is 32 bits long on all platforms supported by GLFW,
|
||||||
you can treat the code point argument as native endian UTF-32.
|
you can treat the code point argument as native endian UTF-32.
|
||||||
|
|
||||||
There are two callbacks for receiving Unicode code points. If you wish to
|
If you wish to offer regular text input, set a character callback.
|
||||||
offer regular text input, set a character callback.
|
|
||||||
|
|
||||||
@code
|
@code
|
||||||
glfwSetCharCallback(window, character_callback);
|
glfwSetCharCallback(window, character_callback);
|
||||||
@ -203,23 +202,6 @@ void character_callback(GLFWwindow* window, unsigned int codepoint)
|
|||||||
}
|
}
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
If you also wish to receive those Unicode code points generated with modifier
|
|
||||||
key combinations that a plain text field would ignore, or want to know exactly
|
|
||||||
what modifier keys were used, set a character with modifiers callback.
|
|
||||||
|
|
||||||
@code
|
|
||||||
glfwSetCharModsCallback(window, charmods_callback);
|
|
||||||
@endcode
|
|
||||||
|
|
||||||
The callback function receives Unicode code points and
|
|
||||||
[modifier bits](@ref mods).
|
|
||||||
|
|
||||||
@code
|
|
||||||
void charmods_callback(GLFWwindow* window, unsigned int codepoint, int mods)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
@endcode
|
|
||||||
|
|
||||||
|
|
||||||
@subsection input_key_name Key names
|
@subsection input_key_name Key names
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user