Skip to content

Commit 578276a

Browse files
committed
Add API: IsImeOn
This is for GLFW3: glfwGetInputMode (mode: GLFW_IME)
1 parent 7c30c66 commit 578276a

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
@@ -1112,6 +1112,7 @@ RLAPI int GetCharPressed(void); // Get char presse
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
11141114
RLAPI void GetPreeditWindowPosition(int *x, int *y); // Get a preedit window postion XY
1115+
RLAPI bool IsImeOn(void); // Check if IME is ON
11151116

11161117
// Input-related functions: gamepads
11171118
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
@@ -3566,6 +3566,13 @@ void GetPreeditWindowPosition(int *x, int *y)
35663566
glfwGetPreeditCursorPos(CORE.Window.handle, x, y, NULL);
35673567
}
35683568

3569+
// Check if IME is ON
3570+
bool IsImeOn(void)
3571+
{
3572+
if (glfwGetInputMode(CORE.Window.handle, GLFW_IME) == GLFW_TRUE) return true;
3573+
return false;
3574+
}
3575+
35693576
// Set a custom key to exit program
35703577
// NOTE: default exitKey is ESCAPE
35713578
void SetExitKey(int key)

0 commit comments

Comments
 (0)