Skip to content

Commit b2c7a1b

Browse files
committed
Add API: IsImeOn
This is for GLFW3: glfwGetInputMode (mode: GLFW_IME)
1 parent 839558e commit b2c7a1b

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
@@ -3564,6 +3564,13 @@ void GetPreeditWindowPosition(int *x, int *y)
35643564
glfwGetPreeditCursorPos(CORE.Window.handle, x, y, NULL);
35653565
}
35663566

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

0 commit comments

Comments
 (0)