Skip to content

Commit 37eb6f7

Browse files
committed
Add API: ResetPreedit
This is for GLFW3: glfwResetPreeditText
1 parent 14018b1 commit 37eb6f7

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/raylib.h

+1
Original file line numberDiff line numberDiff line change
@@ -1114,6 +1114,7 @@ RLAPI void SetPreeditWindowPosition(int x, int y); // Set a preedit w
11141114
RLAPI void GetPreeditWindowPosition(int *x, int *y); // Get a preedit window postion XY
11151115
RLAPI bool IsImeOn(void); // Check if IME is ON
11161116
RLAPI void SetImeStatus(bool on); // Set IME status
1117+
RLAPI void ResetPreedit(void); // Reset preedit text
11171118

11181119
// Input-related functions: gamepads
11191120
RLAPI bool IsGamepadAvailable(int gamepad); // Check if a gamepad is available

src/rcore.c

+6
Original file line numberDiff line numberDiff line change
@@ -3578,6 +3578,12 @@ void SetImeStatus(bool on)
35783578
else glfwSetInputMode(CORE.Window.handle, GLFW_IME, GLFW_FALSE);
35793579
}
35803580

3581+
// Reset preedit text
3582+
void ResetPreedit(void)
3583+
{
3584+
glfwResetPreeditText(CORE.Window.handle);
3585+
}
3586+
35813587
// Set a custom key to exit program
35823588
// NOTE: default exitKey is ESCAPE
35833589
void SetExitKey(int key)

0 commit comments

Comments
 (0)