--- sbbs/src/uifc/uifc.h 2018/04/24 16:41:24 1.1.1.1 +++ sbbs/src/uifc/uifc.h 2018/04/24 16:45:47 1.1.1.2 @@ -2,13 +2,13 @@ /* Rob Swindell's Text-mode User Interface Library */ -/* $Id: uifc.h,v 1.1.1.1 2018/04/24 16:41:24 root Exp $ */ +/* $Id: uifc.h,v 1.1.1.2 2018/04/24 16:45:47 root Exp $ */ /**************************************************************************** * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2005 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2010 Rob Swindell - http://www.synchro.net/copyright.html * * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public License * @@ -86,8 +86,9 @@ #define MAX_OPLN 75 /* Maximum length of each option per menu call */ #define MAX_BUFS 7 /* Maximum number of screen buffers to save */ #define MIN_LINES 14 /* Minimum number of screen lines supported */ -#define MAX_LINES 60 /* Maximum number of screen rows supported */ -#define MAX_BFLN 80*MAX_LINES*2 /* Maximum size of screen buffers */ +#define MAX_LINES 255 /* Maximum number of screen lines supported (ciolib screenheight is a uchar) */ +#define MAX_COLS 255 /* Maximum number of screen columns supported (ciolib screenwidth is a uchar) */ +#define MAX_BFLN (MAX_COLS*MAX_LINES*2) /* Maximum size of screen buffers, char + attr */ #ifndef uint #define uint unsigned int @@ -103,6 +104,7 @@ #define UIFC_IBM (1<<4) /* Force use of IBM charset */ #define UIFC_NOCTRL (1<<5) /* Don't allow useage of CTRL keys for movement * etc in menus (Still available in text boxes) */ +#define UIFC_NHM (1<<6) /* Don't hide the mouse pointer */ /*******************************/ /* Bits in uifcapi_t.list mode */ @@ -139,6 +141,10 @@ #define WIN_EDIT (1<<27) /* Allow F2 to edit a menu item */ #define WIN_EDITACT (1<<28) /* Remain active after edit key */ #define WIN_INACT (1<<29) /* Draw window inactive... intended for use with WIN_IMM */ +#define WIN_POP (1<<30) /* Exit the list. Act as though ESC was pressed. */ + /* Intended for use after a WIN_EXTKEYS or WIN_DYN */ +#define WIN_SEL (1<<31) /* Exit the list. Act as though ENTER was pressed. */ + /* Intended for use after a WIN_EXTKEYS or WIN_DYN */ #define WIN_MID WIN_L2R|WIN_T2B /* Place window in middle of screen */ @@ -401,6 +407,18 @@ typedef struct { } uifcapi_t; +#ifdef __cplusplus +extern "C" { +#endif + +/* Return value from uifc_api.list() when uifcYesNoOpts is used */ +enum { + uifcYes=0, + uifcNo=1 +}; + +extern char* uifcYesNoOpts[]; + /****************************************************************************/ /* Initialization routines for each UIFC implementation. */ /* Returns 0 on success, non-zero on failure. */ @@ -410,4 +428,8 @@ int uifcinix(uifcapi_t*); /* Standard I/ int uifcini32(uifcapi_t*); /* conio/curses implementation */ /****************************************************************************/ +#ifdef __cplusplus +} +#endif + #endif /* Don't add anything after this line! */