summaryrefslogtreecommitdiff
path: root/plugins/SimpleStatusMsg/src/simplestatusmsg.h
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2012-07-24 06:41:19 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2012-07-24 06:41:19 +0000
commita33833212f040272fc6c97047c8cb335b6f5405a (patch)
treed778dfd7187571182d9a1333a72cc941b60f7e3d /plugins/SimpleStatusMsg/src/simplestatusmsg.h
parentec5a78dd895f86e9077caf1aacd3e49b48dffbcf (diff)
SimpleAR, SimpleStatusMsg, SmileyAdd, SpellChecker: changed folder structure
git-svn-id: http://svn.miranda-ng.org/main/trunk@1149 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SimpleStatusMsg/src/simplestatusmsg.h')
-rw-r--r--plugins/SimpleStatusMsg/src/simplestatusmsg.h105
1 files changed, 105 insertions, 0 deletions
diff --git a/plugins/SimpleStatusMsg/src/simplestatusmsg.h b/plugins/SimpleStatusMsg/src/simplestatusmsg.h
new file mode 100644
index 0000000000..d66aba197c
--- /dev/null
+++ b/plugins/SimpleStatusMsg/src/simplestatusmsg.h
@@ -0,0 +1,105 @@
+/*
+
+Simple Status Message plugin for Miranda IM
+Copyright (C) 2006-2011 Bartosz 'Dezeath' Białek, (C) 2005 Harven
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+#ifndef SIMPLESTATUSMSG_H__
+#define SIMPLESTATUSMSG_H__ 1
+
+typedef struct tagACCOUNTS
+{
+ PROTOACCOUNT **pa;
+ int count;
+ int statusCount;
+ DWORD statusFlags;
+ int statusMsgCount;
+ DWORD statusMsgFlags;
+}
+PROTOACCOUNTS;
+
+extern PROTOACCOUNTS *accounts;
+
+#define DLG_SHOW_STATUS 1
+#define DLG_SHOW_STATUS_ICONS 2
+#define DLG_SHOW_LIST_ICONS 4
+#define DLG_SHOW_BUTTONS 8
+#define DLG_SHOW_BUTTONS_INLIST 16
+#define DLG_SHOW_BUTTONS_FLAT 32
+#define DLG_SHOW_STATUS_PROFILES 64
+//NOTE: MAX 128
+#define DLG_SHOW_DEFAULT DLG_SHOW_STATUS | DLG_SHOW_STATUS_ICONS | DLG_SHOW_LIST_ICONS | DLG_SHOW_BUTTONS
+
+#define STATUS_SHOW_DLG 1
+#define STATUS_EMPTY_MSG 2
+#define STATUS_DEFAULT_MSG 4
+#define STATUS_LAST_MSG 8
+#define STATUS_THIS_MSG 16
+#define STATUS_LAST_STATUS_MSG 32
+#define STATUS_DEFAULT STATUS_SHOW_DLG | STATUS_LAST_MSG
+
+#define PROTO_NO_MSG 1
+#define PROTO_THIS_MSG 2
+#define PROTO_POPUPDLG 4
+#define PROTO_NOCHANGE 8
+#define PROTO_DEFAULT PROTO_NOCHANGE
+
+struct MsgBoxInitData
+{
+ char *m_szProto;
+ int m_iStatus;
+ int m_iStatusModes;
+ int m_iStatusMsgModes;
+ BOOL m_bOnEvent;
+ BOOL m_bOnStartup;
+};
+
+extern HINSTANCE g_hInst;
+extern HWND hwndSAMsgDialog;
+
+#define MS_SIMPLESTATUSMSG_SHOWDIALOGINT "SimpleStatusMsg/ShowDialogInternal" // internal use ONLY
+
+/* awaymsg.cpp */
+int LoadAwayMsgModule(void);
+int AwayMsgPreShutdown(void);
+
+/* main.cpp */
+void SetStatusMessage(const char *szProto, int initial_status_mode, int status_mode, TCHAR *message, BOOL on_startup);
+
+/* msgbox.cpp */
+INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
+
+/* options.cpp */
+int InitOptions(WPARAM wParam, LPARAM lParam);
+
+/* utils.cpp */
+void IconsInit(void);
+HICON LoadIconEx(const char* name);
+HANDLE GetIconHandle(int iconId);
+void ReleaseIconEx(const char* name);
+HANDLE HookEventEx(const char *szEvent, MIRANDAHOOK hookProc);
+void UnhookEvents(void);
+HANDLE HookProtoEvent(const char *szModule, const char *szEvent, MIRANDAHOOKPARAM hookProc);
+void UnhookProtoEvents(void);
+HANDLE CreateServiceFunctionEx(const char *name, MIRANDASERVICE serviceProc);
+void DestroyServiceFunctionsEx(void);
+int GetRandom(int from, int to);
+const TCHAR *GetDefaultMessage(int status);
+const char *StatusModeToDbSetting(int status, const char *suffix);
+int GetCurrentStatus(const char *szProto);
+int GetStartupStatus(const char *szProto);
+
+#endif // SIMPLESTATUSMSG_H__