Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorUnderground78 <underground78@users.sourceforge.net>2012-04-09 13:36:53 +0400
committerUnderground78 <underground78@users.sourceforge.net>2012-04-09 13:36:53 +0400
commitbb1bd231cad99d467c756da10965d087795e4477 (patch)
tree41fae4456ec66961fdc9616b87fdb631e5bb969e /src
parentc8be36ab2109deb9bc643d554bd6aacc0f715f13 (diff)
[VSFilter] Cosmetic: move some code to the header file.
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@4306 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src')
-rw-r--r--src/filters/transform/VSFilter/Systray.cpp51
-rw-r--r--src/filters/transform/VSFilter/Systray.h50
2 files changed, 51 insertions, 50 deletions
diff --git a/src/filters/transform/VSFilter/Systray.cpp b/src/filters/transform/VSFilter/Systray.cpp
index d3f2f670a..445a273ea 100644
--- a/src/filters/transform/VSFilter/Systray.cpp
+++ b/src/filters/transform/VSFilter/Systray.cpp
@@ -2,7 +2,7 @@
* $Id$
*
* (C) 2003-2006 Gabest
- * (C) 2006-2011 see AUTHORS
+ * (C) 2006-2012 see AUTHORS
*
* 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
@@ -25,6 +25,7 @@
#include "resource.h"
#include "DirectVobSubFilter.h"
#include "../../../DSUtil/DSUtil.h"
+#include "Systray.h"
// hWnd == INVALID_HANDLE_VALUE - get name, hWnd != INVALID_HANDLE_VALUE - show ppage
static TCHAR* CallPPage(IFilterGraph* pGraph, int idx, HWND hWnd);
@@ -69,54 +70,6 @@ LRESULT CALLBACK HookProc(UINT code, WPARAM wParam, LPARAM lParam)
return CallNextHookEx(g_hHook, code, wParam, lParam);
}
-class CSystrayWindow : public CWnd
-{
- SystrayIconData* m_tbid;
-
- void StepSub(int dir) {
- int iSelected, nLangs;
- if (FAILED(m_tbid->dvs->get_LanguageCount(&nLangs))) {
- return;
- }
- if (FAILED(m_tbid->dvs->get_SelectedLanguage(&iSelected))) {
- return;
- }
- if (nLangs > 0) {
- m_tbid->dvs->put_SelectedLanguage((iSelected+dir+nLangs)%nLangs);
- }
- }
-
- void ShowSub(bool fShow) {
- m_tbid->dvs->put_HideSubtitles(!fShow);
- }
-
- void ToggleSub() {
- bool fShow;
- if (FAILED(m_tbid->dvs->get_HideSubtitles(&fShow))) {
- return;
- }
- m_tbid->dvs->put_HideSubtitles(!fShow);
- }
-
-public:
- CSystrayWindow(SystrayIconData* tbid) : m_tbid(tbid) {}
-
-protected:
- DECLARE_MESSAGE_MAP()
-
-public:
- afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
- afx_msg void OnClose();
- afx_msg void OnDestroy();
- afx_msg LRESULT OnDVSPrevSub(WPARAM, LPARAM);
- afx_msg LRESULT OnDVSNextSub(WPARAM, LPARAM);
- afx_msg LRESULT OnDVSHideSub(WPARAM, LPARAM);
- afx_msg LRESULT OnDVSShowSub(WPARAM, LPARAM);
- afx_msg LRESULT OnDVSShowHideSub(WPARAM, LPARAM);
- afx_msg LRESULT OnTaskBarRestart(WPARAM, LPARAM);
- afx_msg LRESULT OnNotifyIcon(WPARAM, LPARAM);
-};
-
BEGIN_MESSAGE_MAP(CSystrayWindow, CWnd)
ON_WM_CREATE()
ON_WM_CLOSE()
diff --git a/src/filters/transform/VSFilter/Systray.h b/src/filters/transform/VSFilter/Systray.h
index 02013e55b..d2931155d 100644
--- a/src/filters/transform/VSFilter/Systray.h
+++ b/src/filters/transform/VSFilter/Systray.h
@@ -2,7 +2,7 @@
* $Id$
*
* (C) 2003-2006 Gabest
- * (C) 2006-2010 see AUTHORS
+ * (C) 2006-2012 see AUTHORS
*
* 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
@@ -23,4 +23,52 @@
#pragma once
+class CSystrayWindow : public CWnd
+{
+ SystrayIconData* m_tbid;
+
+ void StepSub(int dir) {
+ int iSelected, nLangs;
+ if (FAILED(m_tbid->dvs->get_LanguageCount(&nLangs))) {
+ return;
+ }
+ if (FAILED(m_tbid->dvs->get_SelectedLanguage(&iSelected))) {
+ return;
+ }
+ if (nLangs > 0) {
+ m_tbid->dvs->put_SelectedLanguage((iSelected+dir+nLangs)%nLangs);
+ }
+ }
+
+ void ShowSub(bool fShow) {
+ m_tbid->dvs->put_HideSubtitles(!fShow);
+ }
+
+ void ToggleSub() {
+ bool fShow;
+ if (FAILED(m_tbid->dvs->get_HideSubtitles(&fShow))) {
+ return;
+ }
+ m_tbid->dvs->put_HideSubtitles(!fShow);
+ }
+
+public:
+ CSystrayWindow(SystrayIconData* tbid) : m_tbid(tbid) {}
+
+protected:
+ DECLARE_MESSAGE_MAP()
+
+public:
+ afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
+ afx_msg void OnClose();
+ afx_msg void OnDestroy();
+ afx_msg LRESULT OnDVSPrevSub(WPARAM, LPARAM);
+ afx_msg LRESULT OnDVSNextSub(WPARAM, LPARAM);
+ afx_msg LRESULT OnDVSHideSub(WPARAM, LPARAM);
+ afx_msg LRESULT OnDVSShowSub(WPARAM, LPARAM);
+ afx_msg LRESULT OnDVSShowHideSub(WPARAM, LPARAM);
+ afx_msg LRESULT OnTaskBarRestart(WPARAM, LPARAM);
+ afx_msg LRESULT OnNotifyIcon(WPARAM, LPARAM);
+};
+
extern DWORD CALLBACK SystrayThreadProc(void* pParam);