mirror of
https://github.com/glfw/glfw.git
synced 2026-09-22 08:50:15 +00:00
Made the pointer-ness of object handles explicit.
This commit is contained in:
+7
-7
@@ -35,7 +35,7 @@
|
||||
|
||||
#include "getopt.h"
|
||||
|
||||
static GLFWwindow window_handle = NULL;
|
||||
static GLFWwindow* window_handle = NULL;
|
||||
|
||||
enum Mode
|
||||
{
|
||||
@@ -68,20 +68,20 @@ static void error_callback(int error, const char* description)
|
||||
fprintf(stderr, "Error: %s\n", description);
|
||||
}
|
||||
|
||||
static void window_size_callback(GLFWwindow window, int width, int height)
|
||||
static void window_size_callback(GLFWwindow* window, int width, int height)
|
||||
{
|
||||
printf("Window resized to %ix%i\n", width, height);
|
||||
|
||||
glViewport(0, 0, width, height);
|
||||
}
|
||||
|
||||
static int window_close_callback(GLFWwindow window)
|
||||
static int window_close_callback(GLFWwindow* window)
|
||||
{
|
||||
window_handle = NULL;
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
static void key_callback(GLFWwindow window, int key, int action)
|
||||
static void key_callback(GLFWwindow* window, int key, int action)
|
||||
{
|
||||
if (key == GLFW_KEY_ESCAPE)
|
||||
{
|
||||
@@ -90,7 +90,7 @@ static void key_callback(GLFWwindow window, int key, int action)
|
||||
}
|
||||
}
|
||||
|
||||
static void list_modes(GLFWmonitor monitor)
|
||||
static void list_modes(GLFWmonitor* monitor)
|
||||
{
|
||||
int count, widthMM, heightMM, dpi, i;
|
||||
GLFWvidmode mode;
|
||||
@@ -124,7 +124,7 @@ static void list_modes(GLFWmonitor monitor)
|
||||
}
|
||||
}
|
||||
|
||||
static void test_modes(GLFWmonitor monitor)
|
||||
static void test_modes(GLFWmonitor* monitor)
|
||||
{
|
||||
int i, count;
|
||||
const GLFWvidmode* modes = glfwGetVideoModes(monitor, &count);
|
||||
@@ -212,7 +212,7 @@ static void test_modes(GLFWmonitor monitor)
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int ch, i, count, mode = LIST_MODE;
|
||||
const GLFWmonitor* monitors;
|
||||
GLFWmonitor** monitors;
|
||||
|
||||
while ((ch = getopt(argc, argv, "th")) != -1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user