Skip to content

Commit 9acdded

Browse files
committed
Add API: IsImeOn
This is for GLFW3: glfwGetInputMode (mode: GLFW_IME)
1 parent 17959bf commit 9acdded

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/raylib.h

+1
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 SetPreeditCursorRectangle(int x, int y, int w, int h); // Set the preedit cursor area that is used to decide the position of the candidate window
11141114
RLAPI void GetPreeditCursorRectangle(int *x, int *y, int *w, int *h); // Get the preedit cursor area
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

+7
Original file line numberDiff line numberDiff line change
@@ -3567,6 +3567,13 @@ void GetPreeditCursorRectangle(int *x, int *y, int *w, int *h)
35673567
glfwGetPreeditCursorRectangle(CORE.Window.handle, x, y, w, h);
35683568
}
35693569

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

0 commit comments

Comments
 (0)