From 182e0afe258bbd07d3ced5e0cf7461b398faafc4 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Mon, 25 Feb 2013 17:02:28 +0100 Subject: [PATCH] Made character unsigned. --- include/GL/glfw3.h | 2 +- src/input.c | 2 +- src/internal.h | 2 +- tests/events.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/GL/glfw3.h b/include/GL/glfw3.h index d3ff14ff..7cf8dab5 100644 --- a/include/GL/glfw3.h +++ b/include/GL/glfw3.h @@ -687,7 +687,7 @@ typedef void (* GLFWkeyfun)(GLFWwindow*,int,int); * * @sa glfwSetCharCallback */ -typedef void (* GLFWcharfun)(GLFWwindow*,int); +typedef void (* GLFWcharfun)(GLFWwindow*,unsigned int); /*! @brief The function signature for monitor configuration callbacks. * @param[in] monitor The monitor that was connected or disconnected. diff --git a/src/input.c b/src/input.c index 0347c9c5..58ec0bab 100644 --- a/src/input.c +++ b/src/input.c @@ -135,7 +135,7 @@ void _glfwInputKey(_GLFWwindow* window, int key, int action) window->callbacks.key((GLFWwindow*) window, key, action); } -void _glfwInputChar(_GLFWwindow* window, int character) +void _glfwInputChar(_GLFWwindow* window, unsigned int character) { // Valid Unicode (ISO 10646) character? if (!((character >= 32 && character <= 126) || character >= 160)) diff --git a/src/internal.h b/src/internal.h index 1966bbc8..f6716331 100644 --- a/src/internal.h +++ b/src/internal.h @@ -591,7 +591,7 @@ void _glfwInputKey(_GLFWwindow* window, int key, int action); * @param[in] character The Unicode code point of the input character. * @ingroup event */ -void _glfwInputChar(_GLFWwindow* window, int character); +void _glfwInputChar(_GLFWwindow* window, unsigned int character); /*! @brief Notifies shared code of a scroll event. * @param[in] window The window that received the event. diff --git a/tests/events.c b/tests/events.c index f26b096e..6058c991 100644 --- a/tests/events.c +++ b/tests/events.c @@ -334,9 +334,9 @@ static void key_callback(GLFWwindow* window, int key, int action) } } -static void char_callback(GLFWwindow* window, int character) +static void char_callback(GLFWwindow* window, unsigned int character) { - printf("%08x at %0.3f: Character 0x%04x (%s) input\n", + printf("%08x at %0.3f: Character 0x%08x (%s) input\n", counter++, glfwGetTime(), character,