Add API: IsImeOn

This is for GLFW3: glfwGetInputMode (mode: GLFW_IME)
This commit is contained in:
Daijiro Fukuda 2022-08-26 17:27:06 +09:00 committed by Takuro Ashie
parent 6c7e13e1b0
commit 8d5d9cc874
7 changed files with 43 additions and 0 deletions

View File

@ -619,6 +619,13 @@ void GetPreeditCursorRectangle(int *x, int *y, int *w, int *h)
TRACELOG(LOG_WARNING, "GetPreeditCursorRectangle() not implemented on target platform");
}
// Check if IME is ON
bool IsImeOn(void)
{
TRACELOG(LOG_WARNING, "IsImeOn() not implemented on target platform");
return false;
}
// Set internal gamepad mappings
int SetGamepadMappings(const char *mappings)
{

View File

@ -1055,6 +1055,13 @@ void GetPreeditCursorRectangle(int *x, int *y, int *w, int *h)
glfwGetPreeditCursorRectangle(platform.handle, x, y, w, h);
}
// Check if IME is ON
bool IsImeOn(void)
{
if (glfwGetInputMode(platform.handle, GLFW_IME) == GLFW_TRUE) return true;
return false;
}
// Set internal gamepad mappings
int SetGamepadMappings(const char *mappings)
{

View File

@ -940,6 +940,13 @@ void GetPreeditCursorRectangle(int *x, int *y, int *w, int *h)
TRACELOG(LOG_WARNING, "GetPreeditCursorRectangle() not implemented on target platform");
}
// Check if IME is ON
bool IsImeOn(void)
{
TRACELOG(LOG_WARNING, "IsImeOn() not implemented on target platform");
return false;
}
// Set internal gamepad mappings
int SetGamepadMappings(const char *mappings)
{

View File

@ -615,6 +615,13 @@ void GetPreeditCursorRectangle(int *x, int *y, int *w, int *h)
TRACELOG(LOG_WARNING, "GetPreeditCursorRectangle() not implemented on target platform");
}
// Check if IME is ON
bool IsImeOn(void)
{
TRACELOG(LOG_WARNING, "IsImeOn() not implemented on target platform");
return false;
}
// Set internal gamepad mappings
int SetGamepadMappings(const char *mappings)
{

View File

@ -377,6 +377,13 @@ void GetPreeditCursorRectangle(int *x, int *y, int *w, int *h)
TRACELOG(LOG_WARNING, "GetPreeditCursorRectangle() not implemented on target platform");
}
// Check if IME is ON
bool IsImeOn(void)
{
TRACELOG(LOG_WARNING, "IsImeOn() not implemented on target platform");
return false;
}
// Set internal gamepad mappings
int SetGamepadMappings(const char *mappings)
{

View File

@ -861,6 +861,13 @@ void GetPreeditCursorRectangle(int *x, int *y, int *w, int *h)
glfwGetPreeditCursorRectangle(platform.handle, x, y, w, h);
}
// Check if IME is ON
bool IsImeOn(void)
{
if (glfwGetInputMode(platform.handle, GLFW_IME) == GLFW_TRUE) return true;
return false;
}
// Set internal gamepad mappings
int SetGamepadMappings(const char *mappings)
{

View File

@ -1173,6 +1173,7 @@ RLAPI void SetExitKey(int key); // Set a custom ke
RLAPI void SetPreeditCallback(PreeditCallback callback); // Set a callback for preedit
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
RLAPI void GetPreeditCursorRectangle(int *x, int *y, int *w, int *h); // Get the preedit cursor area
RLAPI bool IsImeOn(void); // Check if IME is ON
// Input-related functions: gamepads
RLAPI bool IsGamepadAvailable(int gamepad); // Check if a gamepad is available