Replace GL booleans with public macros

This commit is contained in:
Camilla Berglund
2015-08-23 19:30:04 +02:00
parent 13fbb4748a
commit 0eccf75f65
71 changed files with 581 additions and 557 deletions
+18 -18
View File
@@ -72,12 +72,12 @@ static const struct wl_shell_surface_listener shellSurfaceListener = {
handlePopupDone
};
static GLboolean createSurface(_GLFWwindow* window,
const _GLFWwndconfig* wndconfig)
static GLFWbool createSurface(_GLFWwindow* window,
const _GLFWwndconfig* wndconfig)
{
window->wl.surface = wl_compositor_create_surface(_glfw.wl.compositor);
if (!window->wl.surface)
return GL_FALSE;
return GLFW_FALSE;
wl_surface_set_user_data(window->wl.surface, window);
@@ -85,12 +85,12 @@ static GLboolean createSurface(_GLFWwindow* window,
wndconfig->width,
wndconfig->height);
if (!window->wl.native)
return GL_FALSE;
return GLFW_FALSE;
window->wl.shell_surface = wl_shell_get_shell_surface(_glfw.wl.shell,
window->wl.surface);
if (!window->wl.shell_surface)
return GL_FALSE;
return GLFW_FALSE;
wl_shell_surface_add_listener(window->wl.shell_surface,
&shellSurfaceListener,
@@ -99,7 +99,7 @@ static GLboolean createSurface(_GLFWwindow* window,
window->wl.width = wndconfig->width;
window->wl.height = wndconfig->height;
return GL_TRUE;
return GLFW_TRUE;
}
static int
@@ -217,10 +217,10 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
const _GLFWfbconfig* fbconfig)
{
if (!_glfwCreateContext(window, ctxconfig, fbconfig))
return GL_FALSE;
return GLFW_FALSE;
if (!createSurface(window, wndconfig))
return GL_FALSE;
return GLFW_FALSE;
if (wndconfig->monitor)
{
@@ -237,7 +237,7 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
window->wl.currentCursor = NULL;
return GL_TRUE;
return GLFW_TRUE;
}
void _glfwPlatformDestroyWindow(_GLFWwindow* window)
@@ -245,12 +245,12 @@ void _glfwPlatformDestroyWindow(_GLFWwindow* window)
if (window == _glfw.wl.pointerFocus)
{
_glfw.wl.pointerFocus = NULL;
_glfwInputCursorEnter(window, GL_FALSE);
_glfwInputCursorEnter(window, GLFW_FALSE);
}
if (window == _glfw.wl.keyboardFocus)
{
_glfw.wl.keyboardFocus = NULL;
_glfwInputWindowFocus(window, GL_FALSE);
_glfwInputWindowFocus(window, GLFW_FALSE);
}
_glfwDestroyContext(window);
@@ -347,19 +347,19 @@ void _glfwPlatformHideWindow(_GLFWwindow* window)
int _glfwPlatformWindowFocused(_GLFWwindow* window)
{
// TODO
return GL_FALSE;
return GLFW_FALSE;
}
int _glfwPlatformWindowIconified(_GLFWwindow* window)
{
// TODO
return GL_FALSE;
return GLFW_FALSE;
}
int _glfwPlatformWindowVisible(_GLFWwindow* window)
{
// TODO
return GL_FALSE;
return GLFW_FALSE;
}
void _glfwPlatformPollEvents(void)
@@ -413,7 +413,7 @@ int _glfwPlatformCreateCursor(_GLFWcursor* cursor,
_glfwInputError(GLFW_PLATFORM_ERROR,
"Wayland: Creating a buffer file for %d B failed: %m\n",
length);
return GL_FALSE;
return GLFW_FALSE;
}
data = mmap(NULL, length, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
@@ -422,7 +422,7 @@ int _glfwPlatformCreateCursor(_GLFWcursor* cursor,
_glfwInputError(GLFW_PLATFORM_ERROR,
"Wayland: Cursor mmap failed: %m\n");
close(fd);
return GL_FALSE;
return GLFW_FALSE;
}
pool = wl_shm_create_pool(_glfw.wl.shm, fd, length);
@@ -450,14 +450,14 @@ int _glfwPlatformCreateCursor(_GLFWcursor* cursor,
cursor->wl.height = image->height;
cursor->wl.xhot = xhot;
cursor->wl.yhot = yhot;
return GL_TRUE;
return GLFW_TRUE;
}
int _glfwPlatformCreateStandardCursor(_GLFWcursor* cursor, int shape)
{
// TODO
fprintf(stderr, "_glfwPlatformCreateStandardCursor not implemented yet\n");
return GL_FALSE;
return GLFW_FALSE;
}
void _glfwPlatformDestroyCursor(_GLFWcursor* cursor)