• 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.9.1"/>
10        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
11        <title>libevdev: Miscellaneous helper functions</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.12.1</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.9.1 -->
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','.html');
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">Miscellaneous helper functions</div>  </div>
75</div><!--header-->
76<div class="contents">
77
78<p>Functions for printing or querying event ranges.
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:gab8b6b80740e028261300b8952b61a596"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__misc.html#gab8b6b80740e028261300b8952b61a596">libevdev_event_is_type</a> (const struct input_event *ev, unsigned int type)</td></tr>
84<tr class="memdesc:gab8b6b80740e028261300b8952b61a596"><td class="mdescLeft">&#160;</td><td class="mdescRight">Helper function to check if an event is of a specific type.  <a href="group__misc.html#gab8b6b80740e028261300b8952b61a596">More...</a><br /></td></tr>
85<tr class="separator:gab8b6b80740e028261300b8952b61a596"><td class="memSeparator" colspan="2">&#160;</td></tr>
86<tr class="memitem:ga37766a6a498fef3294d589abcce688bb"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__misc.html#ga37766a6a498fef3294d589abcce688bb">libevdev_event_is_code</a> (const struct input_event *ev, unsigned int type, unsigned int code)</td></tr>
87<tr class="memdesc:ga37766a6a498fef3294d589abcce688bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Helper function to check if an event is of a specific type and code.  <a href="group__misc.html#ga37766a6a498fef3294d589abcce688bb">More...</a><br /></td></tr>
88<tr class="separator:ga37766a6a498fef3294d589abcce688bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
89<tr class="memitem:gac99720fd926bf288764f9a81bf37ed09"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__misc.html#gac99720fd926bf288764f9a81bf37ed09">libevdev_event_type_get_name</a> (unsigned int type)</td></tr>
90<tr class="separator:gac99720fd926bf288764f9a81bf37ed09"><td class="memSeparator" colspan="2">&#160;</td></tr>
91<tr class="memitem:gab407b3c2caaae502859c28460cad17bb"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__misc.html#gab407b3c2caaae502859c28460cad17bb">libevdev_event_code_get_name</a> (unsigned int type, unsigned int code)</td></tr>
92<tr class="separator:gab407b3c2caaae502859c28460cad17bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
93<tr class="memitem:gabcd45c5e963cba245e944ea66e72fcc3"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__misc.html#gabcd45c5e963cba245e944ea66e72fcc3">libevdev_event_value_get_name</a> (unsigned int type, unsigned int code, int value)</td></tr>
94<tr class="memdesc:gabcd45c5e963cba245e944ea66e72fcc3"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function resolves the event value for a code.  <a href="group__misc.html#gabcd45c5e963cba245e944ea66e72fcc3">More...</a><br /></td></tr>
95<tr class="separator:gabcd45c5e963cba245e944ea66e72fcc3"><td class="memSeparator" colspan="2">&#160;</td></tr>
96<tr class="memitem:gacc12bdb7b912070ac9c375428f2c9892"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__misc.html#gacc12bdb7b912070ac9c375428f2c9892">libevdev_property_get_name</a> (unsigned int prop)</td></tr>
97<tr class="separator:gacc12bdb7b912070ac9c375428f2c9892"><td class="memSeparator" colspan="2">&#160;</td></tr>
98<tr class="memitem:gabfad87ea78d034631cf3e5322ac383a1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__misc.html#gabfad87ea78d034631cf3e5322ac383a1">libevdev_event_type_get_max</a> (unsigned int type)</td></tr>
99<tr class="separator:gabfad87ea78d034631cf3e5322ac383a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
100<tr class="memitem:ga61ce3bf1e66bd172e583b86a11fc41f1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__misc.html#ga61ce3bf1e66bd172e583b86a11fc41f1">libevdev_event_type_from_name</a> (const char *name)</td></tr>
101<tr class="memdesc:ga61ce3bf1e66bd172e583b86a11fc41f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Look up an event-type by its name.  <a href="group__misc.html#ga61ce3bf1e66bd172e583b86a11fc41f1">More...</a><br /></td></tr>
102<tr class="separator:ga61ce3bf1e66bd172e583b86a11fc41f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
103<tr class="memitem:ga4ee03d650200bb04a23233570667fa84"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__misc.html#ga4ee03d650200bb04a23233570667fa84">libevdev_event_type_from_name_n</a> (const char *name, size_t len)</td></tr>
104<tr class="memdesc:ga4ee03d650200bb04a23233570667fa84"><td class="mdescLeft">&#160;</td><td class="mdescRight">Look up an event-type by its name.  <a href="group__misc.html#ga4ee03d650200bb04a23233570667fa84">More...</a><br /></td></tr>
105<tr class="separator:ga4ee03d650200bb04a23233570667fa84"><td class="memSeparator" colspan="2">&#160;</td></tr>
106<tr class="memitem:ga6620301a67f467489e4a7f93afe81621"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__misc.html#ga6620301a67f467489e4a7f93afe81621">libevdev_event_code_from_name</a> (unsigned int type, const char *name)</td></tr>
107<tr class="memdesc:ga6620301a67f467489e4a7f93afe81621"><td class="mdescLeft">&#160;</td><td class="mdescRight">Look up an event code by its type and name.  <a href="group__misc.html#ga6620301a67f467489e4a7f93afe81621">More...</a><br /></td></tr>
108<tr class="separator:ga6620301a67f467489e4a7f93afe81621"><td class="memSeparator" colspan="2">&#160;</td></tr>
109<tr class="memitem:ga17a760a9eea9dc25011f39e1d5c282a0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__misc.html#ga17a760a9eea9dc25011f39e1d5c282a0">libevdev_event_code_from_name_n</a> (unsigned int type, const char *name, size_t len)</td></tr>
110<tr class="memdesc:ga17a760a9eea9dc25011f39e1d5c282a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Look up an event code by its type and name.  <a href="group__misc.html#ga17a760a9eea9dc25011f39e1d5c282a0">More...</a><br /></td></tr>
111<tr class="separator:ga17a760a9eea9dc25011f39e1d5c282a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
112<tr class="memitem:ga314903beeafedabe45f879637e7254b0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__misc.html#ga314903beeafedabe45f879637e7254b0">libevdev_event_value_from_name</a> (unsigned int type, unsigned int code, const char *name)</td></tr>
113<tr class="memdesc:ga314903beeafedabe45f879637e7254b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Look up an event value by its type, code and name.  <a href="group__misc.html#ga314903beeafedabe45f879637e7254b0">More...</a><br /></td></tr>
114<tr class="separator:ga314903beeafedabe45f879637e7254b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
115<tr class="memitem:gadd41b7514cca16c8b8920f16e562e08a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__misc.html#gadd41b7514cca16c8b8920f16e562e08a">libevdev_event_type_from_code_name</a> (const char *name)</td></tr>
116<tr class="memdesc:gadd41b7514cca16c8b8920f16e562e08a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Look up an event type for a event code name.  <a href="group__misc.html#gadd41b7514cca16c8b8920f16e562e08a">More...</a><br /></td></tr>
117<tr class="separator:gadd41b7514cca16c8b8920f16e562e08a"><td class="memSeparator" colspan="2">&#160;</td></tr>
118<tr class="memitem:gab214498fca7a328f8a712ce15bf21982"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__misc.html#gab214498fca7a328f8a712ce15bf21982">libevdev_event_type_from_code_name_n</a> (const char *name, size_t len)</td></tr>
119<tr class="memdesc:gab214498fca7a328f8a712ce15bf21982"><td class="mdescLeft">&#160;</td><td class="mdescRight">Look up an event type for a event code name.  <a href="group__misc.html#gab214498fca7a328f8a712ce15bf21982">More...</a><br /></td></tr>
120<tr class="separator:gab214498fca7a328f8a712ce15bf21982"><td class="memSeparator" colspan="2">&#160;</td></tr>
121<tr class="memitem:gabad00f68481d83747a134c0a37aca003"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__misc.html#gabad00f68481d83747a134c0a37aca003">libevdev_event_code_from_code_name</a> (const char *name)</td></tr>
122<tr class="memdesc:gabad00f68481d83747a134c0a37aca003"><td class="mdescLeft">&#160;</td><td class="mdescRight">Look up an event code by its name.  <a href="group__misc.html#gabad00f68481d83747a134c0a37aca003">More...</a><br /></td></tr>
123<tr class="separator:gabad00f68481d83747a134c0a37aca003"><td class="memSeparator" colspan="2">&#160;</td></tr>
124<tr class="memitem:ga5bf9af4b8c372d87793e8a3c2dbeb466"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__misc.html#ga5bf9af4b8c372d87793e8a3c2dbeb466">libevdev_event_code_from_code_name_n</a> (const char *name, size_t len)</td></tr>
125<tr class="memdesc:ga5bf9af4b8c372d87793e8a3c2dbeb466"><td class="mdescLeft">&#160;</td><td class="mdescRight">Look up an event code by its name.  <a href="group__misc.html#ga5bf9af4b8c372d87793e8a3c2dbeb466">More...</a><br /></td></tr>
126<tr class="separator:ga5bf9af4b8c372d87793e8a3c2dbeb466"><td class="memSeparator" colspan="2">&#160;</td></tr>
127<tr class="memitem:gaebfc6b0ebb70169c9fec61620f1ea85f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__misc.html#gaebfc6b0ebb70169c9fec61620f1ea85f">libevdev_event_value_from_name_n</a> (unsigned int type, unsigned int code, const char *name, size_t len)</td></tr>
128<tr class="memdesc:gaebfc6b0ebb70169c9fec61620f1ea85f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Look up an event value by its type, code and name.  <a href="group__misc.html#gaebfc6b0ebb70169c9fec61620f1ea85f">More...</a><br /></td></tr>
129<tr class="separator:gaebfc6b0ebb70169c9fec61620f1ea85f"><td class="memSeparator" colspan="2">&#160;</td></tr>
130<tr class="memitem:ga6f4418c98aa475a2fc34d58a197f7edd"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__misc.html#ga6f4418c98aa475a2fc34d58a197f7edd">libevdev_property_from_name</a> (const char *name)</td></tr>
131<tr class="memdesc:ga6f4418c98aa475a2fc34d58a197f7edd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Look up an input property by its name.  <a href="group__misc.html#ga6f4418c98aa475a2fc34d58a197f7edd">More...</a><br /></td></tr>
132<tr class="separator:ga6f4418c98aa475a2fc34d58a197f7edd"><td class="memSeparator" colspan="2">&#160;</td></tr>
133<tr class="memitem:gaaa0bc4c7d0d2aedc84c7dcffee9ce29b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__misc.html#gaaa0bc4c7d0d2aedc84c7dcffee9ce29b">libevdev_property_from_name_n</a> (const char *name, size_t len)</td></tr>
134<tr class="memdesc:gaaa0bc4c7d0d2aedc84c7dcffee9ce29b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Look up an input property by its name.  <a href="group__misc.html#gaaa0bc4c7d0d2aedc84c7dcffee9ce29b">More...</a><br /></td></tr>
135<tr class="separator:gaaa0bc4c7d0d2aedc84c7dcffee9ce29b"><td class="memSeparator" colspan="2">&#160;</td></tr>
136</table>
137<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
138<p>Functions for printing or querying event ranges. </p>
139<p>The list of names is compiled into libevdev and is independent of the run-time kernel. Likewise, the max for each event type is compiled in and does not check the kernel at run-time. </p>
140<h2 class="groupheader">Function Documentation</h2>
141<a id="gabad00f68481d83747a134c0a37aca003"></a>
142<h2 class="memtitle"><span class="permalink"><a href="#gabad00f68481d83747a134c0a37aca003">&#9670;&nbsp;</a></span>libevdev_event_code_from_code_name()</h2>
143
144<div class="memitem">
145<div class="memproto">
146      <table class="memname">
147        <tr>
148          <td class="memname">int libevdev_event_code_from_code_name </td>
149          <td>(</td>
150          <td class="paramtype">const char *&#160;</td>
151          <td class="paramname"><em>name</em></td><td>)</td>
152          <td></td>
153        </tr>
154      </table>
155</div><div class="memdoc">
156
157<p>Look up an event code by its name. </p>
158<p>For example, the name "ABS_Y" returns 1. For the lookup to succeed, the name must be unique, which is the case for all defines as of kernel 5.0 and likely to be the case in the future.</p>
159<p>This is equivalent to <a class="el" href="group__misc.html#ga6620301a67f467489e4a7f93afe81621" title="Look up an event code by its type and name.">libevdev_event_code_from_name()</a> without the need for knowing the event type.</p>
160<dl class="params"><dt>Parameters</dt><dd>
161  <table class="params">
162    <tr><td class="paramname">name</td><td>A non-NULL string describing an input-event value ("ABS_X", "REL_Y", "KEY_A", ...)</td></tr>
163  </table>
164  </dd>
165</dl>
166<dl class="section return"><dt>Returns</dt><dd>The given event code for the name or -1 if not found. </dd></dl>
167
168</div>
169</div>
170<a id="ga5bf9af4b8c372d87793e8a3c2dbeb466"></a>
171<h2 class="memtitle"><span class="permalink"><a href="#ga5bf9af4b8c372d87793e8a3c2dbeb466">&#9670;&nbsp;</a></span>libevdev_event_code_from_code_name_n()</h2>
172
173<div class="memitem">
174<div class="memproto">
175      <table class="memname">
176        <tr>
177          <td class="memname">int libevdev_event_code_from_code_name_n </td>
178          <td>(</td>
179          <td class="paramtype">const char *&#160;</td>
180          <td class="paramname"><em>name</em>, </td>
181        </tr>
182        <tr>
183          <td class="paramkey"></td>
184          <td></td>
185          <td class="paramtype">size_t&#160;</td>
186          <td class="paramname"><em>len</em>&#160;</td>
187        </tr>
188        <tr>
189          <td></td>
190          <td>)</td>
191          <td></td><td></td>
192        </tr>
193      </table>
194</div><div class="memdoc">
195
196<p>Look up an event code by its name. </p>
197<p>For example, the name "ABS_Y" returns 1. For the lookup to succeed, the name must be unique, which is the case for all defines as of kernel 5.0 and likely to be the case in the future.</p>
198<p>This is equivalent to <a class="el" href="group__misc.html#ga17a760a9eea9dc25011f39e1d5c282a0" title="Look up an event code by its type and name.">libevdev_event_code_from_name_n()</a> without the need for knowing the event type.</p>
199<dl class="params"><dt>Parameters</dt><dd>
200  <table class="params">
201    <tr><td class="paramname">name</td><td>A non-NULL string describing an input-event value ("ABS_X", "REL_Y", "KEY_A", ...) </td></tr>
202    <tr><td class="paramname">len</td><td>The length of the passed string excluding any terminating 0 character.</td></tr>
203  </table>
204  </dd>
205</dl>
206<dl class="section return"><dt>Returns</dt><dd>The given event code for the name or -1 if not found. </dd></dl>
207
208</div>
209</div>
210<a id="ga6620301a67f467489e4a7f93afe81621"></a>
211<h2 class="memtitle"><span class="permalink"><a href="#ga6620301a67f467489e4a7f93afe81621">&#9670;&nbsp;</a></span>libevdev_event_code_from_name()</h2>
212
213<div class="memitem">
214<div class="memproto">
215      <table class="memname">
216        <tr>
217          <td class="memname">int libevdev_event_code_from_name </td>
218          <td>(</td>
219          <td class="paramtype">unsigned int&#160;</td>
220          <td class="paramname"><em>type</em>, </td>
221        </tr>
222        <tr>
223          <td class="paramkey"></td>
224          <td></td>
225          <td class="paramtype">const char *&#160;</td>
226          <td class="paramname"><em>name</em>&#160;</td>
227        </tr>
228        <tr>
229          <td></td>
230          <td>)</td>
231          <td></td><td></td>
232        </tr>
233      </table>
234</div><div class="memdoc">
235
236<p>Look up an event code by its type and name. </p>
237<p>Event codes start with a fixed prefix followed by their name (eg., "ABS_X"). The prefix must be included in the name. It returns the constant assigned to the event code or -1 if not found.</p>
238<p>You have to pass the event type where to look for the name. For instance, to resolve "ABS_X" you need to pass EV_ABS as type and "ABS_X" as string. Supported event codes are codes starting with SYN_, KEY_, BTN_, REL_, ABS_, MSC_, SND_, SW_, LED_, REP_, FF_.</p>
239<dl class="params"><dt>Parameters</dt><dd>
240  <table class="params">
241    <tr><td class="paramname">type</td><td>The event type (EV_* constant) where to look for the name. </td></tr>
242    <tr><td class="paramname">name</td><td>A non-NULL string describing an input-event code ("KEY_A", "ABS_X", "BTN_Y", ...), zero-terminated.</td></tr>
243  </table>
244  </dd>
245</dl>
246<dl class="section return"><dt>Returns</dt><dd>The given code constant for the passed name or -1 if not found. </dd></dl>
247
248</div>
249</div>
250<a id="ga17a760a9eea9dc25011f39e1d5c282a0"></a>
251<h2 class="memtitle"><span class="permalink"><a href="#ga17a760a9eea9dc25011f39e1d5c282a0">&#9670;&nbsp;</a></span>libevdev_event_code_from_name_n()</h2>
252
253<div class="memitem">
254<div class="memproto">
255      <table class="memname">
256        <tr>
257          <td class="memname">int libevdev_event_code_from_name_n </td>
258          <td>(</td>
259          <td class="paramtype">unsigned int&#160;</td>
260          <td class="paramname"><em>type</em>, </td>
261        </tr>
262        <tr>
263          <td class="paramkey"></td>
264          <td></td>
265          <td class="paramtype">const char *&#160;</td>
266          <td class="paramname"><em>name</em>, </td>
267        </tr>
268        <tr>
269          <td class="paramkey"></td>
270          <td></td>
271          <td class="paramtype">size_t&#160;</td>
272          <td class="paramname"><em>len</em>&#160;</td>
273        </tr>
274        <tr>
275          <td></td>
276          <td>)</td>
277          <td></td><td></td>
278        </tr>
279      </table>
280</div><div class="memdoc">
281
282<p>Look up an event code by its type and name. </p>
283<p>Event codes start with a fixed prefix followed by their name (eg., "ABS_X"). The prefix must be included in the name. It returns the constant assigned to the event code or -1 if not found.</p>
284<p>You have to pass the event type where to look for the name. For instance, to resolve "ABS_X" you need to pass EV_ABS as type and "ABS_X" as string. Supported event codes are codes starting with SYN_, KEY_, BTN_, REL_, ABS_, MSC_, SND_, SW_, LED_, REP_, FF_.</p>
285<dl class="params"><dt>Parameters</dt><dd>
286  <table class="params">
287    <tr><td class="paramname">type</td><td>The event type (EV_* constant) where to look for the name. </td></tr>
288    <tr><td class="paramname">name</td><td>A non-NULL string describing an input-event code ("KEY_A", "ABS_X", "BTN_Y", ...). </td></tr>
289    <tr><td class="paramname">len</td><td>The length of the string in <code>name</code> excluding any terminating 0 character.</td></tr>
290  </table>
291  </dd>
292</dl>
293<dl class="section return"><dt>Returns</dt><dd>The given code constant for the name or -1 if not found. </dd></dl>
294
295</div>
296</div>
297<a id="gab407b3c2caaae502859c28460cad17bb"></a>
298<h2 class="memtitle"><span class="permalink"><a href="#gab407b3c2caaae502859c28460cad17bb">&#9670;&nbsp;</a></span>libevdev_event_code_get_name()</h2>
299
300<div class="memitem">
301<div class="memproto">
302      <table class="memname">
303        <tr>
304          <td class="memname">const char* libevdev_event_code_get_name </td>
305          <td>(</td>
306          <td class="paramtype">unsigned int&#160;</td>
307          <td class="paramname"><em>type</em>, </td>
308        </tr>
309        <tr>
310          <td class="paramkey"></td>
311          <td></td>
312          <td class="paramtype">unsigned int&#160;</td>
313          <td class="paramname"><em>code</em>&#160;</td>
314        </tr>
315        <tr>
316          <td></td>
317          <td>)</td>
318          <td></td><td></td>
319        </tr>
320      </table>
321</div><div class="memdoc">
322<dl class="params"><dt>Parameters</dt><dd>
323  <table class="params">
324    <tr><td class="paramname">type</td><td>The event type for the code to query (EV_SYN, EV_REL, etc.) </td></tr>
325    <tr><td class="paramname">code</td><td>The event code to return the name for (e.g. ABS_X)</td></tr>
326  </table>
327  </dd>
328</dl>
329<dl class="section return"><dt>Returns</dt><dd>The name of the given event code (e.g. ABS_X) or NULL for an invalid type or code</dd></dl>
330<dl class="section note"><dt>Note</dt><dd>The list of names is compiled into libevdev. If the kernel adds new defines for new event codes, libevdev will not automatically pick these up. </dd></dl>
331
332</div>
333</div>
334<a id="ga37766a6a498fef3294d589abcce688bb"></a>
335<h2 class="memtitle"><span class="permalink"><a href="#ga37766a6a498fef3294d589abcce688bb">&#9670;&nbsp;</a></span>libevdev_event_is_code()</h2>
336
337<div class="memitem">
338<div class="memproto">
339      <table class="memname">
340        <tr>
341          <td class="memname">int libevdev_event_is_code </td>
342          <td>(</td>
343          <td class="paramtype">const struct input_event *&#160;</td>
344          <td class="paramname"><em>ev</em>, </td>
345        </tr>
346        <tr>
347          <td class="paramkey"></td>
348          <td></td>
349          <td class="paramtype">unsigned int&#160;</td>
350          <td class="paramname"><em>type</em>, </td>
351        </tr>
352        <tr>
353          <td class="paramkey"></td>
354          <td></td>
355          <td class="paramtype">unsigned int&#160;</td>
356          <td class="paramname"><em>code</em>&#160;</td>
357        </tr>
358        <tr>
359          <td></td>
360          <td>)</td>
361          <td></td><td></td>
362        </tr>
363      </table>
364</div><div class="memdoc">
365
366<p>Helper function to check if an event is of a specific type and code. </p>
367<p>This is virtually the same as: </p><pre class="fragment"> ev-&gt;type == type &amp;&amp; ev-&gt;code == code
368</pre><p> with the exception that some sanity checks are performed to ensure type and code are valid.</p>
369<dl class="section note"><dt>Note</dt><dd>The ranges for types and codes are compiled into libevdev. If the kernel changes the max value, libevdev will not automatically pick these up.</dd></dl>
370<dl class="params"><dt>Parameters</dt><dd>
371  <table class="params">
372    <tr><td class="paramname">ev</td><td>The input event to check </td></tr>
373    <tr><td class="paramname">type</td><td>Input event type to compare the event against (EV_REL, EV_ABS, etc.) </td></tr>
374    <tr><td class="paramname">code</td><td>Input event code to compare the event against (ABS_X, REL_X, etc.)</td></tr>
375  </table>
376  </dd>
377</dl>
378<dl class="section return"><dt>Returns</dt><dd>1 if the event type matches the given type and code, 0 otherwise (or if type/code are invalid) </dd></dl>
379
380</div>
381</div>
382<a id="gab8b6b80740e028261300b8952b61a596"></a>
383<h2 class="memtitle"><span class="permalink"><a href="#gab8b6b80740e028261300b8952b61a596">&#9670;&nbsp;</a></span>libevdev_event_is_type()</h2>
384
385<div class="memitem">
386<div class="memproto">
387      <table class="memname">
388        <tr>
389          <td class="memname">int libevdev_event_is_type </td>
390          <td>(</td>
391          <td class="paramtype">const struct input_event *&#160;</td>
392          <td class="paramname"><em>ev</em>, </td>
393        </tr>
394        <tr>
395          <td class="paramkey"></td>
396          <td></td>
397          <td class="paramtype">unsigned int&#160;</td>
398          <td class="paramname"><em>type</em>&#160;</td>
399        </tr>
400        <tr>
401          <td></td>
402          <td>)</td>
403          <td></td><td></td>
404        </tr>
405      </table>
406</div><div class="memdoc">
407
408<p>Helper function to check if an event is of a specific type. </p>
409<p>This is virtually the same as: </p><pre class="fragment"> ev-&gt;type == type
410</pre><p> with the exception that some sanity checks are performed to ensure type is valid.</p>
411<dl class="section note"><dt>Note</dt><dd>The ranges for types are compiled into libevdev. If the kernel changes the max value, libevdev will not automatically pick these up.</dd></dl>
412<dl class="params"><dt>Parameters</dt><dd>
413  <table class="params">
414    <tr><td class="paramname">ev</td><td>The input event to check </td></tr>
415    <tr><td class="paramname">type</td><td>Input event type to compare the event against (EV_REL, EV_ABS, etc.)</td></tr>
416  </table>
417  </dd>
418</dl>
419<dl class="section return"><dt>Returns</dt><dd>1 if the event type matches the given type, 0 otherwise (or if type is invalid) </dd></dl>
420
421</div>
422</div>
423<a id="gadd41b7514cca16c8b8920f16e562e08a"></a>
424<h2 class="memtitle"><span class="permalink"><a href="#gadd41b7514cca16c8b8920f16e562e08a">&#9670;&nbsp;</a></span>libevdev_event_type_from_code_name()</h2>
425
426<div class="memitem">
427<div class="memproto">
428      <table class="memname">
429        <tr>
430          <td class="memname">int libevdev_event_type_from_code_name </td>
431          <td>(</td>
432          <td class="paramtype">const char *&#160;</td>
433          <td class="paramname"><em>name</em></td><td>)</td>
434          <td></td>
435        </tr>
436      </table>
437</div><div class="memdoc">
438
439<p>Look up an event type for a event code name. </p>
440<p>For example, the name "ABS_Y" returns EV_ABS. For the lookup to succeed, the name must be unique, which is the case for all defines as of kernel 5.0 and likely to be the case in the future.</p>
441<p>This is equivalent to <a class="el" href="group__misc.html#ga61ce3bf1e66bd172e583b86a11fc41f1" title="Look up an event-type by its name.">libevdev_event_type_from_name()</a> but takes the code name instead of the type name.</p>
442<dl class="params"><dt>Parameters</dt><dd>
443  <table class="params">
444    <tr><td class="paramname">name</td><td>A non-NULL string describing an input-event value ("ABS_X", "REL_Y", "KEY_A", ...)</td></tr>
445  </table>
446  </dd>
447</dl>
448<dl class="section return"><dt>Returns</dt><dd>The given event code for the name or -1 if not found. </dd></dl>
449
450</div>
451</div>
452<a id="gab214498fca7a328f8a712ce15bf21982"></a>
453<h2 class="memtitle"><span class="permalink"><a href="#gab214498fca7a328f8a712ce15bf21982">&#9670;&nbsp;</a></span>libevdev_event_type_from_code_name_n()</h2>
454
455<div class="memitem">
456<div class="memproto">
457      <table class="memname">
458        <tr>
459          <td class="memname">int libevdev_event_type_from_code_name_n </td>
460          <td>(</td>
461          <td class="paramtype">const char *&#160;</td>
462          <td class="paramname"><em>name</em>, </td>
463        </tr>
464        <tr>
465          <td class="paramkey"></td>
466          <td></td>
467          <td class="paramtype">size_t&#160;</td>
468          <td class="paramname"><em>len</em>&#160;</td>
469        </tr>
470        <tr>
471          <td></td>
472          <td>)</td>
473          <td></td><td></td>
474        </tr>
475      </table>
476</div><div class="memdoc">
477
478<p>Look up an event type for a event code name. </p>
479<p>For example, the name "ABS_Y" returns EV_ABS. For the lookup to succeed, the name must be unique, which is the case for all defines as of kernel 5.0 and likely to be the case in the future.</p>
480<p>This is equivalent to <a class="el" href="group__misc.html#ga4ee03d650200bb04a23233570667fa84" title="Look up an event-type by its name.">libevdev_event_type_from_name_n()</a> but takes the code name instead of the type name.</p>
481<dl class="params"><dt>Parameters</dt><dd>
482  <table class="params">
483    <tr><td class="paramname">name</td><td>A non-NULL string describing an input-event value ("ABS_X", "REL_Y", "KEY_A", ...) </td></tr>
484    <tr><td class="paramname">len</td><td>The length of the passed string excluding any terminating 0 character.</td></tr>
485  </table>
486  </dd>
487</dl>
488<dl class="section return"><dt>Returns</dt><dd>The given event code for the name or -1 if not found. </dd></dl>
489
490</div>
491</div>
492<a id="ga61ce3bf1e66bd172e583b86a11fc41f1"></a>
493<h2 class="memtitle"><span class="permalink"><a href="#ga61ce3bf1e66bd172e583b86a11fc41f1">&#9670;&nbsp;</a></span>libevdev_event_type_from_name()</h2>
494
495<div class="memitem">
496<div class="memproto">
497      <table class="memname">
498        <tr>
499          <td class="memname">int libevdev_event_type_from_name </td>
500          <td>(</td>
501          <td class="paramtype">const char *&#160;</td>
502          <td class="paramname"><em>name</em></td><td>)</td>
503          <td></td>
504        </tr>
505      </table>
506</div><div class="memdoc">
507
508<p>Look up an event-type by its name. </p>
509<p>Event-types start with "EV_" followed by the name (eg., "EV_ABS"). The "EV_" prefix must be included in the name. It returns the constant assigned to the event-type or -1 if not found.</p>
510<dl class="params"><dt>Parameters</dt><dd>
511  <table class="params">
512    <tr><td class="paramname">name</td><td>A non-NULL string describing an input-event type ("EV_KEY", "EV_ABS", ...), zero-terminated.</td></tr>
513  </table>
514  </dd>
515</dl>
516<dl class="section return"><dt>Returns</dt><dd>The given type constant for the passed name or -1 if not found.</dd></dl>
517<dl class="section note"><dt>Note</dt><dd>EV_MAX is also recognized. </dd></dl>
518
519</div>
520</div>
521<a id="ga4ee03d650200bb04a23233570667fa84"></a>
522<h2 class="memtitle"><span class="permalink"><a href="#ga4ee03d650200bb04a23233570667fa84">&#9670;&nbsp;</a></span>libevdev_event_type_from_name_n()</h2>
523
524<div class="memitem">
525<div class="memproto">
526      <table class="memname">
527        <tr>
528          <td class="memname">int libevdev_event_type_from_name_n </td>
529          <td>(</td>
530          <td class="paramtype">const char *&#160;</td>
531          <td class="paramname"><em>name</em>, </td>
532        </tr>
533        <tr>
534          <td class="paramkey"></td>
535          <td></td>
536          <td class="paramtype">size_t&#160;</td>
537          <td class="paramname"><em>len</em>&#160;</td>
538        </tr>
539        <tr>
540          <td></td>
541          <td>)</td>
542          <td></td><td></td>
543        </tr>
544      </table>
545</div><div class="memdoc">
546
547<p>Look up an event-type by its name. </p>
548<p>Event-types start with "EV_" followed by the name (eg., "EV_ABS"). The "EV_" prefix must be included in the name. It returns the constant assigned to the event-type or -1 if not found.</p>
549<dl class="params"><dt>Parameters</dt><dd>
550  <table class="params">
551    <tr><td class="paramname">name</td><td>A non-NULL string describing an input-event type ("EV_KEY", "EV_ABS", ...). </td></tr>
552    <tr><td class="paramname">len</td><td>The length of the passed string excluding any terminating 0 character.</td></tr>
553  </table>
554  </dd>
555</dl>
556<dl class="section return"><dt>Returns</dt><dd>The given type constant for the passed name or -1 if not found.</dd></dl>
557<dl class="section note"><dt>Note</dt><dd>EV_MAX is also recognized. </dd></dl>
558
559</div>
560</div>
561<a id="gabfad87ea78d034631cf3e5322ac383a1"></a>
562<h2 class="memtitle"><span class="permalink"><a href="#gabfad87ea78d034631cf3e5322ac383a1">&#9670;&nbsp;</a></span>libevdev_event_type_get_max()</h2>
563
564<div class="memitem">
565<div class="memproto">
566      <table class="memname">
567        <tr>
568          <td class="memname">int libevdev_event_type_get_max </td>
569          <td>(</td>
570          <td class="paramtype">unsigned int&#160;</td>
571          <td class="paramname"><em>type</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">type</td><td>The event type to return the maximum for (EV_ABS, EV_REL, etc.). No max is defined for EV_SYN.</td></tr>
579  </table>
580  </dd>
581</dl>
582<dl class="section return"><dt>Returns</dt><dd>The max value defined for the given event type, e.g. ABS_MAX for a type of EV_ABS, or -1 for an invalid type.</dd></dl>
583<dl class="section note"><dt>Note</dt><dd>The max value is compiled into libevdev. If the kernel changes the max value, libevdev will not automatically pick these up. </dd></dl>
584
585</div>
586</div>
587<a id="gac99720fd926bf288764f9a81bf37ed09"></a>
588<h2 class="memtitle"><span class="permalink"><a href="#gac99720fd926bf288764f9a81bf37ed09">&#9670;&nbsp;</a></span>libevdev_event_type_get_name()</h2>
589
590<div class="memitem">
591<div class="memproto">
592      <table class="memname">
593        <tr>
594          <td class="memname">const char* libevdev_event_type_get_name </td>
595          <td>(</td>
596          <td class="paramtype">unsigned int&#160;</td>
597          <td class="paramname"><em>type</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">type</td><td>The event type to return the name for.</td></tr>
605  </table>
606  </dd>
607</dl>
608<dl class="section return"><dt>Returns</dt><dd>The name of the given event type (e.g. EV_ABS) or NULL for an invalid type</dd></dl>
609<dl class="section note"><dt>Note</dt><dd>The list of names is compiled into libevdev. If the kernel adds new defines for new event types, libevdev will not automatically pick these up. </dd></dl>
610
611</div>
612</div>
613<a id="ga314903beeafedabe45f879637e7254b0"></a>
614<h2 class="memtitle"><span class="permalink"><a href="#ga314903beeafedabe45f879637e7254b0">&#9670;&nbsp;</a></span>libevdev_event_value_from_name()</h2>
615
616<div class="memitem">
617<div class="memproto">
618      <table class="memname">
619        <tr>
620          <td class="memname">int libevdev_event_value_from_name </td>
621          <td>(</td>
622          <td class="paramtype">unsigned int&#160;</td>
623          <td class="paramname"><em>type</em>, </td>
624        </tr>
625        <tr>
626          <td class="paramkey"></td>
627          <td></td>
628          <td class="paramtype">unsigned int&#160;</td>
629          <td class="paramname"><em>code</em>, </td>
630        </tr>
631        <tr>
632          <td class="paramkey"></td>
633          <td></td>
634          <td class="paramtype">const char *&#160;</td>
635          <td class="paramname"><em>name</em>&#160;</td>
636        </tr>
637        <tr>
638          <td></td>
639          <td>)</td>
640          <td></td><td></td>
641        </tr>
642      </table>
643</div><div class="memdoc">
644
645<p>Look up an event value by its type, code and name. </p>
646<p>Event values start with a fixed prefix followed by their name (eg., "MT_TOOL_PALM"). The prefix must be included in the name. It returns the constant assigned to the event code or -1 if not found.</p>
647<p>You have to pass the event type and code where to look for the name. For instance, to resolve "MT_TOOL_PALM" you need to pass EV_ABS as type, ABS_MT_TOOL_TYPE as code and "MT_TOOL_PALM" as string.</p>
648<p>As of kernel 4.17, only EV_ABS/ABS_MT_TOOL_TYPE support name resolution.</p>
649<dl class="params"><dt>Parameters</dt><dd>
650  <table class="params">
651    <tr><td class="paramname">type</td><td>The event type (EV_* constant) where to look for the name. </td></tr>
652    <tr><td class="paramname">code</td><td>The event code (ABS_* constant) where to look for the name. </td></tr>
653    <tr><td class="paramname">name</td><td>A non-NULL string describing an input-event value ("MT_TOOL_TYPE", ...)</td></tr>
654  </table>
655  </dd>
656</dl>
657<dl class="section return"><dt>Returns</dt><dd>The given value constant for the name or -1 if not found. </dd></dl>
658
659</div>
660</div>
661<a id="gaebfc6b0ebb70169c9fec61620f1ea85f"></a>
662<h2 class="memtitle"><span class="permalink"><a href="#gaebfc6b0ebb70169c9fec61620f1ea85f">&#9670;&nbsp;</a></span>libevdev_event_value_from_name_n()</h2>
663
664<div class="memitem">
665<div class="memproto">
666      <table class="memname">
667        <tr>
668          <td class="memname">int libevdev_event_value_from_name_n </td>
669          <td>(</td>
670          <td class="paramtype">unsigned int&#160;</td>
671          <td class="paramname"><em>type</em>, </td>
672        </tr>
673        <tr>
674          <td class="paramkey"></td>
675          <td></td>
676          <td class="paramtype">unsigned int&#160;</td>
677          <td class="paramname"><em>code</em>, </td>
678        </tr>
679        <tr>
680          <td class="paramkey"></td>
681          <td></td>
682          <td class="paramtype">const char *&#160;</td>
683          <td class="paramname"><em>name</em>, </td>
684        </tr>
685        <tr>
686          <td class="paramkey"></td>
687          <td></td>
688          <td class="paramtype">size_t&#160;</td>
689          <td class="paramname"><em>len</em>&#160;</td>
690        </tr>
691        <tr>
692          <td></td>
693          <td>)</td>
694          <td></td><td></td>
695        </tr>
696      </table>
697</div><div class="memdoc">
698
699<p>Look up an event value by its type, code and name. </p>
700<p>Event values start with a fixed prefix followed by their name (eg., "MT_TOOL_PALM"). The prefix must be included in the name. It returns the constant assigned to the event code or -1 if not found.</p>
701<p>You have to pass the event type and code where to look for the name. For instance, to resolve "MT_TOOL_PALM" you need to pass EV_ABS as type, ABS_MT_TOOL_TYPE as code and "MT_TOOL_PALM" as string.</p>
702<p>As of kernel 4.17, only EV_ABS/ABS_MT_TOOL_TYPE support name resolution.</p>
703<dl class="params"><dt>Parameters</dt><dd>
704  <table class="params">
705    <tr><td class="paramname">type</td><td>The event type (EV_* constant) where to look for the name. </td></tr>
706    <tr><td class="paramname">code</td><td>The event code (ABS_* constant) where to look for the name. </td></tr>
707    <tr><td class="paramname">name</td><td>A non-NULL string describing an input-event value ("MT_TOOL_TYPE", ...) </td></tr>
708    <tr><td class="paramname">len</td><td>The length of the string in <code>name</code> excluding any terminating 0 character.</td></tr>
709  </table>
710  </dd>
711</dl>
712<dl class="section return"><dt>Returns</dt><dd>The given value constant for the name or -1 if not found. </dd></dl>
713
714</div>
715</div>
716<a id="gabcd45c5e963cba245e944ea66e72fcc3"></a>
717<h2 class="memtitle"><span class="permalink"><a href="#gabcd45c5e963cba245e944ea66e72fcc3">&#9670;&nbsp;</a></span>libevdev_event_value_get_name()</h2>
718
719<div class="memitem">
720<div class="memproto">
721      <table class="memname">
722        <tr>
723          <td class="memname">const char* libevdev_event_value_get_name </td>
724          <td>(</td>
725          <td class="paramtype">unsigned int&#160;</td>
726          <td class="paramname"><em>type</em>, </td>
727        </tr>
728        <tr>
729          <td class="paramkey"></td>
730          <td></td>
731          <td class="paramtype">unsigned int&#160;</td>
732          <td class="paramname"><em>code</em>, </td>
733        </tr>
734        <tr>
735          <td class="paramkey"></td>
736          <td></td>
737          <td class="paramtype">int&#160;</td>
738          <td class="paramname"><em>value</em>&#160;</td>
739        </tr>
740        <tr>
741          <td></td>
742          <td>)</td>
743          <td></td><td></td>
744        </tr>
745      </table>
746</div><div class="memdoc">
747
748<p>This function resolves the event value for a code. </p>
749<p>For almost all event codes this will return NULL as the value is just a numerical value. As of kernel 4.17, the only event code that will return a non-NULL value is EV_ABS/ABS_MT_TOOL_TYPE.</p>
750<dl class="params"><dt>Parameters</dt><dd>
751  <table class="params">
752    <tr><td class="paramname">type</td><td>The event type for the value to query (EV_ABS, etc.) </td></tr>
753    <tr><td class="paramname">code</td><td>The event code for the value to query (e.g. ABS_MT_TOOL_TYPE) </td></tr>
754    <tr><td class="paramname">value</td><td>The event value to return the name for (e.g. MT_TOOL_PALM)</td></tr>
755  </table>
756  </dd>
757</dl>
758<dl class="section return"><dt>Returns</dt><dd>The name of the given event value (e.g. MT_TOOL_PALM) or NULL for an invalid type or code or NULL for an axis that has numerical values only.</dd></dl>
759<dl class="section note"><dt>Note</dt><dd>The list of names is compiled into libevdev. If the kernel adds new defines for new event values, libevdev will not automatically pick these up. </dd></dl>
760
761</div>
762</div>
763<a id="ga6f4418c98aa475a2fc34d58a197f7edd"></a>
764<h2 class="memtitle"><span class="permalink"><a href="#ga6f4418c98aa475a2fc34d58a197f7edd">&#9670;&nbsp;</a></span>libevdev_property_from_name()</h2>
765
766<div class="memitem">
767<div class="memproto">
768      <table class="memname">
769        <tr>
770          <td class="memname">int libevdev_property_from_name </td>
771          <td>(</td>
772          <td class="paramtype">const char *&#160;</td>
773          <td class="paramname"><em>name</em></td><td>)</td>
774          <td></td>
775        </tr>
776      </table>
777</div><div class="memdoc">
778
779<p>Look up an input property by its name. </p>
780<p>Properties start with the fixed prefix "INPUT_PROP_" followed by their name (eg., "INPUT_PROP_POINTER"). The prefix must be included in the name. It returns the constant assigned to the property or -1 if not found.</p>
781<dl class="params"><dt>Parameters</dt><dd>
782  <table class="params">
783    <tr><td class="paramname">name</td><td>A non-NULL string describing an input property</td></tr>
784  </table>
785  </dd>
786</dl>
787<dl class="section return"><dt>Returns</dt><dd>The given code constant for the name or -1 if not found. </dd></dl>
788
789</div>
790</div>
791<a id="gaaa0bc4c7d0d2aedc84c7dcffee9ce29b"></a>
792<h2 class="memtitle"><span class="permalink"><a href="#gaaa0bc4c7d0d2aedc84c7dcffee9ce29b">&#9670;&nbsp;</a></span>libevdev_property_from_name_n()</h2>
793
794<div class="memitem">
795<div class="memproto">
796      <table class="memname">
797        <tr>
798          <td class="memname">int libevdev_property_from_name_n </td>
799          <td>(</td>
800          <td class="paramtype">const char *&#160;</td>
801          <td class="paramname"><em>name</em>, </td>
802        </tr>
803        <tr>
804          <td class="paramkey"></td>
805          <td></td>
806          <td class="paramtype">size_t&#160;</td>
807          <td class="paramname"><em>len</em>&#160;</td>
808        </tr>
809        <tr>
810          <td></td>
811          <td>)</td>
812          <td></td><td></td>
813        </tr>
814      </table>
815</div><div class="memdoc">
816
817<p>Look up an input property by its name. </p>
818<p>Properties start with the fixed prefix "INPUT_PROP_" followed by their name (eg., "INPUT_PROP_POINTER"). The prefix must be included in the name. It returns the constant assigned to the property or -1 if not found.</p>
819<dl class="params"><dt>Parameters</dt><dd>
820  <table class="params">
821    <tr><td class="paramname">name</td><td>A non-NULL string describing an input property </td></tr>
822    <tr><td class="paramname">len</td><td>The length of the string in <code>name</code> excluding any terminating 0 character.</td></tr>
823  </table>
824  </dd>
825</dl>
826<dl class="section return"><dt>Returns</dt><dd>The given code constant for the name or -1 if not found. </dd></dl>
827
828</div>
829</div>
830<a id="gacc12bdb7b912070ac9c375428f2c9892"></a>
831<h2 class="memtitle"><span class="permalink"><a href="#gacc12bdb7b912070ac9c375428f2c9892">&#9670;&nbsp;</a></span>libevdev_property_get_name()</h2>
832
833<div class="memitem">
834<div class="memproto">
835      <table class="memname">
836        <tr>
837          <td class="memname">const char* libevdev_property_get_name </td>
838          <td>(</td>
839          <td class="paramtype">unsigned int&#160;</td>
840          <td class="paramname"><em>prop</em></td><td>)</td>
841          <td></td>
842        </tr>
843      </table>
844</div><div class="memdoc">
845<dl class="params"><dt>Parameters</dt><dd>
846  <table class="params">
847    <tr><td class="paramname">prop</td><td>The input prop to return the name for (e.g. INPUT_PROP_BUTTONPAD)</td></tr>
848  </table>
849  </dd>
850</dl>
851<dl class="section return"><dt>Returns</dt><dd>The name of the given input prop (e.g. INPUT_PROP_BUTTONPAD) or NULL for an invalid property</dd></dl>
852<dl class="section note"><dt>Note</dt><dd>The list of names is compiled into libevdev. If the kernel adds new defines for new properties libevdev will not automatically pick these up. </dd>
853<dd>
854On older kernels input properties may not be defined and <a class="el" href="group__misc.html#gacc12bdb7b912070ac9c375428f2c9892">libevdev_property_get_name()</a> will always return NULL </dd></dl>
855
856</div>
857</div>
858</div><!-- contents -->
859<!-- HTML footer for doxygen 1.8.8-->
860<!-- start footer part -->
861</div>
862</div>
863</div>
864</div>
865</div>
866<hr class="footer"/><address class="footer"><small>
867Generated by &#160;<a href="http://www.doxygen.org/index.html">
868<img class="footer" src="doxygen.png" alt="doxygen"/>
869</a> 1.9.1
870</small></address>
871</body>
872</html>
873