Skip to content

Commit 7c30c66

Browse files
committed
Add API: GetPreeditWindowPosition
This is for GLFW3: glfwGetPreeditCursorPos
1 parent 83e7ccc commit 7c30c66

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
@@ -1111,6 +1111,7 @@ RLAPI int GetKeyPressed(void); // Get key pressed
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
11131113
RLAPI void SetPreeditWindowPosition(int x, int y); // Set a preedit window postion XY
1114+
RLAPI void GetPreeditWindowPosition(int *x, int *y); // Get a preedit window postion XY
11141115

11151116
// Input-related functions: gamepads
11161117
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
@@ -3560,6 +3560,12 @@ void SetPreeditWindowPosition(int x, int y)
35603560
glfwSetPreeditCursorPos(CORE.Window.handle, x, y, 0);
35613561
}
35623562

3563+
// Get a preedit window postion XY
3564+
void GetPreeditWindowPosition(int *x, int *y)
3565+
{
3566+
glfwGetPreeditCursorPos(CORE.Window.handle, x, y, NULL);
3567+
}
3568+
35633569
// Set a custom key to exit program
35643570
// NOTE: default exitKey is ESCAPE
35653571
void SetExitKey(int key)

0 commit comments

Comments
 (0)