aboutsummaryrefslogtreecommitdiffstats
path: root/window_8hpp_source.html
blob: 67348d764a6dbfa89f09d54d3150981ad04750a5 (plain)
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
<!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.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>YAGE: include/YAGE/window.hpp Source File</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="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">YAGE
   &#160;<span id="projectnumber">0.02</span>
   </div>
   <div id="projectbrief">Yet Another Game Engine</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('window_8hpp_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</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="headertitle">
<div class="title">window.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="window_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/* ----------------------------------------------------------------------------</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * window.hpp</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Copyright (c) 2017 Yann Herklotz Grave &lt;ymherklotz@gmail.com&gt; -- MIT License</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * See file LICENSE for more details</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * ----------------------------------------------------------------------------</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#ifndef WINDOW_HPP</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#define WINDOW_HPP</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &lt;SDL2/SDL.h&gt;</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceyage.html">yage</a> {</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment">// window flags that can change it&#39;s appearance</span></div><div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="namespaceyage.html#a09d41deeced5fca5df9dc680c9e77c38">   19</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="namespaceyage.html#a09d41deeced5fca5df9dc680c9e77c38">WindowFlags</a> : <span class="keywordtype">unsigned</span> {</div><div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="namespaceyage.html#a09d41deeced5fca5df9dc680c9e77c38a7c4273d3feb1dc60a55a74c37c3fddd6">   20</a></span>&#160;    <a class="code" href="namespaceyage.html#a09d41deeced5fca5df9dc680c9e77c38a7c4273d3feb1dc60a55a74c37c3fddd6">SHOWN</a> = 0x1,</div><div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="namespaceyage.html#a09d41deeced5fca5df9dc680c9e77c38af7a4d995b268c416a6e01b8dc1555648">   21</a></span>&#160;    <a class="code" href="namespaceyage.html#a09d41deeced5fca5df9dc680c9e77c38af7a4d995b268c416a6e01b8dc1555648">HIDDEN</a> = 0x2,</div><div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="namespaceyage.html#a09d41deeced5fca5df9dc680c9e77c38a409ae568f380139ffa38d7fffa5ffb2f">   22</a></span>&#160;    <a class="code" href="namespaceyage.html#a09d41deeced5fca5df9dc680c9e77c38a409ae568f380139ffa38d7fffa5ffb2f">FULLSCREEN</a> = 0x4,</div><div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="namespaceyage.html#a09d41deeced5fca5df9dc680c9e77c38afa8ece0eef17c604369ca69bc4b09970">   23</a></span>&#160;    <a class="code" href="namespaceyage.html#a09d41deeced5fca5df9dc680c9e77c38afa8ece0eef17c604369ca69bc4b09970">BORDERLESS</a> = 0x8,</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;};</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment">// window wrapper around SDL_Window pointer</span></div><div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="classyage_1_1Window.html">   27</a></span>&#160;<span class="keyword">class </span><a class="code" href="classyage_1_1Window.html">Window</a> {</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="classyage_1_1Window.html#acebbf824fbe3bb6afa32f2f33817050b">   30</a></span>&#160;    SDL_Window* <a class="code" href="classyage_1_1Window.html#acebbf824fbe3bb6afa32f2f33817050b">window_</a> = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    <a class="code" href="classyage_1_1Window.html#a7d7bd2f22e095df387e8b5cda2bb484e">Window</a>();</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    <a class="code" href="classyage_1_1Window.html#a7d7bd2f22e095df387e8b5cda2bb484e">Window</a>(<span class="keyword">const</span> <a class="code" href="classyage_1_1Window.html">Window</a>&amp;) = <span class="keyword">delete</span>;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    <a class="code" href="classyage_1_1Window.html#a7d7bd2f22e095df387e8b5cda2bb484e">Window</a>(<a class="code" href="classyage_1_1Window.html">Window</a>&amp;&amp;) = <span class="keyword">delete</span>;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    <a class="code" href="classyage_1_1Window.html#a9a8dd109e145c459e52abb3a8861e3a0">~Window</a>();</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    <a class="code" href="classyage_1_1Window.html">Window</a>&amp; <a class="code" href="classyage_1_1Window.html#a5247a4164bf0006fe9f034cd27c5b6db">operator=</a>(<span class="keyword">const</span> <a class="code" href="classyage_1_1Window.html">Window</a>&amp;) = <span class="keyword">delete</span>;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    <a class="code" href="classyage_1_1Window.html">Window</a>&amp; <a class="code" href="classyage_1_1Window.html#a5247a4164bf0006fe9f034cd27c5b6db">operator=</a>(<a class="code" href="classyage_1_1Window.html">Window</a>&amp;&amp;) = <span class="keyword">delete</span>;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classyage_1_1Window.html#abfb5ae5e5abf22133e59097fc8aae5fe">create</a>(<span class="keyword">const</span> std::string&amp; window_name, <span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height,</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;                <span class="keywordtype">unsigned</span> flags = <a class="code" href="namespaceyage.html#a09d41deeced5fca5df9dc680c9e77c38a7c4273d3feb1dc60a55a74c37c3fddd6">WindowFlags::SHOWN</a>);</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classyage_1_1Window.html#a86d0aa8e9896850b9acfc720b5615359">swapBuffer</a>();</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classyage_1_1Window.html#a98e2a33820ad63b2c94c56e203ff6e58">clearBuffer</a>();</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;};</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;}  <span class="comment">// namespace yage</span></div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="namespaceyage_html_a09d41deeced5fca5df9dc680c9e77c38af7a4d995b268c416a6e01b8dc1555648"><div class="ttname"><a href="namespaceyage.html#a09d41deeced5fca5df9dc680c9e77c38af7a4d995b268c416a6e01b8dc1555648">yage::HIDDEN</a></div><div class="ttdef"><b>Definition:</b> window.hpp:21</div></div>
<div class="ttc" id="classyage_1_1Window_html_a7d7bd2f22e095df387e8b5cda2bb484e"><div class="ttname"><a href="classyage_1_1Window.html#a7d7bd2f22e095df387e8b5cda2bb484e">yage::Window::Window</a></div><div class="ttdeci">Window()</div></div>
<div class="ttc" id="classyage_1_1Window_html_a86d0aa8e9896850b9acfc720b5615359"><div class="ttname"><a href="classyage_1_1Window.html#a86d0aa8e9896850b9acfc720b5615359">yage::Window::swapBuffer</a></div><div class="ttdeci">void swapBuffer()</div><div class="ttdoc">swap the buffer </div><div class="ttdef"><b>Definition:</b> window.cpp:68</div></div>
<div class="ttc" id="classyage_1_1Window_html"><div class="ttname"><a href="classyage_1_1Window.html">yage::Window</a></div><div class="ttdef"><b>Definition:</b> window.hpp:27</div></div>
<div class="ttc" id="classyage_1_1Window_html_abfb5ae5e5abf22133e59097fc8aae5fe"><div class="ttname"><a href="classyage_1_1Window.html#abfb5ae5e5abf22133e59097fc8aae5fe">yage::Window::create</a></div><div class="ttdeci">void create(const std::string &amp;window_name, int width, int height, unsigned flags=WindowFlags::SHOWN)</div><div class="ttdoc">create the window, initialize the handle and update the width and height </div><div class="ttdef"><b>Definition:</b> window.cpp:22</div></div>
<div class="ttc" id="namespaceyage_html_a09d41deeced5fca5df9dc680c9e77c38a409ae568f380139ffa38d7fffa5ffb2f"><div class="ttname"><a href="namespaceyage.html#a09d41deeced5fca5df9dc680c9e77c38a409ae568f380139ffa38d7fffa5ffb2f">yage::FULLSCREEN</a></div><div class="ttdef"><b>Definition:</b> window.hpp:22</div></div>
<div class="ttc" id="namespaceyage_html_a09d41deeced5fca5df9dc680c9e77c38"><div class="ttname"><a href="namespaceyage.html#a09d41deeced5fca5df9dc680c9e77c38">yage::WindowFlags</a></div><div class="ttdeci">WindowFlags</div><div class="ttdef"><b>Definition:</b> window.hpp:19</div></div>
<div class="ttc" id="classyage_1_1Window_html_acebbf824fbe3bb6afa32f2f33817050b"><div class="ttname"><a href="classyage_1_1Window.html#acebbf824fbe3bb6afa32f2f33817050b">yage::Window::window_</a></div><div class="ttdeci">SDL_Window * window_</div><div class="ttdoc">window handle </div><div class="ttdef"><b>Definition:</b> window.hpp:30</div></div>
<div class="ttc" id="classyage_1_1Window_html_a9a8dd109e145c459e52abb3a8861e3a0"><div class="ttname"><a href="classyage_1_1Window.html#a9a8dd109e145c459e52abb3a8861e3a0">yage::Window::~Window</a></div><div class="ttdeci">~Window()</div><div class="ttdoc">destroys the window handle </div><div class="ttdef"><b>Definition:</b> window.cpp:20</div></div>
<div class="ttc" id="namespaceyage_html_a09d41deeced5fca5df9dc680c9e77c38a7c4273d3feb1dc60a55a74c37c3fddd6"><div class="ttname"><a href="namespaceyage.html#a09d41deeced5fca5df9dc680c9e77c38a7c4273d3feb1dc60a55a74c37c3fddd6">yage::SHOWN</a></div><div class="ttdef"><b>Definition:</b> window.hpp:20</div></div>
<div class="ttc" id="classyage_1_1Window_html_a98e2a33820ad63b2c94c56e203ff6e58"><div class="ttname"><a href="classyage_1_1Window.html#a98e2a33820ad63b2c94c56e203ff6e58">yage::Window::clearBuffer</a></div><div class="ttdeci">void clearBuffer()</div><div class="ttdoc">clear buffer </div><div class="ttdef"><b>Definition:</b> window.cpp:73</div></div>
<div class="ttc" id="namespaceyage_html"><div class="ttname"><a href="namespaceyage.html">yage</a></div><div class="ttdoc">Templated matrix class. </div><div class="ttdef"><b>Definition:</b> camera2d.hpp:17</div></div>
<div class="ttc" id="classyage_1_1Window_html_a5247a4164bf0006fe9f034cd27c5b6db"><div class="ttname"><a href="classyage_1_1Window.html#a5247a4164bf0006fe9f034cd27c5b6db">yage::Window::operator=</a></div><div class="ttdeci">Window &amp; operator=(const Window &amp;)=delete</div></div>
<div class="ttc" id="namespaceyage_html_a09d41deeced5fca5df9dc680c9e77c38afa8ece0eef17c604369ca69bc4b09970"><div class="ttname"><a href="namespaceyage.html#a09d41deeced5fca5df9dc680c9e77c38afa8ece0eef17c604369ca69bc4b09970">yage::BORDERLESS</a></div><div class="ttdef"><b>Definition:</b> window.hpp:23</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_f562165b51c585c003877be645f219b5.html">YAGE</a></li><li class="navelem"><a class="el" href="window_8hpp.html">window.hpp</a></li>
    <li class="footer">Generated on Wed Aug 23 2017 23:02:53 for YAGE by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>