Skip to content

Commit e9bde09

Browse files
committed
Add API: SetPreeditWindowPosition
This is for GLFW3: glfwSetPreeditCursorPos
1 parent 4be8755 commit e9bde09

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-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 SetPreeditWindowPosition(int x, int y); // Set a preedit window postion XY
11131114

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

src/rcore.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3552,6 +3552,12 @@ void SetPreeditCallback(PreeditCallback callback)
35523552
CORE.Input.Keyboard.preeditCallback = callback;
35533553
}
35543554

3555+
// Set a preedit window postion XY
3556+
void SetPreeditWindowPosition(int x, int y)
3557+
{
3558+
glfwSetPreeditCursorPos(CORE.Window.handle, x, y, 0);
3559+
}
3560+
35553561
// Set a custom key to exit program
35563562
// NOTE: default exitKey is ESCAPE
35573563
void SetExitKey(int key)

0 commit comments

Comments
 (0)