• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!-- HTML header for doxygen 1.8.8-->
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4    <head>
5        <meta http-equiv="X-UA-Compatible" content="IE=edge">
6        <!-- For Mobile Devices -->
7        <meta name="viewport" content="width=device-width, initial-scale=1">
8        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
9        <meta name="generator" content="Doxygen 1.8.20"/>
10        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
11        <title>libevdev: /home/whot/code/libevdev/release/libevdev/build.uQTRHZxVc0/libevdev/libevdev-uinput.h Source File</title>
12        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
13        <script type="text/javascript" src="dynsections.js"></script>
14        <link href="search/search.css" rel="stylesheet" type="text/css"/>
15<script type="text/javascript" src="search/searchdata.js"></script>
16<script type="text/javascript" src="search/search.js"></script>
17        <link href="doxygen.css" rel="stylesheet" type="text/css" />
18        <link href="bootstrap.css" rel="stylesheet" type="text/css"/>
19<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
20<link href="libevdevdoxygen.css" rel="stylesheet" type="text/css"/>
21        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
22        <script type="text/javascript" src="doxy-boot.js"></script>
23    </head>
24    <body>
25        <nav class="navbar navbar-default" role="navigation">
26            <div class="container">
27                <div class="navbar-header">
28                    <a class="navbar-brand">libevdev 1.10.0</a>
29                </div>
30            </div>
31        </nav>
32        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
33            <div class="content" id="content">
34                <div class="container">
35                    <div class="row">
36                        <div class="col-sm-12 panel panel-default" style="padding-bottom: 15px;">
37                            <div style="margin-bottom: 15px;">
38<!-- end header part -->
39<!-- Generated by Doxygen 1.8.20 -->
40<script type="text/javascript">
41/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
42var searchBox = new SearchBox("searchBox", "search",false,'Search');
43/* @license-end */
44</script>
45<script type="text/javascript" src="menudata.js"></script>
46<script type="text/javascript" src="menu.js"></script>
47<script type="text/javascript">
48/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
49$(function() {
50  initMenu('',true,false,'search.php','Search');
51  $(document).ready(function() { init_search(); });
52});
53/* @license-end */</script>
54<div id="main-nav"></div>
55<!-- window showing the filter options -->
56<div id="MSearchSelectWindow"
57     onmouseover="return searchBox.OnSearchSelectShow()"
58     onmouseout="return searchBox.OnSearchSelectHide()"
59     onkeydown="return searchBox.OnSearchSelectKey(event)">
60</div>
61
62<!-- iframe showing the search results (closed by default) -->
63<div id="MSearchResultsWindow">
64<iframe src="javascript:void(0)" frameborder="0"
65        name="MSearchResults" id="MSearchResults">
66</iframe>
67</div>
68
69<div id="nav-path" class="navpath">
70  <ul>
71<li class="navelem"><a class="el" href="dir_237a012ffe1a208b10d31c74b4ef545e.html">libevdev</a></li>  </ul>
72</div>
73</div><!-- top -->
74<div class="header">
75  <div class="headertitle">
76<div class="title">libevdev-uinput.h</div>  </div>
77</div><!--header-->
78<div class="contents">
79<a href="libevdev-uinput_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
80<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright © 2013 Red Hat, Inc.</span></div>
81<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div>
82<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Permission to use, copy, modify, distribute, and sell this software and its</span></div>
83<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * documentation for any purpose is hereby granted without fee, provided that</span></div>
84<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * the above copyright notice appear in all copies and that both that copyright</span></div>
85<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * notice and this permission notice appear in supporting documentation, and</span></div>
86<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * that the name of the copyright holders not be used in advertising or</span></div>
87<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * publicity pertaining to distribution of the software without specific,</span></div>
88<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * written prior permission.  The copyright holders make no representations</span></div>
89<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * about the suitability of this software for any purpose.  It is provided &quot;as</span></div>
90<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * is&quot; without express or implied warranty.</span></div>
91<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> *</span></div>
92<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,</span></div>
93<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO</span></div>
94<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR</span></div>
95<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,</span></div>
96<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER</span></div>
97<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE</span></div>
98<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * OF THIS SOFTWARE.</span></div>
99<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> */</span></div>
100<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160; </div>
101<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#ifndef LIBEVDEV_UINPUT_H</span></div>
102<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#define LIBEVDEV_UINPUT_H</span></div>
103<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160; </div>
104<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
105<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
106<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#endif</span></div>
107<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160; </div>
108<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="libevdev_8h.html">libevdev/libevdev.h</a>&gt;</span></div>
109<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160; </div>
110<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="keyword">struct </span>libevdev_uinput;</div>
111<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160; </div>
112<div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="libevdev-uinput_8h.html#a6546acd3e4fe75a74d91eebf9bbd3d03">  109</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="libevdev-uinput_8h.html#a6546acd3e4fe75a74d91eebf9bbd3d03">libevdev_uinput_open_mode</a> {</div>
113<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;        <span class="comment">/* intentionally -2 to avoid to avoid code like the below from accidentally working:</span></div>
114<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;<span class="comment">                fd = open(&quot;/dev/uinput&quot;, O_RDWR); // fails, fd is -1</span></div>
115<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;<span class="comment">                libevdev_uinput_create_from_device(dev, fd, &amp;uidev); // may hide the error */</span></div>
116<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        <a class="code" href="libevdev-uinput_8h.html#a6546acd3e4fe75a74d91eebf9bbd3d03adcf2d4de38844ee3a8c830bc3285afad">LIBEVDEV_UINPUT_OPEN_MANAGED</a> = -2  </div>
117<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="libevdev-uinput_8h.html#a6546acd3e4fe75a74d91eebf9bbd3d03adcf2d4de38844ee3a8c830bc3285afad">  114</a></span>&#160;};</div>
118<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160; </div>
119<div class="line"><a name="l00153"></a><span class="lineno"><a class="line" href="group__uinput.html#gaf14b21301bac9d79c20e890172873b96">  153</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="group__uinput.html#gaf14b21301bac9d79c20e890172873b96">libevdev_uinput_create_from_device</a>(<span class="keyword">const</span> <span class="keyword">struct</span> libevdev *dev,</div>
120<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;                                       <span class="keywordtype">int</span> uinput_fd,</div>
121<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;                                       <span class="keyword">struct</span> libevdev_uinput **uinput_dev);</div>
122<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160; </div>
123<div class="line"><a name="l00168"></a><span class="lineno"><a class="line" href="group__uinput.html#ga9dfa58a84eb4c6b97107dcf3fa621329">  168</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__uinput.html#ga9dfa58a84eb4c6b97107dcf3fa621329">libevdev_uinput_destroy</a>(<span class="keyword">struct</span> libevdev_uinput *uinput_dev);</div>
124<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160; </div>
125<div class="line"><a name="l00183"></a><span class="lineno"><a class="line" href="group__uinput.html#ga9cd7fb14a96d4cc14d3dffdcead84c5d">  183</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="group__uinput.html#ga9cd7fb14a96d4cc14d3dffdcead84c5d">libevdev_uinput_get_fd</a>(<span class="keyword">const</span> <span class="keyword">struct</span> libevdev_uinput *uinput_dev);</div>
126<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160; </div>
127<div class="line"><a name="l00209"></a><span class="lineno"><a class="line" href="group__uinput.html#gaacca93061fce57cec0ce3c52e443a427">  209</a></span>&#160;<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="group__uinput.html#gaacca93061fce57cec0ce3c52e443a427">libevdev_uinput_get_syspath</a>(<span class="keyword">struct</span> libevdev_uinput *uinput_dev);</div>
128<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160; </div>
129<div class="line"><a name="l00231"></a><span class="lineno"><a class="line" href="group__uinput.html#ga4c595bcda748b08561e2819fe9b7c2d2">  231</a></span>&#160;<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="group__uinput.html#ga4c595bcda748b08561e2819fe9b7c2d2">libevdev_uinput_get_devnode</a>(<span class="keyword">struct</span> libevdev_uinput *uinput_dev);</div>
130<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160; </div>
131<div class="line"><a name="l00247"></a><span class="lineno"><a class="line" href="group__uinput.html#ga4c3c2f5fcd315a28a067f53b9f855fe7">  247</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="group__uinput.html#ga4c3c2f5fcd315a28a067f53b9f855fe7">libevdev_uinput_write_event</a>(<span class="keyword">const</span> <span class="keyword">struct</span> libevdev_uinput *uinput_dev,</div>
132<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;                                <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> type,</div>
133<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;                                <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> code,</div>
134<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;                                <span class="keywordtype">int</span> value);</div>
135<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
136<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;}</div>
137<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;<span class="preprocessor">#endif</span></div>
138<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160; </div>
139<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* LIBEVDEV_UINPUT_H */</span><span class="preprocessor"></span></div>
140</div><!-- fragment --></div><!-- contents -->
141<div class="ttc" id="alibevdev_8h_html"><div class="ttname"><a href="libevdev_8h.html">libevdev.h</a></div></div>
142<div class="ttc" id="agroup__uinput_html_ga4c595bcda748b08561e2819fe9b7c2d2"><div class="ttname"><a href="group__uinput.html#ga4c595bcda748b08561e2819fe9b7c2d2">libevdev_uinput_get_devnode</a></div><div class="ttdeci">const char * libevdev_uinput_get_devnode(struct libevdev_uinput *uinput_dev)</div><div class="ttdoc">Return the device node representing this uinput device.</div></div>
143<div class="ttc" id="agroup__uinput_html_gaf14b21301bac9d79c20e890172873b96"><div class="ttname"><a href="group__uinput.html#gaf14b21301bac9d79c20e890172873b96">libevdev_uinput_create_from_device</a></div><div class="ttdeci">int libevdev_uinput_create_from_device(const struct libevdev *dev, int uinput_fd, struct libevdev_uinput **uinput_dev)</div><div class="ttdoc">Create a uinput device based on the given libevdev device.</div></div>
144<div class="ttc" id="alibevdev-uinput_8h_html_a6546acd3e4fe75a74d91eebf9bbd3d03adcf2d4de38844ee3a8c830bc3285afad"><div class="ttname"><a href="libevdev-uinput_8h.html#a6546acd3e4fe75a74d91eebf9bbd3d03adcf2d4de38844ee3a8c830bc3285afad">LIBEVDEV_UINPUT_OPEN_MANAGED</a></div><div class="ttdeci">@ LIBEVDEV_UINPUT_OPEN_MANAGED</div><div class="ttdoc">let libevdev open and close /dev/uinput</div><div class="ttdef"><b>Definition:</b> libevdev-uinput.h:113</div></div>
145<div class="ttc" id="agroup__uinput_html_gaacca93061fce57cec0ce3c52e443a427"><div class="ttname"><a href="group__uinput.html#gaacca93061fce57cec0ce3c52e443a427">libevdev_uinput_get_syspath</a></div><div class="ttdeci">const char * libevdev_uinput_get_syspath(struct libevdev_uinput *uinput_dev)</div><div class="ttdoc">Return the syspath representing this uinput device.</div></div>
146<div class="ttc" id="agroup__uinput_html_ga9dfa58a84eb4c6b97107dcf3fa621329"><div class="ttname"><a href="group__uinput.html#ga9dfa58a84eb4c6b97107dcf3fa621329">libevdev_uinput_destroy</a></div><div class="ttdeci">void libevdev_uinput_destroy(struct libevdev_uinput *uinput_dev)</div><div class="ttdoc">Destroy a previously created uinput device and free associated memory.</div></div>
147<div class="ttc" id="alibevdev-uinput_8h_html_a6546acd3e4fe75a74d91eebf9bbd3d03"><div class="ttname"><a href="libevdev-uinput_8h.html#a6546acd3e4fe75a74d91eebf9bbd3d03">libevdev_uinput_open_mode</a></div><div class="ttdeci">libevdev_uinput_open_mode</div><div class="ttdef"><b>Definition:</b> libevdev-uinput.h:109</div></div>
148<div class="ttc" id="agroup__uinput_html_ga9cd7fb14a96d4cc14d3dffdcead84c5d"><div class="ttname"><a href="group__uinput.html#ga9cd7fb14a96d4cc14d3dffdcead84c5d">libevdev_uinput_get_fd</a></div><div class="ttdeci">int libevdev_uinput_get_fd(const struct libevdev_uinput *uinput_dev)</div><div class="ttdoc">Return the file descriptor used to create this uinput device.</div></div>
149<div class="ttc" id="agroup__uinput_html_ga4c3c2f5fcd315a28a067f53b9f855fe7"><div class="ttname"><a href="group__uinput.html#ga4c3c2f5fcd315a28a067f53b9f855fe7">libevdev_uinput_write_event</a></div><div class="ttdeci">int libevdev_uinput_write_event(const struct libevdev_uinput *uinput_dev, unsigned int type, unsigned int code, int value)</div><div class="ttdoc">Post an event through the uinput device.</div></div>
150<!-- HTML footer for doxygen 1.8.8-->
151<!-- start footer part -->
152</div>
153</div>
154</div>
155</div>
156</div>
157<hr class="footer"/><address class="footer"><small>
158Generated by &#160;<a href="http://www.doxygen.org/index.html">
159<img class="footer" src="doxygen.png" alt="doxygen"/>
160</a> 1.8.20
161</small></address>
162</body>
163</html>
164