This file is indexed.

/usr/share/doc/libratbag-dev/html/group__profile.html is in libratbag-doc 0.9-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
<!-- HTML header for doxygen 1.8.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- For Mobile Devices -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
        <meta name="generator" content="Doxygen 1.8.13"/>
        <script type="text/javascript" src="file:///usr/share/javascript/jquery/jquery.js"></script>
        <title>libratbag: Device profiles</title>
        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
        <script type="text/javascript" src="dynsections.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/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" src="file:///usr/share/javascript/mathjax/MathJax.js"></script>
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
<link href="bootstrap.css" rel="stylesheet" type="text/css"/>
        <link href="bootstrap.css" rel="stylesheet" type="text/css" />
        <script src="file:///usr/share/javascript/bootstrap/js/bootstrap.js"></script>
        <script type="text/javascript" src="doxy-boot.js"></script>
    </head>
    <body>
        <nav class="navbar navbar-default" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand">libratbag 0.9.0</a>
                </div>
            </div>
        </nav>
        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
            <div class="content" id="content">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-12 panel panel-default" style="padding-bottom: 15px;">
                            <div style="margin-bottom: 15px;">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- 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="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Device profiles</div>  </div>
</div><!--header-->
<div class="contents">

<p>A profile on a device consists of a set of button functions and, where applicable, a range of resolution settings, one of which is currently active.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structratbag__profile.html">ratbag_profile</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A handle to a profile context on devices with the <a class="el" href="group__device.html#ggadac0b3995c97da4276a6f21ecadecedfa610acfcea4d029aac89b10a73ddaf7dc">RATBAG_DEVICE_CAP_SWITCHABLE_PROFILE</a> capability.  <a href="structratbag__profile.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaafa8356d4af464a063c72daf7ab3da8f"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structratbag__profile.html">ratbag_profile</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__profile.html#gaafa8356d4af464a063c72daf7ab3da8f">ratbag_profile_ref</a> (struct <a class="el" href="structratbag__profile.html">ratbag_profile</a> *profile)</td></tr>
<tr class="memdesc:gaafa8356d4af464a063c72daf7ab3da8f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a reference to the profile.  <a href="#gaafa8356d4af464a063c72daf7ab3da8f">More...</a><br /></td></tr>
<tr class="separator:gaafa8356d4af464a063c72daf7ab3da8f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab5f9d8032769e9f84e78f8e02187eb91"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structratbag__profile.html">ratbag_profile</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__profile.html#gab5f9d8032769e9f84e78f8e02187eb91">ratbag_profile_unref</a> (struct <a class="el" href="structratbag__profile.html">ratbag_profile</a> *profile)</td></tr>
<tr class="memdesc:gab5f9d8032769e9f84e78f8e02187eb91"><td class="mdescLeft">&#160;</td><td class="mdescRight">Dereference the ratbag profile.  <a href="#gab5f9d8032769e9f84e78f8e02187eb91">More...</a><br /></td></tr>
<tr class="separator:gab5f9d8032769e9f84e78f8e02187eb91"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf11661959bbc73dace4da8591e719e98"><td class="memItemLeft" align="right" valign="top">enum <a class="el" href="group__base.html#ga778f6aa9aeee462860007415895baec1">ratbag_error_code</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__profile.html#gaf11661959bbc73dace4da8591e719e98">ratbag_profile_set_enabled</a> (struct <a class="el" href="structratbag__profile.html">ratbag_profile</a> *profile, bool enabled)</td></tr>
<tr class="memdesc:gaf11661959bbc73dace4da8591e719e98"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable/disable the ratbag profile.  <a href="#gaf11661959bbc73dace4da8591e719e98">More...</a><br /></td></tr>
<tr class="separator:gaf11661959bbc73dace4da8591e719e98"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga88aab098ab4ebef59dd1200cfeb66f1b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__profile.html#ga88aab098ab4ebef59dd1200cfeb66f1b">ratbag_profile_is_enabled</a> (const struct <a class="el" href="structratbag__profile.html">ratbag_profile</a> *profile)</td></tr>
<tr class="memdesc:ga88aab098ab4ebef59dd1200cfeb66f1b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check whether the ratbag profile is enabled or not.  <a href="#ga88aab098ab4ebef59dd1200cfeb66f1b">More...</a><br /></td></tr>
<tr class="separator:ga88aab098ab4ebef59dd1200cfeb66f1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaebf3e26861590805407cc52fac30dfb2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__profile.html#gaebf3e26861590805407cc52fac30dfb2">ratbag_profile_set_user_data</a> (struct <a class="el" href="structratbag__profile.html">ratbag_profile</a> *profile, void *userdata)</td></tr>
<tr class="memdesc:gaebf3e26861590805407cc52fac30dfb2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set caller-specific data associated with this profile.  <a href="#gaebf3e26861590805407cc52fac30dfb2">More...</a><br /></td></tr>
<tr class="separator:gaebf3e26861590805407cc52fac30dfb2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1a606957ee177707273f168a892f9ae5"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__profile.html#ga1a606957ee177707273f168a892f9ae5">ratbag_profile_get_user_data</a> (const struct <a class="el" href="structratbag__profile.html">ratbag_profile</a> *profile)</td></tr>
<tr class="memdesc:ga1a606957ee177707273f168a892f9ae5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the caller-specific data associated with this profile, if any.  <a href="#ga1a606957ee177707273f168a892f9ae5">More...</a><br /></td></tr>
<tr class="separator:ga1a606957ee177707273f168a892f9ae5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7678b274a5307f764fe829849c313088"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structratbag__profile.html">ratbag_profile</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__profile.html#ga7678b274a5307f764fe829849c313088">ratbag_device_get_profile</a> (struct <a class="el" href="structratbag__device.html">ratbag_device</a> *device, unsigned int index)</td></tr>
<tr class="memdesc:ga7678b274a5307f764fe829849c313088"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function creates if necessary and returns a profile for the given index.  <a href="#ga7678b274a5307f764fe829849c313088">More...</a><br /></td></tr>
<tr class="separator:ga7678b274a5307f764fe829849c313088"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2ed8ff2c772f5f6a4165e30533fc5628"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__profile.html#ga2ed8ff2c772f5f6a4165e30533fc5628">ratbag_profile_is_active</a> (struct <a class="el" href="structratbag__profile.html">ratbag_profile</a> *profile)</td></tr>
<tr class="memdesc:ga2ed8ff2c772f5f6a4165e30533fc5628"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if the given profile is the currently active one.  <a href="#ga2ed8ff2c772f5f6a4165e30533fc5628">More...</a><br /></td></tr>
<tr class="separator:ga2ed8ff2c772f5f6a4165e30533fc5628"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga87f321a303c031292c5850e77f2c3194"><td class="memItemLeft" align="right" valign="top">enum <a class="el" href="group__base.html#ga778f6aa9aeee462860007415895baec1">ratbag_error_code</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__profile.html#ga87f321a303c031292c5850e77f2c3194">ratbag_profile_set_active</a> (struct <a class="el" href="structratbag__profile.html">ratbag_profile</a> *profile)</td></tr>
<tr class="memdesc:ga87f321a303c031292c5850e77f2c3194"><td class="mdescLeft">&#160;</td><td class="mdescRight">Make the given profile the currently active profile.  <a href="#ga87f321a303c031292c5850e77f2c3194">More...</a><br /></td></tr>
<tr class="separator:ga87f321a303c031292c5850e77f2c3194"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga27de2026ec173d33da48f8635ebd65cb"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__profile.html#ga27de2026ec173d33da48f8635ebd65cb">ratbag_profile_get_num_resolutions</a> (struct <a class="el" href="structratbag__profile.html">ratbag_profile</a> *profile)</td></tr>
<tr class="memdesc:ga27de2026ec173d33da48f8635ebd65cb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of <a class="el" href="structratbag__resolution.html">ratbag_resolution</a> available in this profile.  <a href="#ga27de2026ec173d33da48f8635ebd65cb">More...</a><br /></td></tr>
<tr class="separator:ga27de2026ec173d33da48f8635ebd65cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga952c361c0c853e7a3b6669dc1f4fedb5"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structratbag__resolution.html">ratbag_resolution</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__profile.html#ga952c361c0c853e7a3b6669dc1f4fedb5">ratbag_profile_get_resolution</a> (struct <a class="el" href="structratbag__profile.html">ratbag_profile</a> *profile, unsigned int idx)</td></tr>
<tr class="memdesc:ga952c361c0c853e7a3b6669dc1f4fedb5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the resolution in DPI and the report rate in Hz for the resolution mode identified by the given index.  <a href="#ga952c361c0c853e7a3b6669dc1f4fedb5">More...</a><br /></td></tr>
<tr class="separator:ga952c361c0c853e7a3b6669dc1f4fedb5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga64451f65602cdf5805792c1ab9e3182f"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structratbag__button.html">ratbag_button</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__profile.html#ga64451f65602cdf5805792c1ab9e3182f">ratbag_profile_get_button</a> (struct <a class="el" href="structratbag__profile.html">ratbag_profile</a> *profile, unsigned int index)</td></tr>
<tr class="memdesc:ga64451f65602cdf5805792c1ab9e3182f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return a reference to the button given by the index.  <a href="#ga64451f65602cdf5805792c1ab9e3182f">More...</a><br /></td></tr>
<tr class="separator:ga64451f65602cdf5805792c1ab9e3182f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>A profile on a device consists of a set of button functions and, where applicable, a range of resolution settings, one of which is currently active. </p>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga7678b274a5307f764fe829849c313088"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7678b274a5307f764fe829849c313088">&#9670;&nbsp;</a></span>ratbag_device_get_profile()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structratbag__profile.html">ratbag_profile</a>* ratbag_device_get_profile </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structratbag__device.html">ratbag_device</a> *&#160;</td>
          <td class="paramname"><em>device</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>index</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function creates if necessary and returns a profile for the given index. </p>
<p>The index must be less than the number returned by ratbag_get_num_profiles().</p>
<p>The profile is refcounted with an initial value of at least 1. Use <a class="el" href="group__profile.html#gab5f9d8032769e9f84e78f8e02187eb91" title="Dereference the ratbag profile. ">ratbag_profile_unref()</a> to release the profile.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">device</td><td>A previously initialized ratbag device </td></tr>
    <tr><td class="paramname">index</td><td>The index of the profile</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The profile at the given index, or NULL if the profile does not exist.</dd></dl>
<dl class="section see"><dt>See also</dt><dd>ratbag_get_num_profiles </dd></dl>

</div>
</div>
<a id="ga64451f65602cdf5805792c1ab9e3182f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga64451f65602cdf5805792c1ab9e3182f">&#9670;&nbsp;</a></span>ratbag_profile_get_button()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structratbag__button.html">ratbag_button</a>* ratbag_profile_get_button </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structratbag__profile.html">ratbag_profile</a> *&#160;</td>
          <td class="paramname"><em>profile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>index</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return a reference to the button given by the index. </p>
<p>The order of the buttons is device-specific though indices 0, 1 and 2 should always refer to left, middle, right buttons. Use <a class="el" href="group__button.html#gae25844ee57fc9ca22a9b33427ad066fb" title="Return the type of the physical button. ">ratbag_button_get_type()</a> to get the physical type of the button.</p>
<p>The button is refcounted with an initial value of at least 1. Use <a class="el" href="group__button.html#ga259f5ad3d0566bec161c48a285a0206e" title="Dereference the ratbag button. ">ratbag_button_unref()</a> to release the button.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">profile</td><td>A previously initialized ratbag profile </td></tr>
    <tr><td class="paramname">index</td><td>The index of the button</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A button context, or NULL if the button does not exist.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__device.html#ga3b04791bc03f4f5ea6691ca346cf8c18" title="Return the number of buttons available on this device. ">ratbag_device_get_num_buttons</a> </dd></dl>

</div>
</div>
<a id="ga27de2026ec173d33da48f8635ebd65cb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga27de2026ec173d33da48f8635ebd65cb">&#9670;&nbsp;</a></span>ratbag_profile_get_num_resolutions()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int ratbag_profile_get_num_resolutions </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structratbag__profile.html">ratbag_profile</a> *&#160;</td>
          <td class="paramname"><em>profile</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the number of <a class="el" href="structratbag__resolution.html">ratbag_resolution</a> available in this profile. </p>
<p>A resolution mode is a tuple of (resolution, report rate), each mode can be fetched with ratbag_profile_get_resolution_by_idx().</p>
<p>The returned value is the maximum number of modes available and thus identical for all profiles. However, some of the modes may not be configured.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">profile</td><td>A previously initialized ratbag profile</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of resolutions available. </dd></dl>

</div>
</div>
<a id="ga952c361c0c853e7a3b6669dc1f4fedb5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga952c361c0c853e7a3b6669dc1f4fedb5">&#9670;&nbsp;</a></span>ratbag_profile_get_resolution()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structratbag__resolution.html">ratbag_resolution</a>* ratbag_profile_get_resolution </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structratbag__profile.html">ratbag_profile</a> *&#160;</td>
          <td class="paramname"><em>profile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>idx</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return the resolution in DPI and the report rate in Hz for the resolution mode identified by the given index. </p>
<p>The index must be between 0 and ratbag_profile_get_num_resolution_modes().</p>
<p>See ratbag_profile_get_num_resolution_modes() for a description of resolution_modes.</p>
<p>Profiles available but not currently configured on the device return success but set dpi and hz to 0.</p>
<p>The returned struct has a refcount of at least 1, use <a class="el" href="group__resolution.html#ga3b207a0de53cd01460af70494b7493b6" title="Dereference the ratbag resolution. ">ratbag_resolution_unref()</a> to release the resources associated.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">profile</td><td>A previously initialized ratbag profile </td></tr>
    <tr><td class="paramname">idx</td><td>The index of the resolution mode to get</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>zero on success, non-zero otherwise. On error, dpi and hz are unmodified. </dd></dl>

</div>
</div>
<a id="ga1a606957ee177707273f168a892f9ae5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1a606957ee177707273f168a892f9ae5">&#9670;&nbsp;</a></span>ratbag_profile_get_user_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* ratbag_profile_get_user_data </td>
          <td>(</td>
          <td class="paramtype">const struct <a class="el" href="structratbag__profile.html">ratbag_profile</a> *&#160;</td>
          <td class="paramname"><em>profile</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the caller-specific data associated with this profile, if any. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">profile</td><td>A previously initialized ratbag profile </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The caller-specific data previously assigned in <a class="el" href="group__profile.html#gaebf3e26861590805407cc52fac30dfb2" title="Set caller-specific data associated with this profile. ">ratbag_profile_set_user_data()</a>. </dd></dl>

</div>
</div>
<a id="ga2ed8ff2c772f5f6a4165e30533fc5628"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2ed8ff2c772f5f6a4165e30533fc5628">&#9670;&nbsp;</a></span>ratbag_profile_is_active()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ratbag_profile_is_active </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structratbag__profile.html">ratbag_profile</a> *&#160;</td>
          <td class="paramname"><em>profile</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Check if the given profile is the currently active one. </p>
<p>Note that some devices allow switching profiles with hardware buttons thus making the use of this function racy.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">profile</td><td>A previously initialized ratbag profile</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>non-zero if the profile is currently active, zero otherwise </dd></dl>

</div>
</div>
<a id="ga88aab098ab4ebef59dd1200cfeb66f1b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga88aab098ab4ebef59dd1200cfeb66f1b">&#9670;&nbsp;</a></span>ratbag_profile_is_enabled()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ratbag_profile_is_enabled </td>
          <td>(</td>
          <td class="paramtype">const struct <a class="el" href="structratbag__profile.html">ratbag_profile</a> *&#160;</td>
          <td class="paramname"><em>profile</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Check whether the ratbag profile is enabled or not. </p>
<p>For devices that don't support <a class="el" href="group__device.html#ggadac0b3995c97da4276a6f21ecadecedfaca1ffce8a02c08124ed78ac5192869a8">RATBAG_DEVICE_CAP_DISABLE_PROFILE</a> the profile will always be set to enabled.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">profile</td><td>A previously initialized ratbag profile</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Whether the profile is enabled or not. </dd></dl>

</div>
</div>
<a id="gaafa8356d4af464a063c72daf7ab3da8f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaafa8356d4af464a063c72daf7ab3da8f">&#9670;&nbsp;</a></span>ratbag_profile_ref()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structratbag__profile.html">ratbag_profile</a>* ratbag_profile_ref </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structratbag__profile.html">ratbag_profile</a> *&#160;</td>
          <td class="paramname"><em>profile</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Add a reference to the profile. </p>
<p>A profile is destroyed whenever the reference count reaches 0. See <a class="el" href="group__profile.html#gab5f9d8032769e9f84e78f8e02187eb91">ratbag_profile_unref</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">profile</td><td>A previously initialized valid ratbag profile </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The passed ratbag profile </dd></dl>

</div>
</div>
<a id="ga87f321a303c031292c5850e77f2c3194"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga87f321a303c031292c5850e77f2c3194">&#9670;&nbsp;</a></span>ratbag_profile_set_active()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__base.html#ga778f6aa9aeee462860007415895baec1">ratbag_error_code</a> ratbag_profile_set_active </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structratbag__profile.html">ratbag_profile</a> *&#160;</td>
          <td class="paramname"><em>profile</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Make the given profile the currently active profile. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">profile</td><td>The profile to make the active profile.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 on success or an error code otherwise </dd></dl>

</div>
</div>
<a id="gaf11661959bbc73dace4da8591e719e98"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf11661959bbc73dace4da8591e719e98">&#9670;&nbsp;</a></span>ratbag_profile_set_enabled()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__base.html#ga778f6aa9aeee462860007415895baec1">ratbag_error_code</a> ratbag_profile_set_enabled </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structratbag__profile.html">ratbag_profile</a> *&#160;</td>
          <td class="paramname"><em>profile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>enabled</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enable/disable the ratbag profile. </p>
<p>For this to work, the device must support <a class="el" href="group__device.html#ggadac0b3995c97da4276a6f21ecadecedfaca1ffce8a02c08124ed78ac5192869a8">RATBAG_DEVICE_CAP_DISABLE_PROFILE</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">profile</td><td>A previously initialized ratbag profile </td></tr>
    <tr><td class="paramname">enabled</td><td>Whether to enable or disable the profile</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 on success or an error code otherwise </dd></dl>

</div>
</div>
<a id="gaebf3e26861590805407cc52fac30dfb2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaebf3e26861590805407cc52fac30dfb2">&#9670;&nbsp;</a></span>ratbag_profile_set_user_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ratbag_profile_set_user_data </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structratbag__profile.html">ratbag_profile</a> *&#160;</td>
          <td class="paramname"><em>profile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>userdata</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set caller-specific data associated with this profile. </p>
<p>libratbag does not manage, look at, or modify this data. The caller must ensure the data is valid.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">profile</td><td>A previously initialized profile </td></tr>
    <tr><td class="paramname">userdata</td><td>Caller-specific data passed to the various callback interfaces. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gab5f9d8032769e9f84e78f8e02187eb91"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab5f9d8032769e9f84e78f8e02187eb91">&#9670;&nbsp;</a></span>ratbag_profile_unref()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct <a class="el" href="structratbag__profile.html">ratbag_profile</a>* ratbag_profile_unref </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structratbag__profile.html">ratbag_profile</a> *&#160;</td>
          <td class="paramname"><em>profile</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Dereference the ratbag profile. </p>
<p>When the internal refcount reaches zero, all resources associated with this object are released. The object must be considered invalid once unref is called.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">profile</td><td>A previously initialized ratbag profile </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Always NULL </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>
Generated on Wed Jan 10 2018 18:56:06 for libratbag by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>