summaryrefslogtreecommitdiff
path: root/plugins/wbOSD/src/wbOSD.h
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2013-05-16 18:19:56 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2013-05-16 18:19:56 +0000
commit4653a5d7af56bf2697e2a9a87ddbc3f86a7fb541 (patch)
tree14c6c4d9b672bf75af43811ebb3e104495ce88b5 /plugins/wbOSD/src/wbOSD.h
parentcf5350edbc17a09a8c5fb028ce7543bc5b8f4f33 (diff)
- wbOSD: added to solutions
git-svn-id: http://svn.miranda-ng.org/main/trunk@4684 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/wbOSD/src/wbOSD.h')
-rw-r--r--plugins/wbOSD/src/wbOSD.h128
1 files changed, 128 insertions, 0 deletions
diff --git a/plugins/wbOSD/src/wbOSD.h b/plugins/wbOSD/src/wbOSD.h
new file mode 100644
index 0000000000..9233959a5f
--- /dev/null
+++ b/plugins/wbOSD/src/wbOSD.h
@@ -0,0 +1,128 @@
+/*
+Wannabe OSD
+This plugin tries to become miranda's standard OSD ;-)
+
+(C) 2005 Andrej Krutak
+
+Distributed under GNU's GPL 2 or later
+*/
+
+#define _WIN32_WINNT 0x0500
+#define _CRT_SECURE_NO_WARNINGS
+
+#include <tchar.h>
+#include <windows.h>
+#include <shlwapi.h>
+#include <commctrl.h>
+#include <stdio.h>
+
+#include "resource.h"
+#include <newpluginapi.h>
+#include <m_langpack.h>
+#include <m_database.h>
+#include <m_options.h>
+#include <m_clc.h>
+#include <m_system.h>
+#include <m_clist.h>
+#include <m_protocols.h>
+#include <m_protosvc.h>
+#include <m_utils.h>
+#include <m_contacts.h>
+#include <m_ignore.h>
+#include <win2k.h>
+
+#define THIS_MODULE "mirandaosd"
+
+//SETTINGS DEFAULTS
+#define DEFAULT_FNT_HEIGHT -30
+#define DEFAULT_FNT_WIDTH 0
+#define DEFAULT_FNT_ESCAPEMENT 0
+#define DEFAULT_FNT_ORIENTATION 0
+#define DEFAULT_FNT_WEIGHT 700
+#define DEFAULT_FNT_ITALIC 0
+#define DEFAULT_FNT_UNDERLINE 0
+#define DEFAULT_FNT_STRIKEOUT 0
+#define DEFAULT_FNT_CHARSET 0
+#define DEFAULT_FNT_OUTPRECISION 3
+#define DEFAULT_FNT_CLIPRECISION 2
+#define DEFAULT_FNT_QUALITY 1
+#define DEFAULT_FNT_PITCHANDFAM 49
+#define DEFAULT_FNT_FACENAME _T("Arial")
+
+#define DEFAULT_CLRMSG RGB(255, 100, 0) //fore
+#define DEFAULT_CLRSTATUS RGB(40, 160, 255) //fore
+#define DEFAULT_CLRSHADOW RGB(0, 0, 0) //bk
+#define DEFAULT_BKCLR RGB(255, 255, 255)
+#define DEFAULT_ALIGN 1
+#define DEFAULT_SALIGN 1
+#define DEFAULT_DISTANCE 2
+#define DEFAULT_ALTSHADOW 0
+#define DEFAULT_TRANPARENT 1
+#define DEFAULT_WINX 500
+#define DEFAULT_WINY 100
+#define DEFAULT_WINXPOS 10
+#define DEFAULT_WINYPOS 10
+#define DEFAULT_ALPHA 175
+#define DEFAULT_TIMEOUT 3000
+#define DEFAULT_SHOWSHADOW 1
+#define DEFAULT_ANNOUNCEMESSAGES 1
+#define DEFAULT_ANNOUNCESTATUS 1
+#define DEFAULT_ANNOUNCE 0x00000002 //status mask
+#define DEFAULT_SHOWMYSTATUS 1
+#define DEFAULT_MESSAGEFORMAT _T("Message from %n: %m")
+#define DEFAULT_SHOWMSGWIN 1
+#define DEFAULT_SHOWWHEN 0x00000002
+
+//HOOKS
+#define ME_STATUSCHANGE_CONTACTSTATUSCHANGED "Miranda/StatusChange/ContactStatusChanged"
+
+int ContactStatusChanged(WPARAM wParam, LPARAM lParam);
+int ProtoAck(WPARAM wparam,LPARAM lparam);
+int ContactSettingChanged(WPARAM wparam,LPARAM lparam);
+int HookedNewEvent(WPARAM wParam, LPARAM lParam);
+
+//ANNOUNCING MESSAGES FROM OUTSIDE ;-)
+INT_PTR OSDAnnounce(WPARAM wParam, LPARAM lParam);
+
+
+
+#define ID_STATUS_MIN ID_STATUS_OFFLINE
+#define ID_STATUS_MAX ID_STATUS_OUTTOLUNCH
+
+typedef struct _plgsettings {
+ int align, salign, altShadow, showShadow, a_user, distance, onlyfromlist, showmystatus;
+ int showMsgWindow;
+ int messages; //also other events...
+ TCHAR msgformat[256];
+ int winx, winy, winxpos, winypos, alpha, transparent, timeout;
+ COLORREF clr_msg, clr_status, clr_shadow, bkclr;
+ DWORD announce, showWhen;
+ LOGFONT lf;
+} plgsettings;
+
+typedef struct _osdmsg {
+ TCHAR *text;
+ int timeout; //ms
+ COLORREF color;
+ void (*callback)(unsigned int param);
+ int param;
+} osdmsg;
+
+//#define logmsg(x) logmsg2(x)
+
+#ifndef logmsg
+#define logmsg(x) //x
+#endif
+
+int OptionsInit(WPARAM wparam,LPARAM lparam);
+
+extern BOOL (WINAPI*pSetLayeredWindowAttributes)(HWND, COLORREF, BYTE, DWORD);
+
+void loadDBSettings(plgsettings *ps);
+
+extern HINSTANCE hI;
+extern HWND hwnd;
+extern HANDLE hservosda;
+extern HANDLE hHookedNewEvent, hHookedInit, hProtoAck, hContactSettingChanged, hHookContactStatusChanged, hContactStatusChanged, hpluginShutDown;
+extern HINSTANCE hUser32;
+