📄 nano-x_8h-source.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.h Source File</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.h</h1><div class="fragment"><pre>00001 <span class="preprocessor">#ifndef _NANO_X_H</span>00002 <span class="preprocessor"></span><span class="preprocessor">#define _NANO_X_H</span>00003 <span class="preprocessor"></span><span class="comment">/* Copyright (c) 1999, 2000, 2001, 2002, 2003 Greg Haerr <greg@censoft.com></span>00004 <span class="comment"> * Portions Copyright (c) 2002 by Koninklijke Philips Electronics N.V.</span>00005 <span class="comment"> * Copyright (c) 2000 Alex Holden <alex@linuxhacker.org></span>00006 <span class="comment"> * Copyright (c) 1991 David I. Bell</span>00007 <span class="comment"> * Permission is granted to use, distribute, or modify this source,</span>00008 <span class="comment"> * provided that this copyright notice remains intact.</span>00009 <span class="comment"> *</span>00010 <span class="comment"> * Nano-X public definition header file: user applications should</span>00011 <span class="comment"> * include only this header file.</span>00012 <span class="comment"> */</span>00013 <span class="preprocessor">#ifdef __cplusplus</span>00014 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> {00015 <span class="preprocessor">#endif</span>00016 <span class="preprocessor"></span>00017 <span class="preprocessor">#include "mwtypes.h"</span> <span class="comment">/* exported engine MW* types*/</span>00018 00019 <span class="comment">/*</span>00020 <span class="comment"> * The following typedefs are inherited from the Microwindows</span>00021 <span class="comment"> * engine layer.</span>00022 <span class="comment"> */</span>00023 <span class="keyword">typedef</span> MWCOORD GR_COORD; <span class="comment">/* coordinate value */</span>00024 <span class="keyword">typedef</span> MWCOORD GR_SIZE; <span class="comment">/* size value */</span>00025 <span class="keyword">typedef</span> MWCOLORVAL GR_COLOR; <span class="comment">/* full color value */</span>00026 <span class="keyword">typedef</span> MWPIXELVAL GR_PIXELVAL; <span class="comment">/* hw pixel value */</span>00027 <span class="keyword">typedef</span> MWIMAGEBITS GR_BITMAP; <span class="comment">/* bitmap unit */</span>00028 <span class="keyword">typedef</span> MWUCHAR GR_CHAR; <span class="comment">/* filename, window title */</span>00029 <span class="keyword">typedef</span> MWTEXTFLAGS GR_TEXTFLAGS; <span class="comment">/* text encoding flags */</span>00030 <span class="keyword">typedef</span> MWKEY GR_KEY; <span class="comment">/* keystroke value */</span>00031 <span class="keyword">typedef</span> MWSCANCODE GR_SCANCODE; <span class="comment">/* oem keystroke scancode value */</span>00032 <span class="keyword">typedef</span> MWKEYMOD GR_KEYMOD; <span class="comment">/* keystroke modifiers */</span>00033 <span class="keyword">typedef</span> MWSCREENINFO GR_SCREEN_INFO; <span class="comment">/* screen information */</span>00034 <span class="keyword">typedef</span> MWWINDOWFBINFO GR_WINDOW_FB_INFO; <span class="comment">/* direct client-mapped window info */</span>00035 <span class="keyword">typedef</span> MWFONTINFO GR_FONT_INFO; <span class="comment">/* font information */</span>00036 <span class="keyword">typedef</span> MWIMAGEINFO GR_IMAGE_INFO; <span class="comment">/* image information */</span>00037 <span class="keyword">typedef</span> MWIMAGEHDR GR_IMAGE_HDR; <span class="comment">/* multicolor image representation */</span>00038 <span class="keyword">typedef</span> MWLOGFONT GR_LOGFONT; <span class="comment">/* logical font descriptor */</span>00039 <span class="keyword">typedef</span> MWPALENTRY GR_PALENTRY; <span class="comment">/* palette entry */</span>00040 <span class="keyword">typedef</span> MWPOINT GR_POINT; <span class="comment">/* definition of a point */</span>00041 <span class="keyword">typedef</span> MWTIMEOUT GR_TIMEOUT; <span class="comment">/* timeout value */</span>00042 <span class="keyword">typedef</span> MWFONTLIST GR_FONTLIST; <span class="comment">/* list of fonts */</span>00043 <span class="keyword">typedef</span> MWKBINFO GR_KBINFO; <span class="comment">/* keyboard information */</span>00044 <span class="keyword">typedef</span> MWSTIPPLE GR_STIPPLE; <span class="comment">/* Stipple information */</span>00045 <span class="keyword">typedef</span> MWTRANSFORM GR_TRANSFORM; <span class="comment">/* Transform information */</span>00046 00047 <span class="comment">/* Basic typedefs. */</span>00048 <span class="keyword">typedef</span> <span class="keywordtype">int</span> GR_COUNT; <span class="comment">/* number of items */</span>00049 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> GR_CHAR_WIDTH; <span class="comment">/* width of character */</span>00050 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> GR_ID; <span class="comment">/* resource ids */</span>00051 <span class="keyword">typedef</span> GR_ID GR_DRAW_ID; <span class="comment">/* drawable id */</span>00052 <span class="keyword">typedef</span> GR_DRAW_ID GR_WINDOW_ID; <span class="comment">/* window or pixmap id */</span>00053 <span class="keyword">typedef</span> GR_ID GR_GC_ID; <span class="comment">/* graphics context id */</span>00054 <span class="keyword">typedef</span> GR_ID GR_REGION_ID; <span class="comment">/* region id */</span>00055 <span class="keyword">typedef</span> GR_ID GR_FONT_ID; <span class="comment">/* font id */</span>00056 <span class="keyword">typedef</span> GR_ID GR_IMAGE_ID; <span class="comment">/* image id */</span>00057 <span class="keyword">typedef</span> GR_ID GR_TIMER_ID; <span class="comment">/* timer id */</span>00058 <span class="keyword">typedef</span> GR_ID GR_CURSOR_ID; <span class="comment">/* cursor id */</span>00059 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> GR_BOOL; <span class="comment">/* boolean value */</span>00060 <span class="keyword">typedef</span> <span class="keywordtype">int</span> GR_ERROR; <span class="comment">/* error types */</span>00061 <span class="keyword">typedef</span> <span class="keywordtype">int</span> GR_EVENT_TYPE; <span class="comment">/* event types */</span>00062 <span class="keyword">typedef</span> <span class="keywordtype">int</span> GR_UPDATE_TYPE; <span class="comment">/* window update types */</span>00063 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> GR_EVENT_MASK; <span class="comment">/* event masks */</span>00064 <span class="keyword">typedef</span> <span class="keywordtype">char</span> GR_FUNC_NAME[25];<span class="comment">/* function name */</span>00065 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> GR_WM_PROPS; <span class="comment">/* window property flags */</span>00066 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> GR_SERIALNO; <span class="comment">/* Selection request ID number */</span>00067 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> GR_MIMETYPE; <span class="comment">/* Index into mime type list */</span>00068 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> GR_LENGTH; <span class="comment">/* Length of a block of data */</span>00069 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> GR_BUTTON; <span class="comment">/* mouse button value */</span>00070 <span class="comment"></span>00071 <span class="comment">/** Nano-X rectangle, different from MWRECT */</span><a name="l00072"></a><a class="code" href="structGR__RECT.html">00072</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{<a name="l00073"></a><a class="code" href="structGR__RECT.html#m0">00073</a> GR_COORD x; <span class="comment">/**< upper left x coordinate*/</span><a name="l00074"></a><a class="code" href="structGR__RECT.html#m1">00074</a> GR_COORD y; <span class="comment">/**< upper left y coordinate*/</span><a name="l00075"></a><a class="code" href="structGR__RECT.html#m2">00075</a> GR_SIZE width; <span class="comment">/**< rectangle width*/</span><a name="l00076"></a><a class="code" href="structGR__RECT.html#m3">00076</a> GR_SIZE height; <span class="comment">/**< rectangle height*/</span>00077 } <a class="code" href="structGR__RECT.html">GR_RECT</a>;00078 00079 <span class="comment">/* The root window id. */</span>00080 <span class="preprocessor">#define GR_ROOT_WINDOW_ID ((GR_WINDOW_ID) 1)</span>00081 <span class="preprocessor"></span>00082 <span class="comment">/* GR_COLOR color constructor */</span>00083 <span class="preprocessor">#define GR_RGB(r,g,b) MWRGB(r,g,b)</span>00084 <span class="preprocessor"></span><span class="preprocessor">#define GR_ARGB(a,r,g,b) MWARGB(a,r,g,b)</span>00085 <span class="preprocessor"></span>00086 <span class="comment">/* Drawing modes for GrSetGCMode */</span>00087 <span class="preprocessor">#define GR_MODE_COPY MWMODE_COPY </span><span class="comment">/* src*/</span>00088 <span class="preprocessor">#define GR_MODE_SET MWMODE_COPY </span><span class="comment">/* obsolete, use GR_MODE_COPY*/</span>00089 <span class="preprocessor">#define GR_MODE_XOR MWMODE_XOR </span><span class="comment">/* src ^ dst*/</span>00090 <span class="preprocessor">#define GR_MODE_OR MWMODE_OR </span><span class="comment">/* src | dst*/</span>00091 <span class="preprocessor">#define GR_MODE_AND MWMODE_AND </span><span class="comment">/* src & dst*/</span>00092 <span class="preprocessor">#define GR_MODE_CLEAR MWMODE_CLEAR </span><span class="comment">/* 0*/</span>00093 <span class="preprocessor">#define GR_MODE_SETTO1 MWMODE_SETTO1 </span><span class="comment">/* 11111111*/</span> <span class="comment">/* will be GR_MODE_SET*/</span>00094 <span class="preprocessor">#define GR_MODE_EQUIV MWMODE_EQUIV </span><span class="comment">/* ~(src ^ dst)*/</span>00095 <span class="preprocessor">#define GR_MODE_NOR MWMODE_NOR </span><span class="comment">/* ~(src | dst)*/</span>00096 <span class="preprocessor">#define GR_MODE_NAND MWMODE_NAND </span><span class="comment">/* ~(src & dst)*/</span>00097 <span class="preprocessor">#define GR_MODE_INVERT MWMODE_INVERT </span><span class="comment">/* ~dst*/</span>00098 <span class="preprocessor">#define GR_MODE_COPYINVERTED MWMODE_COPYINVERTED </span><span class="comment">/* ~src*/</span>00099 <span class="preprocessor">#define GR_MODE_ORINVERTED MWMODE_ORINVERTED </span><span class="comment">/* ~src | dst*/</span>00100 <span class="preprocessor">#define GR_MODE_ANDINVERTED MWMODE_ANDINVERTED </span><span class="comment">/* ~src & dst*/</span>00101 <span class="preprocessor">#define GR_MODE_ORREVERSE MWMODE_ORREVERSE </span><span class="comment">/* src | ~dst*/</span>00102 <span class="preprocessor">#define GR_MODE_ANDREVERSE MWMODE_ANDREVERSE </span><span class="comment">/* src & ~dst*/</span>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -