mirror of
https://github.com/bspeice/libcvautomation
synced 2025-01-09 15:30:05 -05:00
146 lines
16 KiB
HTML
146 lines
16 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
|
<title>libcvautomation: libcvautomation-xtest.h Source File</title>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
|
</head><body>
|
|
<!-- Generated by Doxygen 1.4.7 -->
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="annotated.html"><span>Classes</span></a></li>
|
|
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
|
<li><a href="pages.html"><span>Related Pages</span></a></li>
|
|
<li>
|
|
<form action="search.php" method="get">
|
|
<table cellspacing="0" cellpadding="0" border="0">
|
|
<tr>
|
|
<td><label> <u>S</u>earch for </label></td>
|
|
<td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
</li>
|
|
</ul></div>
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="files.html"><span>File List</span></a></li>
|
|
<li><a href="globals.html"><span>File Members</span></a></li>
|
|
</ul></div>
|
|
<h1>libcvautomation-xtest.h</h1><a href="libcvautomation-xtest_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
|
|
<a name="l00002"></a>00002 <span class="comment"> * =====================================================================================</span>
|
|
<a name="l00003"></a>00003 <span class="comment"> *</span>
|
|
<a name="l00004"></a>00004 <span class="comment"> * Filename: libcvautomation-xinput.h</span>
|
|
<a name="l00005"></a>00005 <span class="comment"> *</span>
|
|
<a name="l00006"></a>00006 <span class="comment"> * Description: </span>
|
|
<a name="l00007"></a>00007 <span class="comment"> *</span>
|
|
<a name="l00008"></a>00008 <span class="comment"> * Created: 06/26/2012 09:08:41 AM</span>
|
|
<a name="l00009"></a>00009 <span class="comment"> * Revision: none</span>
|
|
<a name="l00010"></a>00010 <span class="comment"> * Compiler: gcc</span>
|
|
<a name="l00011"></a>00011 <span class="comment"> *</span>
|
|
<a name="l00012"></a>00012 <span class="comment"> * Author: Bradlee Speice (), bspeice.nc@gmail.com</span>
|
|
<a name="l00013"></a>00013 <span class="comment"> * Organization: </span>
|
|
<a name="l00014"></a>00014 <span class="comment"> *</span>
|
|
<a name="l00015"></a>00015 <span class="comment"> * =====================================================================================</span>
|
|
<a name="l00016"></a>00016 <span class="comment"> */</span>
|
|
<a name="l00017"></a>00017
|
|
<a name="l00018"></a>00018 <span class="preprocessor">#ifndef LIBCVAUTOMATION_XTEST_H</span>
|
|
<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#define LIBCVAUTOMATION_XTEST_H</span>
|
|
<a name="l00020"></a>00020 <span class="preprocessor"></span>
|
|
<a name="l00021"></a>00021 <span class="preprocessor">#include <<a class="code" href="libcvautomation_8h.html">libcvautomation/libcvautomation.h</a>></span>
|
|
<a name="l00022"></a>00022
|
|
<a name="l00023"></a>00023 <span class="preprocessor">#define IS_CMD( x, y ) strncmp( x, y, strlen( y ) ) == 0</span>
|
|
<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define COMMAND_STR_LEN 512</span>
|
|
<a name="l00025"></a>00025 <span class="preprocessor"></span>
|
|
<a name="l00026"></a>00026 <span class="comment">/* Make sure that the XTest extension is supported.</span>
|
|
<a name="l00027"></a>00027 <span class="comment"> * If it's not, return 0 (false) */</span>
|
|
<a name="l00028"></a>00028 Bool <a class="code" href="libcvautomation-xtest_8h.html#d054a30613fdebf388218ce7c7ba8eaa">xte_XTestSupported</a> ( Display *displayLocation );
|
|
<a name="l00029"></a>00029
|
|
<a name="l00030"></a>00030 <span class="comment">/* Get the current location of the pointer */</span>
|
|
<a name="l00031"></a>00031 <a class="code" href="structcvaPoint.html">cvaPoint</a> <a class="code" href="libcvautomation-xtest_8h.html#6b2aaf7275e7671691ff9e09d3365bdb">xte_pointerLocation</a> ( Display *displayLocation );
|
|
<a name="l00032"></a>00032
|
|
<a name="l00033"></a>00033 <span class="comment">/* Click the mouse where it is currently at */</span>
|
|
<a name="l00034"></a>00034 <span class="keywordtype">void</span> <a class="code" href="libcvautomation-xtest_8h.html#e795b36e13508632ae69e9141dbd9b71">xte_clickMouse</a> ( Display *displayLocation, <span class="keywordtype">int</span> mouseButton );
|
|
<a name="l00035"></a>00035
|
|
<a name="l00036"></a>00036 <span class="comment">/* Click the mouse on an absolute screen location */</span>
|
|
<a name="l00037"></a>00037 <span class="keywordtype">void</span> <a class="code" href="libcvautomation-xtest_8h.html#88f51bec45b626f4bf2f1eaf0eb2b570">xte_clickMouseXY</a> ( Display *displayLocation, <span class="keywordtype">int</span> xLocation, <span class="keywordtype">int</span> yLocation, <span class="keywordtype">int</span> mouseButton );
|
|
<a name="l00038"></a>00038
|
|
<a name="l00039"></a>00039 <span class="comment">/* Click the mouse on a screen location relative to where it currently is */</span>
|
|
<a name="l00040"></a>00040 <span class="keywordtype">void</span> <a class="code" href="libcvautomation-xtest_8h.html#94f3c779c24b95d5fb743787a507d49e">xte_clickMouseRXY</a> ( Display *displayLocation, <span class="keywordtype">int</span> xIncrement, <span class="keywordtype">int</span> yIncrement, <span class="keywordtype">int</span> mouseButton );
|
|
<a name="l00041"></a>00041
|
|
<a name="l00042"></a>00042 <span class="comment">/* Click the mouse at the top-left corner of an image on the specified display */</span>
|
|
<a name="l00043"></a>00043 <a class="code" href="structcvaPoint.html">cvaPoint</a> <a class="code" href="libcvautomation-xtest_8h.html#42e82ace64c71fb6cf247ac16ee95da1">xte_clickMouseImage</a> ( Display *displayLocation, IplImage *subImage, <span class="keywordtype">int</span> mouseButton, <span class="keywordtype">int</span> searchMethod, <span class="keywordtype">int</span> tolerance );
|
|
<a name="l00044"></a>00044
|
|
<a name="l00045"></a>00045 <span class="comment">/* Click the mouse at the top-left corner of an image on the specified display</span>
|
|
<a name="l00046"></a>00046 <span class="comment"> * where the subImage is a file location */</span>
|
|
<a name="l00047"></a>00047 <a class="code" href="structcvaPoint.html">cvaPoint</a> <a class="code" href="libcvautomation-xtest_8h.html#db6d976b6b4849a295e02aac2567fa86">xte_clickMouseImage_location</a> ( Display *displayLocation, <span class="keyword">const</span> <span class="keywordtype">char</span> *fileName, <span class="keywordtype">int</span> mouseButton, <span class="keywordtype">int</span> searchMethod, <span class="keywordtype">int</span> tolerance );
|
|
<a name="l00048"></a>00048
|
|
<a name="l00049"></a>00049 <span class="comment">/* Click the mouse at the center of an image on the specified display */</span>
|
|
<a name="l00050"></a>00050 <a class="code" href="structcvaPoint.html">cvaPoint</a> <a class="code" href="libcvautomation-xtest_8h.html#a8f71206992c631e8e2827424b3d6090">xte_clickMouseImage_center</a> ( Display *displayLocation, IplImage *subImage, <span class="keywordtype">int</span> mouseButton, <span class="keywordtype">int</span> searchMethod, <span class="keywordtype">int</span> tolerance );
|
|
<a name="l00051"></a>00051
|
|
<a name="l00052"></a>00052 <span class="comment">/* Click the mouse at the center of an image on the specified display</span>
|
|
<a name="l00053"></a>00053 <span class="comment"> * where the subImage is a file location */</span>
|
|
<a name="l00054"></a>00054 <a class="code" href="structcvaPoint.html">cvaPoint</a> <a class="code" href="libcvautomation-xtest_8h.html#25b98d2e0780ae8f8afc152e620ceaaf">xte_clickMouseImage_location_center</a> ( Display *displayLocation, <span class="keyword">const</span> <span class="keywordtype">char</span> *fileName, <span class="keywordtype">int</span> mouseButton, <span class="keywordtype">int</span> searchMethod, <span class="keywordtype">int</span> tolerance );
|
|
<a name="l00055"></a>00055
|
|
<a name="l00056"></a>00056 <span class="comment">/* Move the mouse to a location and leave it there */</span>
|
|
<a name="l00057"></a>00057 <span class="keywordtype">void</span> <a class="code" href="libcvautomation-xtest_8h.html#dcc93e8aa9a0fd445c3c1971e35e194b">xte_hoverMouseXY</a> ( Display *displayLocation, <span class="keywordtype">int</span> xLocation, <span class="keywordtype">int</span> yLocation );
|
|
<a name="l00058"></a>00058
|
|
<a name="l00059"></a>00059 <span class="comment">/* Move the mouse to a location relative to where it currently is and leave it there */</span>
|
|
<a name="l00060"></a>00060 <span class="keywordtype">void</span> <a class="code" href="libcvautomation-xtest_8h.html#8bb400fb20f4416f6f93465935a76be2">xte_hoverMouseRXY</a> ( Display *displayLocation, <span class="keywordtype">int</span> xIncrement, <span class="keywordtype">int</span> yIncrement );
|
|
<a name="l00061"></a>00061
|
|
<a name="l00062"></a>00062 <span class="comment">/* Move the mouse to a location at the top-left corner of an image on the specified display</span>
|
|
<a name="l00063"></a>00063 <span class="comment"> * but don't click the mouse */</span>
|
|
<a name="l00064"></a>00064 <a class="code" href="structcvaPoint.html">cvaPoint</a> <a class="code" href="libcvautomation-xtest_8h.html#8827d93f5299e4aa99acc7c2c1d398c4">xte_hoverMouseImage</a> ( Display *displayLocation, IplImage *subImage, <span class="keywordtype">int</span> searchMethod, <span class="keywordtype">int</span> tolerance );
|
|
<a name="l00065"></a>00065
|
|
<a name="l00066"></a>00066 <span class="comment">/* Move the mouse to a location at the top-left corner of an image from file on the specified display</span>
|
|
<a name="l00067"></a>00067 <span class="comment"> * but don't click the mouse */</span>
|
|
<a name="l00068"></a>00068 <a class="code" href="structcvaPoint.html">cvaPoint</a> <a class="code" href="libcvautomation-xtest_8h.html#217328d995073752cd182098f18b3397">xte_hoverMouseImage_location</a> ( Display *displayLocation, <span class="keyword">const</span> <span class="keywordtype">char</span> *filename, <span class="keywordtype">int</span> searchMethod, <span class="keywordtype">int</span> tolerance );
|
|
<a name="l00069"></a>00069
|
|
<a name="l00070"></a>00070 <span class="comment">/* Move the mouse to a location at the center of an image on the specified display</span>
|
|
<a name="l00071"></a>00071 <span class="comment"> * but don't click the mouse */</span>
|
|
<a name="l00072"></a>00072 <a class="code" href="structcvaPoint.html">cvaPoint</a> <a class="code" href="libcvautomation-xtest_8h.html#9e8b30c7b59467dba853e467153123db">xte_hoverMouseImage_center</a> ( Display *displayLocation, IplImage *subImage, <span class="keywordtype">int</span> searchMethod, <span class="keywordtype">int</span> tolerance );
|
|
<a name="l00073"></a>00073
|
|
<a name="l00074"></a>00074 <span class="comment">/* Move the mouse to a location at the center of an image from file on the specified display</span>
|
|
<a name="l00075"></a>00075 <span class="comment"> * but don't click the mouse */</span>
|
|
<a name="l00076"></a>00076 <a class="code" href="structcvaPoint.html">cvaPoint</a> <a class="code" href="libcvautomation-xtest_8h.html#2b16677d20493c1c4f96c6e43b3fc0b7">xte_hoverMouseImage_location_center</a> ( Display *displayLocation, <span class="keyword">const</span> <span class="keywordtype">char</span> *fileName, <span class="keywordtype">int</span> searchMethod, <span class="keywordtype">int</span> tolerance );
|
|
<a name="l00077"></a>00077
|
|
<a name="l00078"></a>00078 <span class="comment">/* Push a mouse button down, but don't release it */</span>
|
|
<a name="l00079"></a>00079 <span class="keywordtype">void</span> <a class="code" href="libcvautomation-xtest_8h.html#09ef864a45f24c7f682c96368a62be4d">xte_mouseDown</a> ( Display *displayLocation, <span class="keywordtype">int</span> mouseButton );
|
|
<a name="l00080"></a>00080
|
|
<a name="l00081"></a>00081 <span class="comment">/* Let a mouse button up */</span>
|
|
<a name="l00082"></a>00082 <span class="keywordtype">void</span> <a class="code" href="libcvautomation-xtest_8h.html#68a7da112f124b61799162923657116a">xte_mouseUp</a> ( Display *displayLocation, <span class="keywordtype">int</span> mouseButton );
|
|
<a name="l00083"></a>00083
|
|
<a name="l00084"></a>00084 <span class="comment">/* Move the mouse a little bit */</span>
|
|
<a name="l00085"></a>00085 <span class="keywordtype">void</span> <a class="code" href="libcvautomation-xtest_8h.html#2431de2ae4b296a9a91da6e20250a67b">xte_mouseJiggle</a> ( Display *displayLocation );
|
|
<a name="l00086"></a>00086
|
|
<a name="l00087"></a>00087 <span class="comment">/* Scroll the mouse up */</span>
|
|
<a name="l00088"></a>00088 <span class="keywordtype">void</span> xte_mouseScrollUp ( Display *displayLocation );
|
|
<a name="l00089"></a>00089
|
|
<a name="l00090"></a>00090 <span class="comment">/* Scroll the mouse down */</span>
|
|
<a name="l00091"></a>00091 <span class="keywordtype">void</span> xte_mouseScrollDown ( Display *displayLocation );
|
|
<a name="l00092"></a>00092
|
|
<a name="l00093"></a>00093 <span class="comment">/* Press and release a key </span>
|
|
<a name="l00094"></a>00094 <span class="comment"> * Note that we use a string for *key, since keys like "space" are still valid. */</span>
|
|
<a name="l00095"></a>00095 <span class="keywordtype">void</span> <a class="code" href="libcvautomation-xtest_8h.html#5ce1dbeb65bba1613e4e6619857b1746">xte_clickKey</a> ( Display *displayLocation, <span class="keywordtype">char</span> *key );
|
|
<a name="l00096"></a>00096
|
|
<a name="l00097"></a>00097 <span class="comment">/* Press and release keys in a string */</span>
|
|
<a name="l00098"></a>00098 <span class="keywordtype">void</span> <a class="code" href="libcvautomation-xtest_8h.html#b327a24f45f673a4aeab6dfb7b9e411a">xte_clickKeyStr</a> ( Display *displayLocation, <span class="keywordtype">char</span> *string );
|
|
<a name="l00099"></a>00099
|
|
<a name="l00100"></a>00100 <span class="comment">/* Press a key down */</span>
|
|
<a name="l00101"></a>00101 <span class="keywordtype">void</span> <a class="code" href="libcvautomation-xtest_8h.html#04ded64c2bd31804cc109502530890c0">xte_keyDown</a> ( Display *displayLocation, <span class="keywordtype">char</span> *key );
|
|
<a name="l00102"></a>00102
|
|
<a name="l00103"></a>00103 <span class="comment">/* Release a key */</span>
|
|
<a name="l00104"></a>00104 <span class="keywordtype">void</span> <a class="code" href="libcvautomation-xtest_8h.html#574402ddf94858b340254a4e444fa404">xte_keyUp</a> ( Display *displayLocation, <span class="keywordtype">char</span> *key );
|
|
<a name="l00105"></a>00105
|
|
<a name="l00106"></a>00106 <span class="comment">/* Use one of the functions by command name */</span>
|
|
<a name="l00107"></a>00107 <a class="code" href="structcvaPoint.html">cvaPoint</a> <a class="code" href="libcvautomation-xtest_8h.html#382af05e5669ea2cbb22608e41cbc49a">xte_commandString</a> ( Display *displayLocation, <span class="keywordtype">char</span> *commandString, <span class="keywordtype">int</span> mouseButton, <span class="keywordtype">int</span> searchMethod, <span class="keywordtype">int</span> tolerance );
|
|
<a name="l00108"></a>00108
|
|
<a name="l00109"></a>00109 <span class="preprocessor">#endif </span><span class="comment">/* LIBCVAUTOMATION_XTEST_H */</span>
|
|
<a name="l00110"></a>00110
|
|
<a name="l00111"></a>00111 <span class="comment">/* Doxygen information */</span>
|
|
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Tue Jul 17 12:19:00 2012 for libcvautomation by
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
|
|
</body>
|
|
</html>
|