#ifndef _rgi_ #define _rgi_ /* * rgi.h - Literals to be used by iC-286 application programs. * * Copyright 1985, 1987, 1988, 1989, 1990 Intel Corporation */ #include typedef selector CGIDevice; #define CGIError 0x0ffff #define FINAL 0 /*********************************************************************/ /* Types defined to ease portability */ /*********************************************************************/ #if _ARCHITECTURE_ < 386 typedef unsigned int unsigned16; typedef signed int signed16; typedef unsigned long unsigned32; typedef signed long signed32; typedef unsigned int Word; #else typedef unsigned short unsigned16; typedef signed short signed16; typedef unsigned int unsigned32; typedef signed int signed32; typedef unsigned long Word; #endif typedef unsigned char unsigned8; typedef signed char signed8; typedef unsigned8 ColorIndex; typedef unsigned8 ColorValue; typedef unsigned8 RGI_Index; typedef unsigned8 Byte; typedef signed int Integer; typedef float Real; typedef signed16 VDC; typedef signed16 DC; typedef signed16 LineWidth; typedef signed16 MarkerSize; typedef signed16 PermWidth; typedef signed16 RunLength; typedef unsigned8 WindowId; typedef unsigned8 BitmapId; typedef unsigned8 FontId; typedef unsigned8 CornerId; typedef unsigned8 CursorId; typedef unsigned8 MenuId; #pragma noalign (POINT) typedef struct POINT{ VDC x; VDC y; } POINT; #pragma noalign (DirectColor) typedef struct DirectColor{ ColorValue r; ColorValue g; ColorValue b; } DirectColor; #pragma noalign (RunElement) typedef struct RunElement{ RunLength n; ColorIndex c; } RunElement; /* 4 Bit Per Pixel Default Color Table */ #define BLACK 0 #define BLUE 1 #define GREEN 2 #define CYAN 3 #define RED 4 #define MAGENTA 5 #define YELLOW 6 #define GRAY 7 #define BROWN 8 #define LIGHTBLUE 9 #define LIGHTGREEN 10 #define PURPLE 11 #define PINK 12 #define ORANGE 13 #define BEIGE 14 #define WHITE 15 /* clip indicator */ #define CLIP_OFF 0 #define CLIP_ON 1 /* scaling mode */ #define ABSTRACT_SCALING 0 #define METRIC_SCALING 1 /* color specification mode */ #define INDEXED_COLOR 0 #define DIRECT_COLOR 1 /* arc close */ #define CHORD_ARC 0 #define PIE_ARC 1 /* text and append text */ #define END_OF_STRING 0 #define MORE_STRING 1 /* attribute source flags */ #define INDIVIDUAL_ATTRIBUTE 0 #define BUNDLED_ATTRIBUTE 1 #define NO_CHANGE_ATTRIBUTE 2 /* attribute source flag types */ #define LINE_COLOR_ASF 1 #define LINE_WIDTH_ASF 2 #define LINE_TYPE_ASF 3 #define MARKER_TYPE_ASF 4 #define MARKER_SIZE_ASF 5 #define MARKER_COLOR_ASF 6 #define INTERIOR_STYLE_ASF 7 #define PATTERN_INDEX_ASF 8 #define HATCH_INDEX_ASF 9 #define FILL_COLOR_ASF 10 #define PERIM_VISIBILITY_ASF 11 #define PERIM_COLOR_ASF 12 #define PERIM_TYPE_ASF 13 #define PERIM_WIDTH_ASF 14 #define TEXT_FONT_INDEX_ASF 15 #define TEXT_PRECISION_ASF 16 #define CHAR_EXPANSION_ASF 17 #define CHAR_SPACING_ASF 18 #define TEXT_COLOR_ASF 19 /* line types */ #define SOLID_LINE 0 #define DASHED_LINE 1 #define DOTTED_LINE 2 #define DOTTED_DASHED_LINE 3 /* marker types */ #define DOT_MARKER 0 #define PLUS_MARKER 1 #define ASTERISK_MARKER 2 #define CIRCLE_MARKER 3 #define X_MARKER 4 #define TRIANGLE_MARKER 5 #define SQUARE_MARKER 6 #define DIAMOND_MARKER 7 /* perimeter types */ #define SOLID_PERIMETER 0 #define DASHED_PERIMETER 1 #define DOTTED_PERIMETER 2 #define DOTTED_DASHED_PERIMETER 3 /* perimeter visibility */ #define PERIMETER_ON 0 #define PERIMETER_OFF 1 /* interior style */ #define HOLLOW_INTERIOR 0 #define SOLID_INTERIOR 1 #define PATTERN_INTERIOR 2 #define HATCH_INTERIOR 3 /* hatch indices */ #define SMALL_HORIZONTAL_HATCH 0 #define SMALL_VERTICAL_HATCH 1 #define DIAGONAL_HATCH_1 2 #define DIAGONAL_HATCH_2 3 #define BIG_HORIZONTAL_HATCH 4 #define BIG_VERTICAL_HATCH 5 #define MEDIUM_HORIZONTAL_HATCH 6 #define MEDIUM_VERTICAL_HATCH 7 /* transparency */ #define OPAQUE 0 #define TRANSPARENT 1 /* character set index */ #define US_ASCII 0 /* text font index */ #define STROKE_FONT 0 #define POLYGONAL_FONT 1 #define RASTER_FONT 2 #define RASTER20_FONT 2 #define RASTER16_FONT 3 #define ROMAN_PLAIN_FONT 4 #define ROMAN_SIMPLEX_FONT 5 #define ROMAN_DUPLEX_FONT 6 #define ROMAN_COMPLEX_SMALL_FONT 7 #define ROMAN_COMPLEX_FONT 8 #define ROMAN_TRIPLEX_FONT 9 #define ITALIC_COMPLEX_SMALL_FONT 10 #define ITALIC_COMPLEX_FONT 11 #define ITALIC_TRIPLEX_FONT 12 #define SCRIPT_SIMPLEX_FONT 13 #define SCRIPT_COMPLEX_FONT 14 #define GOTHIC_GERMAN_FONT 15 #define GOTHIC_ENGLISH_FONT 16 #define GOTHIC_ITALIAN_FONT 17 #define GREEK_PLAIN_FONT 18 #define GREEK_SIMPLEX_FONT 19 #define GREEK_COMPLEX_SMALL_FONT 20 #define GREEK_COMPLEX_FONT 21 #define CYRILLIX_COMPLEX_FONT 22 #define SWISS7_FONT 23 #define SWISS7I_FONT 24 #define SWISS9_FONT 25 #define SWISS9I_FONT 26 #define SWISS10_FONT 27 #define SWISS10I_FONT 28 #define SWISS12_FONT 29 #define SWISS12I_FONT 30 #define SWISS14_FONT 31 #define SWISS14I_FONT 32 #define TIMESR7_FONT 33 #define TIMESR7I_FONT 34 #define TIMESR9_FONT 35 #define TIMESR9I_FONT 36 #define TIMESR10_FONT 37 #define TIMESR10I_FONT 38 #define TIMESR12_FONT 39 #define TIMESR12I_FONT 40 #define TIMESR14_FONT 41 #define TIMESR14I_FONT 42 #define INTRL_INDUST_FONT 43 #define OUTLINE_FONT 44 /* text font names */ #define RASTER16_FONT_NAME "Intel Raster 16" #define RASTER20_FONT_NAME "Intel Raster 20" #define STROKE_FONT_NAME "Intel Stroke" #define POLYGONAL_FONT_NAME "Intel Polygonal" #define ROMAN_PLAIN_FONT_NAME "Roman Plain" #define ROMAN_SIMPLEX_FONT_NAME "Roman Simplex" #define ROMAN_DUPLEX_FONT_NAME "Roman Duplex" #define ROMAN_COMPLEX_SMALL_FONT_NAME "Roman Complex Small" #define ROMAN_COMPLEX_FONT_NAME "Roman Complex" #define ROMAN_TRIPLEX_FONT_NAME "Roman Triplex" #define ITALIC_COMPLEX_SMALL_FONT_NAME "Italic Complex Small" #define ITALIC_COMPLEX_FONT_NAME "Italic Complex" #define ITALIC_TRIPLEX_FONT_NAME "Italic Triplex" #define SCRIPT_SIMPLEX_FONT_NAME "Script Simplex" #define SCRIPT_COMPLEX_FONT_NAME "Script Complex" #define GOTHIC_GERMAN_FONT_NAME "Gothic German" #define GOTHIC_ENGLISH_FONT_NAME "Gothic English" #define GOTHIC_ITALIAN_FONT_NAME "Gothic Italian" #define GREEK_PLAIN_FONT_NAME "Greek Plain" #define GREEK_SIMPLEX_FONT_NAME "Greek Simplex" #define GREEK_COMPLEX_SMALL_FONT_NAME "Greek Complex Small" #define GREEK_COMPLEX_FONT_NAME "Greek Complex" #define CYRILLIX_COMPLEX_FONT_NAME "Cyrillic Complex" #define SWISS7_FONT_NAME "Intel Swiss 7" #define SWISS7I_FONT_NAME "Intel Swiss Italic 7" #define SWISS9_FONT_NAME "Intel Swiss 9" #define SWISS9I_FONT_NAME "Intel Swiss Italic 9" #define SWISS10_FONT_NAME "Intel Swiss 10" #define SWISS10I_FONT_NAME "Intel Swiss Italic 10" #define SWISS12_FONT_NAME "Intel Swiss 12" #define SWISS12I_FONT_NAME "Intel Swiss Italic 12" #define SWISS14_FONT_NAME "Intel Swiss 14" #define SWISS14I_FONT_NAME "Intel Swiss Italic 14" #define TIMESR7_FONT_NAME "Intel Times Roman 7" #define TIMESR7I_FONT_NAME "Intel Times Roman Italic 7" #define TIMESR9_FONT_NAME "Intel Times Roman 9" #define TIMESR9I_FONT_NAME "Intel Times Roman Italic 9" #define TIMESR10_FONT_NAME "Intel Times Roman 10" #define TIMESR10I_FONT_NAME "Intel Times Roman Italic 10" #define TIMESR12_FONT_NAME "Intel Times Roman 12" #define TIMESR12I_FONT_NAME "Intel Times Roman Italic 12" #define TIMESR14_FONT_NAME "Intel Times Roman 14" #define TIMESR14I_FONT_NAME "Intel Times Roman Italic 14" #define INTRL_INDUST_FONT_NAME "International Industrial" #define OUTLINE_FONT_NAME "Intel Outline" /* text font languages */ #define AMERICAN_FONT 0 #define ENGLISH_FONT 1 #define FRENCH_FONT 2 #define RUSSIAN_FONT 3 #define GERMAN_FONT 4 #define SPANISH_FONT 5 /* Font File Stucture Header Section */ #pragma noalign (fnthdr_struc) typedef struct fnthdr_struc{ signed32 IDENTIFIER; unsigned16 SIZE; unsigned16 VERSION; unsigned16 DESCRIPTOR_SIZE; unsigned8 DESCRIPTOR_DAT; } fnthdr_struc; #pragma noalign (fntdesc_struc) typedef struct fntdesc_struc{ unsigned16 DESCRIPTOR_SIZE; unsigned8 DESCRIPTOR_DAT; } fntdesc_struc; #pragma noalign (fntname_struc) typedef struct fntname_struc{ unsigned16 NAME_SIZE; unsigned8 NAME_DAT; } fntname_struc; #pragma noalign (fntinfo_struc) typedef struct fntinfo_struc{ unsigned8 TYPE; unsigned8 LANGUAGE; unsigned16 CHAR_CODE_STRT; unsigned16 CHAR_CODE_END; unsigned16 CHAR_BOX_WIDTH; unsigned16 CHAR_BOX_HEIGHT; unsigned16 BASE_LINE; unsigned16 CHAR_OFFSET; unsigned16 CHAR_TOP; unsigned16 CHAR_CAP; unsigned16 CHAR_BOTTOM; unsigned16 RESERVED; unsigned16 CHAR_METRICS_P; unsigned16 CHAR_DEF_PTR; } fntinfo_struc; /* Character Metrics Record */ #pragma noalign (metrics_struc) typedef struct metrics_struc{ unsigned16 ASCENDER; unsigned16 DESCENDER; unsigned16 RIGHT; unsigned16 LEFT; } metrics_struc; /* text precision */ #define STRING_PRECISION 0 #define CHARACTER_PRECISION 1 #define STROKE_PRECISION 2 /* character path */ #define CHARACTER_RIGHT 0 #define CHARACTER_LEFT 1 #define CHARACTER_UP 2 #define CHARACTER_DOWN 3 /* horizontal text alignment */ #define ALIGN_LEFT 0 #define ALIGN_CENTER 1 #define ALIGN_RIGHT 2 #define ALIGN_NORMAL_HORIZONTAL 3 #define ALIGN_CONTINUOUS_HORIZONTAL 4 /* vertical text alignment */ #define ALIGN_TOP 0 #define ALIGN_CAP 1 #define ALIGN_HALF 2 #define ALIGN_BASE 3 #define ALIGN_BOTTOM 4 #define ALIGN_NORMAL_VERTICAL 5 #define ALIGN_CONTINUOUS_VERTICAL 6 /* VDC type */ #define INTEGER_VDC 0 #define REAL_VDC 1 #define BOTH_VDC_TYPES 2 /* input device types */ #define LOCATOR_DEVICE 0 #define STRING_DEVICE 1 /* input device mode */ #define REQUEST_MODE 0 #define SAMPLE_MODE 1 /* prompt state */ #define PROMPT_ON 0 #define PROMPT_OFF 1 /* echo state */ #define ECHO_ON 0 #define ECHO_OFF 1 /* echo types - locators only */ #define PLUS_CURSOR 0 #define CROSS_CURSOR 1 #define BAND_CURSOR 2 #define RECTANGLE_CURSOR 3 #define HARDWARE_CURSOR 4 #define BAND2_CURSOR 5 #define BAND2_HARDWARE_CURSOR 6 /* acknowledgement state */ #define ACK_ON 0 #define ACK_OFF 1 /* request status */ #define INPUT_OK 0 #define INPUT_TIMEOUT 0x40 #define INPUT_BUTTON_DOWN 0x01 #define INPUT_BUTTON_UP 0x02 #define INPUT_MENU_PICK 0x04 #define INPUT_MOVE 0X08 /* button state */ #define LEFT_BUTTON 0x010 #define MIDDLE_BUTTON 0x08 #define RIGHT_BUTTON 0x04 #define BUTTON_MASK 0x01C /* request timeout to wait forever */ #define WAIT_FOREVER -1 /* The Locator Return Data Structure */ #pragma noalign (loc_ret_data_struc) typedef struct loc_ret_data_struc{ unsigned8 status; VDC loc_x; VDC loc_y; DC scrn_x; DC scrn_y; WindowId window_id; BitmapId bitmap_id; RGI_Index device_num; unsigned8 event_type; unsigned32 time_stamp; } loc_ret_data_struc; /* The System Return Data Structure */ #pragma noalign (sys_ret_data_struc) typedef struct sys_ret_data_struc{ unsigned16 pool_max; unsigned16 pool_min; unsigned16 init_size; unsigned16 allocated; unsigned16 available; } sys_ret_data_struc; /* The Error Info Structure */ #pragma noalign (error_info_struc) typedef struct error_info_struc{ unsigned16 first_error; unsigned16 last_error; unsigned16 num_errors; } error_info_struc; /* Error codes specific to the iSBX279 Software */ #define E_BAD_BITMAP_ID 1 #define E_BAD_CURSOR_ID 2 #define E_BAD_DEPTH 3 #define E_BAD_FONT_ID 4 #define E_BAD_MENU_ID 5 #define E_BAD_WINDOW_ID 6 #define E_BITMAP_MEM 7 #define CONTEXT_ERR 8 #define DEV_IMPROPER_MODE 9 #define DEV_NOT_INITIALIZED 10 #define NON_EXISTANT_FUNCTION 11 #define NON_EXISTANT_DEVICE 12 #define RMX_EXCEPTION 13 #define MEMORY_ERR 14 #define INCOMPATIBLE_VERSION 15 #define OUT_OF_RANGE 16 #define E_BAD_UNIT 17 #define E_MAX_INPUT_PACKETS 18 #define WRONG_COUNT 19 #define INVALID_NUM_POINTS 20 /* The Window Info Structure */ #pragma noalign (window_info_struc) typedef struct window_info_struc{ WindowId identifier; BitmapId bitmap_id; unsigned8 priority; unsigned8 status; unsigned8 cur_status; CursorId cursor_id; DC bx_origin; DC by_origin; DC sx_origin; DC sy_origin; DC width; DC height; DC dis_res_x; DC dis_res_y; } window_info_struc; /* The Bitmap Info Structure */ #pragma noalign (bitrmap_info_struc) typedef struct bitmap_info_struc{ BitmapId identifier; unsigned32 mem_avail; unsigned8 status; DC width; DC height; DC depth; VDC VDC_x_ext_min; VDC VDC_y_ext_min; VDC VDC_x_ext_max; VDC VDC_y_ext_max; DC viewport_x_min; DC viewport_y_min; DC viewport_x_max; DC viewport_y_max; DC clip_rect_x_min; VDC clip_rect_y_min; VDC clip_rect_x_max; VDC clip_rect_y_max; unsigned8 clip_flag; DC act_clip_x_min; DC act_clip_y_min; DC act_clip_x_max; DC act_clip_y_max; DC dis_res_x; DC dis_res_y; } bitmap_info_struc; /* The Cursor Structure */ #pragma noalign (cursor_struc) typedef struct cursor_struc{ DC hot_spot_x; DC hot_spot_y; unsigned16 pattern[16]; } cursor_struc; /* The Cursor Info Structure */ #pragma noalign (cursor_info_struc) typedef struct cursor_info_struc{ CursorId identifier; unsigned8 status; DC hot_spot_x; DC hot_spot_y; DC cur_x_loc; DC cur_y_loc; unsigned16 pattern[16]; } cursor_info_struc; /* The Font Info Structure */ #pragma noalign (font_info_struc) typedef struct font_info_struc{ FontId identifier; unsigned8 type; unsigned8 language; unsigned16 char_start; unsigned16 char_end; unsigned16 char_box_width; unsigned16 char_box_height; unsigned16 base_line; unsigned16 char_offset; unsigned16 max_ascender; unsigned16 max_descender; unsigned16 max_right; unsigned16 max_left; unsigned8 name[0x20]; } font_info_struc; /* Define priority for new window to appear topmost */ #define TOP_WINDOW 255 /* Bit definitions of the window status - STATUS */ #define WINDOW_STATUS 0x003 /* WINDOW STATUS BITS */ #define FIELD_WIND 0x010 /* FIELD WINDOW */ #define VISIBLE 0x040 /* VISIBLE WINDOW */ #define INVISIBLE 0x000 /* INVISIBLE WINDOW */ #define BORDER_VISI 0x080 /* VISIBLE BORDER */ /* Bit definitions of the cursor status - CURSOR_STATUS */ #define ENBLE_CURSOR 0x001 /* CURSOR ENABLED */ #define STATUS_CTRL 0x006 /* CURSOR STATUS CONTROL */ #define CURSOR_STS 0x018 /* CURSOR STATUS BITS */ #define TRANS_CURSOR 0x020 /* TRANSPARENT CURSOR */ #define CROSS_HAIR 0x040 /* CROSS_HAIR */ #define LARGE_CURSOR 0x080 /* LARGE 16 X 16 CURSOR */ /* Bit definitions of the status for bitmap and cursor info structures */ #define SCREEN_VISI 0x001 /* Visible on the screen */ #define SELECTED 0x002 /* Selected as active */ #define ASSIGNED 0x004 /* Assigned to another object */ /* some 786 BitBlt Function Codes (logical ops) */ #define OP_CLEAR 0 #define OP_AND 1 #define OP_NOP 3 #define OP_REPLACE 5 #define OP_XOR 6 #define OP_OR 7 #define OP_NOT 10 #define OP_SET 15 #define MAX_TEXT_SIZE 80 /* Maximum text size */ #define MAX_FIELDS 255 /* Maximum number of fields */ #define MAX_MENU_SIZE 12000 /* Maximum menu size */ #define OUTSIDE_PICK 255 #define KEY_DOWN 1 #define KEY_UP 2 #define MENU_PICK 4 #define MOUSE_MOVE 8 /* Field type definitions */ #define VALID_FIELD 0 #define GRAPHIC_FIELD 1 #define UNDEFINED_FIELD 0xfe #define INVALID_FIELD 0xff /* Menu type definitions */ #define HORIZ_MENU 0x00 #define VERT_MENU 0x01 #define NON_DISPLAY_MENU 0x02 #define FIXED_MENU 0x03 /* Menu justification definitions */ #define CENTER_HJUST_MENU 0x00 #define LEFT_HJUST_MENU 0x01 #define RIGHT_HJUST_MENU 0x02 #define BASE_VJUST_MENU 0x00 #define TOP_VJUST_MENU 0x10 #define BOTTOM_VJUST_MENU 0x20 #define CENTER_VJUST_MENU 0x30 /* Menu edge visiblity definitions */ #define MENU_EDGE_VISI 0x01 #define MENU_EDGE_INVISI 0x00 /* Menu highlight definitions */ #define MENU_HIGHLIGHT 0x01 #define MENU_NOHIGHLIGHT 0x00 #pragma noalign("rgi_menu_field_struct") typedef struct rgi_menu_field_struct { unsigned8 field_type; unsigned8 field_id; unsigned8 event_trigger; unsigned8 hot_key; unsigned8 grab_id; unsigned8 highlight_on; unsigned8 edge_visi_on; unsigned8 string_len; unsigned8 string[MAX_TEXT_SIZE]; } rgi_menu_field_struct; #pragma noalign("rgi_menu_field_list_struct") typedef struct rgi_menu_field_list_struct { unsigned8 num_fields; unsigned16 fields[MAX_FIELDS]; } rgi_menu_field_list_struct; typedef struct { unsigned16 ulx; unsigned16 uly; unsigned16 lrx; unsigned16 lry; } rgi_menu_grab_struct; #pragma noalign("rgi_menu_cursor_struct") typedef struct rgi_menu_cursor_struct { unsigned16 next_cursor; unsigned16 cursor_token; unsigned8 cursor_id; unsigned16 hot_spot_x; unsigned16 hot_spot_y; unsigned16 cursor_def[16]; } rgi_menu_cursor_struct; typedef struct { unsigned16 menu_size; unsigned16 menu_title; unsigned16 rgi_menu_info; unsigned16 rgi_menu_fields; unsigned16 rgi_menu_main; unsigned16 menu_cursor; unsigned16 cmi_stk_size; unsigned32 cmi_cmnd_tbl; unsigned16 rgi_menu_grabs; } rgi_menu_header_struct; #pragma noalign("rgi_menu_info_struct") typedef struct rgi_menu_info_struct { /* Attributes for normal fields, i.e. selectable fields not picked. */ unsigned8 foreground_color; unsigned8 background_color; unsigned8 menu_font_index; unsigned8 drawing_mode; unsigned8 fill_font_index; unsigned8 fill_character; unsigned8 transparency_flag; /* Attributes for higlighted fields, i.e. selectable fields picked. */ unsigned8 highlight_foreground_color; unsigned8 highlight_background_color; unsigned8 highlight_menu_font_index; unsigned8 highlight_drawing_mode; unsigned8 highlight_fill_font_index; unsigned8 highlight_fill_character; unsigned8 highlight_transparency_flag; /* Attributes for invalid fields, i.e. non-selectable fields.*/ unsigned8 invalid_foreground_color; unsigned8 invalid_background_color; unsigned8 invalid_menu_font_index; unsigned8 invalid_drawing_mode; unsigned8 invalid_fill_font_index; unsigned8 invalid_fill_character; unsigned8 invalid_transparency_flag; /* Other configuration variables. */ unsigned16 color_depth; unsigned16 x_pad; unsigned16 menu_type; unsigned16 menu_justification; unsigned16 menu_origin_x; unsigned16 menu_origin_y; unsigned16 menu_edge_visi; unsigned16 edge_color; unsigned16 back_color; /* Variables needed by the firmware. */ unsigned16 x_origin; unsigned16 y_origin; unsigned16 menu_wind_id; unsigned16 bitmap_id; unsigned16 menu_width; unsigned16 menu_height; unsigned16 real_menu_width; unsigned16 max_chars_width; unsigned16 cell_height; unsigned16 cell_width; } rgi_menu_info_struct; /* Interface function prototypes */ extern void gqbeginmetafile( CGIDevice dev, void *name_p); extern void gqendmetafile( CGIDevice dev); extern void gqbeginpicture( CGIDevice dev, void *name_p, ColorIndex color); extern void gqendpicture( CGIDevice dev); extern void gqsetbackgroundcolor( CGIDevice dev, ColorIndex color); extern void gqsetvdcextent( CGIDevice dev, VDC x1, VDC y1, VDC x2, VDC y2); extern void gqsetcliprectangle( CGIDevice dev, VDC x1, VDC x2, VDC y1, VDC y2); extern void gqsetclipindicator( CGIDevice dev, RGI_Index flag); extern void gqclearviewsurface( CGIDevice dev); extern void gqresetdefaults( CGIDevice dev); extern void gqsetdeviceviewport( CGIDevice dev, DC x1, DC y1, DC x2, DC y2); extern void gqopencgi( CGIDevice dev); extern void gqclosecgi( CGIDevice dev); extern void gqwaitenddrawing( CGIDevice dev); extern void gqwaitnframes( CGIDevice dev, Integer num_frames); extern void gqsetscalingmode( CGIDevice dev, Byte mode, Real factor); extern void gqpolyline( CGIDevice dev, Integer count, POINT *coords_p); extern void gqline( CGIDevice dev, VDC x1, VDC y1, VDC x2, VDC y2); extern void gqpolymarker( CGIDevice dev, Integer count, POINT *coords_p); extern void gqmarker( CGIDevice dev, VDC x, VDC y); extern void gqpolygon( CGIDevice dev, Integer count, POINT *coords_p); extern void gqcircle( CGIDevice dev, VDC xc, VDC yc, VDC r); extern void gqarc( CGIDevice dev, VDC x1, VDC y1, VDC x2, VDC y2, VDC x3, VDC y3); extern void gqarcclose( CGIDevice dev, VDC x1, VDC y1, VDC x2, VDC y2, VDC x3, VDC y3, Byte close); extern void gqcellarray( CGIDevice dev, VDC x1, VDC y1, VDC x2, VDC y2, Integer horiz, Integer vert, ColorIndex *index_p); extern void gqtext( CGIDevice dev, VDC x, VDC y, RGI_Index flag, Integer count, void *str_p); extern void gqappendtext( CGIDevice dev, RGI_Index flag, Integer count, void *str_p); extern void gqarccenter( CGIDevice dev, VDC cx, VDC cy, VDC delx1, VDC dely1, VDC delx2, VDC dely2, VDC radius); extern void gqarccenterclose( CGIDevice dev, VDC cx, VDC cy, VDC delx1, VDC dely1, VDC delx2, VDC dely2, VDC radius, RGI_Index type); extern void gqdisjointpolyline( CGIDevice dev, Integer count, POINT *coords_p); extern void gqrectangle( CGIDevice dev, VDC x1, VDC y1, VDC x2, VDC y2); extern void gqsetasfs( CGIDevice dev, Integer num_asfs, void *asf_p); extern void gqsetpolylinebundleindex( CGIDevice dev, RGI_Index bun_index); extern void gqsetpolylinebundlerep( CGIDevice dev, RGI_Index bun_index, RGI_Index type, LineWidth width, ColorIndex color); extern void gqsetlinetype( CGIDevice dev, RGI_Index type); extern void gqsetlinewidth( CGIDevice dev, LineWidth width); extern void gqsetlinecolor( CGIDevice dev, ColorIndex color); extern void gqsetpolymarkerbundleindex( CGIDevice dev, RGI_Index bun_index); extern void gqsetpolymarkerbundlerep( CGIDevice dev, RGI_Index bun_index, RGI_Index type, MarkerSize siz, ColorIndex color); extern void gqsetmarkertype( CGIDevice dev, Integer type); extern void gqsetmarkersize( CGIDevice dev, MarkerSize siz); extern void gqsetmarkercolor( CGIDevice dev, ColorIndex color); extern void gqsetfillareabundleindex( CGIDevice dev, RGI_Index bun_index); extern void gqsetfillareabundlerep( CGIDevice dev, RGI_Index bun_index, PermWidth width, RGI_Index type, ColorIndex color, ColorIndex fillcolor, RGI_Index intstyle, RGI_Index pervis, RGI_Index hatchidx, RGI_Index patidx); extern void gqsetinteriorstyle( CGIDevice dev, RGI_Index style, RGI_Index perim); extern void gqsetfillcolor( CGIDevice dev, ColorIndex color); extern void gqsethatchindex( CGIDevice dev, RGI_Index hatchindex); extern void gqsetpatternindex( CGIDevice dev, RGI_Index patternindex); extern void gqsetpatterntable( CGIDevice dev, RGI_Index patternindex, Integer col, Integer row, void *pat_p); extern void gqsetpatternreferencepoint( CGIDevice dev, VDC x, VDC y); extern void gqsetpatternsize( CGIDevice dev, VDC width, VDC height); extern void gqsetperimetertype( CGIDevice dev, RGI_Index type); extern void gqsetperimeterwidth( CGIDevice dev, PermWidth width); extern void gqsetperimetercolor( CGIDevice dev, ColorIndex color); extern void gqsettextfontindex( CGIDevice dev, FontId font_index); extern void gqsettextfontlist( CGIDevice dev, Integer num_fonts, Word font_list_size, void *font_list_p); extern void gqsettextbundleindex( CGIDevice dev, RGI_Index bun_index); extern void gqsettextbundlerep( CGIDevice dev, RGI_Index bun_index, ColorIndex color, FontId font, RGI_Index prec, Real expn, Real spac); extern void gqsettextprecision( CGIDevice dev, RGI_Index prec); extern void gqsetcharacterexpansionfactor( CGIDevice dev, Real expn); extern void gqsetcharacterspacing( CGIDevice dev, Real spac); extern void gqsettextcolor( CGIDevice dev, ColorIndex color); extern void gqsetcharacterheight( CGIDevice dev, VDC height); extern void gqsetcharacterorientation( CGIDevice dev, VDC x1, VDC y1, VDC x2, VDC y2); extern void gqsetcharacterpath( CGIDevice dev, RGI_Index path); extern void gqsettextalignment( CGIDevice dev, RGI_Index hor, RGI_Index ver, Real horfac, Real verfac); extern void gqsetcolortable( CGIDevice dev, ColorIndex start, RGI_Index numbr, void *newcolor_p); extern void gqsettransparency( CGIDevice dev, RGI_Index trans_flag); extern void gqsetmarkerfontindex( CGIDevice dev, FontId font_index); extern void gqsetdisplaycorner( CGIDevice dev, DC x, DC y); extern void gqsetblinkmode( CGIDevice dev, RGI_Index blink_index, RGI_Index mode); extern void gqsetblinkcolor( CGIDevice dev, RGI_Index blink_index, ColorValue r, ColorValue g, ColorValue b); extern void gqsetblinkinterval( CGIDevice dev, Integer primary_int, Integer secondary_int); extern void gqsetimagebounds( CGIDevice dev, VDC x1, VDC y1, VDC x2, VDC y2); extern void gqdisplayimage( CGIDevice dev, Integer numruns, RunElement *runlengths_p); extern void gqsetcursorcolor( CGIDevice dev, Byte devtype, Byte devnum, ColorIndex color); extern void gqsetwritemask( CGIDevice dev, Word mask); extern void gqsetcursorsize( CGIDevice dev, Byte devtype, Byte devnum, VDC xs, VDC ys); extern void gqcreatewindow( CGIDevice dev, WindowId window_id, BitmapId bitmap_id, RGI_Index pri, RGI_Index sts, DC bx_origin, DC by_origin, DC sx_origin, DC sy_origin, DC width, DC height); extern void gqdeletewindow( CGIDevice dev, WindowId window_id); extern void gqdeleteallwindows( CGIDevice dev); extern void gqcreatebitmap( CGIDevice dev, BitmapId bitmap_id, DC width, DC height, RGI_Index depth); extern void gqdeletebitmap( CGIDevice dev, BitmapId bitmap_id); extern void gqdeleteallbitmaps( CGIDevice dev); extern void gqsetwindowpriority( CGIDevice dev, WindowId window_id, RGI_Index priority); extern void gqpopwindow( CGIDevice dev, WindowId window_id); extern void gqpushwindow( CGIDevice dev, WindowId window_id); extern void gqchangebitmap( CGIDevice dev, WindowId window_id, BitmapId bitmap_id, DC bx_origin, DC by_origin, RGI_Index priority, DC width, DC height); extern void gqselectdrawingbitmap( CGIDevice dev, BitmapId bitmap_id); extern void gqmovewindow( CGIDevice dev, WindowId window_id, DC delta_x, DC delta_y); extern void gqpanbitmap( CGIDevice dev, WindowId window_id, DC delta_x, DC delta_y); extern void gqpanwindow( CGIDevice dev, WindowId window_id, DC delta_x, DC delta_y); extern void gqresizewindow( CGIDevice dev, WindowId window_id, CornerId corner_id, DC delta_x, DC delta_y); extern void gqsetwindowvisi( CGIDevice dev, WindowId window_id, RGI_Index visi); extern void gqsetbordervisi( CGIDevice dev, WindowId window_id, RGI_Index visi); extern void gqpopserverwindows( CGIDevice dev); extern void gqpushserverwindows( CGIDevice dev); extern void gqsetmenuwindowpriority( CGIDevice dev, RGI_Index priority); extern void gqenablescreen( CGIDevice dev); extern void gqdisablescreen( CGIDevice dev); extern void gqsetfieldcolor( CGIDevice dev, ColorIndex color); extern void gqsetbordercolor( CGIDevice dev, ColorIndex color); extern void gqset1bppcolorpad( CGIDevice dev, ColorIndex color); extern void gqset2bppcolorpad( CGIDevice dev, ColorIndex color); extern void gqset4bppcolorpad( CGIDevice dev, ColorIndex color); extern void gqsetcursorcolorpad( CGIDevice dev, ColorIndex color); extern void gqsetcursorvisi( CGIDevice dev, RGI_Index visi); extern void gqsetcursortransparency( CGIDevice dev, RGI_Index trans_flag); extern void gqsetcursorforegroundcolor( CGIDevice dev, ColorValue R, ColorValue G, ColorValue B); extern void gqsetcursorbackgroundcolor( CGIDevice dev, ColorValue R, ColorValue G, ColorValue B); extern void gqsetkeyboardfocus( CGIDevice dev, WindowId window_id); extern void gqsetlocatordevicetype( CGIDevice dev, RGI_Index device_type); extern void gqloadfont( CGIDevice dev, void *font_p); extern void gqdeletefont( CGIDevice dev, void *name_p); extern void gqsetdrawingmode( CGIDevice dev, RGI_Index mode); extern void gqbitblt( CGIDevice dev, BitmapId src_bitmap, DC src_x, DC src_y, DC dst_x, DC dst_y, DC delta_x, DC delta_y); extern void gqloadbitmap( CGIDevice dev, DC x, DC y, DC delta_x, DC delta_y, void *image_p, Word image_size); extern void gqsavebitmap( CGIDevice dev, DC x, DC y, DC delta_x, DC delta_y, void *image_p, Word image_size); extern void gqsavescreen( CGIDevice dev, DC x, DC y, DC delta_x, DC delta_y, void *image_p, Word image_size); extern void gqloadcursor( CGIDevice dev, CursorId Cursor_id, cursor_struc *cursor_p); extern void gqdeletecursor( CGIDevice dev, CursorId cursor_id); extern void gqassigncursor( CGIDevice dev, CursorId cursor_id, WindowId window_id); extern void gqloadmenu( CGIDevice dev, MenuId Menu_id, void *Menu_p); extern void gqdeletemenu( CGIDevice dev, MenuId menu_id); extern void gqselectmenu( CGIDevice dev, MenuId menu_id); extern void gqenablesystemmenu( CGIDevice dev); extern void gqdisablesystemmenu( CGIDevice dev); extern void gqinqerrorinfo( CGIDevice dev, error_info_struc *resp_p, Word resp_siz); extern void gqinqwindowinfo( CGIDevice dev, WindowId window_id, window_info_struc *resp_p, Word resp_siz); extern void gqreqwindowinfo( CGIDevice dev, WindowId window_id, Word time_cnt, window_info_struc *resp_p, Word resp_siz); extern void gqinqbitmapinfo( CGIDevice dev, BitmapId bitmap_id, bitmap_info_struc *resp_p, Word resp_siz); extern void gqinqcursorinfo( CGIDevice dev, CursorId cursor_id, cursor_info_struc *resp_p, Word resp_siz); extern void gqinqfontinfo( CGIDevice dev, FontId font_id, font_info_struc *resp_p, Word resp_siz); extern void gqinqsysinfo( CGIDevice dev, sys_ret_data_struc *ret_data_p, Word resp_siz); extern void gqinitializelocator( CGIDevice dev, RGI_Index devnum, VDC xinit, VDC yinit, RGI_Index curs, VDC x1, VDC y1, VDC x2, VDC y2); extern void gqinitializestring( CGIDevice dev, RGI_Index devnum, RGI_Index mode, VDC x1, VDC y1, VDC x2, VDC y2, void *initstringp); extern void gqreleaseinputdevice( CGIDevice dev, RGI_Index devtype, RGI_Index devnum); extern void gqsetinputdevicemode( CGIDevice dev, RGI_Index devtype, RGI_Index devnum, RGI_Index devmode); extern void gqsamplelocator( CGIDevice dev, RGI_Index devnum, loc_ret_data_struc *ret_data_p, Word ret_data_size); extern void gqsamplestring( CGIDevice dev, RGI_Index devnum, void *retstring_p, Word retstring_siz); extern void gqrequestlocator( CGIDevice dev, RGI_Index devnum, Integer timeout, loc_ret_data_struc *ret_data_p, Word ret_data_size); extern void gqrequeststring( CGIDevice dev, RGI_Index devnum, Integer timeout, RGI_Index *stat_p, void *retstring_p, Word retstring_siz, unsigned long *time_stamp_p); extern void gqsetpromptstate( CGIDevice dev, RGI_Index devtype, RGI_Index devnum, RGI_Index promptmode); extern void gqsetechostate( CGIDevice dev, RGI_Index devtype, RGI_Index devnum, RGI_Index echomode); extern void gqsetlocatorposition( CGIDevice dev, RGI_Index devnum, VDC x, VDC y); extern void gqsetanchorposition( CGIDevice dev, RGI_Index devnum, VDC x1, VDC y1, VDC x2, VDC y2); extern void gqsetechoregion( CGIDevice dev, RGI_Index devtype, RGI_Index devnum, VDC x1, VDC y1, VDC x2, VDC y2); extern void gqsetechomode( CGIDevice dev, RGI_Index devtype, RGI_Index devnum, RGI_Index echomode); extern void gqsetlocatorsensitivity( CGIDevice dev, Real a_x, Real b_x, Real a_y, Real b_y); extern void gqsetlocatortrigger( CGIDevice dev, RGI_Index devnum, Byte trigger); extern void cgi_flush( CGIDevice devnum, Word *except); extern CGIDevice cgi_initialize( TOKEN dev_conn, void *buffp, Word bufflen, Word *except); extern void cgi_send( CGIDevice devnum, void *buffp, Word bufflen, Word *except); extern unsigned int cgi_sendreply( CGIDevice devnum, void *buffp, Word bufflen, void *respp, Word resplen, Word *except); extern void cgi_terminate( CGIDevice devnum, Word *except); extern void cgi_send_cmd( CGIDevice devnum, void *buffp, Word bufflen, Word *except); extern void gqstartinput( CGIDevice dev, RGI_Index strdevnum, RGI_Index locdevnum, RGI_Index echomode, VDC xinit, VDC yinit, RGI_Index curs, VDC x1, VDC y1, VDC x2, VDC y2, Word *except); extern void gqendinput( CGIDevice dev, Word *except); extern void gqrequestinput( CGIDevice dev, Integer timeout, RGI_Index *dev_class_p, RGI_Index *stat_p, unsigned long *time_stamp_p, POINT *coord_p, void *retstring_p, Word retstring_siz, Word *except); extern void gqarminput( CGIDevice dev, Integer timeout, Word retstring_siz, Word *except); extern void gqgetinput( CGIDevice dev, RGI_Index *dev_class_p, RGI_Index *stat_p, unsigned long *time_stamp_p, POINT *coord_p, void *retstring_p, Word *except); extern void gqgetevent( CGIDevice dev, RGI_Index *dev_class_p, RGI_Index *stat_p, unsigned long *time_stamp_p, void *ret_data_p, Word ret_data_size, Word *except); extern void gqrequestevent( CGIDevice dev, Integer timeout, Word retstring_siz, RGI_Index *dev_class_p, RGI_Index *stat_p, unsigned long *time_stamp_p, void *ret_data_p, Word ret_data_size, Word *except); extern void gqinitmenupac(const far unsigned int *rgi_menu); extern selector gqopenmenu( char menu_type, int num_fields, int num_grab_areas, int num_cursors, int menu_width, int menu_height, char menu_justification, DC menu_origin_x, DC menu_origin_y, Word *except); extern void gqclosemenu( selector menu_token, Word *except); extern void gqaddmenufield( selector menu_token, char field_type, char field_id, char field_trigger, char field_hot_key, char grab_area_id, char hilight_indicator, char edge_visi, char *field_text, Word *except); extern void gqaddmenugrabarea( selector menu_token, char grab_area_id, DC grab_area_x, DC grab_area_y, int grab_area_width, int grab_area_height, Word *except); extern void gqaddmenucursor( selector menu_token, char cursor_id, DC hot_spot_x, DC hot_spot_y, int cursor_def[], Word *except); extern void gqsetmenudepth( selector menu_token, int menu_depth, Word *except); extern void gqsetgrabareaedgecolor( selector menu_token, ColorIndex grab_area_edge_color, Word *except); extern void gqsetgrabareaedgevisi( selector menu_token, char grab_area_visi, Word *except); extern void gqsetmenubackgroundcolor( selector menu_token, ColorIndex background_color, Word *except); extern void gqsetnormalfieldbackcolor( selector menu_token, ColorIndex background_color, Word *except); extern void gqsetnormalfieldforecolor( selector menu_token, ColorIndex foreground_color, Word *except); extern void gqsetnormalfieldfontidx( selector menu_token, FontId font_index, Word *except); extern void gqsethilightfieldbackcolor( selector menu_token, ColorIndex background_color, Word *except); extern void gqsethilightfieldforecolor( selector menu_token, ColorIndex foreground_color, Word *except); extern void gqsethilightfieldfontidx( selector menu_token, FontId font_index, Word *except); extern void gqsetinvalidfieldbackcolor( selector menu_token, ColorIndex background_color, Word *except); extern void gqsetinvalidfieldforecolor( selector menu_token, ColorIndex foreground_color, Word *except); extern void gqsetinvalidfieldfontidx( selector menu_token, FontId font_index, Word *except); /************************************/ /* available skeletal menus */ /************************************/ extern const far unsigned int static_menu; extern const far unsigned int pop_menu; #endif