Skip to content

Commit c2286f2

Browse files
daipomashie
authored andcommitted
Add API: ResetPreedit
This is for GLFW3: glfwResetPreeditText
1 parent d004c66 commit c2286f2

File tree

7 files changed

+37
-0
lines changed

7 files changed

+37
-0
lines changed

src/platforms/rcore_android.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,12 @@ void SetImeStatus(bool on)
632632
TRACELOG(LOG_WARNING, "SetImeStatus() not implemented on target platform");
633633
}
634634

635+
// Reset preedit text
636+
void ResetPreedit(void)
637+
{
638+
TRACELOG(LOG_WARNING, "ResetPreedit() not implemented on target platform");
639+
}
640+
635641
// Set internal gamepad mappings
636642
int SetGamepadMappings(const char *mappings)
637643
{

src/platforms/rcore_desktop_glfw.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,6 +1069,12 @@ void SetImeStatus(bool on)
10691069
else glfwSetInputMode(platform.handle, GLFW_IME, GLFW_FALSE);
10701070
}
10711071

1072+
// Reset preedit text
1073+
void ResetPreedit(void)
1074+
{
1075+
glfwResetPreeditText(platform.handle);
1076+
}
1077+
10721078
// Set internal gamepad mappings
10731079
int SetGamepadMappings(const char *mappings)
10741080
{

src/platforms/rcore_desktop_sdl.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,12 @@ void SetImeStatus(bool on)
953953
TRACELOG(LOG_WARNING, "SetImeStatus() not implemented on target platform");
954954
}
955955

956+
// Reset preedit text
957+
void ResetPreedit(void)
958+
{
959+
TRACELOG(LOG_WARNING, "ResetPreedit() not implemented on target platform");
960+
}
961+
956962
// Set internal gamepad mappings
957963
int SetGamepadMappings(const char *mappings)
958964
{

src/platforms/rcore_drm.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,12 @@ void SetImeStatus(bool on)
628628
TRACELOG(LOG_WARNING, "SetImeStatus() not implemented on target platform");
629629
}
630630

631+
// Reset preedit text
632+
void ResetPreedit(void)
633+
{
634+
TRACELOG(LOG_WARNING, "ResetPreedit() not implemented on target platform");
635+
}
636+
631637
// Set internal gamepad mappings
632638
int SetGamepadMappings(const char *mappings)
633639
{

src/platforms/rcore_template.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,12 @@ void SetImeStatus(bool on)
390390
TRACELOG(LOG_WARNING, "SetImeStatus() not implemented on target platform");
391391
}
392392

393+
// Reset preedit text
394+
void ResetPreedit(void)
395+
{
396+
TRACELOG(LOG_WARNING, "ResetPreedit() not implemented on target platform");
397+
}
398+
393399
// Set internal gamepad mappings
394400
int SetGamepadMappings(const char *mappings)
395401
{

src/platforms/rcore_web.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -875,6 +875,12 @@ void SetImeStatus(bool on)
875875
else glfwSetInputMode(platform.handle, GLFW_IME, GLFW_FALSE);
876876
}
877877

878+
// Reset preedit text
879+
void ResetPreedit(void)
880+
{
881+
glfwResetPreeditText(platform.handle);
882+
}
883+
878884
// Set internal gamepad mappings
879885
int SetGamepadMappings(const char *mappings)
880886
{

src/raylib.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,6 +1175,7 @@ RLAPI void SetPreeditCursorRectangle(int x, int y, int w, int h); // Set the pre
11751175
RLAPI void GetPreeditCursorRectangle(int *x, int *y, int *w, int *h); // Get the preedit cursor area
11761176
RLAPI bool IsImeOn(void); // Check if IME is ON
11771177
RLAPI void SetImeStatus(bool on); // Set IME status
1178+
RLAPI void ResetPreedit(void); // Reset preedit text
11781179

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

0 commit comments

Comments
 (0)