viewer/sbgdefs.h

Go to the documentation of this file.
00001 
00034 /*
00035 definitions and types to be included with STARBASE application programs
00036 */
00037 
00038 #ifndef _STARBASE_INCLUDED       /* allow multiple inclusions */
00039 #define _STARBASE_INCLUDED
00040 
00041 /*  kinds of graphics devices  */
00042 #define OUTDEV        0
00043 #define INDEV       1
00044 #define OUTINDEV      2
00045 #define OUTMETA       3
00046 #define INMETA        4
00047 
00048 /*  clear control parameters  */
00049 #define CLEAR_VDC_EXTENT    1
00050 #define CLEAR_VIEWPORT      17
00051 #define CLEAR_CLIP_RECTANGLE  33
00052 #define CLEAR_DISPLAY_SURFACE 65
00053 #define CLEAR_ALL_BANKS     128
00054 #define CLEAR_ZBUFFER     256
00055 
00056 /*  clip control parameters  */
00057 #define CLIP_TO_RECT    1
00058 #define CLIP_TO_VDC     2
00059 #define CLIP_OFF      3
00060 #define CLIP_TO_VIEWPORT  4
00061 
00062 /*  gopen open_mode parameter masks  */
00063 #define SPOOLED    0x01     /* if this bit is on, output is spooled            */
00064 //#define INIT     0x02     /* if this bit is on, device initialization occurs */
00065 #define THREE_D    0x04     /* if this bit is on, all transformations are 3D   */
00066 #define RESET_DEVICE 0x08   /* if this bit is on, hard reset including p1 & p2 */
00067 #define MODEL_XFORM  0x10   /* if this bit is on, matrix stack in modeling mode */
00068 #define INT_XFORM    0x20   /* if this bit is on, matrix stack in modeling mode */
00069 #define FLOAT_XFORM  0x40   /* if this bit is on, matrix stack in modeling mode */
00070 
00071 /* color map modes set with shade_mode */
00072 #define CMAP_NORMAL     0
00073 #define CMAP_MONOTONIC    1
00074 #define CMAP_FULL     4
00075 
00076 /* double_buffer mode used to draw into the same buffer that is displayed */
00077 #define DFRONT 4
00078 /* double_buffer mode used to not clear buffer when switched */
00079 #define SUPPRESS_CLEAR 8
00080 
00081 /* light source types set with light_source */
00082 #define DIRECTIONAL   0
00083 #define POSITIONAL    1
00084 #define ATTEN_LIGHT   2
00085 #define SPOT_LIGHT    4
00086 #define CONE_LIGHT    8
00087 
00088 /* vertex orders set with vertex_format */
00089 #define CLOCKWISE     0x0000
00090 #define COUNTER_CLOCKWISE 0x0001
00091 #define UNIT_NORMALS      0x0200
00092 
00093 /* set p1 p2 units */
00094 #define FRACTIONAL    0
00095 #define METRIC      1
00096 
00097 /* mapping modes */
00098 #define ISOTROPIC     0
00099 #define DISTORT     1
00100 
00101 /* Starbase linetypes */
00102 #define SOLID         0
00103 #define DASH        1
00104 #define DOT         2
00105 #define DASH_DOT      3
00106 #define DASH_DOT_DOT    4
00107 #define LONG_DASH       5
00108 #define CENTER_DASH     6
00109 #define CENTER_DASH_DASH  7
00110 
00111 /* wide endpoint types */
00112 #define SQUARE        0
00113 #define ROUNDED     1
00114 
00115 /* depth cue models */
00116 #define DC_MIN    2
00117 #define DC_COLOR  4
00118 
00119 /* distance modes for line_width, hatch_spacing */
00120 #define VDC_UNITS 0
00121 #define WC_UNITS  1
00122 #define MC_UNITS  WC_UNITS
00123 #define DC_UNITS  2
00124 
00125 /* polygon interior styles */
00126 #define INT_HOLLOW    0
00127 #define INT_SOLID   1
00128 #define INT_PATTERN   2
00129 #define INT_HATCH   3
00130 #define INT_OUTLINE   4
00131 #define INT_POINT     5
00132 
00133 /* Matrix concatenation types */
00134 #define PRE   0
00135 #define POST  1
00136 #define REPLACE 0
00137 #define PUSH  1
00138 
00139 /* Viewing matrix change types */
00140 #define REPLACE_VW    0
00141 #define PRE_CONCAT_VW 1
00142 #define POST_CONCAT_VW  2
00143 
00144 /* character switching modes */
00145 #define ISO_7BIT  0
00146 #define ISO_8BIT  1
00147 #define HP_8BIT   2
00148 
00149 /* text precision types */
00150 #define STRING_TEXT   0
00151 #define CHARACTER_TEXT  1
00152 #define STROKE_TEXT   2
00153 
00154 /* text transformation types */
00155 #define VDC_TEXT        0
00156 #define WORLD_COORDINATE_TEXT 1
00157 #define TOS_TEXT        2
00158 #define ANNOTATION_TEXT     3
00159 
00160 /*  text alignment enumerated types */
00161 #define TA_LEFT           0
00162 #define SB_TA_CENTER         1
00163 #define TA_RIGHT          2
00164 #define TA_CONTINUOUS_HORIZONTAL  3
00165 #define TA_NORMAL_HORIZONTAL    4
00166 
00167 #define TA_TOP          0
00168 #define TA_CAP          1
00169 #define TA_HALF         2
00170 #define TA_BASE         3
00171 #define SB_TA_BOTTOM       4
00172 #define TA_CONTINUOUS_VERTICAL  5
00173 #define TA_NORMAL_VERTICAL    6
00174 
00175 /*  character path and line path enumerated types  */
00176 #define PATH_RIGHT      0
00177 #define PATH_LEFT     1
00178 #define PATH_UP       2
00179 #define PATH_DOWN     3
00180 
00181 /*  input device class enumerated types  */
00182 #define ALL     0
00183 #define LOCATOR   1
00184 #define CHOICE    4
00185 
00186 /*  event queue states */
00187 #define EMPTY_NO_OVERFLOW   0
00188 #define EMPTY_OVERFLOW      1
00189 #define NOT_EMPTY_NO_OVERFLOW 2
00190 #define NOT_EMPTY_OVERFLOW    3
00191 
00192 /*  event message link enumerated types */
00193 #define SIMULTANEOUS_EVENT_FOLLOWS  0
00194 #define SINGLE_EVENT        1
00195 
00196 /* gerr printing flags */
00197 #define NO_ERROR_PRINTING 0
00198 #define PRINT_ERRORS    1
00199 #define PRINT_WARNINGS    2
00200 
00201 /* arc close_types  */
00202 #define NO_CHORD  0
00203 #define PIE     1
00204 #define CHORD   2
00205 
00206 /* spline orders and rationalities  */
00207 #define NONRATIONAL 0
00208 //#define RATIONAL  1
00209 #define LINEAR    2
00210 #define QUADRATIC 3
00211 #define CUBIC   4
00212 #define QUARTIC   5
00213 #define QUINTIC   6
00214 #define DC_VALUES 0
00215 #define VDC_VALUES  2
00216 #define STEP_SIZE 3
00217 
00218 /* transform_point modes */
00219 #define MC_TO_WC    0
00220 #define MC_TO_WORLD   0
00221 #define MC_TO_VDC   1
00222 #define WC_TO_VDC   2
00223 #define WORLD_TO_VDC  2
00224 #define WC_TO_MC    3
00225 #define WORLD_TO_MC   3
00226 #define VDC_TO_MC     4
00227 #define VDC_TO_WC   5
00228 #define VDC_TO_WORLD  5
00229 #define INTVDC_TO_DC  6
00230 #define DC_TO_INTVDC  7
00231 
00232 /* view_camera projection types */
00233 #define CAM_PERSPECTIVE 0.0
00234 #define CAM_PARALLEL 1.0
00235 
00236 /* plane printing modes */
00237 #define ALL_PLANES    -1
00238 #define PIXEL_MAJOR   -1
00239 #define PLANE_MAJOR   -2
00240 
00241 /* hatch types */
00242 #define PARALLEL_HATCH  0
00243 #define CROSSHATCH    1
00244 
00245 /* highlight attribute types */
00246 #define HL_COLOR  1
00247 #define HL_STYLE  2
00248 
00249 /* Hardware cursor control types */
00250 #define REQUEST_HW_CURSOR 1
00251 #define REQUEST_SW_CURSOR 2
00252 #define FORCE_HW_CURSOR 3
00253 #define REQUEST_HW_ECHO 1
00254 #define REQUEST_SW_ECHO 2
00255 #define FORCE_HW_ECHO 3
00256 
00257 /* cgm encoding types */
00258 #define CGM_BINARY    1
00259 #define CGM_CHARACTER 2
00260 #define CGM_CLEAR_TEXT  3
00261 
00262 /* GLOBAL gescapes */
00263 #define SWITCH_SEMAPHORE  0
00264 #define READ_COLOR_MAP    1
00265 #define BLINK_PLANES    2
00266 #define BLINK_INDEX     3
00267 
00268 /* GLOBAL raster gescapes */
00269 #define R_GET_FRAME_BUFFER  20
00270 #define R_LOCK_DEVICE     21
00271 #define R_UNLOCK_DEVICE     22
00272 #define R_GET_WINDOW_INFO   23
00273 #define R_FULL_FRAME_BUFFER 24
00274 #define R_ALLOC_OFFSCREEN   25
00275 #define R_FREE_OFFSCREEN    26
00276 #define R_BIT_MODE        27
00277 #define R_BIT_MASK        28
00278 #define R_DEF_FILL_PAT      29
00279 #define R_OVERLAY_ECHO  30
00280 #define R_OV_ECHO_COLORS  31
00281 #define R_DEF_ECHO_TRANS  32
00282 #define R_TRANSPARENCY_INDEX 33
00283 #define R_LINE_TYPE     34
00284 #define R_ECHO_FG_BG_COLORS 35
00285 #define R_DMA_MODE 36
00286 #define R_ECHO_MASK 37
00287 #define R_ECHO_CONTROL 38
00288 #define R_OFFSCREEN_ALLOC 1106
00289 #define R_OFFSCREEN_FREE 1107
00290 
00291 /* HPGL gescapes */
00292 #define HPGL_WRITE_BUFFER 100
00293 #define HPGL_SET_PEN_NUM  101
00294 #define HPGL_SET_PEN_SPEED  102
00295 #define HPGL_SET_PEN_WIDTH  103
00296 #define HPGL_READ_BUFFER  104
00297 
00298 /* HPGL2 gescapes */
00299 #define HPGL2_SET_MEDIA_TYPE    105
00300 #define HPGL2_LOGICAL_PEN_WIDTH 106
00301 #define HPGL2_CUTTER_CONTROL    107
00302 #define HPGL2_REPLOT            108
00303 #define HPGL2_FONT_TYPEFACE     109
00304 #define HPGL2_ADAPTIVE_LINES    110
00305 #define HPGL2_SET_QUALITY       111
00306 #define HPGL2_SET_CMAP_SIZE     112
00307 #define HPGL2_FONT_WEIGHT       113
00308 #define HPGL2_FONT_POSTURE      114
00309 
00310 /* HP26XX gescapes */
00311 #define HP26_PRINT_ESC    200
00312 #define HPTERM_PRINT_ESC  200
00313 #define HPTERM_640x400    201
00314 
00315 /* 98700 gescapes */
00316 #define GB_NONE 300
00317 
00318 /* 98710 gescapes */
00319 #define GA_NONE 400
00320 
00321 /* 300l gescapes */
00322 #define TC_HALF_PIXEL 500
00323 
00324 /* HIL and keyboard gescapes */
00325 #define ENABLE_AUTO_PROMPT  600
00326 #define DISABLE_AUTO_PROMPT 601
00327 #define PROMPT_ON       602
00328 #define PROMPT_OFF      603
00329 #define TRIGGER_ON_RELEASE  604
00330 #define IGNORE_RELEASE    605
00331 #define REPORT_PROXIMITY  606
00332 #define IGNORE_PROXIMITY  607
00333 #define ENABLE_ACKNOWLEDGE  608
00334 #define DISABLE_ACKNOWLEDGE 609
00335 #define SET_ACCELERATION  610    /* hil acceleration multiplier */
00336 
00337 /* GKSM gescapes */
00338 #define GKSM_WRITE_ITEM     700
00339 #define GKSM_GET_ITEM_TYPE    701
00340 #define GKSM_READ_ITEM      702
00341 #define GKSM_SKIP_ITEM      703
00342 #define GKSM_INQ_COLOR_NDCES  704
00343 #define GKSM_INQ_PAT_REP    705
00344 
00345 /* 98721 gescapes */
00346 #define TRANSPARENCY      800
00347 #define ZBUFFER_ALLOC     801
00348 #define LS_OVERFLOW_CONTROL   802
00349 #define PATTERN_FILL      803
00350 #define ZWRITE_ENABLE     804
00351 #define ZSTATE_SAVE       805
00352 #define ZSTATE_RESTORE      806
00353 
00354 /* SMDpixel and SMDpixel3 gescapes */
00355 #define SMD_SUPPLY_MEM_BUFF   900
00356 #define SMD_GET_MEM_REQUIRED  901
00357 #define SMD_DEFINE_XY     902
00358 #define SMD_DEFINE_DEPTH    903
00359 #define SMD_ALLOCATE_MEMORY   904
00360 
00361 /* Xn gescapes */
00362 #define XN_INPUT_RAW    1000
00363 /* raw mode (TRUE) returns LK201 keycodes
00364                                    cooked mode (FALSE) returns ASCII */
00365 #define XN_KEY_RELEASE    1001   /* turn on/off key release events */
00366 #define XN_BUTTON_RELEASE   1002 /* turn on/off button release events */
00367 
00368 /* 98549/49/50/56 gescapes */
00369 #define GR2D_MASK_ENABLE      1100
00370 #define GR2D_MASK_RULE        1101
00371 #define GR2D_DEF_MASK       1102
00372 #define GR2D_FILL_PATTERN     1103
00373 #define GR2D_OVERLAY_TRANSPARENT  1104
00374 #define GR2D_REPLICATE        1105
00375 #define GR2D_ALLOC_OFFSCREEN    1106
00376 #define GR2D_FREE_OFFSCREEN     1107
00377 #define GR2D_PLANE_MASK       1108
00378 #define GR2D_INQ_CLIST_ADDR     1109
00379 #define GR2D_LOAD_CLIST       1110
00380 #define GR2D_CONVEX_POLYGONS    1112
00381 
00382 /* hp98730/31 driver gescapes */
00383 #define PAN_AND_ZOOM                1200
00384 #define OVERLAY_BLEND               1201
00385 #define IMAGE_BLEND                 1202
00386 #define SET_BANK_CMAP               1203
00387 #define GAMMA_CORRECTION            1204
00388 #define INQ_GAMMA_CORRECTION        1205
00389 #define FULL_COLOR_INDEX          1206
00390 #define POLYGON_TRANSPARENCY        1207
00391 #define CLIP_OVERFLOW               1208
00392 
00393 /* hp98704/05 gescapes  */
00394 #define SET_REPLACEMENT_RULE        1250
00395 
00396 /* hpcgm driver gescapes */
00397 #define CGMESC_ENCODING    1300
00398 #define CGMESC_ESCAPE_ELT  1301
00399 #define CGMESC_MET_NAME    1302
00400 #define CGMESC_PIC_NAME    1303
00401 #define CGMESC_FONT_IX     1304
00402 #define CGMESC_MESSAGE     1305
00403 #define CGMESC_APPL_DATA   1306
00404 #define CGMESC_VDC_PREC    1307
00405 #define  CGMESC_TOP_MODE    1308
00406 
00407 
00412 typedef union
00413 {
00414   int i[64];
00415   float f[64];
00416   char c[255];
00417 } gescape_arg;
00418 
00423 typedef struct
00424 {
00425   float refx, refy, refz;
00426   float camx, camy, camz;
00427   float upx, upy, upz;
00428   float field_of_view;
00429   float front, back;
00430   float projection;
00431 } camera_arg;
00432 #endif                           /* _STARBASE_INCLUDED */

Generated on Wed Feb 28 19:49:12 2007 for Tesseract by  doxygen 1.5.1