update doc
[apps/agl-service-homescreen.git] / doc / api-ref / latex / de / da4 / simple-egl_8cpp.tex
1 \hypertarget{simple-egl_8cpp}{}\section{libhomescreen/simple-\/egl.cpp File Reference}
2 \label{simple-egl_8cpp}\index{libhomescreen/simple-\/egl.\+cpp@{libhomescreen/simple-\/egl.\+cpp}}
3 {\ttfamily \#include $<$mutex$>$}\\*
4 {\ttfamily \#include $<$chrono$>$}\\*
5 {\ttfamily \#include $<$iostream$>$}\\*
6 {\ttfamily \#include $<$string$>$}\\*
7 {\ttfamily \#include $<$stdarg.\+h$>$}\\*
8 {\ttfamily \#include $<$sys/types.\+h$>$}\\*
9 {\ttfamily \#include $<$thread$>$}\\*
10 {\ttfamily \#include $<$exception$>$}\\*
11 {\ttfamily \#include $<$vector$>$}\\*
12 {\ttfamily \#include $<$sstream$>$}\\*
13 {\ttfamily \#include $<$assert.\+h$>$}\\*
14 {\ttfamily \#include $<$signal.\+h$>$}\\*
15 {\ttfamily \#include $<$wayland-\/client.\+h$>$}\\*
16 {\ttfamily \#include $<$wayland-\/egl.\+h$>$}\\*
17 {\ttfamily \#include $<$G\+L\+E\+S2/gl2.\+h$>$}\\*
18 {\ttfamily \#include $<$E\+G\+L/egl.\+h$>$}\\*
19 {\ttfamily \#include $<$E\+G\+L/eglext.\+h$>$}\\*
20 {\ttfamily \#include $<$unistd.\+h$>$}\\*
21 {\ttfamily \#include $<$time.\+h$>$}\\*
22 {\ttfamily \#include $<$libwindowmanager.\+h$>$}\\*
23 {\ttfamily \#include $<$libhomescreen.\+hpp$>$}\\*
24 {\ttfamily \#include $<$ilm/ivi-\/application-\/client-\/protocol.\+h$>$}\\*
25 {\ttfamily \#include \char`\"{}hmi-\/debug.\+h\char`\"{}}\\*
26 {\ttfamily \#include \char`\"{}platform.\+h\char`\"{}}\\*
27 \subsection*{Classes}
28 \begin{DoxyCompactItemize}
29 \item 
30 struct \hyperlink{structdisplay}{display}
31 \item 
32 struct \hyperlink{structgeometry}{geometry}
33 \item 
34 struct \hyperlink{structwindow}{window}
35 \end{DoxyCompactItemize}
36 \subsection*{Macros}
37 \begin{DoxyCompactItemize}
38 \item 
39 \#define \hyperlink{simple-egl_8cpp_a083d37f289b99270e0391419178d458f}{E\+G\+L\+\_\+\+E\+X\+T\+\_\+swap\+\_\+buffers\+\_\+with\+\_\+damage}~1
40 \item 
41 \#define \hyperlink{simple-egl_8cpp_a0792e3d8b2bc978f95917a234b0c81df}{E\+G\+L\+\_\+\+E\+X\+T\+\_\+buffer\+\_\+age}~1
42 \item 
43 \#define \hyperlink{simple-egl_8cpp_a7045d8a6b4857f268a62fab2de2021fd}{E\+G\+L\+\_\+\+B\+U\+F\+F\+E\+R\+\_\+\+A\+G\+E\+\_\+\+E\+XT}~0x313D
44 \end{DoxyCompactItemize}
45 \subsection*{Typedefs}
46 \begin{DoxyCompactItemize}
47 \item 
48 typedef E\+G\+L\+Surface \hyperlink{simple-egl_8cpp_a0720952aa1caded45b5bcdce589663a9}{surface}
49 \item 
50 typedef E\+G\+L\+Surface E\+G\+Lint $\ast$ \hyperlink{simple-egl_8cpp_a56616f7ca3fc53c0da41d05de9330b11}{rects}
51 \item 
52 typedef E\+G\+L\+Surface E\+G\+Lint E\+G\+Lint \hyperlink{simple-egl_8cpp_aa6a11810244355f89e6c4961b9dd3b53}{n\+\_\+rects}
53 \end{DoxyCompactItemize}
54 \subsection*{Functions}
55 \begin{DoxyCompactItemize}
56 \item 
57 typedef \hyperlink{simple-egl_8cpp_ab4ad070d3bf82abe5e70330578f67893}{E\+G\+L\+Boolean} (E\+G\+L\+A\+P\+I\+E\+N\+T\+R\+YP P\+F\+N\+E\+G\+L\+S\+W\+A\+P\+B\+U\+F\+F\+E\+R\+S\+W\+I\+T\+H\+D\+A\+M\+A\+G\+E\+E\+X\+T\+P\+R\+OC)(E\+G\+L\+Display dpy
58 \item 
59 static void \hyperlink{simple-egl_8cpp_a1073d4aca1838d3877fe577d813700fc}{init\+\_\+egl} (struct \hyperlink{structdisplay}{display} $\ast$\hyperlink{structdisplay}{display}, struct \hyperlink{structwindow}{window} $\ast$\hyperlink{structwindow}{window})
60 \item 
61 static void \hyperlink{simple-egl_8cpp_a4f71f46ede5b73bd7c770c973826f771}{fini\+\_\+egl} (struct \hyperlink{structdisplay}{display} $\ast$\hyperlink{structdisplay}{display})
62 \item 
63 static G\+Luint \hyperlink{simple-egl_8cpp_ab72c580e4d6d47c2fb49c72cc76b85bb}{create\+\_\+shader} (struct \hyperlink{structwindow}{window} $\ast$\hyperlink{structwindow}{window}, const char $\ast$source, G\+Lenum shader\+\_\+type)
64 \item 
65 static void \hyperlink{simple-egl_8cpp_ab3ee863fa45f4026f78f592d6f6e34ff}{init\+\_\+gl} (struct \hyperlink{structwindow}{window} $\ast$\hyperlink{structwindow}{window})
66 \item 
67 static void \hyperlink{simple-egl_8cpp_a0122201fe28a7f35b0fbd362fff7094e}{create\+\_\+ivi\+\_\+surface} (struct \hyperlink{structwindow}{window} $\ast$\hyperlink{structwindow}{window}, struct \hyperlink{structdisplay}{display} $\ast$\hyperlink{structdisplay}{display})
68 \item 
69 static void \hyperlink{simple-egl_8cpp_a83c7f2e34bbc715d97f0642def708293}{create\+\_\+surface} (struct \hyperlink{structwindow}{window} $\ast$\hyperlink{structwindow}{window})
70 \item 
71 static void \hyperlink{simple-egl_8cpp_aba2ea9aa51701e52d4f36b4f34cecf7a}{destroy\+\_\+surface} (struct \hyperlink{structwindow}{window} $\ast$\hyperlink{structwindow}{window})
72 \item 
73 static void \hyperlink{simple-egl_8cpp_a927502f6103ec35422eead39e62ab7ba}{redraw} (void $\ast$data, struct wl\+\_\+callback $\ast$callback, uint32\+\_\+t time)
74 \item 
75 static void \hyperlink{simple-egl_8cpp_af288e02a94c196a68b327fc55c049932}{registry\+\_\+handle\+\_\+global} (void $\ast$data, struct wl\+\_\+registry $\ast$registry, uint32\+\_\+t name, const char $\ast$interface, uint32\+\_\+t version)
76 \item 
77 static void \hyperlink{simple-egl_8cpp_a59a731b9efa9d6a2015cdc8ccae1db80}{registry\+\_\+handle\+\_\+global\+\_\+remove} (void $\ast$data, struct wl\+\_\+registry $\ast$registry, uint32\+\_\+t name)
78 \item 
79 static void \hyperlink{simple-egl_8cpp_a2cfc8c2d3fc1273ba8f811d2e639aec8}{signal\+\_\+int} (int signum)
80 \item 
81 int \hyperlink{simple-egl_8cpp_a644e25276ecdea04f2aa3412c1973927}{init\+\_\+wm} (Lib\+Windowmanager $\ast$\hyperlink{simple-egl_8cpp_ad1513698e07197206c290f94d7669d85}{wm}, struct \hyperlink{structwindow}{window} $\ast$\hyperlink{structwindow}{window})
82 \item 
83 int \hyperlink{simple-egl_8cpp_a79aafeb99915566dd3970246f465f306}{init\+\_\+hs} (\hyperlink{class_lib_home_screen}{Lib\+Home\+Screen} $\ast$\hyperlink{simple-egl_8cpp_a529acbd1fed9d98a587edfa62309fa8d}{hs})
84 \item 
85 int \hyperlink{simple-egl_8cpp_a3c04138a5bfe5d72780bb7e82a18e627}{main} (int argc, char $\ast$$\ast$argv)
86 \end{DoxyCompactItemize}
87 \subsection*{Variables}
88 \begin{DoxyCompactItemize}
89 \item 
90 const char $\ast$ \hyperlink{simple-egl_8cpp_a894f18168fa25101d792262f59846938}{log\+\_\+prefix} = \char`\"{}simple-\/egl\char`\"{}
91 \item 
92 uint32\+\_\+t \hyperlink{simple-egl_8cpp_a28f56c9f01ed9f108201950645317cc9}{g\+\_\+id\+\_\+ivisurf} = 9009
93 \item 
94 long \hyperlink{simple-egl_8cpp_a300b6806fe6818927fe4df08f2398124}{port} = 1700
95 \item 
96 string \hyperlink{simple-egl_8cpp_a623ef6987ef3bd185c07b28b13e46d34}{token} = string(\char`\"{}wm\char`\"{})
97 \item 
98 string \hyperlink{simple-egl_8cpp_a0da928eccfc57d1dfadfd29d4ac4854c}{app\+\_\+name} = string(\char`\"{}Navigation\char`\"{})
99 \item 
100 const char $\ast$ \hyperlink{simple-egl_8cpp_a332251aa739a56836cd4fbf3ecbb8bb2}{main\+\_\+role} = \char`\"{}navigation\char`\"{}
101 \item 
102 \hyperlink{class_lib_home_screen}{Lib\+Home\+Screen} $\ast$ \hyperlink{simple-egl_8cpp_a529acbd1fed9d98a587edfa62309fa8d}{hs}
103 \item 
104 Lib\+Windowmanager $\ast$ \hyperlink{simple-egl_8cpp_ad1513698e07197206c290f94d7669d85}{wm}
105 \item 
106 static const struct wl\+\_\+interface $\ast$ \hyperlink{simple-egl_8cpp_aea3203db9e218d3e5d60bdb4ebe2fa1f}{types} \mbox{[}$\,$\mbox{]}
107 \item 
108 static const struct wl\+\_\+message \hyperlink{simple-egl_8cpp_ada80120c5590d2821da9babef808b98d}{ivi\+\_\+surface\+\_\+requests} \mbox{[}$\,$\mbox{]}
109 \item 
110 static const struct wl\+\_\+message \hyperlink{simple-egl_8cpp_ac848f4fbf712a9ba414272fa85577791}{ivi\+\_\+surface\+\_\+events} \mbox{[}$\,$\mbox{]}
111 \item 
112 const struct wl\+\_\+interface \hyperlink{simple-egl_8cpp_adf384de8d12d2edd7265ab85fd16b11c}{ivi\+\_\+surface\+\_\+interface}
113 \item 
114 static const struct wl\+\_\+message \hyperlink{simple-egl_8cpp_a21a39b7c6cf5f6d10a62a70b3ebc9bad}{ivi\+\_\+application\+\_\+requests} \mbox{[}$\,$\mbox{]}
115 \item 
116 const struct wl\+\_\+interface \hyperlink{simple-egl_8cpp_a769b65b7b0e834f732f1f45e835890d5}{ivi\+\_\+application\+\_\+interface}
117 \item 
118 static const char $\ast$ \hyperlink{simple-egl_8cpp_a717575939a37d84dcd4cf0447a630834}{vert\+\_\+shader\+\_\+text}
119 \item 
120 static const char $\ast$ \hyperlink{simple-egl_8cpp_ab5a6a2a26ac23f79b1687daa4b0d8980}{frag\+\_\+shader\+\_\+text}
121 \item 
122 static int \hyperlink{simple-egl_8cpp_a2f45113638a0b749a8a205d2cd7fb42b}{running} = 1
123 \item 
124 static const struct wl\+\_\+registry\+\_\+listener \hyperlink{simple-egl_8cpp_a8998c87c94cd7d185e8f0cdafab4b1c4}{registry\+\_\+listener}
125 \end{DoxyCompactItemize}
126
127
128 \subsection{Macro Definition Documentation}
129 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!E\+G\+L\+\_\+\+B\+U\+F\+F\+E\+R\+\_\+\+A\+G\+E\+\_\+\+E\+XT@{E\+G\+L\+\_\+\+B\+U\+F\+F\+E\+R\+\_\+\+A\+G\+E\+\_\+\+E\+XT}}
130 \index{E\+G\+L\+\_\+\+B\+U\+F\+F\+E\+R\+\_\+\+A\+G\+E\+\_\+\+E\+XT@{E\+G\+L\+\_\+\+B\+U\+F\+F\+E\+R\+\_\+\+A\+G\+E\+\_\+\+E\+XT}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
131 \subsubsection[{\texorpdfstring{E\+G\+L\+\_\+\+B\+U\+F\+F\+E\+R\+\_\+\+A\+G\+E\+\_\+\+E\+XT}{EGL_BUFFER_AGE_EXT}}]{\setlength{\rightskip}{0pt plus 5cm}\#define E\+G\+L\+\_\+\+B\+U\+F\+F\+E\+R\+\_\+\+A\+G\+E\+\_\+\+E\+XT~0x313D}\hypertarget{simple-egl_8cpp_a7045d8a6b4857f268a62fab2de2021fd}{}\label{simple-egl_8cpp_a7045d8a6b4857f268a62fab2de2021fd}
132
133
134 Definition at line 110 of file simple-\/egl.\+cpp.
135
136 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!E\+G\+L\+\_\+\+E\+X\+T\+\_\+buffer\+\_\+age@{E\+G\+L\+\_\+\+E\+X\+T\+\_\+buffer\+\_\+age}}
137 \index{E\+G\+L\+\_\+\+E\+X\+T\+\_\+buffer\+\_\+age@{E\+G\+L\+\_\+\+E\+X\+T\+\_\+buffer\+\_\+age}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
138 \subsubsection[{\texorpdfstring{E\+G\+L\+\_\+\+E\+X\+T\+\_\+buffer\+\_\+age}{EGL_EXT_buffer_age}}]{\setlength{\rightskip}{0pt plus 5cm}\#define E\+G\+L\+\_\+\+E\+X\+T\+\_\+buffer\+\_\+age~1}\hypertarget{simple-egl_8cpp_a0792e3d8b2bc978f95917a234b0c81df}{}\label{simple-egl_8cpp_a0792e3d8b2bc978f95917a234b0c81df}
139
140
141 Definition at line 109 of file simple-\/egl.\+cpp.
142
143 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!E\+G\+L\+\_\+\+E\+X\+T\+\_\+swap\+\_\+buffers\+\_\+with\+\_\+damage@{E\+G\+L\+\_\+\+E\+X\+T\+\_\+swap\+\_\+buffers\+\_\+with\+\_\+damage}}
144 \index{E\+G\+L\+\_\+\+E\+X\+T\+\_\+swap\+\_\+buffers\+\_\+with\+\_\+damage@{E\+G\+L\+\_\+\+E\+X\+T\+\_\+swap\+\_\+buffers\+\_\+with\+\_\+damage}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
145 \subsubsection[{\texorpdfstring{E\+G\+L\+\_\+\+E\+X\+T\+\_\+swap\+\_\+buffers\+\_\+with\+\_\+damage}{EGL_EXT_swap_buffers_with_damage}}]{\setlength{\rightskip}{0pt plus 5cm}\#define E\+G\+L\+\_\+\+E\+X\+T\+\_\+swap\+\_\+buffers\+\_\+with\+\_\+damage~1}\hypertarget{simple-egl_8cpp_a083d37f289b99270e0391419178d458f}{}\label{simple-egl_8cpp_a083d37f289b99270e0391419178d458f}
146
147
148 Definition at line 104 of file simple-\/egl.\+cpp.
149
150
151
152 \subsection{Typedef Documentation}
153 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!n\+\_\+rects@{n\+\_\+rects}}
154 \index{n\+\_\+rects@{n\+\_\+rects}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
155 \subsubsection[{\texorpdfstring{n\+\_\+rects}{n_rects}}]{\setlength{\rightskip}{0pt plus 5cm}typedef E\+G\+L\+Surface E\+G\+Lint E\+G\+Lint {\bf n\+\_\+rects}}\hypertarget{simple-egl_8cpp_aa6a11810244355f89e6c4961b9dd3b53}{}\label{simple-egl_8cpp_aa6a11810244355f89e6c4961b9dd3b53}
156
157
158 Definition at line 105 of file simple-\/egl.\+cpp.
159
160 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!rects@{rects}}
161 \index{rects@{rects}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
162 \subsubsection[{\texorpdfstring{rects}{rects}}]{\setlength{\rightskip}{0pt plus 5cm}typedef E\+G\+L\+Surface E\+G\+Lint$\ast$ {\bf rects}}\hypertarget{simple-egl_8cpp_a56616f7ca3fc53c0da41d05de9330b11}{}\label{simple-egl_8cpp_a56616f7ca3fc53c0da41d05de9330b11}
163
164
165 Definition at line 105 of file simple-\/egl.\+cpp.
166
167 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!surface@{surface}}
168 \index{surface@{surface}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
169 \subsubsection[{\texorpdfstring{surface}{surface}}]{\setlength{\rightskip}{0pt plus 5cm}typedef E\+G\+L\+Surface {\bf surface}}\hypertarget{simple-egl_8cpp_a0720952aa1caded45b5bcdce589663a9}{}\label{simple-egl_8cpp_a0720952aa1caded45b5bcdce589663a9}
170
171
172 Definition at line 105 of file simple-\/egl.\+cpp.
173
174
175
176 \subsection{Function Documentation}
177 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!create\+\_\+ivi\+\_\+surface@{create\+\_\+ivi\+\_\+surface}}
178 \index{create\+\_\+ivi\+\_\+surface@{create\+\_\+ivi\+\_\+surface}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
179 \subsubsection[{\texorpdfstring{create\+\_\+ivi\+\_\+surface(struct window $\ast$window, struct display $\ast$display)}{create_ivi_surface(struct window *window, struct display *display)}}]{\setlength{\rightskip}{0pt plus 5cm}static void create\+\_\+ivi\+\_\+surface (
180 \begin{DoxyParamCaption}
181 \item[{struct {\bf window} $\ast$}]{window, }
182 \item[{struct {\bf display} $\ast$}]{display}
183 \end{DoxyParamCaption}
184 )\hspace{0.3cm}{\ttfamily [static]}}\hypertarget{simple-egl_8cpp_a0122201fe28a7f35b0fbd362fff7094e}{}\label{simple-egl_8cpp_a0122201fe28a7f35b0fbd362fff7094e}
185
186
187 Definition at line 322 of file simple-\/egl.\+cpp.
188
189
190 \begin{DoxyCode}
191 323 \{
192 324     uint32\_t id\_ivisurf = \hyperlink{simple-egl_8cpp_a28f56c9f01ed9f108201950645317cc9}{g\_id\_ivisurf};
193 325     window->\hyperlink{structwindow_a40e2c6fb4178953c820fc1b9f41d4b31}{ivi\_surface} =
194 326         ivi\_application\_surface\_create(display->\hyperlink{structdisplay_a24c073faff3bb4799c2d46291f27ab89}{ivi\_application},
195 327                            id\_ivisurf, window->\hyperlink{structwindow_a7d0790cfc7c30621611fa26ab5c1ae97}{surface});
196 328 
197 329     \textcolor{keywordflow}{if} (window->\hyperlink{structwindow_a40e2c6fb4178953c820fc1b9f41d4b31}{ivi\_surface} == NULL) \{
198 330         \hyperlink{include_2hmi-debug_8h_a65bb6c7cfe38f8a724beab5059d36fb2}{HMI\_ERROR}(\hyperlink{simple-egl_8cpp_a894f18168fa25101d792262f59846938}{log\_prefix},\textcolor{stringliteral}{"Failed to create ivi\_client\_surface"});
199 331         abort();
200 332     \}
201 333 
202 334 \}
203 \end{DoxyCode}
204 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!create\+\_\+shader@{create\+\_\+shader}}
205 \index{create\+\_\+shader@{create\+\_\+shader}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
206 \subsubsection[{\texorpdfstring{create\+\_\+shader(struct window $\ast$window, const char $\ast$source, G\+Lenum shader\+\_\+type)}{create_shader(struct window *window, const char *source, GLenum shader_type)}}]{\setlength{\rightskip}{0pt plus 5cm}static G\+Luint create\+\_\+shader (
207 \begin{DoxyParamCaption}
208 \item[{struct {\bf window} $\ast$}]{window, }
209 \item[{const char $\ast$}]{source, }
210 \item[{G\+Lenum}]{shader\+\_\+type}
211 \end{DoxyParamCaption}
212 )\hspace{0.3cm}{\ttfamily [static]}}\hypertarget{simple-egl_8cpp_ab72c580e4d6d47c2fb49c72cc76b85bb}{}\label{simple-egl_8cpp_ab72c580e4d6d47c2fb49c72cc76b85bb}
213
214
215 Definition at line 259 of file simple-\/egl.\+cpp.
216
217
218 \begin{DoxyCode}
219 260 \{
220 261     GLuint shader;
221 262     GLint status;
222 263 
223 264     shader = glCreateShader(shader\_type);
224 265     assert(shader != 0);
225 266 
226 267     glShaderSource(shader, 1, (\textcolor{keyword}{const} \textcolor{keywordtype}{char} **) &source, NULL);
227 268     glCompileShader(shader);
228 269 
229 270     glGetShaderiv(shader, GL\_COMPILE\_STATUS, &status);
230 271     \textcolor{keywordflow}{if} (!status) \{
231 272         \textcolor{keywordtype}{char} log[1000];
232 273         GLsizei len;
233 274         glGetShaderInfoLog(shader, 1000, &len, log);
234 275         \hyperlink{include_2hmi-debug_8h_a65bb6c7cfe38f8a724beab5059d36fb2}{HMI\_ERROR}(\hyperlink{simple-egl_8cpp_a894f18168fa25101d792262f59846938}{log\_prefix},\textcolor{stringliteral}{"Error: compiling %s: %*s"},
235 276             shader\_type == GL\_VERTEX\_SHADER ? \textcolor{stringliteral}{"vertex"} : \textcolor{stringliteral}{"fragment"},
236 277             len, log);
237 278         exit(1);
238 279     \}
239 280 
240 281     \textcolor{keywordflow}{return} shader;
241 282 \}
242 \end{DoxyCode}
243 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!create\+\_\+surface@{create\+\_\+surface}}
244 \index{create\+\_\+surface@{create\+\_\+surface}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
245 \subsubsection[{\texorpdfstring{create\+\_\+surface(struct window $\ast$window)}{create_surface(struct window *window)}}]{\setlength{\rightskip}{0pt plus 5cm}static void create\+\_\+surface (
246 \begin{DoxyParamCaption}
247 \item[{struct {\bf window} $\ast$}]{window}
248 \end{DoxyParamCaption}
249 )\hspace{0.3cm}{\ttfamily [static]}}\hypertarget{simple-egl_8cpp_a83c7f2e34bbc715d97f0642def708293}{}\label{simple-egl_8cpp_a83c7f2e34bbc715d97f0642def708293}
250
251
252 Definition at line 337 of file simple-\/egl.\+cpp.
253
254
255 \begin{DoxyCode}
256 338 \{
257 339     \textcolor{keyword}{struct }\hyperlink{structdisplay}{display} *\hyperlink{structdisplay}{display} = window->\hyperlink{structwindow_a129486f2bd23791194f389ca1405cfd4}{display};
258 340     \hyperlink{simple-egl_8cpp_ab4ad070d3bf82abe5e70330578f67893}{EGLBoolean} ret;
259 341 
260 342     window->\hyperlink{structwindow_a7d0790cfc7c30621611fa26ab5c1ae97}{surface} = wl\_compositor\_create\_surface(display->\hyperlink{structdisplay_a41ba32dfde812165dda5b62885000c78}{compositor});
261 343 
262 344     window->\hyperlink{structwindow_ae41be0955d0e73530e1bc13dfeb9d731}{native} =
263 345         wl\_egl\_window\_create(window->\hyperlink{structwindow_a7d0790cfc7c30621611fa26ab5c1ae97}{surface},
264 346                      window->geometry.width,
265 347                      window->geometry.height);
266 348     window->\hyperlink{structwindow_a8de0059f3f1cb0dec33fba1143b7dee1}{egl\_surface} =
267 349         weston\_platform\_create\_egl\_surface(display->\hyperlink{structdisplay_a8b8bc104c19ff228d476a377e572d9c7}{egl}.\hyperlink{structdisplay_a8a1cbda15a286e41e89a85f158ce9311}{dpy},
268 350                            display->\hyperlink{structdisplay_a8b8bc104c19ff228d476a377e572d9c7}{egl}.\hyperlink{structdisplay_a880aef9408b499f5b749541dc6e396c3}{conf},
269 351                            window->\hyperlink{structwindow_ae41be0955d0e73530e1bc13dfeb9d731}{native}, NULL);
270 352 
271 353 
272 354     \textcolor{keywordflow}{if} (display->\hyperlink{structdisplay_a24c073faff3bb4799c2d46291f27ab89}{ivi\_application} ) \{
273 355         \hyperlink{simple-egl_8cpp_a0122201fe28a7f35b0fbd362fff7094e}{create\_ivi\_surface}(window, display);
274 356     \} \textcolor{keywordflow}{else} \{
275 357         assert(0);
276 358     \}
277 359 
278 360     ret = eglMakeCurrent(window->\hyperlink{structwindow_a129486f2bd23791194f389ca1405cfd4}{display}->\hyperlink{structdisplay_a8b8bc104c19ff228d476a377e572d9c7}{egl}.\hyperlink{structdisplay_a8a1cbda15a286e41e89a85f158ce9311}{dpy}, window->
279       \hyperlink{structwindow_a8de0059f3f1cb0dec33fba1143b7dee1}{egl\_surface},
280 361                  window->\hyperlink{structwindow_a8de0059f3f1cb0dec33fba1143b7dee1}{egl\_surface}, window->\hyperlink{structwindow_a129486f2bd23791194f389ca1405cfd4}{display}->\hyperlink{structdisplay_a8b8bc104c19ff228d476a377e572d9c7}{egl}.
281       \hyperlink{structdisplay_a3420940a29a710e0e5ebd41ba462cc00}{ctx});
282 362     assert(ret == EGL\_TRUE);
283 363 
284 364     \textcolor{keywordflow}{if} (!window->\hyperlink{structwindow_a851bcb65083f5ab5ff768b09522bed70}{frame\_sync})
285 365         eglSwapInterval(display->\hyperlink{structdisplay_a8b8bc104c19ff228d476a377e572d9c7}{egl}.\hyperlink{structdisplay_a8a1cbda15a286e41e89a85f158ce9311}{dpy}, 0);
286 366 
287 367 \}
288 \end{DoxyCode}
289 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!destroy\+\_\+surface@{destroy\+\_\+surface}}
290 \index{destroy\+\_\+surface@{destroy\+\_\+surface}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
291 \subsubsection[{\texorpdfstring{destroy\+\_\+surface(struct window $\ast$window)}{destroy_surface(struct window *window)}}]{\setlength{\rightskip}{0pt plus 5cm}static void destroy\+\_\+surface (
292 \begin{DoxyParamCaption}
293 \item[{struct {\bf window} $\ast$}]{window}
294 \end{DoxyParamCaption}
295 )\hspace{0.3cm}{\ttfamily [static]}}\hypertarget{simple-egl_8cpp_aba2ea9aa51701e52d4f36b4f34cecf7a}{}\label{simple-egl_8cpp_aba2ea9aa51701e52d4f36b4f34cecf7a}
296
297
298 Definition at line 370 of file simple-\/egl.\+cpp.
299
300
301 \begin{DoxyCode}
302 371 \{
303 372     \textcolor{comment}{/* Required, otherwise segfault in egl\_dri2.c: dri2\_make\_current()}
304 373 \textcolor{comment}{     * on eglReleaseThread(). */}
305 374     eglMakeCurrent(window->\hyperlink{structwindow_a129486f2bd23791194f389ca1405cfd4}{display}->\hyperlink{structdisplay_a8b8bc104c19ff228d476a377e572d9c7}{egl}.\hyperlink{structdisplay_a8a1cbda15a286e41e89a85f158ce9311}{dpy}, EGL\_NO\_SURFACE, EGL\_NO\_SURFACE,
306 375                EGL\_NO\_CONTEXT);
307 376 
308 377     eglDestroySurface(window->\hyperlink{structwindow_a129486f2bd23791194f389ca1405cfd4}{display}->\hyperlink{structdisplay_a8b8bc104c19ff228d476a377e572d9c7}{egl}.\hyperlink{structdisplay_a8a1cbda15a286e41e89a85f158ce9311}{dpy}, window->\hyperlink{structwindow_a8de0059f3f1cb0dec33fba1143b7dee1}{egl\_surface});
309 378     wl\_egl\_window\_destroy(window->\hyperlink{structwindow_ae41be0955d0e73530e1bc13dfeb9d731}{native});
310 379 
311 380     \textcolor{keywordflow}{if} (window->\hyperlink{structwindow_a129486f2bd23791194f389ca1405cfd4}{display}->\hyperlink{structdisplay_a24c073faff3bb4799c2d46291f27ab89}{ivi\_application})
312 381         ivi\_surface\_destroy(window->\hyperlink{structwindow_a40e2c6fb4178953c820fc1b9f41d4b31}{ivi\_surface});
313 382     wl\_surface\_destroy(window->\hyperlink{structwindow_a7d0790cfc7c30621611fa26ab5c1ae97}{surface});
314 383 
315 384     \textcolor{keywordflow}{if} (window->\hyperlink{structwindow_a35ba639556fa19d9273dad0953a6807e}{callback})
316 385         wl\_callback\_destroy(window->\hyperlink{structwindow_a35ba639556fa19d9273dad0953a6807e}{callback});
317 386 \}
318 \end{DoxyCode}
319 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!E\+G\+L\+Boolean@{E\+G\+L\+Boolean}}
320 \index{E\+G\+L\+Boolean@{E\+G\+L\+Boolean}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
321 \subsubsection[{\texorpdfstring{E\+G\+L\+Boolean(\+E\+G\+L\+A\+P\+I\+E\+N\+T\+R\+Y\+P P\+F\+N\+E\+G\+L\+S\+W\+A\+P\+B\+U\+F\+F\+E\+R\+S\+W\+I\+T\+H\+D\+A\+M\+A\+G\+E\+E\+X\+T\+P\+R\+O\+C)(\+E\+G\+L\+Display dpy}{EGLBoolean(EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC)(EGLDisplay dpy}}]{\setlength{\rightskip}{0pt plus 5cm}typedef E\+G\+L\+Boolean (
322 \begin{DoxyParamCaption}
323 \item[{E\+G\+L\+A\+P\+I\+E\+N\+T\+R\+YP}]{P\+F\+N\+E\+G\+L\+S\+W\+A\+P\+B\+U\+F\+F\+E\+R\+S\+W\+I\+T\+H\+D\+A\+M\+A\+G\+E\+E\+X\+T\+P\+R\+OC}
324 \end{DoxyParamCaption}
325 )}\hypertarget{simple-egl_8cpp_ab4ad070d3bf82abe5e70330578f67893}{}\label{simple-egl_8cpp_ab4ad070d3bf82abe5e70330578f67893}
326 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!fini\+\_\+egl@{fini\+\_\+egl}}
327 \index{fini\+\_\+egl@{fini\+\_\+egl}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
328 \subsubsection[{\texorpdfstring{fini\+\_\+egl(struct display $\ast$display)}{fini_egl(struct display *display)}}]{\setlength{\rightskip}{0pt plus 5cm}static void fini\+\_\+egl (
329 \begin{DoxyParamCaption}
330 \item[{struct {\bf display} $\ast$}]{display}
331 \end{DoxyParamCaption}
332 )\hspace{0.3cm}{\ttfamily [static]}}\hypertarget{simple-egl_8cpp_a4f71f46ede5b73bd7c770c973826f771}{}\label{simple-egl_8cpp_a4f71f46ede5b73bd7c770c973826f771}
333
334
335 Definition at line 252 of file simple-\/egl.\+cpp.
336
337
338 \begin{DoxyCode}
339 253 \{
340 254     eglTerminate(display->\hyperlink{structdisplay_a8b8bc104c19ff228d476a377e572d9c7}{egl}.\hyperlink{structdisplay_a8a1cbda15a286e41e89a85f158ce9311}{dpy});
341 255     eglReleaseThread();
342 256 \}
343 \end{DoxyCode}
344 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!init\+\_\+egl@{init\+\_\+egl}}
345 \index{init\+\_\+egl@{init\+\_\+egl}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
346 \subsubsection[{\texorpdfstring{init\+\_\+egl(struct display $\ast$display, struct window $\ast$window)}{init_egl(struct display *display, struct window *window)}}]{\setlength{\rightskip}{0pt plus 5cm}static void init\+\_\+egl (
347 \begin{DoxyParamCaption}
348 \item[{struct {\bf display} $\ast$}]{display, }
349 \item[{struct {\bf window} $\ast$}]{window}
350 \end{DoxyParamCaption}
351 )\hspace{0.3cm}{\ttfamily [static]}}\hypertarget{simple-egl_8cpp_a1073d4aca1838d3877fe577d813700fc}{}\label{simple-egl_8cpp_a1073d4aca1838d3877fe577d813700fc}
352
353
354 Definition at line 174 of file simple-\/egl.\+cpp.
355
356
357 \begin{DoxyCode}
358 175 \{
359 176     \textcolor{keyword}{static} \textcolor{keyword}{const} EGLint context\_attribs[] = \{
360 177         EGL\_CONTEXT\_CLIENT\_VERSION, 2,
361 178         EGL\_NONE
362 179     \};
363 180     \textcolor{keyword}{const} \textcolor{keywordtype}{char} *extensions;
364 181 
365 182     EGLint config\_attribs[] = \{
366 183         EGL\_SURFACE\_TYPE, EGL\_WINDOW\_BIT,
367 184         EGL\_RED\_SIZE, 1,
368 185         EGL\_GREEN\_SIZE, 1,
369 186         EGL\_BLUE\_SIZE, 1,
370 187         EGL\_ALPHA\_SIZE, 1,
371 188         EGL\_RENDERABLE\_TYPE, EGL\_OPENGL\_ES2\_BIT,
372 189         EGL\_NONE
373 190     \};
374 191 
375 192     EGLint major, minor, n, count, i, size;
376 193     EGLConfig *configs;
377 194     \hyperlink{simple-egl_8cpp_ab4ad070d3bf82abe5e70330578f67893}{EGLBoolean} ret;
378 195 
379 196     \textcolor{keywordflow}{if} (window->\hyperlink{structwindow_a026a50808d8323a5a73d585c19916fa8}{opaque} || window->\hyperlink{structwindow_a0e634038f669aff472012f25ea250b40}{buffer\_size} == 16)
380 197         config\_attribs[9] = 0;
381 198 
382 199     display->\hyperlink{structdisplay_a8b8bc104c19ff228d476a377e572d9c7}{egl}.\hyperlink{structdisplay_a8a1cbda15a286e41e89a85f158ce9311}{dpy} = weston\_platform\_get\_egl\_display(EGL\_PLATFORM\_WAYLAND\_KHR, display->
383       \hyperlink{structdisplay_aa8faf09631925e9221fd8a0c086ce75a}{display}, NULL);
384 200     assert(display->\hyperlink{structdisplay_a8b8bc104c19ff228d476a377e572d9c7}{egl}.\hyperlink{structdisplay_a8a1cbda15a286e41e89a85f158ce9311}{dpy});
385 201 
386 202     ret = eglInitialize(display->\hyperlink{structdisplay_a8b8bc104c19ff228d476a377e572d9c7}{egl}.\hyperlink{structdisplay_a8a1cbda15a286e41e89a85f158ce9311}{dpy}, &major, &minor);
387 203     assert(ret == EGL\_TRUE);
388 204     ret = eglBindAPI(EGL\_OPENGL\_ES\_API);
389 205     assert(ret == EGL\_TRUE);
390 206 
391 207     \textcolor{keywordflow}{if} (!eglGetConfigs(display->\hyperlink{structdisplay_a8b8bc104c19ff228d476a377e572d9c7}{egl}.\hyperlink{structdisplay_a8a1cbda15a286e41e89a85f158ce9311}{dpy}, NULL, 0, &count) || count < 1)
392 208         assert(0);
393 209 
394 210     configs = calloc(count, \textcolor{keyword}{sizeof} *configs);
395 211     assert(configs);
396 212 
397 213     ret = eglChooseConfig(display->\hyperlink{structdisplay_a8b8bc104c19ff228d476a377e572d9c7}{egl}.\hyperlink{structdisplay_a8a1cbda15a286e41e89a85f158ce9311}{dpy}, config\_attribs,
398 214                   configs, count, &n);
399 215     assert(ret && n >= 1);
400 216 
401 217     \textcolor{keywordflow}{for} (i = 0; i < n; i++) \{
402 218         eglGetConfigAttrib(display->\hyperlink{structdisplay_a8b8bc104c19ff228d476a377e572d9c7}{egl}.\hyperlink{structdisplay_a8a1cbda15a286e41e89a85f158ce9311}{dpy},
403 219                    configs[i], EGL\_BUFFER\_SIZE, &size);
404 220         \textcolor{keywordflow}{if} (window->\hyperlink{structwindow_a0e634038f669aff472012f25ea250b40}{buffer\_size} == size) \{
405 221             display->\hyperlink{structdisplay_a8b8bc104c19ff228d476a377e572d9c7}{egl}.\hyperlink{structdisplay_a880aef9408b499f5b749541dc6e396c3}{conf} = configs[i];
406 222             \textcolor{keywordflow}{break};
407 223         \}
408 224     \}
409 225     free(configs);
410 226     \textcolor{keywordflow}{if} (display->\hyperlink{structdisplay_a8b8bc104c19ff228d476a377e572d9c7}{egl}.\hyperlink{structdisplay_a880aef9408b499f5b749541dc6e396c3}{conf} == NULL) \{
411 227         \hyperlink{include_2hmi-debug_8h_a65bb6c7cfe38f8a724beab5059d36fb2}{HMI\_ERROR}(\hyperlink{simple-egl_8cpp_a894f18168fa25101d792262f59846938}{log\_prefix},\textcolor{stringliteral}{"did not find config with buffer size %d"},
412 228             window->\hyperlink{structwindow_a0e634038f669aff472012f25ea250b40}{buffer\_size});
413 229         exit(EXIT\_FAILURE);
414 230     \}
415 231 
416 232     display->\hyperlink{structdisplay_a8b8bc104c19ff228d476a377e572d9c7}{egl}.\hyperlink{structdisplay_a3420940a29a710e0e5ebd41ba462cc00}{ctx} = eglCreateContext(display->\hyperlink{structdisplay_a8b8bc104c19ff228d476a377e572d9c7}{egl}.\hyperlink{structdisplay_a8a1cbda15a286e41e89a85f158ce9311}{dpy},
417 233                         display->\hyperlink{structdisplay_a8b8bc104c19ff228d476a377e572d9c7}{egl}.\hyperlink{structdisplay_a880aef9408b499f5b749541dc6e396c3}{conf},
418 234                         EGL\_NO\_CONTEXT, context\_attribs);
419 235     assert(display->\hyperlink{structdisplay_a8b8bc104c19ff228d476a377e572d9c7}{egl}.\hyperlink{structdisplay_a3420940a29a710e0e5ebd41ba462cc00}{ctx});
420 236 
421 237     display->\hyperlink{structdisplay_a48c46c118e4765ef06596f6341c8f23f}{swap\_buffers\_with\_damage} = NULL;
422 238     extensions = eglQueryString(display->\hyperlink{structdisplay_a8b8bc104c19ff228d476a377e572d9c7}{egl}.\hyperlink{structdisplay_a8a1cbda15a286e41e89a85f158ce9311}{dpy}, EGL\_EXTENSIONS);
423 239     \textcolor{keywordflow}{if} (extensions &&
424 240         strstr(extensions, \textcolor{stringliteral}{"EGL\_EXT\_swap\_buffers\_with\_damage"}) &&
425 241         strstr(extensions, \textcolor{stringliteral}{"EGL\_EXT\_buffer\_age"}))
426 242         display->\hyperlink{structdisplay_a48c46c118e4765ef06596f6341c8f23f}{swap\_buffers\_with\_damage} =
427 243             (PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC)
428 244             eglGetProcAddress(\textcolor{stringliteral}{"eglSwapBuffersWithDamageEXT"});
429 245 
430 246     \textcolor{keywordflow}{if} (display->\hyperlink{structdisplay_a48c46c118e4765ef06596f6341c8f23f}{swap\_buffers\_with\_damage})
431 247         \hyperlink{include_2hmi-debug_8h_a0d26d8b8201011dade787236519711c0}{HMI\_DEBUG}(\hyperlink{simple-egl_8cpp_a894f18168fa25101d792262f59846938}{log\_prefix},\textcolor{stringliteral}{"has EGL\_EXT\_buffer\_age and
432        EGL\_EXT\_swap\_buffers\_with\_damage"});
433 248 
434 249 \}
435 \end{DoxyCode}
436 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!init\+\_\+gl@{init\+\_\+gl}}
437 \index{init\+\_\+gl@{init\+\_\+gl}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
438 \subsubsection[{\texorpdfstring{init\+\_\+gl(struct window $\ast$window)}{init_gl(struct window *window)}}]{\setlength{\rightskip}{0pt plus 5cm}static void init\+\_\+gl (
439 \begin{DoxyParamCaption}
440 \item[{struct {\bf window} $\ast$}]{window}
441 \end{DoxyParamCaption}
442 )\hspace{0.3cm}{\ttfamily [static]}}\hypertarget{simple-egl_8cpp_ab3ee863fa45f4026f78f592d6f6e34ff}{}\label{simple-egl_8cpp_ab3ee863fa45f4026f78f592d6f6e34ff}
443
444
445 Definition at line 285 of file simple-\/egl.\+cpp.
446
447
448 \begin{DoxyCode}
449 286 \{
450 287     GLuint frag, vert;
451 288     GLuint program;
452 289     GLint status;
453 290 
454 291     frag = \hyperlink{simple-egl_8cpp_ab72c580e4d6d47c2fb49c72cc76b85bb}{create\_shader}(window, \hyperlink{simple-egl_8cpp_ab5a6a2a26ac23f79b1687daa4b0d8980}{frag\_shader\_text}, GL\_FRAGMENT\_SHADER);
455 292     vert = \hyperlink{simple-egl_8cpp_ab72c580e4d6d47c2fb49c72cc76b85bb}{create\_shader}(window, \hyperlink{simple-egl_8cpp_a717575939a37d84dcd4cf0447a630834}{vert\_shader\_text}, GL\_VERTEX\_SHADER);
456 293 
457 294     program = glCreateProgram();
458 295     glAttachShader(program, frag);
459 296     glAttachShader(program, vert);
460 297     glLinkProgram(program);
461 298 
462 299     glGetProgramiv(program, GL\_LINK\_STATUS, &status);
463 300     \textcolor{keywordflow}{if} (!status) \{
464 301         \textcolor{keywordtype}{char} log[1000];
465 302         GLsizei len;
466 303         glGetProgramInfoLog(program, 1000, &len, log);
467 304         \hyperlink{include_2hmi-debug_8h_a65bb6c7cfe38f8a724beab5059d36fb2}{HMI\_ERROR}(\hyperlink{simple-egl_8cpp_a894f18168fa25101d792262f59846938}{log\_prefix},\textcolor{stringliteral}{"Error: linking:%*s"}, len, log);
468 305         exit(1);
469 306     \}
470 307 
471 308     glUseProgram(program);
472 309 
473 310     window->\hyperlink{structwindow_a6975a930e9a3c166f8201fc4ef5e7728}{gl}.\hyperlink{structwindow_aaf965f90f9fc938db2315ff62028c362}{pos} = 0;
474 311     window->\hyperlink{structwindow_a6975a930e9a3c166f8201fc4ef5e7728}{gl}.\hyperlink{structwindow_aef10fe94766ccd4831ee611c5ad0e55c}{col} = 1;
475 312 
476 313     glBindAttribLocation(program, window->\hyperlink{structwindow_a6975a930e9a3c166f8201fc4ef5e7728}{gl}.\hyperlink{structwindow_aaf965f90f9fc938db2315ff62028c362}{pos}, \textcolor{stringliteral}{"pos"});
477 314     glBindAttribLocation(program, window->\hyperlink{structwindow_a6975a930e9a3c166f8201fc4ef5e7728}{gl}.\hyperlink{structwindow_aef10fe94766ccd4831ee611c5ad0e55c}{col}, \textcolor{stringliteral}{"color"});
478 315     glLinkProgram(program);
479 316 
480 317     window->\hyperlink{structwindow_a6975a930e9a3c166f8201fc4ef5e7728}{gl}.\hyperlink{structwindow_a5202f3b60e262a6fa4fcee68dd47cb67}{rotation\_uniform} =
481 318         glGetUniformLocation(program, \textcolor{stringliteral}{"rotation"});
482 319 \}
483 \end{DoxyCode}
484 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!init\+\_\+hs@{init\+\_\+hs}}
485 \index{init\+\_\+hs@{init\+\_\+hs}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
486 \subsubsection[{\texorpdfstring{init\+\_\+hs(\+Lib\+Home\+Screen $\ast$hs)}{init_hs(LibHomeScreen *hs)}}]{\setlength{\rightskip}{0pt plus 5cm}int init\+\_\+hs (
487 \begin{DoxyParamCaption}
488 \item[{{\bf Lib\+Home\+Screen} $\ast$}]{hs}
489 \end{DoxyParamCaption}
490 )}\hypertarget{simple-egl_8cpp_a79aafeb99915566dd3970246f465f306}{}\label{simple-egl_8cpp_a79aafeb99915566dd3970246f465f306}
491
492
493 Definition at line 565 of file simple-\/egl.\+cpp.
494
495
496 \begin{DoxyCode}
497 565                           \{
498 566     \textcolor{keywordflow}{if}(hs->\hyperlink{class_lib_home_screen_a6a57b573cc767725762ba9beab032220}{init}(\hyperlink{simple-egl_8cpp_a300b6806fe6818927fe4df08f2398124}{port}, \hyperlink{simple-egl_8cpp_a623ef6987ef3bd185c07b28b13e46d34}{token})!=0)
499 567     \{
500 568         \hyperlink{include_2hmi-debug_8h_a65bb6c7cfe38f8a724beab5059d36fb2}{HMI\_ERROR}(\hyperlink{simple-egl_8cpp_a894f18168fa25101d792262f59846938}{log\_prefix},\textcolor{stringliteral}{"homescreen init failed. "});
501 569         \textcolor{keywordflow}{return} -1;
502 570     \}
503 571 
504 572     hs->\hyperlink{class_lib_home_screen_ab1b0e08bf35415de9064afed899e9f85}{set\_event\_handler}(\hyperlink{class_lib_home_screen_a82616c91ac211d2ad08e709b524bf154a3fb3563c64786f1a2ae404df6edffd5c}{LibHomeScreen::Event\_ShowWindow}, 
505       [hs](json\_object *\textcolor{keywordtype}{object})\{
506 573         \hyperlink{include_2hmi-debug_8h_a0d26d8b8201011dade787236519711c0}{HMI\_DEBUG}(\textcolor{stringliteral}{"simple-egl"},\textcolor{stringliteral}{"try to activeWindow %s "}, \hyperlink{simple-egl_8cpp_a0da928eccfc57d1dfadfd29d4ac4854c}{app\_name}.c\_str());
507 574 
508 575         \textcolor{keyword}{struct }json\_object *param\_obj = json\_object\_object\_get(\textcolor{keywordtype}{object}, hs->
509       \hyperlink{class_lib_home_screen_a927592eff8e34efbbceaf12522f8897f}{\_keyParameter});
510 576         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *area = json\_object\_get\_string(
511 577             json\_object\_object\_get(param\_obj, hs->\hyperlink{class_lib_home_screen_a8becda1b035ae45f5a11c7e7963091bf}{\_keyArea}));
512 578         \textcolor{comment}{// Application should call LibWindowmanager::activateWindow() in showWindow handler}
513 579         \textcolor{keywordflow}{if}(area == \textcolor{keyword}{nullptr})
514 580             \hyperlink{simple-egl_8cpp_ad1513698e07197206c290f94d7669d85}{wm}->activateWindow(\hyperlink{simple-egl_8cpp_a332251aa739a56836cd4fbf3ecbb8bb2}{main\_role}, hs->\hyperlink{class_lib_home_screen_aac718b60b83c74e2b061f6f7f7ec3bf5}{\_areaNormal});
515 581         \textcolor{keywordflow}{else}
516 582             \hyperlink{simple-egl_8cpp_ad1513698e07197206c290f94d7669d85}{wm}->activateWindow(\hyperlink{simple-egl_8cpp_a332251aa739a56836cd4fbf3ecbb8bb2}{main\_role}, area);
517 583     \});
518 584 
519 585     \textcolor{keywordflow}{return} 0;
520 586 \}
521 \end{DoxyCode}
522 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!init\+\_\+wm@{init\+\_\+wm}}
523 \index{init\+\_\+wm@{init\+\_\+wm}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
524 \subsubsection[{\texorpdfstring{init\+\_\+wm(\+Lib\+Windowmanager $\ast$wm, struct window $\ast$window)}{init_wm(LibWindowmanager *wm, struct window *window)}}]{\setlength{\rightskip}{0pt plus 5cm}int init\+\_\+wm (
525 \begin{DoxyParamCaption}
526 \item[{Lib\+Windowmanager $\ast$}]{wm, }
527 \item[{struct {\bf window} $\ast$}]{window}
528 \end{DoxyParamCaption}
529 )}\hypertarget{simple-egl_8cpp_a644e25276ecdea04f2aa3412c1973927}{}\label{simple-egl_8cpp_a644e25276ecdea04f2aa3412c1973927}
530
531
532 Definition at line 527 of file simple-\/egl.\+cpp.
533
534
535 \begin{DoxyCode}
536 528 \{
537 529     \hyperlink{include_2hmi-debug_8h_a0d26d8b8201011dade787236519711c0}{HMI\_DEBUG}(\hyperlink{simple-egl_8cpp_a894f18168fa25101d792262f59846938}{log\_prefix},\textcolor{stringliteral}{"called"});
538 530 
539 531     \textcolor{keywordflow}{if} (\hyperlink{simple-egl_8cpp_ad1513698e07197206c290f94d7669d85}{wm}->init(\hyperlink{simple-egl_8cpp_a300b6806fe6818927fe4df08f2398124}{port}, \hyperlink{simple-egl_8cpp_a623ef6987ef3bd185c07b28b13e46d34}{token}) != 0) \{
540 532         \hyperlink{include_2hmi-debug_8h_a65bb6c7cfe38f8a724beab5059d36fb2}{HMI\_ERROR}(\hyperlink{simple-egl_8cpp_a894f18168fa25101d792262f59846938}{log\_prefix},\textcolor{stringliteral}{"wm init failed. "});
541 533         \textcolor{keywordflow}{return} -1;
542 534     \}
543 535 
544 536     \hyperlink{simple-egl_8cpp_a28f56c9f01ed9f108201950645317cc9}{g\_id\_ivisurf} = \hyperlink{simple-egl_8cpp_ad1513698e07197206c290f94d7669d85}{wm}->requestSurface(\hyperlink{simple-egl_8cpp_a332251aa739a56836cd4fbf3ecbb8bb2}{main\_role});
545 537     \textcolor{keywordflow}{if} (\hyperlink{simple-egl_8cpp_a28f56c9f01ed9f108201950645317cc9}{g\_id\_ivisurf} < 0) \{
546 538         \hyperlink{include_2hmi-debug_8h_a65bb6c7cfe38f8a724beab5059d36fb2}{HMI\_ERROR}(\hyperlink{simple-egl_8cpp_a894f18168fa25101d792262f59846938}{log\_prefix},\textcolor{stringliteral}{"wm request surface failed "});
547 539         \textcolor{keywordflow}{return} -1;
548 540     \}
549 541     \hyperlink{include_2hmi-debug_8h_a0d26d8b8201011dade787236519711c0}{HMI\_DEBUG}(\hyperlink{simple-egl_8cpp_a894f18168fa25101d792262f59846938}{log\_prefix},\textcolor{stringliteral}{"IVI\_SURFACE\_ID: %d "}, \hyperlink{simple-egl_8cpp_a28f56c9f01ed9f108201950645317cc9}{g\_id\_ivisurf});
550 542 
551 543     WMHandler wmh;
552 544     wmh.on\_visible = [](\textcolor{keyword}{const} \textcolor{keywordtype}{char}* role, \textcolor{keywordtype}{bool} visible)\{
553 545         \textcolor{comment}{// Sample code if user uses visible event}
554 546         \hyperlink{include_2hmi-debug_8h_a0d26d8b8201011dade787236519711c0}{HMI\_DEBUG}(\hyperlink{simple-egl_8cpp_a894f18168fa25101d792262f59846938}{log\_prefix}, \textcolor{stringliteral}{"role: %s, visible: %s"}, role, visible ? \textcolor{stringliteral}{"true"} : \textcolor{stringliteral}{"false"})
555       ;
556 547     \};
557 548     wmh.on\_sync\_draw = [\hyperlink{simple-egl_8cpp_ad1513698e07197206c290f94d7669d85}{wm}, window](\textcolor{keyword}{const} \textcolor{keywordtype}{char}* role, \textcolor{keyword}{const} \textcolor{keywordtype}{char}* area, Rect rect) \{
558 549 
559 550         \hyperlink{include_2hmi-debug_8h_a0d26d8b8201011dade787236519711c0}{HMI\_DEBUG}(\hyperlink{simple-egl_8cpp_a894f18168fa25101d792262f59846938}{log\_prefix},\textcolor{stringliteral}{"Surface %s got syncDraw! Area: %s. w:%d, h:%d"}, role, area
560       , rect.width(), rect.height());
561 551 
562 552         wl\_egl\_window\_resize(window->\hyperlink{structwindow_ae41be0955d0e73530e1bc13dfeb9d731}{native}, rect.width(), rect.height(), 0, 0);
563 553         window->geometry.width  = rect.width();
564 554         window->geometry.height = rect.height();
565 555 
566 556         \hyperlink{simple-egl_8cpp_ad1513698e07197206c290f94d7669d85}{wm}->endDraw(role);
567 557     \};
568 558 
569 559     \hyperlink{simple-egl_8cpp_ad1513698e07197206c290f94d7669d85}{wm}->setEventHandler(wmh);
570 560 
571 561     \textcolor{keywordflow}{return} 0;
572 562 \}
573 \end{DoxyCode}
574 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!main@{main}}
575 \index{main@{main}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
576 \subsubsection[{\texorpdfstring{main(int argc, char $\ast$$\ast$argv)}{main(int argc, char **argv)}}]{\setlength{\rightskip}{0pt plus 5cm}int main (
577 \begin{DoxyParamCaption}
578 \item[{int}]{argc, }
579 \item[{char $\ast$$\ast$}]{argv}
580 \end{DoxyParamCaption}
581 )}\hypertarget{simple-egl_8cpp_a3c04138a5bfe5d72780bb7e82a18e627}{}\label{simple-egl_8cpp_a3c04138a5bfe5d72780bb7e82a18e627}
582
583
584 Definition at line 589 of file simple-\/egl.\+cpp.
585
586
587 \begin{DoxyCode}
588 590 \{
589 591     \textcolor{keyword}{struct }sigaction sigint;
590 592     \textcolor{keyword}{struct }\hyperlink{structwindow}{window}  \hyperlink{structwindow}{window}  = \{ 0 \};
591 593     \textcolor{keyword}{struct }\hyperlink{structdisplay}{display} \hyperlink{structdisplay}{display} = \{ 0 \};
592 594 
593 595     window.\hyperlink{structwindow_a129486f2bd23791194f389ca1405cfd4}{display} = &\hyperlink{structdisplay_aa8faf09631925e9221fd8a0c086ce75a}{display};
594 596     display.\hyperlink{structdisplay_a9974d560bec291487ae2440f897ffc58}{window} = &\hyperlink{structdisplay_a9974d560bec291487ae2440f897ffc58}{window};
595 597     window.geometry.width  = 1080;
596 598     window.geometry.height = 1488;
597 599     window.\hyperlink{structwindow_ad2b6c8ed8044b41fd1189a0ce26d539a}{window\_size} = window.geometry;
598 600     window.\hyperlink{structwindow_a0e634038f669aff472012f25ea250b40}{buffer\_size} = 32;
599 601     window.\hyperlink{structwindow_a851bcb65083f5ab5ff768b09522bed70}{frame\_sync} = 1;
600 602 
601 603     \textcolor{keywordflow}{if}(argc > 2)\{
602 604         \hyperlink{simple-egl_8cpp_a300b6806fe6818927fe4df08f2398124}{port} = strtol(argv[1], NULL, 10);
603 605         \hyperlink{simple-egl_8cpp_a623ef6987ef3bd185c07b28b13e46d34}{token} = argv[2];
604 606     \}
605 607 
606 608     \hyperlink{include_2hmi-debug_8h_a0d26d8b8201011dade787236519711c0}{HMI\_DEBUG}(\hyperlink{simple-egl_8cpp_a894f18168fa25101d792262f59846938}{log\_prefix},\textcolor{stringliteral}{"main\_role: %s, port: %d, token: %s. "}, 
607       \hyperlink{simple-egl_8cpp_a332251aa739a56836cd4fbf3ecbb8bb2}{main\_role}, \hyperlink{simple-egl_8cpp_a300b6806fe6818927fe4df08f2398124}{port}, \hyperlink{simple-egl_8cpp_a623ef6987ef3bd185c07b28b13e46d34}{token}.c\_str());
608 609 
609 610     display.\hyperlink{structdisplay_aa8faf09631925e9221fd8a0c086ce75a}{display} = wl\_display\_connect(NULL);
610 611     assert(display.\hyperlink{structdisplay_aa8faf09631925e9221fd8a0c086ce75a}{display});
611 612 
612 613     display.\hyperlink{structdisplay_a925781323f5c8eb84ef2225ed129de4b}{registry} = wl\_display\_get\_registry(display.\hyperlink{structdisplay_aa8faf09631925e9221fd8a0c086ce75a}{display});
613 614     wl\_registry\_add\_listener(display.\hyperlink{structdisplay_a925781323f5c8eb84ef2225ed129de4b}{registry},
614 615                  &\hyperlink{simple-egl_8cpp_a8998c87c94cd7d185e8f0cdafab4b1c4}{registry\_listener}, &display);
615 616 
616 617     wl\_display\_roundtrip(display.\hyperlink{structdisplay_aa8faf09631925e9221fd8a0c086ce75a}{display});
617 618 
618 619     \hyperlink{simple-egl_8cpp_a1073d4aca1838d3877fe577d813700fc}{init\_egl}(&display, &window);
619 620 
620 621     \hyperlink{simple-egl_8cpp_ad1513698e07197206c290f94d7669d85}{wm} = \textcolor{keyword}{new} LibWindowmanager();
621 622     \textcolor{keywordflow}{if}(\hyperlink{simple-egl_8cpp_a644e25276ecdea04f2aa3412c1973927}{init\_wm}(\hyperlink{simple-egl_8cpp_ad1513698e07197206c290f94d7669d85}{wm}, &window)!=0)\{
622 623         \hyperlink{simple-egl_8cpp_a4f71f46ede5b73bd7c770c973826f771}{fini\_egl}(&display);
623 624         \textcolor{keywordflow}{if} (display.\hyperlink{structdisplay_a24c073faff3bb4799c2d46291f27ab89}{ivi\_application})
624 625             ivi\_application\_destroy(display.\hyperlink{structdisplay_a24c073faff3bb4799c2d46291f27ab89}{ivi\_application});
625 626         \textcolor{keywordflow}{if} (display.\hyperlink{structdisplay_a41ba32dfde812165dda5b62885000c78}{compositor})
626 627             wl\_compositor\_destroy(display.\hyperlink{structdisplay_a41ba32dfde812165dda5b62885000c78}{compositor});
627 628         wl\_registry\_destroy(display.\hyperlink{structdisplay_a925781323f5c8eb84ef2225ed129de4b}{registry});
628 629         wl\_display\_flush(display.\hyperlink{structdisplay_aa8faf09631925e9221fd8a0c086ce75a}{display});
629 630         \textcolor{keywordflow}{return} -1;
630 631     \}
631 632 
632 633     \hyperlink{simple-egl_8cpp_a529acbd1fed9d98a587edfa62309fa8d}{hs} = \textcolor{keyword}{new} \hyperlink{class_lib_home_screen}{LibHomeScreen}();
633 634     \textcolor{keywordflow}{if}(\hyperlink{simple-egl_8cpp_a79aafeb99915566dd3970246f465f306}{init\_hs}(\hyperlink{simple-egl_8cpp_a529acbd1fed9d98a587edfa62309fa8d}{hs})!=0)\{
634 635         \hyperlink{simple-egl_8cpp_a4f71f46ede5b73bd7c770c973826f771}{fini\_egl}(&display);
635 636         \textcolor{keywordflow}{if} (display.\hyperlink{structdisplay_a24c073faff3bb4799c2d46291f27ab89}{ivi\_application})
636 637             ivi\_application\_destroy(display.\hyperlink{structdisplay_a24c073faff3bb4799c2d46291f27ab89}{ivi\_application});
637 638         \textcolor{keywordflow}{if} (display.\hyperlink{structdisplay_a41ba32dfde812165dda5b62885000c78}{compositor})
638 639             wl\_compositor\_destroy(display.\hyperlink{structdisplay_a41ba32dfde812165dda5b62885000c78}{compositor});
639 640         wl\_registry\_destroy(display.\hyperlink{structdisplay_a925781323f5c8eb84ef2225ed129de4b}{registry});
640 641         wl\_display\_flush(display.\hyperlink{structdisplay_aa8faf09631925e9221fd8a0c086ce75a}{display});
641 642         \textcolor{keywordflow}{return} -1;
642 643     \}
643 644 
644 645     \hyperlink{simple-egl_8cpp_a83c7f2e34bbc715d97f0642def708293}{create\_surface}(&window);
645 646     \hyperlink{simple-egl_8cpp_ab3ee863fa45f4026f78f592d6f6e34ff}{init\_gl}(&window);
646 647 
647 648     \textcolor{comment}{//Ctrl+C}
648 649     sigint.sa\_handler = \hyperlink{simple-egl_8cpp_a2cfc8c2d3fc1273ba8f811d2e639aec8}{signal\_int};
649 650     sigemptyset(&sigint.sa\_mask);
650 651     sigint.sa\_flags = SA\_RESETHAND;
651 652     sigaction(SIGINT, &sigint, NULL);
652 653 
653 654     eglSwapBuffers(window.\hyperlink{structwindow_a129486f2bd23791194f389ca1405cfd4}{display}->\hyperlink{structdisplay_a8b8bc104c19ff228d476a377e572d9c7}{egl}.\hyperlink{structdisplay_a8a1cbda15a286e41e89a85f158ce9311}{dpy}, window.\hyperlink{structwindow_a8de0059f3f1cb0dec33fba1143b7dee1}{egl\_surface});
654 655 
655 656     \hyperlink{simple-egl_8cpp_ad1513698e07197206c290f94d7669d85}{wm}->activateWindow(\hyperlink{simple-egl_8cpp_a332251aa739a56836cd4fbf3ecbb8bb2}{main\_role});
656 657 
657 658     \textcolor{comment}{/* The mainloop here is a little subtle.  Redrawing will cause}
658 659 \textcolor{comment}{     * EGL to read events so we can just call}
659 660 \textcolor{comment}{     * wl\_display\_dispatch\_pending() to handle any events that got}
660 661 \textcolor{comment}{     * queued up as a side effect. */}
661 662     \textcolor{keywordflow}{while} (\hyperlink{simple-egl_8cpp_a2f45113638a0b749a8a205d2cd7fb42b}{running}) \{
662 663         wl\_display\_dispatch\_pending(display.\hyperlink{structdisplay_aa8faf09631925e9221fd8a0c086ce75a}{display});
663 664         \hyperlink{simple-egl_8cpp_a927502f6103ec35422eead39e62ab7ba}{redraw}(&window, NULL, 0);
664 665     \}
665 666 
666 667     \hyperlink{include_2hmi-debug_8h_a0d26d8b8201011dade787236519711c0}{HMI\_DEBUG}(\hyperlink{simple-egl_8cpp_a894f18168fa25101d792262f59846938}{log\_prefix},\textcolor{stringliteral}{"simple-egl exiting! "});
667 668 
668 669     \hyperlink{simple-egl_8cpp_aba2ea9aa51701e52d4f36b4f34cecf7a}{destroy\_surface}(&window);
669 670     \hyperlink{simple-egl_8cpp_a4f71f46ede5b73bd7c770c973826f771}{fini\_egl}(&display);
670 671 
671 672     \textcolor{keywordflow}{if} (display.\hyperlink{structdisplay_a24c073faff3bb4799c2d46291f27ab89}{ivi\_application})
672 673         ivi\_application\_destroy(display.\hyperlink{structdisplay_a24c073faff3bb4799c2d46291f27ab89}{ivi\_application});
673 674 
674 675     \textcolor{keywordflow}{if} (display.\hyperlink{structdisplay_a41ba32dfde812165dda5b62885000c78}{compositor})
675 676         wl\_compositor\_destroy(display.\hyperlink{structdisplay_a41ba32dfde812165dda5b62885000c78}{compositor});
676 677 
677 678     wl\_registry\_destroy(display.\hyperlink{structdisplay_a925781323f5c8eb84ef2225ed129de4b}{registry});
678 679     wl\_display\_flush(display.\hyperlink{structdisplay_aa8faf09631925e9221fd8a0c086ce75a}{display});
679 680     wl\_display\_disconnect(display.\hyperlink{structdisplay_aa8faf09631925e9221fd8a0c086ce75a}{display});
680 681 
681 682     \textcolor{keywordflow}{return} 0;
682 683 \}
683 \end{DoxyCode}
684 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!redraw@{redraw}}
685 \index{redraw@{redraw}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
686 \subsubsection[{\texorpdfstring{redraw(void $\ast$data, struct wl\+\_\+callback $\ast$callback, uint32\+\_\+t time)}{redraw(void *data, struct wl_callback *callback, uint32_t time)}}]{\setlength{\rightskip}{0pt plus 5cm}static void redraw (
687 \begin{DoxyParamCaption}
688 \item[{void $\ast$}]{data, }
689 \item[{struct wl\+\_\+callback $\ast$}]{callback, }
690 \item[{uint32\+\_\+t}]{time}
691 \end{DoxyParamCaption}
692 )\hspace{0.3cm}{\ttfamily [static]}}\hypertarget{simple-egl_8cpp_a927502f6103ec35422eead39e62ab7ba}{}\label{simple-egl_8cpp_a927502f6103ec35422eead39e62ab7ba}
693
694
695 Definition at line 389 of file simple-\/egl.\+cpp.
696
697
698 \begin{DoxyCode}
699 390 \{
700 391     \textcolor{keyword}{struct }\hyperlink{structwindow}{window} *\hyperlink{structwindow}{window} = data;
701 392     \textcolor{keyword}{struct }\hyperlink{structdisplay}{display} *\hyperlink{structdisplay}{display} = window->\hyperlink{structwindow_a129486f2bd23791194f389ca1405cfd4}{display};
702 393     \textcolor{keyword}{static} \textcolor{keyword}{const} GLfloat verts[3][2] = \{
703 394         \{ -0.5, -0.5 \},
704 395         \{  0.5, -0.5 \},
705 396         \{  0,    0.5 \}
706 397     \};
707 398 
708 399     \textcolor{keyword}{static} \textcolor{keyword}{const} GLfloat colors[3][3] = \{
709 400         \{ 1, 0, 0 \},
710 401         \{ 0, 1, 0 \},
711 402         \{ 0, 0, 1 \}
712 403     \};
713 404 
714 405     GLfloat angle;
715 406     GLfloat rotation[4][4] = \{
716 407         \{ 1, 0, 0, 0 \},
717 408         \{ 0, 1, 0, 0 \},
718 409         \{ 0, 0, 1, 0 \},
719 410         \{ 0, 0, 0, 1 \}
720 411     \};
721 412     \textcolor{keyword}{static} \textcolor{keyword}{const} uint32\_t speed\_div = 5, benchmark\_interval = 5;
722 413     \textcolor{keyword}{struct }wl\_region *region;
723 414     EGLint rect[4];
724 415     EGLint buffer\_age = 0;
725 416     \textcolor{keyword}{struct }timeval tv;
726 417 
727 418     assert(window->\hyperlink{structwindow_a35ba639556fa19d9273dad0953a6807e}{callback} == callback);
728 419     window->\hyperlink{structwindow_a35ba639556fa19d9273dad0953a6807e}{callback} = NULL;
729 420 
730 421     \textcolor{keywordflow}{if} (callback)
731 422         wl\_callback\_destroy(callback);
732 423 
733 424     gettimeofday(&tv, NULL);
734 425     time = tv.tv\_sec * 1000 + tv.tv\_usec / 1000;
735 426     \textcolor{keywordflow}{if} (window->\hyperlink{structwindow_a633864bb495ec265bee220a5c70cc98f}{frames} == 0)
736 427         window->\hyperlink{structwindow_a72629bf021a361ad900504732a74cb68}{benchmark\_time} = time;
737 428 
738 429     \textcolor{keywordflow}{if} (time - window->\hyperlink{structwindow_a72629bf021a361ad900504732a74cb68}{benchmark\_time} > (benchmark\_interval * 1000)) \{
739 430         \hyperlink{include_2hmi-debug_8h_a0d26d8b8201011dade787236519711c0}{HMI\_DEBUG}(\hyperlink{simple-egl_8cpp_a894f18168fa25101d792262f59846938}{log\_prefix},\textcolor{stringliteral}{"%d frames in %d seconds: %f fps"},
740 431                window->\hyperlink{structwindow_a633864bb495ec265bee220a5c70cc98f}{frames},
741 432                benchmark\_interval,
742 433                (\textcolor{keywordtype}{float}) window->\hyperlink{structwindow_a633864bb495ec265bee220a5c70cc98f}{frames} / benchmark\_interval);
743 434         window->\hyperlink{structwindow_a72629bf021a361ad900504732a74cb68}{benchmark\_time} = time;
744 435         window->\hyperlink{structwindow_a633864bb495ec265bee220a5c70cc98f}{frames} = 0;
745 436     \}
746 437 
747 438     angle = (time / speed\_div) % 360 * M\_PI / 180.0;
748 439     rotation[0][0] =  cos(angle);
749 440     rotation[0][2] =  sin(angle);
750 441     rotation[2][0] = -sin(angle);
751 442     rotation[2][2] =  cos(angle);
752 443 
753 444     \textcolor{keywordflow}{if} (display->\hyperlink{structdisplay_a48c46c118e4765ef06596f6341c8f23f}{swap\_buffers\_with\_damage})
754 445         eglQuerySurface(display->\hyperlink{structdisplay_a8b8bc104c19ff228d476a377e572d9c7}{egl}.\hyperlink{structdisplay_a8a1cbda15a286e41e89a85f158ce9311}{dpy}, window->\hyperlink{structwindow_a8de0059f3f1cb0dec33fba1143b7dee1}{egl\_surface},
755 446                 \hyperlink{simple-egl_8cpp_a7045d8a6b4857f268a62fab2de2021fd}{EGL\_BUFFER\_AGE\_EXT}, &buffer\_age);
756 447 
757 448     glViewport(0, 0, window->geometry.width, window->geometry.height);
758 449 
759 450     glUniformMatrix4fv(window->\hyperlink{structwindow_a6975a930e9a3c166f8201fc4ef5e7728}{gl}.\hyperlink{structwindow_a5202f3b60e262a6fa4fcee68dd47cb67}{rotation\_uniform}, 1, GL\_FALSE,
760 451                (GLfloat *) rotation);
761 452 
762 453     glClearColor(0.0, 0.0, 0.0, 0.5);
763 454     glClear(GL\_COLOR\_BUFFER\_BIT);
764 455 
765 456     glVertexAttribPointer(window->\hyperlink{structwindow_a6975a930e9a3c166f8201fc4ef5e7728}{gl}.\hyperlink{structwindow_aaf965f90f9fc938db2315ff62028c362}{pos}, 2, GL\_FLOAT, GL\_FALSE, 0, verts);
766 457     glVertexAttribPointer(window->\hyperlink{structwindow_a6975a930e9a3c166f8201fc4ef5e7728}{gl}.\hyperlink{structwindow_aef10fe94766ccd4831ee611c5ad0e55c}{col}, 3, GL\_FLOAT, GL\_FALSE, 0, colors);
767 458     glEnableVertexAttribArray(window->\hyperlink{structwindow_a6975a930e9a3c166f8201fc4ef5e7728}{gl}.\hyperlink{structwindow_aaf965f90f9fc938db2315ff62028c362}{pos});
768 459     glEnableVertexAttribArray(window->\hyperlink{structwindow_a6975a930e9a3c166f8201fc4ef5e7728}{gl}.\hyperlink{structwindow_aef10fe94766ccd4831ee611c5ad0e55c}{col});
769 460 
770 461     glDrawArrays(GL\_TRIANGLES, 0, 3);
771 462 
772 463     glDisableVertexAttribArray(window->\hyperlink{structwindow_a6975a930e9a3c166f8201fc4ef5e7728}{gl}.\hyperlink{structwindow_aaf965f90f9fc938db2315ff62028c362}{pos});
773 464     glDisableVertexAttribArray(window->\hyperlink{structwindow_a6975a930e9a3c166f8201fc4ef5e7728}{gl}.\hyperlink{structwindow_aef10fe94766ccd4831ee611c5ad0e55c}{col});
774 465 
775 466     \textcolor{keywordflow}{if} (window->\hyperlink{structwindow_a026a50808d8323a5a73d585c19916fa8}{opaque} || window->\hyperlink{structwindow_a8da44798a9e1feb7ed3fbd18ec3a28b6}{fullscreen}) \{
776 467         region = wl\_compositor\_create\_region(window->\hyperlink{structwindow_a129486f2bd23791194f389ca1405cfd4}{display}->\hyperlink{structdisplay_a41ba32dfde812165dda5b62885000c78}{compositor});
777 468         wl\_region\_add(region, 0, 0,
778 469                   window->geometry.width,
779 470                   window->geometry.height);
780 471         wl\_surface\_set\_opaque\_region(window->\hyperlink{structwindow_a7d0790cfc7c30621611fa26ab5c1ae97}{surface}, region);
781 472         wl\_region\_destroy(region);
782 473     \} \textcolor{keywordflow}{else} \{
783 474         wl\_surface\_set\_opaque\_region(window->\hyperlink{structwindow_a7d0790cfc7c30621611fa26ab5c1ae97}{surface}, NULL);
784 475     \}
785 476 
786 477     \textcolor{keywordflow}{if} (display->\hyperlink{structdisplay_a48c46c118e4765ef06596f6341c8f23f}{swap\_buffers\_with\_damage} && buffer\_age > 0) \{
787 478         rect[0] = window->geometry.width / 4 - 1;
788 479         rect[1] = window->geometry.height / 4 - 1;
789 480         rect[2] = window->geometry.width / 2 + 2;
790 481         rect[3] = window->geometry.height / 2 + 2;
791 482         display->\hyperlink{structdisplay_a48c46c118e4765ef06596f6341c8f23f}{swap\_buffers\_with\_damage}(display->\hyperlink{structdisplay_a8b8bc104c19ff228d476a377e572d9c7}{egl}.
792       \hyperlink{structdisplay_a8a1cbda15a286e41e89a85f158ce9311}{dpy},
793 483                           window->\hyperlink{structwindow_a8de0059f3f1cb0dec33fba1143b7dee1}{egl\_surface},
794 484                           rect, 1);
795 485     \} \textcolor{keywordflow}{else} \{
796 486         eglSwapBuffers(display->\hyperlink{structdisplay_a8b8bc104c19ff228d476a377e572d9c7}{egl}.\hyperlink{structdisplay_a8a1cbda15a286e41e89a85f158ce9311}{dpy}, window->\hyperlink{structwindow_a8de0059f3f1cb0dec33fba1143b7dee1}{egl\_surface});
797 487     \}
798 488 
799 489     window->\hyperlink{structwindow_a633864bb495ec265bee220a5c70cc98f}{frames}++;
800 490 \}
801 \end{DoxyCode}
802 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!registry\+\_\+handle\+\_\+global@{registry\+\_\+handle\+\_\+global}}
803 \index{registry\+\_\+handle\+\_\+global@{registry\+\_\+handle\+\_\+global}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
804 \subsubsection[{\texorpdfstring{registry\+\_\+handle\+\_\+global(void $\ast$data, struct wl\+\_\+registry $\ast$registry, uint32\+\_\+t name, const char $\ast$interface, uint32\+\_\+t version)}{registry_handle_global(void *data, struct wl_registry *registry, uint32_t name, const char *interface, uint32_t version)}}]{\setlength{\rightskip}{0pt plus 5cm}static void registry\+\_\+handle\+\_\+global (
805 \begin{DoxyParamCaption}
806 \item[{void $\ast$}]{data, }
807 \item[{struct wl\+\_\+registry $\ast$}]{registry, }
808 \item[{uint32\+\_\+t}]{name, }
809 \item[{const char $\ast$}]{interface, }
810 \item[{uint32\+\_\+t}]{version}
811 \end{DoxyParamCaption}
812 )\hspace{0.3cm}{\ttfamily [static]}}\hypertarget{simple-egl_8cpp_af288e02a94c196a68b327fc55c049932}{}\label{simple-egl_8cpp_af288e02a94c196a68b327fc55c049932}
813
814
815 Definition at line 493 of file simple-\/egl.\+cpp.
816
817
818 \begin{DoxyCode}
819 495 \{
820 496     \textcolor{keyword}{struct }\hyperlink{structdisplay}{display} *d = data;
821 497 
822 498     \textcolor{keywordflow}{if} (strcmp(interface, \textcolor{stringliteral}{"wl\_compositor"}) == 0) \{
823 499         d->\hyperlink{structdisplay_a41ba32dfde812165dda5b62885000c78}{compositor} =
824 500             wl\_registry\_bind(\hyperlink{structdisplay_a925781323f5c8eb84ef2225ed129de4b}{registry}, name,
825 501                      &wl\_compositor\_interface, 1);
826 502     \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcmp(interface, \textcolor{stringliteral}{"ivi\_application"}) == 0) \{
827 503         d->\hyperlink{structdisplay_a24c073faff3bb4799c2d46291f27ab89}{ivi\_application} =
828 504             wl\_registry\_bind(\hyperlink{structdisplay_a925781323f5c8eb84ef2225ed129de4b}{registry}, name,
829 505                      &\hyperlink{simple-egl_8cpp_a769b65b7b0e834f732f1f45e835890d5}{ivi\_application\_interface}, 1);
830 506     \}
831 507 \}
832 \end{DoxyCode}
833 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!registry\+\_\+handle\+\_\+global\+\_\+remove@{registry\+\_\+handle\+\_\+global\+\_\+remove}}
834 \index{registry\+\_\+handle\+\_\+global\+\_\+remove@{registry\+\_\+handle\+\_\+global\+\_\+remove}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
835 \subsubsection[{\texorpdfstring{registry\+\_\+handle\+\_\+global\+\_\+remove(void $\ast$data, struct wl\+\_\+registry $\ast$registry, uint32\+\_\+t name)}{registry_handle_global_remove(void *data, struct wl_registry *registry, uint32_t name)}}]{\setlength{\rightskip}{0pt plus 5cm}static void registry\+\_\+handle\+\_\+global\+\_\+remove (
836 \begin{DoxyParamCaption}
837 \item[{void $\ast$}]{data, }
838 \item[{struct wl\+\_\+registry $\ast$}]{registry, }
839 \item[{uint32\+\_\+t}]{name}
840 \end{DoxyParamCaption}
841 )\hspace{0.3cm}{\ttfamily [static]}}\hypertarget{simple-egl_8cpp_a59a731b9efa9d6a2015cdc8ccae1db80}{}\label{simple-egl_8cpp_a59a731b9efa9d6a2015cdc8ccae1db80}
842
843
844 Definition at line 510 of file simple-\/egl.\+cpp.
845
846
847 \begin{DoxyCode}
848 512 \{
849 513 \}
850 \end{DoxyCode}
851 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!signal\+\_\+int@{signal\+\_\+int}}
852 \index{signal\+\_\+int@{signal\+\_\+int}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
853 \subsubsection[{\texorpdfstring{signal\+\_\+int(int signum)}{signal_int(int signum)}}]{\setlength{\rightskip}{0pt plus 5cm}static void signal\+\_\+int (
854 \begin{DoxyParamCaption}
855 \item[{int}]{signum}
856 \end{DoxyParamCaption}
857 )\hspace{0.3cm}{\ttfamily [static]}}\hypertarget{simple-egl_8cpp_a2cfc8c2d3fc1273ba8f811d2e639aec8}{}\label{simple-egl_8cpp_a2cfc8c2d3fc1273ba8f811d2e639aec8}
858
859
860 Definition at line 521 of file simple-\/egl.\+cpp.
861
862
863 \begin{DoxyCode}
864 522 \{
865 523     \hyperlink{simple-egl_8cpp_a2f45113638a0b749a8a205d2cd7fb42b}{running} = 0;
866 524 \}
867 \end{DoxyCode}
868
869
870 \subsection{Variable Documentation}
871 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!app\+\_\+name@{app\+\_\+name}}
872 \index{app\+\_\+name@{app\+\_\+name}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
873 \subsubsection[{\texorpdfstring{app\+\_\+name}{app_name}}]{\setlength{\rightskip}{0pt plus 5cm}string app\+\_\+name = string(\char`\"{}Navigation\char`\"{})}\hypertarget{simple-egl_8cpp_a0da928eccfc57d1dfadfd29d4ac4854c}{}\label{simple-egl_8cpp_a0da928eccfc57d1dfadfd29d4ac4854c}
874
875
876 Definition at line 63 of file simple-\/egl.\+cpp.
877
878 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!frag\+\_\+shader\+\_\+text@{frag\+\_\+shader\+\_\+text}}
879 \index{frag\+\_\+shader\+\_\+text@{frag\+\_\+shader\+\_\+text}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
880 \subsubsection[{\texorpdfstring{frag\+\_\+shader\+\_\+text}{frag_shader_text}}]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ frag\+\_\+shader\+\_\+text\hspace{0.3cm}{\ttfamily [static]}}\hypertarget{simple-egl_8cpp_ab5a6a2a26ac23f79b1687daa4b0d8980}{}\label{simple-egl_8cpp_ab5a6a2a26ac23f79b1687daa4b0d8980}
881 {\bfseries Initial value\+:}
882 \begin{DoxyCode}
883 =
884     \textcolor{stringliteral}{"precision mediump float;\(\backslash\)n"}
885     \textcolor{stringliteral}{"varying vec4 v\_color;\(\backslash\)n"}
886     \textcolor{stringliteral}{"void main() \{\(\backslash\)n"}
887     \textcolor{stringliteral}{"  gl\_FragColor = v\_color;\(\backslash\)n"}
888     \textcolor{stringliteral}{"\}\(\backslash\)n"}
889 \end{DoxyCode}
890
891
892 Definition at line 164 of file simple-\/egl.\+cpp.
893
894 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!g\+\_\+id\+\_\+ivisurf@{g\+\_\+id\+\_\+ivisurf}}
895 \index{g\+\_\+id\+\_\+ivisurf@{g\+\_\+id\+\_\+ivisurf}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
896 \subsubsection[{\texorpdfstring{g\+\_\+id\+\_\+ivisurf}{g_id_ivisurf}}]{\setlength{\rightskip}{0pt plus 5cm}uint32\+\_\+t g\+\_\+id\+\_\+ivisurf = 9009}\hypertarget{simple-egl_8cpp_a28f56c9f01ed9f108201950645317cc9}{}\label{simple-egl_8cpp_a28f56c9f01ed9f108201950645317cc9}
897
898
899 Definition at line 59 of file simple-\/egl.\+cpp.
900
901 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!hs@{hs}}
902 \index{hs@{hs}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
903 \subsubsection[{\texorpdfstring{hs}{hs}}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Lib\+Home\+Screen}$\ast$ hs}\hypertarget{simple-egl_8cpp_a529acbd1fed9d98a587edfa62309fa8d}{}\label{simple-egl_8cpp_a529acbd1fed9d98a587edfa62309fa8d}
904
905
906 Definition at line 66 of file simple-\/egl.\+cpp.
907
908 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!ivi\+\_\+application\+\_\+interface@{ivi\+\_\+application\+\_\+interface}}
909 \index{ivi\+\_\+application\+\_\+interface@{ivi\+\_\+application\+\_\+interface}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
910 \subsubsection[{\texorpdfstring{ivi\+\_\+application\+\_\+interface}{ivi_application_interface}}]{\setlength{\rightskip}{0pt plus 5cm}const struct wl\+\_\+interface ivi\+\_\+application\+\_\+interface}\hypertarget{simple-egl_8cpp_a769b65b7b0e834f732f1f45e835890d5}{}\label{simple-egl_8cpp_a769b65b7b0e834f732f1f45e835890d5}
911 {\bfseries Initial value\+:}
912 \begin{DoxyCode}
913 = \{
914     \textcolor{stringliteral}{"ivi\_application"}, 1,
915     1, \hyperlink{simple-egl_8cpp_a21a39b7c6cf5f6d10a62a70b3ebc9bad}{ivi\_application\_requests},
916     0, NULL,
917 \}
918 \end{DoxyCode}
919
920
921 Definition at line 95 of file simple-\/egl.\+cpp.
922
923 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!ivi\+\_\+application\+\_\+requests@{ivi\+\_\+application\+\_\+requests}}
924 \index{ivi\+\_\+application\+\_\+requests@{ivi\+\_\+application\+\_\+requests}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
925 \subsubsection[{\texorpdfstring{ivi\+\_\+application\+\_\+requests}{ivi_application_requests}}]{\setlength{\rightskip}{0pt plus 5cm}const struct wl\+\_\+message ivi\+\_\+application\+\_\+requests\mbox{[}$\,$\mbox{]}\hspace{0.3cm}{\ttfamily [static]}}\hypertarget{simple-egl_8cpp_a21a39b7c6cf5f6d10a62a70b3ebc9bad}{}\label{simple-egl_8cpp_a21a39b7c6cf5f6d10a62a70b3ebc9bad}
926 {\bfseries Initial value\+:}
927 \begin{DoxyCode}
928 = \{
929         \{ \textcolor{stringliteral}{"surface\_create"}, \textcolor{stringliteral}{"uon"}, \hyperlink{simple-egl_8cpp_aea3203db9e218d3e5d60bdb4ebe2fa1f}{types} + 2 \},
930 \}
931 \end{DoxyCode}
932
933
934 Definition at line 91 of file simple-\/egl.\+cpp.
935
936 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!ivi\+\_\+surface\+\_\+events@{ivi\+\_\+surface\+\_\+events}}
937 \index{ivi\+\_\+surface\+\_\+events@{ivi\+\_\+surface\+\_\+events}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
938 \subsubsection[{\texorpdfstring{ivi\+\_\+surface\+\_\+events}{ivi_surface_events}}]{\setlength{\rightskip}{0pt plus 5cm}const struct wl\+\_\+message ivi\+\_\+surface\+\_\+events\mbox{[}$\,$\mbox{]}\hspace{0.3cm}{\ttfamily [static]}}\hypertarget{simple-egl_8cpp_ac848f4fbf712a9ba414272fa85577791}{}\label{simple-egl_8cpp_ac848f4fbf712a9ba414272fa85577791}
939 {\bfseries Initial value\+:}
940 \begin{DoxyCode}
941 = \{
942         \{ \textcolor{stringliteral}{"configure"}, \textcolor{stringliteral}{"ii"}, \hyperlink{simple-egl_8cpp_aea3203db9e218d3e5d60bdb4ebe2fa1f}{types} + 0 \},
943 \}
944 \end{DoxyCode}
945
946
947 Definition at line 81 of file simple-\/egl.\+cpp.
948
949 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!ivi\+\_\+surface\+\_\+interface@{ivi\+\_\+surface\+\_\+interface}}
950 \index{ivi\+\_\+surface\+\_\+interface@{ivi\+\_\+surface\+\_\+interface}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
951 \subsubsection[{\texorpdfstring{ivi\+\_\+surface\+\_\+interface}{ivi_surface_interface}}]{\setlength{\rightskip}{0pt plus 5cm}const struct wl\+\_\+interface ivi\+\_\+surface\+\_\+interface}\hypertarget{simple-egl_8cpp_adf384de8d12d2edd7265ab85fd16b11c}{}\label{simple-egl_8cpp_adf384de8d12d2edd7265ab85fd16b11c}
952 {\bfseries Initial value\+:}
953 \begin{DoxyCode}
954 = \{
955         \textcolor{stringliteral}{"ivi\_surface"}, 1,
956         1, \hyperlink{simple-egl_8cpp_ada80120c5590d2821da9babef808b98d}{ivi\_surface\_requests},
957         1, \hyperlink{simple-egl_8cpp_ac848f4fbf712a9ba414272fa85577791}{ivi\_surface\_events},
958 \}
959 \end{DoxyCode}
960
961
962 Definition at line 85 of file simple-\/egl.\+cpp.
963
964 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!ivi\+\_\+surface\+\_\+requests@{ivi\+\_\+surface\+\_\+requests}}
965 \index{ivi\+\_\+surface\+\_\+requests@{ivi\+\_\+surface\+\_\+requests}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
966 \subsubsection[{\texorpdfstring{ivi\+\_\+surface\+\_\+requests}{ivi_surface_requests}}]{\setlength{\rightskip}{0pt plus 5cm}const struct wl\+\_\+message ivi\+\_\+surface\+\_\+requests\mbox{[}$\,$\mbox{]}\hspace{0.3cm}{\ttfamily [static]}}\hypertarget{simple-egl_8cpp_ada80120c5590d2821da9babef808b98d}{}\label{simple-egl_8cpp_ada80120c5590d2821da9babef808b98d}
967 {\bfseries Initial value\+:}
968 \begin{DoxyCode}
969 = \{
970         \{ \textcolor{stringliteral}{"destroy"}, \textcolor{stringliteral}{""}, \hyperlink{simple-egl_8cpp_aea3203db9e218d3e5d60bdb4ebe2fa1f}{types} + 0 \},
971 \}
972 \end{DoxyCode}
973
974
975 Definition at line 77 of file simple-\/egl.\+cpp.
976
977 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!log\+\_\+prefix@{log\+\_\+prefix}}
978 \index{log\+\_\+prefix@{log\+\_\+prefix}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
979 \subsubsection[{\texorpdfstring{log\+\_\+prefix}{log_prefix}}]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ log\+\_\+prefix = \char`\"{}simple-\/egl\char`\"{}}\hypertarget{simple-egl_8cpp_a894f18168fa25101d792262f59846938}{}\label{simple-egl_8cpp_a894f18168fa25101d792262f59846938}
980
981
982 Definition at line 58 of file simple-\/egl.\+cpp.
983
984 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!main\+\_\+role@{main\+\_\+role}}
985 \index{main\+\_\+role@{main\+\_\+role}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
986 \subsubsection[{\texorpdfstring{main\+\_\+role}{main_role}}]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ main\+\_\+role = \char`\"{}navigation\char`\"{}}\hypertarget{simple-egl_8cpp_a332251aa739a56836cd4fbf3ecbb8bb2}{}\label{simple-egl_8cpp_a332251aa739a56836cd4fbf3ecbb8bb2}
987
988
989 Definition at line 64 of file simple-\/egl.\+cpp.
990
991 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!port@{port}}
992 \index{port@{port}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
993 \subsubsection[{\texorpdfstring{port}{port}}]{\setlength{\rightskip}{0pt plus 5cm}long port = 1700}\hypertarget{simple-egl_8cpp_a300b6806fe6818927fe4df08f2398124}{}\label{simple-egl_8cpp_a300b6806fe6818927fe4df08f2398124}
994
995
996 Definition at line 60 of file simple-\/egl.\+cpp.
997
998 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!registry\+\_\+listener@{registry\+\_\+listener}}
999 \index{registry\+\_\+listener@{registry\+\_\+listener}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
1000 \subsubsection[{\texorpdfstring{registry\+\_\+listener}{registry_listener}}]{\setlength{\rightskip}{0pt plus 5cm}const struct wl\+\_\+registry\+\_\+listener registry\+\_\+listener\hspace{0.3cm}{\ttfamily [static]}}\hypertarget{simple-egl_8cpp_a8998c87c94cd7d185e8f0cdafab4b1c4}{}\label{simple-egl_8cpp_a8998c87c94cd7d185e8f0cdafab4b1c4}
1001 {\bfseries Initial value\+:}
1002 \begin{DoxyCode}
1003 = \{
1004     \hyperlink{simple-egl_8cpp_af288e02a94c196a68b327fc55c049932}{registry\_handle\_global},
1005     \hyperlink{simple-egl_8cpp_a59a731b9efa9d6a2015cdc8ccae1db80}{registry\_handle\_global\_remove}
1006 \}
1007 \end{DoxyCode}
1008
1009
1010 Definition at line 515 of file simple-\/egl.\+cpp.
1011
1012 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!running@{running}}
1013 \index{running@{running}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
1014 \subsubsection[{\texorpdfstring{running}{running}}]{\setlength{\rightskip}{0pt plus 5cm}int running = 1\hspace{0.3cm}{\ttfamily [static]}}\hypertarget{simple-egl_8cpp_a2f45113638a0b749a8a205d2cd7fb42b}{}\label{simple-egl_8cpp_a2f45113638a0b749a8a205d2cd7fb42b}
1015
1016
1017 Definition at line 171 of file simple-\/egl.\+cpp.
1018
1019 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!token@{token}}
1020 \index{token@{token}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
1021 \subsubsection[{\texorpdfstring{token}{token}}]{\setlength{\rightskip}{0pt plus 5cm}string token = string(\char`\"{}wm\char`\"{})}\hypertarget{simple-egl_8cpp_a623ef6987ef3bd185c07b28b13e46d34}{}\label{simple-egl_8cpp_a623ef6987ef3bd185c07b28b13e46d34}
1022
1023
1024 Definition at line 61 of file simple-\/egl.\+cpp.
1025
1026 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!types@{types}}
1027 \index{types@{types}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
1028 \subsubsection[{\texorpdfstring{types}{types}}]{\setlength{\rightskip}{0pt plus 5cm}const struct wl\+\_\+interface$\ast$ types\mbox{[}$\,$\mbox{]}\hspace{0.3cm}{\ttfamily [static]}}\hypertarget{simple-egl_8cpp_aea3203db9e218d3e5d60bdb4ebe2fa1f}{}\label{simple-egl_8cpp_aea3203db9e218d3e5d60bdb4ebe2fa1f}
1029 {\bfseries Initial value\+:}
1030 \begin{DoxyCode}
1031 = \{
1032         NULL,
1033         NULL,
1034         NULL,
1035         &wl\_surface\_interface,
1036         &\hyperlink{simple-egl_8cpp_adf384de8d12d2edd7265ab85fd16b11c}{ivi\_surface\_interface},
1037 \}
1038 \end{DoxyCode}
1039
1040
1041 Definition at line 69 of file simple-\/egl.\+cpp.
1042
1043 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!vert\+\_\+shader\+\_\+text@{vert\+\_\+shader\+\_\+text}}
1044 \index{vert\+\_\+shader\+\_\+text@{vert\+\_\+shader\+\_\+text}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
1045 \subsubsection[{\texorpdfstring{vert\+\_\+shader\+\_\+text}{vert_shader_text}}]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ vert\+\_\+shader\+\_\+text\hspace{0.3cm}{\ttfamily [static]}}\hypertarget{simple-egl_8cpp_a717575939a37d84dcd4cf0447a630834}{}\label{simple-egl_8cpp_a717575939a37d84dcd4cf0447a630834}
1046 {\bfseries Initial value\+:}
1047 \begin{DoxyCode}
1048 =
1049     \textcolor{stringliteral}{"uniform mat4 rotation;\(\backslash\)n"}
1050     \textcolor{stringliteral}{"attribute vec4 pos;\(\backslash\)n"}
1051     \textcolor{stringliteral}{"attribute vec4 color;\(\backslash\)n"}
1052     \textcolor{stringliteral}{"varying vec4 v\_color;\(\backslash\)n"}
1053     \textcolor{stringliteral}{"void main() \{\(\backslash\)n"}
1054     \textcolor{stringliteral}{"  gl\_Position = rotation * pos;\(\backslash\)n"}
1055     \textcolor{stringliteral}{"  v\_color = color;\(\backslash\)n"}
1056     \textcolor{stringliteral}{"\}\(\backslash\)n"}
1057 \end{DoxyCode}
1058
1059
1060 Definition at line 154 of file simple-\/egl.\+cpp.
1061
1062 \index{simple-\/egl.\+cpp@{simple-\/egl.\+cpp}!wm@{wm}}
1063 \index{wm@{wm}!simple-\/egl.\+cpp@{simple-\/egl.\+cpp}}
1064 \subsubsection[{\texorpdfstring{wm}{wm}}]{\setlength{\rightskip}{0pt plus 5cm}Lib\+Windowmanager$\ast$ wm}\hypertarget{simple-egl_8cpp_ad1513698e07197206c290f94d7669d85}{}\label{simple-egl_8cpp_ad1513698e07197206c290f94d7669d85}
1065
1066
1067 Definition at line 67 of file simple-\/egl.\+cpp.
1068