Skip to content

Commit 0eb9f31

Browse files
committed
Add API: SetPreeditCursorRectangle
This is for GLFW3: glfwSetPreeditCursorRectangle
1 parent 1cd7092 commit 0eb9f31

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/raylib.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,6 +1110,7 @@ RLAPI void SetExitKey(int key); // Set a custom ke
11101110
RLAPI int GetKeyPressed(void); // Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty
11111111
RLAPI int GetCharPressed(void); // Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty
11121112
RLAPI void SetPreeditCallback(PreeditCallback callback); // Set a callback for preedit
1113+
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
11131114

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

src/rcore.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3554,6 +3554,13 @@ void SetPreeditCallback(PreeditCallback callback)
35543554
CORE.Input.Keyboard.preeditCallback = callback;
35553555
}
35563556

3557+
// Set the preedit cursor area.
3558+
// This is used to decide the position of the candidate window.
3559+
void SetPreeditCursorRectangle(int x, int y, int w, int h)
3560+
{
3561+
glfwSetPreeditCursorRectangle(CORE.Window.handle, x, y, w, h);
3562+
}
3563+
35573564
// Set a custom key to exit program
35583565
// NOTE: default exitKey is ESCAPE
35593566
void SetExitKey(int key)

0 commit comments

Comments
 (0)