diff options
author | dartraiden <wowemuh@gmail.com> | 2024-02-19 20:13:12 +0300 |
---|---|---|
committer | dartraiden <wowemuh@gmail.com> | 2024-02-19 20:16:52 +0300 |
commit | 2f47988d1ef6672929762fba39fa69ef1b4dfa7a (patch) | |
tree | baa3433b11b1c44ab5a12c919ab004a24d645043 /plugins/NewStory/src/templates.h | |
parent | f50885f33f7d1e129d719f06a43cc73518e0ffb1 (diff) |
NewStory:
- add [cX] tag to variables help
- convert sources to CR+LF
Diffstat (limited to 'plugins/NewStory/src/templates.h')
-rw-r--r-- | plugins/NewStory/src/templates.h | 144 |
1 files changed, 72 insertions, 72 deletions
diff --git a/plugins/NewStory/src/templates.h b/plugins/NewStory/src/templates.h index ffe904c16e..ad16b646ef 100644 --- a/plugins/NewStory/src/templates.h +++ b/plugins/NewStory/src/templates.h @@ -1,73 +1,73 @@ -#ifndef __templates_h__ -#define __templates_h__ - -struct TemplateVars -{ - TemplateVars(); - ~TemplateVars(); - - struct { - wchar_t *val; - bool del; - } - vars[256]; - - __forceinline wchar_t* GetVar(uint8_t id) { - return vars[id].val; - } - - void SetNick(wchar_t *v); - void SetVar(uint8_t id, wchar_t *v, bool d); -}; - -typedef void (*VarFunc)(TemplateVars *vars, MCONTACT hContact, ItemData *item); - -struct TemplateInfo -{ - char* setting; - wchar_t* group; - int iIcon; - wchar_t* title; - wchar_t* defvalue; - wchar_t* value; - wchar_t* tmpValue; - VarFunc vf[6]; - - HICON getIcon() const; -}; - -enum -{ - TPL_TITLE, - - TPL_MESSAGE, - TPL_MSG_HEAD, - TPL_MSG_GRP, - TPL_FILE, - TPL_SIGN, - TPL_PRESENCE, - TPL_OTHER, - - TPL_AUTH, - TPL_ADDED, - TPL_DELETED, - - TPL_COPY_MESSAGE, - TPL_COPY_FILE, - TPL_COPY_SIGN, - TPL_COPY_OTHER, - - TPL_COPY_AUTH, - TPL_COPY_ADDED, - TPL_COPY_DELETED, - TPL_COPY_PRESENCE, - - TPL_COUNT -}; - -extern TemplateInfo templates[TPL_COUNT]; - -void LoadTemplates(); -void SaveTemplates(); - +#ifndef __templates_h__
+#define __templates_h__
+
+struct TemplateVars
+{
+ TemplateVars();
+ ~TemplateVars();
+
+ struct {
+ wchar_t *val;
+ bool del;
+ }
+ vars[256];
+
+ __forceinline wchar_t* GetVar(uint8_t id) {
+ return vars[id].val;
+ }
+
+ void SetNick(wchar_t *v);
+ void SetVar(uint8_t id, wchar_t *v, bool d);
+};
+
+typedef void (*VarFunc)(TemplateVars *vars, MCONTACT hContact, ItemData *item);
+
+struct TemplateInfo
+{
+ char* setting;
+ wchar_t* group;
+ int iIcon;
+ wchar_t* title;
+ wchar_t* defvalue;
+ wchar_t* value;
+ wchar_t* tmpValue;
+ VarFunc vf[6];
+
+ HICON getIcon() const;
+};
+
+enum
+{
+ TPL_TITLE,
+
+ TPL_MESSAGE,
+ TPL_MSG_HEAD,
+ TPL_MSG_GRP,
+ TPL_FILE,
+ TPL_SIGN,
+ TPL_PRESENCE,
+ TPL_OTHER,
+
+ TPL_AUTH,
+ TPL_ADDED,
+ TPL_DELETED,
+
+ TPL_COPY_MESSAGE,
+ TPL_COPY_FILE,
+ TPL_COPY_SIGN,
+ TPL_COPY_OTHER,
+
+ TPL_COPY_AUTH,
+ TPL_COPY_ADDED,
+ TPL_COPY_DELETED,
+ TPL_COPY_PRESENCE,
+
+ TPL_COUNT
+};
+
+extern TemplateInfo templates[TPL_COUNT];
+
+void LoadTemplates();
+void SaveTemplates();
+
#endif // __templates_h__
\ No newline at end of file |