From b7f40fc32b483d9017d6e54bba21c7e75aa0ed2b Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 1 Aug 2015 20:40:08 +0000 Subject: wbOSD: common project git-svn-id: http://svn.miranda-ng.org/main/trunk@14798 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/wbOSD/src/events.cpp | 2 +- plugins/wbOSD/src/main.cpp | 2 +- plugins/wbOSD/src/options.cpp | 2 +- plugins/wbOSD/src/stdafx.cpp | 18 ------- plugins/wbOSD/src/stdafx.cxx | 18 +++++++ plugins/wbOSD/src/stdafx.h | 117 +++++++++++++++++++++++++++++++++++++++++ plugins/wbOSD/src/wbOSD.cpp | 2 +- plugins/wbOSD/src/wbOSD.h | 119 ------------------------------------------ 8 files changed, 139 insertions(+), 141 deletions(-) delete mode 100644 plugins/wbOSD/src/stdafx.cpp create mode 100644 plugins/wbOSD/src/stdafx.cxx create mode 100644 plugins/wbOSD/src/stdafx.h delete mode 100644 plugins/wbOSD/src/wbOSD.h (limited to 'plugins/wbOSD/src') diff --git a/plugins/wbOSD/src/events.cpp b/plugins/wbOSD/src/events.cpp index f296d74ac7..3861473a9e 100644 --- a/plugins/wbOSD/src/events.cpp +++ b/plugins/wbOSD/src/events.cpp @@ -7,7 +7,7 @@ This plugin tries to become miranda's standard OSD ;-) Distributed under GNU's GPL 2 or later */ -#include "wbOSD.h" +#include "stdafx.h" void logmsg2(char *str) { diff --git a/plugins/wbOSD/src/main.cpp b/plugins/wbOSD/src/main.cpp index 8c2658fbbf..daa1fa7e06 100644 --- a/plugins/wbOSD/src/main.cpp +++ b/plugins/wbOSD/src/main.cpp @@ -7,7 +7,7 @@ This plugin tries to become miranda's standard OSD ;-) Distributed under GNU's GPL 2 or later */ -#include "wbOSD.h" +#include "stdafx.h" HINSTANCE hI; diff --git a/plugins/wbOSD/src/options.cpp b/plugins/wbOSD/src/options.cpp index b007e46f2f..911f0da024 100644 --- a/plugins/wbOSD/src/options.cpp +++ b/plugins/wbOSD/src/options.cpp @@ -7,7 +7,7 @@ This plugin tries to become miranda's standard OSD ;-) Distributed under GNU's GPL 2 or later */ -#include "wbOSD.h" +#include "stdafx.h" COLORREF pencustcolors[16]; diff --git a/plugins/wbOSD/src/stdafx.cpp b/plugins/wbOSD/src/stdafx.cpp deleted file mode 100644 index e0e0b8f4f0..0000000000 --- a/plugins/wbOSD/src/stdafx.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* -Copyright (C) 2012-15 Miranda NG project (http://miranda-ng.org) - -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 version 2 -of the License. - -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, see . -*/ - -#include "wbOSD.h" \ No newline at end of file diff --git a/plugins/wbOSD/src/stdafx.cxx b/plugins/wbOSD/src/stdafx.cxx new file mode 100644 index 0000000000..6fb37564b7 --- /dev/null +++ b/plugins/wbOSD/src/stdafx.cxx @@ -0,0 +1,18 @@ +/* +Copyright (C) 2012-15 Miranda NG project (http://miranda-ng.org) + +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 version 2 +of the License. + +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, see . +*/ + +#include "stdafx.h" \ No newline at end of file diff --git a/plugins/wbOSD/src/stdafx.h b/plugins/wbOSD/src/stdafx.h new file mode 100644 index 0000000000..7d82633948 --- /dev/null +++ b/plugins/wbOSD/src/stdafx.h @@ -0,0 +1,117 @@ +/* +Wannabe OSD +This plugin tries to become miranda's standard OSD ;-) + +(C) 2005 Andrej Krutak + +Distributed under GNU's GPL 2 or later +*/ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "resource.h" +#include "version.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); + +void loadDBSettings(plgsettings *ps); + +extern HINSTANCE hI; +extern HWND hwnd; +extern HANDLE hservosda; +extern HANDLE hHookedNewEvent, hHookedInit, hProtoAck, hContactSettingChanged, hHookContactStatusChanged, hContactStatusChanged, hpluginShutDown; \ No newline at end of file diff --git a/plugins/wbOSD/src/wbOSD.cpp b/plugins/wbOSD/src/wbOSD.cpp index bb7eb97355..27b1f4db6b 100644 --- a/plugins/wbOSD/src/wbOSD.cpp +++ b/plugins/wbOSD/src/wbOSD.cpp @@ -7,7 +7,7 @@ This plugin tries to become miranda's standard OSD ;-) Distributed under GNU's GPL 2 or later */ -#include "wbOSD.h" +#include "stdafx.h" TCHAR szClassName[] = _T("wbOSD"); const static osdmsg defstr={_T(""), 0, RGB(0, 0, 0), 0, 0}; diff --git a/plugins/wbOSD/src/wbOSD.h b/plugins/wbOSD/src/wbOSD.h deleted file mode 100644 index 5804c73281..0000000000 --- a/plugins/wbOSD/src/wbOSD.h +++ /dev/null @@ -1,119 +0,0 @@ -/* -Wannabe OSD -This plugin tries to become miranda's standard OSD ;-) - -(C) 2005 Andrej Krutak - -Distributed under GNU's GPL 2 or later -*/ - -#define _CRT_SECURE_NO_WARNINGS - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "resource.h" -#include "version.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); - -void loadDBSettings(plgsettings *ps); - -extern HINSTANCE hI; -extern HWND hwnd; -extern HANDLE hservosda; -extern HANDLE hHookedNewEvent, hHookedInit, hProtoAck, hContactSettingChanged, hHookContactStatusChanged, hContactStatusChanged, hpluginShutDown; \ No newline at end of file -- cgit v1.2.3