diff options
Diffstat (limited to 'common/linux/freeze.h')
-rw-r--r-- | common/linux/freeze.h | 44 |
1 files changed, 29 insertions, 15 deletions
diff --git a/common/linux/freeze.h b/common/linux/freeze.h index 892b5b1..0827f6e 100644 --- a/common/linux/freeze.h +++ b/common/linux/freeze.h @@ -10,27 +10,41 @@ #ifndef __FREEZE_H #define __FREEZE_H -// #ifndef FREEZE_SUBKEY -// #error must define FREEZE_SUBKEY to a string uniquely identifying the app -// #endif +#ifndef FREEZE_SUBKEY +#error must define FREEZE_SUBKEY to a string uniquely identifying the app +#endif + +#define FreezeWindowPos(hwnd) FreezeWindowPosF(hwnd, FREEZE_SUBKEY, #hwnd) +void FreezeWindowPosF(HWND hWnd, char *subKey, char *name); + +#define ThawWindowPos(hwnd) ThawWindowPosF(hwnd, FREEZE_SUBKEY, #hwnd) +void ThawWindowPosF(HWND hWnd, char *subKey, char *name); -// #define FreezeWindowPos(hwnd) FreezeWindowPosF(hwnd, FREEZE_SUBKEY, #hwnd) -// void FreezeWindowPosF(HWND hWnd, char *subKey, char *name); +#define FreezeDWORD(val) FreezeDWORDF(val, FREEZE_SUBKEY, #val) +void FreezeDWORDF(DWORD val, char *subKey, char *name); -// #define ThawWindowPos(hwnd) ThawWindowPosF(hwnd, FREEZE_SUBKEY, #hwnd) -// void ThawWindowPosF(HWND hWnd, char *subKey, char *name); +#define ThawDWORD(val) val = ThawDWORDF(val, FREEZE_SUBKEY, #val) +DWORD ThawDWORDF(DWORD val, char *subKey, char *name); -// #define FreezeDWORD(val) FreezeDWORDF(val, FREEZE_SUBKEY, #val) -// void FreezeDWORDF(DWORD val, char *subKey, char *name); +#define FreezeString(val) FreezeStringF(val, FREEZE_SUBKEY, #val) +void FreezeStringF(char *val, char *subKey, char *name); -// #define ThawDWORD(val) val = ThawDWORDF(val, FREEZE_SUBKEY, #val) -// DWORD ThawDWORDF(DWORD val, char *subKey, char *name); +#define ThawString(val, max) ThawStringF(val, max, FREEZE_SUBKEY, #val) +void ThawStringF(char *val, int max, char *subKey, char *name); -// #define FreezeString(val) FreezeStringF(val, FREEZE_SUBKEY, #val) -// void FreezeStringF(char *val, char *subKey, char *name); +typedef union regKeyVal{ + int i; + float f; + double d; + bool b; + DWORD D; +} KeyVal; -// #define ThawString(val, max) ThawStringF(val, max, FREEZE_SUBKEY, #val) -// void ThawStringF(char *val, int max, char *subKey, char *name); +typedef struct regKeys{ + char name[15]; + char type; + KeyVal val; +} Key; #endif |