Skip to content

Commit 839558e

Browse files
committed
Add API: GetPreeditWindowPosition
This is for GLFW3: glfwGetPreeditCursorPos
1 parent e9bde09 commit 839558e

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
@@ -3558,6 +3558,12 @@ void SetPreeditWindowPosition(int x, int y)
35583558
glfwSetPreeditCursorPos(CORE.Window.handle, x, y, 0);
35593559
}
35603560

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

0 commit comments

Comments
 (0)