/usr/share/doc/libevdev-dev/html/group__misc.html is in libevdev-doc 1.5.8+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libevdev: Miscellaneous helper functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="libevdev.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libevdev
 <span id="projectnumber">1.5.8</span>
</div>
<div id="projectbrief">A wrapper library for evdev devices</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">Miscellaneous helper functions</div> </div>
</div><!--header-->
<div class="contents">
<p>Functions for printing or querying event ranges.
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gab8b6b80740e028261300b8952b61a596"><td class="memItemLeft" align="right" valign="top">int </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>
<tr class="memdesc:gab8b6b80740e028261300b8952b61a596"><td class="mdescLeft"> </td><td class="mdescRight">Helper function to check if an event is of a specific type. <a href="#gab8b6b80740e028261300b8952b61a596">More...</a><br /></td></tr>
<tr class="separator:gab8b6b80740e028261300b8952b61a596"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga37766a6a498fef3294d589abcce688bb"><td class="memItemLeft" align="right" valign="top">int </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>
<tr class="memdesc:ga37766a6a498fef3294d589abcce688bb"><td class="mdescLeft"> </td><td class="mdescRight">Helper function to check if an event is of a specific type and code. <a href="#ga37766a6a498fef3294d589abcce688bb">More...</a><br /></td></tr>
<tr class="separator:ga37766a6a498fef3294d589abcce688bb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gac99720fd926bf288764f9a81bf37ed09"><td class="memItemLeft" align="right" valign="top">const char * </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>
<tr class="separator:gac99720fd926bf288764f9a81bf37ed09"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gab407b3c2caaae502859c28460cad17bb"><td class="memItemLeft" align="right" valign="top">const char * </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>
<tr class="separator:gab407b3c2caaae502859c28460cad17bb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gacc12bdb7b912070ac9c375428f2c9892"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__misc.html#gacc12bdb7b912070ac9c375428f2c9892">libevdev_property_get_name</a> (unsigned int prop)</td></tr>
<tr class="separator:gacc12bdb7b912070ac9c375428f2c9892"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gabfad87ea78d034631cf3e5322ac383a1"><td class="memItemLeft" align="right" valign="top">int </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>
<tr class="separator:gabfad87ea78d034631cf3e5322ac383a1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga61ce3bf1e66bd172e583b86a11fc41f1"><td class="memItemLeft" align="right" valign="top">int </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>
<tr class="memdesc:ga61ce3bf1e66bd172e583b86a11fc41f1"><td class="mdescLeft"> </td><td class="mdescRight">Look up an event-type by its name. <a href="#ga61ce3bf1e66bd172e583b86a11fc41f1">More...</a><br /></td></tr>
<tr class="separator:ga61ce3bf1e66bd172e583b86a11fc41f1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga4ee03d650200bb04a23233570667fa84"><td class="memItemLeft" align="right" valign="top">int </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>
<tr class="memdesc:ga4ee03d650200bb04a23233570667fa84"><td class="mdescLeft"> </td><td class="mdescRight">Look up an event-type by its name. <a href="#ga4ee03d650200bb04a23233570667fa84">More...</a><br /></td></tr>
<tr class="separator:ga4ee03d650200bb04a23233570667fa84"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga6620301a67f467489e4a7f93afe81621"><td class="memItemLeft" align="right" valign="top">int </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>
<tr class="memdesc:ga6620301a67f467489e4a7f93afe81621"><td class="mdescLeft"> </td><td class="mdescRight">Look up an event code by its type and name. <a href="#ga6620301a67f467489e4a7f93afe81621">More...</a><br /></td></tr>
<tr class="separator:ga6620301a67f467489e4a7f93afe81621"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga17a760a9eea9dc25011f39e1d5c282a0"><td class="memItemLeft" align="right" valign="top">int </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>
<tr class="memdesc:ga17a760a9eea9dc25011f39e1d5c282a0"><td class="mdescLeft"> </td><td class="mdescRight">Look up an event code by its type and name. <a href="#ga17a760a9eea9dc25011f39e1d5c282a0">More...</a><br /></td></tr>
<tr class="separator:ga17a760a9eea9dc25011f39e1d5c282a0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga6f4418c98aa475a2fc34d58a197f7edd"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__misc.html#ga6f4418c98aa475a2fc34d58a197f7edd">libevdev_property_from_name</a> (const char *name)</td></tr>
<tr class="memdesc:ga6f4418c98aa475a2fc34d58a197f7edd"><td class="mdescLeft"> </td><td class="mdescRight">Look up an input property by its name. <a href="#ga6f4418c98aa475a2fc34d58a197f7edd">More...</a><br /></td></tr>
<tr class="separator:ga6f4418c98aa475a2fc34d58a197f7edd"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaaa0bc4c7d0d2aedc84c7dcffee9ce29b"><td class="memItemLeft" align="right" valign="top">int </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>
<tr class="memdesc:gaaa0bc4c7d0d2aedc84c7dcffee9ce29b"><td class="mdescLeft"> </td><td class="mdescRight">Look up an input property by its name. <a href="#gaaa0bc4c7d0d2aedc84c7dcffee9ce29b">More...</a><br /></td></tr>
<tr class="separator:gaaa0bc4c7d0d2aedc84c7dcffee9ce29b"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Functions for printing or querying event ranges. </p>
<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>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga6620301a67f467489e4a7f93afe81621"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6620301a67f467489e4a7f93afe81621">◆ </a></span>libevdev_event_code_from_name()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int libevdev_event_code_from_name </td>
<td>(</td>
<td class="paramtype">unsigned int </td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>name</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Look up an event code by its type and name. </p>
<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>
<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>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">type</td><td>The event type (EV_* constant) where to look for the name. </td></tr>
<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>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The given code constant for the passed name or -1 if not found. </dd></dl>
</div>
</div>
<a id="ga17a760a9eea9dc25011f39e1d5c282a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga17a760a9eea9dc25011f39e1d5c282a0">◆ </a></span>libevdev_event_code_from_name_n()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int libevdev_event_code_from_name_n </td>
<td>(</td>
<td class="paramtype">unsigned int </td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>len</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Look up an event code by its type and name. </p>
<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>
<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>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">type</td><td>The event type (EV_* constant) where to look for the name. </td></tr>
<tr><td class="paramname">name</td><td>A non-NULL string describing an input-event code ("KEY_A", "ABS_X", "BTN_Y", ...). </td></tr>
<tr><td class="paramname">len</td><td>The length of the string in <code>name</code> excluding any terminating 0 character.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The given code constant for the name or -1 if not found. </dd></dl>
</div>
</div>
<a id="gab407b3c2caaae502859c28460cad17bb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab407b3c2caaae502859c28460cad17bb">◆ </a></span>libevdev_event_code_get_name()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char* libevdev_event_code_get_name </td>
<td>(</td>
<td class="paramtype">unsigned int </td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int </td>
<td class="paramname"><em>code</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">type</td><td>The event type for the code to query (EV_SYN, EV_REL, etc.) </td></tr>
<tr><td class="paramname">code</td><td>The event code to return the name for (e.g. ABS_X)</td></tr>
</table>
</dd>
</dl>
<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>
<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>
</div>
</div>
<a id="ga37766a6a498fef3294d589abcce688bb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga37766a6a498fef3294d589abcce688bb">◆ </a></span>libevdev_event_is_code()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int libevdev_event_is_code </td>
<td>(</td>
<td class="paramtype">const struct input_event * </td>
<td class="paramname"><em>ev</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int </td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int </td>
<td class="paramname"><em>code</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Helper function to check if an event is of a specific type and code. </p>
<p>This is virtually the same as: </p><pre class="fragment"> ev->type == type && ev->code == code
</pre><p>with the exception that some sanity checks are performed to ensure type and code are valid.</p>
<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>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">ev</td><td>The input event to check </td></tr>
<tr><td class="paramname">type</td><td>Input event type to compare the event against (EV_REL, EV_ABS, etc.) </td></tr>
<tr><td class="paramname">code</td><td>Input event code to compare the event against (ABS_X, REL_X, etc.)</td></tr>
</table>
</dd>
</dl>
<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>
</div>
</div>
<a id="gab8b6b80740e028261300b8952b61a596"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab8b6b80740e028261300b8952b61a596">◆ </a></span>libevdev_event_is_type()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int libevdev_event_is_type </td>
<td>(</td>
<td class="paramtype">const struct input_event * </td>
<td class="paramname"><em>ev</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int </td>
<td class="paramname"><em>type</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Helper function to check if an event is of a specific type. </p>
<p>This is virtually the same as: </p><pre class="fragment"> ev->type == type
</pre><p>with the exception that some sanity checks are performed to ensure type is valid.</p>
<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>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">ev</td><td>The input event to check </td></tr>
<tr><td class="paramname">type</td><td>Input event type to compare the event against (EV_REL, EV_ABS, etc.)</td></tr>
</table>
</dd>
</dl>
<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>
</div>
</div>
<a id="ga61ce3bf1e66bd172e583b86a11fc41f1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga61ce3bf1e66bd172e583b86a11fc41f1">◆ </a></span>libevdev_event_type_from_name()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int libevdev_event_type_from_name </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>name</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Look up an event-type by its name. </p>
<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>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>A non-NULL string describing an input-event type ("EV_KEY", "EV_ABS", ...), zero-terminated.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The given type constant for the passed name or -1 if not found.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>EV_MAX is also recognized. </dd></dl>
</div>
</div>
<a id="ga4ee03d650200bb04a23233570667fa84"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4ee03d650200bb04a23233570667fa84">◆ </a></span>libevdev_event_type_from_name_n()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int libevdev_event_type_from_name_n </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>len</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Look up an event-type by its name. </p>
<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>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>A non-NULL string describing an input-event type ("EV_KEY", "EV_ABS", ...). </td></tr>
<tr><td class="paramname">len</td><td>The length of the passed string excluding any terminating 0 character.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The given type constant for the passed name or -1 if not found.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>EV_MAX is also recognized. </dd></dl>
</div>
</div>
<a id="gabfad87ea78d034631cf3e5322ac383a1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabfad87ea78d034631cf3e5322ac383a1">◆ </a></span>libevdev_event_type_get_max()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int libevdev_event_type_get_max </td>
<td>(</td>
<td class="paramtype">unsigned int </td>
<td class="paramname"><em>type</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<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>
</table>
</dd>
</dl>
<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>
<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>
</div>
</div>
<a id="gac99720fd926bf288764f9a81bf37ed09"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac99720fd926bf288764f9a81bf37ed09">◆ </a></span>libevdev_event_type_get_name()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char* libevdev_event_type_get_name </td>
<td>(</td>
<td class="paramtype">unsigned int </td>
<td class="paramname"><em>type</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">type</td><td>The event type to return the name for.</td></tr>
</table>
</dd>
</dl>
<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>
<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>
</div>
</div>
<a id="ga6f4418c98aa475a2fc34d58a197f7edd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6f4418c98aa475a2fc34d58a197f7edd">◆ </a></span>libevdev_property_from_name()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int libevdev_property_from_name </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>name</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Look up an input property by its name. </p>
<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>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>A non-NULL string describing an input property</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The given code constant for the name or -1 if not found. </dd></dl>
</div>
</div>
<a id="gaaa0bc4c7d0d2aedc84c7dcffee9ce29b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaaa0bc4c7d0d2aedc84c7dcffee9ce29b">◆ </a></span>libevdev_property_from_name_n()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int libevdev_property_from_name_n </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>len</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Look up an input property by its name. </p>
<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>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>A non-NULL string describing an input property </td></tr>
<tr><td class="paramname">len</td><td>The length of the string in <code>name</code> excluding any terminating 0 character.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The given code constant for the name or -1 if not found. </dd></dl>
</div>
</div>
<a id="gacc12bdb7b912070ac9c375428f2c9892"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacc12bdb7b912070ac9c375428f2c9892">◆ </a></span>libevdev_property_get_name()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char* libevdev_property_get_name </td>
<td>(</td>
<td class="paramtype">unsigned int </td>
<td class="paramname"><em>prop</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">prop</td><td>The input prop to return the name for (e.g. INPUT_PROP_BUTTONPAD)</td></tr>
</table>
</dd>
</dl>
<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>
<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>
<dd>
On 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>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
|