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

📄 nano-x_8h-source.html

📁 Nano-x的设计架及相关文档----这是网上下载的中文翻译版本, E文的可以在其网站上下载.
💻 HTML
📖 第 1 页 / 共 5 页
字号:
00323 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_TYPE_KEY_DOWN          8</span>00324 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_TYPE_KEY_UP            9</span>00325 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_TYPE_FOCUS_IN          10</span>00326 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_TYPE_FOCUS_OUT         11</span>00327 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_TYPE_FDINPUT           12</span>00328 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_TYPE_UPDATE            13</span>00329 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_TYPE_CHLD_UPDATE       14</span>00330 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_TYPE_CLOSE_REQ         15</span>00331 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_TYPE_TIMEOUT           16</span>00332 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_TYPE_SCREENSAVER       17</span>00333 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_TYPE_CLIENT_DATA_REQ   18</span>00334 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_TYPE_CLIENT_DATA       19</span>00335 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_TYPE_SELECTION_CHANGED 20</span>00336 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_TYPE_TIMER             21</span>00337 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_TYPE_PORTRAIT_CHANGED  22</span>00338 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_TYPE_HOTKEY_DOWN       23</span>00339 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_TYPE_HOTKEY_UP         24</span>00340 <span class="preprocessor"></span>00341 <span class="comment">/* Event masks */</span>00342 <span class="preprocessor">#define GR_EVENTMASK(n)                 (((GR_EVENT_MASK) 1) &lt;&lt; (n))</span>00343 <span class="preprocessor"></span>00344 <span class="preprocessor">#define GR_EVENT_MASK_NONE              GR_EVENTMASK(GR_EVENT_TYPE_NONE)</span>00345 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_MASK_ERROR             0x80000000L</span>00346 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_MASK_EXPOSURE          GR_EVENTMASK(GR_EVENT_TYPE_EXPOSURE)</span>00347 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_MASK_BUTTON_DOWN       GR_EVENTMASK(GR_EVENT_TYPE_BUTTON_DOWN)</span>00348 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_MASK_BUTTON_UP         GR_EVENTMASK(GR_EVENT_TYPE_BUTTON_UP)</span>00349 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_MASK_MOUSE_ENTER       GR_EVENTMASK(GR_EVENT_TYPE_MOUSE_ENTER)</span>00350 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_MASK_MOUSE_EXIT        GR_EVENTMASK(GR_EVENT_TYPE_MOUSE_EXIT)</span>00351 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_MASK_MOUSE_MOTION      GR_EVENTMASK(GR_EVENT_TYPE_MOUSE_MOTION)</span>00352 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_MASK_MOUSE_POSITION    GR_EVENTMASK(GR_EVENT_TYPE_MOUSE_POSITION)</span>00353 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_MASK_KEY_DOWN          GR_EVENTMASK(GR_EVENT_TYPE_KEY_DOWN)</span>00354 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_MASK_KEY_UP            GR_EVENTMASK(GR_EVENT_TYPE_KEY_UP)</span>00355 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_MASK_FOCUS_IN          GR_EVENTMASK(GR_EVENT_TYPE_FOCUS_IN)</span>00356 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_MASK_FOCUS_OUT         GR_EVENTMASK(GR_EVENT_TYPE_FOCUS_OUT)</span>00357 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_MASK_FDINPUT           GR_EVENTMASK(GR_EVENT_TYPE_FDINPUT)</span>00358 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_MASK_UPDATE            GR_EVENTMASK(GR_EVENT_TYPE_UPDATE)</span>00359 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_MASK_CHLD_UPDATE       GR_EVENTMASK(GR_EVENT_TYPE_CHLD_UPDATE)</span>00360 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_MASK_CLOSE_REQ         GR_EVENTMASK(GR_EVENT_TYPE_CLOSE_REQ)</span>00361 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_MASK_TIMEOUT           GR_EVENTMASK(GR_EVENT_TYPE_TIMEOUT)</span>00362 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_MASK_SCREENSAVER       GR_EVENTMASK(GR_EVENT_TYPE_SCREENSAVER)</span>00363 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_MASK_CLIENT_DATA_REQ   GR_EVENTMASK(GR_EVENT_TYPE_CLIENT_DATA_REQ)</span>00364 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_MASK_CLIENT_DATA       GR_EVENTMASK(GR_EVENT_TYPE_CLIENT_DATA)</span>00365 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_MASK_SELECTION_CHANGED GR_EVENTMASK(GR_EVENT_TYPE_SELECTION_CHANGED)</span>00366 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_MASK_TIMER             GR_EVENTMASK(GR_EVENT_TYPE_TIMER)</span>00367 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_MASK_PORTRAIT_CHANGED  GR_EVENTMASK(GR_EVENT_TYPE_PORTRAIT_CHANGED)</span>00368 <span class="preprocessor"></span><span class="comment">/* Event mask does not affect GR_EVENT_TYPE_HOTKEY_DOWN and</span>00369 <span class="comment"> * GR_EVENT_TYPE_HOTKEY_UP, hence no masks for those events. */</span>00370 00371 <span class="preprocessor">#define GR_EVENT_MASK_ALL               ((GR_EVENT_MASK) -1L)</span>00372 <span class="preprocessor"></span>00373 <span class="comment">/* update event types */</span>00374 <span class="preprocessor">#define GR_UPDATE_MAP           1</span>00375 <span class="preprocessor"></span><span class="preprocessor">#define GR_UPDATE_UNMAP         2</span>00376 <span class="preprocessor"></span><span class="preprocessor">#define GR_UPDATE_MOVE          3</span>00377 <span class="preprocessor"></span><span class="preprocessor">#define GR_UPDATE_SIZE          4</span>00378 <span class="preprocessor"></span><span class="preprocessor">#define GR_UPDATE_UNMAPTEMP     5       </span><span class="comment">/* unmap during window move/resize*/</span>00379 <span class="preprocessor">#define GR_UPDATE_ACTIVATE      6       </span><span class="comment">/* toplevel window [de]activate*/</span>00380 <span class="preprocessor">#define GR_UPDATE_DESTROY       7</span>00381 <span class="preprocessor"></span><span class="preprocessor">#define GR_UPDATE_REPARENT      8</span>00382 <span class="preprocessor"></span><span class="comment"></span>00383 <span class="comment">/**</span>00384 <span class="comment"> * Event for errors detected by the server.</span>00385 <span class="comment"> * These events are not delivered to GrGetNextEvent, but instead call</span>00386 <span class="comment"> * the user supplied error handling function.  Only the first one of</span>00387 <span class="comment"> * these errors at a time is saved for delivery to the client since</span>00388 <span class="comment"> * there is not much to be done about errors anyway except complain</span>00389 <span class="comment"> * and exit.</span>00390 <span class="comment"> */</span><a name="l00391"></a><a class="code" href="structGR__EVENT__ERROR.html">00391</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{<a name="l00392"></a><a class="code" href="structGR__EVENT__ERROR.html#m0">00392</a>   GR_EVENT_TYPE type;           <span class="comment">/**&lt; event type */</span><a name="l00393"></a><a class="code" href="structGR__EVENT__ERROR.html#m1">00393</a>   GR_FUNC_NAME name;            <span class="comment">/**&lt; function name which failed */</span><a name="l00394"></a><a class="code" href="structGR__EVENT__ERROR.html#m2">00394</a>   GR_ERROR code;                <span class="comment">/**&lt; error code */</span><a name="l00395"></a><a class="code" href="structGR__EVENT__ERROR.html#m3">00395</a>   GR_ID id;                     <span class="comment">/**&lt; resource id (maybe useless) */</span>00396 } <a class="code" href="structGR__EVENT__ERROR.html">GR_EVENT_ERROR</a>;00397 <span class="comment"></span>00398 <span class="comment">/**</span>00399 <span class="comment"> * Event for a mouse button pressed down or released.</span>00400 <span class="comment"> */</span><a name="l00401"></a><a class="code" href="structGR__EVENT__BUTTON.html">00401</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{<a name="l00402"></a><a class="code" href="structGR__EVENT__BUTTON.html#m0">00402</a>   GR_EVENT_TYPE type;           <span class="comment">/**&lt; event type */</span><a name="l00403"></a><a class="code" href="structGR__EVENT__BUTTON.html#m1">00403</a>   GR_WINDOW_ID wid;             <span class="comment">/**&lt; window id event delivered to */</span><a name="l00404"></a><a class="code" href="structGR__EVENT__BUTTON.html#m2">00404</a>   GR_WINDOW_ID subwid;          <span class="comment">/**&lt; sub-window id (pointer was in) */</span><a name="l00405"></a><a class="code" href="structGR__EVENT__BUTTON.html#m3">00405</a>   GR_COORD rootx;               <span class="comment">/**&lt; root window x coordinate */</span><a name="l00406"></a><a class="code" href="structGR__EVENT__BUTTON.html#m4">00406</a>   GR_COORD rooty;               <span class="comment">/**&lt; root window y coordinate */</span><a name="l00407"></a><a class="code" href="structGR__EVENT__BUTTON.html#m5">00407</a>   GR_COORD x;                   <span class="comment">/**&lt; window x coordinate of mouse */</span><a name="l00408"></a><a class="code" href="structGR__EVENT__BUTTON.html#m6">00408</a>   GR_COORD y;                   <span class="comment">/**&lt; window y coordinate of mouse */</span><a name="l00409"></a><a class="code" href="structGR__EVENT__BUTTON.html#m7">00409</a>   GR_BUTTON buttons;            <span class="comment">/**&lt; current state of all buttons */</span><a name="l00410"></a><a class="code" href="structGR__EVENT__BUTTON.html#m8">00410</a>   GR_BUTTON changebuttons;      <span class="comment">/**&lt; buttons which went down or up */</span><a name="l00411"></a><a class="code" href="structGR__EVENT__BUTTON.html#m9">00411</a>   GR_KEYMOD modifiers;          <span class="comment">/**&lt; modifiers (MWKMOD_SHIFT, etc)*/</span><a name="l00412"></a><a class="code" href="structGR__EVENT__BUTTON.html#m10">00412</a>   GR_TIMEOUT time;              <span class="comment">/**&lt; tickcount time value*/</span>00413 } <a class="code" href="structGR__EVENT__BUTTON.html">GR_EVENT_BUTTON</a>;00414 <span class="comment"></span>00415 <span class="comment">/**</span>00416 <span class="comment"> * Event for a keystroke typed for the window with has focus.</span>00417 <span class="comment"> */</span><a name="l00418"></a><a class="code" href="structGR__EVENT__KEYSTROKE.html">00418</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{<a name="l00419"></a><a class="code" href="structGR__EVENT__KEYSTROKE.html#m0">00419</a>   GR_EVENT_TYPE type;           <span class="comment">/**&lt; event type */</span><a name="l00420"></a><a class="code" href="structGR__EVENT__KEYSTROKE.html#m1">00420</a>   GR_WINDOW_ID wid;             <span class="comment">/**&lt; window id event delived to */</span><a name="l00421"></a><a class="code" href="structGR__EVENT__KEYSTROKE.html#m2">00421</a>   GR_WINDOW_ID subwid;          <span class="comment">/**&lt; sub-window id (pointer was in) */</span><a name="l00422"></a><a class="code" href="structGR__EVENT__KEYSTROKE.html#m3">00422</a>   GR_COORD rootx;               <span class="comment">/**&lt; root window x coordinate */</span><a name="l00423"></a><a class="code" href="structGR__EVENT__KEYSTROKE.html#m4">00423</a>   GR_COORD rooty;               <span class="comment">/**&lt; root window y coordinate */</span><a name="l00424"></a><a class="code" href="structGR__EVENT__KEYSTROKE.html#m5">00424</a>   GR_COORD x;                   <span class="comment">/**&lt; window x coordinate of mouse */</span><a name="l00425"></a><a class="code" href="structGR__EVENT__KEYSTROKE.html#m6">00425</a>   GR_COORD y;                   <span class="comment">/**&lt; window y coordinate of mouse */</span><a name="l00426"></a><a class="code" href="structGR__EVENT__KEYSTROKE.html#m7">00426</a>   GR_BUTTON buttons;            <span class="comment">/**&lt; current state of buttons */</span><a name="l00427"></a><a class="code" href="structGR__EVENT__KEYSTROKE.html#m8">00427</a>   GR_KEYMOD modifiers;          <span class="comment">/**&lt; modifiers (MWKMOD_SHIFT, etc)*/</span><a name="l00428"></a><a class="code" href="structGR__EVENT__KEYSTROKE.html#m9">00428</a>   GR_KEY ch;                    <span class="comment">/**&lt; 16-bit unicode key value, MWKEY_xxx */</span><a name="l00429"></a><a class="code" href="structGR__EVENT__KEYSTROKE.html#m10">00429</a>   GR_SCANCODE scancode;         <span class="comment">/**&lt; OEM scancode value if available*/</span><a name="l00430"></a><a class="code" href="structGR__EVENT__KEYSTROKE.html#m11">00430</a>   GR_BOOL hotkey;               <span class="comment">/**&lt; TRUE if generated from GrGrabKey(GR_GRAB_HOTKEY_x) */</span>00431 } <a class="code" href="structGR__EVENT__KEYSTROKE.html">GR_EVENT_KEYSTROKE</a>;00432 <span class="comment"></span>

⌨️ 快捷键说明

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