summaryrefslogtreecommitdiff
path: root/plugins/utils/templates.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-05-17 15:50:17 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-05-17 15:50:17 +0000
commita338e594273bda039eec784ecb461395f23bd56e (patch)
tree672ca0530c45df8af7289d6d3d7e287342a77376 /plugins/utils/templates.h
parent11771cfdeade7fbb283a208138c6561ba779779c (diff)
- missing plugins added
- fixes for the status plugins' projects - other VS2010 projects cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@13 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/utils/templates.h')
-rw-r--r--plugins/utils/templates.h102
1 files changed, 102 insertions, 0 deletions
diff --git a/plugins/utils/templates.h b/plugins/utils/templates.h
new file mode 100644
index 0000000000..e55fb7a50e
--- /dev/null
+++ b/plugins/utils/templates.h
@@ -0,0 +1,102 @@
+#ifndef __TEMPLATES_H__
+# define __TEMPLATES_H__
+
+
+#include <windows.h>
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+
+// Default templates to be set by using notifiers
+
+#define NFOPT_DEFTEMPL_TEXT "General/DefaultTemplate/Text"
+#define NFOPT_DEFTEMPL_TEXTW "General/DefaultTemplate/TextW"
+#define NFOPT_DEFTEMPL_TITLE "General/DefaultTemplate/Title"
+#define NFOPT_DEFTEMPL_TITLEW "General/DefaultTemplate/TitleW"
+
+
+
+
+// All of theese have to be stored as DWORDs
+
+#define NFOPT_VARIABLES_STRS "Variables/Strings" // char ** (each has to start and end with %)
+#define NFOPT_VARIABLES_DESCRIPTIONS_STRS "VariablesDescriptions/Strings" // char **
+#define NFOPT_DATA_STRS "Data/Strings" // char **
+
+#define NFOPT_VARIABLES_STRSW "Variables/StringsW" // WCHAR ** (each has to start and end with %)
+#define NFOPT_VARIABLES_DESCRIPTIONS_STRSW "VariablesDescriptions/StringsW"// WCHAR **
+#define NFOPT_DATA_STRSW "Data/StringsW" // WCHAR **
+
+#define NFOPT_VARIABLES_SIZE "Variables/Size" // size_t
+#define NFOPT_VARIABLES_DESCRIPTIONS_SIZE "VariablesDescriptions/Size" // size_t
+#define NFOPT_DATA_SIZE "Data/Size" // size_t
+
+
+// Default variables if none is provided by the plugin calling the notification
+// char *defaultVariables[] = { "%title%", "%text%" };
+
+
+void MNotifySetTemplate(HANDLE notifyORtype, const char *name, const char *value);
+void MNotifySetWTemplate(HANDLE notifyORtype, const char *name, const WCHAR *value);
+
+const char *MNotifyGetTemplate(HANDLE notifyORtype, const char *name, const char *defValue);
+const WCHAR *MNotifyGetWTemplate(HANDLE notifyORtype, const char *name, const WCHAR *defValue);
+
+// You must free the return with mir_sys_free
+char *MNotifyGetParsedTemplate(HANDLE notifyORtype, const char *name, const char *defValue);
+WCHAR *MNotifyGetWParsedTemplate(HANDLE notifyORtype, const char *name, const WCHAR *defValue);
+
+
+BOOL MNotifyHasVariables(HANDLE notifyORtype);
+BOOL MNotifyHasWVariables(HANDLE notifyORtype);
+
+void MNotifyShowVariables(HANDLE notifyORtype);
+void MNotifyShowWVariables(HANDLE notifyORtype);
+
+
+#ifdef _UNICODE
+
+# define MNotifyGetTString MNotifyGetWString
+# define MNotifyGetTTemplate MNotifyGetWTemplate
+# define MNotifySetTString MNotifySetWString
+# define MNotifySetTTemplate MNotifyGetWTemplate
+# define MNotifyGetTParsedTemplate MNotifyGetWParsedTemplate
+# define MNotifyHasTVariables MNotifyHasWVariables
+# define MNotifyShowTVariables MNotifyShowWVariables
+
+# define NFOPT_DEFTEMPL_TEXTT NFOPT_DEFTEMPL_TEXTW
+# define NFOPT_DEFTEMPL_TITLET NFOPT_DEFTEMPL_TITLEW
+
+# define NFOPT_VARIABLES_STRST NFOPT_VARIABLES_STRSW
+# define NFOPT_VARIABLES_DESCRIPTIONS_STRST NFOPT_VARIABLES_DESCRIPTIONS_STRSW
+# define NFOPT_DATA_STRST NFOPT_DATA_STRSW
+
+
+#else
+
+# define MNotifyGetTString MNotifyGetString
+# define MNotifyGetTTemplate MNotifyGetTemplate
+# define MNotifySetTString MNotifySetString
+# define MNotifySetTTemplate MNotifySetTemplate
+# define MNotifyGetTParsedTemplate MNotifyGetParsedTemplate
+# define MNotifyHasTVariables MNotifyHasVariables
+# define MNotifyShowTVariables MNotifyShowVariables
+
+# define NFOPT_DEFTEMPL_TEXTT NFOPT_DEFTEMPL_TEXT
+# define NFOPT_DEFTEMPL_TITLET NFOPT_DEFTEMPL_TITLE
+
+# define NFOPT_VARIABLES_STRST NFOPT_VARIABLES_STRS
+# define NFOPT_VARIABLES_DESCRIPTIONS_STRST NFOPT_VARIABLES_DESCRIPTIONS_STRS
+# define NFOPT_DATA_STRST NFOPT_DATA_STRS
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // __TEMPLATES_H__