diff --git a/src/platforms/rcore_android.c b/src/platforms/rcore_android.c index 68ae979ee..1a7572388 100644 --- a/src/platforms/rcore_android.c +++ b/src/platforms/rcore_android.c @@ -606,6 +606,13 @@ void OpenURL(const char *url) // Module Functions Definition: Inputs //---------------------------------------------------------------------------------- +// Set the preedit cursor area. +// This is used to decide the position of the candidate window. +void SetPreeditCursorRectangle(int x, int y, int w, int h) +{ + TRACELOG(LOG_WARNING, "SetPreeditCursorRectangle() not implemented on target platform"); +} + // Set internal gamepad mappings int SetGamepadMappings(const char *mappings) { diff --git a/src/platforms/rcore_desktop_glfw.c b/src/platforms/rcore_desktop_glfw.c index e88bcfc83..91f5b7655 100644 --- a/src/platforms/rcore_desktop_glfw.c +++ b/src/platforms/rcore_desktop_glfw.c @@ -1042,6 +1042,13 @@ void OpenURL(const char *url) // Module Functions Definition: Inputs //---------------------------------------------------------------------------------- +// Set the preedit cursor area. +// This is used to decide the position of the candidate window. +void SetPreeditCursorRectangle(int x, int y, int w, int h) +{ + glfwSetPreeditCursorRectangle(platform.handle, x, y, w, h); +} + // Set internal gamepad mappings int SetGamepadMappings(const char *mappings) { diff --git a/src/platforms/rcore_desktop_sdl.c b/src/platforms/rcore_desktop_sdl.c index 794f9e6a0..c950890e7 100644 --- a/src/platforms/rcore_desktop_sdl.c +++ b/src/platforms/rcore_desktop_sdl.c @@ -927,6 +927,13 @@ void OpenURL(const char *url) // Module Functions Definition: Inputs //---------------------------------------------------------------------------------- +// Set the preedit cursor area. +// This is used to decide the position of the candidate window. +void SetPreeditCursorRectangle(int x, int y, int w, int h) +{ + TRACELOG(LOG_WARNING, "SetPreeditCursorRectangle() not implemented on target platform"); +} + // Set internal gamepad mappings int SetGamepadMappings(const char *mappings) { diff --git a/src/platforms/rcore_drm.c b/src/platforms/rcore_drm.c index 291fd93c7..f9dac3399 100644 --- a/src/platforms/rcore_drm.c +++ b/src/platforms/rcore_drm.c @@ -602,6 +602,13 @@ void OpenURL(const char *url) // Module Functions Definition: Inputs //---------------------------------------------------------------------------------- +// Set the preedit cursor area. +// This is used to decide the position of the candidate window. +void SetPreeditCursorRectangle(int x, int y, int w, int h) +{ + TRACELOG(LOG_WARNING, "SetPreeditCursorRectangle() not implemented on target platform"); +} + // Set internal gamepad mappings int SetGamepadMappings(const char *mappings) { diff --git a/src/platforms/rcore_template.c b/src/platforms/rcore_template.c index 938f4ed7d..eb9d8cdba 100644 --- a/src/platforms/rcore_template.c +++ b/src/platforms/rcore_template.c @@ -364,6 +364,13 @@ void OpenURL(const char *url) // Module Functions Definition: Inputs //---------------------------------------------------------------------------------- +// Set the preedit cursor area. +// This is used to decide the position of the candidate window. +void SetPreeditCursorRectangle(int x, int y, int w, int h) +{ + TRACELOG(LOG_WARNING, "SetPreeditCursorRectangle() not implemented on target platform"); +} + // Set internal gamepad mappings int SetGamepadMappings(const char *mappings) { diff --git a/src/platforms/rcore_web.c b/src/platforms/rcore_web.c index d59951abf..a79de1029 100644 --- a/src/platforms/rcore_web.c +++ b/src/platforms/rcore_web.c @@ -848,6 +848,13 @@ void OpenURL(const char *url) // Module Functions Definition: Inputs //---------------------------------------------------------------------------------- +// Set the preedit cursor area. +// This is used to decide the position of the candidate window. +void SetPreeditCursorRectangle(int x, int y, int w, int h) +{ + glfwSetPreeditCursorRectangle(platform.handle, x, y, w, h); +} + // Set internal gamepad mappings int SetGamepadMappings(const char *mappings) { diff --git a/src/raylib.h b/src/raylib.h index 491b454a0..316512b01 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -1171,6 +1171,7 @@ RLAPI int GetKeyPressed(void); // Get key pressed RLAPI int GetCharPressed(void); // Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty RLAPI void SetExitKey(int key); // Set a custom key to exit program (default is ESC) RLAPI void SetPreeditCallback(PreeditCallback callback); // Set a callback for preedit +RLAPI void SetPreeditCursorRectangle(int x, int y, int w, int h); // Set the preedit cursor area that is used to decide the position of the candidate window // Input-related functions: gamepads RLAPI bool IsGamepadAvailable(int gamepad); // Check if a gamepad is available