Skip to content

Commit 0c18e43

Browse files
committed
Add API: SetPreeditCursorRectangle
This is for GLFW3: glfwSetPreeditCursorRectangle
1 parent 7b7b61e commit 0c18e43

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
@@ -3557,6 +3557,13 @@ void SetPreeditCallback(PreeditCallback callback)
35573557
CORE.Input.Keyboard.preeditCallback = callback;
35583558
}
35593559

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

0 commit comments

Comments
 (0)