home *** CD-ROM | disk | FTP | other *** search
- #ifndef va_start
- #include <stdarg.h>
- #endif
-
-
- /*
- Verkürzte Typbezeichner
- */
- typedef unsigned int word;
- typedef unsigned char byte;
-
-
-
- typedef struct
- {
- int year;
- int day;
- int mon;
- }
- DAte;
-
- typedef struct
- {
- int hour;
- int min;
- int sec;
- }
- TIme;
-
- typedef struct
- {
- long mark;
- int pfen;
- }
- DMark;
-
-
-
-
- /*
- Tastaturcodes
- */
- #define KEY_C_L 0X14B
- #define KEY_C_R 0X14D
- #define KEY_C_U 0X148
- #define KEY_C_D 0X150
-
- #define KEY_BS 8
- #define KEY_CR 13
- #define KEY_ESC 27
- #define KEY_HOME 327
- #define KEY_END 335
- #define KEY_PGUP 329
- #define KEY_PGDN 337
- #define KEY_INS 338
- #define KEY_DEL 339
- #define KEY_CTRLLEFT 371
- #define KEY_CTRLRIGHT 372
- #define KEY_F1 315
- #define KEY_F2 316
- #define KEY_F3 317
- #define KEY_F4 318
- #define KEY_F5 319
- #define KEY_F6 320
- #define KEY_F7 321
- #define KEY_F8 322
- #define KEY_F9 323
- #define KEY_F10 324
- #define KEY_CNTRLA 1
- #define KEY_CNTRLB 2
- #define KEY_CNTRLC 3
- #define KEY_CNTRLD 4
- #define KEY_CNTRLE 5
- #define KEY_CNTRLF 6
- #define KEY_CNTRLG 7
- #define KEY_CNTRLH 8
- #define KEY_CNTRLI 9
- #define KEY_CNTRLJ 10
- #define KEY_CNTRLK 11
- #define KEY_CNTRLL 12
- #define KEY_CNTRLM 13
- #define KEY_CNTRLN 14
- #define KEY_CNTRLO 15
- #define KEY_CNTRLP 16
- #define KEY_CNTRLQ 17
- #define KEY_CNTRLR 18
- #define KEY_CNTRLS 19
- #define KEY_CNTRLT 20
- #define KEY_CNTRLU 21
- #define KEY_CNTRLV 22
- #define KEY_CNTRLW 23
- #define KEY_CNTRLX 24
- #define KEY_CNTRLY 25
- #define KEY_CNTRLZ 26
-
-
- #define KEY_ALTF1 0x168
- #define KEY_ALTF2 0x169
- #define KEY_ALTF3 0x16a
- #define KEY_ALTF4 0x16b
- #define KEY_ALTF5 0x16c
- #define KEY_ALTF6 0x16d
- #define KEY_ALTF7 0x16e
- #define KEY_ALTF8 0x16f
- #define KEY_ALTF9 0x170
- #define KEY_ALTF10 0x171
- #define KEY_ALTA 0x11e
- #define KEY_ALTB 0x130
- #define KEY_ALTC 0x12e
- #define KEY_ALTD 0x120
- #define KEY_ALTE 0x112
- #define KEY_ALTF 0x121
- #define KEY_ALTG 0x122
- #define KEY_ALTH 0x123
- #define KEY_ALTI 0x117
- #define KEY_ALTJ 0x124
- #define KEY_ALTK 0x125
- #define KEY_ALTL 0x126
- #define KEY_ALTM 0x132
- #define KEY_ALTN 0x131
- #define KEY_ALTO 0x118
- #define KEY_ALTP 0x119
- #define KEY_ALTQ 0x110
- #define KEY_ALTR 0x113
- #define KEY_ALTS 0x11f
- #define KEY_ALTT 0x114
- #define KEY_ALTU 0x116
- #define KEY_ALTV 0x12f
- #define KEY_ALTW 0x111
- #define KEY_ALTX 0x12d
- #define KEY_ALTY 0x115
- #define KEY_ALTZ 0x12c
-
-
- /*
- Mauscodes für Tastendruck rechts (R), links (L) und mitte (M)
- */
-
-
-
- /*
- Ein kurzer Maustastendruck liefert
- */
- #define MOUSE_L_B 0x3001
- #define MOUSE_R_B 0x3002
- #define MOUSE_M_B 0x3004
-
-
- /*
- Das Drücken einer Taste (mit anschließendem Bewegen der Maus) liefert:
- */
- #define MOUSE_L_B_P 0x3011
- #define MOUSE_R_B_P 0x3012
- #define MOUSE_M_B_P 0x3014
-
-
- /*
- Eine Mausbewegung wird angezeigt mit dem Zeichen
- */
- #define MOUSE_MOVE 0x300a
-
-
- /*
- Das Loslassen einer Taste (nach Bewegen der Maus) liefert:
- */
- #define MOUSE_L_B_R 0x3021
- #define MOUSE_R_B_R 0x3022
- #define MOUSE_M_B_R 0x3024
-
-
- #define MOUSE_PRESS 0x3010
- #define MOUSE_RELEASE 0x3020
- #define MOUSE_KLICK 0x3000
-
-
- /*
- Folgende zwei Konstanten dienen der Einstellung der Betriebsart
- der Funktionen w_kbd und w_mousekbd
- */
- #define SAMPLE 0
- #define REQUEST 1
-
-
-
- /*
- Mit den folgenden Konstanten läßt sich festlegen, ob eine Ausgabe links-
- oder rechtsbündig auf einen Kanal erfolgt.
- */
- #define LINKSBUENDIG 0
- #define RECHTSBUENDIG 1
-
-
-
-
- /*
- Bei Aufruf von w_init(..) zur Steuerung der Ausgabe
- */
- #define DIREKT 0
- #define BIOS 1
-
-
- /*
- Zum Laden einer Maske mit oder ohne virtuellem Schirm
- */
- #define VIRTUELL 0
- #define NOVIRTUELL 1
-
-
- /***************************************************************************
- Konstanten zur Klassifizierung eines Feldes
- */
- #define ISSTRING 0
- #define ISCHAR 1
- #define ISBYTE 2
- #define ISINT 3
- #define ISWORD 4
- #define ISLONG 5
- #define ISDOUBLE 6
- #define ISDATE 7
- #define ISTIME 8
- #define ISDMARK 9
-
-
-
-
-
- /*
- Basis-Routinen
- */
- int w_init(int bios);
- int w_deinit(void);
- int w_error(void);
- int w_load(char *filename,int mode);
- int w_erase(int wnum);
- int w_open(int wnum);
- int w_close(void);
- int w_lib_open(char *lib_name);
- int w_lib_close(void);
- void w_setcolors(byte colortable[256]);
- byte *w_getcolortable(void);
-
-
- /*
- Routinen zum Menü-Aufbau
- */
- int w_switch(int wnum);
- int w_switch_pos(int wnum,int position);
- int w_switch_mouse_esc(int wnum,int mode);
- int w_switch_mark_mode(int wnum,int mode);
- int w_switch_mouse_cr(int wnum,int mode);
- int w_switch_visible_cr(int wnum);
- int w_switch_unvisible_cr(int wnum);
- int w_switch_auto_esc(int wnum);
- int w_switch_break_on_key(int wnum,int mode);
- int w_switch_last_key(int wnum);
- int w_switch_first_key(int wnum,int key);
- int w_switch_matrix(int wnum,int mode,int left,int right,int top,int bottom);
- int w_switch_range(int wnum,int first,int last);
-
-
- /*
- Routinen zur Ein-und Ausgabe
- */
-
-
- int strtodate(char *s,DAte *d);
- int strtotime(char *s,TIme *d);
- int strtodmark(char *s,DMark *d);
- int w_in_long(int wnum,int fnum,long *destin,long min,long max);
- int w_in_double(int wnum,int fnum,double *destin,double *min,double *max);
- int w_in_date(int wnum,int fnum,DAte *destin,DAte *min,DAte *max);
- int w_in_time(int wnum,int fnum,TIme *destin,TIme *min,TIme *max);
- int w_in_dmark(int wnum,int fnum,DMark *destin,DMark *min,DMark *max);
- int w_in_int(int wnum,int fnum,int *destin,int min,int max);
- int w_in_word(int wnum,int fnum,word *destin,word min,word max);
- int w_in_str(int wnum,int fnum,int stringlen,char *s,char *legal);
- int w_in_break_on_key(int mode);
- int w_in_last_key(void);
- void w_in_first_key(int key);
- void w_in_reset_curpos(void);
-
-
-
- int w_out_str(int wnum,int fnum,char *s);
- int w_vout_str(int wnum,int fnum,char *s);
- int w_printf(int wnum, int fnum,va_list arg_list, ...);
- int w_vprintf(int wnum, int fnum,va_list arg_list, ...);
- int w_out_byte(int wnum,int fnum,byte b);
- int w_vout_byte(int wnum,int fnum,byte b);
- int w_out_char(int wnum,int fnum,char c);
- int w_vout_char(int wnum,int fnum,char c);
- int w_out_int(int wnum,int fnum,int i);
- int w_vout_int(int wnum,int fnum,int i);
- int w_out_word(int wnum,int fnum,word w);
- int w_vout_word(int wnum,int fnum,word w);
- int w_out_long(int wnum,int fnum,long l);
- int w_vout_long(int wnum,int fnum,long l);
- int w_out_double(int wnum,int fnum,double *d);
- int w_vout_double(int wnum,int fnum,double *d);
- int w_out_date(int wnum,int fnum,DAte *d);
- int w_vout_date(int wnum,int fnum,DAte *d);
- int w_out_time(int wnum,int fnum,TIme *d);
- int w_vout_time(int wnum,int fnum,TIme *d);
- int w_out_dmark(int wnum,int fnum,DMark *d);
- int w_vout_dmark(int wnum,int fnum,DMark *d);
- int w_vout(int wnum);
- void w_out_temp_attribute(byte attribute);
- void w_out_temp_format(int format);
-
-
-
- int w_in_field(int wnum,int fnum,void *buffer);
- int w_out_field(int wnum,int fnum,void *buffer);
- int w_vout_field(int wnum,int fnum,void *buffer);
- int w_out_struct(int wnum,int first,int last,void *source);
- int w_vout_struct(int wnum,int first,int last,void *source);
- int w_in_struct(int wnum,int first,int last,void *destin);
- int w_struct_sizeof(int wnum,int first,int last);
- int w_struct_init(int wnum,int first,int last,void *destin,int max);
-
-
-
-
-
- /*
- Routinen zur Mausverwaltung
- */
- int w_mouse_init(void);
- int w_mouse_deinit(void);
- int w_mouse_exist(void);
- void w_mouse_gotoxy(int x,int y); ;
- int w_mouse_cur_x(void);
- int w_mouse_cur_y(void);
- int w_mouse_pre_x(void);
- int w_mouse_pre_y(void);
- int w_mouse_rel_x(void);
- int w_mouse_rel_y(void);
-
-
-
- /*
- Maus- und Tastaturabfrage
- */
- int w_kbd(int mode);
- int w_mousekbd(int mode);
-
-
- /*
- Abruf von Maskeninformationen
- */
-
-
-
- int w_xyon_field(int wnum,int x,int y);
- int w_xyon_win(int wnum,int x,int y);
-
-
-
- int w_is_wnum(int wnum);
- int w_is_field(int wnum,int fnum);
- char *w_info_vscreen(int wnum);
- char *w_info_bscreen(int wnum);
- int w_info_win_left(int wnum);
- int w_info_win_right(int wnum);
- int w_info_win_top(int wnum);
- int w_info_win_bottom(int wnum);
- byte w_info_attr(int wnum,int x,int y);
- char w_info_text(int wnum,int x,int y);
- int w_info_field_num(int wnum);
- int w_info_field_x(int wnum,int fnum);
- int w_info_field_y(int wnum,int fnum);
- int w_info_field_width(int wnum,int fnum);
- int w_info_field_rev_attrib(int wnum,int fnum);
- int w_info_field_out_attrib(int wnum,int fnum);
- int w_info_field_in_attrib(int wnum,int fnum);
- int w_info_field_type(int wnum,int fnum);
- int w_info_field_in_right(int wnum,int fnum);
- int w_info_field_out_right(int wnum,int fnum);
- int w_info_field_in_owrite(int wnum,int fnum);
- int w_info_field_del(int wnum,int fnum);
- void *w_info_field_min(int wnum,int fnum,void *min);
- void *w_info_field_max(int wnum,int fnum,void *max);
-
-
-
- /*
- Bildschirmroutinen
- */
- void v_init(int bios);
- int v_mono(void);
- int v_movewin(int sx1, int sy1, int sx2, int sy2, int dx1, int dy1);
- int v_getwin (int left, int top, int right, int bottom, void *buffer);
- int v_putwin (int left, int top, int right, int bottom, void *buffer);
- int v_gettext(int left, int top, int right, int bottom, void *buffer);
- int v_puttext(int left, int top, int right, int bottom, void *buffer);
- int v_getattr(int left, int top, int right, int bottom, void *buffer);
- int v_putattr(int left, int top, int right, int bottom, void *buffer);
- void v_gotoxy(int x, int y);
- word v_wherexy(void);
- int v_wherex(void);
- int v_wherey(void);
- word v_getcursor(void);
- void v_setcursor(word shape);
- void v_hidecursor(void);
- void v_showcursor(void);
- void v_cls(void);
- void v_clrscr(void);
-
-
- /*
- Funktionen zum MICROSOFT-Maus-Interface
- */
- int mouse_init(word *buttons);
- void mouse_show_cursor(void);
- void mouse_hide_cursor(void);
- word mouse_get_status(word *buttons,word *xpos,word *ypos);
- void mouse_set_pos(word xpos,word ypos);
- word mouse_get_press_status(word button,word *status,word *presses,word *xppos,word *yppos);
- word mouse_get_release_status(word button,word *status,word *releases,word *xrpos,word *yrpos);
- void mouse_set_xrange(word xmin,word xmax);
- void mouse_set_yrange(word ymin,word ymax);
- void mouse_def_graphcursorblock(word xhotspot,word yhotspot,word cursormaskpointer);
- void mouse_def_textcursor(word cursorselect,word screenmask,word cursormask);
- void mouse_get_motioncounter(word *xcount,word *ycount);
- void mouse_def_eventhandler(word eventmask,void (far *handler)(void));
- void mouse_ligthpen_emulation_on(void);
- void mouse_ligthpen_emulation_off(word xpos,word ypos);
- void mouse_set_motion_per_pixel(word xstep,word ystep);
- void mouse_conditional_hide_cursor(word left, word right, word top, word bottom);
-
-
-
-
-
-
-