Moved function into correct category.

This commit is contained in:
Camilla Berglund 2013-01-23 19:52:52 +01:00
parent a910f53be2
commit cb02a693b4

View File

@ -94,43 +94,9 @@ static int refreshVideoModes(_GLFWmonitor* monitor)
//////////////////////////////////////////////////////////////////////////
////// GLFW internal API //////
////// GLFW event API //////
//////////////////////////////////////////////////////////////////////////
_GLFWmonitor* _glfwCreateMonitor(const char* name,
GLboolean primary,
int widthMM, int heightMM,
int x, int y)
{
_GLFWmonitor* monitor = (_GLFWmonitor*) calloc(1, sizeof(_GLFWmonitor));
if (!monitor)
{
_glfwInputError(GLFW_OUT_OF_MEMORY, NULL);
return NULL;
}
monitor->name = strdup(name);
monitor->primary = primary;
monitor->widthMM = widthMM;
monitor->heightMM = heightMM;
monitor->positionX = x;
monitor->positionY = y;
return monitor;
}
void _glfwDestroyMonitor(_GLFWmonitor* monitor)
{
if (monitor == NULL)
return;
_glfwPlatformDestroyMonitor(monitor);
free(monitor->modes);
free(monitor->name);
free(monitor);
}
void _glfwInputMonitorChange(void)
{
int i, j, monitorCount;
@ -189,6 +155,45 @@ void _glfwInputMonitorChange(void)
_glfw.monitorCount = monitorCount;
}
//////////////////////////////////////////////////////////////////////////
////// GLFW internal API //////
//////////////////////////////////////////////////////////////////////////
_GLFWmonitor* _glfwCreateMonitor(const char* name,
GLboolean primary,
int widthMM, int heightMM,
int x, int y)
{
_GLFWmonitor* monitor = (_GLFWmonitor*) calloc(1, sizeof(_GLFWmonitor));
if (!monitor)
{
_glfwInputError(GLFW_OUT_OF_MEMORY, NULL);
return NULL;
}
monitor->name = strdup(name);
monitor->primary = primary;
monitor->widthMM = widthMM;
monitor->heightMM = heightMM;
monitor->positionX = x;
monitor->positionY = y;
return monitor;
}
void _glfwDestroyMonitor(_GLFWmonitor* monitor)
{
if (monitor == NULL)
return;
_glfwPlatformDestroyMonitor(monitor);
free(monitor->modes);
free(monitor->name);
free(monitor);
}
void _glfwDestroyMonitors(void)
{
int i;