Skip to content

Commit 0cd5e2d

Browse files
daipomashie
authored andcommitted
Add API: ResetPreedit
This is for GLFW3: glfwResetPreeditText
1 parent 3a6ad34 commit 0cd5e2d

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.c

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

1065+
// Reset preedit text
1066+
void ResetPreedit(void)
1067+
{
1068+
glfwResetPreeditText(platform.handle);
1069+
}
1070+
10651071
// Set internal gamepad mappings
10661072
int SetGamepadMappings(const char *mappings)
10671073
{

src/platforms/rcore_desktop_sdl.c

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

961+
// Reset preedit text
962+
void ResetPreedit(void)
963+
{
964+
TRACELOG(LOG_WARNING, "ResetPreedit() not implemented on target platform");
965+
}
966+
961967
// Set internal gamepad mappings
962968
int SetGamepadMappings(const char *mappings)
963969
{

src/platforms/rcore_drm.c

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

541+
// Reset preedit text
542+
void ResetPreedit(void)
543+
{
544+
TRACELOG(LOG_WARNING, "ResetPreedit() not implemented on target platform");
545+
}
546+
541547
// Set internal gamepad mappings
542548
int SetGamepadMappings(const char *mappings)
543549
{

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
@@ -870,6 +870,12 @@ void SetImeStatus(bool on)
870870
else glfwSetInputMode(platform.handle, GLFW_IME, GLFW_FALSE);
871871
}
872872

873+
// Reset preedit text
874+
void ResetPreedit(void)
875+
{
876+
glfwResetPreeditText(platform.handle);
877+
}
878+
873879
// Set internal gamepad mappings
874880
int SetGamepadMappings(const char *mappings)
875881
{

src/raylib.h

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

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

0 commit comments

Comments
 (0)