1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>GLFW: Monitor handling</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<div class="glfwheader">
<a href="http://www.glfw.org/" id="glfwhome">GLFW</a>
<ul class="glfwnavbar">
<li><a href="http://www.glfw.org/documentation.html">Documentation</a></li>
<li><a href="http://www.glfw.org/download.html">Download</a></li>
<li><a href="http://www.glfw.org/media.html">Media</a></li>
<li><a href="http://www.glfw.org/community.html">Community</a></li>
</ul>
</div>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Pages</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Data Structures</a> |
<a href="#typedef-members">Typedefs</a> |
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">Monitor handling</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structGLFWvidmode.html">GLFWvidmode</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Video mode type. <a href="structGLFWvidmode.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structGLFWgammaramp.html">GLFWgammaramp</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Gamma ramp. <a href="structGLFWgammaramp.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga8d9efd1cde9426692c73fe40437d0ae3"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a></td></tr>
<tr class="separator:ga8d9efd1cde9426692c73fe40437d0ae3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga67b74af6cecfdbccc7e57a6319a57210"><td class="memItemLeft" align="right" valign="top">typedef void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga67b74af6cecfdbccc7e57a6319a57210">GLFWmonitorfun</a> )(<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *, int)</td></tr>
<tr class="memdesc:ga67b74af6cecfdbccc7e57a6319a57210"><td class="mdescLeft"> </td><td class="mdescRight">The function signature for monitor configuration callbacks. <a href="#ga67b74af6cecfdbccc7e57a6319a57210">More...</a><br/></td></tr>
<tr class="separator:ga67b74af6cecfdbccc7e57a6319a57210"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gae48aadf4ea0967e6605c8f58fa5daccb"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structGLFWvidmode.html">GLFWvidmode</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#gae48aadf4ea0967e6605c8f58fa5daccb">GLFWvidmode</a></td></tr>
<tr class="memdesc:gae48aadf4ea0967e6605c8f58fa5daccb"><td class="mdescLeft"> </td><td class="mdescRight">Video mode type. <a href="#gae48aadf4ea0967e6605c8f58fa5daccb">More...</a><br/></td></tr>
<tr class="separator:gae48aadf4ea0967e6605c8f58fa5daccb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaec0bd37af673be8813592849f13e02f0"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structGLFWgammaramp.html">GLFWgammaramp</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#gaec0bd37af673be8813592849f13e02f0">GLFWgammaramp</a></td></tr>
<tr class="memdesc:gaec0bd37af673be8813592849f13e02f0"><td class="mdescLeft"> </td><td class="mdescRight">Gamma ramp. <a href="#gaec0bd37af673be8813592849f13e02f0">More...</a><br/></td></tr>
<tr class="separator:gaec0bd37af673be8813592849f13e02f0"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga3fba51c8bd36491d4712aa5bd074a537"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> ** </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga3fba51c8bd36491d4712aa5bd074a537">glfwGetMonitors</a> (int *count)</td></tr>
<tr class="memdesc:ga3fba51c8bd36491d4712aa5bd074a537"><td class="mdescLeft"> </td><td class="mdescRight">Returns the currently connected monitors. <a href="#ga3fba51c8bd36491d4712aa5bd074a537">More...</a><br/></td></tr>
<tr class="separator:ga3fba51c8bd36491d4712aa5bd074a537"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga721867d84c6d18d6790d64d2847ca0b1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga721867d84c6d18d6790d64d2847ca0b1">glfwGetPrimaryMonitor</a> (void)</td></tr>
<tr class="memdesc:ga721867d84c6d18d6790d64d2847ca0b1"><td class="mdescLeft"> </td><td class="mdescRight">Returns the primary monitor. <a href="#ga721867d84c6d18d6790d64d2847ca0b1">More...</a><br/></td></tr>
<tr class="separator:ga721867d84c6d18d6790d64d2847ca0b1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga102f54e7acc9149edbcf0997152df8c9"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga102f54e7acc9149edbcf0997152df8c9">glfwGetMonitorPos</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor, int *xpos, int *ypos)</td></tr>
<tr class="memdesc:ga102f54e7acc9149edbcf0997152df8c9"><td class="mdescLeft"> </td><td class="mdescRight">Returns the position of the monitor's viewport on the virtual screen. <a href="#ga102f54e7acc9149edbcf0997152df8c9">More...</a><br/></td></tr>
<tr class="separator:ga102f54e7acc9149edbcf0997152df8c9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaa2d6107f4a35771b99812d1260c6056d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#gaa2d6107f4a35771b99812d1260c6056d">glfwGetMonitorPhysicalSize</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor, int *width, int *height)</td></tr>
<tr class="memdesc:gaa2d6107f4a35771b99812d1260c6056d"><td class="mdescLeft"> </td><td class="mdescRight">Returns the physical size of the monitor. <a href="#gaa2d6107f4a35771b99812d1260c6056d">More...</a><br/></td></tr>
<tr class="separator:gaa2d6107f4a35771b99812d1260c6056d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga79a34ee22ff080ca954a9663e4679daf"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga79a34ee22ff080ca954a9663e4679daf">glfwGetMonitorName</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
<tr class="memdesc:ga79a34ee22ff080ca954a9663e4679daf"><td class="mdescLeft"> </td><td class="mdescRight">Returns the name of the specified monitor. <a href="#ga79a34ee22ff080ca954a9663e4679daf">More...</a><br/></td></tr>
<tr class="separator:ga79a34ee22ff080ca954a9663e4679daf"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gac3fe0f647f68b731f99756cd81897378"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__monitor.html#ga67b74af6cecfdbccc7e57a6319a57210">GLFWmonitorfun</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#gac3fe0f647f68b731f99756cd81897378">glfwSetMonitorCallback</a> (<a class="el" href="group__monitor.html#ga67b74af6cecfdbccc7e57a6319a57210">GLFWmonitorfun</a> cbfun)</td></tr>
<tr class="memdesc:gac3fe0f647f68b731f99756cd81897378"><td class="mdescLeft"> </td><td class="mdescRight">Sets the monitor configuration callback. <a href="#gac3fe0f647f68b731f99756cd81897378">More...</a><br/></td></tr>
<tr class="separator:gac3fe0f647f68b731f99756cd81897378"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga820b0ce9a5237d645ea7cbb4bd383458"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structGLFWvidmode.html">GLFWvidmode</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga820b0ce9a5237d645ea7cbb4bd383458">glfwGetVideoModes</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor, int *count)</td></tr>
<tr class="memdesc:ga820b0ce9a5237d645ea7cbb4bd383458"><td class="mdescLeft"> </td><td class="mdescRight">Returns the available video modes for the specified monitor. <a href="#ga820b0ce9a5237d645ea7cbb4bd383458">More...</a><br/></td></tr>
<tr class="separator:ga820b0ce9a5237d645ea7cbb4bd383458"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gafc1bb972a921ad5b3bd5d63a95fc2d52"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structGLFWvidmode.html">GLFWvidmode</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#gafc1bb972a921ad5b3bd5d63a95fc2d52">glfwGetVideoMode</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
<tr class="memdesc:gafc1bb972a921ad5b3bd5d63a95fc2d52"><td class="mdescLeft"> </td><td class="mdescRight">Returns the current mode of the specified monitor. <a href="#gafc1bb972a921ad5b3bd5d63a95fc2d52">More...</a><br/></td></tr>
<tr class="separator:gafc1bb972a921ad5b3bd5d63a95fc2d52"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga6ac582625c990220785ddd34efa3169a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga6ac582625c990220785ddd34efa3169a">glfwSetGamma</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor, float gamma)</td></tr>
<tr class="memdesc:ga6ac582625c990220785ddd34efa3169a"><td class="mdescLeft"> </td><td class="mdescRight">Generates a gamma ramp and sets it for the specified monitor. <a href="#ga6ac582625c990220785ddd34efa3169a">More...</a><br/></td></tr>
<tr class="separator:ga6ac582625c990220785ddd34efa3169a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gab7c41deb2219bde3e1eb756ddaa9ec80"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structGLFWgammaramp.html">GLFWgammaramp</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#gab7c41deb2219bde3e1eb756ddaa9ec80">glfwGetGammaRamp</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
<tr class="memdesc:gab7c41deb2219bde3e1eb756ddaa9ec80"><td class="mdescLeft"> </td><td class="mdescRight">Retrieves the current gamma ramp for the specified monitor. <a href="#gab7c41deb2219bde3e1eb756ddaa9ec80">More...</a><br/></td></tr>
<tr class="separator:gab7c41deb2219bde3e1eb756ddaa9ec80"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga583f0ffd0d29613d8cd172b996bbf0dd"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga583f0ffd0d29613d8cd172b996bbf0dd">glfwSetGammaRamp</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor, const <a class="el" href="structGLFWgammaramp.html">GLFWgammaramp</a> *ramp)</td></tr>
<tr class="memdesc:ga583f0ffd0d29613d8cd172b996bbf0dd"><td class="mdescLeft"> </td><td class="mdescRight">Sets the current gamma ramp for the specified monitor. <a href="#ga583f0ffd0d29613d8cd172b996bbf0dd">More...</a><br/></td></tr>
<tr class="separator:ga583f0ffd0d29613d8cd172b996bbf0dd"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>This is the reference documentation for monitor related functions and types. For more information, see the <a class="el" href="monitor.html">Multi-monitor guide</a>. </p>
<h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="gaec0bd37af673be8813592849f13e02f0"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="structGLFWgammaramp.html">GLFWgammaramp</a> <a class="el" href="structGLFWgammaramp.html">GLFWgammaramp</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>This describes the gamma ramp for a monitor.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__monitor.html#gab7c41deb2219bde3e1eb756ddaa9ec80" title="Retrieves the current gamma ramp for the specified monitor.">glfwGetGammaRamp</a> <a class="el" href="group__monitor.html#ga583f0ffd0d29613d8cd172b996bbf0dd" title="Sets the current gamma ramp for the specified monitor.">glfwSetGammaRamp</a> </dd></dl>
</div>
</div>
<a class="anchor" id="ga8d9efd1cde9426692c73fe40437d0ae3"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> <a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Opaque monitor object. </p>
</div>
</div>
<a class="anchor" id="ga67b74af6cecfdbccc7e57a6319a57210"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef void(* GLFWmonitorfun)(<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *, int)</td>
</tr>
</table>
</div><div class="memdoc">
<p>This is the function signature for monitor configuration callback functions.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor that was connected or disconnected. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">event</td><td>One of <code>GLFW_CONNECTED</code> or <code>GLFW_DISCONNECTED</code>.</td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__monitor.html#gac3fe0f647f68b731f99756cd81897378" title="Sets the monitor configuration callback.">glfwSetMonitorCallback</a> </dd></dl>
</div>
</div>
<a class="anchor" id="gae48aadf4ea0967e6605c8f58fa5daccb"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="structGLFWvidmode.html">GLFWvidmode</a> <a class="el" href="structGLFWvidmode.html">GLFWvidmode</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>This describes a single video mode. </p>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gab7c41deb2219bde3e1eb756ddaa9ec80"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="structGLFWgammaramp.html">GLFWgammaramp</a>* glfwGetGammaRamp </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> * </td>
<td class="paramname"><em>monitor</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function retrieves the current gamma ramp of the specified monitor.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor to query. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The current gamma ramp, or <code>NULL</code> if an error occurred.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The value arrays of the returned ramp are allocated and freed by GLFW. You should not free them yourself. </dd></dl>
</div>
</div>
<a class="anchor" id="ga79a34ee22ff080ca954a9663e4679daf"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char* glfwGetMonitorName </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> * </td>
<td class="paramname"><em>monitor</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function returns a human-readable name, encoded as UTF-8, of the specified monitor.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor to query. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The UTF-8 encoded name of the monitor, or <code>NULL</code> if an error occurred.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The returned string is allocated and freed by GLFW. You should not free it yourself. </dd></dl>
</div>
</div>
<a class="anchor" id="gaa2d6107f4a35771b99812d1260c6056d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void glfwGetMonitorPhysicalSize </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> * </td>
<td class="paramname"><em>monitor</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int * </td>
<td class="paramname"><em>width</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int * </td>
<td class="paramname"><em>height</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function returns the size, in millimetres, of the display area of the specified monitor.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor to query. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">width</td><td>Where to store the width, in mm, of the monitor's display area, or <code>NULL</code>. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">height</td><td>Where to store the height, in mm, of the monitor's display area, or <code>NULL</code>.</td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>Some operating systems do not provide accurate information, either because the monitor's EDID data is incorrect, or because the driver does not report it accurately. </dd></dl>
</div>
</div>
<a class="anchor" id="ga102f54e7acc9149edbcf0997152df8c9"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void glfwGetMonitorPos </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> * </td>
<td class="paramname"><em>monitor</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int * </td>
<td class="paramname"><em>xpos</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int * </td>
<td class="paramname"><em>ypos</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function returns the position, in screen coordinates, of the upper-left corner of the specified monitor.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor to query. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">xpos</td><td>Where to store the monitor x-coordinate, or <code>NULL</code>. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">ypos</td><td>Where to store the monitor y-coordinate, or <code>NULL</code>. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga3fba51c8bd36491d4712aa5bd074a537"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a>** glfwGetMonitors </td>
<td>(</td>
<td class="paramtype">int * </td>
<td class="paramname"><em>count</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function returns an array of handles for all currently connected monitors.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[out]</td><td class="paramname">count</td><td>Where to store the size of the returned array. This is set to zero if an error occurred. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An array of monitor handles, or <code>NULL</code> if an error occurred.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The returned array is allocated and freed by GLFW. You should not free it yourself.</dd>
<dd>
The returned array is valid only until the monitor configuration changes. See <a class="el" href="group__monitor.html#gac3fe0f647f68b731f99756cd81897378">glfwSetMonitorCallback</a> to receive notifications of configuration changes.</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__monitor.html#ga721867d84c6d18d6790d64d2847ca0b1" title="Returns the primary monitor.">glfwGetPrimaryMonitor</a> </dd></dl>
</div>
</div>
<a class="anchor" id="ga721867d84c6d18d6790d64d2847ca0b1"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a>* glfwGetPrimaryMonitor </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function returns the primary monitor. This is usually the monitor where elements like the Windows task bar or the OS X menu bar is located.</p>
<dl class="section return"><dt>Returns</dt><dd>The primary monitor, or <code>NULL</code> if an error occurred.</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__monitor.html#ga3fba51c8bd36491d4712aa5bd074a537" title="Returns the currently connected monitors.">glfwGetMonitors</a> </dd></dl>
</div>
</div>
<a class="anchor" id="gafc1bb972a921ad5b3bd5d63a95fc2d52"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="structGLFWvidmode.html">GLFWvidmode</a>* glfwGetVideoMode </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> * </td>
<td class="paramname"><em>monitor</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function returns the current video mode of the specified monitor. If you are using a full screen window, the return value will therefore depend on whether it is focused.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor to query. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The current mode of the monitor, or <code>NULL</code> if an error occurred.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The returned struct is allocated and freed by GLFW. You should not free it yourself.</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__monitor.html#ga820b0ce9a5237d645ea7cbb4bd383458" title="Returns the available video modes for the specified monitor.">glfwGetVideoModes</a> </dd></dl>
</div>
</div>
<a class="anchor" id="ga820b0ce9a5237d645ea7cbb4bd383458"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="structGLFWvidmode.html">GLFWvidmode</a>* glfwGetVideoModes </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> * </td>
<td class="paramname"><em>monitor</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int * </td>
<td class="paramname"><em>count</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function returns an array of all video modes supported by the specified monitor. The returned array is sorted in ascending order, first by color bit depth (the sum of all channel depths) and then by resolution area (the product of width and height).</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor to query. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">count</td><td>Where to store the number of video modes in the returned array. This is set to zero if an error occurred. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An array of video modes, or <code>NULL</code> if an error occurred.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The returned array is allocated and freed by GLFW. You should not free it yourself.</dd>
<dd>
The returned array is valid only until this function is called again for the specified monitor.</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__monitor.html#gafc1bb972a921ad5b3bd5d63a95fc2d52" title="Returns the current mode of the specified monitor.">glfwGetVideoMode</a> </dd></dl>
</div>
</div>
<a class="anchor" id="ga6ac582625c990220785ddd34efa3169a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void glfwSetGamma </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> * </td>
<td class="paramname"><em>monitor</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float </td>
<td class="paramname"><em>gamma</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function generates a 256-element gamma ramp from the specified exponent and then calls <a class="el" href="group__monitor.html#ga583f0ffd0d29613d8cd172b996bbf0dd">glfwSetGammaRamp</a> with it.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor whose gamma ramp to set. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">gamma</td><td>The desired exponent. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga583f0ffd0d29613d8cd172b996bbf0dd"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void glfwSetGammaRamp </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> * </td>
<td class="paramname"><em>monitor</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structGLFWgammaramp.html">GLFWgammaramp</a> * </td>
<td class="paramname"><em>ramp</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function sets the current gamma ramp for the specified monitor.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor whose gamma ramp to set. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">ramp</td><td>The gamma ramp to use.</td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>Gamma ramp sizes other than 256 are not supported by all hardware. </dd></dl>
</div>
</div>
<a class="anchor" id="gac3fe0f647f68b731f99756cd81897378"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__monitor.html#ga67b74af6cecfdbccc7e57a6319a57210">GLFWmonitorfun</a> glfwSetMonitorCallback </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__monitor.html#ga67b74af6cecfdbccc7e57a6319a57210">GLFWmonitorfun</a> </td>
<td class="paramname"><em>cbfun</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function sets the monitor configuration callback, or removes the currently set callback. This is called when a monitor is connected to or disconnected from the system.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">cbfun</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or an error occurred.</dd></dl>
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000001">Bug:</a></b></dt><dd><b>X11:</b> This callback is not yet called on monitor configuration changes.</dd></dl>
</div>
</div>
</div><!-- contents -->
<address class="footer">
<p>
Last update on Tue Dec 31 2013 for GLFW 3.0.4
</p>
</address>
</body>
</html>
|