Add API: SetImeStatus

This is for GLFW3: glfwSetInputMode (mode: GLFW_IME)
This commit is contained in:
Daijiro Fukuda 2022-08-26 17:36:41 +09:00 committed by Takuro Ashie
parent 8d5d9cc874
commit d004c665d0
7 changed files with 39 additions and 0 deletions

View File

@ -626,6 +626,12 @@ bool IsImeOn(void)
return false;
}
// Set IME status
void SetImeStatus(bool on)
{
TRACELOG(LOG_WARNING, "SetImeStatus() not implemented on target platform");
}
// Set internal gamepad mappings
int SetGamepadMappings(const char *mappings)
{

View File

@ -1062,6 +1062,13 @@ bool IsImeOn(void)
return false;
}
// Set IME status
void SetImeStatus(bool on)
{
if (on) glfwSetInputMode(platform.handle, GLFW_IME, GLFW_TRUE);
else glfwSetInputMode(platform.handle, GLFW_IME, GLFW_FALSE);
}
// Set internal gamepad mappings
int SetGamepadMappings(const char *mappings)
{

View File

@ -947,6 +947,12 @@ bool IsImeOn(void)
return false;
}
// Set IME status
void SetImeStatus(bool on)
{
TRACELOG(LOG_WARNING, "SetImeStatus() not implemented on target platform");
}
// Set internal gamepad mappings
int SetGamepadMappings(const char *mappings)
{

View File

@ -622,6 +622,12 @@ bool IsImeOn(void)
return false;
}
// Set IME status
void SetImeStatus(bool on)
{
TRACELOG(LOG_WARNING, "SetImeStatus() not implemented on target platform");
}
// Set internal gamepad mappings
int SetGamepadMappings(const char *mappings)
{

View File

@ -384,6 +384,12 @@ bool IsImeOn(void)
return false;
}
// Set IME status
void SetImeStatus(bool on)
{
TRACELOG(LOG_WARNING, "SetImeStatus() not implemented on target platform");
}
// Set internal gamepad mappings
int SetGamepadMappings(const char *mappings)
{

View File

@ -868,6 +868,13 @@ bool IsImeOn(void)
return false;
}
// Set IME status
void SetImeStatus(bool on)
{
if (on) glfwSetInputMode(platform.handle, GLFW_IME, GLFW_TRUE);
else glfwSetInputMode(platform.handle, GLFW_IME, GLFW_FALSE);
}
// Set internal gamepad mappings
int SetGamepadMappings(const char *mappings)
{

View File

@ -1174,6 +1174,7 @@ RLAPI void SetPreeditCallback(PreeditCallback callback); // Set a callback
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
RLAPI void SetImeStatus(bool on); // Set IME status
// Input-related functions: gamepads
RLAPI bool IsGamepadAvailable(int gamepad); // Check if a gamepad is available