diff --git a/src/uifc/uifc.c b/src/uifc/uifc.c index a154b52549c16bda04b470f48743c363d4d5784c..1fd5c531ed8e170390d47e0e601bed12c95387f8 100644 --- a/src/uifc/uifc.c +++ b/src/uifc/uifc.c @@ -56,12 +56,6 @@ DosSleep(msec ? msec : 1); #define mswait(x) delay(x) #endif - /* Bottom line elements */ -#define BL_INS (1<<0) /* INS key */ -#define BL_DEL (1<<1) /* DEL key */ -#define BL_GET (1<<2) /* Get key */ -#define BL_PUT (1<<3) /* Put key */ - static char hclr,lclr,bclr,cclr,show_free_mem=0; static int cursor; static char* helpfile=0; @@ -142,6 +136,7 @@ int uifcini(uifcapi_t* uifcapi) api->showhelp=help; api->showbuf=NULL; api->timedisplay=timedisplay; + api->bottomline=bottomline; if(api->scrn_len!=0) { switch(api->scrn_len) { @@ -373,7 +368,8 @@ if(mode&WIN_INS) bline|=BL_INS; if(mode&WIN_DEL) bline|=BL_DEL; if(mode&WIN_GET) bline|=BL_GET; if(mode&WIN_PUT) bline|=BL_PUT; -bottomline(bline); +if(api->bottomline != NULL) + api->bottomline(bline); while(opts<max_opts && opts<MAX_OPTS) if(option[opts]==NULL || option[opts][0]==0) break; diff --git a/src/uifc/uifc.h b/src/uifc/uifc.h index e88fa04dce98152ab483755108a5f8e8e5e92c4e..c903484006db150f584e05732531993363c743df 100644 --- a/src/uifc/uifc.h +++ b/src/uifc/uifc.h @@ -225,6 +225,19 @@ /* Input area (NOT outside of window!) */ /* And ungets the mouse event. */ + /* Bottom line elements */ +#define BL_INS (1<<0) /* INS key */ +#define BL_DEL (1<<1) /* DEL key */ +#define BL_GET (1<<2) /* Get key */ +#define BL_PUT (1<<3) /* Put key */ + +#define BL_INS (1<<0) /* INS key */ +#define BL_DEL (1<<1) /* DEL key */ +#define BL_GET (1<<2) /* Get key */ +#define BL_PUT (1<<3) /* Put key */ +#define BL_EDIT (1<<4) /* Edit key */ + + #define HELPBUF_SIZE 4000 #ifndef _GEN_DEFS_H @@ -441,6 +454,11 @@ typedef struct { /****************************************************************************/ void (*timedisplay)(BOOL force); +/****************************************************************************/ +/* Displays the bottom line using the BL_* macros */ +/****************************************************************************/ + void (*bottomline)(int line); + /****************************************************************************/ /* String input/exit box at a specified position */ /****************************************************************************/ diff --git a/src/uifc/uifc32.c b/src/uifc/uifc32.c index c5ae377be4feb6009f7a45c7a808c297c0667cfa..3f79e9c943fd0c199a9c8c93667f0774b32a7e3f 100644 --- a/src/uifc/uifc32.c +++ b/src/uifc/uifc32.c @@ -52,12 +52,6 @@ #include "keys.h" #include "uifc.h" #define MAX_GETSTR 5120 - /* Bottom line elements */ -#define BL_INS (1<<0) /* INS key */ -#define BL_DEL (1<<1) /* DEL key */ -#define BL_GET (1<<2) /* Get key */ -#define BL_PUT (1<<3) /* Put key */ -#define BL_EDIT (1<<4) /* Edit key */ #define BLINK 128 @@ -169,6 +163,7 @@ int uifcini32(uifcapi_t* uifcapi) api->showhelp=help; api->showbuf=showbuf; api->timedisplay=timedisplay; + api->bottomline=bottomline; api->getstrxy=ugetstr; api->printf=uprintf; @@ -533,7 +528,8 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar if(mode&WIN_GET) bline|=BL_GET; if(mode&WIN_PUT) bline|=BL_PUT; if(mode&WIN_EDIT) bline|=BL_EDIT; - bottomline(bline); + if(api->bottomline != NULL) + api->bottomline(bline); while(opts<MAX_OPTS) if(option[opts]==NULL || option[opts][0]==0) break; @@ -895,7 +891,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar ,y,height,*cur,bar ? *bar :0xff,api->savdepth,opts); #endif if(api->timedisplay != NULL) - timedisplay(/* force? */FALSE); + api->timedisplay(/* force? */FALSE); i=0; if(kbwait()) { i=inkey();