-
Notifications
You must be signed in to change notification settings - Fork 1
/
_list_item_8h_source.html
349 lines (347 loc) · 46.4 KB
/
_list_item_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
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
<!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/gui/ListItem.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('_list_item_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">ListItem.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/gui/list_item.h"</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>  </div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>  </div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="preprocessor">#include <memory></span></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>kodi</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> <span class="keyword">namespace </span>gui</div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> {</div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  </div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="keyword">class </span>CWindow;</div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  </div>
<div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="classkodi_1_1gui_1_1_c_addon_g_u_i_control_base.html"> 25</a></span> <span class="keyword">class </span>ATTRIBUTE_HIDDEN <a class="code" href="classkodi_1_1gui_1_1_c_addon_g_u_i_control_base.html">CAddonGUIControlBase</a></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> {</div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="keyword">public</span>:</div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  KODI_GUI_LISTITEM_HANDLE GetControlHandle()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_controlHandle; }</div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  </div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="keyword">protected</span>:</div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  <span class="keyword">explicit</span> <a class="code" href="classkodi_1_1gui_1_1_c_addon_g_u_i_control_base.html">CAddonGUIControlBase</a>(<a class="code" href="classkodi_1_1gui_1_1_c_addon_g_u_i_control_base.html">CAddonGUIControlBase</a>* window)</div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  : m_controlHandle(<span class="keyword">nullptr</span>),</div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  m_interface(::kodi::addon::CAddonBase::m_interface->toKodi),</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  m_Window(window)</div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  {</div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  }</div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  </div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  <span class="keyword">virtual</span> ~<a class="code" href="classkodi_1_1gui_1_1_c_addon_g_u_i_control_base.html">CAddonGUIControlBase</a>() = <span class="keywordflow">default</span>;</div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  </div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classkodi_1_1gui_1_1_c_window.html">CWindow</a>;</div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  </div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  KODI_GUI_LISTITEM_HANDLE m_controlHandle;</div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  <a class="code" href="struct_addon_to_kodi_func_table___addon.html">AddonToKodiFuncTable_Addon</a>* m_interface;</div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <a class="code" href="classkodi_1_1gui_1_1_c_addon_g_u_i_control_base.html">CAddonGUIControlBase</a>* m_Window;</div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  </div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="keyword">private</span>:</div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <a class="code" href="classkodi_1_1gui_1_1_c_addon_g_u_i_control_base.html">CAddonGUIControlBase</a>() = <span class="keyword">delete</span>;</div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <a class="code" href="classkodi_1_1gui_1_1_c_addon_g_u_i_control_base.html">CAddonGUIControlBase</a>(<span class="keyword">const</span> <a class="code" href="classkodi_1_1gui_1_1_c_addon_g_u_i_control_base.html">CAddonGUIControlBase</a>&) = <span class="keyword">delete</span>;</div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <a class="code" href="classkodi_1_1gui_1_1_c_addon_g_u_i_control_base.html">CAddonGUIControlBase</a>& operator=(<span class="keyword">const</span> <a class="code" href="classkodi_1_1gui_1_1_c_addon_g_u_i_control_base.html">CAddonGUIControlBase</a>&) = <span class="keyword">delete</span>;</div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span> };</div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  </div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span> <span class="keyword">class </span><a class="code" href="classkodi_1_1gui_1_1_c_list_item.html">CListItem</a>;</div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  </div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <span class="comment">//==============================================================================</span></div>
<div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="classkodi_1_1gui_1_1_c_list_item.html"> 64</a></span> <span class="comment"></span><span class="keyword">class </span>ATTRIBUTE_HIDDEN <a class="code" href="classkodi_1_1gui_1_1_c_list_item.html">CListItem</a> : <span class="keyword">public</span> <a class="code" href="classkodi_1_1gui_1_1_c_addon_g_u_i_control_base.html">CAddonGUIControlBase</a></div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span> {</div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span> <span class="keyword">public</span>:</div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="group__cpp__kodi__gui__windows__listitem.html#ga556b890d0dab3c6f1949a90968fc24c9"> 75</a></span> <span class="comment"></span> <a class="code" href="group__cpp__kodi__gui__windows__listitem.html#ga556b890d0dab3c6f1949a90968fc24c9">CListItem</a>(<span class="keyword">const</span> std::string& label = <span class="stringliteral">""</span>,</div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="keyword">const</span> std::string& label2 = <span class="stringliteral">""</span>,</div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <span class="keyword">const</span> std::string& path = <span class="stringliteral">""</span>)</div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  : <a class="code" href="classkodi_1_1gui_1_1_c_addon_g_u_i_control_base.html">CAddonGUIControlBase</a>(nullptr)</div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  {</div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  m_controlHandle = m_interface->kodi_gui->listItem->create(m_interface->kodiBase, label.c_str(),</div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  label2.c_str(), path.c_str());</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  }</div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  </div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <span class="comment">/*</span></div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span> <span class="comment"> * Constructor used for parts given by list items from addon window</span></div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span> <span class="comment"> *</span></div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span> <span class="comment"> * Related to call of "std::shared_ptr<CListItem> kodi::gui::CWindow::GetListItem(int listPos)"</span></div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span> <span class="comment"> * Not needed for addon development itself</span></div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span> <span class="comment"> */</span></div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <span class="keyword">explicit</span> <a class="code" href="classkodi_1_1gui_1_1_c_list_item.html">CListItem</a>(KODI_GUI_LISTITEM_HANDLE listItemHandle) : <a class="code" href="classkodi_1_1gui_1_1_c_addon_g_u_i_control_base.html">CAddonGUIControlBase</a>(nullptr)</div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  {</div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  m_controlHandle = listItemHandle;</div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  }</div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  </div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="group__cpp__kodi__gui__windows__listitem.html#ga947781705d642c3b7a82450158bb6a0a"> 99</a></span> <span class="comment"></span> <a class="code" href="group__cpp__kodi__gui__windows__listitem.html#ga947781705d642c3b7a82450158bb6a0a">~CListItem</a>()<span class="keyword"> override</span></div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span> <span class="keyword"> </span>{</div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  m_interface->kodi_gui->listItem->destroy(m_interface->kodiBase, m_controlHandle);</div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  }</div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <span class="comment">//----------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  </div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="group__cpp__kodi__gui__windows__listitem.html#gaf03feece9f59a8e557e91f5d9f7ff643"> 111</a></span> <span class="comment"></span> std::string <a class="code" href="group__cpp__kodi__gui__windows__listitem.html#gaf03feece9f59a8e557e91f5d9f7ff643">GetLabel</a>()</div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  {</div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  std::string label;</div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  <span class="keywordtype">char</span>* ret = m_interface->kodi_gui->listItem->get_label(m_interface->kodiBase, m_controlHandle);</div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  <span class="keywordflow">if</span> (ret != <span class="keyword">nullptr</span>)</div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  {</div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <span class="keywordflow">if</span> (std::strlen(ret))</div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  label = ret;</div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  m_interface->free_string(m_interface->kodiBase, ret);</div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  }</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  <span class="keywordflow">return</span> label;</div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  }</div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  <span class="comment">//----------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  </div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00131"></a><span class="lineno"><a class="line" href="group__cpp__kodi__gui__windows__listitem.html#gab825756e641ba839bfae908492165481"> 131</a></span> <span class="comment"></span> <span class="keywordtype">void</span> <a class="code" href="group__cpp__kodi__gui__windows__listitem.html#gab825756e641ba839bfae908492165481">SetLabel</a>(<span class="keyword">const</span> std::string& label)</div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  {</div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  m_interface->kodi_gui->listItem->set_label(m_interface->kodiBase, m_controlHandle,</div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  label.c_str());</div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  }</div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  <span class="comment">//----------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  </div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00144"></a><span class="lineno"><a class="line" href="group__cpp__kodi__gui__windows__listitem.html#gaca764077c10877a5c50ff334ca2da1a0"> 144</a></span> <span class="comment"></span> std::string <a class="code" href="group__cpp__kodi__gui__windows__listitem.html#gaca764077c10877a5c50ff334ca2da1a0">GetLabel2</a>()</div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  {</div>
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  std::string label;</div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  <span class="keywordtype">char</span>* ret = m_interface->kodi_gui->listItem->get_label2(m_interface->kodiBase, m_controlHandle);</div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  <span class="keywordflow">if</span> (ret != <span class="keyword">nullptr</span>)</div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  {</div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  <span class="keywordflow">if</span> (std::strlen(ret))</div>
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  label = ret;</div>
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  m_interface->free_string(m_interface->kodiBase, ret);</div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  }</div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  <span class="keywordflow">return</span> label;</div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  }</div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  <span class="comment">//----------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  </div>
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00164"></a><span class="lineno"><a class="line" href="group__cpp__kodi__gui__windows__listitem.html#gadaa65016e969bb31fc41a93e657e79db"> 164</a></span> <span class="comment"></span> <span class="keywordtype">void</span> <a class="code" href="group__cpp__kodi__gui__windows__listitem.html#gadaa65016e969bb31fc41a93e657e79db">SetLabel2</a>(<span class="keyword">const</span> std::string& label)</div>
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  {</div>
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  m_interface->kodi_gui->listItem->set_label2(m_interface->kodiBase, m_controlHandle,</div>
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  label.c_str());</div>
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  }</div>
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <span class="comment">//----------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  </div>
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00189"></a><span class="lineno"><a class="line" href="group__cpp__kodi__gui__windows__listitem.html#ga20785f408e377d20a4b5f6a58d35a873"> 189</a></span> <span class="comment"></span> std::string <a class="code" href="group__cpp__kodi__gui__windows__listitem.html#ga20785f408e377d20a4b5f6a58d35a873">GetArt</a>(<span class="keyword">const</span> std::string& type)</div>
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  {</div>
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  std::string strReturn;</div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  <span class="keywordtype">char</span>* ret = m_interface->kodi_gui->listItem->get_art(m_interface->kodiBase, m_controlHandle,</div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  type.c_str());</div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  <span class="keywordflow">if</span> (ret != <span class="keyword">nullptr</span>)</div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  {</div>
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  <span class="keywordflow">if</span> (std::strlen(ret))</div>
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  strReturn = ret;</div>
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  m_interface->free_string(m_interface->kodiBase, ret);</div>
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  }</div>
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  <span class="keywordflow">return</span> strReturn;</div>
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  }</div>
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  <span class="comment">//----------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  </div>
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00222"></a><span class="lineno"><a class="line" href="group__cpp__kodi__gui__windows__listitem.html#ga2d21e6c9e7a2262741f5ba92757c9528"> 222</a></span> <span class="comment"></span> <span class="keywordtype">void</span> <a class="code" href="group__cpp__kodi__gui__windows__listitem.html#ga2d21e6c9e7a2262741f5ba92757c9528">SetArt</a>(<span class="keyword">const</span> std::string& type, <span class="keyword">const</span> std::string& url)</div>
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  {</div>
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  m_interface->kodi_gui->listItem->set_art(m_interface->kodiBase, m_controlHandle, type.c_str(),</div>
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  url.c_str());</div>
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  }</div>
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  <span class="comment">//----------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  </div>
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00235"></a><span class="lineno"><a class="line" href="group__cpp__kodi__gui__windows__listitem.html#ga8dec429daa79c8453d141ac037d847b4"> 235</a></span> <span class="comment"></span> std::string <a class="code" href="group__cpp__kodi__gui__windows__listitem.html#ga8dec429daa79c8453d141ac037d847b4">GetPath</a>()</div>
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  {</div>
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  std::string strReturn;</div>
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  <span class="keywordtype">char</span>* ret = m_interface->kodi_gui->listItem->get_path(m_interface->kodiBase, m_controlHandle);</div>
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  <span class="keywordflow">if</span> (ret != <span class="keyword">nullptr</span>)</div>
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  {</div>
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  <span class="keywordflow">if</span> (std::strlen(ret))</div>
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  strReturn = ret;</div>
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  m_interface->free_string(m_interface->kodiBase, ret);</div>
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  }</div>
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  <span class="keywordflow">return</span> strReturn;</div>
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  }</div>
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  <span class="comment">//----------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  </div>
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00257"></a><span class="lineno"><a class="line" href="group__cpp__kodi__gui__windows__listitem.html#ga4a03d7c94fa02df112558bc30818e413"> 257</a></span> <span class="comment"></span> <span class="keywordtype">void</span> <a class="code" href="group__cpp__kodi__gui__windows__listitem.html#ga4a03d7c94fa02df112558bc30818e413">SetPath</a>(<span class="keyword">const</span> std::string& path)</div>
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  {</div>
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  m_interface->kodi_gui->listItem->set_path(m_interface->kodiBase, m_controlHandle, path.c_str());</div>
<div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  }</div>
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  <span class="comment">//----------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  </div>
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00281"></a><span class="lineno"><a class="line" href="group__cpp__kodi__gui__windows__listitem.html#ga7d553225fe861e34410148ca3bbd70fc"> 281</a></span> <span class="comment"></span> <span class="keywordtype">void</span> <a class="code" href="group__cpp__kodi__gui__windows__listitem.html#ga7d553225fe861e34410148ca3bbd70fc">SetProperty</a>(<span class="keyword">const</span> std::string& key, <span class="keyword">const</span> std::string& value)</div>
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  {</div>
<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  m_interface->kodi_gui->listItem->set_property(m_interface->kodiBase, m_controlHandle,</div>
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  key.c_str(), value.c_str());</div>
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>  }</div>
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  <span class="comment">//----------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  </div>
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00301"></a><span class="lineno"><a class="line" href="group__cpp__kodi__gui__windows__listitem.html#gaf591ccbe1e6d941a2c7c7bb7ac526168"> 301</a></span> <span class="comment"></span> std::string <a class="code" href="group__cpp__kodi__gui__windows__listitem.html#gaf591ccbe1e6d941a2c7c7bb7ac526168">GetProperty</a>(<span class="keyword">const</span> std::string& key)</div>
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>  {</div>
<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>  std::string label;</div>
<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>  <span class="keywordtype">char</span>* ret = m_interface->kodi_gui->listItem->get_property(m_interface->kodiBase,</div>
<div class="line"><a name="l00305"></a><span class="lineno"> 305</span>  m_controlHandle, key.c_str());</div>
<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>  <span class="keywordflow">if</span> (ret != <span class="keyword">nullptr</span>)</div>
<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>  {</div>
<div class="line"><a name="l00308"></a><span class="lineno"> 308</span>  <span class="keywordflow">if</span> (std::strlen(ret))</div>
<div class="line"><a name="l00309"></a><span class="lineno"> 309</span>  label = ret;</div>
<div class="line"><a name="l00310"></a><span class="lineno"> 310</span>  m_interface->free_string(m_interface->kodiBase, ret);</div>
<div class="line"><a name="l00311"></a><span class="lineno"> 311</span>  }</div>
<div class="line"><a name="l00312"></a><span class="lineno"> 312</span>  <span class="keywordflow">return</span> label;</div>
<div class="line"><a name="l00313"></a><span class="lineno"> 313</span>  }</div>
<div class="line"><a name="l00314"></a><span class="lineno"> 314</span>  <span class="comment">//----------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00315"></a><span class="lineno"> 315</span>  </div>
<div class="line"><a name="l00316"></a><span class="lineno"> 316</span>  <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00323"></a><span class="lineno"><a class="line" href="group__cpp__kodi__gui__windows__listitem.html#ga6acf8d4e2b52301fbcd80a3f74a0fab1"> 323</a></span> <span class="comment"></span> <span class="keywordtype">void</span> <a class="code" href="group__cpp__kodi__gui__windows__listitem.html#ga6acf8d4e2b52301fbcd80a3f74a0fab1">Select</a>(<span class="keywordtype">bool</span> selected)</div>
<div class="line"><a name="l00324"></a><span class="lineno"> 324</span>  {</div>
<div class="line"><a name="l00325"></a><span class="lineno"> 325</span>  m_interface->kodi_gui->listItem->select(m_interface->kodiBase, m_controlHandle, selected);</div>
<div class="line"><a name="l00326"></a><span class="lineno"> 326</span>  }</div>
<div class="line"><a name="l00327"></a><span class="lineno"> 327</span>  <span class="comment">//----------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00328"></a><span class="lineno"> 328</span>  </div>
<div class="line"><a name="l00329"></a><span class="lineno"> 329</span>  <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00335"></a><span class="lineno"><a class="line" href="group__cpp__kodi__gui__windows__listitem.html#ga8bd3773d1e4bc4a38c419fd6c92bdee2"> 335</a></span> <span class="comment"></span> <span class="keywordtype">bool</span> <a class="code" href="group__cpp__kodi__gui__windows__listitem.html#ga8bd3773d1e4bc4a38c419fd6c92bdee2">IsSelected</a>()</div>
<div class="line"><a name="l00336"></a><span class="lineno"> 336</span>  {</div>
<div class="line"><a name="l00337"></a><span class="lineno"> 337</span>  <span class="keywordflow">return</span> m_interface->kodi_gui->listItem->is_selected(m_interface->kodiBase, m_controlHandle);</div>
<div class="line"><a name="l00338"></a><span class="lineno"> 338</span>  }</div>
<div class="line"><a name="l00339"></a><span class="lineno"> 339</span>  <span class="comment">//----------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00340"></a><span class="lineno"> 340</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">/* namespace gui */</span></div>
<div class="line"><a name="l00343"></a><span class="lineno"> 343</span> } <span class="comment">/* namespace kodi */</span></div>
<div class="line"><a name="l00344"></a><span class="lineno"> 344</span>  </div>
<div class="line"><a name="l00345"></a><span class="lineno"> 345</span> <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span><span class="preprocessor"></span></div>
<div class="ttc" id="aclasskodi_1_1gui_1_1_c_addon_g_u_i_control_base_html"><div class="ttname"><a href="classkodi_1_1gui_1_1_c_addon_g_u_i_control_base.html">kodi::gui::CAddonGUIControlBase</a></div><div class="ttdef"><b>Definition:</b> ListItem.h:26</div></div>
<div class="ttc" id="aclasskodi_1_1gui_1_1_c_list_item_html"><div class="ttname"><a href="classkodi_1_1gui_1_1_c_list_item.html">kodi::gui::CListItem</a></div><div class="ttdef"><b>Definition:</b> ListItem.h:65</div></div>
<div class="ttc" id="aclasskodi_1_1gui_1_1_c_window_html"><div class="ttname"><a href="classkodi_1_1gui_1_1_c_window.html">kodi::gui::CWindow</a></div><div class="ttdef"><b>Definition:</b> Window.h:110</div></div>
<div class="ttc" id="agroup__cpp__kodi__gui__windows__listitem_html_ga20785f408e377d20a4b5f6a58d35a873"><div class="ttname"><a href="group__cpp__kodi__gui__windows__listitem.html#ga20785f408e377d20a4b5f6a58d35a873">kodi::gui::CListItem::GetArt</a></div><div class="ttdeci">std::string GetArt(const std::string &type)</div><div class="ttdoc">Sets the listitem's art.</div><div class="ttdef"><b>Definition:</b> ListItem.h:189</div></div>
<div class="ttc" id="agroup__cpp__kodi__gui__windows__listitem_html_ga2d21e6c9e7a2262741f5ba92757c9528"><div class="ttname"><a href="group__cpp__kodi__gui__windows__listitem.html#ga2d21e6c9e7a2262741f5ba92757c9528">kodi::gui::CListItem::SetArt</a></div><div class="ttdeci">void SetArt(const std::string &type, const std::string &url)</div><div class="ttdoc">Sets the listitem's art.</div><div class="ttdef"><b>Definition:</b> ListItem.h:222</div></div>
<div class="ttc" id="agroup__cpp__kodi__gui__windows__listitem_html_ga4a03d7c94fa02df112558bc30818e413"><div class="ttname"><a href="group__cpp__kodi__gui__windows__listitem.html#ga4a03d7c94fa02df112558bc30818e413">kodi::gui::CListItem::SetPath</a></div><div class="ttdeci">void SetPath(const std::string &path)</div><div class="ttdoc">Sets the listitem's path.</div><div class="ttdef"><b>Definition:</b> ListItem.h:257</div></div>
<div class="ttc" id="agroup__cpp__kodi__gui__windows__listitem_html_ga556b890d0dab3c6f1949a90968fc24c9"><div class="ttname"><a href="group__cpp__kodi__gui__windows__listitem.html#ga556b890d0dab3c6f1949a90968fc24c9">kodi::gui::CListItem::CListItem</a></div><div class="ttdeci">CListItem(const std::string &label="", const std::string &label2="", const std::string &path="")</div><div class="ttdoc">Class constructor with parameters.</div><div class="ttdef"><b>Definition:</b> ListItem.h:75</div></div>
<div class="ttc" id="agroup__cpp__kodi__gui__windows__listitem_html_ga6acf8d4e2b52301fbcd80a3f74a0fab1"><div class="ttname"><a href="group__cpp__kodi__gui__windows__listitem.html#ga6acf8d4e2b52301fbcd80a3f74a0fab1">kodi::gui::CListItem::Select</a></div><div class="ttdeci">void Select(bool selected)</div><div class="ttdoc">To control selection of item in list (also multiple selection, in list on serveral items possible).</div><div class="ttdef"><b>Definition:</b> ListItem.h:323</div></div>
<div class="ttc" id="agroup__cpp__kodi__gui__windows__listitem_html_ga7d553225fe861e34410148ca3bbd70fc"><div class="ttname"><a href="group__cpp__kodi__gui__windows__listitem.html#ga7d553225fe861e34410148ca3bbd70fc">kodi::gui::CListItem::SetProperty</a></div><div class="ttdeci">void SetProperty(const std::string &key, const std::string &value)</div><div class="ttdoc">Sets a listitem property, similar to an infolabel.</div><div class="ttdef"><b>Definition:</b> ListItem.h:281</div></div>
<div class="ttc" id="agroup__cpp__kodi__gui__windows__listitem_html_ga8bd3773d1e4bc4a38c419fd6c92bdee2"><div class="ttname"><a href="group__cpp__kodi__gui__windows__listitem.html#ga8bd3773d1e4bc4a38c419fd6c92bdee2">kodi::gui::CListItem::IsSelected</a></div><div class="ttdeci">bool IsSelected()</div><div class="ttdoc">Returns the listitem's selected status.</div><div class="ttdef"><b>Definition:</b> ListItem.h:335</div></div>
<div class="ttc" id="agroup__cpp__kodi__gui__windows__listitem_html_ga8dec429daa79c8453d141ac037d847b4"><div class="ttname"><a href="group__cpp__kodi__gui__windows__listitem.html#ga8dec429daa79c8453d141ac037d847b4">kodi::gui::CListItem::GetPath</a></div><div class="ttdeci">std::string GetPath()</div><div class="ttdoc">Returns the path / filename of this listitem.</div><div class="ttdef"><b>Definition:</b> ListItem.h:235</div></div>
<div class="ttc" id="agroup__cpp__kodi__gui__windows__listitem_html_ga947781705d642c3b7a82450158bb6a0a"><div class="ttname"><a href="group__cpp__kodi__gui__windows__listitem.html#ga947781705d642c3b7a82450158bb6a0a">kodi::gui::CListItem::~CListItem</a></div><div class="ttdeci">~CListItem() override</div><div class="ttdoc">Class destructor.</div><div class="ttdef"><b>Definition:</b> ListItem.h:99</div></div>
<div class="ttc" id="agroup__cpp__kodi__gui__windows__listitem_html_gab825756e641ba839bfae908492165481"><div class="ttname"><a href="group__cpp__kodi__gui__windows__listitem.html#gab825756e641ba839bfae908492165481">kodi::gui::CListItem::SetLabel</a></div><div class="ttdeci">void SetLabel(const std::string &label)</div><div class="ttdoc">Sets the listitem label.</div><div class="ttdef"><b>Definition:</b> ListItem.h:131</div></div>
<div class="ttc" id="agroup__cpp__kodi__gui__windows__listitem_html_gaca764077c10877a5c50ff334ca2da1a0"><div class="ttname"><a href="group__cpp__kodi__gui__windows__listitem.html#gaca764077c10877a5c50ff334ca2da1a0">kodi::gui::CListItem::GetLabel2</a></div><div class="ttdeci">std::string GetLabel2()</div><div class="ttdoc">Returns the second listitem label.</div><div class="ttdef"><b>Definition:</b> ListItem.h:144</div></div>
<div class="ttc" id="agroup__cpp__kodi__gui__windows__listitem_html_gadaa65016e969bb31fc41a93e657e79db"><div class="ttname"><a href="group__cpp__kodi__gui__windows__listitem.html#gadaa65016e969bb31fc41a93e657e79db">kodi::gui::CListItem::SetLabel2</a></div><div class="ttdeci">void SetLabel2(const std::string &label)</div><div class="ttdoc">Sets the listitem's label2.</div><div class="ttdef"><b>Definition:</b> ListItem.h:164</div></div>
<div class="ttc" id="agroup__cpp__kodi__gui__windows__listitem_html_gaf03feece9f59a8e557e91f5d9f7ff643"><div class="ttname"><a href="group__cpp__kodi__gui__windows__listitem.html#gaf03feece9f59a8e557e91f5d9f7ff643">kodi::gui::CListItem::GetLabel</a></div><div class="ttdeci">std::string GetLabel()</div><div class="ttdoc">Returns the listitem label.</div><div class="ttdef"><b>Definition:</b> ListItem.h:111</div></div>
<div class="ttc" id="agroup__cpp__kodi__gui__windows__listitem_html_gaf591ccbe1e6d941a2c7c7bb7ac526168"><div class="ttname"><a href="group__cpp__kodi__gui__windows__listitem.html#gaf591ccbe1e6d941a2c7c7bb7ac526168">kodi::gui::CListItem::GetProperty</a></div><div class="ttdeci">std::string GetProperty(const std::string &key)</div><div class="ttdoc">Returns a listitem property as a string, similar to an infolabel.</div><div class="ttdef"><b>Definition:</b> ListItem.h:301</div></div>
<div class="ttc" id="astruct_addon_to_kodi_func_table___addon_html"><div class="ttname"><a href="struct_addon_to_kodi_func_table___addon.html">AddonToKodiFuncTable_Addon</a></div><div class="ttdef"><b>Definition:</b> addon_base.h:216</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_f20743b7ecfd828f89a669a2f72f5b2b.html">gui</a></li><li class="navelem"><b>ListItem.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>