⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 group__nanox__selection.html

📁 Nano-x的设计架及相关文档----这是网上下载的中文翻译版本, E文的可以在其网站上下载.
💻 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 clipboard API.</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> &nbsp; <a class="qindex" href="modules.html">Modules</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Data Structures</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Data Fields</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; </center><hr><h1>Nano-X clipboard API.<br><small>[<a class="el" href="group__nanox.html">Nano-X public API</a>]</small></h1>Functions for handling the current selection on the clipboard. <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&nbsp;</td><td valign=bottom><a class="el" href="group__nanox__selection.html#a0">GrSetSelectionOwner</a> (GR_WINDOW_ID wid, GR_CHAR *typelist)</td></tr><tr><td>&nbsp;</td><td><em class="mdesc">Sets the current selection (otherwise known as the clipboard) ownership to the specified window.</em> <a href="#a0"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>GR_WINDOW_ID&nbsp;</td><td valign=bottom><a class="el" href="group__nanox__selection.html#a1">GrGetSelectionOwner</a> (GR_CHAR **typelist)</td></tr><tr><td>&nbsp;</td><td><em class="mdesc">Finds the window which currently owns the selection and returns its ID, or 0 if no window currently owns the selection.</em> <a href="#a1"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="group__nanox__selection.html#a2">GrRequestClientData</a> (GR_WINDOW_ID wid, GR_WINDOW_ID rid, GR_SERIALNO serial, GR_MIMETYPE mimetype)</td></tr><tr><td>&nbsp;</td><td><em class="mdesc">Sends a CLIENT_DATA_REQ event to the specified window.</em> <a href="#a2"></a><em></em><br><br></td></tr><tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="group__nanox__selection.html#a3">GrSendClientData</a> (GR_WINDOW_ID wid, GR_WINDOW_ID did, GR_SERIALNO serial, GR_LENGTH len, GR_LENGTH thislen, void *data)</td></tr><tr><td>&nbsp;</td><td><em class="mdesc">Used as the response to a CLIENT_DATA_REQ event.</em> <a href="#a3"></a><em></em><br><br></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>Functions for handling the current selection on the clipboard.<p><hr><h2>Function Documentation</h2><a name="a1" doxytag="nano-X.h::GrGetSelectionOwner"></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_WINDOW_ID GrGetSelectionOwner </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">GR_CHAR **&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>typelist</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Finds the window which currently owns the selection and returns its ID, or 0 if no window currently owns the selection.<p>A pointer to the list of mime types the selection owner is capable of supplying is placed in the pointer specified by the typelist argument. The typelist is null terminated, and the fields are seperated by space characters. It is the callers responsibility to free the typelist string, as it is allocated dynamically. If the allocation fails, it will be set to a NULL pointer, so remember to check the value of it before using it.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign=top><em>typelist</em>&nbsp;</td><td>pointer used to return the list of available mime types </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>the ID of the window which currently owns the selection, or 0 </dd></dl>    </td>  </tr></table><a name="a2" doxytag="nano-X.h::GrRequestClientData"></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 GrRequestClientData </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">GR_WINDOW_ID&nbsp;</td>          <td class="mdname" nowrap> <em>wid</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>GR_WINDOW_ID&nbsp;</td>          <td class="mdname" nowrap> <em>rid</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>GR_SERIALNO&nbsp;</td>          <td class="mdname" nowrap> <em>serial</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>GR_MIMETYPE&nbsp;</td>          <td class="mdname" nowrap> <em>mimetype</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Sends a CLIENT_DATA_REQ event to the specified window.<p>Used for requesting both selection and "drag and drop" data. The mimetype argument specifies the format of the data you would like to receive, as an index into the list returned by GrGetSelectionOwner (the first type in the list is index 0). The server makes no guarantees as to when, or even if, the client will reply to the request. If the client does reply, the reply will take the form of one or more CLIENT_DATA events. The request serial number is typically a unique ID which the client can assign to a request in order for it to be able to keep track of transfers (CLIENT_DATA events contain the same number in the sid field). Remember to free the data field of the CLIENT_DATA events as they are dynamically allocated. Also note that if the allocation fails the data field will be set to NULL, so you should check the value before using it.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign=top><em>wid</em>&nbsp;</td><td>the ID of the window requesting the data </td></tr>    <tr><td valign=top><em>rid</em>&nbsp;</td><td>the ID of the window to request the data from </td></tr>    <tr><td valign=top><em>serial</em>&nbsp;</td><td>the serial number of the request </td></tr>    <tr><td valign=top><em>mimetype</em>&nbsp;</td><td>the number of the desired mime type to request </td></tr>  </table></dl>    </td>  </tr></table><a name="a3" doxytag="nano-X.h::GrSendClientData"></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 GrSendClientData </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">GR_WINDOW_ID&nbsp;</td>          <td class="mdname" nowrap> <em>wid</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>GR_WINDOW_ID&nbsp;</td>          <td class="mdname" nowrap> <em>did</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>GR_SERIALNO&nbsp;</td>          <td class="mdname" nowrap> <em>serial</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>GR_LENGTH&nbsp;</td>          <td class="mdname" nowrap> <em>len</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>GR_LENGTH&nbsp;</td>          <td class="mdname" nowrap> <em>thislen</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>void *&nbsp;</td>          <td class="mdname" nowrap> <em>data</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Used as the response to a CLIENT_DATA_REQ event.<p>Sends the specified data of the specified length to the specified window using the specified source window ID and transfer serial number. Any fragmentation of the data into multiple CLIENT_DATA events which is required is handled automatically. The serial number should always be set to the value supplied by the CLIENT_DATA_REQ event. The thislen parameter is used internally to split the data up into packets. It should be set to the same value as the len parameter.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign=top><em>wid</em>&nbsp;</td><td>The ID of the window sending the data. </td></tr>    <tr><td valign=top><em>did</em>&nbsp;</td><td>The ID of the destination window. </td></tr>    <tr><td valign=top><em>serial</em>&nbsp;</td><td>The serial number of the request. </td></tr>    <tr><td valign=top><em>len</em>&nbsp;</td><td>Number of bytes of data to transfer. </td></tr>    <tr><td valign=top><em>thislen</em>&nbsp;</td><td>Number of bytes in this packet. </td></tr>    <tr><td valign=top><em>data</em>&nbsp;</td><td>Pointer to the data to transfer. </td></tr>  </table></dl>    </td>  </tr></table><a name="a0" doxytag="nano-X.h::GrSetSelectionOwner"></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 GrSetSelectionOwner </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">GR_WINDOW_ID&nbsp;</td>          <td class="mdname" nowrap> <em>wid</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>GR_CHAR *&nbsp;</td>          <td class="mdname" nowrap> <em>typelist</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Sets the current selection (otherwise known as the clipboard) ownership to the specified window.<p>Specifying an owner of 0 disowns the selection. The typelist argument is a list of mime types (seperated by space characters) which the window is able to supply the data as. At least one type must be specified unless you are disowning the selection (typically text/plain for plain ASCII text or text/uri-list for a filename).<p>The window which owns the current selection must be prepared to handle SELECTION_LOST events (received when another window takes ownership of the selection) and CLIENT_DATA_REQ events (received when a client wishes to retreive the selection data).<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign=top><em>wid</em>&nbsp;</td><td>the ID of the window to set the selection owner to </td></tr>    <tr><td valign=top><em>typelist</em>&nbsp;</td><td>list of mime types selection data can be supplied as </td></tr>  </table></dl>    </td>  </tr></table><hr><address style="align: right;"><small>Generated on Sun May 18 21:03:07 2003 for Microwindows Nano-X API by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.3 </small></address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -