summaryrefslogtreecommitdiff
path: root/app/wlib/include/wlib.h
diff options
context:
space:
mode:
Diffstat (limited to 'app/wlib/include/wlib.h')
-rw-r--r--app/wlib/include/wlib.h57
1 files changed, 47 insertions, 10 deletions
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