• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!-- HTML header for doxygen 1.8.8-->
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4    <head>
5        <meta http-equiv="X-UA-Compatible" content="IE=edge">
6        <!-- For Mobile Devices -->
7        <meta name="viewport" content="width=device-width, initial-scale=1">
8        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
9        <meta name="generator" content="Doxygen 1.8.20"/>
10        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
11        <title>libevdev: Querying device capabilities</title>
12        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
13        <script type="text/javascript" src="dynsections.js"></script>
14        <link href="search/search.css" rel="stylesheet" type="text/css"/>
15<script type="text/javascript" src="search/searchdata.js"></script>
16<script type="text/javascript" src="search/search.js"></script>
17        <link href="doxygen.css" rel="stylesheet" type="text/css" />
18        <link href="bootstrap.css" rel="stylesheet" type="text/css"/>
19<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
20<link href="libevdevdoxygen.css" rel="stylesheet" type="text/css"/>
21        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
22        <script type="text/javascript" src="doxy-boot.js"></script>
23    </head>
24    <body>
25        <nav class="navbar navbar-default" role="navigation">
26            <div class="container">
27                <div class="navbar-header">
28                    <a class="navbar-brand">libevdev 1.10.0</a>
29                </div>
30            </div>
31        </nav>
32        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
33            <div class="content" id="content">
34                <div class="container">
35                    <div class="row">
36                        <div class="col-sm-12 panel panel-default" style="padding-bottom: 15px;">
37                            <div style="margin-bottom: 15px;">
38<!-- end header part -->
39<!-- Generated by Doxygen 1.8.20 -->
40<script type="text/javascript">
41/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
42var searchBox = new SearchBox("searchBox", "search",false,'Search');
43/* @license-end */
44</script>
45<script type="text/javascript" src="menudata.js"></script>
46<script type="text/javascript" src="menu.js"></script>
47<script type="text/javascript">
48/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
49$(function() {
50  initMenu('',true,false,'search.php','Search');
51  $(document).ready(function() { init_search(); });
52});
53/* @license-end */</script>
54<div id="main-nav"></div>
55</div><!-- top -->
56<!-- window showing the filter options -->
57<div id="MSearchSelectWindow"
58     onmouseover="return searchBox.OnSearchSelectShow()"
59     onmouseout="return searchBox.OnSearchSelectHide()"
60     onkeydown="return searchBox.OnSearchSelectKey(event)">
61</div>
62
63<!-- iframe showing the search results (closed by default) -->
64<div id="MSearchResultsWindow">
65<iframe src="javascript:void(0)" frameborder="0"
66        name="MSearchResults" id="MSearchResults">
67</iframe>
68</div>
69
70<div class="header">
71  <div class="summary">
72<a href="#func-members">Functions</a>  </div>
73  <div class="headertitle">
74<div class="title">Querying device capabilities</div>  </div>
75</div><!--header-->
76<div class="contents">
77
78<p>Abstraction functions to handle device capabilities, specifically device properties such as the name of the device and the bits representing the events supported by this device.
79<a href="#details">More...</a></p>
80<table class="memberdecls">
81<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
82Functions</h2></td></tr>
83<tr class="memitem:gaed0328c67b7a78422636d9fe09a73f12"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bits.html#gaed0328c67b7a78422636d9fe09a73f12">libevdev_get_name</a> (const struct libevdev *dev)</td></tr>
84<tr class="memdesc:gaed0328c67b7a78422636d9fe09a73f12"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the device's name, either as set by the caller or as read from the kernel.  <a href="group__bits.html#gaed0328c67b7a78422636d9fe09a73f12">More...</a><br /></td></tr>
85<tr class="separator:gaed0328c67b7a78422636d9fe09a73f12"><td class="memSeparator" colspan="2">&#160;</td></tr>
86<tr class="memitem:ga5df483b0b24d7b96ea1181808fab851d"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bits.html#ga5df483b0b24d7b96ea1181808fab851d">libevdev_get_phys</a> (const struct libevdev *dev)</td></tr>
87<tr class="memdesc:ga5df483b0b24d7b96ea1181808fab851d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the device's physical location, either as set by the caller or as read from the kernel.  <a href="group__bits.html#ga5df483b0b24d7b96ea1181808fab851d">More...</a><br /></td></tr>
88<tr class="separator:ga5df483b0b24d7b96ea1181808fab851d"><td class="memSeparator" colspan="2">&#160;</td></tr>
89<tr class="memitem:ga6d9f7d44bff8828ead3d251177035ca4"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bits.html#ga6d9f7d44bff8828ead3d251177035ca4">libevdev_get_uniq</a> (const struct libevdev *dev)</td></tr>
90<tr class="memdesc:ga6d9f7d44bff8828ead3d251177035ca4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the device's unique identifier, either as set by the caller or as read from the kernel.  <a href="group__bits.html#ga6d9f7d44bff8828ead3d251177035ca4">More...</a><br /></td></tr>
91<tr class="separator:ga6d9f7d44bff8828ead3d251177035ca4"><td class="memSeparator" colspan="2">&#160;</td></tr>
92<tr class="memitem:ga1dc66cfef646878d58be72f8902a6bac"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bits.html#ga1dc66cfef646878d58be72f8902a6bac">libevdev_get_id_product</a> (const struct libevdev *dev)</td></tr>
93<tr class="separator:ga1dc66cfef646878d58be72f8902a6bac"><td class="memSeparator" colspan="2">&#160;</td></tr>
94<tr class="memitem:ga08891c3285da5b8d26769c9a34f063f3"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bits.html#ga08891c3285da5b8d26769c9a34f063f3">libevdev_get_id_vendor</a> (const struct libevdev *dev)</td></tr>
95<tr class="separator:ga08891c3285da5b8d26769c9a34f063f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
96<tr class="memitem:ga9bf55d416401642bad0c435735682308"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bits.html#ga9bf55d416401642bad0c435735682308">libevdev_get_id_bustype</a> (const struct libevdev *dev)</td></tr>
97<tr class="separator:ga9bf55d416401642bad0c435735682308"><td class="memSeparator" colspan="2">&#160;</td></tr>
98<tr class="memitem:ga75a07d0c96dfe09d2194c104c429d0ae"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bits.html#ga75a07d0c96dfe09d2194c104c429d0ae">libevdev_get_id_version</a> (const struct libevdev *dev)</td></tr>
99<tr class="separator:ga75a07d0c96dfe09d2194c104c429d0ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
100<tr class="memitem:ga31e9e7a99215a03bcdc339b53e1be2fa"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bits.html#ga31e9e7a99215a03bcdc339b53e1be2fa">libevdev_get_driver_version</a> (const struct libevdev *dev)</td></tr>
101<tr class="separator:ga31e9e7a99215a03bcdc339b53e1be2fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
102<tr class="memitem:ga36d529ea53f4522004bc7d16c051464b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bits.html#ga36d529ea53f4522004bc7d16c051464b">libevdev_has_property</a> (const struct libevdev *dev, unsigned int prop)</td></tr>
103<tr class="separator:ga36d529ea53f4522004bc7d16c051464b"><td class="memSeparator" colspan="2">&#160;</td></tr>
104<tr class="memitem:ga398bef155fa4a0cfb832de30723ebd14"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bits.html#ga398bef155fa4a0cfb832de30723ebd14">libevdev_has_event_type</a> (const struct libevdev *dev, unsigned int type)</td></tr>
105<tr class="separator:ga398bef155fa4a0cfb832de30723ebd14"><td class="memSeparator" colspan="2">&#160;</td></tr>
106<tr class="memitem:gab2ab9dad417f33daa79fa0c3d682df0b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bits.html#gab2ab9dad417f33daa79fa0c3d682df0b">libevdev_has_event_code</a> (const struct libevdev *dev, unsigned int type, unsigned int code)</td></tr>
107<tr class="separator:gab2ab9dad417f33daa79fa0c3d682df0b"><td class="memSeparator" colspan="2">&#160;</td></tr>
108<tr class="memitem:ga482ce989a3f62f7e67e4ea7ad534189e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bits.html#ga482ce989a3f62f7e67e4ea7ad534189e">libevdev_get_abs_minimum</a> (const struct libevdev *dev, unsigned int code)</td></tr>
109<tr class="memdesc:ga482ce989a3f62f7e67e4ea7ad534189e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the minimum axis value for the given axis, as advertised by the kernel.  <a href="group__bits.html#ga482ce989a3f62f7e67e4ea7ad534189e">More...</a><br /></td></tr>
110<tr class="separator:ga482ce989a3f62f7e67e4ea7ad534189e"><td class="memSeparator" colspan="2">&#160;</td></tr>
111<tr class="memitem:ga97a3411ae85f1f3b5c5eb1d5351b11ca"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bits.html#ga97a3411ae85f1f3b5c5eb1d5351b11ca">libevdev_get_abs_maximum</a> (const struct libevdev *dev, unsigned int code)</td></tr>
112<tr class="memdesc:ga97a3411ae85f1f3b5c5eb1d5351b11ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the maximum axis value for the given axis, as advertised by the kernel.  <a href="group__bits.html#ga97a3411ae85f1f3b5c5eb1d5351b11ca">More...</a><br /></td></tr>
113<tr class="separator:ga97a3411ae85f1f3b5c5eb1d5351b11ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
114<tr class="memitem:ga1a3dfeb3bb2db0b4323c836c7ab10f1a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bits.html#ga1a3dfeb3bb2db0b4323c836c7ab10f1a">libevdev_get_abs_fuzz</a> (const struct libevdev *dev, unsigned int code)</td></tr>
115<tr class="memdesc:ga1a3dfeb3bb2db0b4323c836c7ab10f1a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the axis fuzz for the given axis, as advertised by the kernel.  <a href="group__bits.html#ga1a3dfeb3bb2db0b4323c836c7ab10f1a">More...</a><br /></td></tr>
116<tr class="separator:ga1a3dfeb3bb2db0b4323c836c7ab10f1a"><td class="memSeparator" colspan="2">&#160;</td></tr>
117<tr class="memitem:ga6b3f7ebae2324524dc41384acd724b92"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bits.html#ga6b3f7ebae2324524dc41384acd724b92">libevdev_get_abs_flat</a> (const struct libevdev *dev, unsigned int code)</td></tr>
118<tr class="memdesc:ga6b3f7ebae2324524dc41384acd724b92"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the axis flat for the given axis, as advertised by the kernel.  <a href="group__bits.html#ga6b3f7ebae2324524dc41384acd724b92">More...</a><br /></td></tr>
119<tr class="separator:ga6b3f7ebae2324524dc41384acd724b92"><td class="memSeparator" colspan="2">&#160;</td></tr>
120<tr class="memitem:ga75751e637a845201b6d1c419ecfa6ba4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bits.html#ga75751e637a845201b6d1c419ecfa6ba4">libevdev_get_abs_resolution</a> (const struct libevdev *dev, unsigned int code)</td></tr>
121<tr class="memdesc:ga75751e637a845201b6d1c419ecfa6ba4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the axis resolution for the given axis, as advertised by the kernel.  <a href="group__bits.html#ga75751e637a845201b6d1c419ecfa6ba4">More...</a><br /></td></tr>
122<tr class="separator:ga75751e637a845201b6d1c419ecfa6ba4"><td class="memSeparator" colspan="2">&#160;</td></tr>
123<tr class="memitem:ga6d8e2caf87fa536fad979346671838d7"><td class="memItemLeft" align="right" valign="top">const struct input_absinfo *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bits.html#ga6d8e2caf87fa536fad979346671838d7">libevdev_get_abs_info</a> (const struct libevdev *dev, unsigned int code)</td></tr>
124<tr class="memdesc:ga6d8e2caf87fa536fad979346671838d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the axis info for the given axis, as advertised by the kernel.  <a href="group__bits.html#ga6d8e2caf87fa536fad979346671838d7">More...</a><br /></td></tr>
125<tr class="separator:ga6d8e2caf87fa536fad979346671838d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
126<tr class="memitem:ga6259f4c6bdba950329ff9cd48c2ef8a3"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bits.html#ga6259f4c6bdba950329ff9cd48c2ef8a3">libevdev_get_event_value</a> (const struct libevdev *dev, unsigned int type, unsigned int code)</td></tr>
127<tr class="memdesc:ga6259f4c6bdba950329ff9cd48c2ef8a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Behaviour of this function is undefined if the device does not provide the event.  <a href="group__bits.html#ga6259f4c6bdba950329ff9cd48c2ef8a3">More...</a><br /></td></tr>
128<tr class="separator:ga6259f4c6bdba950329ff9cd48c2ef8a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
129<tr class="memitem:ga0a7be80d769294bf9758adf79c3c7147"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bits.html#ga0a7be80d769294bf9758adf79c3c7147">libevdev_fetch_event_value</a> (const struct libevdev *dev, unsigned int type, unsigned int code, int *value)</td></tr>
130<tr class="memdesc:ga0a7be80d769294bf9758adf79c3c7147"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fetch the current value of the event type.  <a href="group__bits.html#ga0a7be80d769294bf9758adf79c3c7147">More...</a><br /></td></tr>
131<tr class="separator:ga0a7be80d769294bf9758adf79c3c7147"><td class="memSeparator" colspan="2">&#160;</td></tr>
132<tr class="memitem:gaf12fa199bb9497b38358d72e7505d770"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bits.html#gaf12fa199bb9497b38358d72e7505d770">libevdev_get_repeat</a> (const struct libevdev *dev, int *delay, int *period)</td></tr>
133<tr class="memdesc:gaf12fa199bb9497b38358d72e7505d770"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the repeat delay and repeat period values for this device.  <a href="group__bits.html#gaf12fa199bb9497b38358d72e7505d770">More...</a><br /></td></tr>
134<tr class="separator:gaf12fa199bb9497b38358d72e7505d770"><td class="memSeparator" colspan="2">&#160;</td></tr>
135</table>
136<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
137<p>Abstraction functions to handle device capabilities, specifically device properties such as the name of the device and the bits representing the events supported by this device. </p>
138<p>The logical state returned may lag behind the physical state of the device. libevdev queries the device state on <a class="el" href="group__init.html#ga6658ac490d68c307ff8b8d1536c12b44" title="Set the fd for this struct and initialize internal data.">libevdev_set_fd()</a> and then relies on the caller to parse events through <a class="el" href="group__events.html#gabb96c864e836c0b98788f4ab771c3a76" title="Get the next event from the device.">libevdev_next_event()</a>. If a caller does not use <a class="el" href="group__events.html#gabb96c864e836c0b98788f4ab771c3a76" title="Get the next event from the device.">libevdev_next_event()</a>, libevdev will not update the internal state of the device and thus returns outdated values. </p>
139<h2 class="groupheader">Function Documentation</h2>
140<a id="ga0a7be80d769294bf9758adf79c3c7147"></a>
141<h2 class="memtitle"><span class="permalink"><a href="#ga0a7be80d769294bf9758adf79c3c7147">&#9670;&nbsp;</a></span>libevdev_fetch_event_value()</h2>
142
143<div class="memitem">
144<div class="memproto">
145      <table class="memname">
146        <tr>
147          <td class="memname">int libevdev_fetch_event_value </td>
148          <td>(</td>
149          <td class="paramtype">const struct libevdev *&#160;</td>
150          <td class="paramname"><em>dev</em>, </td>
151        </tr>
152        <tr>
153          <td class="paramkey"></td>
154          <td></td>
155          <td class="paramtype">unsigned int&#160;</td>
156          <td class="paramname"><em>type</em>, </td>
157        </tr>
158        <tr>
159          <td class="paramkey"></td>
160          <td></td>
161          <td class="paramtype">unsigned int&#160;</td>
162          <td class="paramname"><em>code</em>, </td>
163        </tr>
164        <tr>
165          <td class="paramkey"></td>
166          <td></td>
167          <td class="paramtype">int *&#160;</td>
168          <td class="paramname"><em>value</em>&#160;</td>
169        </tr>
170        <tr>
171          <td></td>
172          <td>)</td>
173          <td></td><td></td>
174        </tr>
175      </table>
176</div><div class="memdoc">
177
178<p>Fetch the current value of the event type. </p>
179<p>This is a shortcut for</p>
180<div class="fragment"><div class="line"><span class="keywordflow">if</span> (<a class="code" href="group__bits.html#ga398bef155fa4a0cfb832de30723ebd14">libevdev_has_event_type</a>(dev, t) &amp;&amp; <a class="code" href="group__bits.html#gab2ab9dad417f33daa79fa0c3d682df0b">libevdev_has_event_code</a>(dev, t, c))</div>
181<div class="line">     val = <a class="code" href="group__bits.html#ga6259f4c6bdba950329ff9cd48c2ef8a3">libevdev_get_event_value</a>(dev, t, c);</div>
182</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
183  <table class="params">
184    <tr><td class="paramdir"></td><td class="paramname">dev</td><td>The evdev device, already initialized with <a class="el" href="group__init.html#ga6658ac490d68c307ff8b8d1536c12b44" title="Set the fd for this struct and initialize internal data.">libevdev_set_fd()</a> </td></tr>
185    <tr><td class="paramdir"></td><td class="paramname">type</td><td>The event type for the code to query (EV_SYN, EV_REL, etc.) </td></tr>
186    <tr><td class="paramdir"></td><td class="paramname">code</td><td>The event code to query for, one of ABS_X, REL_X, etc. </td></tr>
187    <tr><td class="paramdir">[out]</td><td class="paramname">value</td><td>The current value of this axis returned.</td></tr>
188  </table>
189  </dd>
190</dl>
191<dl class="section return"><dt>Returns</dt><dd>If the device supports this event type and code, the return value is non-zero and value is set to the current value of this axis. Otherwise, 0 is returned and value is unmodified.</dd></dl>
192<dl class="section note"><dt>Note</dt><dd>This function is signal-safe. </dd>
193<dd>
194The value for ABS_MT_ events is undefined, use <a class="el" href="group__mt.html#gaca19dca5aa8f0ea3b210f3fc670384ec" title="Fetch the current value of the code for the given slot.">libevdev_fetch_slot_value()</a> instead</dd></dl>
195<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__mt.html#gaca19dca5aa8f0ea3b210f3fc670384ec" title="Fetch the current value of the code for the given slot.">libevdev_fetch_slot_value</a> </dd></dl>
196
197</div>
198</div>
199<a id="ga6b3f7ebae2324524dc41384acd724b92"></a>
200<h2 class="memtitle"><span class="permalink"><a href="#ga6b3f7ebae2324524dc41384acd724b92">&#9670;&nbsp;</a></span>libevdev_get_abs_flat()</h2>
201
202<div class="memitem">
203<div class="memproto">
204      <table class="memname">
205        <tr>
206          <td class="memname">int libevdev_get_abs_flat </td>
207          <td>(</td>
208          <td class="paramtype">const struct libevdev *&#160;</td>
209          <td class="paramname"><em>dev</em>, </td>
210        </tr>
211        <tr>
212          <td class="paramkey"></td>
213          <td></td>
214          <td class="paramtype">unsigned int&#160;</td>
215          <td class="paramname"><em>code</em>&#160;</td>
216        </tr>
217        <tr>
218          <td></td>
219          <td>)</td>
220          <td></td><td></td>
221        </tr>
222      </table>
223</div><div class="memdoc">
224
225<p>Get the axis flat for the given axis, as advertised by the kernel. </p>
226<dl class="params"><dt>Parameters</dt><dd>
227  <table class="params">
228    <tr><td class="paramname">dev</td><td>The evdev device, already initialized with <a class="el" href="group__init.html#ga6658ac490d68c307ff8b8d1536c12b44" title="Set the fd for this struct and initialize internal data.">libevdev_set_fd()</a> </td></tr>
229    <tr><td class="paramname">code</td><td>The EV_ABS event code to query for, one of ABS_X, ABS_Y, etc.</td></tr>
230  </table>
231  </dd>
232</dl>
233<dl class="section return"><dt>Returns</dt><dd>axis flat for the given axis or 0 if the axis is invalid</dd></dl>
234<dl class="section note"><dt>Note</dt><dd>This function is signal-safe. </dd></dl>
235
236</div>
237</div>
238<a id="ga1a3dfeb3bb2db0b4323c836c7ab10f1a"></a>
239<h2 class="memtitle"><span class="permalink"><a href="#ga1a3dfeb3bb2db0b4323c836c7ab10f1a">&#9670;&nbsp;</a></span>libevdev_get_abs_fuzz()</h2>
240
241<div class="memitem">
242<div class="memproto">
243      <table class="memname">
244        <tr>
245          <td class="memname">int libevdev_get_abs_fuzz </td>
246          <td>(</td>
247          <td class="paramtype">const struct libevdev *&#160;</td>
248          <td class="paramname"><em>dev</em>, </td>
249        </tr>
250        <tr>
251          <td class="paramkey"></td>
252          <td></td>
253          <td class="paramtype">unsigned int&#160;</td>
254          <td class="paramname"><em>code</em>&#160;</td>
255        </tr>
256        <tr>
257          <td></td>
258          <td>)</td>
259          <td></td><td></td>
260        </tr>
261      </table>
262</div><div class="memdoc">
263
264<p>Get the axis fuzz for the given axis, as advertised by the kernel. </p>
265<dl class="params"><dt>Parameters</dt><dd>
266  <table class="params">
267    <tr><td class="paramname">dev</td><td>The evdev device, already initialized with <a class="el" href="group__init.html#ga6658ac490d68c307ff8b8d1536c12b44" title="Set the fd for this struct and initialize internal data.">libevdev_set_fd()</a> </td></tr>
268    <tr><td class="paramname">code</td><td>The EV_ABS event code to query for, one of ABS_X, ABS_Y, etc.</td></tr>
269  </table>
270  </dd>
271</dl>
272<dl class="section return"><dt>Returns</dt><dd>axis fuzz for the given axis or 0 if the axis is invalid</dd></dl>
273<dl class="section note"><dt>Note</dt><dd>This function is signal-safe. </dd></dl>
274
275</div>
276</div>
277<a id="ga6d8e2caf87fa536fad979346671838d7"></a>
278<h2 class="memtitle"><span class="permalink"><a href="#ga6d8e2caf87fa536fad979346671838d7">&#9670;&nbsp;</a></span>libevdev_get_abs_info()</h2>
279
280<div class="memitem">
281<div class="memproto">
282      <table class="memname">
283        <tr>
284          <td class="memname">const struct input_absinfo* libevdev_get_abs_info </td>
285          <td>(</td>
286          <td class="paramtype">const struct libevdev *&#160;</td>
287          <td class="paramname"><em>dev</em>, </td>
288        </tr>
289        <tr>
290          <td class="paramkey"></td>
291          <td></td>
292          <td class="paramtype">unsigned int&#160;</td>
293          <td class="paramname"><em>code</em>&#160;</td>
294        </tr>
295        <tr>
296          <td></td>
297          <td>)</td>
298          <td></td><td></td>
299        </tr>
300      </table>
301</div><div class="memdoc">
302
303<p>Get the axis info for the given axis, as advertised by the kernel. </p>
304<dl class="params"><dt>Parameters</dt><dd>
305  <table class="params">
306    <tr><td class="paramname">dev</td><td>The evdev device, already initialized with <a class="el" href="group__init.html#ga6658ac490d68c307ff8b8d1536c12b44" title="Set the fd for this struct and initialize internal data.">libevdev_set_fd()</a> </td></tr>
307    <tr><td class="paramname">code</td><td>The EV_ABS event code to query for, one of ABS_X, ABS_Y, etc.</td></tr>
308  </table>
309  </dd>
310</dl>
311<dl class="section return"><dt>Returns</dt><dd>The input_absinfo for the given code, or NULL if the device does not support this event code.</dd></dl>
312<dl class="section note"><dt>Note</dt><dd>This function is signal-safe. </dd></dl>
313
314</div>
315</div>
316<a id="ga97a3411ae85f1f3b5c5eb1d5351b11ca"></a>
317<h2 class="memtitle"><span class="permalink"><a href="#ga97a3411ae85f1f3b5c5eb1d5351b11ca">&#9670;&nbsp;</a></span>libevdev_get_abs_maximum()</h2>
318
319<div class="memitem">
320<div class="memproto">
321      <table class="memname">
322        <tr>
323          <td class="memname">int libevdev_get_abs_maximum </td>
324          <td>(</td>
325          <td class="paramtype">const struct libevdev *&#160;</td>
326          <td class="paramname"><em>dev</em>, </td>
327        </tr>
328        <tr>
329          <td class="paramkey"></td>
330          <td></td>
331          <td class="paramtype">unsigned int&#160;</td>
332          <td class="paramname"><em>code</em>&#160;</td>
333        </tr>
334        <tr>
335          <td></td>
336          <td>)</td>
337          <td></td><td></td>
338        </tr>
339      </table>
340</div><div class="memdoc">
341
342<p>Get the maximum axis value for the given axis, as advertised by the kernel. </p>
343<dl class="params"><dt>Parameters</dt><dd>
344  <table class="params">
345    <tr><td class="paramname">dev</td><td>The evdev device, already initialized with <a class="el" href="group__init.html#ga6658ac490d68c307ff8b8d1536c12b44" title="Set the fd for this struct and initialize internal data.">libevdev_set_fd()</a> </td></tr>
346    <tr><td class="paramname">code</td><td>The EV_ABS event code to query for, one of ABS_X, ABS_Y, etc.</td></tr>
347  </table>
348  </dd>
349</dl>
350<dl class="section return"><dt>Returns</dt><dd>axis maximum for the given axis or 0 if the axis is invalid</dd></dl>
351<dl class="section note"><dt>Note</dt><dd>This function is signal-safe. </dd></dl>
352
353</div>
354</div>
355<a id="ga482ce989a3f62f7e67e4ea7ad534189e"></a>
356<h2 class="memtitle"><span class="permalink"><a href="#ga482ce989a3f62f7e67e4ea7ad534189e">&#9670;&nbsp;</a></span>libevdev_get_abs_minimum()</h2>
357
358<div class="memitem">
359<div class="memproto">
360      <table class="memname">
361        <tr>
362          <td class="memname">int libevdev_get_abs_minimum </td>
363          <td>(</td>
364          <td class="paramtype">const struct libevdev *&#160;</td>
365          <td class="paramname"><em>dev</em>, </td>
366        </tr>
367        <tr>
368          <td class="paramkey"></td>
369          <td></td>
370          <td class="paramtype">unsigned int&#160;</td>
371          <td class="paramname"><em>code</em>&#160;</td>
372        </tr>
373        <tr>
374          <td></td>
375          <td>)</td>
376          <td></td><td></td>
377        </tr>
378      </table>
379</div><div class="memdoc">
380
381<p>Get the minimum axis value for the given axis, as advertised by the kernel. </p>
382<dl class="params"><dt>Parameters</dt><dd>
383  <table class="params">
384    <tr><td class="paramname">dev</td><td>The evdev device, already initialized with <a class="el" href="group__init.html#ga6658ac490d68c307ff8b8d1536c12b44" title="Set the fd for this struct and initialize internal data.">libevdev_set_fd()</a> </td></tr>
385    <tr><td class="paramname">code</td><td>The EV_ABS event code to query for, one of ABS_X, ABS_Y, etc.</td></tr>
386  </table>
387  </dd>
388</dl>
389<dl class="section return"><dt>Returns</dt><dd>axis minimum for the given axis or 0 if the axis is invalid</dd></dl>
390<dl class="section note"><dt>Note</dt><dd>This function is signal-safe. </dd></dl>
391
392</div>
393</div>
394<a id="ga75751e637a845201b6d1c419ecfa6ba4"></a>
395<h2 class="memtitle"><span class="permalink"><a href="#ga75751e637a845201b6d1c419ecfa6ba4">&#9670;&nbsp;</a></span>libevdev_get_abs_resolution()</h2>
396
397<div class="memitem">
398<div class="memproto">
399      <table class="memname">
400        <tr>
401          <td class="memname">int libevdev_get_abs_resolution </td>
402          <td>(</td>
403          <td class="paramtype">const struct libevdev *&#160;</td>
404          <td class="paramname"><em>dev</em>, </td>
405        </tr>
406        <tr>
407          <td class="paramkey"></td>
408          <td></td>
409          <td class="paramtype">unsigned int&#160;</td>
410          <td class="paramname"><em>code</em>&#160;</td>
411        </tr>
412        <tr>
413          <td></td>
414          <td>)</td>
415          <td></td><td></td>
416        </tr>
417      </table>
418</div><div class="memdoc">
419
420<p>Get the axis resolution for the given axis, as advertised by the kernel. </p>
421<dl class="params"><dt>Parameters</dt><dd>
422  <table class="params">
423    <tr><td class="paramname">dev</td><td>The evdev device, already initialized with <a class="el" href="group__init.html#ga6658ac490d68c307ff8b8d1536c12b44" title="Set the fd for this struct and initialize internal data.">libevdev_set_fd()</a> </td></tr>
424    <tr><td class="paramname">code</td><td>The EV_ABS event code to query for, one of ABS_X, ABS_Y, etc.</td></tr>
425  </table>
426  </dd>
427</dl>
428<dl class="section return"><dt>Returns</dt><dd>axis resolution for the given axis or 0 if the axis is invalid</dd></dl>
429<dl class="section note"><dt>Note</dt><dd>This function is signal-safe. </dd></dl>
430
431</div>
432</div>
433<a id="ga31e9e7a99215a03bcdc339b53e1be2fa"></a>
434<h2 class="memtitle"><span class="permalink"><a href="#ga31e9e7a99215a03bcdc339b53e1be2fa">&#9670;&nbsp;</a></span>libevdev_get_driver_version()</h2>
435
436<div class="memitem">
437<div class="memproto">
438      <table class="memname">
439        <tr>
440          <td class="memname">int libevdev_get_driver_version </td>
441          <td>(</td>
442          <td class="paramtype">const struct libevdev *&#160;</td>
443          <td class="paramname"><em>dev</em></td><td>)</td>
444          <td></td>
445        </tr>
446      </table>
447</div><div class="memdoc">
448<dl class="params"><dt>Parameters</dt><dd>
449  <table class="params">
450    <tr><td class="paramname">dev</td><td>The evdev device, already initialized with <a class="el" href="group__init.html#ga6658ac490d68c307ff8b8d1536c12b44" title="Set the fd for this struct and initialize internal data.">libevdev_set_fd()</a></td></tr>
451  </table>
452  </dd>
453</dl>
454<dl class="section return"><dt>Returns</dt><dd>The driver version for this device</dd></dl>
455<dl class="section note"><dt>Note</dt><dd>This function is signal-safe. </dd></dl>
456
457</div>
458</div>
459<a id="ga6259f4c6bdba950329ff9cd48c2ef8a3"></a>
460<h2 class="memtitle"><span class="permalink"><a href="#ga6259f4c6bdba950329ff9cd48c2ef8a3">&#9670;&nbsp;</a></span>libevdev_get_event_value()</h2>
461
462<div class="memitem">
463<div class="memproto">
464      <table class="memname">
465        <tr>
466          <td class="memname">int libevdev_get_event_value </td>
467          <td>(</td>
468          <td class="paramtype">const struct libevdev *&#160;</td>
469          <td class="paramname"><em>dev</em>, </td>
470        </tr>
471        <tr>
472          <td class="paramkey"></td>
473          <td></td>
474          <td class="paramtype">unsigned int&#160;</td>
475          <td class="paramname"><em>type</em>, </td>
476        </tr>
477        <tr>
478          <td class="paramkey"></td>
479          <td></td>
480          <td class="paramtype">unsigned int&#160;</td>
481          <td class="paramname"><em>code</em>&#160;</td>
482        </tr>
483        <tr>
484          <td></td>
485          <td>)</td>
486          <td></td><td></td>
487        </tr>
488      </table>
489</div><div class="memdoc">
490
491<p>Behaviour of this function is undefined if the device does not provide the event. </p>
492<p>If the device supports ABS_MT_SLOT, the value returned for any ABS_MT_* event code is the value of the currently active slot. You should use <a class="el" href="group__mt.html#ga8c6303391cb4f90b2d46763cf4eb8bc8" title="Return the current value of the code for the given slot.">libevdev_get_slot_value()</a> instead.</p>
493<dl class="params"><dt>Parameters</dt><dd>
494  <table class="params">
495    <tr><td class="paramname">dev</td><td>The evdev device, already initialized with <a class="el" href="group__init.html#ga6658ac490d68c307ff8b8d1536c12b44" title="Set the fd for this struct and initialize internal data.">libevdev_set_fd()</a> </td></tr>
496    <tr><td class="paramname">type</td><td>The event type for the code to query (EV_SYN, EV_REL, etc.) </td></tr>
497    <tr><td class="paramname">code</td><td>The event code to query for, one of ABS_X, REL_X, etc.</td></tr>
498  </table>
499  </dd>
500</dl>
501<dl class="section return"><dt>Returns</dt><dd>The current value of the event.</dd></dl>
502<dl class="section note"><dt>Note</dt><dd>This function is signal-safe. </dd>
503<dd>
504The value for ABS_MT_ events is undefined, use <a class="el" href="group__mt.html#ga8c6303391cb4f90b2d46763cf4eb8bc8" title="Return the current value of the code for the given slot.">libevdev_get_slot_value()</a> instead</dd></dl>
505<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__mt.html#ga8c6303391cb4f90b2d46763cf4eb8bc8" title="Return the current value of the code for the given slot.">libevdev_get_slot_value</a> </dd></dl>
506
507</div>
508</div>
509<a id="ga9bf55d416401642bad0c435735682308"></a>
510<h2 class="memtitle"><span class="permalink"><a href="#ga9bf55d416401642bad0c435735682308">&#9670;&nbsp;</a></span>libevdev_get_id_bustype()</h2>
511
512<div class="memitem">
513<div class="memproto">
514      <table class="memname">
515        <tr>
516          <td class="memname">int libevdev_get_id_bustype </td>
517          <td>(</td>
518          <td class="paramtype">const struct libevdev *&#160;</td>
519          <td class="paramname"><em>dev</em></td><td>)</td>
520          <td></td>
521        </tr>
522      </table>
523</div><div class="memdoc">
524<dl class="params"><dt>Parameters</dt><dd>
525  <table class="params">
526    <tr><td class="paramname">dev</td><td>The evdev device, already initialized with <a class="el" href="group__init.html#ga6658ac490d68c307ff8b8d1536c12b44" title="Set the fd for this struct and initialize internal data.">libevdev_set_fd()</a></td></tr>
527  </table>
528  </dd>
529</dl>
530<dl class="section return"><dt>Returns</dt><dd>The device's bus type</dd></dl>
531<dl class="section note"><dt>Note</dt><dd>This function is signal-safe. </dd></dl>
532
533</div>
534</div>
535<a id="ga1dc66cfef646878d58be72f8902a6bac"></a>
536<h2 class="memtitle"><span class="permalink"><a href="#ga1dc66cfef646878d58be72f8902a6bac">&#9670;&nbsp;</a></span>libevdev_get_id_product()</h2>
537
538<div class="memitem">
539<div class="memproto">
540      <table class="memname">
541        <tr>
542          <td class="memname">int libevdev_get_id_product </td>
543          <td>(</td>
544          <td class="paramtype">const struct libevdev *&#160;</td>
545          <td class="paramname"><em>dev</em></td><td>)</td>
546          <td></td>
547        </tr>
548      </table>
549</div><div class="memdoc">
550<dl class="params"><dt>Parameters</dt><dd>
551  <table class="params">
552    <tr><td class="paramname">dev</td><td>The evdev device, already initialized with <a class="el" href="group__init.html#ga6658ac490d68c307ff8b8d1536c12b44" title="Set the fd for this struct and initialize internal data.">libevdev_set_fd()</a></td></tr>
553  </table>
554  </dd>
555</dl>
556<dl class="section return"><dt>Returns</dt><dd>The device's product ID</dd></dl>
557<dl class="section note"><dt>Note</dt><dd>This function is signal-safe. </dd></dl>
558
559</div>
560</div>
561<a id="ga08891c3285da5b8d26769c9a34f063f3"></a>
562<h2 class="memtitle"><span class="permalink"><a href="#ga08891c3285da5b8d26769c9a34f063f3">&#9670;&nbsp;</a></span>libevdev_get_id_vendor()</h2>
563
564<div class="memitem">
565<div class="memproto">
566      <table class="memname">
567        <tr>
568          <td class="memname">int libevdev_get_id_vendor </td>
569          <td>(</td>
570          <td class="paramtype">const struct libevdev *&#160;</td>
571          <td class="paramname"><em>dev</em></td><td>)</td>
572          <td></td>
573        </tr>
574      </table>
575</div><div class="memdoc">
576<dl class="params"><dt>Parameters</dt><dd>
577  <table class="params">
578    <tr><td class="paramname">dev</td><td>The evdev device, already initialized with <a class="el" href="group__init.html#ga6658ac490d68c307ff8b8d1536c12b44" title="Set the fd for this struct and initialize internal data.">libevdev_set_fd()</a></td></tr>
579  </table>
580  </dd>
581</dl>
582<dl class="section return"><dt>Returns</dt><dd>The device's vendor ID</dd></dl>
583<dl class="section note"><dt>Note</dt><dd>This function is signal-safe. </dd></dl>
584
585</div>
586</div>
587<a id="ga75a07d0c96dfe09d2194c104c429d0ae"></a>
588<h2 class="memtitle"><span class="permalink"><a href="#ga75a07d0c96dfe09d2194c104c429d0ae">&#9670;&nbsp;</a></span>libevdev_get_id_version()</h2>
589
590<div class="memitem">
591<div class="memproto">
592      <table class="memname">
593        <tr>
594          <td class="memname">int libevdev_get_id_version </td>
595          <td>(</td>
596          <td class="paramtype">const struct libevdev *&#160;</td>
597          <td class="paramname"><em>dev</em></td><td>)</td>
598          <td></td>
599        </tr>
600      </table>
601</div><div class="memdoc">
602<dl class="params"><dt>Parameters</dt><dd>
603  <table class="params">
604    <tr><td class="paramname">dev</td><td>The evdev device, already initialized with <a class="el" href="group__init.html#ga6658ac490d68c307ff8b8d1536c12b44" title="Set the fd for this struct and initialize internal data.">libevdev_set_fd()</a></td></tr>
605  </table>
606  </dd>
607</dl>
608<dl class="section return"><dt>Returns</dt><dd>The device's firmware version</dd></dl>
609<dl class="section note"><dt>Note</dt><dd>This function is signal-safe. </dd></dl>
610
611</div>
612</div>
613<a id="gaed0328c67b7a78422636d9fe09a73f12"></a>
614<h2 class="memtitle"><span class="permalink"><a href="#gaed0328c67b7a78422636d9fe09a73f12">&#9670;&nbsp;</a></span>libevdev_get_name()</h2>
615
616<div class="memitem">
617<div class="memproto">
618      <table class="memname">
619        <tr>
620          <td class="memname">const char* libevdev_get_name </td>
621          <td>(</td>
622          <td class="paramtype">const struct libevdev *&#160;</td>
623          <td class="paramname"><em>dev</em></td><td>)</td>
624          <td></td>
625        </tr>
626      </table>
627</div><div class="memdoc">
628
629<p>Retrieve the device's name, either as set by the caller or as read from the kernel. </p>
630<p>The string returned is valid until <a class="el" href="group__init.html#gacd9fe760d15be25fc99ce469034bd78c" title="Clean up and free the libevdev struct.">libevdev_free()</a> or until <a class="el" href="group__kernel.html#gae5dcdb7678cdc9be4ab1989725b4ed32" title="Change the device&#39;s name as returned by libevdev_get_name().">libevdev_set_name()</a>, whichever comes earlier.</p>
631<dl class="params"><dt>Parameters</dt><dd>
632  <table class="params">
633    <tr><td class="paramname">dev</td><td>The evdev device, already initialized with <a class="el" href="group__init.html#ga6658ac490d68c307ff8b8d1536c12b44" title="Set the fd for this struct and initialize internal data.">libevdev_set_fd()</a></td></tr>
634  </table>
635  </dd>
636</dl>
637<dl class="section return"><dt>Returns</dt><dd>The device name as read off the kernel device. The name is never NULL but it may be the empty string.</dd></dl>
638<dl class="section note"><dt>Note</dt><dd>This function is signal-safe. </dd></dl>
639
640</div>
641</div>
642<a id="ga5df483b0b24d7b96ea1181808fab851d"></a>
643<h2 class="memtitle"><span class="permalink"><a href="#ga5df483b0b24d7b96ea1181808fab851d">&#9670;&nbsp;</a></span>libevdev_get_phys()</h2>
644
645<div class="memitem">
646<div class="memproto">
647      <table class="memname">
648        <tr>
649          <td class="memname">const char* libevdev_get_phys </td>
650          <td>(</td>
651          <td class="paramtype">const struct libevdev *&#160;</td>
652          <td class="paramname"><em>dev</em></td><td>)</td>
653          <td></td>
654        </tr>
655      </table>
656</div><div class="memdoc">
657
658<p>Retrieve the device's physical location, either as set by the caller or as read from the kernel. </p>
659<p>The string returned is valid until <a class="el" href="group__init.html#gacd9fe760d15be25fc99ce469034bd78c" title="Clean up and free the libevdev struct.">libevdev_free()</a> or until <a class="el" href="group__kernel.html#gacd57c8d6ace8e0b1417809a9c1c67af3" title="Change the device&#39;s physical location as returned by libevdev_get_phys().">libevdev_set_phys()</a>, whichever comes earlier.</p>
660<p>Virtual devices such as uinput devices have no phys location.</p>
661<dl class="params"><dt>Parameters</dt><dd>
662  <table class="params">
663    <tr><td class="paramname">dev</td><td>The evdev device, already initialized with <a class="el" href="group__init.html#ga6658ac490d68c307ff8b8d1536c12b44" title="Set the fd for this struct and initialize internal data.">libevdev_set_fd()</a></td></tr>
664  </table>
665  </dd>
666</dl>
667<dl class="section return"><dt>Returns</dt><dd>The physical location of this device, or NULL if there is none</dd></dl>
668<dl class="section note"><dt>Note</dt><dd>This function is signal safe. </dd></dl>
669
670</div>
671</div>
672<a id="gaf12fa199bb9497b38358d72e7505d770"></a>
673<h2 class="memtitle"><span class="permalink"><a href="#gaf12fa199bb9497b38358d72e7505d770">&#9670;&nbsp;</a></span>libevdev_get_repeat()</h2>
674
675<div class="memitem">
676<div class="memproto">
677      <table class="memname">
678        <tr>
679          <td class="memname">int libevdev_get_repeat </td>
680          <td>(</td>
681          <td class="paramtype">const struct libevdev *&#160;</td>
682          <td class="paramname"><em>dev</em>, </td>
683        </tr>
684        <tr>
685          <td class="paramkey"></td>
686          <td></td>
687          <td class="paramtype">int *&#160;</td>
688          <td class="paramname"><em>delay</em>, </td>
689        </tr>
690        <tr>
691          <td class="paramkey"></td>
692          <td></td>
693          <td class="paramtype">int *&#160;</td>
694          <td class="paramname"><em>period</em>&#160;</td>
695        </tr>
696        <tr>
697          <td></td>
698          <td>)</td>
699          <td></td><td></td>
700        </tr>
701      </table>
702</div><div class="memdoc">
703
704<p>Get the repeat delay and repeat period values for this device. </p>
705<p>This function is a convenience function only, EV_REP is supported by <a class="el" href="group__bits.html#ga6259f4c6bdba950329ff9cd48c2ef8a3" title="Behaviour of this function is undefined if the device does not provide the event.">libevdev_get_event_value()</a>.</p>
706<dl class="params"><dt>Parameters</dt><dd>
707  <table class="params">
708    <tr><td class="paramname">dev</td><td>The evdev device, already initialized with <a class="el" href="group__init.html#ga6658ac490d68c307ff8b8d1536c12b44" title="Set the fd for this struct and initialize internal data.">libevdev_set_fd()</a> </td></tr>
709    <tr><td class="paramname">delay</td><td>If not null, set to the repeat delay value </td></tr>
710    <tr><td class="paramname">period</td><td>If not null, set to the repeat period value</td></tr>
711  </table>
712  </dd>
713</dl>
714<dl class="section return"><dt>Returns</dt><dd>0 on success, -1 if this device does not have repeat settings.</dd></dl>
715<dl class="section note"><dt>Note</dt><dd>This function is signal-safe</dd></dl>
716<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__bits.html#ga6259f4c6bdba950329ff9cd48c2ef8a3" title="Behaviour of this function is undefined if the device does not provide the event.">libevdev_get_event_value</a> </dd></dl>
717
718</div>
719</div>
720<a id="ga6d9f7d44bff8828ead3d251177035ca4"></a>
721<h2 class="memtitle"><span class="permalink"><a href="#ga6d9f7d44bff8828ead3d251177035ca4">&#9670;&nbsp;</a></span>libevdev_get_uniq()</h2>
722
723<div class="memitem">
724<div class="memproto">
725      <table class="memname">
726        <tr>
727          <td class="memname">const char* libevdev_get_uniq </td>
728          <td>(</td>
729          <td class="paramtype">const struct libevdev *&#160;</td>
730          <td class="paramname"><em>dev</em></td><td>)</td>
731          <td></td>
732        </tr>
733      </table>
734</div><div class="memdoc">
735
736<p>Retrieve the device's unique identifier, either as set by the caller or as read from the kernel. </p>
737<p>The string returned is valid until <a class="el" href="group__init.html#gacd9fe760d15be25fc99ce469034bd78c" title="Clean up and free the libevdev struct.">libevdev_free()</a> or until <a class="el" href="group__kernel.html#ga4e4fd2627744fd5811c50c7403f27ad7" title="Change the device&#39;s unique identifier as returned by libevdev_get_uniq().">libevdev_set_uniq()</a>, whichever comes earlier.</p>
738<dl class="params"><dt>Parameters</dt><dd>
739  <table class="params">
740    <tr><td class="paramname">dev</td><td>The evdev device, already initialized with <a class="el" href="group__init.html#ga6658ac490d68c307ff8b8d1536c12b44" title="Set the fd for this struct and initialize internal data.">libevdev_set_fd()</a></td></tr>
741  </table>
742  </dd>
743</dl>
744<dl class="section return"><dt>Returns</dt><dd>The unique identifier for this device, or NULL if there is none</dd></dl>
745<dl class="section note"><dt>Note</dt><dd>This function is signal safe. </dd></dl>
746
747</div>
748</div>
749<a id="gab2ab9dad417f33daa79fa0c3d682df0b"></a>
750<h2 class="memtitle"><span class="permalink"><a href="#gab2ab9dad417f33daa79fa0c3d682df0b">&#9670;&nbsp;</a></span>libevdev_has_event_code()</h2>
751
752<div class="memitem">
753<div class="memproto">
754      <table class="memname">
755        <tr>
756          <td class="memname">int libevdev_has_event_code </td>
757          <td>(</td>
758          <td class="paramtype">const struct libevdev *&#160;</td>
759          <td class="paramname"><em>dev</em>, </td>
760        </tr>
761        <tr>
762          <td class="paramkey"></td>
763          <td></td>
764          <td class="paramtype">unsigned int&#160;</td>
765          <td class="paramname"><em>type</em>, </td>
766        </tr>
767        <tr>
768          <td class="paramkey"></td>
769          <td></td>
770          <td class="paramtype">unsigned int&#160;</td>
771          <td class="paramname"><em>code</em>&#160;</td>
772        </tr>
773        <tr>
774          <td></td>
775          <td>)</td>
776          <td></td><td></td>
777        </tr>
778      </table>
779</div><div class="memdoc">
780<dl class="params"><dt>Parameters</dt><dd>
781  <table class="params">
782    <tr><td class="paramname">dev</td><td>The evdev device, already initialized with <a class="el" href="group__init.html#ga6658ac490d68c307ff8b8d1536c12b44" title="Set the fd for this struct and initialize internal data.">libevdev_set_fd()</a> </td></tr>
783    <tr><td class="paramname">type</td><td>The event type for the code to query (EV_SYN, EV_REL, etc.) </td></tr>
784    <tr><td class="paramname">code</td><td>The event code to query for, one of ABS_X, REL_X, etc.</td></tr>
785  </table>
786  </dd>
787</dl>
788<dl class="section return"><dt>Returns</dt><dd>1 if the device supports this event type and code, or 0 otherwise.</dd></dl>
789<dl class="section note"><dt>Note</dt><dd>This function is signal-safe. </dd></dl>
790
791</div>
792</div>
793<a id="ga398bef155fa4a0cfb832de30723ebd14"></a>
794<h2 class="memtitle"><span class="permalink"><a href="#ga398bef155fa4a0cfb832de30723ebd14">&#9670;&nbsp;</a></span>libevdev_has_event_type()</h2>
795
796<div class="memitem">
797<div class="memproto">
798      <table class="memname">
799        <tr>
800          <td class="memname">int libevdev_has_event_type </td>
801          <td>(</td>
802          <td class="paramtype">const struct libevdev *&#160;</td>
803          <td class="paramname"><em>dev</em>, </td>
804        </tr>
805        <tr>
806          <td class="paramkey"></td>
807          <td></td>
808          <td class="paramtype">unsigned int&#160;</td>
809          <td class="paramname"><em>type</em>&#160;</td>
810        </tr>
811        <tr>
812          <td></td>
813          <td>)</td>
814          <td></td><td></td>
815        </tr>
816      </table>
817</div><div class="memdoc">
818<dl class="params"><dt>Parameters</dt><dd>
819  <table class="params">
820    <tr><td class="paramname">dev</td><td>The evdev device, already initialized with <a class="el" href="group__init.html#ga6658ac490d68c307ff8b8d1536c12b44" title="Set the fd for this struct and initialize internal data.">libevdev_set_fd()</a> </td></tr>
821    <tr><td class="paramname">type</td><td>The event type to query for, one of EV_SYN, EV_REL, etc.</td></tr>
822  </table>
823  </dd>
824</dl>
825<dl class="section return"><dt>Returns</dt><dd>1 if the device supports this event type, or 0 otherwise.</dd></dl>
826<dl class="section note"><dt>Note</dt><dd>This function is signal-safe. </dd></dl>
827
828</div>
829</div>
830<a id="ga36d529ea53f4522004bc7d16c051464b"></a>
831<h2 class="memtitle"><span class="permalink"><a href="#ga36d529ea53f4522004bc7d16c051464b">&#9670;&nbsp;</a></span>libevdev_has_property()</h2>
832
833<div class="memitem">
834<div class="memproto">
835      <table class="memname">
836        <tr>
837          <td class="memname">int libevdev_has_property </td>
838          <td>(</td>
839          <td class="paramtype">const struct libevdev *&#160;</td>
840          <td class="paramname"><em>dev</em>, </td>
841        </tr>
842        <tr>
843          <td class="paramkey"></td>
844          <td></td>
845          <td class="paramtype">unsigned int&#160;</td>
846          <td class="paramname"><em>prop</em>&#160;</td>
847        </tr>
848        <tr>
849          <td></td>
850          <td>)</td>
851          <td></td><td></td>
852        </tr>
853      </table>
854</div><div class="memdoc">
855<dl class="params"><dt>Parameters</dt><dd>
856  <table class="params">
857    <tr><td class="paramname">dev</td><td>The evdev device, already initialized with <a class="el" href="group__init.html#ga6658ac490d68c307ff8b8d1536c12b44" title="Set the fd for this struct and initialize internal data.">libevdev_set_fd()</a> </td></tr>
858    <tr><td class="paramname">prop</td><td>The input property to query for, one of INPUT_PROP_...</td></tr>
859  </table>
860  </dd>
861</dl>
862<dl class="section return"><dt>Returns</dt><dd>1 if the device provides this input property, or 0 otherwise.</dd></dl>
863<dl class="section note"><dt>Note</dt><dd>This function is signal-safe </dd></dl>
864
865</div>
866</div>
867</div><!-- contents -->
868<div class="ttc" id="agroup__bits_html_gab2ab9dad417f33daa79fa0c3d682df0b"><div class="ttname"><a href="group__bits.html#gab2ab9dad417f33daa79fa0c3d682df0b">libevdev_has_event_code</a></div><div class="ttdeci">int libevdev_has_event_code(const struct libevdev *dev, unsigned int type, unsigned int code)</div></div>
869<div class="ttc" id="agroup__bits_html_ga6259f4c6bdba950329ff9cd48c2ef8a3"><div class="ttname"><a href="group__bits.html#ga6259f4c6bdba950329ff9cd48c2ef8a3">libevdev_get_event_value</a></div><div class="ttdeci">int libevdev_get_event_value(const struct libevdev *dev, unsigned int type, unsigned int code)</div><div class="ttdoc">Behaviour of this function is undefined if the device does not provide the event.</div></div>
870<div class="ttc" id="agroup__bits_html_ga398bef155fa4a0cfb832de30723ebd14"><div class="ttname"><a href="group__bits.html#ga398bef155fa4a0cfb832de30723ebd14">libevdev_has_event_type</a></div><div class="ttdeci">int libevdev_has_event_type(const struct libevdev *dev, unsigned int type)</div></div>
871<!-- HTML footer for doxygen 1.8.8-->
872<!-- start footer part -->
873</div>
874</div>
875</div>
876</div>
877</div>
878<hr class="footer"/><address class="footer"><small>
879Generated by &#160;<a href="http://www.doxygen.org/index.html">
880<img class="footer" src="doxygen.png" alt="doxygen"/>
881</a> 1.8.20
882</small></address>
883</body>
884</html>
885