00001
00002
00003
00004
00007 #ifndef _MT_GEMLIB_H_
00008 # define _MT_GEMLIB_H_
00009
00010 # include <compiler.h>
00011
00012 #ifndef INT16
00013 #define INT16 short
00014 #endif
00015
00016 # ifdef __GEMLIB_OLDBIND
00017 # undef _MT_GEMLIB_H_
00018
00019 # ifndef __GEMLIB_HAVE_DEFS
00020 # define __GEMLIB_HAVE_DEFS
00021 # else
00022 # undef __GEMLIB_DEFS
00023 # endif
00024
00025 # else
00026 # define __GEMLIB_DEFS
00027 # ifndef _GEM_VDI_P_
00028 # define __GEMLIB_AES
00029 # endif
00030 # ifndef _GEM_AES_P_
00031 # define __GEMLIB_VDI
00032 # endif
00033 # endif
00034
00035 __BEGIN_DECLS
00036
00037
00038
00039
00040
00041
00042
00043
00044 #define __GEMLIB__ __GEMLIB_MAJOR__
00045 #define __GEMLIB_MAJOR__ 0
00046 #define __GEMLIB_MINOR__ 43
00047 #define __GEMLIB_REVISION__ 3
00048 #define __GEMLIB_BETATAG__ ""
00050
00051 #define MGEMLIB 42
00052 #define __MGEMLIB__ 42
00055 #ifdef __GEMLIB_DEFS
00056
00057
00058
00059
00060
00061 #define NIL 0
00062 #define DESKTOP_HANDLE 0
00063 #define DESK DESKTOP_HANDLE
00065
00066 #define APC_HIDE 10
00067 #define APC_SHOW 11
00068 #define APC_TOP 12
00069 #define APC_HIDENOT 13
00070 #define APC_INFO 14
00071 #define APC_MENU 15
00072 #define APC_WIDGETS 16
00074
00075 #define APCI_HIDDEN 0x01
00076 #define APCI_HASMBAR 0x02
00077 #define APCI_HASDESK 0x04
00079
00080 #define AES_LARGEFONT 0
00081 #define AES_SMALLFONT 1
00082 #define AES_SYSTEM 2
00083 #define AES_LANGUAGE 3
00084 #define AES_PROCESS 4
00085 #define AES_PCGEM 5
00086 #define AES_INQUIRE 6
00087 #define AES_MOUSE 8
00088 #define AES_MENU 9
00089 #define AES_SHELL 10
00090 #define AES_WINDOW 11
00091 #define AES_MESSAGE 12
00092 #define AES_OBJECT 13
00093 #define AES_FORM 14
00095
00096 #define SYSTEM_FONT 0
00097 #define OUTLINE_FONT 1
00099
00100 #define AESLANG_ENGLISH 0
00101 #define AESLANG_GERMAN 1
00102 #define AESLANG_FRENCH 2
00103 #define AESLANG_SPANISH 4
00104 #define AESLANG_ITALIAN 5
00105 #define AESLANG_SWEDISH 6
00107
00108 #define APR_NOWAIT -1
00110
00111 #define APP_FIRST 0
00112 #define APP_NEXT 1
00113 #define APP_DESK 2
00115
00116 #define APP_SYSTEM 0x01
00117 #define APP_APPLICATION 0x02
00118 #define APP_ACCESSORY 0x04
00119 #define APP_SHELL 0x08
00121
00122 #define APPEVNT_TIMER 0
00123 #define APPEVNT_BUTTON 1
00124 #define APPEVNT_MOUSE 2
00125 #define APPEVNT_KEYBOARD 3
00141 typedef struct pEvntrec
00142 {
00143 long ap_event;
00144 long ap_value;
00145 } EVNTREC;
00146
00147
00148 #define LEFT_BUTTON 0x0001
00149 #define RIGHT_BUTTON 0x0002
00150 #define MIDDLE_BUTTON 0x0004
00152 #define K_RSHIFT 0x0001
00153 #define K_LSHIFT 0x0002
00154 #define K_CTRL 0x0004
00155 #define K_ALT 0x0008
00157
00158 #define EDC_INQUIRE 0
00159 #define EDC_SET 1
00161
00162
00178 #define MN_SELECTED 10
00179
00195 #define WM_REDRAW 20
00196
00212 #define WM_TOPPED 21
00213
00228 #define WM_CLOSED 22
00229
00247 #define WM_FULLED 23
00248
00292 #define WM_ARROWED 24
00293
00307 #define WM_HSLID 25
00308
00322 #define WM_VSLID 26
00323
00340 #define WM_SIZED 27
00341
00359 #define WM_MOVED 28
00360
00373 #define WM_NEWTOP 29
00374
00393 #define WM_UNTOPPED 30
00394
00413 #define WM_ONTOP 31
00414
00436 #define WM_BOTTOM 33
00437 #define WM_BOTTOMED WM_BOTTOM
00457 #define WM_ICONIFY 34
00458
00477 #define WM_UNICONIFY 35
00478
00497 #define WM_ALLICONIFY 36
00498
00514 #define WM_TOOLBAR 37
00515
00528 #define AC_OPEN 40
00529
00547 #define AC_CLOSE 41
00548
00578 #define AP_TERM 50
00579
00593 #define AP_TFAIL 51
00594
00595 #define AP_RESCHG 57
00597
00598 #define CT_UPDATE 50
00599 #define CT_MOVE 51
00600 #define CT_NEWTOP 52
00601 #define CT_KEY 53
00618 #define SHUT_COMPLETED 60
00619
00638 #define RESCHG_COMPLETED 61
00639
00641 #define RESCH_COMPLETED RESCHG_COMPLETED
00642
00660 #define AP_DRAGDROP 63
00661
00675 #define SH_WDRAW 72
00676
00677 #define SC_CHANGED 80
00678 #define PRN_CHANGED 82
00679 #define FNT_CHANGED 83
00697 #define THR_EXIT 88
00698
00699 #define PA_EXIT 89
00716 #define CH_EXIT 90
00717
00718 #define WM_M_BDROPPED 100
00740 #define SM_M_SPECIAL 101
00741 #define SM_M_RES2 102
00742 #define SM_M_RES3 103
00743 #define SM_M_RES4 104
00744 #define SM_M_RES5 105
00745 #define SM_M_RES6 106
00746 #define SM_M_RES7 107
00747 #define SM_M_RES8 108
00748 #define SM_M_RES9 109
00749 #define WM_SHADED 22360
00750 #define WM_UNSHADED 22361
00752
00753 #define SMC_TIDY_UP 0
00754 #define SMC_TERMINATE 1
00755 #define SMC_SWITCH 2
00756 #define SMC_FREEZE 3
00757 #define SMC_UNFREEZE 4
00758 #define SMC_RES5 5
00759 #define SMC_UNHIDEALL 6
00760 #define SMC_HIDEOTHERS 7
00761 #define SMC_HIDEACT 8
00763
00764 #define MO_ENTER 0
00765 #define MO_LEAVE 1
00767
00768 #define MU_KEYBD 0x0001
00769 #define MU_BUTTON 0x0002
00770 #define MU_M1 0x0004
00771 #define MU_M2 0x0008
00772 #define MU_MESAG 0x0010
00773 #define MU_TIMER 0x0020
00774 #define MU_WHEEL 0x0040
00775 #define MU_MX 0x0080
00776 #define MU_NORM_KEYBD 0x0100
00777 #define MU_DYNAMIC_KEYBD 0x0200
00779
00780 #define FA_NOICON "[0]"
00781 #define FA_ERROR "[1]"
00782 #define FA_QUESTION "[2]"
00783 #define FA_STOP "[3]"
00784 #define FA_INFO "[4]"
00785 #define FA_DISK "[5]"
00787
00788 #define FMD_START 0
00789 #define FMD_GROW 1
00790 #define FMD_SHRINK 2
00791 #define FMD_FINISH 3
00793
00794 #define FERR_FILENOTFOUND 2
00795 #define FERR_PATHNOTFOUND 3
00796 #define FERR_NOHANDLES 4
00797 #define FERR_ACCESSDENIED 5
00798 #define FERR_LOWMEM 8
00799 #define FERR_BADENVIRON 10
00800 #define FERR_BADFORMAT 11
00801 #define FERR_BADDRIVE 15
00802 #define FERR_DELETEDIR 16
00803 #define FERR_NOFILES 18
00805
00806 #define FSEL_CANCEL 0
00807 #define FSEL_OK 1
00809
00810 #define ME_INQUIRE 0
00811 #define ME_ATTACH 1
00812 #define ME_REMOVE 2
00814
00815 #define SCROLL_NO 0
00816 #define SCROLL_YES 1
00818
00819 #define MENU_INQUIRE -1
00820 #define MENU_REMOVE 0
00821 #define MENU_INSTALL 1
00822 #define MENU_GETMODE 3
00823 #define MENU_SETMODE 4
00824 #define MENU_UPDATE 5
00825 #define MENU_INSTL 100
00828
00829 #define MENU_HIDDEN 0x0001
00830 #define MENU_PULLDOWN 0x0002
00831 #define MENU_SHADOWED 0x0004
00833
00834 #define UNCHECK 0
00835 #define CHECK 1
00837
00838 #define DISABLE 0
00839 #define ENABLE 1
00841
00842 #define MIS_GETALIGN 0
00843 #define MIS_SETALIGN 1
00845
00846 #define SCROLL_LISTBOX -1
00848
00849 #define REG_NEWNAME -1
00851
00852 #define MN_INQUIRE 0
00853 #define MN_CHANGE 1
00855
00856 #define HIGHLIGHT 0
00857 #define UNHIGHLIGHT 1
00861 typedef struct _mn_set
00862 {
00863 long display;
00864 long drag;
00865 long delay;
00866 long speed;
00867 short height;
00868 } MN_SET;
00869
00870
00871 #define SHEL_BUFSIZE (-1)
00873
00874 #define SHP_HELP 0
00877 typedef struct
00878 {
00882 char *newcmd;
00886 long psetlimit;
00890 long prenice;
00895 char *defdir;
00899 char *env;
00903 short uid;
00907 short gid;
00908 } SHELW;
00909
00911 typedef struct
00912 {
00913 char *command;
00914 long limit;
00915 long nice;
00916 char *defdir;
00917 char *env;
00918 long flags;
00919 } XSHW_COMMAND;
00920
00922 typedef struct
00923 {
00924 long __CDECL (*proc)(void *par);
00929 void *user_stack;
00935 unsigned long stacksize;
00936 short mode;
00937 long res1;
00938 } THREADINFO;
00939
00941 typedef struct
00942 {
00943 short dummy;
00944 long magic;
00950 short isfirst;
00958 long lasterr;
00959 short wasgr;
00960 } SHELTAIL;
00961
00962
00963
00967 #define SWM_LAUNCH 0
00968
00970 #define SWM_LAUNCHNOW 1
00971 #define SWM_LAUNCHACC 3
00972 #define SWM_SHUTDOWN 4
00973 #define SWM_REZCHANGE 5
00974 #define SWM_BROADCAST 7
00975 #define SWM_ENVIRON 8
00979 #define SWM_NEWMSG 9
00980 #define SWM_AESMSG 10
00981 #define SWM_THRCREATE 20
00982 #define SWM_THREXIT 21
00983 #define SWM_THRKILL 22
00985
00986 #define SHW_NOEXEC SWM_LAUNCH
00987 #define SHW_EXEC SWM_LAUNCHNOW
00988 #define SHW_EXEC_ACC SWM_LAUNCHACC
00989 #define SHW_SHUTDOWN SWM_SHUTDOWN
00990 #define SHW_RESCHNG SWM_REZCHANGE
00991 #define SHW_BROADCAST SWM_BROADCAST
00992 #define SHW_INFRECGN SWM_NEWMSG
00993 #define SHW_AESSEND SWM_AESMSG
00994 #define SHW_THR_CREATE SWM_THRCREATE
00995 #define SHW_THR_EXIT SWM_THREXIT
00996 #define SHW_THR_KILL SWM_THRKILL
00998
00999 #define TOSAPP 0
01000 #define GEMAPP 1
01002
01003 #define SHW_IMMED 0
01004 #define SHW_CHAIN 1
01005 #define SHW_DOS 2
01006 #define SHW_PARALLEL 100
01007 #define SHW_SINGLE 101
01009
01010 #define CL_NORMAL 0
01011 #define CL_PARSE 1
01013
01014 #define SD_ABORT 0
01015 #define SD_PARTIAL 1
01016 #define SD_COMPLETE 2
01018
01019 #define ENVIRON_SIZE 0
01020 #define ENVIRON_CHANGE 1
01021 #define ENVIRON_COPY 2
01023
01024 #define NM_APTERM 0x0001
01026
01027 #define AP_AESTERM 52
01029
01030 #define SW_PSETLIMIT 0x0100
01031 #define SW_PRENICE 0x0200
01032 #define SW_DEFDIR 0x0400
01033 #define SW_ENVIRON 0x0800
01035
01036 #define SW_UID 0x1000
01037 #define SW_GID 0x2000
01039
01040 #define SHW_XMDFLAGS 0x1000
01042
01043 #define SHW_XMDLIMIT SW_PSETLIMIT
01044 #define SHW_XMDNICE SW_PRENICE
01045 #define SHW_XMDDEFDIR SW_DEFDIR
01046 #define SHW_XMDENV SW_ENVIRON
01048
01049 #define R_TREE 0
01050 #define R_OBJECT 1
01051 #define R_TEDINFO 2
01052 #define R_ICONBLK 3
01053 #define R_BITBLK 4
01054 #define R_STRING 5
01055 #define R_IMAGEDATA 6
01056 #define R_OBSPEC 7
01057 #define R_TEPTEXT 8
01058 #define R_TEPTMPLT 9
01059 #define R_TEPVALID 10
01060 #define R_IBPMASK 11
01061 #define R_IBPDATA 12
01062 #define R_IBPTEXT 13
01063 #define R_BIPDATA 14
01064 #define R_FRSTR 15
01065 #define R_FRIMG 16
01067
01068 #define SCRAP_CSV 0x0001
01069 #define SCRAP_TXT 0x0002
01070 #define SCRAP_GEM 0x0004
01071 #define SCRAP_IMG 0x0008
01072 #define SCRAP_DCA 0x0010
01073 #define SCRAP_DIF 0x0020
01074 #define SCRAP_USR 0x8000
01076
01077 #define NAME 0x0001
01078 #define CLOSER 0x0002
01079 #define FULLER 0x0004
01080 #define MOVER 0x0008
01081 #define INFO 0x0010
01082 #define SIZER 0x0020
01083 #define UPARROW 0x0040
01084 #define DNARROW 0x0080
01085 #define VSLIDE 0x0100
01086 #define LFARROW 0x0200
01087 #define RTARROW 0x0400
01088 #define HSLIDE 0x0800
01089 #define HOTCLOSEBOX 0x1000
01090 #define MENUBAR 0x1000
01091 #define BACKDROP 0x2000
01092 #define SMALLER 0x4000
01093 #define ICONIFIER SMALLER
01095
01096 #define WC_BORDER 0
01097 #define WC_WORK 1
01099
01100 #define WF_KIND 1
01101 #define WF_NAME 2
01102 #define WF_INFO 3
01103 #define WF_WORKXYWH 4
01104 #define WF_CURRXYWH 5
01105 #define WF_PREVXYWH 6
01106 #define WF_FULLXYWH 7
01107 #define WF_HSLIDE 8
01108 #define WF_VSLIDE 9
01109 #define WF_TOP 10
01110 #define WF_FIRSTXYWH 11
01111 #define WF_NEXTXYWH 12
01112 #define WF_RESVD 13
01113 #define WF_NEWDESK 14
01114 #define WF_HSLSIZE 15
01115 #define WF_VSLSIZE 16
01116 #define WF_SCREEN 17
01117 #define WF_COLOR 18
01118 #define WF_DCOLOR 19
01119 #define WF_OWNER 20
01120 #define WF_BEVENT 24
01121 #define WF_BOTTOM 25
01122 #define WF_ICONIFY 26
01123 #define WF_UNICONIFY 27
01124 #define WF_UNICONIFYXYWH 28
01125 #define WF_TOOLBAR 30
01126 #define WF_FTOOLBAR 31
01127 #define WF_NTOOLBAR 32
01128 #define WF_MENU 33
01129 #define WF_WHEEL 40
01130 #define WF_M_BACKDROP 100
01131 #define WF_M_OWNER 101
01132 #define WF_M_WINDLIST 102
01133 #define WF_MINXYWH 103
01134 #define WF_INFOXYWH 104
01135 #define WF_WIDGETS 200
01136 #define WF_WINX 22360
01137 #define WF_WINXCFG 22361
01138 #define WF_SHADE 22365
01139 #define WF_STACK 22366
01140 #define WF_TOPALL 22367
01141 #define WF_BOTTOMALL 22368
01142 #define WF_XAAES 0x5841
01144
01145 #define BEVENT_WORK 0x0001
01146 #define BEVENT_INFO 0x0002
01148
01149 #define W_BOX 0
01150 #define W_TITLE 1
01151 #define W_CLOSER 2
01152 #define W_NAME 3
01153 #define W_FULLER 4
01154 #define W_INFO 5
01155 #define W_DATA 6
01156 #define W_WORK 7
01157 #define W_SIZER 8
01158 #define W_VBAR 9
01159 #define W_UPARROW 10
01160 #define W_DNARROW 11
01161 #define W_VSLIDE 12
01162 #define W_VELEV 13
01163 #define W_HBAR 14
01164 #define W_LFARROW 15
01165 #define W_RTARROW 16
01166 #define W_HSLIDE 17
01167 #define W_HELEV 18
01168 #define W_SMALLER 19
01169 #define W_BOTTOMER 20
01170 #define W_HIDER 30
01172
01173 #define WA_UPPAGE 0
01174 #define WA_DNPAGE 1
01175 #define WA_UPLINE 2
01176 #define WA_DNLINE 3
01177 #define WA_LFPAGE 4
01178 #define WA_RTPAGE 5
01179 #define WA_LFLINE 6
01180 #define WA_RTLINE 7
01181 #define WA_WHEEL 8
01183
01184 #define END_UPDATE 0
01185 #define BEG_UPDATE 1
01186 #define END_MCTRL 2
01187 #define BEG_MCTRL 3
01188 #define NO_BLOCK 0x100
01190
01191 #define ARROW 0
01192 #define TEXT_CRSR 1
01193 #define BEE 2
01194 #define BUSY_BEE BEE
01195 #define BUSYBEE BEE
01196 #define HOURGLASS 2
01197 #define POINT_HAND 3
01198 #define FLAT_HAND 4
01199 #define THIN_CROSS 5
01200 #define THICK_CROSS 6
01201 #define OUTLN_CROSS 7
01202 #define USER_DEF 255
01203 #define M_OFF 256
01204 #define M_ON 257
01205 #define M_SAVE 258
01206 #define M_RESTORE 259
01207 #define M_LAST 260
01208 #define M_PREVIOUS M_LAST
01209 #define M_FORCE 0x8000
01211
01212 #define ROOT 0
01213 #define MAX_LEN 81
01214 #define MAX_DEPTH 8
01216
01217 #define IP_HOLLOW 0
01218 #define IP_1PATT 1
01219 #define IP_2PATT 2
01220 #define IP_3PATT 3
01221 #define IP_4PATT 4
01222 #define IP_5PATT 5
01223 #define IP_6PATT 6
01224 #define IP_SOLID 7
01226
01227 #define GDOS_PROP 0
01228 #define GDOS_MONO 1
01229 #define GDOS_BITM 2
01230 #define IBM 3
01231 #define SMALL 5
01233
01234 #define G_BOX 20
01235 #define G_TEXT 21
01236 #define G_BOXTEXT 22
01237 #define G_IMAGE 23
01238 #define G_USERDEF 24
01239 #define G_PROGDEF G_USERDEF
01240 #define G_IBOX 25
01241 #define G_BUTTON 26
01242 #define G_BOXCHAR 27
01243 #define G_STRING 28
01244 #define G_FTEXT 29
01245 #define G_FBOXTEXT 30
01246 #define G_ICON 31
01247 #define G_TITLE 32
01248 #define G_CICON 33
01250
01251 #define G_SWBUTTON 34
01252 #define G_POPUP 35
01253 #define G_WINTITLE 36
01254 #define G_EDIT 37
01255 #define G_SHORTCUT 38
01258
01259 #define OF_NONE 0x0000
01260 #define OF_SELECTABLE 0x0001
01261 #define OF_DEFAULT 0x0002
01262 #define OF_EXIT 0x0004
01263 #define OF_EDITABLE 0x0008
01264 #define OF_RBUTTON 0x0010
01265 #define OF_LASTOB 0x0020
01266 #define OF_TOUCHEXIT 0x0040
01267 #define OF_HIDETREE 0x0080
01268 #define OF_INDIRECT 0x0100
01269 #define OF_FL3DIND 0x0200
01270 #define OF_FL3DBAK 0x0400
01271 #define OF_FL3DACT 0x0600
01272 #define OF_SUBMENU 0x0800
01273 #define OF_FLAG11 OF_SUBMENU
01274 #define OF_FLAG12 0x1000
01275 #define OF_FLAG13 0x2000
01276 #define OF_FLAG14 0x4000
01277 #define OF_FLAG15 0x8000
01279
01280 #define OS_NORMAL 0x0000
01281 #define OS_SELECTED 0x0001
01282 #define OS_CROSSED 0x0002
01283 #define OS_CHECKED 0x0004
01284 #define OS_DISABLED 0x0008
01285 #define OS_OUTLINED 0x0010
01286 #define OS_SHADOWED 0x0020
01287 #define OS_WHITEBAK 0x0040
01288 #define OS_DRAW3D 0x0080
01289 #define OS_STATE08 0x0100
01290 #define OS_STATE09 0x0200
01291 #define OS_STATE10 0x0400
01292 #define OS_STATE11 0x0800
01293 #define OS_STATE12 0x1000
01294 #define OS_STATE13 0x2000
01295 #define OS_STATE14 0x4000
01296 #define OS_STATE15 0x8000
01298
01299 #define G_WHITE 0
01300 #define G_BLACK 1
01301 #define G_RED 2
01302 #define G_GREEN 3
01303 #define G_BLUE 4
01304 #define G_CYAN 5
01305 #define G_YELLOW 6
01306 #define G_MAGENTA 7
01307 #define G_LWHITE 8
01308 #define G_LBLACK 9
01309 #define G_LRED 10
01310 #define G_LGREEN 11
01311 #define G_LBLUE 12
01312 #define G_LCYAN 13
01313 #define G_LYELLOW 14
01314 #define G_LMAGENTA 15
01317 #ifdef __GEMLIB_OLDNAMES
01318
01319
01320 #define NONE 0x0000
01321 #define SELECTABLE 0x0001
01322 #define DEFAULT 0x0002
01323 #define EXIT 0x0004
01324 #define EDITABLE 0x0008
01325 #define RBUTTON 0x0010
01326 #define LASTOB 0x0020
01327 #define TOUCHEXIT 0x0040
01328 #define HIDETREE 0x0080
01329 #define INDIRECT 0x0100
01330 #define FL3DIND 0x0200
01331 #define FL3DBAK 0x0400
01332 #define FL3DACT 0x0600
01333 #define SUBMENU 0x0800
01334 #define FLAG11 SUBMENU
01335 #define FLAG12 0x1000
01336 #define FLAG13 0x2000
01337 #define FLAG14 0x4000
01338 #define FLAG15 0x8000
01340
01341 #define NORMAL 0x0000
01342 #define SELECTED 0x0001
01343 #define CROSSED 0x0002
01344 #define CHECKED 0x0004
01345 #define DISABLED 0x0008
01346 #define OUTLINED 0x0010
01347 #define SHADOWED 0x0020
01348 #define WHITEBAK 0x0040
01349 #define DRAW3D 0x0080
01350 #define STATE08 0x0100
01351 #define STATE09 0x0200
01352 #define STATE10 0x0400
01353 #define STATE11 0x0800
01354 #define STATE12 0x1000
01355 #define STATE13 0x2000
01356 #define STATE14 0x4000
01357 #define STATE15 0x8000
01359
01360 #define WHITE 0
01361 #define BLACK 1
01362 #define RED 2
01363 #define GREEN 3
01364 #define BLUE 4
01365 #define CYAN 5
01366 #define YELLOW 6
01367 #define MAGENTA 7
01368 #define LWHITE 8
01369 #define LBLACK 9
01370 #define LRED 10
01371 #define LGREEN 11
01372 #define LBLUE 12
01373 #define LCYAN 13
01374 #define LYELLOW 14
01375 #define LMAGENTA 15
01377 #endif
01378
01379
01380
01381 #define ED_START 0
01382 #define ED_INIT 1
01383 #define ED_CHAR 2
01384 #define ED_END 3
01386 #define EDSTART ED_START
01387 #define EDINIT ED_INIT
01388 #define EDCHAR ED_CHAR
01389 #define EDEND ED_END
01391 #define ED_CRSR 100
01392 #define ED_DRAW 103
01394
01395 #define TE_LEFT 0
01396 #define TE_RIGHT 1
01397 #define TE_CNTR 2
01399
01400 #define NO_DRAW 0
01401 #define REDRAW 1
01403
01404 #define OO_LAST -1
01405 #define OO_FIRST 0
01407
01408 #define SV_INQUIRE 0
01409 #define SV_SET 1
01411
01412 #define LK3DIND 1
01413 #define LK3DACT 2
01414 #define INDBUTCOL 3
01415 #define ACTBUTCOL 4
01416 #define BACKGRCOL 5
01417 #define AD3DVAL 6
01418 #define MX_ENABLE3D 10
01419 #define MENUCOL 11
01422 typedef struct mouse_form
01423 {
01428 short mf_xhot;
01429
01434 short mf_yhot;
01435
01439 short mf_nplanes;
01440
01444 short mf_fg;
01445
01449 short mf_bg;
01450
01454 short mf_mask[16];
01455
01459 short mf_data[16];
01460 } MFORM;
01461
01462 #ifndef __PXY
01463 # define __PXY
01465 typedef struct point_coord
01466 {
01467 short p_x;
01468 short p_y;
01469 } PXY;
01470 #endif
01471
01472 #ifndef __GRECT
01473 # define __GRECT
01475 typedef struct graphic_rectangle
01476 {
01477 short g_x;
01478 short g_y;
01479 short g_w;
01480 short g_h;
01481 } GRECT;
01482 #endif
01483
01485 typedef struct objc_colorword
01486 {
01487 unsigned borderc : 4;
01488 unsigned textc : 4;
01489 unsigned opaque : 1;
01490 unsigned pattern : 3;
01491 unsigned fillc : 4;
01492 } OBJC_COLORWORD;
01493
01495 typedef struct text_edinfo
01496 {
01497 char *te_ptext;
01498 char *te_ptmplt;
01499 char *te_pvalid;
01500 short te_font;
01501 short te_fontid;
01502 short te_just;
01503 short te_color;
01504 short te_fontsize;
01505 short te_thickness;
01506 short te_txtlen;
01507 short te_tmplen;
01508 } TEDINFO;
01509
01511 typedef struct icon_block
01512 {
01513 short *ib_pmask;
01514 short *ib_pdata;
01515 char *ib_ptext;
01516 short ib_char;
01517 short ib_xchar;
01518 short ib_ychar;
01519 short ib_xicon;
01520 short ib_yicon;
01521 short ib_wicon;
01522 short ib_hicon;
01523 short ib_xtext;
01524 short ib_ytext;
01525 short ib_wtext;
01526 short ib_htext;
01527 } ICONBLK;
01528
01530 typedef struct bit_block
01531 {
01532 short *bi_pdata;
01533 short bi_wb;
01534 short bi_hl;
01535 short bi_x;
01536 short bi_y;
01537 short bi_color;
01538 } BITBLK;
01539
01541 typedef struct cicon_data
01542 {
01543 short num_planes;
01544 short *col_data;
01545 short *col_mask;
01546 short *sel_data;
01547 short *sel_mask;
01548 struct cicon_data *next_res;
01549 } CICON;
01550
01552 typedef struct cicon_blk
01553 {
01554 ICONBLK monoblk;
01555 CICON *mainlist;
01556 } CICONBLK;
01557
01559 typedef struct
01560 {
01561 unsigned character : 8;
01562 signed framesize : 8;
01563 unsigned framecol : 4;
01564 unsigned textcol : 4;
01565 unsigned textmode : 1;
01566 unsigned fillpattern : 3;
01567 unsigned interiorcol : 4;
01568 } BFOBSPEC;
01569
01571 struct user_block;
01572
01574 typedef union obspecptr
01575 {
01576 long index;
01577 union obspecptr *indirect;
01578 BFOBSPEC obspec;
01579 TEDINFO *tedinfo;
01580 BITBLK *bitblk;
01581 ICONBLK *iconblk;
01582 CICONBLK *ciconblk;
01583 struct user_block *userblk;
01584 char *free_string;
01585 } OBSPEC;
01586
01588 typedef struct object
01589 {
01590 short ob_next;
01591 short ob_head;
01592 short ob_tail;
01593 unsigned short ob_type;
01594 unsigned short ob_flags;
01595 unsigned short ob_state;
01596 OBSPEC ob_spec;
01597 short ob_x;
01598 short ob_y;
01599 short ob_width;
01600 short ob_height;
01601 } OBJECT;
01602
01604 typedef struct parm_block
01605 {
01606 OBJECT *pb_tree;
01607 short pb_obj;
01608 short pb_prevstate;
01609 short pb_currstate;
01610 short pb_x;
01611 short pb_y;
01612 short pb_w;
01613 short pb_h;
01614 short pb_xc;
01615 short pb_yc;
01616 short pb_wc;
01617 short pb_hc;
01618 long pb_parm;
01619 } PARMBLK;
01620
01622 typedef struct user_block
01623 {
01624 short __CDECL (*ub_code)(PARMBLK *parmblock);
01625 long ub_parm;
01626 } USERBLK;
01627
01629 typedef struct rshdr
01630 {
01631 short rsh_vrsn;
01632 unsigned short rsh_object;
01633 unsigned short rsh_tedinfo;
01634 unsigned short rsh_iconblk;
01635 unsigned short rsh_bitblk;
01636 unsigned short rsh_frstr;
01637 unsigned short rsh_string;
01638 unsigned short rsh_imdata;
01639 unsigned short rsh_frimg;
01640 unsigned short rsh_trindex;
01641 short rsh_nobs;
01642 short rsh_ntree;
01643 short rsh_nted;
01644 short rsh_nib;
01645 short rsh_nbb;
01646 short rsh_nstring;
01647 short rsh_nimages;
01648 unsigned short rsh_rssize;
01649 } RSHDR;
01650
01652 typedef struct _menu
01653 {
01654 OBJECT *mn_tree;
01655 short mn_menu;
01656 short mn_item;
01657 short mn_scroll;
01665 short mn_keystate;
01666 } MENU;
01667
01669 typedef struct
01670 {
01671 short m_out;
01672 short m_x;
01673 short m_y;
01674 short m_w;
01675 short m_h;
01676 } MOBLK;
01677
01679 typedef struct mouse_event_type
01680 {
01681 short *x;
01682 short *y;
01683 short *b;
01684 short *k;
01685 } MOUSE_EVENT;
01686
01689 typedef struct {
01690 short emi_flags;
01691 short emi_bclicks;
01692 short emi_bmask;
01693 short emi_bstate;
01694 short emi_m1leave;
01695 GRECT emi_m1;
01696 short emi_m2leave;
01697 GRECT emi_m2;
01698 short emi_tlow;
01699 short emi_thigh;
01700 } EVMULT_IN;
01701
01706 typedef struct {
01707 short emo_events;
01708 PXY emo_mouse;
01709 short emo_mbutton;
01710 short emo_kmeta;
01711 short emo_kreturn;
01712 short emo_mclicks;
01713 } EVMULT_OUT;
01714
01715 #endif
01716
01717 #ifdef __GEMLIB_AES
01718
01719
01720
01721
01722
01726 short mt_appl_bvset (short bvdisk, short bvhard, short *global_aes);
01727 short mt_appl_control (short ap_cid, short ap_cwhat, void *ap_cout, short *global_aes);
01728 short mt_appl_exit (short *global_aes);
01729 short mt_appl_find (const char *name, short *global_aes);
01730 short mt_appl_getinfo (short type,
01731 short *out1, short *out2, short *out3, short *out4, short *global_aes);
01732 short mt_appl_init (short *global_aes);
01733 short mt_appl_read (short ap_id, short length, void *ap_pbuff, short *global_aes);
01734 short mt_appl_search (short mode, char *fname, short *type, short *ap_id, short *global_aes);
01735 short mt_appl_tplay (void *mem, short num, short scale, short *global_aes);
01736 short mt_appl_trecord (void *mem, short count, short *global_aes);
01737 short mt_appl_write (short ap_id, short length, void *ap_pbuff, short *global_aes);
01738 short mt_appl_yield (short *global_aes);
01744 short mt_evnt_button (short Clicks, short WhichButton, short WhichState,
01745 short *Mx, short *My, short *ButtonState, short *KeyState, short *global_aes);
01746 short mt_evnt_dclick (short ToSet, short SetGet, short *global_aes);
01747 short mt_evnt_keybd (short *global_aes);
01748 short mt_evnt_mesag (short MesagBuf[], short *global_aes);
01749 short mt_evnt_mouse (short EnterExit, short InX, short InY, short InW, short InH,
01750 short *OutX, short *OutY, short *ButtonState, short *KeyState, short *global_aes);
01751 short mt_evnt_multi (short Type, short Clicks, short WhichButton, short WhichState,
01752 short EnterExit1, short In1X, short In1Y, short In1W, short In1H,
01753 short EnterExit2, short In2X, short In2Y, short In2W, short In2H,
01754 short MesagBuf[], unsigned long Interval, short *OutX, short *OutY,
01755 short *ButtonState, short *KeyState, short *Key, short *ReturnCount, short *global_aes);
01756 short mt_evnt_multi_fast (const EVMULT_IN * em_i,
01757 short MesagBuf[], EVMULT_OUT * em_o, short *global_aes);
01758 short mt_evnt_timer (unsigned long Interval, short *global_aes);
01764 short mt_form_alert (short DefButton, const char *Str, short *global_aes);
01765 short mt_form_button (OBJECT *, short Bobject, short Bclicks, short *Bnxtobj, short *global_aes);
01766 short mt_form_center (OBJECT *, short *Cx, short *Cy, short *Cw, short *Ch, short *global_aes);
01767 short mt_form_center_grect (OBJECT *, GRECT *r, short *global_aes);
01768 short mt_form_dial (short Flag, short Sx, short Sy, short Sw, short Sh,
01769 short Bx, short By, short Bw, short Bh, short *global_aes);
01770 short mt_form_do (OBJECT *, short StartObj, short *global_aes);
01771 short mt_form_error (short ErrorCode, short *global_aes);
01772 short mt_form_keybd (OBJECT *, short Kobject, short Kobnext, short Kchar,
01773 short *Knxtobject, short *Knxtchar, short *global_aes);
01781 typedef void __CDECL (* FSEL_CALLBACK)( short *msg);
01782
01783 short mt_fsel_exinput (char *path, char *file, short *exit_button, const char *title, short *global);
01784 short mt_fsel_input (char *path, char *file, short *exit_button, short *global);
01785 short mt_fsel_boxinput(char *path, char *file, short *exit_button, const char *title, FSEL_CALLBACK callback, short *global);
01791 short mt_graf_dragbox (short Sw, short Sh, short Sx, short Sy, short Bx, short By, short Bw, short Bh, short *Fw, short *Fh, short *global_aes);
01792 short mt_graf_growbox (short Sx, short Sy, short Sw, short Sh, short Fx, short Fy, short Fw, short Fh, short *global_aes);
01793 short mt_graf_growbox_grect (const GRECT *in, const GRECT *out, short *global_aes);
01794 short mt_graf_handle (short *Wchar, short *Hchar, short *Wbox, short *Hbox, short *global_aes);
01795 short mt_graf_xhandle (short *Wchar, short *Hchar, short *Wbox, short *Hbox, short * device, short *global_aes);
01796 short mt_graf_mbox (short Sw, short Sh, short Sx, short Sy, short Dx, short Dy, short *global_aes);
01797 short mt_graf_mkstate (short *Mx, short *My, short *ButtonState, short *KeyState, short *global_aes);
01798 short mt_graf_mouse (short Form, const MFORM *FormAddress, short *global_aes);
01799 short mt_graf_rubberbox (short Ix, short Iy, short Iw, short Ih, short *Fw, short *Fh, short *global_aes);
01800 short mt_graf_multirubber (short bx, short by, short mw, short mh, GRECT *rec, short *rw, short *rh, short *global_aes);
01801 short mt_graf_shrinkbox (short Fx, short Fy, short Fw, short Fh, short Sx, short Sy, short Sw, short Sh, short *global_aes);
01802 short mt_graf_shrinkbox_grect (const GRECT *in, const GRECT *out, short *global_aes);
01803 short mt_graf_slidebox (OBJECT *, short Parent, short Object, short Direction, short *global_aes);
01804 short mt_graf_watchbox (OBJECT *, short Object, short InState, short OutState, short *global_aes);
01805 short mt_graf_wwatchbox (OBJECT *, short Object, short InState, short OutState, short whandle, short *global_aes);
01811 short mt_menu_attach (short me_flag, OBJECT *me_tree, short me_item, MENU *me_mdata, short *global);
01812 short mt_menu_bar (OBJECT *me_tree, short me_mode, short *global);
01813 short mt_menu_click (short click, short setit, short *global);
01814 short mt_menu_icheck (OBJECT *me_tree, short me_item, short me_check, short *global);
01815 short mt_menu_ienable (OBJECT *me_tree, short me_item, short me_enable, short *global);
01816 short mt_menu_istart (short me_flag, OBJECT *me_tree, short me_imenu, short me_item, short *global);
01817 short mt_menu_popup (MENU *me_menu, short me_xpos, short me_ypos, MENU *me_mdata, short *global);
01818 short mt_menu_register (short ap_id, char *me_text, short *global);
01819 short mt_menu_settings (short me_flag, MN_SET *me_values, short *global);
01820 short mt_menu_text (OBJECT *me_tree, short me_item, char *me_text, short *global);
01821 short mt_menu_tnormal (OBJECT *me_tree, short me_item, short me_normal, short *global);
01822 short mt_menu_unregister (short id, short *global);
01828 short mt_objc_add (OBJECT *, short Parent, short Child, short *global);
01829 short mt_objc_change (OBJECT *, short Object, short Res,
01830 short Cx, short Cy, short Cw, short Ch,
01831 short NewState,short Redraw, short *global_aes);
01832 short mt_objc_delete (OBJECT *, short Object, short *global_aes);
01833 short mt_objc_draw (OBJECT *, short Start, short Depth,
01834 short Cx, short Cy, short Cw, short Ch, short *global_aes);
01835 short mt_objc_draw_grect (OBJECT *, short Start, short Depth, const GRECT *r, short *global_aes);
01836 short mt_objc_edit (OBJECT *, short Object, short Char, short *Index, short Kind, short *global_aes);
01837 short mt_objc_find (OBJECT *, short Start, short Depth, short Mx, short My, short *global_aes);
01838 short mt_objc_xfind (OBJECT *, short Start, short Depth, short Mx, short My, short *global_aes);
01839 short mt_objc_offset (OBJECT *, short Object, short *X, short *Y, short *global_aes);
01840 short mt_objc_order (OBJECT *, short Object, short NewPos, short *global_aes);
01841 short mt_objc_sysvar (short mode, short which, short in1, short in2, short *out1, short *out2, short *global_aes);
01847 short mt_rsrc_free (short *global_aes);
01848 short mt_rsrc_gaddr (short Type, short Index, void *Address, short *global_aes);
01849 short mt_rsrc_load (const char *Name, short *global_aes);
01850 short mt_rsrc_obfix (OBJECT *, short Index, short *global_aes);
01851 short mt_rsrc_rcfix (void *rc_header, short *global_aes);
01852 short mt_rsrc_saddr (short Type, short Index, void *Address, short *global_aes);
01858 short mt_scrp_clear (short *global_aes);
01859 short mt_scrp_read (char *Scrappath, short *global_aes);
01860 short mt_scrp_write (const char *Scrappath, short *global_aes);
01866 short mt_shel_envrn (char **result, const char *param, short *global_aes);
01867 short mt_shel_find (char *buf, short *global_aes);
01868 short mt_shel_get (char *Buf, short Len, short *global_aes);
01869 short mt_shel_help (short sh_hmode, const char *sh_hfile, const char *sh_hkey, short *global_aes);
01870 short mt_shel_put (const char *Buf, short Len, short *global_aes);
01871 short mt_shel_rdef (char *lpcmd, char *lpdir, short *global_aes);
01872 short mt_shel_read (char *Command, char *Tail, short *global_aes);
01873 short mt_shel_wdef (const char *lpcmd, const char *lpdir, short *global_aes);
01874 short mt_shel_write (short Exit, short Graphic, short Aes, void *Command, char *Tail, short *global_aes);
01880 short mt_wind_calc (short Type, short Parts, short InX, short InY, short InW, short InH, short *OutX, short *OutY, short *OutW, short *OutH, short *global_aes);
01881 short mt_wind_close (short WindowHandle, short *global_aes);
01882 short mt_wind_create (short Parts, short Wx, short Wy, short Ww, short Wh, short *global_aes);
01883 short mt_wind_delete (short WindowHandle, short *global_aes);
01884 short mt_wind_draw (short WindowHandle, short startob, short *global_aes);
01885 short mt_wind_find (short X, short Y, short *global_aes);
01886 short mt_wind_get (short WindowHandle, short What, short *W1, short *W2, short *W3, short *W4, short *global_aes);
01887 short mt_wind_new (short *global_aes);
01888 short mt_wind_open (short WindowHandle, short Wx, short Wy, short Ww, short Wh, short *global_aes);
01889 short mt_wind_set (short WindowHandle, short What, short W1, short W2, short W3, short W4, short *global_aes);
01890 short mt_wind_update (short Code, short *global_aes);
01891
01892
01893
01894
01895 short mt_wind_calc_grect (short Type, short Parts, const GRECT *In, GRECT *Out, short *global_aes);
01896 short mt_wind_create_grect (short Parts, const GRECT *r, short *global_aes);
01897 short mt_wind_get_grect (short WindowHandle, short What, GRECT *r, short *global_aes);
01898 short mt_wind_open_grect (short WindowHandle, const GRECT *r, short *global_aes);
01899 short mt_wind_set_grect (short WindowHandle, short What, const GRECT *r, short *global_aes);
01900 short mt_wind_set_str (short WindowHandle, short What, const char *str, short *global_aes);
01906 short rc_copy (const GRECT *src, GRECT *dst);
01907 short rc_equal (const GRECT *r1, const GRECT *r2);
01908 short rc_intersect (const GRECT *src, GRECT *dst);
01909 GRECT * array_to_grect (const short *array, GRECT *area);
01910 short * grect_to_array (const GRECT *area, short *array);
01918
01919
01920
01921
01922
01923
01925 #define AES_CTRLMAX 5
01926
01927 #define AES_GLOBMAX 16
01928
01929 #define AES_INTINMAX 16
01930
01931 #define AES_INTOUTMAX 16
01932
01933 #define AES_ADDRINMAX 16
01934
01935 #define AES_ADDROUTMAX 16
01936
01938 #define mt_AESversion(aes_global) (aes_global[0])
01939
01942 #define mt_AESnumapps(aes_global) (aes_global[1])
01943
01945 #define mt_AESapid(aes_global) (aes_global[2])
01946
01948 #define mt_AESappglobal(aes_global) (*((long *)&aes_global[3]))
01949
01951 #define mt_AESrscfile(aes_global) ((OBJECT **)(*((long *)&aes_global[5])))
01952
01955 #define mt_AESmaxchar(aes_global) (aes_global[13])
01956
01959 #define mt_AESminchar(aes_global) (aes_global[14])
01960
01962 typedef struct
01963 {
01964 short *control;
01965 short *global;
01966 const short *intin;
01967 short *intout;
01968 const long *addrin;
01969 long *addrout;
01970 } AESPB;
01971
01973 extern void aes (AESPB *pb);
01974
01977 #endif
01978
01979
01980
01981 #ifdef __GEMLIB_DEFS
01982
01983
01984
01985
01986
01987
01988 #define MD_REPLACE 1
01989 #define MD_TRANS 2
01990 #define MD_XOR 3
01991 #define MD_ERASE 4
01993
01994 #define ALL_WHITE 0
01995 #define S_AND_D 1
01996 #define S_AND_NOTD 2
01997 #define S_ONLY 3
01998 #define NOTS_AND_D 4
01999 #define D_ONLY 5
02000 #define S_XOR_D 6
02001 #define S_OR_D 7
02002 #define NOT_SORD 8
02003 #define NOT_SXORD 9
02004 #define D_INVERT 10
02005 #define NOT_D 10
02006 #define S_OR_NOTD 11
02007 #define NOT_S 12
02008 #define NOTS_OR_D 13
02009 #define NOT_SANDD 14
02010 #define ALL_BLACK 15
02012
02013 #define BEZ_BEZIER 0x01
02014 #define BEZ_POLYLINE 0x00
02015 #define BEZ_NODRAW 0x02
02017
02018 #define IMAGE_LEFT 0
02019 #define IMAGE_CENTER 1
02020 #define IMAGE_RIGHT 2
02021 #define IMAGE_TOP 0
02022 #define IMAGE_BOTTOM 2
02024
02025 #define NOJUSTIFY 0
02026 #define JUSTIFY 1
02028
02029 #define COLOR_REQUESTED 0
02030 #define COLOR_ACTUAL 1
02032
02033 #define GDOS_NONE (-2L)
02034 #define GDOS_FSM 0x5F46534DL
02035 #define GDOS_FNT 0x5F464E54L
02037
02038 #define VINMODE_LOCATOR 1
02039 #define VINMODE_VALUATOR 2
02040 #define VINMODE_CHOICE 3
02041 #define VINMODE_STRING 4
02043 #ifdef __GEMLIB_OLDNAMES
02044 #define LOCATOR 1
02045 #define VALUATOR 2
02046 #define CHOICE 3
02047 #define STRING 4
02048 #endif
02049
02050
02051 #define CACHE_CHAR 0
02052 #define CACHE_MISC 1
02054
02055 #define DEV_MISSING 0
02056 #define DEV_INSTALLED 1
02058
02059 #define BITMAP_FONT 0
02061
02062 #define FIS_HOLLOW 0
02063 #define FIS_SOLID 1
02064 #define FIS_PATTERN 2
02065 #define FIS_HATCH 3
02066 #define FIS_USER 4
02068
02069 #define PERIMETER_OFF 0
02070 #define PERIMETER_ON 1
02072
02073 #define SQUARE 0
02074 #define ARROWED 1
02075 #define ROUND 2
02077
02078 #define LE_SQUARED SQUARE
02079 #define LE_ARROWED ARROWED
02080 #define LE_ROUNDED ROUND
02082
02083 #define SOLID 1
02084 #define LDASHED 2
02085 #define DOTTED 3
02086 #define DASHDOT 4
02087 #define DASH 5
02088 #define DASHDOTDOT 6
02089 #define USERLINE 7
02091
02092 #define LT_SOLID SOLID
02093 #define LT_LONGDASH LDASHED
02094 #define LT_DOTTED DOTTED
02095 #define LT_DASHDOT DASHDOT
02096 #define LT_DASHED DASH
02097 #define LT_DASHDOTDOT DASHDOTDOT
02098 #define LT_USERDEF USERLINE
02099 #define LONGDASH LDASHED
02100 #define DOT DOTTED
02101 #define DASH2DOT DASHDOTDOT
02103
02104 #define MRKR_DOT 1
02105 #define MRKR_PLUS 2
02106 #define MRKR_ASTERISK 3
02107 #define MRKR_BOX 4
02108 #define MRKR_CROSS 5
02109 #define MRKR_DIAMOND 6
02111
02112 #define MT_DOT MRKR_DOT
02113 #define MT_PLUS MRKR_PLUS
02114 #define MT_ASTERISK MRKR_ASTERISK
02115 #define MT_SQUARE MRKR_BOX
02116 #define MT_DCROSS MRKR_CROSS
02117 #define MT_DIAMOND MRKR_DIAMOND
02119
02120 #define TA_LEFT 0
02121 #define TA_CENTER 1
02122 #define TA_RIGHT 2
02123 #define TA_BASE 0
02124 #define TA_HALF 1
02125 #define TA_ASCENT 2
02126 #define TA_BOTTOM 3
02127 #define TA_DESCENT 4
02128 #define TA_TOP 5
02130
02131 #define MAP_BITSTREAM 0
02132 #define MAP_ATARI 1
02133 #define MAP_UNICODE 2
02135
02136 #define TXT_NORMAL 0x0000
02137 #define TXT_THICKENED 0x0001
02138 #define TXT_LIGHT 0x0002
02139 #define TXT_SKEWED 0x0004
02140 #define TXT_UNDERLINED 0x0008
02141 #define TXT_OUTLINED 0x0010
02142 #define TXT_SHADOWED 0x0020
02144
02145 #define TF_NORMAL TXT_NORMAL
02146 #define TF_THICKENED TXT_THICKENED
02147 #define TF_LIGHTENED TXT_LIGHT
02148 #define TF_SLANTED TXT_SKEWED
02149 #define TF_UNDERLINED TXT_UNDERLINED
02150 #define TF_OUTLINED TXT_OUTLINED
02151 #define TF_SHADOWED TXT_SHADOWED
02154
02155 #define APP_ERROR 0
02156 #define SCREEN_ERROR 1
02158
02159 #define NO_ERROR 0
02160 #define CHAR_NOT_FOUND 1
02161 #define FILE_READERR 8
02162 #define FILE_OPENERR 9
02163 #define BAD_FORMAT 10
02164 #define CACHE_FULL 11
02165 #define MISC_ERROR (-1)
02167
02168 #define TRACK_NONE 0
02169 #define TRACK_NORMAL 1
02170 #define TRACK_TIGHT 2
02171 #define TRACK_VERYTIGHT 3
02173
02174 #define PAIR_OFF 0
02175 #define PAIR_ON 1
02177
02178 #define SCRATCH_BOTH 0
02179 #define SCRATCH_BITMAP 1
02180 #define SCRATCH_NONE 2
02182
02183 #define SLM_OK 0x00
02184 #define SLM_ERROR 0x02
02185 #define SLM_NOTONER 0x03
02186 #define SLM_NOPAPER 0x04
02189 typedef struct memory_form
02190 {
02191 void *fd_addr;
02192 short fd_w;
02193 short fd_h;
02194 short fd_wdwidth;
02195 short fd_stand;
02196 short fd_nplanes;
02197 short fd_r1;
02198 short fd_r2;
02199 short fd_r3;
02200 } MFDB;
02201
02203 typedef struct rgb_1000
02204 {
02205 short red;
02206 short green;
02207 short blue;
02208 } RGB1000;
02209
02210 #endif
02211
02212 #ifdef __GEMLIB_VDI
02213
02214
02215
02216
02217
02218 typedef short VdiHdl;
02221
02222
02223
02224
02228 void vs_color (VdiHdl , short color_idx, short rgb[]);
02229 short vswr_mode (VdiHdl , short mode);
02230
02231 short vsf_color (VdiHdl , short color_idx);
02232 short vsf_interior (VdiHdl , short style);
02233 short vsf_perimeter (VdiHdl , short vis);
02234 short vsf_xperimeter(VdiHdl , short vis, short style);
02235 short vsf_style (VdiHdl , short style);
02236 void vsf_udpat (VdiHdl , short pat[], short planes);
02237
02238 short vsl_color (VdiHdl , short color_idx);
02239 void vsl_ends (VdiHdl , short begstyle, short endstyle);
02240 short vsl_type (VdiHdl , short style);
02241 void vsl_udsty (VdiHdl , short pat);
02242 short vsl_width (VdiHdl , short width);
02243
02244 short vsm_color (VdiHdl , short color_idx);
02245 short vsm_height (VdiHdl , short height);
02246 short vsm_type (VdiHdl , short symbol);
02247
02248 void vst_alignment (VdiHdl , short hin, short vin, short *hout, short *vout);
02249 short vst_color (VdiHdl , short color_idx);
02250 short vst_effects (VdiHdl , short effects);
02251 void vst_error (VdiHdl , short mode, short *errorvar);
02252 short vst_font (VdiHdl , short font);
02253 void vst_height (VdiHdl , short height, short *charw, short *charh,
02254 short *cellw, short *cellh);
02255 short vst_point (VdiHdl , short point, short *charw, short *charh,
02256 short *cellw, short *cellh);
02257 short vst_rotation (VdiHdl , short ang);
02258 void vst_scratch (VdiHdl , short mode);
02261
02262
02263
02264
02268 void v_clrwk (VdiHdl );
02269 void v_clsvwk (VdiHdl );
02270 void v_clswk (VdiHdl );
02271 short v_flushcache (VdiHdl );
02272 short v_loadcache (VdiHdl , const char *filename, short mode);
02273 void v_opnvwk (short work_in[], VdiHdl *, short work_out[]);
02274 void v_opnwk (short work_in[], VdiHdl *, short work_out[]);
02275 short v_savecache (VdiHdl , const char *filename);
02276 void v_set_app_buff (VdiHdl , void *buf_p, short size);
02277 void v_updwk (VdiHdl );
02278 void vs_clip (VdiHdl , short clip_flag, short pxy[]);
02279 void vs_clip_pxy (VdiHdl , PXY pxy[]);
02280 void vs_clip_off (VdiHdl );
02281 short vst_load_fonts (VdiHdl , short );
02282 void vst_unload_fonts (VdiHdl , short );
02285
02286
02287
02288
02292 void v_bit_image (VdiHdl , const char *filename, short aspect,
02293 short x_scale, short y_scale,
02294 short h_align, short v_align, short *pxy);
02295 void v_clear_disp_list (VdiHdl );
02296 short v_copies (VdiHdl , short count);
02297 void v_dspcur (VdiHdl , short x, short y);
02298 void v_form_adv (VdiHdl );
02299 void v_hardcopy (VdiHdl );
02300 short v_orient (VdiHdl , short orientation);
02301 void v_output_window (VdiHdl , short *pxy);
02302 short v_page_size (VdiHdl , short page_id);
02303 void v_rmcur (VdiHdl );
02304 short v_trays (VdiHdl , short input, short output,
02305 short *set_input, short *set_output);
02306 short vq_calibrate (VdiHdl , short *flag);
02307 short vq_page_name (VdiHdl , short page_id, char *page_name,
02308 long *page_width, long *page_height);
02309 void vq_scan (VdiHdl , short *g_slice, short *g_page,
02310 short *a_slice, short *a_page, short *div_fac);
02311 short vq_tabstatus (VdiHdl );
02312 short vq_tray_names (VdiHdl , char *input_name, char *output_name,
02313 short *input, short *output);
02314 short vs_calibrate (VdiHdl , short flag, short *rgb);
02315 short vs_palette (VdiHdl , short palette);
02316
02317 void v_sound (VdiHdl, short freq, short duration);
02318 short vs_mute (VdiHdl, short action);
02319
02320 void vq_tdimensions (VdiHdl , short *xdimension, short *ydimension);
02321 void vt_alignment (VdiHdl , short dx, short dy);
02322 void vt_axis (VdiHdl , short xres, short yres, short *xset, short *yset);
02323 void vt_origin (VdiHdl , short xorigin, short yorigin);
02324 void vt_resolution (VdiHdl , short xres, short yres, short *xset, short *yset);
02325
02326 void v_meta_extents (VdiHdl , short min_x, short min_y,
02327 short max_x, short max_y);
02328 void v_write_meta (VdiHdl , short numvdi_intin, short *avdi_intin,
02329 short num_ptsin, short *a_ptsin);
02330 void vm_coords (VdiHdl , short llx, short lly, short urx, short ury);
02331 void vm_filename (VdiHdl , const char *filename);
02332 void vm_pagesize (VdiHdl , short pgwidth, short pgheight);
02333
02334 void vsc_expose (VdiHdl , short state);
02335 void vsp_film (VdiHdl , short color_idx, short lightness);
02336 short vqp_filmname (VdiHdl , short _index, char * name);
02337
02338 void v_offset (VdiHdl , short offset);
02339 void v_fontinit (VdiHdl , const void * font_header);
02340
02341 void v_escape2000 (VdiHdl , short times);
02342
02343 void v_alpha_text (VdiHdl , const char *str);
02344 void v_curdown (VdiHdl );
02345 void v_curhome (VdiHdl );
02346 void v_curleft (VdiHdl );
02347 void v_curright (VdiHdl );
02348 void v_curtext (VdiHdl , const char *str);
02349 void v_curup (VdiHdl );
02350 void v_eeol (VdiHdl );
02351 void v_eeos (VdiHdl );
02352 void v_enter_cur (VdiHdl );
02353 void v_exit_cur (VdiHdl );
02354 void v_rvoff (VdiHdl );
02355 void v_rvon (VdiHdl );
02356 void vq_chcells (VdiHdl , short *n_rows, short *n_cols);
02357 void vq_curaddress (VdiHdl , short *cur_row, short *cur_col);
02358 void vs_curaddress (VdiHdl , short row, short col);
02360 #define v_curaddress vs_curaddress
02361
02364
02365
02366
02367
02371 void vq_cellarray (VdiHdl , short pxy[], short row_len, short nrows,
02372 short *el_used, short *rows_used,
02373 short *status, short color[]);
02374 short vq_color (VdiHdl , short color_idx, short flag, short rgb[]);
02375 void vq_extnd (VdiHdl , short flag, short work_out[]);
02376 void vqf_attributes (VdiHdl , short atrib[]);
02377 void vqin_mode (VdiHdl , short dev, short *mode);
02378 void vql_attributes (VdiHdl , short atrib[]);
02379 void vqm_attributes (VdiHdl , short atrib[]);
02380 void vqt_attributes (VdiHdl , short atrib[]);
02381 void vqt_cachesize (VdiHdl , short which_cache, long *size);
02382 void vqt_extent (VdiHdl , const char *str, short extent[]);
02383 void vqt_extent16 (VdiHdl , const short *wstr, short extent[]);
02384 void vqt_extent16n (VdiHdl , const short *wstr, short num, short extent[]);
02385 void vqt_fontinfo (VdiHdl , short *minade, short *maxade, short distances[],
02386 short *maxwidth, short effects[]);
02387 void vqt_get_table (VdiHdl , short **map);
02388 short vqt_name (VdiHdl , short element, char *name);
02389 short vqt_width (VdiHdl , short chr, short *cw,
02390 short *ldelta, short *rdelta);
02392 short vq_gdos (void);
02393
02395 long vq_vgdos (void);
02399
02400
02401
02402
02406 void v_hide_c (VdiHdl );
02407 void v_show_c (VdiHdl , short reset);
02408 void vex_butv (VdiHdl , void *pusrcode, void **psavcode);
02409 void vex_curv (VdiHdl , void *pusrcode, void **psavcode);
02410 void vex_motv (VdiHdl , void *pusrcode, void **psavcode);
02411 void vex_wheelv (VdiHdl , void *pusrcode, void **psavcode);
02412 void vex_timv (VdiHdl , void *time_addr,
02413 void **otime_addr, short *time_conv);
02414 void vq_key_s (VdiHdl , short *state);
02415 void vq_mouse (VdiHdl , short *pstatus, short *x, short *y);
02416 void vrq_choice (VdiHdl , short cin, short *cout);
02417 void vrq_locator (VdiHdl , short x, short y,
02418 short *xout, short *yout, short *term);
02419 void vrq_string (VdiHdl , short len, short echo, short echoxy[], char *str);
02420 void vrq_valuator (VdiHdl , short in, short *out, short *term);
02421 void vsc_form (VdiHdl , short form[]);
02422 short vsin_mode (VdiHdl , short dev, short mode);
02423 short vsm_choice (VdiHdl , short *choice);
02424 short vsm_locator (VdiHdl , short x, short y,
02425 short *xout, short *yout, short *term);
02426 short vsm_string (VdiHdl , short len, short echo, short echoxy[], char *str);
02427 void vsm_valuator (VdiHdl , short in, short *out, short *term, short *status);
02431
02432
02433
02434
02438 void v_arc (VdiHdl , short x, short y,
02439 short radius, short begang, short endang);
02440 void v_bar (VdiHdl , short pxy[]);
02441 void v_cellarray (VdiHdl , short pxy[], short row_length, short elements,
02442 short nrows, short write_mode, short colarray[]);
02443 void v_circle (VdiHdl , short x, short y, short radius);
02444 void v_contourfill (VdiHdl , short x, short y, short color_idx);
02445 void v_ellarc (VdiHdl , short x, short y, short xrad, short yrad,
02446 short begang, short endang);
02447 void v_ellipse (VdiHdl , short x, short y, short xrad, short yrad);
02448 void v_ellpie (VdiHdl , short x, short y, short xrad, short yrad,
02449 short begang, short endang);
02450 void v_fillarea (VdiHdl , short count, short pxy[]);
02451 void v_gtext (VdiHdl , short x, short y, const char *str);
02452 void v_gtext16 (VdiHdl , short x, short y, const short *wstr);
02453 void v_gtext16n (VdiHdl , PXY pos, const short *wstr, short num);
02454 void v_justified (VdiHdl , short x, short y, const char *str,
02455 short len, short word_space, short char_space);
02456 void v_pieslice (VdiHdl , short x, short y,
02457 short radius, short begang, short endang);
02458 void v_pline (VdiHdl , short count, short pxy[]);
02459 void v_pmarker (VdiHdl , short count, short pxy[]);
02460 void v_rbox (VdiHdl , short pxy[]);
02461 void v_rfbox (VdiHdl , short pxy[]);
02462 void vr_recfl (VdiHdl , short pxy[]);
02465
02466
02467
02468
02472 void v_get_pixel (VdiHdl , short x, short y, short *pel, short *color_idx);
02473 void vr_trnfm (VdiHdl , MFDB *src, MFDB *dst);
02474 void vro_cpyfm (VdiHdl , short mode, short pxy[], MFDB *src, MFDB *dst);
02475 void vrt_cpyfm (VdiHdl , short mode, short pxy[], MFDB *src, MFDB *dst,
02476 short color[]);
02480
02481
02482
02483
02487 void vdi_array2str (const short *src, char *des, short len);
02488 short vdi_str2array (const char *src, short *des);
02489 short vdi_wstrlen (const short *wstr);
02492
02493
02494
02495
02500
02501 #define VDI_CNTRLMAX 15
02502 #define VDI_INTINMAX 1024
02503 #define VDI_INTOUTMAX 256
02504 #define VDI_PTSINMAX 256
02505 #define VDI_PTSOUTMAX 256
02508 typedef struct
02509 {
02510 short *control;
02511 const short *intin;
02512 const short *ptsin;
02513 short *intout;
02514 short *ptsout;
02515 } VDIPB;
02516
02518 void vdi (VDIPB *pb);
02521 #endif
02522
02523
02524 __END_DECLS
02525
02526 #endif