📄 group__nanox__misc.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>Nano-X miscellaneous APIs.</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.3 --><center><a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="modules.html">Modules</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> <a class="qindex" href="pages.html">Related Pages</a> </center><hr><h1>Nano-X miscellaneous APIs.<br><small>[<a class="el" href="group__nanox.html">Nano-X public API</a>]</small></h1>Functions that didn't fit anywhere else. <a href="#_details">More...</a><table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr><tr><td colspan=2><br><h2>Functions</h2></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__misc.html#a0">GrReqShmCmds</a> (long shmsize)</td></tr><tr><td> </td><td><em class="mdesc">Requests a shared memory area of the specified size to use for transferring command arguments.</em> <a href="#a0"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__misc.html#a1">GrInjectPointerEvent</a> (GR_COORD x, GR_COORD y, int button, int visible)</td></tr><tr><td> </td><td><em class="mdesc">Sets the pointer invisible if the visible parameter is GR_FALSE, or visible if it is GR_TRUE, then moves the pointer to the specified position and generates a mouse event with the specified button status.</em> <a href="#a1"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__misc.html#a2">GrInjectKeyboardEvent</a> (GR_WINDOW_ID wid, GR_KEY keyvalue, GR_KEYMOD modifiers, GR_SCANCODE scancode, GR_BOOL pressed)</td></tr><tr><td> </td><td><em class="mdesc">Sends a keyboard event to the specified window, or to the window with the current keyboard focus if 0 is used as the ID.</em> <a href="#a2"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__misc.html#a3">GrSetScreenSaverTimeout</a> (GR_TIMEOUT timeout)</td></tr><tr><td> </td><td><em class="mdesc">Sets the number of seconds of inactivity before a screen saver activate event is sent to the root window ID.</em> <a href="#a3"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a4" doxytag="nanox_misc::GrBell"></a>void </td><td valign=bottom><a class="el" href="group__nanox__misc.html#a4">GrBell</a> (void)</td></tr><tr><td> </td><td><em class="mdesc">Asks the server to ring the console bell on behalf of the client (intended for terminal apps to be able to ring the bell on the server even if they are running remotely).</em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__misc.html#a5">GrSetPortraitMode</a> (int portraitmode)</td></tr><tr><td> </td><td><em class="mdesc">Set server portrait mode.</em> <a href="#a5"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__misc.html#a6">GrQueryPointer</a> (GR_WINDOW_ID *mwin, GR_COORD *x, GR_COORD *y, GR_BUTTON *bmask)</td></tr><tr><td> </td><td><em class="mdesc">Returns the current information for the pointer.</em> <a href="#a6"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>GR_BOOL </td><td valign=bottom><a class="el" href="group__nanox__misc.html#a7">GrGrabKey</a> (GR_WINDOW_ID wid, GR_KEY key, int type)</td></tr><tr><td> </td><td><em class="mdesc">Grab a key for a specific window.</em> <a href="#a7"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__misc.html#a8">GrUngrabKey</a> (GR_WINDOW_ID wid, GR_KEY key)</td></tr><tr><td> </td><td><em class="mdesc">Ungrab a key for a specific window.</em> <a href="#a8"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__nanox__misc.html#a9">GrSetTransform</a> (GR_TRANSFORM *)</td></tr><tr><td> </td><td><em class="mdesc">This passes transform data to the mouse input engine.</em> <a href="#a9"></a><em></em><br><br></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>Functions that didn't fit anywhere else.<p><hr><h2>Function Documentation</h2><a name="a7" doxytag="nano-X.h::GrGrabKey"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> GR_BOOL GrGrabKey </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">GR_WINDOW_ID </td> <td class="mdname" nowrap> <em>id</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>GR_KEY </td> <td class="mdname" nowrap> <em>key</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>type</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Grab a key for a specific window.<p>This function has two effects. With any type other than #GR_GRAB_HOTKEY it attempts to reserve the specified key for exclusive use by the application. In addition, with #GR_GRAB_HOTKEY or #GR_GRAB_HOTKEY_EXCLUSIVE it requests hotkey events be sent to the specified window whenever the specified key is pressed or released.<p>A key can have any number of reservations of type #GR_GRAB_HOTKEY, but at most one reservation of another type. This means that grabs of type #GR_GRAB_HOTKEY always succeed, but grabs of any other type will fail if the key is already grabbed in any fashion except #GR_GRAB_HOTKEY.<p>Note that all grabs are automatically released when the window specified in the id paramater is deleted, or when the client application closes it's connection to the Nano-X server.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign=top><em>id</em> </td><td>Window to send event to. </td></tr> <tr><td valign=top><em>key</em> </td><td>MWKEY value. </td></tr> <tr><td valign=top><em>type</em> </td><td>The type of reservation to make. Valid values are #GR_GRAB_HOTKEY_EXCLUSIVE, #GR_GRAB_HOTKEY, #GR_GRAB_EXCLUSIVE and #GR_GRAB_EXCLUSIVE_MOUSE. </td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>#GR_TRUE on success, #GR_FALSE on error. </dd></dl> </td> </tr></table><a name="a2" doxytag="nano-X.h::GrInjectKeyboardEvent"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void GrInjectKeyboardEvent </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">GR_WINDOW_ID </td> <td class="mdname" nowrap> <em>wid</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>GR_KEY </td> <td class="mdname" nowrap> <em>keyvalue</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>GR_KEYMOD </td> <td class="mdname" nowrap> <em>modifiers</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>GR_SCANCODE </td> <td class="mdname" nowrap> <em>scancode</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>GR_BOOL </td> <td class="mdname" nowrap> <em>pressed</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Sends a keyboard event to the specified window, or to the window with the current keyboard focus if 0 is used as the ID.<p>The other arguments correspond directly to the fields of the same names in the keyboard event structure.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign=top><em>wid</em> </td><td>ID of the window to send the event to, or 0. </td></tr> <tr><td valign=top><em>keyvalue</em> </td><td>Unicode keystroke value to inject. </td></tr> <tr><td valign=top><em>modifiers</em> </td><td>Modifiers (shift, ctrl, alt, etc.) to inject. </td></tr> <tr><td valign=top><em>scancode</em> </td><td>The key scan code to inject. </td></tr> <tr><td valign=top><em>pressed</em> </td><td>TRUE for a key press, FALSE for a key release. </td></tr> </table></dl> </td> </tr></table><a name="a1" doxytag="client.c::GrInjectPointerEvent"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void GrInjectPointerEvent </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">GR_COORD </td> <td class="mdname" nowrap> <em>x</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>GR_COORD </td> <td class="mdname" nowrap> <em>y</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>button</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>visible</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Sets the pointer invisible if the visible parameter is GR_FALSE, or visible if it is GR_TRUE, then moves the pointer to the specified position and generates a mouse event with the specified button status.<p>Also performs a <a class="el" href="group__nanox__general.html#a23">GrFlush()</a> so that the event takes effect immediately.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign=top><em>x</em> </td><td>the X coordinate of the pointer event relevant to the root window </td></tr> <tr><td valign=top><em>y</em> </td><td>the Y coordinate of the pointer event relevant to the root window </td></tr> <tr><td valign=top><em>button</em> </td><td>the pointer button status </td></tr> <tr><td valign=top><em>visible</em> </td><td>whether to display the pointer after the event </td></tr> </table></dl> </td> </tr></table><a name="a6" doxytag="nano-X.h::GrQueryPointer"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void GrQueryPointer </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">GR_WINDOW_ID * </td> <td class="mdname" nowrap> <em>mwin</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>GR_COORD * </td> <td class="mdname" nowrap> <em>x</em>, </td> </tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -