diff options
Diffstat (limited to 'app/wlib/include')
| -rw-r--r-- | app/wlib/include/wcolors.h | 80 | ||||
| -rw-r--r-- | app/wlib/include/wlib.h | 57 | 
2 files changed, 87 insertions, 50 deletions
| diff --git a/app/wlib/include/wcolors.h b/app/wlib/include/wcolors.h index 46d15a8..525c98f 100644 --- a/app/wlib/include/wcolors.h +++ b/app/wlib/include/wcolors.h @@ -1,42 +1,42 @@  /* Some colors */ -#define wDrawColorWhite		(0) -#define wDrawColorBlack		(1) -#define wDrawColorRed		(2) -#define wDrawColorGreen		(3) -#define wDrawColorBlue		(4) -#define wDrawColorYellow	(5) -#define wDrawColorPurple	(6) -#define wDrawColorAqua		(7) -#define wDrawColorDkRed		(8) -#define wDrawColorDkGreen	(9) -#define wDrawColorDkBlue	(10) -#define wDrawColorDkYellow	(11) -#define wDrawColorDkPurple	(12) -#define wDrawColorDkAqua	(13) -#define wDrawColorRoyalBlue	(14) -#define wDrawColorDeepSkyBlue	(15) -#define wDrawColorLightSkyBlue	(16) -#define wDrawColorSteelBlue	(17) -#define wDrawColorPowderBlue	(18) -#define wDrawColorAquamarine	(19) -#define wDrawColorSeaGreen	(20) -#define wDrawColorPaleGreen	(21) -#define wDrawColorLawnGreen	(22) -#define wDrawColorLimeGreen	(23) -#define wDrawColorForestGreen	(24) -#define wDrawColorGold		(25) -#define wDrawColorRosyBrown	(26) -#define wDrawColorSaddleBrown	(27) -#define wDrawColorBeige		(28) -#define wDrawColorTan		(29) -#define wDrawColorChocolate	(30) -#define wDrawColorBrown		(31) -#define wDrawColorOrange	(32) -#define wDrawColorCoral		(33) -#define wDrawColorTomato	(34) -#define wDrawColorHotPink	(35) -#define wDrawColorPink		(36) -#define wDrawColorMaroon	(37) -#define wDrawColorViolet	(38) -#define wDrawColorPurple2	(39) +//#define wDrawColorWhite		(0) +//#define wDrawColorBlack		(1) +//#define wDrawColorRed		(2) +//#define wDrawColorGreen		(3) +//#define wDrawColorBlue		(4) +//#define wDrawColorYellow	(5) +//#define wDrawColorPurple	(6) +//#define wDrawColorAqua		(7) +//#define wDrawColorDkRed		(8) +//#define wDrawColorDkGreen	(9) +//#define wDrawColorDkBlue	(10) +//#define wDrawColorDkYellow	(11) +//#define wDrawColorDkPurple	(12) +//#define wDrawColorDkAqua	(13) +//#define wDrawColorRoyalBlue	(14) +//#define wDrawColorDeepSkyBlue	(15) +//#define wDrawColorLightSkyBlue	(16) +//#define wDrawColorSteelBlue	(17) +//#define wDrawColorPowderBlue	(18) +//#define wDrawColorAquamarine	(19) +//#define wDrawColorSeaGreen	(20) +//#define wDrawColorPaleGreen	(21) +//#define wDrawColorLawnGreen	(22) +//#define wDrawColorLimeGreen	(23) +//#define wDrawColorForestGreen	(24) +//#define wDrawColorGold		(25) +//#define wDrawColorRosyBrown	(26) +//#define wDrawColorSaddleBrown	(27) +//#define wDrawColorBeige		(28) +//#define wDrawColorTan		(29) +//#define wDrawColorChocolate	(30) +//#define wDrawColorBrown		(31) +//#define wDrawColorOrange	(32) +//#define wDrawColorCoral		(33) +//#define wDrawColorTomato	(34) +//#define wDrawColorHotPink	(35) +//#define wDrawColorPink		(36) +//#define wDrawColorMaroon	(37) +//#define wDrawColorViolet	(38) +//#define wDrawColorPurple2	(39) diff --git a/app/wlib/include/wlib.h b/app/wlib/include/wlib.h index fa07454..9d055d7 100644 --- a/app/wlib/include/wlib.h +++ b/app/wlib/include/wlib.h @@ -2,8 +2,8 @@   * Common definitions and declarations for the wlib library   */ -#ifndef WIN_H -#define WIN_H +#ifndef HAVE_WLIB_H +#define HAVE_WLIB_H  #ifdef WINDOWS  #include <stdio.h>  #define FILE_SEP_CHAR "\\" @@ -54,6 +54,7 @@ typedef struct wIcon_t      * wIcon_p;  typedef struct wDrawBitMap_t * wDrawBitMap_p;  typedef struct wFont_t      * wFont_p;  typedef struct wBitmap_t	* wBitmap_p; +typedef struct wStatus_t    * wStatus_p;  typedef int wDrawWidth;  typedef int wDrawColor; @@ -204,6 +205,7 @@ FILE * wFileOpen(		const char *, const char * );  typedef enum {  	wClose_e,  	wResize_e, +	wState_e,  	wQuit_e,  	wRedraw_e }  		winProcEvent; @@ -220,7 +222,8 @@ typedef void (*wWinCallBack_p)( wWin_p, winProcEvent, void * );  #define F_RECALLSIZE	(1L<<10)  #define F_TOP		(1L<<11)  #define F_CENTER	(1L<<12) -#define F_HIDE		(1L<<12) +#define F_HIDE		(1L<<13) +#define F_MAXIMIZE  (1L<<14)  wWin_p wWinMainCreate(	        const char *, wPos_t, wPos_t, const char *, const char *, const char *,  				long, wWinCallBack_p, void * ); @@ -232,6 +235,7 @@ void wWinSetBigIcon(		wWin_p, wIcon_p );  void wWinSetSmallIcon(		wWin_p, wIcon_p );  void wWinShow(			wWin_p, wBool_t );  wBool_t wWinIsVisible(		wWin_p ); +wBool_t wWinIsMaximized( wWin_p win);  void wWinGetSize (		wWin_p, wPos_t *, wPos_t * );  void wWinSetSize(		wWin_p, wPos_t, wPos_t );  void wWinSetTitle(		wWin_p, const char * ); @@ -372,6 +376,7 @@ void wListSetEditable(		wList_p, wBool_t );  #define BM_LARGE (1L<<24)  #define BM_SMALL (1L<<25) +#define COMBOBOX (1L)  #define wMessageSetFont( x ) ( x & (BM_LARGE | BM_SMALL )) @@ -381,6 +386,7 @@ wMessage_p wMessageCreateEx(	wWin_p, wPos_t, wPos_t, const char *,  void wMessageSetValue(		wMessage_p, const char * );  void wMessageSetWidth(		wMessage_p, wPos_t ); +wPos_t wMessageGetWidth( const char *testString );  wPos_t wMessageGetHeight( long ); @@ -466,7 +472,8 @@ typedef void (*wDrawActionCallBack_p)(	wDraw_p, void*, wAction_t, wPos_t, wPos_t  /* Creation Options */  #define BD_TICKS	(1L<<25)  #define BD_DIRECT	(1L<<26) -#define BD_NOCAPTURE	(1L<<27) +#define BD_NOCAPTURE (1L<<27) +#define BD_NOFOCUS  (1L<<28)  /* Create: */  wDraw_p wDrawCreate(		wWin_p, wPos_t, wPos_t, const char *, long, @@ -594,7 +601,10 @@ typedef enum {  	wAccelKey_F9,  	wAccelKey_F10,  	wAccelKey_F11, -	wAccelKey_F12 } +	wAccelKey_F12, +    wAccelKey_Numpad_Add, +    wAccelKey_Numpad_Subtract, +	wAccelKey_LineFeed }  	wAccelKey_e;  /* Creation CallBacks */ @@ -677,16 +687,43 @@ wDrawColor wColorSelectButtonGetColor( wButton_p );   * Preferences   */ -void wPrefSetString(		const char *, const char *, const char * ); -const char * wPrefGetString(		const char *, const char * ); -void wPrefSetInteger(		const char *, const char *, long ); -wBool_t wPrefGetInteger(	const char *, const char *, long *, long ); +void wPrefSetString(const char *, const char *, const char * ); +char * wPrefGetString(const char *section, const char *name); +char * wPrefGetStringBasic( const char *section, const char *name ); +char * wPrefGetStringExt(const char *section, const char *name); + +void wPrefSetInteger(const char *, const char *, long ); +wBool_t wPrefGetInteger(const char *section, const char *name, long *result, long defaultValue); +wBool_t wPrefGetIntegerBasic(const char *section, const char *name, long *result, long defaultValue); +wBool_t wPrefGetIntegerExt(const char *section, const char *name, long *result, long defaultValue); +  void wPrefSetFloat(		const char *, const char *, double ); -wBool_t wPrefGetFloat(		const char *, const char *, double *, double ); +wBool_t wPrefGetFloat(const char *section, const char *name, double *result, double defaultValue); +wBool_t wPrefGetFloatBasic(const char *section, const char *name, double *result, double defaultValue); +wBool_t wPrefGetFloatExt(const char *section, const char *name, double *result, double defaultValue); +  const char * wPrefGetSectionItem( const char * sectionName, wIndex_t * index, const char ** name );  void wPrefFlush(		void );  void wPrefReset(		void );  void CleanupCustom( void ); +/*------------------------------------------------------------------------------ + * + * Statusbar + */ + +wStatus_p wStatusCreate( +    wWin_p	parent, +    wPos_t	x, +    wPos_t	y, +    const char 	* labelStr, +    wPos_t	width, +    const char	*message ); + +wPos_t wStatusGetWidth(const char *testString); +wPos_t wStatusGetHeight(long flags); + +void wStatusSetValue(wStatus_p b, const char * arg); +void wStatusSetWidth(wStatus_p b, wPos_t width);  #endif | 
