diff --git a/src/cocoa_joystick.h b/src/cocoa_joystick.h index 5a98ea0a..bc38ecc9 100644 --- a/src/cocoa_joystick.h +++ b/src/cocoa_joystick.h @@ -39,7 +39,7 @@ // typedef struct _GLFWjoydeviceNS { - int present; + GLFWbool present; char name[256]; IOHIDDeviceRef deviceRef; diff --git a/src/egl_context.c b/src/egl_context.c index 51fa349b..53aaf6cc 100644 --- a/src/egl_context.c +++ b/src/egl_context.c @@ -176,7 +176,7 @@ static GLFWbool chooseFBConfigs(const _GLFWctxconfig* ctxconfig, // Initialize EGL // -int _glfwInitEGL(void) +GLFWbool _glfwInitEGL(void) { int i; const char* sonames[] = @@ -284,9 +284,9 @@ void _glfwTerminateEGL(void) // Create the OpenGL or OpenGL ES context // -int _glfwCreateContextEGL(_GLFWwindow* window, - const _GLFWctxconfig* ctxconfig, - const _GLFWfbconfig* fbconfig) +GLFWbool _glfwCreateContextEGL(_GLFWwindow* window, + const _GLFWctxconfig* ctxconfig, + const _GLFWfbconfig* fbconfig) { int attribs[40]; EGLConfig config; diff --git a/src/egl_context.h b/src/egl_context.h index bc535849..b24a4d6c 100644 --- a/src/egl_context.h +++ b/src/egl_context.h @@ -207,11 +207,11 @@ typedef struct _GLFWlibraryEGL } _GLFWlibraryEGL; -int _glfwInitEGL(void); +GLFWbool _glfwInitEGL(void); void _glfwTerminateEGL(void); -int _glfwCreateContextEGL(_GLFWwindow* window, - const _GLFWctxconfig* ctxconfig, - const _GLFWfbconfig* fbconfig); +GLFWbool _glfwCreateContextEGL(_GLFWwindow* window, + const _GLFWctxconfig* ctxconfig, + const _GLFWfbconfig* fbconfig); void _glfwDestroyContextEGL(_GLFWwindow* window); #if defined(_GLFW_X11) GLFWbool _glfwChooseVisualEGL(const _GLFWctxconfig* ctxconfig, diff --git a/src/glx_context.c b/src/glx_context.c index b1c053dc..8e8ccfd1 100644 --- a/src/glx_context.c +++ b/src/glx_context.c @@ -150,7 +150,7 @@ static GLXContext createLegacyContext(_GLFWwindow* window, // Initialize GLX // -int _glfwInitGLX(void) +GLFWbool _glfwInitGLX(void) { int i; const char* sonames[] = @@ -314,9 +314,9 @@ void _glfwTerminateGLX(void) // Create the OpenGL or OpenGL ES context // -int _glfwCreateContextGLX(_GLFWwindow* window, - const _GLFWctxconfig* ctxconfig, - const _GLFWfbconfig* fbconfig) +GLFWbool _glfwCreateContextGLX(_GLFWwindow* window, + const _GLFWctxconfig* ctxconfig, + const _GLFWfbconfig* fbconfig) { int attribs[40]; GLXFBConfig native = NULL; diff --git a/src/glx_context.h b/src/glx_context.h index 073cd3cd..dc54c797 100644 --- a/src/glx_context.h +++ b/src/glx_context.h @@ -171,11 +171,11 @@ typedef struct _GLFWlibraryGLX } _GLFWlibraryGLX; -int _glfwInitGLX(void); +GLFWbool _glfwInitGLX(void); void _glfwTerminateGLX(void); -int _glfwCreateContextGLX(_GLFWwindow* window, - const _GLFWctxconfig* ctxconfig, - const _GLFWfbconfig* fbconfig); +GLFWbool _glfwCreateContextGLX(_GLFWwindow* window, + const _GLFWctxconfig* ctxconfig, + const _GLFWfbconfig* fbconfig); void _glfwDestroyContextGLX(_GLFWwindow* window); GLFWbool _glfwChooseVisualGLX(const _GLFWctxconfig* ctxconfig, const _GLFWfbconfig* fbconfig, diff --git a/src/internal.h b/src/internal.h index fd6cd976..206b7e50 100644 --- a/src/internal.h +++ b/src/internal.h @@ -231,10 +231,10 @@ struct _GLFWfbconfig int accumBlueBits; int accumAlphaBits; int auxBuffers; - int stereo; + GLFWbool stereo; int samples; - int sRGB; - int doublebuffer; + GLFWbool sRGB; + GLFWbool doublebuffer; // This is defined in the context API's context.h _GLFW_PLATFORM_FBCONFIG; @@ -918,6 +918,6 @@ void _glfwFreeMonitors(_GLFWmonitor** monitors, int count); /*! @ingroup utility */ -int _glfwIsPrintable(int key); +GLFWbool _glfwIsPrintable(int key); #endif // _glfw3_internal_h_ diff --git a/src/linux_joystick.c b/src/linux_joystick.c index 0b6328a1..aff9eda6 100644 --- a/src/linux_joystick.c +++ b/src/linux_joystick.c @@ -173,7 +173,7 @@ static GLFWbool pollJoystickEvents(_GLFWjoystickLinux* js) // Initialize joystick interface // -int _glfwInitJoysticksLinux(void) +GLFWbool _glfwInitJoysticksLinux(void) { #if defined(__linux__) const char* dirname = "/dev/input"; diff --git a/src/linux_joystick.h b/src/linux_joystick.h index 25a893ef..6f34d576 100644 --- a/src/linux_joystick.h +++ b/src/linux_joystick.h @@ -36,7 +36,7 @@ // typedef struct _GLFWjoystickLinux { - int present; + GLFWbool present; int fd; float* axes; int axisCount; @@ -61,7 +61,7 @@ typedef struct _GLFWjoylistLinux } _GLFWjoylistLinux; -int _glfwInitJoysticksLinux(void); +GLFWbool _glfwInitJoysticksLinux(void); void _glfwTerminateJoysticksLinux(void); #endif // _glfw3_linux_joystick_h_ diff --git a/src/nsgl_context.h b/src/nsgl_context.h index 82fde269..6a0a22fd 100644 --- a/src/nsgl_context.h +++ b/src/nsgl_context.h @@ -52,11 +52,11 @@ typedef struct _GLFWlibraryNSGL } _GLFWlibraryNSGL; -int _glfwInitNSGL(void); +GLFWbool _glfwInitNSGL(void); void _glfwTerminateNSGL(void); -int _glfwCreateContextNSGL(_GLFWwindow* window, - const _GLFWctxconfig* ctxconfig, - const _GLFWfbconfig* fbconfig); +GLFWbool _glfwCreateContextNSGL(_GLFWwindow* window, + const _GLFWctxconfig* ctxconfig, + const _GLFWfbconfig* fbconfig); void _glfwDestroyContextNSGL(_GLFWwindow* window); #endif // _glfw3_nsgl_context_h_ diff --git a/src/nsgl_context.m b/src/nsgl_context.m index dbca3797..714d5272 100644 --- a/src/nsgl_context.m +++ b/src/nsgl_context.m @@ -33,7 +33,7 @@ // Initialize OpenGL support // -int _glfwInitNSGL(void) +GLFWbool _glfwInitNSGL(void) { _glfw.nsgl.framework = CFBundleGetBundleWithIdentifier(CFSTR("com.apple.opengl")); @@ -55,9 +55,9 @@ void _glfwTerminateNSGL(void) // Create the OpenGL context // -int _glfwCreateContextNSGL(_GLFWwindow* window, - const _GLFWctxconfig* ctxconfig, - const _GLFWfbconfig* fbconfig) +GLFWbool _glfwCreateContextNSGL(_GLFWwindow* window, + const _GLFWctxconfig* ctxconfig, + const _GLFWfbconfig* fbconfig) { unsigned int attributeCount = 0; diff --git a/src/wgl_context.c b/src/wgl_context.c index 291bb9c8..55138e70 100644 --- a/src/wgl_context.c +++ b/src/wgl_context.c @@ -287,7 +287,7 @@ static GLFWbool isCompositionEnabled(void) // Initialize WGL // -int _glfwInitWGL(void) +GLFWbool _glfwInitWGL(void) { _glfw.wgl.instance = LoadLibraryA("opengl32.dll"); if (!_glfw.wgl.instance) @@ -327,9 +327,9 @@ void _glfwTerminateWGL(void) // Create the OpenGL or OpenGL ES context // -int _glfwCreateContextWGL(_GLFWwindow* window, - const _GLFWctxconfig* ctxconfig, - const _GLFWfbconfig* fbconfig) +GLFWbool _glfwCreateContextWGL(_GLFWwindow* window, + const _GLFWctxconfig* ctxconfig, + const _GLFWfbconfig* fbconfig) { int attribs[40]; int pixelFormat = 0; diff --git a/src/wgl_context.h b/src/wgl_context.h index 0523cee4..bc8968b4 100644 --- a/src/wgl_context.h +++ b/src/wgl_context.h @@ -144,11 +144,11 @@ typedef struct _GLFWlibraryWGL } _GLFWlibraryWGL; -int _glfwInitWGL(void); +GLFWbool _glfwInitWGL(void); void _glfwTerminateWGL(void); -int _glfwCreateContextWGL(_GLFWwindow* window, - const _GLFWctxconfig* ctxconfig, - const _GLFWfbconfig* fbconfig); +GLFWbool _glfwCreateContextWGL(_GLFWwindow* window, + const _GLFWctxconfig* ctxconfig, + const _GLFWfbconfig* fbconfig); void _glfwDestroyContextWGL(_GLFWwindow* window); int _glfwAnalyzeContextWGL(_GLFWwindow* window, const _GLFWctxconfig* ctxconfig,