ewol/_input_manager_8hpp_source.html
2016-10-23 21:18:24 +02:00

163 lines
25 KiB
HTML

<!-- HTML header for doxygen 1.8.8-->
<!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="X-UA-Compatible" content="IE=edge">
<!-- For Mobile Devices -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<title>Ewol: Ewol Widget in OpenGl: framework/atria-soft/ewol/ewol/context/InputManager.hpp Source File</title>
<!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
<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="customdoxygen.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
<script type="text/javascript" src="doxy-boot.js"></script>
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand">Ewol: Ewol Widget in OpenGl 0.10.0</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="index.html">Main&nbsp;Page</a></li>
<li><a href="pages.html">Related&nbsp;Pages</a></li>
<li><a href="namespaces.html">Namespaces</a></li>
<li><a href="annotated.html">Classes</a></li>
<li><a href="files.html">Files</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
Link-libs<span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li><a href="http://HeeroYui.github.io/lutin">lutin</a></li>
<li><a href="http://atria-soft.github.io/ewol">ewol</a></li>
<li><a href="http://atria-soft.github.io/etk">etk</a></li>
<li><a href="http://atria-soft.github.io/ejson">ejson</a></li>
<li><a href="http://atria-soft.github.io/exml">exml</a></li>
<li><a href="http://atria-soft.github.io/esvg">esvg</a></li>
<li><a href="http://atria-soft.github.io/egami">egami</a></li>
<li><a href="http://atria-soft.github.io/gale">gale</a></li>
<li><a href="http://atria-soft.github.io/ege">ege</a></li>
<li><a href="http://atria-soft.github.io/elog">elog</a></li>
<li><a href="http://atria-soft.github.io/ememory">ememory</a></li>
<li><a href="http://atria-soft.github.io/enet">enet</a></li>
<li><a href="http://atria-soft.github.io/eproperty">eproperty</a></li>
<li><a href="http://atria-soft.github.io/esignal">esignal</a></li>
<li><a href="http://atria-soft.github.io/zeus">zeus</a></li>
<li><a href="http://atria-soft.github.io/audio-ess">audio-ess</a></li>
<li><a href="http://musicdsp.github.io/audio">audio</a></li>
<li><a href="http://musicdsp.github.io/audio-drain">audio-drain</a></li>
<li><a href="http://musicdsp.github.io/audio-orchestra">audio-orchestra</a></li>
<li><a href="http://musicdsp.github.io/audio-river">audio-river</a></li>
</ul>
</li>
</ul>
<div id="search-box" class="input-group">
<div class="input-group-btn">
<button aria-expanded="false" type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<span class="glyphicon glyphicon-search"></span>
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="#">All</a></li>
<li><a href="#">Classes</a></li>
<li><a href="#">Namespaces</a></li>
<li><a href="#">Files</a></li>
<li><a href="#">Functions</a></li>
<li><a href="#">Variables</a></li>
<li><a href="#">Typedefs</a></li>
<li><a href="#">Enumerations</a></li>
<li><a href="#">Enumerator</a></li>
<li><a href="#">Friends</a></li>
<li><a href="#">Macros</a></li>
<li><a href="#">Pages</a></li>
</ul>
</div>
<button id="search-close" type="button" class="close" aria-label="Close">
<span aria-hidden="true"></span>
</button>
<input id="search-field" class="form-control" accesskey="S" onkeydown="searchBox.OnSearchFieldChange(event);" placeholder="Search ..." type="text">
</div>
</div><!--/.nav-collapse -->
</div>
</nav>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div class="content" id="content">
<div class="container">
<div class="row">
<div class="col-sm-12 panel panel-default" style="padding-bottom: 15px;">
<div style="margin-bottom: 15px;">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<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>
<!-- 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 id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_644e041c3a6521da7b27eba0e4eb2b95.html">framework</a></li><li class="navelem"><a class="el" href="dir_a094892b17be858f66bf3446bbb755c7.html">atria-soft</a></li><li class="navelem"><a class="el" href="dir_90b06c1c445cb1731bd6346c36eb6f0c.html">ewol</a></li><li class="navelem"><a class="el" href="dir_b91da374a1ab60ee2d83a750c3a335b8.html">ewol</a></li><li class="navelem"><a class="el" href="dir_e40f6829cd26b601ee29fb1f3c38644c.html">context</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">InputManager.hpp</div> </div>
</div><!--header-->
<div class="contents">
<a href="_input_manager_8hpp.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;</div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="_widget_8hpp.html">ewol/widget/Widget.hpp</a>&gt;</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="preprocessor">#define MAX_MANAGE_INPUT (15)</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;</div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceewol.html">ewol</a> {</div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160; <span class="keyword">namespace </span>context {</div><div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="classewol_1_1context_1_1_input_poperty.html"> 17</a></span>&#160; <span class="keyword">class </span><a class="code" href="classewol_1_1context_1_1_input_poperty.html">InputPoperty</a> {</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160; <span class="keywordtype">bool</span> isUsed;</div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160; int32_t destinationInputId;</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160; echrono::Clock lastTimeEvent;</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160; <a class="codeRef" doxygen="/home/heero/dev/perso/out/doc/release/ememory.tag:http://atria-soft.github.io/ememory/" href="http://atria-soft.github.io/ememory/classememory_1_1_weak_ptr.html">ewol::WidgetWeak</a> curentWidgetEvent;</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160; <a class="codeRef" doxygen="/home/heero/dev/perso/out/doc/release/etk.tag:http://atria-soft.github.io/etk/" href="http://atria-soft.github.io/etk/classetk_1_1_vector2_d.html">vec2</a> origin;</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160; <a class="codeRef" doxygen="/home/heero/dev/perso/out/doc/release/etk.tag:http://atria-soft.github.io/etk/" href="http://atria-soft.github.io/etk/classetk_1_1_vector2_d.html">vec2</a> size;</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160; <a class="codeRef" doxygen="/home/heero/dev/perso/out/doc/release/etk.tag:http://atria-soft.github.io/etk/" href="http://atria-soft.github.io/etk/classetk_1_1_vector2_d.html">vec2</a> downStart;</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160; <a class="codeRef" doxygen="/home/heero/dev/perso/out/doc/release/etk.tag:http://atria-soft.github.io/etk/" href="http://atria-soft.github.io/etk/classetk_1_1_vector2_d.html">vec2</a> posEvent;</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160; <span class="keywordtype">bool</span> isDown;</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160; <span class="keywordtype">bool</span> isInside;</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160; int32_t nbClickEvent; <span class="comment">// 0 .. 1 .. 2 .. 3</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160; };</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160; </div><div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="classewol_1_1context_1_1_input_limit.html"> 36</a></span>&#160; <span class="keyword">class </span><a class="code" href="classewol_1_1context_1_1_input_limit.html">InputLimit</a> {</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; echrono::Duration sepatateTime;</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; int32_t DpiOffset;</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; };</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; <span class="keyword">class </span><a class="code" href="classewol_1_1_context.html">Context</a>;</div><div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="classewol_1_1context_1_1_input_manager.html"> 42</a></span>&#160; <span class="keyword">class </span><a class="code" href="classewol_1_1context_1_1_input_manager.html">InputManager</a>{</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; <span class="comment">// special grab pointer mode : </span></div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; <span class="keyword">private</span>:</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; <a class="codeRef" doxygen="/home/heero/dev/perso/out/doc/release/ememory.tag:http://atria-soft.github.io/ememory/" href="http://atria-soft.github.io/ememory/classememory_1_1_weak_ptr.html">ewol::WidgetWeak</a> m_grabWidget; </div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; <span class="keyword">private</span>:</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; int32_t m_dpi;</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; <a class="code" href="classewol_1_1context_1_1_input_limit.html">InputLimit</a> m_eventInputLimit;</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; <a class="code" href="classewol_1_1context_1_1_input_limit.html">InputLimit</a> m_eventMouseLimit;</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; <span class="keywordtype">void</span> calculateLimit();</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; <a class="code" href="classewol_1_1context_1_1_input_poperty.html">InputPoperty</a> m_eventInputSaved[MAX_MANAGE_INPUT];</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; <a class="code" href="classewol_1_1context_1_1_input_poperty.html">InputPoperty</a> m_eventMouseSaved[MAX_MANAGE_INPUT];</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <span class="keywordtype">void</span> abortElement(<a class="code" href="classewol_1_1context_1_1_input_poperty.html">InputPoperty</a>* _eventTable, int32_t _idInput, <span class="keyword">enum</span> gale::key::type _type);</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; <span class="keywordtype">void</span> cleanElement(<a class="code" href="classewol_1_1context_1_1_input_poperty.html">InputPoperty</a>* _eventTable, int32_t _idInput);</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; <span class="keywordtype">bool</span> localEventInput(<span class="keyword">enum</span> gale::key::type _type,</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; <a class="codeRef" doxygen="/home/heero/dev/perso/out/doc/release/ememory.tag:http://atria-soft.github.io/ememory/" href="http://atria-soft.github.io/ememory/classememory_1_1_shared_ptr.html">ewol::WidgetShared</a> _destWidget,</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; int32_t _IdInput,</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; <span class="keyword">enum</span> gale::key::status _typeEvent,</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; <a class="codeRef" doxygen="/home/heero/dev/perso/out/doc/release/etk.tag:http://atria-soft.github.io/etk/" href="http://atria-soft.github.io/etk/classetk_1_1_vector2_d.html">vec2</a> _pos);</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; int32_t localGetDestinationId(<span class="keyword">enum</span> gale::key::type _type,</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; <a class="codeRef" doxygen="/home/heero/dev/perso/out/doc/release/ememory.tag:http://atria-soft.github.io/ememory/" href="http://atria-soft.github.io/ememory/classememory_1_1_shared_ptr.html">ewol::WidgetShared</a> _destWidget,</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; int32_t _realInputId);</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <span class="keyword">private</span>:</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; <a class="code" href="classewol_1_1_context.html">ewol::Context</a>&amp; m_context;</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; <a class="code" href="classewol_1_1context_1_1_input_manager.html">InputManager</a>(<a class="code" href="classewol_1_1_context.html">ewol::Context</a>&amp; _context);</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; ~<a class="code" href="classewol_1_1context_1_1_input_manager.html">InputManager</a>();</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; <span class="keywordtype">void</span> setDpi(int32_t _newDPI);</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; </div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <span class="comment">// note if id&lt;0 == &gt; the it was finger event ...</span></div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <span class="keywordtype">void</span> motion(<span class="keyword">enum</span> gale::key::type _type, <span class="keywordtype">int</span> _pointerID, <a class="codeRef" doxygen="/home/heero/dev/perso/out/doc/release/etk.tag:http://atria-soft.github.io/etk/" href="http://atria-soft.github.io/etk/classetk_1_1_vector2_d.html">vec2</a> _pos );</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; <span class="keywordtype">void</span> state(<span class="keyword">enum</span> gale::key::type _type, <span class="keywordtype">int</span> _pointerID, <span class="keywordtype">bool</span> _isDown, <a class="codeRef" doxygen="/home/heero/dev/perso/out/doc/release/etk.tag:http://atria-soft.github.io/etk/" href="http://atria-soft.github.io/etk/classetk_1_1_vector2_d.html">vec2</a> _pos);</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; <span class="keywordtype">void</span> newLayerSet();</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; <span class="keywordtype">void</span> transfertEvent(<a class="codeRef" doxygen="/home/heero/dev/perso/out/doc/release/ememory.tag:http://atria-soft.github.io/ememory/" href="http://atria-soft.github.io/ememory/classememory_1_1_shared_ptr.html">ewol::WidgetShared</a> _source, <a class="codeRef" doxygen="/home/heero/dev/perso/out/doc/release/ememory.tag:http://atria-soft.github.io/ememory/" href="http://atria-soft.github.io/ememory/classememory_1_1_shared_ptr.html">ewol::WidgetShared</a> _destination);</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; <span class="keywordtype">void</span> grabPointer(<a class="codeRef" doxygen="/home/heero/dev/perso/out/doc/release/ememory.tag:http://atria-soft.github.io/ememory/" href="http://atria-soft.github.io/ememory/classememory_1_1_shared_ptr.html">ewol::WidgetShared</a> _widget);</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; <span class="keywordtype">void</span> unGrabPointer();</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; <span class="keyword">private</span>:</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; gale::key::Special m_specialKey;</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; <span class="keywordtype">void</span> setLastKeyboardSpecial(<span class="keyword">const</span> gale::key::Special&amp; _specialKey) {</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; m_specialKey = _specialKey;</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; }</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; };</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; };</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160;};</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160;</div><div class="ttc" id="classememory_1_1_weak_ptr_html"><div class="ttname"><a href="http://atria-soft.github.io/ememory/classememory_1_1_weak_ptr.html">ememory::WeakPtr&lt; ewol::Widget &gt;</a></div></div>
<div class="ttc" id="classewol_1_1context_1_1_input_manager_html"><div class="ttname"><a href="classewol_1_1context_1_1_input_manager.html">ewol::context::InputManager</a></div><div class="ttdef"><b>Definition:</b> InputManager.hpp:42</div></div>
<div class="ttc" id="classewol_1_1context_1_1_input_limit_html"><div class="ttname"><a href="classewol_1_1context_1_1_input_limit.html">ewol::context::InputLimit</a></div><div class="ttdoc">internal structure </div><div class="ttdef"><b>Definition:</b> InputManager.hpp:36</div></div>
<div class="ttc" id="_widget_8hpp_html"><div class="ttname"><a href="_widget_8hpp.html">Widget.hpp</a></div></div>
<div class="ttc" id="classewol_1_1context_1_1_input_poperty_html"><div class="ttname"><a href="classewol_1_1context_1_1_input_poperty.html">ewol::context::InputPoperty</a></div><div class="ttdoc">internal structure </div><div class="ttdef"><b>Definition:</b> InputManager.hpp:17</div></div>
<div class="ttc" id="namespaceewol_html"><div class="ttname"><a href="namespaceewol.html">ewol</a></div><div class="ttdef"><b>Definition:</b> Area.hpp:16</div></div>
<div class="ttc" id="classetk_1_1_vector2_d_html"><div class="ttname"><a href="http://atria-soft.github.io/etk/classetk_1_1_vector2_d.html">etk::Vector2D&lt; float &gt;</a></div></div>
<div class="ttc" id="classememory_1_1_shared_ptr_html"><div class="ttname"><a href="http://atria-soft.github.io/ememory/classememory_1_1_shared_ptr.html">ememory::SharedPtr&lt; ewol::Widget &gt;</a></div></div>
<div class="ttc" id="classewol_1_1_context_html"><div class="ttname"><a href="classewol_1_1_context.html">ewol::Context</a></div><div class="ttdef"><b>Definition:</b> Context.hpp:26</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>
Generated on Mon Oct 24 2016 14:06:03 for Ewol: Ewol Widget in OpenGl by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.12
</small></address>
</body>
</html>