Skip to content

Commit 6c7e13e

Browse files
daipomashie
authored andcommitted
Add API: GetPreeditCursorRectangle
This is for GLFW3: glfwGetPreeditCursorRectangle
1 parent b63d0eb commit 6c7e13e

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
@@ -613,6 +613,12 @@ void SetPreeditCursorRectangle(int x, int y, int w, int h)
613613
TRACELOG(LOG_WARNING, "SetPreeditCursorRectangle() not implemented on target platform");
614614
}
615615

616+
// Get the preedit cursor area
617+
void GetPreeditCursorRectangle(int *x, int *y, int *w, int *h)
618+
{
619+
TRACELOG(LOG_WARNING, "GetPreeditCursorRectangle() not implemented on target platform");
620+
}
621+
616622
// Set internal gamepad mappings
617623
int SetGamepadMappings(const char *mappings)
618624
{

src/platforms/rcore_desktop_glfw.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,6 +1049,12 @@ void SetPreeditCursorRectangle(int x, int y, int w, int h)
10491049
glfwSetPreeditCursorRectangle(platform.handle, x, y, w, h);
10501050
}
10511051

1052+
// Get the preedit cursor area
1053+
void GetPreeditCursorRectangle(int *x, int *y, int *w, int *h)
1054+
{
1055+
glfwGetPreeditCursorRectangle(platform.handle, x, y, w, h);
1056+
}
1057+
10521058
// Set internal gamepad mappings
10531059
int SetGamepadMappings(const char *mappings)
10541060
{

src/platforms/rcore_desktop_sdl.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -934,6 +934,12 @@ void SetPreeditCursorRectangle(int x, int y, int w, int h)
934934
TRACELOG(LOG_WARNING, "SetPreeditCursorRectangle() not implemented on target platform");
935935
}
936936

937+
// Get the preedit cursor area
938+
void GetPreeditCursorRectangle(int *x, int *y, int *w, int *h)
939+
{
940+
TRACELOG(LOG_WARNING, "GetPreeditCursorRectangle() not implemented on target platform");
941+
}
942+
937943
// Set internal gamepad mappings
938944
int SetGamepadMappings(const char *mappings)
939945
{

src/platforms/rcore_drm.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,12 @@ void SetPreeditCursorRectangle(int x, int y, int w, int h)
609609
TRACELOG(LOG_WARNING, "SetPreeditCursorRectangle() not implemented on target platform");
610610
}
611611

612+
// Get the preedit cursor area
613+
void GetPreeditCursorRectangle(int *x, int *y, int *w, int *h)
614+
{
615+
TRACELOG(LOG_WARNING, "GetPreeditCursorRectangle() not implemented on target platform");
616+
}
617+
612618
// Set internal gamepad mappings
613619
int SetGamepadMappings(const char *mappings)
614620
{

src/platforms/rcore_template.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,12 @@ void SetPreeditCursorRectangle(int x, int y, int w, int h)
371371
TRACELOG(LOG_WARNING, "SetPreeditCursorRectangle() not implemented on target platform");
372372
}
373373

374+
// Get the preedit cursor area
375+
void GetPreeditCursorRectangle(int *x, int *y, int *w, int *h)
376+
{
377+
TRACELOG(LOG_WARNING, "GetPreeditCursorRectangle() not implemented on target platform");
378+
}
379+
374380
// Set internal gamepad mappings
375381
int SetGamepadMappings(const char *mappings)
376382
{

src/platforms/rcore_web.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,12 @@ void SetPreeditCursorRectangle(int x, int y, int w, int h)
855855
glfwSetPreeditCursorRectangle(platform.handle, x, y, w, h);
856856
}
857857

858+
// Get the preedit cursor area
859+
void GetPreeditCursorRectangle(int *x, int *y, int *w, int *h)
860+
{
861+
glfwGetPreeditCursorRectangle(platform.handle, x, y, w, h);
862+
}
863+
858864
// Set internal gamepad mappings
859865
int SetGamepadMappings(const char *mappings)
860866
{

src/raylib.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,6 +1172,7 @@ RLAPI int GetCharPressed(void); // Get char presse
11721172
RLAPI void SetExitKey(int key); // Set a custom key to exit program (default is ESC)
11731173
RLAPI void SetPreeditCallback(PreeditCallback callback); // Set a callback for preedit
11741174
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
1175+
RLAPI void GetPreeditCursorRectangle(int *x, int *y, int *w, int *h); // Get the preedit cursor area
11751176

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

0 commit comments

Comments
 (0)