-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaddon-instance_2_screensaver_8h_source.html
295 lines (293 loc) · 43.1 KB
/
addon-instance_2_screensaver_8h_source.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Kodi Development: /home/alwin/Development/Kodi/kodi-N-sync-addon-doxygen/xbmc/addons/kodi-dev-kit/include/kodi/addon-instance/Screensaver.h 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>
<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>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function() { init_search(); });
/* @license-end */
</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="projectlogo"><img alt="Logo" src="kodi-dev.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Kodi Development
 <span id="projectnumber">20.0</span>
</div>
<div id="projectbrief">for Binary and Script based Add-Ons</div>
</td>
<td> <div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.svg"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
</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">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('addon-instance_2_screensaver_8h_source.html',''); initResizable(); });
/* @license-end */
</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">Screensaver.h</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Copyright (C) 2005-2018 Team Kodi</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> * This file is part of Kodi - https://kodi.tv</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> *</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * SPDX-License-Identifier: GPL-2.0-or-later</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * See LICENSES/README.md for more information.</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> */</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>  </div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>  </div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="preprocessor">#include "../AddonBase.h"</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="preprocessor">#include "../c-api/addon-instance/screensaver.h"</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="preprocessor">#include "../gui/renderHelper.h"</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>  </div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="keyword">namespace </span>kodi</div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> {</div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="keyword">namespace </span>addon</div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> {</div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>  </div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment">//==============================================================================</span></div>
<div class="line"><a name="l00193"></a><span class="lineno"><a class="line" href="classkodi_1_1addon_1_1_c_instance_screensaver.html"> 193</a></span> <span class="comment"></span><span class="keyword">class </span>ATTRIBUTE_HIDDEN <a class="code" href="classkodi_1_1addon_1_1_c_instance_screensaver.html">CInstanceScreensaver</a> : <span class="keyword">public</span> <a class="code" href="classkodi_1_1addon_1_1_i_addon_instance.html">IAddonInstance</a></div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span> {</div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span> <span class="keyword">public</span>:</div>
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00202"></a><span class="lineno"><a class="line" href="group__cpp__kodi__addon__screensaver.html#ga1aea828e7f23e2a5837d34bb2b3d48f9"> 202</a></span> <span class="comment"></span> <a class="code" href="group__cpp__kodi__addon__screensaver.html#ga1aea828e7f23e2a5837d34bb2b3d48f9">CInstanceScreensaver</a>()</div>
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  : <a class="code" href="classkodi_1_1addon_1_1_i_addon_instance.html">IAddonInstance</a>(<a class="code" href="group__cpp__kodi__addon__addonbase___defs___a_d_d_o_n___t_y_p_e.html#ggada0b4c3c9f9c168e5e1c27145ec72357a84fe3fcf6a482a0188eeea3e3b31f499">ADDON_INSTANCE_SCREENSAVER</a>, <a class="code" href="group__cpp__kodi.html#ga3f6e41fe0bc423ec7d065fbdf3f47e98">GetKodiTypeVersion</a>(<a class="code" href="group__cpp__kodi__addon__addonbase___defs___a_d_d_o_n___t_y_p_e.html#ggada0b4c3c9f9c168e5e1c27145ec72357a84fe3fcf6a482a0188eeea3e3b31f499">ADDON_INSTANCE_SCREENSAVER</a>))</div>
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  {</div>
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  <span class="keywordflow">if</span> (CAddonBase::m_interface->globalSingleInstance != <span class="keyword">nullptr</span>)</div>
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  <span class="keywordflow">throw</span> std::logic_error(<span class="stringliteral">"kodi::addon::CInstanceScreensaver: Creation of more as one in single "</span></div>
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  <span class="stringliteral">"instance way is not allowed!"</span>);</div>
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  </div>
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  SetAddonStruct(CAddonBase::m_interface->firstKodiInstance);</div>
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  CAddonBase::m_interface->globalSingleInstance = <span class="keyword">this</span>;</div>
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  }</div>
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  <span class="comment">//----------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  </div>
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00255"></a><span class="lineno"><a class="line" href="group__cpp__kodi__addon__screensaver.html#ga2af22de2470b31dc0aa61f1ce35bf320"> 255</a></span> <span class="comment"></span> <span class="keyword">explicit</span> <a class="code" href="group__cpp__kodi__addon__screensaver.html#ga2af22de2470b31dc0aa61f1ce35bf320">CInstanceScreensaver</a>(KODI_HANDLE instance, <span class="keyword">const</span> std::string& kodiVersion = <span class="stringliteral">""</span>)</div>
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  : <a class="code" href="classkodi_1_1addon_1_1_i_addon_instance.html">IAddonInstance</a>(<a class="code" href="group__cpp__kodi__addon__addonbase___defs___a_d_d_o_n___t_y_p_e.html#ggada0b4c3c9f9c168e5e1c27145ec72357a84fe3fcf6a482a0188eeea3e3b31f499">ADDON_INSTANCE_SCREENSAVER</a>,</div>
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  !kodiVersion.empty() ? kodiVersion</div>
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  : <a class="code" href="group__cpp__kodi.html#ga3f6e41fe0bc423ec7d065fbdf3f47e98">GetKodiTypeVersion</a>(<a class="code" href="group__cpp__kodi__addon__addonbase___defs___a_d_d_o_n___t_y_p_e.html#ggada0b4c3c9f9c168e5e1c27145ec72357a84fe3fcf6a482a0188eeea3e3b31f499">ADDON_INSTANCE_SCREENSAVER</a>))</div>
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  {</div>
<div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  <span class="keywordflow">if</span> (CAddonBase::m_interface->globalSingleInstance != <span class="keyword">nullptr</span>)</div>
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  <span class="keywordflow">throw</span> std::logic_error(<span class="stringliteral">"kodi::addon::CInstanceScreensaver: Creation of multiple together "</span></div>
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  <span class="stringliteral">"with single instance way is not allowed!"</span>);</div>
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  </div>
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  SetAddonStruct(instance);</div>
<div class="line"><a name="l00265"></a><span class="lineno"> 265</span>  }</div>
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  <span class="comment">//----------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  </div>
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00272"></a><span class="lineno"><a class="line" href="group__cpp__kodi__addon__screensaver.html#ga7168a70cecb9b102d950c9fc1fa19270"> 272</a></span> <span class="comment"></span> <a class="code" href="group__cpp__kodi__addon__screensaver.html#ga7168a70cecb9b102d950c9fc1fa19270">~CInstanceScreensaver</a>() <span class="keyword">override</span> = <span class="keywordflow">default</span>;</div>
<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  <span class="comment">//----------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  </div>
<div class="line"><a name="l00275"></a><span class="lineno"> 275</span>  <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00281"></a><span class="lineno"><a class="line" href="group__cpp__kodi__addon__screensaver.html#ga5ece6330cf785d6fcdc95c43ebfdcb9b"> 281</a></span> <span class="comment"></span> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="group__cpp__kodi__addon__screensaver.html#ga5ece6330cf785d6fcdc95c43ebfdcb9b">Start</a>() { <span class="keywordflow">return</span> <span class="keyword">true</span>; }</div>
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  <span class="comment">//----------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  </div>
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00289"></a><span class="lineno"><a class="line" href="group__cpp__kodi__addon__screensaver.html#gaf6f113a64b92a63894b285b4f2a2c3a5"> 289</a></span> <span class="comment"></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="group__cpp__kodi__addon__screensaver.html#gaf6f113a64b92a63894b285b4f2a2c3a5">Stop</a>() {}</div>
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  <span class="comment">//----------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>  </div>
<div class="line"><a name="l00292"></a><span class="lineno"> 292</span>  <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00296"></a><span class="lineno"><a class="line" href="group__cpp__kodi__addon__screensaver.html#ga0bc3f3606d9cf5304dac90cd7a619194"> 296</a></span> <span class="comment"></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="group__cpp__kodi__addon__screensaver.html#ga0bc3f3606d9cf5304dac90cd7a619194">Render</a>() {}</div>
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>  <span class="comment">//----------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  </div>
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>  <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00305"></a><span class="lineno"> 305</span> <span class="comment"></span> </div>
<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>  <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00330"></a><span class="lineno"><a class="line" href="group__cpp__kodi__addon__screensaver___c_b.html#ga8172434167b6832d9b0a16e520de0e32"> 330</a></span> <span class="comment"></span> <span class="keyword">inline</span> kodi::HardwareContext <a class="code" href="group__cpp__kodi__addon__screensaver___c_b.html#ga8172434167b6832d9b0a16e520de0e32">Device</a>() { <span class="keywordflow">return</span> m_instanceData->props->device; }</div>
<div class="line"><a name="l00331"></a><span class="lineno"> 331</span>  <span class="comment">//----------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00332"></a><span class="lineno"> 332</span>  </div>
<div class="line"><a name="l00333"></a><span class="lineno"> 333</span>  <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00339"></a><span class="lineno"><a class="line" href="group__cpp__kodi__addon__screensaver___c_b.html#gaafabadb78034330e508ebff9c58e0839"> 339</a></span> <span class="comment"></span> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="group__cpp__kodi__addon__screensaver___c_b.html#gaafabadb78034330e508ebff9c58e0839">X</a>() { <span class="keywordflow">return</span> m_instanceData->props->x; }</div>
<div class="line"><a name="l00340"></a><span class="lineno"> 340</span>  <span class="comment">//----------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00341"></a><span class="lineno"> 341</span>  </div>
<div class="line"><a name="l00342"></a><span class="lineno"> 342</span>  <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00348"></a><span class="lineno"><a class="line" href="group__cpp__kodi__addon__screensaver___c_b.html#gae17c4a6c158b5533f640b52d757b5519"> 348</a></span> <span class="comment"></span> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="group__cpp__kodi__addon__screensaver___c_b.html#gae17c4a6c158b5533f640b52d757b5519">Y</a>() { <span class="keywordflow">return</span> m_instanceData->props->y; }</div>
<div class="line"><a name="l00349"></a><span class="lineno"> 349</span>  <span class="comment">//----------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00350"></a><span class="lineno"> 350</span>  </div>
<div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00357"></a><span class="lineno"><a class="line" href="group__cpp__kodi__addon__screensaver___c_b.html#gad26a595463349d0214ea9c09fb31c401"> 357</a></span> <span class="comment"></span> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="group__cpp__kodi__addon__screensaver___c_b.html#gad26a595463349d0214ea9c09fb31c401">Width</a>() { <span class="keywordflow">return</span> m_instanceData->props->width; }</div>
<div class="line"><a name="l00358"></a><span class="lineno"> 358</span>  <span class="comment">//----------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00359"></a><span class="lineno"> 359</span>  </div>
<div class="line"><a name="l00360"></a><span class="lineno"> 360</span>  <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00366"></a><span class="lineno"><a class="line" href="group__cpp__kodi__addon__screensaver___c_b.html#ga40afc903300fe3a6804393874e257170"> 366</a></span> <span class="comment"></span> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="group__cpp__kodi__addon__screensaver___c_b.html#ga40afc903300fe3a6804393874e257170">Height</a>() { <span class="keywordflow">return</span> m_instanceData->props->height; }</div>
<div class="line"><a name="l00367"></a><span class="lineno"> 367</span>  <span class="comment">//----------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00368"></a><span class="lineno"> 368</span>  </div>
<div class="line"><a name="l00369"></a><span class="lineno"> 369</span>  <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00376"></a><span class="lineno"><a class="line" href="group__cpp__kodi__addon__screensaver___c_b.html#gaed543c2faa2875e81791a9a84b76ab56"> 376</a></span> <span class="comment"></span> <span class="keyword">inline</span> <span class="keywordtype">float</span> <a class="code" href="group__cpp__kodi__addon__screensaver___c_b.html#gaed543c2faa2875e81791a9a84b76ab56">PixelRatio</a>() { <span class="keywordflow">return</span> m_instanceData->props->pixelRatio; }</div>
<div class="line"><a name="l00377"></a><span class="lineno"> 377</span>  <span class="comment">//----------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00378"></a><span class="lineno"> 378</span>  </div>
<div class="line"><a name="l00379"></a><span class="lineno"> 379</span>  <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00385"></a><span class="lineno"><a class="line" href="group__cpp__kodi__addon__screensaver___c_b.html#gaea85a30f7330f34848f1ca2313fcbc62"> 385</a></span> <span class="comment"></span> <span class="keyword">inline</span> std::string <a class="code" href="group__cpp__kodi__addon__screensaver___c_b.html#gaea85a30f7330f34848f1ca2313fcbc62">Name</a>() { <span class="keywordflow">return</span> m_instanceData->props->name; }</div>
<div class="line"><a name="l00386"></a><span class="lineno"> 386</span>  <span class="comment">//----------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00387"></a><span class="lineno"> 387</span>  </div>
<div class="line"><a name="l00388"></a><span class="lineno"> 388</span>  <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00395"></a><span class="lineno"><a class="line" href="group__cpp__kodi__addon__screensaver___c_b.html#ga2664b8df9b7970b2482b362c12cfe1f6"> 395</a></span> <span class="comment"></span> <span class="keyword">inline</span> std::string <a class="code" href="group__cpp__kodi__addon__screensaver___c_b.html#ga2664b8df9b7970b2482b362c12cfe1f6">Presets</a>() { <span class="keywordflow">return</span> m_instanceData->props->presets; }</div>
<div class="line"><a name="l00396"></a><span class="lineno"> 396</span>  <span class="comment">//----------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00397"></a><span class="lineno"> 397</span>  </div>
<div class="line"><a name="l00398"></a><span class="lineno"> 398</span>  <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00408"></a><span class="lineno"><a class="line" href="group__cpp__kodi__addon__screensaver___c_b.html#ga85035689dc2f1796f5acd2fd25053e3d"> 408</a></span> <span class="comment"></span> <span class="keyword">inline</span> std::string <a class="code" href="group__cpp__kodi__addon__screensaver___c_b.html#ga85035689dc2f1796f5acd2fd25053e3d">Profile</a>() { <span class="keywordflow">return</span> m_instanceData->props->profile; }</div>
<div class="line"><a name="l00409"></a><span class="lineno"> 409</span>  <span class="comment">//----------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00410"></a><span class="lineno"> 410</span>  </div>
<div class="line"><a name="l00412"></a><span class="lineno"> 412</span>  </div>
<div class="line"><a name="l00413"></a><span class="lineno"> 413</span> <span class="keyword">private</span>:</div>
<div class="line"><a name="l00414"></a><span class="lineno"> 414</span>  <span class="keywordtype">void</span> SetAddonStruct(KODI_HANDLE instance)</div>
<div class="line"><a name="l00415"></a><span class="lineno"> 415</span>  {</div>
<div class="line"><a name="l00416"></a><span class="lineno"> 416</span>  <span class="keywordflow">if</span> (instance == <span class="keyword">nullptr</span>)</div>
<div class="line"><a name="l00417"></a><span class="lineno"> 417</span>  <span class="keywordflow">throw</span> std::logic_error(<span class="stringliteral">"kodi::addon::CInstanceScreensaver: Creation with empty addon "</span></div>
<div class="line"><a name="l00418"></a><span class="lineno"> 418</span>  <span class="stringliteral">"structure not allowed, table must be given from Kodi!"</span>);</div>
<div class="line"><a name="l00419"></a><span class="lineno"> 419</span>  </div>
<div class="line"><a name="l00420"></a><span class="lineno"> 420</span>  m_instanceData = <span class="keyword">static_cast<</span><a class="code" href="struct_addon_instance___screensaver.html">AddonInstance_Screensaver</a>*<span class="keyword">></span>(instance);</div>
<div class="line"><a name="l00421"></a><span class="lineno"> 421</span>  m_instanceData->toAddon->addonInstance = <span class="keyword">this</span>;</div>
<div class="line"><a name="l00422"></a><span class="lineno"> 422</span>  m_instanceData->toAddon->Start = ADDON_Start;</div>
<div class="line"><a name="l00423"></a><span class="lineno"> 423</span>  m_instanceData->toAddon->Stop = ADDON_Stop;</div>
<div class="line"><a name="l00424"></a><span class="lineno"> 424</span>  m_instanceData->toAddon->Render = ADDON_Render;</div>
<div class="line"><a name="l00425"></a><span class="lineno"> 425</span>  }</div>
<div class="line"><a name="l00426"></a><span class="lineno"> 426</span>  </div>
<div class="line"><a name="l00427"></a><span class="lineno"> 427</span>  <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">bool</span> ADDON_Start(<a class="code" href="struct_addon_instance___screensaver.html">AddonInstance_Screensaver</a>* instance)</div>
<div class="line"><a name="l00428"></a><span class="lineno"> 428</span>  {</div>
<div class="line"><a name="l00429"></a><span class="lineno"> 429</span>  CInstanceScreensaver* thisClass =</div>
<div class="line"><a name="l00430"></a><span class="lineno"> 430</span>  <span class="keyword">static_cast<</span>CInstanceScreensaver*<span class="keyword">></span>(instance->toAddon->addonInstance);</div>
<div class="line"><a name="l00431"></a><span class="lineno"> 431</span>  thisClass->m_renderHelper = kodi::gui::GetRenderHelper();</div>
<div class="line"><a name="l00432"></a><span class="lineno"> 432</span>  <span class="keywordflow">return</span> thisClass->Start();</div>
<div class="line"><a name="l00433"></a><span class="lineno"> 433</span>  }</div>
<div class="line"><a name="l00434"></a><span class="lineno"> 434</span>  </div>
<div class="line"><a name="l00435"></a><span class="lineno"> 435</span>  <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> ADDON_Stop(<a class="code" href="struct_addon_instance___screensaver.html">AddonInstance_Screensaver</a>* instance)</div>
<div class="line"><a name="l00436"></a><span class="lineno"> 436</span>  {</div>
<div class="line"><a name="l00437"></a><span class="lineno"> 437</span>  CInstanceScreensaver* thisClass =</div>
<div class="line"><a name="l00438"></a><span class="lineno"> 438</span>  <span class="keyword">static_cast<</span>CInstanceScreensaver*<span class="keyword">></span>(instance->toAddon->addonInstance);</div>
<div class="line"><a name="l00439"></a><span class="lineno"> 439</span>  thisClass->Stop();</div>
<div class="line"><a name="l00440"></a><span class="lineno"> 440</span>  thisClass->m_renderHelper = <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00441"></a><span class="lineno"> 441</span>  }</div>
<div class="line"><a name="l00442"></a><span class="lineno"> 442</span>  </div>
<div class="line"><a name="l00443"></a><span class="lineno"> 443</span>  <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> ADDON_Render(<a class="code" href="struct_addon_instance___screensaver.html">AddonInstance_Screensaver</a>* instance)</div>
<div class="line"><a name="l00444"></a><span class="lineno"> 444</span>  {</div>
<div class="line"><a name="l00445"></a><span class="lineno"> 445</span>  CInstanceScreensaver* thisClass =</div>
<div class="line"><a name="l00446"></a><span class="lineno"> 446</span>  <span class="keyword">static_cast<</span>CInstanceScreensaver*<span class="keyword">></span>(instance->toAddon->addonInstance);</div>
<div class="line"><a name="l00447"></a><span class="lineno"> 447</span>  </div>
<div class="line"><a name="l00448"></a><span class="lineno"> 448</span>  <span class="keywordflow">if</span> (!thisClass->m_renderHelper)</div>
<div class="line"><a name="l00449"></a><span class="lineno"> 449</span>  <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00450"></a><span class="lineno"> 450</span>  thisClass->m_renderHelper->Begin();</div>
<div class="line"><a name="l00451"></a><span class="lineno"> 451</span>  thisClass->Render();</div>
<div class="line"><a name="l00452"></a><span class="lineno"> 452</span>  thisClass->m_renderHelper->End();</div>
<div class="line"><a name="l00453"></a><span class="lineno"> 453</span>  }</div>
<div class="line"><a name="l00454"></a><span class="lineno"> 454</span>  </div>
<div class="line"><a name="l00455"></a><span class="lineno"> 455</span>  <span class="comment">/*</span></div>
<div class="line"><a name="l00456"></a><span class="lineno"> 456</span> <span class="comment"> * Background render helper holds here and in addon base.</span></div>
<div class="line"><a name="l00457"></a><span class="lineno"> 457</span> <span class="comment"> * In addon base also to have for the others, and stored here for the worst</span></div>
<div class="line"><a name="l00458"></a><span class="lineno"> 458</span> <span class="comment"> * case where this class is independent from base and base becomes closed</span></div>
<div class="line"><a name="l00459"></a><span class="lineno"> 459</span> <span class="comment"> * before.</span></div>
<div class="line"><a name="l00460"></a><span class="lineno"> 460</span> <span class="comment"> *</span></div>
<div class="line"><a name="l00461"></a><span class="lineno"> 461</span> <span class="comment"> * This is on Kodi with GL unused and the calls to there are empty (no work)</span></div>
<div class="line"><a name="l00462"></a><span class="lineno"> 462</span> <span class="comment"> * On Kodi with Direct X where angle is present becomes this used.</span></div>
<div class="line"><a name="l00463"></a><span class="lineno"> 463</span> <span class="comment"> */</span></div>
<div class="line"><a name="l00464"></a><span class="lineno"> 464</span>  std::shared_ptr<kodi::gui::IRenderHelper> m_renderHelper;</div>
<div class="line"><a name="l00465"></a><span class="lineno"> 465</span>  <a class="code" href="struct_addon_instance___screensaver.html">AddonInstance_Screensaver</a>* m_instanceData;</div>
<div class="line"><a name="l00466"></a><span class="lineno"> 466</span> };</div>
<div class="line"><a name="l00467"></a><span class="lineno"> 467</span>  </div>
<div class="line"><a name="l00468"></a><span class="lineno"> 468</span> } <span class="comment">/* namespace addon */</span></div>
<div class="line"><a name="l00469"></a><span class="lineno"> 469</span> } <span class="comment">/* namespace kodi */</span></div>
<div class="line"><a name="l00470"></a><span class="lineno"> 470</span> <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span><span class="preprocessor"></span></div>
<div class="ttc" id="aclasskodi_1_1addon_1_1_c_instance_screensaver_html"><div class="ttname"><a href="classkodi_1_1addon_1_1_c_instance_screensaver.html">kodi::addon::CInstanceScreensaver</a></div><div class="ttdef"><b>Definition:</b> Screensaver.h:194</div></div>
<div class="ttc" id="aclasskodi_1_1addon_1_1_i_addon_instance_html"><div class="ttname"><a href="classkodi_1_1addon_1_1_i_addon_instance.html">kodi::addon::IAddonInstance</a></div><div class="ttdef"><b>Definition:</b> AddonBase.h:186</div></div>
<div class="ttc" id="agroup__cpp__kodi__addon__addonbase___defs___a_d_d_o_n___t_y_p_e_html_ggada0b4c3c9f9c168e5e1c27145ec72357a84fe3fcf6a482a0188eeea3e3b31f499"><div class="ttname"><a href="group__cpp__kodi__addon__addonbase___defs___a_d_d_o_n___t_y_p_e.html#ggada0b4c3c9f9c168e5e1c27145ec72357a84fe3fcf6a482a0188eeea3e3b31f499">ADDON_INSTANCE_SCREENSAVER</a></div><div class="ttdeci">@ ADDON_INSTANCE_SCREENSAVER</div><div class="ttdoc">PVR client instance, see kodi::addon::CInstanceScreensaver.</div><div class="ttdef"><b>Definition:</b> versions.h:235</div></div>
<div class="ttc" id="agroup__cpp__kodi__addon__screensaver___c_b_html_ga2664b8df9b7970b2482b362c12cfe1f6"><div class="ttname"><a href="group__cpp__kodi__addon__screensaver___c_b.html#ga2664b8df9b7970b2482b362c12cfe1f6">kodi::addon::CInstanceScreensaver::Presets</a></div><div class="ttdeci">std::string Presets()</div><div class="ttdoc">Used to get the full path where the add-on is installed.</div><div class="ttdef"><b>Definition:</b> Screensaver.h:395</div></div>
<div class="ttc" id="agroup__cpp__kodi__addon__screensaver___c_b_html_ga40afc903300fe3a6804393874e257170"><div class="ttname"><a href="group__cpp__kodi__addon__screensaver___c_b.html#ga40afc903300fe3a6804393874e257170">kodi::addon::CInstanceScreensaver::Height</a></div><div class="ttdeci">int Height()</div><div class="ttdoc">Returns the height of the rendering window.</div><div class="ttdef"><b>Definition:</b> Screensaver.h:366</div></div>
<div class="ttc" id="agroup__cpp__kodi__addon__screensaver___c_b_html_ga8172434167b6832d9b0a16e520de0e32"><div class="ttname"><a href="group__cpp__kodi__addon__screensaver___c_b.html#ga8172434167b6832d9b0a16e520de0e32">kodi::addon::CInstanceScreensaver::Device</a></div><div class="ttdeci">kodi::HardwareContext Device()</div><div class="ttdoc">Device that represents the display adapter.</div><div class="ttdef"><b>Definition:</b> Screensaver.h:330</div></div>
<div class="ttc" id="agroup__cpp__kodi__addon__screensaver___c_b_html_ga85035689dc2f1796f5acd2fd25053e3d"><div class="ttname"><a href="group__cpp__kodi__addon__screensaver___c_b.html#ga85035689dc2f1796f5acd2fd25053e3d">kodi::addon::CInstanceScreensaver::Profile</a></div><div class="ttdeci">std::string Profile()</div><div class="ttdoc">Used to get the full path to the add-on's user profile.</div><div class="ttdef"><b>Definition:</b> Screensaver.h:408</div></div>
<div class="ttc" id="agroup__cpp__kodi__addon__screensaver___c_b_html_gaafabadb78034330e508ebff9c58e0839"><div class="ttname"><a href="group__cpp__kodi__addon__screensaver___c_b.html#gaafabadb78034330e508ebff9c58e0839">kodi::addon::CInstanceScreensaver::X</a></div><div class="ttdeci">int X()</div><div class="ttdoc">Returns the X position of the rendering window.</div><div class="ttdef"><b>Definition:</b> Screensaver.h:339</div></div>
<div class="ttc" id="agroup__cpp__kodi__addon__screensaver___c_b_html_gad26a595463349d0214ea9c09fb31c401"><div class="ttname"><a href="group__cpp__kodi__addon__screensaver___c_b.html#gad26a595463349d0214ea9c09fb31c401">kodi::addon::CInstanceScreensaver::Width</a></div><div class="ttdeci">int Width()</div><div class="ttdoc">Returns the width of the rendering window.</div><div class="ttdef"><b>Definition:</b> Screensaver.h:357</div></div>
<div class="ttc" id="agroup__cpp__kodi__addon__screensaver___c_b_html_gae17c4a6c158b5533f640b52d757b5519"><div class="ttname"><a href="group__cpp__kodi__addon__screensaver___c_b.html#gae17c4a6c158b5533f640b52d757b5519">kodi::addon::CInstanceScreensaver::Y</a></div><div class="ttdeci">int Y()</div><div class="ttdoc">Returns the Y position of the rendering window.</div><div class="ttdef"><b>Definition:</b> Screensaver.h:348</div></div>
<div class="ttc" id="agroup__cpp__kodi__addon__screensaver___c_b_html_gaea85a30f7330f34848f1ca2313fcbc62"><div class="ttname"><a href="group__cpp__kodi__addon__screensaver___c_b.html#gaea85a30f7330f34848f1ca2313fcbc62">kodi::addon::CInstanceScreensaver::Name</a></div><div class="ttdeci">std::string Name()</div><div class="ttdoc">Used to get the name of the add-on defined in addon.xml.</div><div class="ttdef"><b>Definition:</b> Screensaver.h:385</div></div>
<div class="ttc" id="agroup__cpp__kodi__addon__screensaver___c_b_html_gaed543c2faa2875e81791a9a84b76ab56"><div class="ttname"><a href="group__cpp__kodi__addon__screensaver___c_b.html#gaed543c2faa2875e81791a9a84b76ab56">kodi::addon::CInstanceScreensaver::PixelRatio</a></div><div class="ttdeci">float PixelRatio()</div><div class="ttdoc">Pixel aspect ratio (often abbreviated PAR) is a ratio that describes how the width of a pixel compare...</div><div class="ttdef"><b>Definition:</b> Screensaver.h:376</div></div>
<div class="ttc" id="agroup__cpp__kodi__addon__screensaver_html_ga0bc3f3606d9cf5304dac90cd7a619194"><div class="ttname"><a href="group__cpp__kodi__addon__screensaver.html#ga0bc3f3606d9cf5304dac90cd7a619194">kodi::addon::CInstanceScreensaver::Render</a></div><div class="ttdeci">virtual void Render()</div><div class="ttdoc">Used to indicate when the add-on should render.</div><div class="ttdef"><b>Definition:</b> Screensaver.h:296</div></div>
<div class="ttc" id="agroup__cpp__kodi__addon__screensaver_html_ga1aea828e7f23e2a5837d34bb2b3d48f9"><div class="ttname"><a href="group__cpp__kodi__addon__screensaver.html#ga1aea828e7f23e2a5837d34bb2b3d48f9">kodi::addon::CInstanceScreensaver::CInstanceScreensaver</a></div><div class="ttdeci">CInstanceScreensaver()</div><div class="ttdoc">Screensaver class constructor.</div><div class="ttdef"><b>Definition:</b> Screensaver.h:202</div></div>
<div class="ttc" id="agroup__cpp__kodi__addon__screensaver_html_ga2af22de2470b31dc0aa61f1ce35bf320"><div class="ttname"><a href="group__cpp__kodi__addon__screensaver.html#ga2af22de2470b31dc0aa61f1ce35bf320">kodi::addon::CInstanceScreensaver::CInstanceScreensaver</a></div><div class="ttdeci">CInstanceScreensaver(KODI_HANDLE instance, const std::string &kodiVersion="")</div><div class="ttdoc">Screensaver class constructor used to support multiple instance types.</div><div class="ttdef"><b>Definition:</b> Screensaver.h:255</div></div>
<div class="ttc" id="agroup__cpp__kodi__addon__screensaver_html_ga5ece6330cf785d6fcdc95c43ebfdcb9b"><div class="ttname"><a href="group__cpp__kodi__addon__screensaver.html#ga5ece6330cf785d6fcdc95c43ebfdcb9b">kodi::addon::CInstanceScreensaver::Start</a></div><div class="ttdeci">virtual bool Start()</div><div class="ttdoc">Used to notify the screensaver that it has been started.</div><div class="ttdef"><b>Definition:</b> Screensaver.h:281</div></div>
<div class="ttc" id="agroup__cpp__kodi__addon__screensaver_html_ga7168a70cecb9b102d950c9fc1fa19270"><div class="ttname"><a href="group__cpp__kodi__addon__screensaver.html#ga7168a70cecb9b102d950c9fc1fa19270">kodi::addon::CInstanceScreensaver::~CInstanceScreensaver</a></div><div class="ttdeci">~CInstanceScreensaver() override=default</div><div class="ttdoc">Destructor.</div></div>
<div class="ttc" id="agroup__cpp__kodi__addon__screensaver_html_gaf6f113a64b92a63894b285b4f2a2c3a5"><div class="ttname"><a href="group__cpp__kodi__addon__screensaver.html#gaf6f113a64b92a63894b285b4f2a2c3a5">kodi::addon::CInstanceScreensaver::Stop</a></div><div class="ttdeci">virtual void Stop()</div><div class="ttdoc">Used to inform the screensaver that the rendering control was stopped.</div><div class="ttdef"><b>Definition:</b> Screensaver.h:289</div></div>
<div class="ttc" id="agroup__cpp__kodi_html_ga3f6e41fe0bc423ec7d065fbdf3f47e98"><div class="ttname"><a href="group__cpp__kodi.html#ga3f6e41fe0bc423ec7d065fbdf3f47e98">kodi::GetKodiTypeVersion</a></div><div class="ttdeci">std::string ATTRIBUTE_HIDDEN GetKodiTypeVersion(int type)</div><div class="ttdoc">To get used version inside Kodi itself about asked type.</div><div class="ttdef"><b>Definition:</b> AddonBase.h:630</div></div>
<div class="ttc" id="astruct_addon_instance___screensaver_html"><div class="ttname"><a href="struct_addon_instance___screensaver.html">AddonInstance_Screensaver</a></div><div class="ttdoc">Screensaver instance.</div><div class="ttdef"><b>Definition:</b> screensaver.h:68</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_818aca8f237de2dab4b332e67c44f0ac.html">include</a></li><li class="navelem"><a class="el" href="dir_e2893ada97b5f5ed70c6c1eae148df10.html">kodi</a></li><li class="navelem"><a class="el" href="dir_726c3e97bb7ce1b0cced8dcef60872f1.html">addon-instance</a></li><li class="navelem"><b>Screensaver.h</b></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
</ul>
</div>
</body>
</html>