summaryrefslogtreecommitdiff
path: root/plugins/NotesAndReminders/src/miscutils.h
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2012-07-23 11:56:59 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2012-07-23 11:56:59 +0000
commit177c84716db384c8be095219c58d0a68f87101fe (patch)
tree84449f27f215b253da99729ddb0aaf6df40bef0c /plugins/NotesAndReminders/src/miscutils.h
parentcbb10e8c9089dfc99946ddc784afdb126e2128a8 (diff)
NotesAndReminders, Nudge, OpenFolder, PackUpdater: changed folder structure
git-svn-id: http://svn.miranda-ng.org/main/trunk@1116 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NotesAndReminders/src/miscutils.h')
-rw-r--r--plugins/NotesAndReminders/src/miscutils.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/plugins/NotesAndReminders/src/miscutils.h b/plugins/NotesAndReminders/src/miscutils.h
new file mode 100644
index 0000000000..104de5313c
--- /dev/null
+++ b/plugins/NotesAndReminders/src/miscutils.h
@@ -0,0 +1,47 @@
+void WriteSettingInt(HANDLE hContact,char *ModuleName,
+ char *SettingName,int Value);
+int ReadSettingInt(HANDLE hContact,char *ModuleName,
+ char *SettingName,int Default);
+void ReadSettingBlob(HANDLE hContact, char *ModuleName,
+ char *SettingName, WORD *pSize, void **pbBlob);
+void WriteSettingBlob(HANDLE hContact,char *ModuleName,
+ char *SettingName,WORD pSize,void *pbBlob);
+void FreeSettingBlob(WORD pSize,void * pbBlob);
+BOOL ReadSettingBool(HANDLE hContact,char *ModuleName,
+ char *SettingName,BOOL Default);
+void WriteSettingBool(HANDLE hContact,char *ModuleName,
+ char *SettingName,BOOL Value);
+void DeleteSetting(HANDLE hContact,char *ModuleName,
+ char *SettingName);
+void WriteSettingIntArray(HANDLE hContact,char *ModuleName,
+ char *SettingName,const int *Value, int Size);
+BOOL ReadSettingIntArray(HANDLE hContact,char *ModuleName,
+ char *SettingName,int *Value, int Size);
+
+extern BOOL (WINAPI *MySetLayeredWindowAttributes)(HWND,COLORREF,BYTE,DWORD);
+extern HANDLE (WINAPI *MyMonitorFromWindow)(HWND,DWORD);
+extern BOOL (WINAPI *MyTzSpecificLocalTimeToSystemTime)(LPTIME_ZONE_INFORMATION,LPSYSTEMTIME,LPSYSTEMTIME);
+extern BOOL (WINAPI *MySystemTimeToTzSpecificLocalTime)(LPTIME_ZONE_INFORMATION,LPSYSTEMTIME,LPSYSTEMTIME);
+
+WORD ConvertHotKeyToControl(WORD HK);
+WORD ConvertControlToHotKey(WORD HK);
+
+typedef struct {
+ void *ptrdata;
+ void *next;
+} TREEELEMENT;
+
+void TreeAdd(TREEELEMENT **root,void *Data);
+void TreeAddSorted(TREEELEMENT **root,void *Data,int (*CompareCb)(TREEELEMENT*,TREEELEMENT*));
+void TreeDelete(TREEELEMENT **root,void *Item);
+void *TreeGetAt(TREEELEMENT *root,int Item);
+int TreeGetCount(TREEELEMENT *root);
+
+static void __inline SAFE_FREE(void** p)
+{
+ if (*p)
+ {
+ free(*p);
+ *p = NULL;
+ }
+}