1c0abf9e6Sopenharmony_ci<!-- HTML header for doxygen 1.8.8--> 2c0abf9e6Sopenharmony_ci<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3c0abf9e6Sopenharmony_ci<html xmlns="http://www.w3.org/1999/xhtml"> 4c0abf9e6Sopenharmony_ci <head> 5c0abf9e6Sopenharmony_ci <meta http-equiv="X-UA-Compatible" content="IE=edge"> 6c0abf9e6Sopenharmony_ci <!-- For Mobile Devices --> 7c0abf9e6Sopenharmony_ci <meta name="viewport" content="width=device-width, initial-scale=1"> 8c0abf9e6Sopenharmony_ci <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> 9c0abf9e6Sopenharmony_ci <meta name="generator" content="Doxygen 1.9.1"/> 10c0abf9e6Sopenharmony_ci <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script> 11c0abf9e6Sopenharmony_ci <title>libevdev: Miscellaneous helper functions</title> 12c0abf9e6Sopenharmony_ci <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>--> 13c0abf9e6Sopenharmony_ci <script type="text/javascript" src="dynsections.js"></script> 14c0abf9e6Sopenharmony_ci <link href="search/search.css" rel="stylesheet" type="text/css"/> 15c0abf9e6Sopenharmony_ci<script type="text/javascript" src="search/searchdata.js"></script> 16c0abf9e6Sopenharmony_ci<script type="text/javascript" src="search/search.js"></script> 17c0abf9e6Sopenharmony_ci <link href="doxygen.css" rel="stylesheet" type="text/css" /> 18c0abf9e6Sopenharmony_ci <link href="bootstrap.css" rel="stylesheet" type="text/css"/> 19c0abf9e6Sopenharmony_ci<link href="customdoxygen.css" rel="stylesheet" type="text/css"/> 20c0abf9e6Sopenharmony_ci<link href="libevdevdoxygen.css" rel="stylesheet" type="text/css"/> 21c0abf9e6Sopenharmony_ci <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script> 22c0abf9e6Sopenharmony_ci <script type="text/javascript" src="doxy-boot.js"></script> 23c0abf9e6Sopenharmony_ci </head> 24c0abf9e6Sopenharmony_ci <body> 25c0abf9e6Sopenharmony_ci <nav class="navbar navbar-default" role="navigation"> 26c0abf9e6Sopenharmony_ci <div class="container"> 27c0abf9e6Sopenharmony_ci <div class="navbar-header"> 28c0abf9e6Sopenharmony_ci <a class="navbar-brand">libevdev 1.13.0</a> 29c0abf9e6Sopenharmony_ci </div> 30c0abf9e6Sopenharmony_ci </div> 31c0abf9e6Sopenharmony_ci </nav> 32c0abf9e6Sopenharmony_ci <div id="top"><!-- do not remove this div, it is closed by doxygen! --> 33c0abf9e6Sopenharmony_ci <div class="content" id="content"> 34c0abf9e6Sopenharmony_ci <div class="container"> 35c0abf9e6Sopenharmony_ci <div class="row"> 36c0abf9e6Sopenharmony_ci <div class="col-sm-12 panel panel-default" style="padding-bottom: 15px;"> 37c0abf9e6Sopenharmony_ci <div style="margin-bottom: 15px;"> 38c0abf9e6Sopenharmony_ci<!-- end header part --> 39c0abf9e6Sopenharmony_ci<!-- Generated by Doxygen 1.9.1 --> 40c0abf9e6Sopenharmony_ci<script type="text/javascript"> 41c0abf9e6Sopenharmony_ci/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ 42c0abf9e6Sopenharmony_civar searchBox = new SearchBox("searchBox", "search",false,'Search','.html'); 43c0abf9e6Sopenharmony_ci/* @license-end */ 44c0abf9e6Sopenharmony_ci</script> 45c0abf9e6Sopenharmony_ci<script type="text/javascript" src="menudata.js"></script> 46c0abf9e6Sopenharmony_ci<script type="text/javascript" src="menu.js"></script> 47c0abf9e6Sopenharmony_ci<script type="text/javascript"> 48c0abf9e6Sopenharmony_ci/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ 49c0abf9e6Sopenharmony_ci$(function() { 50c0abf9e6Sopenharmony_ci initMenu('',true,false,'search.php','Search'); 51c0abf9e6Sopenharmony_ci $(document).ready(function() { init_search(); }); 52c0abf9e6Sopenharmony_ci}); 53c0abf9e6Sopenharmony_ci/* @license-end */</script> 54c0abf9e6Sopenharmony_ci<div id="main-nav"></div> 55c0abf9e6Sopenharmony_ci</div><!-- top --> 56c0abf9e6Sopenharmony_ci<!-- window showing the filter options --> 57c0abf9e6Sopenharmony_ci<div id="MSearchSelectWindow" 58c0abf9e6Sopenharmony_ci onmouseover="return searchBox.OnSearchSelectShow()" 59c0abf9e6Sopenharmony_ci onmouseout="return searchBox.OnSearchSelectHide()" 60c0abf9e6Sopenharmony_ci onkeydown="return searchBox.OnSearchSelectKey(event)"> 61c0abf9e6Sopenharmony_ci</div> 62c0abf9e6Sopenharmony_ci 63c0abf9e6Sopenharmony_ci<!-- iframe showing the search results (closed by default) --> 64c0abf9e6Sopenharmony_ci<div id="MSearchResultsWindow"> 65c0abf9e6Sopenharmony_ci<iframe src="javascript:void(0)" frameborder="0" 66c0abf9e6Sopenharmony_ci name="MSearchResults" id="MSearchResults"> 67c0abf9e6Sopenharmony_ci</iframe> 68c0abf9e6Sopenharmony_ci</div> 69c0abf9e6Sopenharmony_ci 70c0abf9e6Sopenharmony_ci<div class="header"> 71c0abf9e6Sopenharmony_ci <div class="summary"> 72c0abf9e6Sopenharmony_ci<a href="#func-members">Functions</a> </div> 73c0abf9e6Sopenharmony_ci <div class="headertitle"> 74c0abf9e6Sopenharmony_ci<div class="title">Miscellaneous helper functions</div> </div> 75c0abf9e6Sopenharmony_ci</div><!--header--> 76c0abf9e6Sopenharmony_ci<div class="contents"> 77c0abf9e6Sopenharmony_ci 78c0abf9e6Sopenharmony_ci<p>Functions for printing or querying event ranges. 79c0abf9e6Sopenharmony_ci<a href="#details">More...</a></p> 80c0abf9e6Sopenharmony_ci<table class="memberdecls"> 81c0abf9e6Sopenharmony_ci<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> 82c0abf9e6Sopenharmony_ciFunctions</h2></td></tr> 83c0abf9e6Sopenharmony_ci<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> 84c0abf9e6Sopenharmony_ci<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="group__misc.html#gab8b6b80740e028261300b8952b61a596">More...</a><br /></td></tr> 85c0abf9e6Sopenharmony_ci<tr class="separator:gab8b6b80740e028261300b8952b61a596"><td class="memSeparator" colspan="2"> </td></tr> 86c0abf9e6Sopenharmony_ci<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> 87c0abf9e6Sopenharmony_ci<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="group__misc.html#ga37766a6a498fef3294d589abcce688bb">More...</a><br /></td></tr> 88c0abf9e6Sopenharmony_ci<tr class="separator:ga37766a6a498fef3294d589abcce688bb"><td class="memSeparator" colspan="2"> </td></tr> 89c0abf9e6Sopenharmony_ci<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> 90c0abf9e6Sopenharmony_ci<tr class="separator:gac99720fd926bf288764f9a81bf37ed09"><td class="memSeparator" colspan="2"> </td></tr> 91c0abf9e6Sopenharmony_ci<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> 92c0abf9e6Sopenharmony_ci<tr class="separator:gab407b3c2caaae502859c28460cad17bb"><td class="memSeparator" colspan="2"> </td></tr> 93c0abf9e6Sopenharmony_ci<tr class="memitem:gabcd45c5e963cba245e944ea66e72fcc3"><td class="memItemLeft" align="right" valign="top">const char * </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> 94c0abf9e6Sopenharmony_ci<tr class="memdesc:gabcd45c5e963cba245e944ea66e72fcc3"><td class="mdescLeft"> </td><td class="mdescRight">This function resolves the event value for a code. <a href="group__misc.html#gabcd45c5e963cba245e944ea66e72fcc3">More...</a><br /></td></tr> 95c0abf9e6Sopenharmony_ci<tr class="separator:gabcd45c5e963cba245e944ea66e72fcc3"><td class="memSeparator" colspan="2"> </td></tr> 96c0abf9e6Sopenharmony_ci<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> 97c0abf9e6Sopenharmony_ci<tr class="separator:gacc12bdb7b912070ac9c375428f2c9892"><td class="memSeparator" colspan="2"> </td></tr> 98c0abf9e6Sopenharmony_ci<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> 99c0abf9e6Sopenharmony_ci<tr class="separator:gabfad87ea78d034631cf3e5322ac383a1"><td class="memSeparator" colspan="2"> </td></tr> 100c0abf9e6Sopenharmony_ci<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> 101c0abf9e6Sopenharmony_ci<tr class="memdesc:ga61ce3bf1e66bd172e583b86a11fc41f1"><td class="mdescLeft"> </td><td class="mdescRight">Look up an event-type by its name. <a href="group__misc.html#ga61ce3bf1e66bd172e583b86a11fc41f1">More...</a><br /></td></tr> 102c0abf9e6Sopenharmony_ci<tr class="separator:ga61ce3bf1e66bd172e583b86a11fc41f1"><td class="memSeparator" colspan="2"> </td></tr> 103c0abf9e6Sopenharmony_ci<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> 104c0abf9e6Sopenharmony_ci<tr class="memdesc:ga4ee03d650200bb04a23233570667fa84"><td class="mdescLeft"> </td><td class="mdescRight">Look up an event-type by its name. <a href="group__misc.html#ga4ee03d650200bb04a23233570667fa84">More...</a><br /></td></tr> 105c0abf9e6Sopenharmony_ci<tr class="separator:ga4ee03d650200bb04a23233570667fa84"><td class="memSeparator" colspan="2"> </td></tr> 106c0abf9e6Sopenharmony_ci<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> 107c0abf9e6Sopenharmony_ci<tr class="memdesc:ga6620301a67f467489e4a7f93afe81621"><td class="mdescLeft"> </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> 108c0abf9e6Sopenharmony_ci<tr class="separator:ga6620301a67f467489e4a7f93afe81621"><td class="memSeparator" colspan="2"> </td></tr> 109c0abf9e6Sopenharmony_ci<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> 110c0abf9e6Sopenharmony_ci<tr class="memdesc:ga17a760a9eea9dc25011f39e1d5c282a0"><td class="mdescLeft"> </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> 111c0abf9e6Sopenharmony_ci<tr class="separator:ga17a760a9eea9dc25011f39e1d5c282a0"><td class="memSeparator" colspan="2"> </td></tr> 112c0abf9e6Sopenharmony_ci<tr class="memitem:ga314903beeafedabe45f879637e7254b0"><td class="memItemLeft" align="right" valign="top">int </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> 113c0abf9e6Sopenharmony_ci<tr class="memdesc:ga314903beeafedabe45f879637e7254b0"><td class="mdescLeft"> </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> 114c0abf9e6Sopenharmony_ci<tr class="separator:ga314903beeafedabe45f879637e7254b0"><td class="memSeparator" colspan="2"> </td></tr> 115c0abf9e6Sopenharmony_ci<tr class="memitem:gadd41b7514cca16c8b8920f16e562e08a"><td class="memItemLeft" align="right" valign="top">int </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> 116c0abf9e6Sopenharmony_ci<tr class="memdesc:gadd41b7514cca16c8b8920f16e562e08a"><td class="mdescLeft"> </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> 117c0abf9e6Sopenharmony_ci<tr class="separator:gadd41b7514cca16c8b8920f16e562e08a"><td class="memSeparator" colspan="2"> </td></tr> 118c0abf9e6Sopenharmony_ci<tr class="memitem:gab214498fca7a328f8a712ce15bf21982"><td class="memItemLeft" align="right" valign="top">int </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> 119c0abf9e6Sopenharmony_ci<tr class="memdesc:gab214498fca7a328f8a712ce15bf21982"><td class="mdescLeft"> </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> 120c0abf9e6Sopenharmony_ci<tr class="separator:gab214498fca7a328f8a712ce15bf21982"><td class="memSeparator" colspan="2"> </td></tr> 121c0abf9e6Sopenharmony_ci<tr class="memitem:gabad00f68481d83747a134c0a37aca003"><td class="memItemLeft" align="right" valign="top">int </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> 122c0abf9e6Sopenharmony_ci<tr class="memdesc:gabad00f68481d83747a134c0a37aca003"><td class="mdescLeft"> </td><td class="mdescRight">Look up an event code by its name. <a href="group__misc.html#gabad00f68481d83747a134c0a37aca003">More...</a><br /></td></tr> 123c0abf9e6Sopenharmony_ci<tr class="separator:gabad00f68481d83747a134c0a37aca003"><td class="memSeparator" colspan="2"> </td></tr> 124c0abf9e6Sopenharmony_ci<tr class="memitem:ga5bf9af4b8c372d87793e8a3c2dbeb466"><td class="memItemLeft" align="right" valign="top">int </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> 125c0abf9e6Sopenharmony_ci<tr class="memdesc:ga5bf9af4b8c372d87793e8a3c2dbeb466"><td class="mdescLeft"> </td><td class="mdescRight">Look up an event code by its name. <a href="group__misc.html#ga5bf9af4b8c372d87793e8a3c2dbeb466">More...</a><br /></td></tr> 126c0abf9e6Sopenharmony_ci<tr class="separator:ga5bf9af4b8c372d87793e8a3c2dbeb466"><td class="memSeparator" colspan="2"> </td></tr> 127c0abf9e6Sopenharmony_ci<tr class="memitem:gaebfc6b0ebb70169c9fec61620f1ea85f"><td class="memItemLeft" align="right" valign="top">int </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> 128c0abf9e6Sopenharmony_ci<tr class="memdesc:gaebfc6b0ebb70169c9fec61620f1ea85f"><td class="mdescLeft"> </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> 129c0abf9e6Sopenharmony_ci<tr class="separator:gaebfc6b0ebb70169c9fec61620f1ea85f"><td class="memSeparator" colspan="2"> </td></tr> 130c0abf9e6Sopenharmony_ci<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> 131c0abf9e6Sopenharmony_ci<tr class="memdesc:ga6f4418c98aa475a2fc34d58a197f7edd"><td class="mdescLeft"> </td><td class="mdescRight">Look up an input property by its name. <a href="group__misc.html#ga6f4418c98aa475a2fc34d58a197f7edd">More...</a><br /></td></tr> 132c0abf9e6Sopenharmony_ci<tr class="separator:ga6f4418c98aa475a2fc34d58a197f7edd"><td class="memSeparator" colspan="2"> </td></tr> 133c0abf9e6Sopenharmony_ci<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> 134c0abf9e6Sopenharmony_ci<tr class="memdesc:gaaa0bc4c7d0d2aedc84c7dcffee9ce29b"><td class="mdescLeft"> </td><td class="mdescRight">Look up an input property by its name. <a href="group__misc.html#gaaa0bc4c7d0d2aedc84c7dcffee9ce29b">More...</a><br /></td></tr> 135c0abf9e6Sopenharmony_ci<tr class="separator:gaaa0bc4c7d0d2aedc84c7dcffee9ce29b"><td class="memSeparator" colspan="2"> </td></tr> 136c0abf9e6Sopenharmony_ci</table> 137c0abf9e6Sopenharmony_ci<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> 138c0abf9e6Sopenharmony_ci<p>Functions for printing or querying event ranges. </p> 139c0abf9e6Sopenharmony_ci<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> 140c0abf9e6Sopenharmony_ci<h2 class="groupheader">Function Documentation</h2> 141c0abf9e6Sopenharmony_ci<a id="gabad00f68481d83747a134c0a37aca003"></a> 142c0abf9e6Sopenharmony_ci<h2 class="memtitle"><span class="permalink"><a href="#gabad00f68481d83747a134c0a37aca003">◆ </a></span>libevdev_event_code_from_code_name()</h2> 143c0abf9e6Sopenharmony_ci 144c0abf9e6Sopenharmony_ci<div class="memitem"> 145c0abf9e6Sopenharmony_ci<div class="memproto"> 146c0abf9e6Sopenharmony_ci <table class="memname"> 147c0abf9e6Sopenharmony_ci <tr> 148c0abf9e6Sopenharmony_ci <td class="memname">int libevdev_event_code_from_code_name </td> 149c0abf9e6Sopenharmony_ci <td>(</td> 150c0abf9e6Sopenharmony_ci <td class="paramtype">const char * </td> 151c0abf9e6Sopenharmony_ci <td class="paramname"><em>name</em></td><td>)</td> 152c0abf9e6Sopenharmony_ci <td></td> 153c0abf9e6Sopenharmony_ci </tr> 154c0abf9e6Sopenharmony_ci </table> 155c0abf9e6Sopenharmony_ci</div><div class="memdoc"> 156c0abf9e6Sopenharmony_ci 157c0abf9e6Sopenharmony_ci<p>Look up an event code by its name. </p> 158c0abf9e6Sopenharmony_ci<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> 159c0abf9e6Sopenharmony_ci<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> 160c0abf9e6Sopenharmony_ci<dl class="params"><dt>Parameters</dt><dd> 161c0abf9e6Sopenharmony_ci <table class="params"> 162c0abf9e6Sopenharmony_ci <tr><td class="paramname">name</td><td>A non-NULL string describing an input-event value ("ABS_X", "REL_Y", "KEY_A", ...)</td></tr> 163c0abf9e6Sopenharmony_ci </table> 164c0abf9e6Sopenharmony_ci </dd> 165c0abf9e6Sopenharmony_ci</dl> 166c0abf9e6Sopenharmony_ci<dl class="section return"><dt>Returns</dt><dd>The given event code for the name or -1 if not found. </dd></dl> 167c0abf9e6Sopenharmony_ci 168c0abf9e6Sopenharmony_ci</div> 169c0abf9e6Sopenharmony_ci</div> 170c0abf9e6Sopenharmony_ci<a id="ga5bf9af4b8c372d87793e8a3c2dbeb466"></a> 171c0abf9e6Sopenharmony_ci<h2 class="memtitle"><span class="permalink"><a href="#ga5bf9af4b8c372d87793e8a3c2dbeb466">◆ </a></span>libevdev_event_code_from_code_name_n()</h2> 172c0abf9e6Sopenharmony_ci 173c0abf9e6Sopenharmony_ci<div class="memitem"> 174c0abf9e6Sopenharmony_ci<div class="memproto"> 175c0abf9e6Sopenharmony_ci <table class="memname"> 176c0abf9e6Sopenharmony_ci <tr> 177c0abf9e6Sopenharmony_ci <td class="memname">int libevdev_event_code_from_code_name_n </td> 178c0abf9e6Sopenharmony_ci <td>(</td> 179c0abf9e6Sopenharmony_ci <td class="paramtype">const char * </td> 180c0abf9e6Sopenharmony_ci <td class="paramname"><em>name</em>, </td> 181c0abf9e6Sopenharmony_ci </tr> 182c0abf9e6Sopenharmony_ci <tr> 183c0abf9e6Sopenharmony_ci <td class="paramkey"></td> 184c0abf9e6Sopenharmony_ci <td></td> 185c0abf9e6Sopenharmony_ci <td class="paramtype">size_t </td> 186c0abf9e6Sopenharmony_ci <td class="paramname"><em>len</em> </td> 187c0abf9e6Sopenharmony_ci </tr> 188c0abf9e6Sopenharmony_ci <tr> 189c0abf9e6Sopenharmony_ci <td></td> 190c0abf9e6Sopenharmony_ci <td>)</td> 191c0abf9e6Sopenharmony_ci <td></td><td></td> 192c0abf9e6Sopenharmony_ci </tr> 193c0abf9e6Sopenharmony_ci </table> 194c0abf9e6Sopenharmony_ci</div><div class="memdoc"> 195c0abf9e6Sopenharmony_ci 196c0abf9e6Sopenharmony_ci<p>Look up an event code by its name. </p> 197c0abf9e6Sopenharmony_ci<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> 198c0abf9e6Sopenharmony_ci<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> 199c0abf9e6Sopenharmony_ci<dl class="params"><dt>Parameters</dt><dd> 200c0abf9e6Sopenharmony_ci <table class="params"> 201c0abf9e6Sopenharmony_ci <tr><td class="paramname">name</td><td>A non-NULL string describing an input-event value ("ABS_X", "REL_Y", "KEY_A", ...) </td></tr> 202c0abf9e6Sopenharmony_ci <tr><td class="paramname">len</td><td>The length of the passed string excluding any terminating 0 character.</td></tr> 203c0abf9e6Sopenharmony_ci </table> 204c0abf9e6Sopenharmony_ci </dd> 205c0abf9e6Sopenharmony_ci</dl> 206c0abf9e6Sopenharmony_ci<dl class="section return"><dt>Returns</dt><dd>The given event code for the name or -1 if not found. </dd></dl> 207c0abf9e6Sopenharmony_ci 208c0abf9e6Sopenharmony_ci</div> 209c0abf9e6Sopenharmony_ci</div> 210c0abf9e6Sopenharmony_ci<a id="ga6620301a67f467489e4a7f93afe81621"></a> 211c0abf9e6Sopenharmony_ci<h2 class="memtitle"><span class="permalink"><a href="#ga6620301a67f467489e4a7f93afe81621">◆ </a></span>libevdev_event_code_from_name()</h2> 212c0abf9e6Sopenharmony_ci 213c0abf9e6Sopenharmony_ci<div class="memitem"> 214c0abf9e6Sopenharmony_ci<div class="memproto"> 215c0abf9e6Sopenharmony_ci <table class="memname"> 216c0abf9e6Sopenharmony_ci <tr> 217c0abf9e6Sopenharmony_ci <td class="memname">int libevdev_event_code_from_name </td> 218c0abf9e6Sopenharmony_ci <td>(</td> 219c0abf9e6Sopenharmony_ci <td class="paramtype">unsigned int </td> 220c0abf9e6Sopenharmony_ci <td class="paramname"><em>type</em>, </td> 221c0abf9e6Sopenharmony_ci </tr> 222c0abf9e6Sopenharmony_ci <tr> 223c0abf9e6Sopenharmony_ci <td class="paramkey"></td> 224c0abf9e6Sopenharmony_ci <td></td> 225c0abf9e6Sopenharmony_ci <td class="paramtype">const char * </td> 226c0abf9e6Sopenharmony_ci <td class="paramname"><em>name</em> </td> 227c0abf9e6Sopenharmony_ci </tr> 228c0abf9e6Sopenharmony_ci <tr> 229c0abf9e6Sopenharmony_ci <td></td> 230c0abf9e6Sopenharmony_ci <td>)</td> 231c0abf9e6Sopenharmony_ci <td></td><td></td> 232c0abf9e6Sopenharmony_ci </tr> 233c0abf9e6Sopenharmony_ci </table> 234c0abf9e6Sopenharmony_ci</div><div class="memdoc"> 235c0abf9e6Sopenharmony_ci 236c0abf9e6Sopenharmony_ci<p>Look up an event code by its type and name. </p> 237c0abf9e6Sopenharmony_ci<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> 238c0abf9e6Sopenharmony_ci<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> 239c0abf9e6Sopenharmony_ci<dl class="params"><dt>Parameters</dt><dd> 240c0abf9e6Sopenharmony_ci <table class="params"> 241c0abf9e6Sopenharmony_ci <tr><td class="paramname">type</td><td>The event type (EV_* constant) where to look for the name. </td></tr> 242c0abf9e6Sopenharmony_ci <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> 243c0abf9e6Sopenharmony_ci </table> 244c0abf9e6Sopenharmony_ci </dd> 245c0abf9e6Sopenharmony_ci</dl> 246c0abf9e6Sopenharmony_ci<dl class="section return"><dt>Returns</dt><dd>The given code constant for the passed name or -1 if not found. </dd></dl> 247c0abf9e6Sopenharmony_ci 248c0abf9e6Sopenharmony_ci</div> 249c0abf9e6Sopenharmony_ci</div> 250c0abf9e6Sopenharmony_ci<a id="ga17a760a9eea9dc25011f39e1d5c282a0"></a> 251c0abf9e6Sopenharmony_ci<h2 class="memtitle"><span class="permalink"><a href="#ga17a760a9eea9dc25011f39e1d5c282a0">◆ </a></span>libevdev_event_code_from_name_n()</h2> 252c0abf9e6Sopenharmony_ci 253c0abf9e6Sopenharmony_ci<div class="memitem"> 254c0abf9e6Sopenharmony_ci<div class="memproto"> 255c0abf9e6Sopenharmony_ci <table class="memname"> 256c0abf9e6Sopenharmony_ci <tr> 257c0abf9e6Sopenharmony_ci <td class="memname">int libevdev_event_code_from_name_n </td> 258c0abf9e6Sopenharmony_ci <td>(</td> 259c0abf9e6Sopenharmony_ci <td class="paramtype">unsigned int </td> 260c0abf9e6Sopenharmony_ci <td class="paramname"><em>type</em>, </td> 261c0abf9e6Sopenharmony_ci </tr> 262c0abf9e6Sopenharmony_ci <tr> 263c0abf9e6Sopenharmony_ci <td class="paramkey"></td> 264c0abf9e6Sopenharmony_ci <td></td> 265c0abf9e6Sopenharmony_ci <td class="paramtype">const char * </td> 266c0abf9e6Sopenharmony_ci <td class="paramname"><em>name</em>, </td> 267c0abf9e6Sopenharmony_ci </tr> 268c0abf9e6Sopenharmony_ci <tr> 269c0abf9e6Sopenharmony_ci <td class="paramkey"></td> 270c0abf9e6Sopenharmony_ci <td></td> 271c0abf9e6Sopenharmony_ci <td class="paramtype">size_t </td> 272c0abf9e6Sopenharmony_ci <td class="paramname"><em>len</em> </td> 273c0abf9e6Sopenharmony_ci </tr> 274c0abf9e6Sopenharmony_ci <tr> 275c0abf9e6Sopenharmony_ci <td></td> 276c0abf9e6Sopenharmony_ci <td>)</td> 277c0abf9e6Sopenharmony_ci <td></td><td></td> 278c0abf9e6Sopenharmony_ci </tr> 279c0abf9e6Sopenharmony_ci </table> 280c0abf9e6Sopenharmony_ci</div><div class="memdoc"> 281c0abf9e6Sopenharmony_ci 282c0abf9e6Sopenharmony_ci<p>Look up an event code by its type and name. </p> 283c0abf9e6Sopenharmony_ci<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> 284c0abf9e6Sopenharmony_ci<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> 285c0abf9e6Sopenharmony_ci<dl class="params"><dt>Parameters</dt><dd> 286c0abf9e6Sopenharmony_ci <table class="params"> 287c0abf9e6Sopenharmony_ci <tr><td class="paramname">type</td><td>The event type (EV_* constant) where to look for the name. </td></tr> 288c0abf9e6Sopenharmony_ci <tr><td class="paramname">name</td><td>A non-NULL string describing an input-event code ("KEY_A", "ABS_X", "BTN_Y", ...). </td></tr> 289c0abf9e6Sopenharmony_ci <tr><td class="paramname">len</td><td>The length of the string in <code>name</code> excluding any terminating 0 character.</td></tr> 290c0abf9e6Sopenharmony_ci </table> 291c0abf9e6Sopenharmony_ci </dd> 292c0abf9e6Sopenharmony_ci</dl> 293c0abf9e6Sopenharmony_ci<dl class="section return"><dt>Returns</dt><dd>The given code constant for the name or -1 if not found. </dd></dl> 294c0abf9e6Sopenharmony_ci 295c0abf9e6Sopenharmony_ci</div> 296c0abf9e6Sopenharmony_ci</div> 297c0abf9e6Sopenharmony_ci<a id="gab407b3c2caaae502859c28460cad17bb"></a> 298c0abf9e6Sopenharmony_ci<h2 class="memtitle"><span class="permalink"><a href="#gab407b3c2caaae502859c28460cad17bb">◆ </a></span>libevdev_event_code_get_name()</h2> 299c0abf9e6Sopenharmony_ci 300c0abf9e6Sopenharmony_ci<div class="memitem"> 301c0abf9e6Sopenharmony_ci<div class="memproto"> 302c0abf9e6Sopenharmony_ci <table class="memname"> 303c0abf9e6Sopenharmony_ci <tr> 304c0abf9e6Sopenharmony_ci <td class="memname">const char* libevdev_event_code_get_name </td> 305c0abf9e6Sopenharmony_ci <td>(</td> 306c0abf9e6Sopenharmony_ci <td class="paramtype">unsigned int </td> 307c0abf9e6Sopenharmony_ci <td class="paramname"><em>type</em>, </td> 308c0abf9e6Sopenharmony_ci </tr> 309c0abf9e6Sopenharmony_ci <tr> 310c0abf9e6Sopenharmony_ci <td class="paramkey"></td> 311c0abf9e6Sopenharmony_ci <td></td> 312c0abf9e6Sopenharmony_ci <td class="paramtype">unsigned int </td> 313c0abf9e6Sopenharmony_ci <td class="paramname"><em>code</em> </td> 314c0abf9e6Sopenharmony_ci </tr> 315c0abf9e6Sopenharmony_ci <tr> 316c0abf9e6Sopenharmony_ci <td></td> 317c0abf9e6Sopenharmony_ci <td>)</td> 318c0abf9e6Sopenharmony_ci <td></td><td></td> 319c0abf9e6Sopenharmony_ci </tr> 320c0abf9e6Sopenharmony_ci </table> 321c0abf9e6Sopenharmony_ci</div><div class="memdoc"> 322c0abf9e6Sopenharmony_ci<dl class="params"><dt>Parameters</dt><dd> 323c0abf9e6Sopenharmony_ci <table class="params"> 324c0abf9e6Sopenharmony_ci <tr><td class="paramname">type</td><td>The event type for the code to query (EV_SYN, EV_REL, etc.) </td></tr> 325c0abf9e6Sopenharmony_ci <tr><td class="paramname">code</td><td>The event code to return the name for (e.g. ABS_X)</td></tr> 326c0abf9e6Sopenharmony_ci </table> 327c0abf9e6Sopenharmony_ci </dd> 328c0abf9e6Sopenharmony_ci</dl> 329c0abf9e6Sopenharmony_ci<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> 330c0abf9e6Sopenharmony_ci<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> 331c0abf9e6Sopenharmony_ci 332c0abf9e6Sopenharmony_ci</div> 333c0abf9e6Sopenharmony_ci</div> 334c0abf9e6Sopenharmony_ci<a id="ga37766a6a498fef3294d589abcce688bb"></a> 335c0abf9e6Sopenharmony_ci<h2 class="memtitle"><span class="permalink"><a href="#ga37766a6a498fef3294d589abcce688bb">◆ </a></span>libevdev_event_is_code()</h2> 336c0abf9e6Sopenharmony_ci 337c0abf9e6Sopenharmony_ci<div class="memitem"> 338c0abf9e6Sopenharmony_ci<div class="memproto"> 339c0abf9e6Sopenharmony_ci <table class="memname"> 340c0abf9e6Sopenharmony_ci <tr> 341c0abf9e6Sopenharmony_ci <td class="memname">int libevdev_event_is_code </td> 342c0abf9e6Sopenharmony_ci <td>(</td> 343c0abf9e6Sopenharmony_ci <td class="paramtype">const struct input_event * </td> 344c0abf9e6Sopenharmony_ci <td class="paramname"><em>ev</em>, </td> 345c0abf9e6Sopenharmony_ci </tr> 346c0abf9e6Sopenharmony_ci <tr> 347c0abf9e6Sopenharmony_ci <td class="paramkey"></td> 348c0abf9e6Sopenharmony_ci <td></td> 349c0abf9e6Sopenharmony_ci <td class="paramtype">unsigned int </td> 350c0abf9e6Sopenharmony_ci <td class="paramname"><em>type</em>, </td> 351c0abf9e6Sopenharmony_ci </tr> 352c0abf9e6Sopenharmony_ci <tr> 353c0abf9e6Sopenharmony_ci <td class="paramkey"></td> 354c0abf9e6Sopenharmony_ci <td></td> 355c0abf9e6Sopenharmony_ci <td class="paramtype">unsigned int </td> 356c0abf9e6Sopenharmony_ci <td class="paramname"><em>code</em> </td> 357c0abf9e6Sopenharmony_ci </tr> 358c0abf9e6Sopenharmony_ci <tr> 359c0abf9e6Sopenharmony_ci <td></td> 360c0abf9e6Sopenharmony_ci <td>)</td> 361c0abf9e6Sopenharmony_ci <td></td><td></td> 362c0abf9e6Sopenharmony_ci </tr> 363c0abf9e6Sopenharmony_ci </table> 364c0abf9e6Sopenharmony_ci</div><div class="memdoc"> 365c0abf9e6Sopenharmony_ci 366c0abf9e6Sopenharmony_ci<p>Helper function to check if an event is of a specific type and code. </p> 367c0abf9e6Sopenharmony_ci<p>This is virtually the same as: </p><pre class="fragment"> ev->type == type && ev->code == code 368c0abf9e6Sopenharmony_ci</pre><p> with the exception that some sanity checks are performed to ensure type and code are valid.</p> 369c0abf9e6Sopenharmony_ci<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> 370c0abf9e6Sopenharmony_ci<dl class="params"><dt>Parameters</dt><dd> 371c0abf9e6Sopenharmony_ci <table class="params"> 372c0abf9e6Sopenharmony_ci <tr><td class="paramname">ev</td><td>The input event to check </td></tr> 373c0abf9e6Sopenharmony_ci <tr><td class="paramname">type</td><td>Input event type to compare the event against (EV_REL, EV_ABS, etc.) </td></tr> 374c0abf9e6Sopenharmony_ci <tr><td class="paramname">code</td><td>Input event code to compare the event against (ABS_X, REL_X, etc.)</td></tr> 375c0abf9e6Sopenharmony_ci </table> 376c0abf9e6Sopenharmony_ci </dd> 377c0abf9e6Sopenharmony_ci</dl> 378c0abf9e6Sopenharmony_ci<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> 379c0abf9e6Sopenharmony_ci 380c0abf9e6Sopenharmony_ci</div> 381c0abf9e6Sopenharmony_ci</div> 382c0abf9e6Sopenharmony_ci<a id="gab8b6b80740e028261300b8952b61a596"></a> 383c0abf9e6Sopenharmony_ci<h2 class="memtitle"><span class="permalink"><a href="#gab8b6b80740e028261300b8952b61a596">◆ </a></span>libevdev_event_is_type()</h2> 384c0abf9e6Sopenharmony_ci 385c0abf9e6Sopenharmony_ci<div class="memitem"> 386c0abf9e6Sopenharmony_ci<div class="memproto"> 387c0abf9e6Sopenharmony_ci <table class="memname"> 388c0abf9e6Sopenharmony_ci <tr> 389c0abf9e6Sopenharmony_ci <td class="memname">int libevdev_event_is_type </td> 390c0abf9e6Sopenharmony_ci <td>(</td> 391c0abf9e6Sopenharmony_ci <td class="paramtype">const struct input_event * </td> 392c0abf9e6Sopenharmony_ci <td class="paramname"><em>ev</em>, </td> 393c0abf9e6Sopenharmony_ci </tr> 394c0abf9e6Sopenharmony_ci <tr> 395c0abf9e6Sopenharmony_ci <td class="paramkey"></td> 396c0abf9e6Sopenharmony_ci <td></td> 397c0abf9e6Sopenharmony_ci <td class="paramtype">unsigned int </td> 398c0abf9e6Sopenharmony_ci <td class="paramname"><em>type</em> </td> 399c0abf9e6Sopenharmony_ci </tr> 400c0abf9e6Sopenharmony_ci <tr> 401c0abf9e6Sopenharmony_ci <td></td> 402c0abf9e6Sopenharmony_ci <td>)</td> 403c0abf9e6Sopenharmony_ci <td></td><td></td> 404c0abf9e6Sopenharmony_ci </tr> 405c0abf9e6Sopenharmony_ci </table> 406c0abf9e6Sopenharmony_ci</div><div class="memdoc"> 407c0abf9e6Sopenharmony_ci 408c0abf9e6Sopenharmony_ci<p>Helper function to check if an event is of a specific type. </p> 409c0abf9e6Sopenharmony_ci<p>This is virtually the same as: </p><pre class="fragment"> ev->type == type 410c0abf9e6Sopenharmony_ci</pre><p> with the exception that some sanity checks are performed to ensure type is valid.</p> 411c0abf9e6Sopenharmony_ci<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> 412c0abf9e6Sopenharmony_ci<dl class="params"><dt>Parameters</dt><dd> 413c0abf9e6Sopenharmony_ci <table class="params"> 414c0abf9e6Sopenharmony_ci <tr><td class="paramname">ev</td><td>The input event to check </td></tr> 415c0abf9e6Sopenharmony_ci <tr><td class="paramname">type</td><td>Input event type to compare the event against (EV_REL, EV_ABS, etc.)</td></tr> 416c0abf9e6Sopenharmony_ci </table> 417c0abf9e6Sopenharmony_ci </dd> 418c0abf9e6Sopenharmony_ci</dl> 419c0abf9e6Sopenharmony_ci<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> 420c0abf9e6Sopenharmony_ci 421c0abf9e6Sopenharmony_ci</div> 422c0abf9e6Sopenharmony_ci</div> 423c0abf9e6Sopenharmony_ci<a id="gadd41b7514cca16c8b8920f16e562e08a"></a> 424c0abf9e6Sopenharmony_ci<h2 class="memtitle"><span class="permalink"><a href="#gadd41b7514cca16c8b8920f16e562e08a">◆ </a></span>libevdev_event_type_from_code_name()</h2> 425c0abf9e6Sopenharmony_ci 426c0abf9e6Sopenharmony_ci<div class="memitem"> 427c0abf9e6Sopenharmony_ci<div class="memproto"> 428c0abf9e6Sopenharmony_ci <table class="memname"> 429c0abf9e6Sopenharmony_ci <tr> 430c0abf9e6Sopenharmony_ci <td class="memname">int libevdev_event_type_from_code_name </td> 431c0abf9e6Sopenharmony_ci <td>(</td> 432c0abf9e6Sopenharmony_ci <td class="paramtype">const char * </td> 433c0abf9e6Sopenharmony_ci <td class="paramname"><em>name</em></td><td>)</td> 434c0abf9e6Sopenharmony_ci <td></td> 435c0abf9e6Sopenharmony_ci </tr> 436c0abf9e6Sopenharmony_ci </table> 437c0abf9e6Sopenharmony_ci</div><div class="memdoc"> 438c0abf9e6Sopenharmony_ci 439c0abf9e6Sopenharmony_ci<p>Look up an event type for a event code name. </p> 440c0abf9e6Sopenharmony_ci<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> 441c0abf9e6Sopenharmony_ci<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> 442c0abf9e6Sopenharmony_ci<dl class="params"><dt>Parameters</dt><dd> 443c0abf9e6Sopenharmony_ci <table class="params"> 444c0abf9e6Sopenharmony_ci <tr><td class="paramname">name</td><td>A non-NULL string describing an input-event value ("ABS_X", "REL_Y", "KEY_A", ...)</td></tr> 445c0abf9e6Sopenharmony_ci </table> 446c0abf9e6Sopenharmony_ci </dd> 447c0abf9e6Sopenharmony_ci</dl> 448c0abf9e6Sopenharmony_ci<dl class="section return"><dt>Returns</dt><dd>The given event code for the name or -1 if not found. </dd></dl> 449c0abf9e6Sopenharmony_ci 450c0abf9e6Sopenharmony_ci</div> 451c0abf9e6Sopenharmony_ci</div> 452c0abf9e6Sopenharmony_ci<a id="gab214498fca7a328f8a712ce15bf21982"></a> 453c0abf9e6Sopenharmony_ci<h2 class="memtitle"><span class="permalink"><a href="#gab214498fca7a328f8a712ce15bf21982">◆ </a></span>libevdev_event_type_from_code_name_n()</h2> 454c0abf9e6Sopenharmony_ci 455c0abf9e6Sopenharmony_ci<div class="memitem"> 456c0abf9e6Sopenharmony_ci<div class="memproto"> 457c0abf9e6Sopenharmony_ci <table class="memname"> 458c0abf9e6Sopenharmony_ci <tr> 459c0abf9e6Sopenharmony_ci <td class="memname">int libevdev_event_type_from_code_name_n </td> 460c0abf9e6Sopenharmony_ci <td>(</td> 461c0abf9e6Sopenharmony_ci <td class="paramtype">const char * </td> 462c0abf9e6Sopenharmony_ci <td class="paramname"><em>name</em>, </td> 463c0abf9e6Sopenharmony_ci </tr> 464c0abf9e6Sopenharmony_ci <tr> 465c0abf9e6Sopenharmony_ci <td class="paramkey"></td> 466c0abf9e6Sopenharmony_ci <td></td> 467c0abf9e6Sopenharmony_ci <td class="paramtype">size_t </td> 468c0abf9e6Sopenharmony_ci <td class="paramname"><em>len</em> </td> 469c0abf9e6Sopenharmony_ci </tr> 470c0abf9e6Sopenharmony_ci <tr> 471c0abf9e6Sopenharmony_ci <td></td> 472c0abf9e6Sopenharmony_ci <td>)</td> 473c0abf9e6Sopenharmony_ci <td></td><td></td> 474c0abf9e6Sopenharmony_ci </tr> 475c0abf9e6Sopenharmony_ci </table> 476c0abf9e6Sopenharmony_ci</div><div class="memdoc"> 477c0abf9e6Sopenharmony_ci 478c0abf9e6Sopenharmony_ci<p>Look up an event type for a event code name. </p> 479c0abf9e6Sopenharmony_ci<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> 480c0abf9e6Sopenharmony_ci<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> 481c0abf9e6Sopenharmony_ci<dl class="params"><dt>Parameters</dt><dd> 482c0abf9e6Sopenharmony_ci <table class="params"> 483c0abf9e6Sopenharmony_ci <tr><td class="paramname">name</td><td>A non-NULL string describing an input-event value ("ABS_X", "REL_Y", "KEY_A", ...) </td></tr> 484c0abf9e6Sopenharmony_ci <tr><td class="paramname">len</td><td>The length of the passed string excluding any terminating 0 character.</td></tr> 485c0abf9e6Sopenharmony_ci </table> 486c0abf9e6Sopenharmony_ci </dd> 487c0abf9e6Sopenharmony_ci</dl> 488c0abf9e6Sopenharmony_ci<dl class="section return"><dt>Returns</dt><dd>The given event code for the name or -1 if not found. </dd></dl> 489c0abf9e6Sopenharmony_ci 490c0abf9e6Sopenharmony_ci</div> 491c0abf9e6Sopenharmony_ci</div> 492c0abf9e6Sopenharmony_ci<a id="ga61ce3bf1e66bd172e583b86a11fc41f1"></a> 493c0abf9e6Sopenharmony_ci<h2 class="memtitle"><span class="permalink"><a href="#ga61ce3bf1e66bd172e583b86a11fc41f1">◆ </a></span>libevdev_event_type_from_name()</h2> 494c0abf9e6Sopenharmony_ci 495c0abf9e6Sopenharmony_ci<div class="memitem"> 496c0abf9e6Sopenharmony_ci<div class="memproto"> 497c0abf9e6Sopenharmony_ci <table class="memname"> 498c0abf9e6Sopenharmony_ci <tr> 499c0abf9e6Sopenharmony_ci <td class="memname">int libevdev_event_type_from_name </td> 500c0abf9e6Sopenharmony_ci <td>(</td> 501c0abf9e6Sopenharmony_ci <td class="paramtype">const char * </td> 502c0abf9e6Sopenharmony_ci <td class="paramname"><em>name</em></td><td>)</td> 503c0abf9e6Sopenharmony_ci <td></td> 504c0abf9e6Sopenharmony_ci </tr> 505c0abf9e6Sopenharmony_ci </table> 506c0abf9e6Sopenharmony_ci</div><div class="memdoc"> 507c0abf9e6Sopenharmony_ci 508c0abf9e6Sopenharmony_ci<p>Look up an event-type by its name. </p> 509c0abf9e6Sopenharmony_ci<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> 510c0abf9e6Sopenharmony_ci<dl class="params"><dt>Parameters</dt><dd> 511c0abf9e6Sopenharmony_ci <table class="params"> 512c0abf9e6Sopenharmony_ci <tr><td class="paramname">name</td><td>A non-NULL string describing an input-event type ("EV_KEY", "EV_ABS", ...), zero-terminated.</td></tr> 513c0abf9e6Sopenharmony_ci </table> 514c0abf9e6Sopenharmony_ci </dd> 515c0abf9e6Sopenharmony_ci</dl> 516c0abf9e6Sopenharmony_ci<dl class="section return"><dt>Returns</dt><dd>The given type constant for the passed name or -1 if not found.</dd></dl> 517c0abf9e6Sopenharmony_ci<dl class="section note"><dt>Note</dt><dd>EV_MAX is also recognized. </dd></dl> 518c0abf9e6Sopenharmony_ci 519c0abf9e6Sopenharmony_ci</div> 520c0abf9e6Sopenharmony_ci</div> 521c0abf9e6Sopenharmony_ci<a id="ga4ee03d650200bb04a23233570667fa84"></a> 522c0abf9e6Sopenharmony_ci<h2 class="memtitle"><span class="permalink"><a href="#ga4ee03d650200bb04a23233570667fa84">◆ </a></span>libevdev_event_type_from_name_n()</h2> 523c0abf9e6Sopenharmony_ci 524c0abf9e6Sopenharmony_ci<div class="memitem"> 525c0abf9e6Sopenharmony_ci<div class="memproto"> 526c0abf9e6Sopenharmony_ci <table class="memname"> 527c0abf9e6Sopenharmony_ci <tr> 528c0abf9e6Sopenharmony_ci <td class="memname">int libevdev_event_type_from_name_n </td> 529c0abf9e6Sopenharmony_ci <td>(</td> 530c0abf9e6Sopenharmony_ci <td class="paramtype">const char * </td> 531c0abf9e6Sopenharmony_ci <td class="paramname"><em>name</em>, </td> 532c0abf9e6Sopenharmony_ci </tr> 533c0abf9e6Sopenharmony_ci <tr> 534c0abf9e6Sopenharmony_ci <td class="paramkey"></td> 535c0abf9e6Sopenharmony_ci <td></td> 536c0abf9e6Sopenharmony_ci <td class="paramtype">size_t </td> 537c0abf9e6Sopenharmony_ci <td class="paramname"><em>len</em> </td> 538c0abf9e6Sopenharmony_ci </tr> 539c0abf9e6Sopenharmony_ci <tr> 540c0abf9e6Sopenharmony_ci <td></td> 541c0abf9e6Sopenharmony_ci <td>)</td> 542c0abf9e6Sopenharmony_ci <td></td><td></td> 543c0abf9e6Sopenharmony_ci </tr> 544c0abf9e6Sopenharmony_ci </table> 545c0abf9e6Sopenharmony_ci</div><div class="memdoc"> 546c0abf9e6Sopenharmony_ci 547c0abf9e6Sopenharmony_ci<p>Look up an event-type by its name. </p> 548c0abf9e6Sopenharmony_ci<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> 549c0abf9e6Sopenharmony_ci<dl class="params"><dt>Parameters</dt><dd> 550c0abf9e6Sopenharmony_ci <table class="params"> 551c0abf9e6Sopenharmony_ci <tr><td class="paramname">name</td><td>A non-NULL string describing an input-event type ("EV_KEY", "EV_ABS", ...). </td></tr> 552c0abf9e6Sopenharmony_ci <tr><td class="paramname">len</td><td>The length of the passed string excluding any terminating 0 character.</td></tr> 553c0abf9e6Sopenharmony_ci </table> 554c0abf9e6Sopenharmony_ci </dd> 555c0abf9e6Sopenharmony_ci</dl> 556c0abf9e6Sopenharmony_ci<dl class="section return"><dt>Returns</dt><dd>The given type constant for the passed name or -1 if not found.</dd></dl> 557c0abf9e6Sopenharmony_ci<dl class="section note"><dt>Note</dt><dd>EV_MAX is also recognized. </dd></dl> 558c0abf9e6Sopenharmony_ci 559c0abf9e6Sopenharmony_ci</div> 560c0abf9e6Sopenharmony_ci</div> 561c0abf9e6Sopenharmony_ci<a id="gabfad87ea78d034631cf3e5322ac383a1"></a> 562c0abf9e6Sopenharmony_ci<h2 class="memtitle"><span class="permalink"><a href="#gabfad87ea78d034631cf3e5322ac383a1">◆ </a></span>libevdev_event_type_get_max()</h2> 563c0abf9e6Sopenharmony_ci 564c0abf9e6Sopenharmony_ci<div class="memitem"> 565c0abf9e6Sopenharmony_ci<div class="memproto"> 566c0abf9e6Sopenharmony_ci <table class="memname"> 567c0abf9e6Sopenharmony_ci <tr> 568c0abf9e6Sopenharmony_ci <td class="memname">int libevdev_event_type_get_max </td> 569c0abf9e6Sopenharmony_ci <td>(</td> 570c0abf9e6Sopenharmony_ci <td class="paramtype">unsigned int </td> 571c0abf9e6Sopenharmony_ci <td class="paramname"><em>type</em></td><td>)</td> 572c0abf9e6Sopenharmony_ci <td></td> 573c0abf9e6Sopenharmony_ci </tr> 574c0abf9e6Sopenharmony_ci </table> 575c0abf9e6Sopenharmony_ci</div><div class="memdoc"> 576c0abf9e6Sopenharmony_ci<dl class="params"><dt>Parameters</dt><dd> 577c0abf9e6Sopenharmony_ci <table class="params"> 578c0abf9e6Sopenharmony_ci <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> 579c0abf9e6Sopenharmony_ci </table> 580c0abf9e6Sopenharmony_ci </dd> 581c0abf9e6Sopenharmony_ci</dl> 582c0abf9e6Sopenharmony_ci<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> 583c0abf9e6Sopenharmony_ci<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> 584c0abf9e6Sopenharmony_ci 585c0abf9e6Sopenharmony_ci</div> 586c0abf9e6Sopenharmony_ci</div> 587c0abf9e6Sopenharmony_ci<a id="gac99720fd926bf288764f9a81bf37ed09"></a> 588c0abf9e6Sopenharmony_ci<h2 class="memtitle"><span class="permalink"><a href="#gac99720fd926bf288764f9a81bf37ed09">◆ </a></span>libevdev_event_type_get_name()</h2> 589c0abf9e6Sopenharmony_ci 590c0abf9e6Sopenharmony_ci<div class="memitem"> 591c0abf9e6Sopenharmony_ci<div class="memproto"> 592c0abf9e6Sopenharmony_ci <table class="memname"> 593c0abf9e6Sopenharmony_ci <tr> 594c0abf9e6Sopenharmony_ci <td class="memname">const char* libevdev_event_type_get_name </td> 595c0abf9e6Sopenharmony_ci <td>(</td> 596c0abf9e6Sopenharmony_ci <td class="paramtype">unsigned int </td> 597c0abf9e6Sopenharmony_ci <td class="paramname"><em>type</em></td><td>)</td> 598c0abf9e6Sopenharmony_ci <td></td> 599c0abf9e6Sopenharmony_ci </tr> 600c0abf9e6Sopenharmony_ci </table> 601c0abf9e6Sopenharmony_ci</div><div class="memdoc"> 602c0abf9e6Sopenharmony_ci<dl class="params"><dt>Parameters</dt><dd> 603c0abf9e6Sopenharmony_ci <table class="params"> 604c0abf9e6Sopenharmony_ci <tr><td class="paramname">type</td><td>The event type to return the name for.</td></tr> 605c0abf9e6Sopenharmony_ci </table> 606c0abf9e6Sopenharmony_ci </dd> 607c0abf9e6Sopenharmony_ci</dl> 608c0abf9e6Sopenharmony_ci<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> 609c0abf9e6Sopenharmony_ci<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> 610c0abf9e6Sopenharmony_ci 611c0abf9e6Sopenharmony_ci</div> 612c0abf9e6Sopenharmony_ci</div> 613c0abf9e6Sopenharmony_ci<a id="ga314903beeafedabe45f879637e7254b0"></a> 614c0abf9e6Sopenharmony_ci<h2 class="memtitle"><span class="permalink"><a href="#ga314903beeafedabe45f879637e7254b0">◆ </a></span>libevdev_event_value_from_name()</h2> 615c0abf9e6Sopenharmony_ci 616c0abf9e6Sopenharmony_ci<div class="memitem"> 617c0abf9e6Sopenharmony_ci<div class="memproto"> 618c0abf9e6Sopenharmony_ci <table class="memname"> 619c0abf9e6Sopenharmony_ci <tr> 620c0abf9e6Sopenharmony_ci <td class="memname">int libevdev_event_value_from_name </td> 621c0abf9e6Sopenharmony_ci <td>(</td> 622c0abf9e6Sopenharmony_ci <td class="paramtype">unsigned int </td> 623c0abf9e6Sopenharmony_ci <td class="paramname"><em>type</em>, </td> 624c0abf9e6Sopenharmony_ci </tr> 625c0abf9e6Sopenharmony_ci <tr> 626c0abf9e6Sopenharmony_ci <td class="paramkey"></td> 627c0abf9e6Sopenharmony_ci <td></td> 628c0abf9e6Sopenharmony_ci <td class="paramtype">unsigned int </td> 629c0abf9e6Sopenharmony_ci <td class="paramname"><em>code</em>, </td> 630c0abf9e6Sopenharmony_ci </tr> 631c0abf9e6Sopenharmony_ci <tr> 632c0abf9e6Sopenharmony_ci <td class="paramkey"></td> 633c0abf9e6Sopenharmony_ci <td></td> 634c0abf9e6Sopenharmony_ci <td class="paramtype">const char * </td> 635c0abf9e6Sopenharmony_ci <td class="paramname"><em>name</em> </td> 636c0abf9e6Sopenharmony_ci </tr> 637c0abf9e6Sopenharmony_ci <tr> 638c0abf9e6Sopenharmony_ci <td></td> 639c0abf9e6Sopenharmony_ci <td>)</td> 640c0abf9e6Sopenharmony_ci <td></td><td></td> 641c0abf9e6Sopenharmony_ci </tr> 642c0abf9e6Sopenharmony_ci </table> 643c0abf9e6Sopenharmony_ci</div><div class="memdoc"> 644c0abf9e6Sopenharmony_ci 645c0abf9e6Sopenharmony_ci<p>Look up an event value by its type, code and name. </p> 646c0abf9e6Sopenharmony_ci<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> 647c0abf9e6Sopenharmony_ci<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> 648c0abf9e6Sopenharmony_ci<p>As of kernel 4.17, only EV_ABS/ABS_MT_TOOL_TYPE support name resolution.</p> 649c0abf9e6Sopenharmony_ci<dl class="params"><dt>Parameters</dt><dd> 650c0abf9e6Sopenharmony_ci <table class="params"> 651c0abf9e6Sopenharmony_ci <tr><td class="paramname">type</td><td>The event type (EV_* constant) where to look for the name. </td></tr> 652c0abf9e6Sopenharmony_ci <tr><td class="paramname">code</td><td>The event code (ABS_* constant) where to look for the name. </td></tr> 653c0abf9e6Sopenharmony_ci <tr><td class="paramname">name</td><td>A non-NULL string describing an input-event value ("MT_TOOL_TYPE", ...)</td></tr> 654c0abf9e6Sopenharmony_ci </table> 655c0abf9e6Sopenharmony_ci </dd> 656c0abf9e6Sopenharmony_ci</dl> 657c0abf9e6Sopenharmony_ci<dl class="section return"><dt>Returns</dt><dd>The given value constant for the name or -1 if not found. </dd></dl> 658c0abf9e6Sopenharmony_ci 659c0abf9e6Sopenharmony_ci</div> 660c0abf9e6Sopenharmony_ci</div> 661c0abf9e6Sopenharmony_ci<a id="gaebfc6b0ebb70169c9fec61620f1ea85f"></a> 662c0abf9e6Sopenharmony_ci<h2 class="memtitle"><span class="permalink"><a href="#gaebfc6b0ebb70169c9fec61620f1ea85f">◆ </a></span>libevdev_event_value_from_name_n()</h2> 663c0abf9e6Sopenharmony_ci 664c0abf9e6Sopenharmony_ci<div class="memitem"> 665c0abf9e6Sopenharmony_ci<div class="memproto"> 666c0abf9e6Sopenharmony_ci <table class="memname"> 667c0abf9e6Sopenharmony_ci <tr> 668c0abf9e6Sopenharmony_ci <td class="memname">int libevdev_event_value_from_name_n </td> 669c0abf9e6Sopenharmony_ci <td>(</td> 670c0abf9e6Sopenharmony_ci <td class="paramtype">unsigned int </td> 671c0abf9e6Sopenharmony_ci <td class="paramname"><em>type</em>, </td> 672c0abf9e6Sopenharmony_ci </tr> 673c0abf9e6Sopenharmony_ci <tr> 674c0abf9e6Sopenharmony_ci <td class="paramkey"></td> 675c0abf9e6Sopenharmony_ci <td></td> 676c0abf9e6Sopenharmony_ci <td class="paramtype">unsigned int </td> 677c0abf9e6Sopenharmony_ci <td class="paramname"><em>code</em>, </td> 678c0abf9e6Sopenharmony_ci </tr> 679c0abf9e6Sopenharmony_ci <tr> 680c0abf9e6Sopenharmony_ci <td class="paramkey"></td> 681c0abf9e6Sopenharmony_ci <td></td> 682c0abf9e6Sopenharmony_ci <td class="paramtype">const char * </td> 683c0abf9e6Sopenharmony_ci <td class="paramname"><em>name</em>, </td> 684c0abf9e6Sopenharmony_ci </tr> 685c0abf9e6Sopenharmony_ci <tr> 686c0abf9e6Sopenharmony_ci <td class="paramkey"></td> 687c0abf9e6Sopenharmony_ci <td></td> 688c0abf9e6Sopenharmony_ci <td class="paramtype">size_t </td> 689c0abf9e6Sopenharmony_ci <td class="paramname"><em>len</em> </td> 690c0abf9e6Sopenharmony_ci </tr> 691c0abf9e6Sopenharmony_ci <tr> 692c0abf9e6Sopenharmony_ci <td></td> 693c0abf9e6Sopenharmony_ci <td>)</td> 694c0abf9e6Sopenharmony_ci <td></td><td></td> 695c0abf9e6Sopenharmony_ci </tr> 696c0abf9e6Sopenharmony_ci </table> 697c0abf9e6Sopenharmony_ci</div><div class="memdoc"> 698c0abf9e6Sopenharmony_ci 699c0abf9e6Sopenharmony_ci<p>Look up an event value by its type, code and name. </p> 700c0abf9e6Sopenharmony_ci<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> 701c0abf9e6Sopenharmony_ci<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> 702c0abf9e6Sopenharmony_ci<p>As of kernel 4.17, only EV_ABS/ABS_MT_TOOL_TYPE support name resolution.</p> 703c0abf9e6Sopenharmony_ci<dl class="params"><dt>Parameters</dt><dd> 704c0abf9e6Sopenharmony_ci <table class="params"> 705c0abf9e6Sopenharmony_ci <tr><td class="paramname">type</td><td>The event type (EV_* constant) where to look for the name. </td></tr> 706c0abf9e6Sopenharmony_ci <tr><td class="paramname">code</td><td>The event code (ABS_* constant) where to look for the name. </td></tr> 707c0abf9e6Sopenharmony_ci <tr><td class="paramname">name</td><td>A non-NULL string describing an input-event value ("MT_TOOL_TYPE", ...) </td></tr> 708c0abf9e6Sopenharmony_ci <tr><td class="paramname">len</td><td>The length of the string in <code>name</code> excluding any terminating 0 character.</td></tr> 709c0abf9e6Sopenharmony_ci </table> 710c0abf9e6Sopenharmony_ci </dd> 711c0abf9e6Sopenharmony_ci</dl> 712c0abf9e6Sopenharmony_ci<dl class="section return"><dt>Returns</dt><dd>The given value constant for the name or -1 if not found. </dd></dl> 713c0abf9e6Sopenharmony_ci 714c0abf9e6Sopenharmony_ci</div> 715c0abf9e6Sopenharmony_ci</div> 716c0abf9e6Sopenharmony_ci<a id="gabcd45c5e963cba245e944ea66e72fcc3"></a> 717c0abf9e6Sopenharmony_ci<h2 class="memtitle"><span class="permalink"><a href="#gabcd45c5e963cba245e944ea66e72fcc3">◆ </a></span>libevdev_event_value_get_name()</h2> 718c0abf9e6Sopenharmony_ci 719c0abf9e6Sopenharmony_ci<div class="memitem"> 720c0abf9e6Sopenharmony_ci<div class="memproto"> 721c0abf9e6Sopenharmony_ci <table class="memname"> 722c0abf9e6Sopenharmony_ci <tr> 723c0abf9e6Sopenharmony_ci <td class="memname">const char* libevdev_event_value_get_name </td> 724c0abf9e6Sopenharmony_ci <td>(</td> 725c0abf9e6Sopenharmony_ci <td class="paramtype">unsigned int </td> 726c0abf9e6Sopenharmony_ci <td class="paramname"><em>type</em>, </td> 727c0abf9e6Sopenharmony_ci </tr> 728c0abf9e6Sopenharmony_ci <tr> 729c0abf9e6Sopenharmony_ci <td class="paramkey"></td> 730c0abf9e6Sopenharmony_ci <td></td> 731c0abf9e6Sopenharmony_ci <td class="paramtype">unsigned int </td> 732c0abf9e6Sopenharmony_ci <td class="paramname"><em>code</em>, </td> 733c0abf9e6Sopenharmony_ci </tr> 734c0abf9e6Sopenharmony_ci <tr> 735c0abf9e6Sopenharmony_ci <td class="paramkey"></td> 736c0abf9e6Sopenharmony_ci <td></td> 737c0abf9e6Sopenharmony_ci <td class="paramtype">int </td> 738c0abf9e6Sopenharmony_ci <td class="paramname"><em>value</em> </td> 739c0abf9e6Sopenharmony_ci </tr> 740c0abf9e6Sopenharmony_ci <tr> 741c0abf9e6Sopenharmony_ci <td></td> 742c0abf9e6Sopenharmony_ci <td>)</td> 743c0abf9e6Sopenharmony_ci <td></td><td></td> 744c0abf9e6Sopenharmony_ci </tr> 745c0abf9e6Sopenharmony_ci </table> 746c0abf9e6Sopenharmony_ci</div><div class="memdoc"> 747c0abf9e6Sopenharmony_ci 748c0abf9e6Sopenharmony_ci<p>This function resolves the event value for a code. </p> 749c0abf9e6Sopenharmony_ci<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> 750c0abf9e6Sopenharmony_ci<dl class="params"><dt>Parameters</dt><dd> 751c0abf9e6Sopenharmony_ci <table class="params"> 752c0abf9e6Sopenharmony_ci <tr><td class="paramname">type</td><td>The event type for the value to query (EV_ABS, etc.) </td></tr> 753c0abf9e6Sopenharmony_ci <tr><td class="paramname">code</td><td>The event code for the value to query (e.g. ABS_MT_TOOL_TYPE) </td></tr> 754c0abf9e6Sopenharmony_ci <tr><td class="paramname">value</td><td>The event value to return the name for (e.g. MT_TOOL_PALM)</td></tr> 755c0abf9e6Sopenharmony_ci </table> 756c0abf9e6Sopenharmony_ci </dd> 757c0abf9e6Sopenharmony_ci</dl> 758c0abf9e6Sopenharmony_ci<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> 759c0abf9e6Sopenharmony_ci<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> 760c0abf9e6Sopenharmony_ci 761c0abf9e6Sopenharmony_ci</div> 762c0abf9e6Sopenharmony_ci</div> 763c0abf9e6Sopenharmony_ci<a id="ga6f4418c98aa475a2fc34d58a197f7edd"></a> 764c0abf9e6Sopenharmony_ci<h2 class="memtitle"><span class="permalink"><a href="#ga6f4418c98aa475a2fc34d58a197f7edd">◆ </a></span>libevdev_property_from_name()</h2> 765c0abf9e6Sopenharmony_ci 766c0abf9e6Sopenharmony_ci<div class="memitem"> 767c0abf9e6Sopenharmony_ci<div class="memproto"> 768c0abf9e6Sopenharmony_ci <table class="memname"> 769c0abf9e6Sopenharmony_ci <tr> 770c0abf9e6Sopenharmony_ci <td class="memname">int libevdev_property_from_name </td> 771c0abf9e6Sopenharmony_ci <td>(</td> 772c0abf9e6Sopenharmony_ci <td class="paramtype">const char * </td> 773c0abf9e6Sopenharmony_ci <td class="paramname"><em>name</em></td><td>)</td> 774c0abf9e6Sopenharmony_ci <td></td> 775c0abf9e6Sopenharmony_ci </tr> 776c0abf9e6Sopenharmony_ci </table> 777c0abf9e6Sopenharmony_ci</div><div class="memdoc"> 778c0abf9e6Sopenharmony_ci 779c0abf9e6Sopenharmony_ci<p>Look up an input property by its name. </p> 780c0abf9e6Sopenharmony_ci<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> 781c0abf9e6Sopenharmony_ci<dl class="params"><dt>Parameters</dt><dd> 782c0abf9e6Sopenharmony_ci <table class="params"> 783c0abf9e6Sopenharmony_ci <tr><td class="paramname">name</td><td>A non-NULL string describing an input property</td></tr> 784c0abf9e6Sopenharmony_ci </table> 785c0abf9e6Sopenharmony_ci </dd> 786c0abf9e6Sopenharmony_ci</dl> 787c0abf9e6Sopenharmony_ci<dl class="section return"><dt>Returns</dt><dd>The given code constant for the name or -1 if not found. </dd></dl> 788c0abf9e6Sopenharmony_ci 789c0abf9e6Sopenharmony_ci</div> 790c0abf9e6Sopenharmony_ci</div> 791c0abf9e6Sopenharmony_ci<a id="gaaa0bc4c7d0d2aedc84c7dcffee9ce29b"></a> 792c0abf9e6Sopenharmony_ci<h2 class="memtitle"><span class="permalink"><a href="#gaaa0bc4c7d0d2aedc84c7dcffee9ce29b">◆ </a></span>libevdev_property_from_name_n()</h2> 793c0abf9e6Sopenharmony_ci 794c0abf9e6Sopenharmony_ci<div class="memitem"> 795c0abf9e6Sopenharmony_ci<div class="memproto"> 796c0abf9e6Sopenharmony_ci <table class="memname"> 797c0abf9e6Sopenharmony_ci <tr> 798c0abf9e6Sopenharmony_ci <td class="memname">int libevdev_property_from_name_n </td> 799c0abf9e6Sopenharmony_ci <td>(</td> 800c0abf9e6Sopenharmony_ci <td class="paramtype">const char * </td> 801c0abf9e6Sopenharmony_ci <td class="paramname"><em>name</em>, </td> 802c0abf9e6Sopenharmony_ci </tr> 803c0abf9e6Sopenharmony_ci <tr> 804c0abf9e6Sopenharmony_ci <td class="paramkey"></td> 805c0abf9e6Sopenharmony_ci <td></td> 806c0abf9e6Sopenharmony_ci <td class="paramtype">size_t </td> 807c0abf9e6Sopenharmony_ci <td class="paramname"><em>len</em> </td> 808c0abf9e6Sopenharmony_ci </tr> 809c0abf9e6Sopenharmony_ci <tr> 810c0abf9e6Sopenharmony_ci <td></td> 811c0abf9e6Sopenharmony_ci <td>)</td> 812c0abf9e6Sopenharmony_ci <td></td><td></td> 813c0abf9e6Sopenharmony_ci </tr> 814c0abf9e6Sopenharmony_ci </table> 815c0abf9e6Sopenharmony_ci</div><div class="memdoc"> 816c0abf9e6Sopenharmony_ci 817c0abf9e6Sopenharmony_ci<p>Look up an input property by its name. </p> 818c0abf9e6Sopenharmony_ci<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> 819c0abf9e6Sopenharmony_ci<dl class="params"><dt>Parameters</dt><dd> 820c0abf9e6Sopenharmony_ci <table class="params"> 821c0abf9e6Sopenharmony_ci <tr><td class="paramname">name</td><td>A non-NULL string describing an input property </td></tr> 822c0abf9e6Sopenharmony_ci <tr><td class="paramname">len</td><td>The length of the string in <code>name</code> excluding any terminating 0 character.</td></tr> 823c0abf9e6Sopenharmony_ci </table> 824c0abf9e6Sopenharmony_ci </dd> 825c0abf9e6Sopenharmony_ci</dl> 826c0abf9e6Sopenharmony_ci<dl class="section return"><dt>Returns</dt><dd>The given code constant for the name or -1 if not found. </dd></dl> 827c0abf9e6Sopenharmony_ci 828c0abf9e6Sopenharmony_ci</div> 829c0abf9e6Sopenharmony_ci</div> 830c0abf9e6Sopenharmony_ci<a id="gacc12bdb7b912070ac9c375428f2c9892"></a> 831c0abf9e6Sopenharmony_ci<h2 class="memtitle"><span class="permalink"><a href="#gacc12bdb7b912070ac9c375428f2c9892">◆ </a></span>libevdev_property_get_name()</h2> 832c0abf9e6Sopenharmony_ci 833c0abf9e6Sopenharmony_ci<div class="memitem"> 834c0abf9e6Sopenharmony_ci<div class="memproto"> 835c0abf9e6Sopenharmony_ci <table class="memname"> 836c0abf9e6Sopenharmony_ci <tr> 837c0abf9e6Sopenharmony_ci <td class="memname">const char* libevdev_property_get_name </td> 838c0abf9e6Sopenharmony_ci <td>(</td> 839c0abf9e6Sopenharmony_ci <td class="paramtype">unsigned int </td> 840c0abf9e6Sopenharmony_ci <td class="paramname"><em>prop</em></td><td>)</td> 841c0abf9e6Sopenharmony_ci <td></td> 842c0abf9e6Sopenharmony_ci </tr> 843c0abf9e6Sopenharmony_ci </table> 844c0abf9e6Sopenharmony_ci</div><div class="memdoc"> 845c0abf9e6Sopenharmony_ci<dl class="params"><dt>Parameters</dt><dd> 846c0abf9e6Sopenharmony_ci <table class="params"> 847c0abf9e6Sopenharmony_ci <tr><td class="paramname">prop</td><td>The input prop to return the name for (e.g. INPUT_PROP_BUTTONPAD)</td></tr> 848c0abf9e6Sopenharmony_ci </table> 849c0abf9e6Sopenharmony_ci </dd> 850c0abf9e6Sopenharmony_ci</dl> 851c0abf9e6Sopenharmony_ci<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> 852c0abf9e6Sopenharmony_ci<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> 853c0abf9e6Sopenharmony_ci<dd> 854c0abf9e6Sopenharmony_ciOn 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> 855c0abf9e6Sopenharmony_ci 856c0abf9e6Sopenharmony_ci</div> 857c0abf9e6Sopenharmony_ci</div> 858c0abf9e6Sopenharmony_ci</div><!-- contents --> 859c0abf9e6Sopenharmony_ci<!-- HTML footer for doxygen 1.8.8--> 860c0abf9e6Sopenharmony_ci<!-- start footer part --> 861c0abf9e6Sopenharmony_ci</div> 862c0abf9e6Sopenharmony_ci</div> 863c0abf9e6Sopenharmony_ci</div> 864c0abf9e6Sopenharmony_ci</div> 865c0abf9e6Sopenharmony_ci</div> 866c0abf9e6Sopenharmony_ci<hr class="footer"/><address class="footer"><small> 867c0abf9e6Sopenharmony_ciGenerated by  <a href="http://www.doxygen.org/index.html"> 868c0abf9e6Sopenharmony_ci<img class="footer" src="doxygen.png" alt="doxygen"/> 869c0abf9e6Sopenharmony_ci</a> 1.9.1 870c0abf9e6Sopenharmony_ci</small></address> 871c0abf9e6Sopenharmony_ci</body> 872c0abf9e6Sopenharmony_ci</html> 873