Refactor and reorganize internal

This commit is contained in:
Nathan Poirier 2018-12-14 18:20:31 +01:00
parent 02c2a77362
commit 1e71b9229c
No known key found for this signature in database
GPG Key ID: 94C1CE923BD6A70C
8 changed files with 19 additions and 19 deletions

View File

@ -3416,11 +3416,6 @@ GLFWAPI void glfwSetWindowUserPointer(GLFWwindow* window, void* pointer);
*/
GLFWAPI void* glfwGetWindowUserPointer(GLFWwindow* window);
/*!
* TODO
*/
GLFWAPI int glfwRawInputSupported(void);
/*! @brief Sets the position callback for the specified window.
*
* This function sets the position callback of the specified window, which is
@ -3898,6 +3893,11 @@ GLFWAPI int glfwGetInputMode(GLFWwindow* window, int mode);
*/
GLFWAPI void glfwSetInputMode(GLFWwindow* window, int mode, int value);
/*!
* TODO
*/
GLFWAPI int glfwRawInputSupported(void);
/*! @brief Returns the layout-specific name of the specified printable key.
*
* This function returns the name of the specified printable key, encoded as

View File

@ -1552,7 +1552,7 @@ void _glfwPlatformSetWindowOpacity(_GLFWwindow* window, float opacity)
[window->ns.object setAlphaValue:opacity];
}
void _glfwPlatformSetWindowUseRawInput(_GLFWwindow* window, GLFWbool enabled)
void _glfwPlatformSetRawInput(_GLFWwindow *window, GLFWbool enabled)
{
window->useRawInput = enabled;
}

View File

@ -555,11 +555,17 @@ GLFWAPI void glfwSetInputMode(GLFWwindow* handle, int mode, int value)
else if (mode == GLFW_LOCK_KEY_MODS)
window->lockKeyMods = value ? GLFW_TRUE : GLFW_FALSE;
else if (mode == GLFW_RAW_INPUT)
_glfwPlatformSetWindowUseRawInput(window, value ? GLFW_TRUE : GLFW_FALSE);
_glfwPlatformSetRawInput(window, value ? GLFW_TRUE : GLFW_FALSE);
else
_glfwInputError(GLFW_INVALID_ENUM, "Invalid input mode 0x%08X", mode);
}
GLFWAPI int glfwRawInputSupported(void)
{
_GLFW_REQUIRE_INIT_OR_RETURN(0);
return _glfwPlatformRawInputSupported();
}
GLFWAPI const char* glfwGetKeyName(int key, int scancode)
{
_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
@ -1308,9 +1314,3 @@ GLFWAPI uint64_t glfwGetTimerFrequency(void)
_GLFW_REQUIRE_INIT_OR_RETURN(0);
return _glfwPlatformGetTimerFrequency();
}
GLFWAPI int glfwRawInputSupported(void)
{
_GLFW_REQUIRE_INIT_OR_RETURN(0);
return _glfwPlatformRawInputSupported();
}

View File

@ -597,6 +597,8 @@ const char* _glfwPlatformGetVersionString(void);
void _glfwPlatformGetCursorPos(_GLFWwindow* window, double* xpos, double* ypos);
void _glfwPlatformSetCursorPos(_GLFWwindow* window, double xpos, double ypos);
void _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode);
void _glfwPlatformSetRawInput(_GLFWwindow *window, GLFWbool enabled);
GLFWbool _glfwPlatformRawInputSupported(void);
int _glfwPlatformCreateCursor(_GLFWcursor* cursor,
const GLFWimage* image, int xhot, int yhot);
int _glfwPlatformCreateStandardCursor(_GLFWcursor* cursor, int shape);
@ -623,7 +625,6 @@ void _glfwPlatformUpdateGamepadGUID(char* guid);
uint64_t _glfwPlatformGetTimerValue(void);
uint64_t _glfwPlatformGetTimerFrequency(void);
GLFWbool _glfwPlatformRawInputSupported(void);
int _glfwPlatformCreateWindow(_GLFWwindow* window,
const _GLFWwndconfig* wndconfig,
@ -668,7 +669,6 @@ void _glfwPlatformSetWindowResizable(_GLFWwindow* window, GLFWbool enabled);
void _glfwPlatformSetWindowDecorated(_GLFWwindow* window, GLFWbool enabled);
void _glfwPlatformSetWindowFloating(_GLFWwindow* window, GLFWbool enabled);
void _glfwPlatformSetWindowOpacity(_GLFWwindow* window, float opacity);
void _glfwPlatformSetWindowUseRawInput(_GLFWwindow* window, GLFWbool enabled);
void _glfwPlatformPollEvents(void);
void _glfwPlatformWaitEvents(void);

View File

@ -196,7 +196,7 @@ void _glfwPlatformSetWindowOpacity(_GLFWwindow* window, float opacity)
{
}
void _glfwPlatformSetWindowUseRawInput(_GLFWwindow* window, GLFWbool enabled)
void _glfwPlatformSetRawInput(_GLFWwindow *window, GLFWbool enabled)
{
window->useRawInput = enabled;
}

View File

@ -1852,7 +1852,7 @@ void _glfwPlatformSetWindowOpacity(_GLFWwindow* window, float opacity)
}
}
void _glfwPlatformSetWindowUseRawInput(_GLFWwindow* window, GLFWbool enabled)
void _glfwPlatformSetRawInput(_GLFWwindow *window, GLFWbool enabled)
{
if (window->useRawInput != enabled)
{

View File

@ -1304,7 +1304,7 @@ void _glfwPlatformSetWindowOpacity(_GLFWwindow* window, float opacity)
{
}
void _glfwPlatformSetWindowUseRawInput(_GLFWwindow* window, GLFWbool enabled)
void _glfwPlatformSetRawInput(_GLFWwindow *window, GLFWbool enabled)
{
window->useRawInput = enabled;
}

View File

@ -2653,7 +2653,7 @@ void _glfwPlatformSetWindowOpacity(_GLFWwindow* window, float opacity)
PropModeReplace, (unsigned char*) &value, 1);
}
void _glfwPlatformSetWindowUseRawInput(_GLFWwindow* window, GLFWbool enabled)
void _glfwPlatformSetRawInput(_GLFWwindow *window, GLFWbool enabled)
{
if (window->useRawInput != enabled)
{