Commit 75cf292b authored by deuce's avatar deuce
Browse files

Allow both timedisplay and bottomline to be replaced/disabled.

parent 33a44d89
......@@ -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;
......
......@@ -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 */
/****************************************************************************/
......
......@@ -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();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment