From 2ba1945fc94ec5e708a31cfa9a3212ef35ba3dac Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Fri, 24 Jul 2015 07:50:57 +0000 Subject: linklist: common project git-svn-id: http://svn.miranda-ng.org/main/trunk@14664 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/HistoryLinkListPlus/src/linklist.cpp | 2 +- plugins/HistoryLinkListPlus/src/linklist.h | 158 ----------------------- plugins/HistoryLinkListPlus/src/linklist_dlg.cpp | 2 +- plugins/HistoryLinkListPlus/src/linklist_fct.cpp | 2 +- plugins/HistoryLinkListPlus/src/stdafx.cpp | 18 --- plugins/HistoryLinkListPlus/src/stdafx.cxx | 18 +++ plugins/HistoryLinkListPlus/src/stdafx.h | 157 ++++++++++++++++++++++ 7 files changed, 178 insertions(+), 179 deletions(-) delete mode 100644 plugins/HistoryLinkListPlus/src/linklist.h delete mode 100644 plugins/HistoryLinkListPlus/src/stdafx.cpp create mode 100644 plugins/HistoryLinkListPlus/src/stdafx.cxx create mode 100644 plugins/HistoryLinkListPlus/src/stdafx.h (limited to 'plugins/HistoryLinkListPlus/src') diff --git a/plugins/HistoryLinkListPlus/src/linklist.cpp b/plugins/HistoryLinkListPlus/src/linklist.cpp index c8d1a7a778..fa00543f4c 100644 --- a/plugins/HistoryLinkListPlus/src/linklist.cpp +++ b/plugins/HistoryLinkListPlus/src/linklist.cpp @@ -15,7 +15,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -#include "linklist.h" +#include "stdafx.h" // Global variables HINSTANCE hInst; diff --git a/plugins/HistoryLinkListPlus/src/linklist.h b/plugins/HistoryLinkListPlus/src/linklist.h deleted file mode 100644 index aa5d140cfe..0000000000 --- a/plugins/HistoryLinkListPlus/src/linklist.h +++ /dev/null @@ -1,158 +0,0 @@ -// History Linklist Plus -// Copyright (C) 2010 Thomas Wendel, gureedo -// -// 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. - -#pragma once - -#ifndef _LINKLIST_H -#define _LINKLIST_H - -#define _CRT_SECURE_NO_WARNINGS - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "language.h" -#include "linklist_dlg.h" -#include "resource.h" -#include "Version.h" - - -// Filter Flags -#define WLL_URL 0x01 -#define WLL_MAIL 0x02 -#define WLL_FILE 0x04 -#define WLL_IN 0x08 -#define WLL_OUT 0x10 -#define WLL_ALL (WLL_URL | WLL_MAIL | WLL_FILE | WLL_IN | WLL_OUT) -#define SLL_DEEP 0x20 - -// String length -#define LINK_MAX 1024 -#define DIR_SIZE 6 -#define TYPE_SIZE 5 -#define DATE_SIZE 11 -#define TIME_SIZE 15 - -// Link types -#define LINK_UNKNOWN 0x00 -#define LINK_URL 0x01 -#define LINK_MAIL 0x02 -#define LINK_FILE 0x03 - -// Directions -#define DIRECTION_IN 1 -#define DIRECTION_OUT 2 - - -#define FILTERTEXT 125 - -#define IN_COL_DEF 0x005050A0 -#define OUT_COL_DEF 0x00206020 -#define BG_COL_DEF 0x00EAFFFF -#define TXT_COL_DEF 0x00000000 - -struct LISTELEMENT { - BYTE direction; - BYTE type; - TCHAR date[DATE_SIZE]; - TCHAR time[TIME_SIZE]; - TCHAR link[LINK_MAX]; - MEVENT hEvent; - int linePos; - struct LISTELEMENT *nextElement; -} ; - -typedef struct { - BYTE openNewWindow; - BYTE updateWindow; - BYTE mouseEvent; - BYTE saveSpecial; - BYTE showDate; - BYTE showLine; - BYTE showTime; - BYTE showDirection; - BYTE showType; -} LISTOPTIONS; - -typedef struct { - DWORD incoming; - DWORD outgoing; - DWORD background; - DWORD text; -} MYCOLOURSET; - -#include "linklist_fct.h" - -#define LINKLIST_MODULE "HistoryLinklist" -#define LINKLIST_IN_COL "InColour" -#define LINKLIST_OUT_COL "OutColour" -#define LINKLIST_BG_COL "BGColour" -#define LINKLIST_TXT_COL "TxtColour" -#define LINKLIST_USE_DEF "UseMirandaDefault" -#define LINKLIST_OPEN_WINDOW "OpenNewWindow" -#define LINKLIST_UPDATE_WINDOW "UpdateWindow" -#define LINKLIST_MOUSE_EVENT "MessageView" -#define LINKLIST_LEFT "WindowLeft" -#define LINKLIST_RIGHT "WindowRight" -#define LINKLIST_BOTTOM "WindowBottom" -#define LINKLIST_TOP "WindowTop" -#define LINKLIST_SPLITPOS "SplitterPos" -#define LINKLIST_SAVESPECIAL "SavePosSpecial" -#define LINKLIST_FIRST "FirstStartup" -#define LINKLIST_SHOW_DATE "ShowDate" -#define LINKLIST_SHOW_LINE "ShowLine" -#define LINKLIST_SHOW_TIME "ShowTime" -#define LINKLIST_SHOW_DIRECTION "ShowMessageDirection" -#define LINKLIST_SHOW_TYPE "ShowMessageType" - - -#define _mstrlen(x) (_countof(x) - 1) -#define MAKE_TXT_COL(BGCol) ((DWORD)~BGCol & 0x00FFFFFF) - -#define DM_LINKSPLITTER WM_USER+99 - -typedef struct LISTELEMENT LISTELEMENT; - -// Dialogbox Parameter -typedef struct { - MCONTACT hContact; - LISTELEMENT *listStart; - UINT findMessage; - CHARRANGE chrg; - int splitterPosNew; - int splitterPosOld; - SIZE minSize; -} DIALOGPARAM; - - -static INT_PTR LinkList_Main(WPARAM, LPARAM); -int InitOptionsDlg(WPARAM, LPARAM); -int DBUpdate(WPARAM, LPARAM); -int ExtractURI(DBEVENTINFO*, MEVENT, LISTELEMENT*); -int RemoveList(LISTELEMENT*); -int ListCount(LISTELEMENT*); - -#endif //_LINKLIST_H \ No newline at end of file diff --git a/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp b/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp index 018c56cae3..f24461eb23 100644 --- a/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp +++ b/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp @@ -16,7 +16,7 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -#include "linklist.h" +#include "stdafx.h" extern HINSTANCE hInst; extern MWindowList hWindowList; diff --git a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp index 926bbc02ae..dcd2ddafd8 100644 --- a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp +++ b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp @@ -16,7 +16,7 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -#include "linklist.h" +#include "stdafx.h" extern HINSTANCE hInst; extern MWindowList hWindowList; diff --git a/plugins/HistoryLinkListPlus/src/stdafx.cpp b/plugins/HistoryLinkListPlus/src/stdafx.cpp deleted file mode 100644 index 92e805d018..0000000000 --- a/plugins/HistoryLinkListPlus/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 "linklist.h" \ No newline at end of file diff --git a/plugins/HistoryLinkListPlus/src/stdafx.cxx b/plugins/HistoryLinkListPlus/src/stdafx.cxx new file mode 100644 index 0000000000..6fb37564b7 --- /dev/null +++ b/plugins/HistoryLinkListPlus/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/HistoryLinkListPlus/src/stdafx.h b/plugins/HistoryLinkListPlus/src/stdafx.h new file mode 100644 index 0000000000..5bf2cc5e89 --- /dev/null +++ b/plugins/HistoryLinkListPlus/src/stdafx.h @@ -0,0 +1,157 @@ +// History Linklist Plus +// Copyright (C) 2010 Thomas Wendel, gureedo +// +// 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. + +#pragma once + +#ifndef _LINKLIST_H +#define _LINKLIST_H + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "language.h" +#include "linklist_dlg.h" +#include "resource.h" +#include "Version.h" + + +// Filter Flags +#define WLL_URL 0x01 +#define WLL_MAIL 0x02 +#define WLL_FILE 0x04 +#define WLL_IN 0x08 +#define WLL_OUT 0x10 +#define WLL_ALL (WLL_URL | WLL_MAIL | WLL_FILE | WLL_IN | WLL_OUT) +#define SLL_DEEP 0x20 + +// String length +#define LINK_MAX 1024 +#define DIR_SIZE 6 +#define TYPE_SIZE 5 +#define DATE_SIZE 11 +#define TIME_SIZE 15 + +// Link types +#define LINK_UNKNOWN 0x00 +#define LINK_URL 0x01 +#define LINK_MAIL 0x02 +#define LINK_FILE 0x03 + +// Directions +#define DIRECTION_IN 1 +#define DIRECTION_OUT 2 + + +#define FILTERTEXT 125 + +#define IN_COL_DEF 0x005050A0 +#define OUT_COL_DEF 0x00206020 +#define BG_COL_DEF 0x00EAFFFF +#define TXT_COL_DEF 0x00000000 + +struct LISTELEMENT { + BYTE direction; + BYTE type; + TCHAR date[DATE_SIZE]; + TCHAR time[TIME_SIZE]; + TCHAR link[LINK_MAX]; + MEVENT hEvent; + int linePos; + struct LISTELEMENT *nextElement; +} ; + +typedef struct { + BYTE openNewWindow; + BYTE updateWindow; + BYTE mouseEvent; + BYTE saveSpecial; + BYTE showDate; + BYTE showLine; + BYTE showTime; + BYTE showDirection; + BYTE showType; +} LISTOPTIONS; + +typedef struct { + DWORD incoming; + DWORD outgoing; + DWORD background; + DWORD text; +} MYCOLOURSET; + +#include "linklist_fct.h" + +#define LINKLIST_MODULE "HistoryLinklist" +#define LINKLIST_IN_COL "InColour" +#define LINKLIST_OUT_COL "OutColour" +#define LINKLIST_BG_COL "BGColour" +#define LINKLIST_TXT_COL "TxtColour" +#define LINKLIST_USE_DEF "UseMirandaDefault" +#define LINKLIST_OPEN_WINDOW "OpenNewWindow" +#define LINKLIST_UPDATE_WINDOW "UpdateWindow" +#define LINKLIST_MOUSE_EVENT "MessageView" +#define LINKLIST_LEFT "WindowLeft" +#define LINKLIST_RIGHT "WindowRight" +#define LINKLIST_BOTTOM "WindowBottom" +#define LINKLIST_TOP "WindowTop" +#define LINKLIST_SPLITPOS "SplitterPos" +#define LINKLIST_SAVESPECIAL "SavePosSpecial" +#define LINKLIST_FIRST "FirstStartup" +#define LINKLIST_SHOW_DATE "ShowDate" +#define LINKLIST_SHOW_LINE "ShowLine" +#define LINKLIST_SHOW_TIME "ShowTime" +#define LINKLIST_SHOW_DIRECTION "ShowMessageDirection" +#define LINKLIST_SHOW_TYPE "ShowMessageType" + + +#define _mstrlen(x) (_countof(x) - 1) +#define MAKE_TXT_COL(BGCol) ((DWORD)~BGCol & 0x00FFFFFF) + +#define DM_LINKSPLITTER WM_USER+99 + +typedef struct LISTELEMENT LISTELEMENT; + +// Dialogbox Parameter +typedef struct { + MCONTACT hContact; + LISTELEMENT *listStart; + UINT findMessage; + CHARRANGE chrg; + int splitterPosNew; + int splitterPosOld; + SIZE minSize; +} DIALOGPARAM; + + +static INT_PTR LinkList_Main(WPARAM, LPARAM); +int InitOptionsDlg(WPARAM, LPARAM); +int DBUpdate(WPARAM, LPARAM); +int ExtractURI(DBEVENTINFO*, MEVENT, LISTELEMENT*); +int RemoveList(LISTELEMENT*); +int ListCount(LISTELEMENT*); + +#endif //_LINKLIST_H \ No newline at end of file -- cgit v1.2.3