Skip to content

Commit 574f985

Browse files
committed
Add API: ResetPreedit
This is for GLFW3: glfwResetPreeditText
1 parent 90175cb commit 574f985

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 SetPreeditCursorRectangle(int x, int y, int w, int h); // Set the pre
11141114
RLAPI void GetPreeditCursorRectangle(int *x, int *y, int *w, int *h); // Get the preedit cursor area
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
@@ -3581,6 +3581,12 @@ void SetImeStatus(bool on)
35813581
else glfwSetInputMode(CORE.Window.handle, GLFW_IME, GLFW_FALSE);
35823582
}
35833583

3584+
// Reset preedit text
3585+
void ResetPreedit(void)
3586+
{
3587+
glfwResetPreeditText(CORE.Window.handle);
3588+
}
3589+
35843590
// Set a custom key to exit program
35853591
// NOTE: default exitKey is ESCAPE
35863592
void SetExitKey(int key)

0 commit comments

Comments
 (0)