Lines Matching full:monitor
65 // Retrieves the available modes for the specified monitor
67 static GLFWbool refreshVideoModes(_GLFWmonitor* monitor) in refreshVideoModes() argument
72 if (monitor->modes) in refreshVideoModes()
75 modes = _glfw.platform.getVideoModes(monitor, &modeCount); in refreshVideoModes()
81 _glfw_free(monitor->modes); in refreshVideoModes()
82 monitor->modes = modes; in refreshVideoModes()
83 monitor->modeCount = modeCount; in refreshVideoModes()
93 // Notifies shared code of a monitor connection or disconnection
95 void _glfwInputMonitor(_GLFWmonitor* monitor, int action, int placement) in _glfwInputMonitor() argument
97 assert(monitor != NULL); in _glfwInputMonitor()
113 _glfw.monitors[0] = monitor; in _glfwInputMonitor()
116 _glfw.monitors[_glfw.monitorCount - 1] = monitor; in _glfwInputMonitor()
125 if (window->monitor == monitor) in _glfwInputMonitor()
137 if (_glfw.monitors[i] == monitor) in _glfwInputMonitor()
148 if (_glfw.callbacks.monitor) in _glfwInputMonitor()
149 _glfw.callbacks.monitor((GLFWmonitor*) monitor, action); in _glfwInputMonitor()
152 _glfwFreeMonitor(monitor); in _glfwInputMonitor()
156 // a monitor
158 void _glfwInputMonitorWindow(_GLFWmonitor* monitor, _GLFWwindow* window) in _glfwInputMonitorWindow() argument
160 assert(monitor != NULL); in _glfwInputMonitorWindow()
161 monitor->window = window; in _glfwInputMonitorWindow()
169 // Allocates and returns a monitor object with the specified name and dimensions
173 _GLFWmonitor* monitor = _glfw_calloc(1, sizeof(_GLFWmonitor)); in _glfwAllocMonitor() local
174 monitor->widthMM = widthMM; in _glfwAllocMonitor()
175 monitor->heightMM = heightMM; in _glfwAllocMonitor()
177 strncpy(monitor->name, name, sizeof(monitor->name) - 1); in _glfwAllocMonitor()
179 return monitor; in _glfwAllocMonitor()
182 // Frees a monitor object and any data associated with it
184 void _glfwFreeMonitor(_GLFWmonitor* monitor) in _glfwFreeMonitor() argument
186 if (monitor == NULL) in _glfwFreeMonitor()
189 _glfw.platform.freeMonitor(monitor); in _glfwFreeMonitor()
191 _glfwFreeGammaArrays(&monitor->originalRamp); in _glfwFreeMonitor()
192 _glfwFreeGammaArrays(&monitor->currentRamp); in _glfwFreeMonitor()
194 _glfw_free(monitor->modes); in _glfwFreeMonitor()
195 _glfw_free(monitor); in _glfwFreeMonitor()
221 const GLFWvidmode* _glfwChooseVideoMode(_GLFWmonitor* monitor, in _glfwChooseVideoMode() argument
231 if (!refreshVideoModes(monitor)) in _glfwChooseVideoMode()
234 for (i = 0; i < monitor->modeCount; i++) in _glfwChooseVideoMode()
236 current = monitor->modes + i; in _glfwChooseVideoMode()
335 _GLFWmonitor* monitor = (_GLFWmonitor*) handle; in glfwGetMonitorPos() local
336 assert(monitor != NULL); in glfwGetMonitorPos()
338 _glfw.platform.getMonitorPos(monitor, xpos, ypos); in glfwGetMonitorPos()
356 _GLFWmonitor* monitor = (_GLFWmonitor*) handle; in glfwGetMonitorWorkarea() local
357 assert(monitor != NULL); in glfwGetMonitorWorkarea()
359 _glfw.platform.getMonitorWorkarea(monitor, xpos, ypos, width, height); in glfwGetMonitorWorkarea()
371 _GLFWmonitor* monitor = (_GLFWmonitor*) handle; in glfwGetMonitorPhysicalSize() local
372 assert(monitor != NULL); in glfwGetMonitorPhysicalSize()
375 *widthMM = monitor->widthMM; in glfwGetMonitorPhysicalSize()
377 *heightMM = monitor->heightMM; in glfwGetMonitorPhysicalSize()
390 _GLFWmonitor* monitor = (_GLFWmonitor*) handle; in glfwGetMonitorContentScale() local
391 assert(monitor != NULL); in glfwGetMonitorContentScale()
393 _glfw.platform.getMonitorContentScale(monitor, xscale, yscale); in glfwGetMonitorContentScale()
400 _GLFWmonitor* monitor = (_GLFWmonitor*) handle; in glfwGetMonitorName() local
401 assert(monitor != NULL); in glfwGetMonitorName()
403 return monitor->name; in glfwGetMonitorName()
410 _GLFWmonitor* monitor = (_GLFWmonitor*) handle; in glfwSetMonitorUserPointer() local
411 assert(monitor != NULL); in glfwSetMonitorUserPointer()
413 monitor->userPointer = pointer; in glfwSetMonitorUserPointer()
420 _GLFWmonitor* monitor = (_GLFWmonitor*) handle; in glfwGetMonitorUserPointer() local
421 assert(monitor != NULL); in glfwGetMonitorUserPointer()
423 return monitor->userPointer; in glfwGetMonitorUserPointer()
429 _GLFW_SWAP(GLFWmonitorfun, _glfw.callbacks.monitor, cbfun); in glfwSetMonitorCallback()
441 _GLFWmonitor* monitor = (_GLFWmonitor*) handle; in glfwGetVideoModes() local
442 assert(monitor != NULL); in glfwGetVideoModes()
444 if (!refreshVideoModes(monitor)) in glfwGetVideoModes()
447 *count = monitor->modeCount; in glfwGetVideoModes()
448 return monitor->modes; in glfwGetVideoModes()
455 _GLFWmonitor* monitor = (_GLFWmonitor*) handle; in glfwGetVideoMode() local
456 assert(monitor != NULL); in glfwGetVideoMode()
458 if (!_glfw.platform.getVideoMode(monitor, &monitor->currentMode)) in glfwGetVideoMode()
461 return &monitor->currentMode; in glfwGetVideoMode()
516 _GLFWmonitor* monitor = (_GLFWmonitor*) handle; in glfwGetGammaRamp() local
517 assert(monitor != NULL); in glfwGetGammaRamp()
519 _glfwFreeGammaArrays(&monitor->currentRamp); in glfwGetGammaRamp()
520 if (!_glfw.platform.getGammaRamp(monitor, &monitor->currentRamp)) in glfwGetGammaRamp()
523 return &monitor->currentRamp; in glfwGetGammaRamp()
536 _GLFWmonitor* monitor = (_GLFWmonitor*) handle; in glfwSetGammaRamp() local
537 assert(monitor != NULL); in glfwSetGammaRamp()
547 if (!monitor->originalRamp.size) in glfwSetGammaRamp()
549 if (!_glfw.platform.getGammaRamp(monitor, &monitor->originalRamp)) in glfwSetGammaRamp()
553 _glfw.platform.setGammaRamp(monitor, ramp); in glfwSetGammaRamp()