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

📄 nano-x_8h-source.html

📁 Nano-x的设计架及相关文档----这是网上下载的中文翻译版本, E文的可以在其网站上下载.
💻 HTML
📖 第 1 页 / 共 5 页
字号:
00213 00214 <span class="comment">/* NOTE: this struct must be hand-packed to a DWORD boundary for nxproto.h*/</span><span class="comment"></span>00215 <span class="comment">/**</span>00216 <span class="comment"> * Window manager properties used by the GrGetWMProperties()/GrSetWMProperties() calls.</span>00217 <span class="comment"> */</span><a name="l00218"></a><a class="code" href="structGR__WM__PROPERTIES.html">00218</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{<a name="l00219"></a><a class="code" href="structGR__WM__PROPERTIES.html#m0">00219</a>   GR_WM_PROPS flags;            <span class="comment">/**&lt; Which properties valid in struct for set*/</span><a name="l00220"></a><a class="code" href="structGR__WM__PROPERTIES.html#m1">00220</a>   GR_WM_PROPS props;            <span class="comment">/**&lt; Window property bits*/</span><a name="l00221"></a><a class="code" href="structGR__WM__PROPERTIES.html#m2">00221</a>   GR_CHAR *title;               <span class="comment">/**&lt; Window title*/</span><a name="l00222"></a><a class="code" href="structGR__WM__PROPERTIES.html#m3">00222</a>   GR_COLOR background;          <span class="comment">/**&lt; Window background color*/</span><a name="l00223"></a><a class="code" href="structGR__WM__PROPERTIES.html#m4">00223</a>   GR_SIZE bordersize;           <span class="comment">/**&lt; Window border size*/</span><a name="l00224"></a><a class="code" href="structGR__WM__PROPERTIES.html#m5">00224</a>   GR_COLOR bordercolor;         <span class="comment">/**&lt; Window border color*/</span>00225 } <a class="code" href="structGR__WM__PROPERTIES.html">GR_WM_PROPERTIES</a>;00226 <span class="comment"></span>00227 <span class="comment">/**</span>00228 <span class="comment"> * Window properties returned by the GrGetWindowInfo() call.</span>00229 <span class="comment"> */</span><a name="l00230"></a><a class="code" href="structGR__WINDOW__INFO.html">00230</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{<a name="l00231"></a><a class="code" href="structGR__WINDOW__INFO.html#m0">00231</a>   GR_WINDOW_ID wid;             <span class="comment">/**&lt; window id (or 0 if no such window) */</span><a name="l00232"></a><a class="code" href="structGR__WINDOW__INFO.html#m1">00232</a>   GR_WINDOW_ID parent;          <span class="comment">/**&lt; parent window id */</span><a name="l00233"></a><a class="code" href="structGR__WINDOW__INFO.html#m2">00233</a>   GR_WINDOW_ID child;           <span class="comment">/**&lt; first child window id (or 0) */</span><a name="l00234"></a><a class="code" href="structGR__WINDOW__INFO.html#m3">00234</a>   GR_WINDOW_ID sibling;         <span class="comment">/**&lt; next sibling window id (or 0) */</span><a name="l00235"></a><a class="code" href="structGR__WINDOW__INFO.html#m4">00235</a>   GR_BOOL inputonly;            <span class="comment">/**&lt; TRUE if window is input only */</span><a name="l00236"></a><a class="code" href="structGR__WINDOW__INFO.html#m5">00236</a>   GR_BOOL mapped;               <span class="comment">/**&lt; TRUE if window is mapped */</span><a name="l00237"></a><a class="code" href="structGR__WINDOW__INFO.html#m6">00237</a>   GR_BOOL realized;             <span class="comment">/**&lt; TRUE if window is mapped and visible */</span><a name="l00238"></a><a class="code" href="structGR__WINDOW__INFO.html#m7">00238</a>   GR_COORD x;                   <span class="comment">/**&lt; parent-relative x position of window */</span><a name="l00239"></a><a class="code" href="structGR__WINDOW__INFO.html#m8">00239</a>   GR_COORD y;                   <span class="comment">/**&lt; parent-relative  y position of window */</span><a name="l00240"></a><a class="code" href="structGR__WINDOW__INFO.html#m9">00240</a>   GR_SIZE width;                <span class="comment">/**&lt; width of window */</span><a name="l00241"></a><a class="code" href="structGR__WINDOW__INFO.html#m10">00241</a>   GR_SIZE height;               <span class="comment">/**&lt; height of window */</span><a name="l00242"></a><a class="code" href="structGR__WINDOW__INFO.html#m11">00242</a>   GR_SIZE bordersize;           <span class="comment">/**&lt; size of border */</span><a name="l00243"></a><a class="code" href="structGR__WINDOW__INFO.html#m12">00243</a>   GR_COLOR bordercolor;         <span class="comment">/**&lt; color of border */</span><a name="l00244"></a><a class="code" href="structGR__WINDOW__INFO.html#m13">00244</a>   GR_COLOR background;          <span class="comment">/**&lt; background color */</span><a name="l00245"></a><a class="code" href="structGR__WINDOW__INFO.html#m14">00245</a>   GR_EVENT_MASK eventmask;      <span class="comment">/**&lt; current event mask for this client */</span><a name="l00246"></a><a class="code" href="structGR__WINDOW__INFO.html#m15">00246</a>   GR_WM_PROPS props;            <span class="comment">/**&lt; window properties */</span><a name="l00247"></a><a class="code" href="structGR__WINDOW__INFO.html#m16">00247</a>   GR_CURSOR_ID cursor;          <span class="comment">/**&lt; cursor id*/</span><a name="l00248"></a><a class="code" href="structGR__WINDOW__INFO.html#m17">00248</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> processid;      <span class="comment">/**&lt; process id of owner*/</span>00249 } <a class="code" href="structGR__WINDOW__INFO.html">GR_WINDOW_INFO</a>;00250 <span class="comment"></span>00251 <span class="comment">/**</span>00252 <span class="comment"> * Graphics context properties returned by the GrGetGCInfo() call.</span>00253 <span class="comment"> */</span><a name="l00254"></a><a class="code" href="structGR__GC__INFO.html">00254</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{<a name="l00255"></a><a class="code" href="structGR__GC__INFO.html#m0">00255</a>   GR_GC_ID gcid;                <span class="comment">/**&lt; GC id (or 0 if no such GC) */</span><a name="l00256"></a><a class="code" href="structGR__GC__INFO.html#m1">00256</a>   <span class="keywordtype">int</span> mode;                     <span class="comment">/**&lt; drawing mode */</span><a name="l00257"></a><a class="code" href="structGR__GC__INFO.html#m2">00257</a>   GR_REGION_ID region;          <span class="comment">/**&lt; user region */</span><a name="l00258"></a><a class="code" href="structGR__GC__INFO.html#m3">00258</a>   <span class="keywordtype">int</span> xoff;                     <span class="comment">/**&lt; x offset of user region */</span><a name="l00259"></a><a class="code" href="structGR__GC__INFO.html#m4">00259</a>   <span class="keywordtype">int</span> yoff;                     <span class="comment">/**&lt; y offset of user region */</span><a name="l00260"></a><a class="code" href="structGR__GC__INFO.html#m5">00260</a>   GR_FONT_ID font;              <span class="comment">/**&lt; font number */</span><a name="l00261"></a><a class="code" href="structGR__GC__INFO.html#m6">00261</a>   GR_COLOR foreground;          <span class="comment">/**&lt; foreground RGB color or pixel value */</span><a name="l00262"></a><a class="code" href="structGR__GC__INFO.html#m7">00262</a>   GR_COLOR background;          <span class="comment">/**&lt; background RGB color or pixel value */</span><a name="l00263"></a><a class="code" href="structGR__GC__INFO.html#m8">00263</a>   GR_BOOL fgispixelval;         <span class="comment">/**&lt; TRUE if 'foreground' is actually a GR_PIXELVAL */</span><a name="l00264"></a><a class="code" href="structGR__GC__INFO.html#m9">00264</a>   GR_BOOL bgispixelval;         <span class="comment">/**&lt; TRUE if 'background' is actually a GR_PIXELVAL */</span><a name="l00265"></a><a class="code" href="structGR__GC__INFO.html#m10">00265</a>   GR_BOOL usebackground;        <span class="comment">/**&lt; use background in bitmaps */</span><a name="l00266"></a><a class="code" href="structGR__GC__INFO.html#m11">00266</a>   GR_BOOL exposure;             <span class="comment">/**&lt; send exposure events on GrCopyArea */</span>00267 } <a class="code" href="structGR__GC__INFO.html">GR_GC_INFO</a>;00268 <span class="comment"></span>00269 <span class="comment">/**</span>00270 <span class="comment"> * color palette</span>00271 <span class="comment"> */</span><a name="l00272"></a><a class="code" href="structGR__PALETTE.html">00272</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{<a name="l00273"></a><a class="code" href="structGR__PALETTE.html#m0">00273</a>   GR_COUNT count;               <span class="comment">/**&lt; # valid entries */</span><a name="l00274"></a><a class="code" href="structGR__PALETTE.html#m1">00274</a>   GR_PALENTRY palette[256];     <span class="comment">/**&lt; palette */</span>00275 } <a class="code" href="structGR__PALETTE.html">GR_PALETTE</a>;00276 <span class="comment"></span>00277 <span class="comment">/** Calibration data passed to GrCalcTransform */</span><a name="l00278"></a><a class="code" href="structGR__CAL__DATA.html">00278</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{<a name="l00279"></a><a class="code" href="structGR__CAL__DATA.html#m0">00279</a>   <span class="keywordtype">int</span> xres;                     <span class="comment">/**&lt; X resolution of the screen */</span><a name="l00280"></a><a class="code" href="structGR__CAL__DATA.html#m1">00280</a>   <span class="keywordtype">int</span> yres;                     <span class="comment">/**&lt; Y resolution of the screen */</span><a name="l00281"></a><a class="code" href="structGR__CAL__DATA.html#m2">00281</a>   <span class="keywordtype">int</span> minx;                     <span class="comment">/**&lt; min raw X value */</span><a name="l00282"></a><a class="code" href="structGR__CAL__DATA.html#m3">00282</a>   <span class="keywordtype">int</span> miny;                     <span class="comment">/**&lt; min raw Y values */</span><a name="l00283"></a><a class="code" href="structGR__CAL__DATA.html#m4">00283</a>   <span class="keywordtype">int</span> maxx;                     <span class="comment">/**&lt; max raw X value */</span><a name="l00284"></a><a class="code" href="structGR__CAL__DATA.html#m5">00284</a>   <span class="keywordtype">int</span> maxy;                     <span class="comment">/**&lt; max raw Y value */</span><a name="l00285"></a><a class="code" href="structGR__CAL__DATA.html#m6">00285</a>   GR_BOOL xswap;                <span class="comment">/**&lt; true if the x component should be swapped */</span><a name="l00286"></a><a class="code" href="structGR__CAL__DATA.html#m7">00286</a>   GR_BOOL yswap;                <span class="comment">/**&lt; true if the y component should be swapped */</span>00287 } <a class="code" href="structGR__CAL__DATA.html">GR_CAL_DATA</a>;00288 00289 <span class="comment">/* Error codes */</span>00290 <span class="preprocessor">#define GR_ERROR_BAD_WINDOW_ID          1</span>00291 <span class="preprocessor"></span><span class="preprocessor">#define GR_ERROR_BAD_GC_ID              2</span>00292 <span class="preprocessor"></span><span class="preprocessor">#define GR_ERROR_BAD_CURSOR_SIZE        3</span>00293 <span class="preprocessor"></span><span class="preprocessor">#define GR_ERROR_MALLOC_FAILED          4</span>00294 <span class="preprocessor"></span><span class="preprocessor">#define GR_ERROR_BAD_WINDOW_SIZE        5</span>00295 <span class="preprocessor"></span><span class="preprocessor">#define GR_ERROR_KEYBOARD_ERROR         6</span>00296 <span class="preprocessor"></span><span class="preprocessor">#define GR_ERROR_MOUSE_ERROR            7</span>00297 <span class="preprocessor"></span><span class="preprocessor">#define GR_ERROR_INPUT_ONLY_WINDOW      8</span>00298 <span class="preprocessor"></span><span class="preprocessor">#define GR_ERROR_ILLEGAL_ON_ROOT_WINDOW 9</span>00299 <span class="preprocessor"></span><span class="preprocessor">#define GR_ERROR_TOO_MUCH_CLIPPING      10</span>00300 <span class="preprocessor"></span><span class="preprocessor">#define GR_ERROR_SCREEN_ERROR           11</span>00301 <span class="preprocessor"></span><span class="preprocessor">#define GR_ERROR_UNMAPPED_FOCUS_WINDOW  12</span>00302 <span class="preprocessor"></span><span class="preprocessor">#define GR_ERROR_BAD_DRAWING_MODE       13</span>00303 <span class="preprocessor"></span><span class="preprocessor">#define GR_ERROR_BAD_LINE_ATTRIBUTE     14</span>00304 <span class="preprocessor"></span><span class="preprocessor">#define GR_ERROR_BAD_FILL_MODE          15</span>00305 <span class="preprocessor"></span><span class="preprocessor">#define GR_ERROR_BAD_REGION_ID          16</span>00306 <span class="preprocessor"></span>00307 <span class="comment">/* Event types.</span>00308 <span class="comment"> * Mouse motion is generated for every motion of the mouse, and is used to</span>00309 <span class="comment"> * track the entire history of the mouse (many events and lots of overhead).</span>00310 <span class="comment"> * Mouse position ignores the history of the motion, and only reports the</span>00311 <span class="comment"> * latest position of the mouse by only queuing the latest such event for</span>00312 <span class="comment"> * any single client (good for rubber-banding).</span>00313 <span class="comment"> */</span>00314 <span class="preprocessor">#define GR_EVENT_TYPE_ERROR             (-1)</span>00315 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_TYPE_NONE              0</span>00316 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_TYPE_EXPOSURE          1</span>00317 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_TYPE_BUTTON_DOWN       2</span>00318 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_TYPE_BUTTON_UP         3</span>00319 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_TYPE_MOUSE_ENTER       4</span>00320 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_TYPE_MOUSE_EXIT        5</span>00321 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_TYPE_MOUSE_MOTION      6</span>00322 <span class="preprocessor"></span><span class="preprocessor">#define GR_EVENT_TYPE_MOUSE_POSITION    7</span>

⌨️ 快捷键说明

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