Author: ssawant
Date: Sun Jun 4 09:56:54 2017
New Revision: 74899
URL:
http://svn.reactos.org/svn/reactos?rev=74899&view=rev
Log:
[QCKLNCH]
-Added CQuickLaunchBand
-Exposed required Interfaces
-Stubbed the methods
Added:
branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CQuickLaunchBand.cpp (with
props)
branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CQuickLaunchBand.h (with
props)
Modified:
branches/GSoC_2017/shellext/reactos/dll/shellext/CMakeLists.txt
branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CMakeLists.txt
branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/precomp.h
branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/qcklnch.cpp
Modified: branches/GSoC_2017/shellext/reactos/dll/shellext/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/shellext/reactos/dll/…
==============================================================================
--- branches/GSoC_2017/shellext/reactos/dll/shellext/CMakeLists.txt [iso-8859-1]
(original)
+++ branches/GSoC_2017/shellext/reactos/dll/shellext/CMakeLists.txt [iso-8859-1] Sun Jun
4 09:56:54 2017
@@ -6,5 +6,6 @@
add_subdirectory(fontext)
add_subdirectory(netshell)
add_subdirectory(ntobjshex)
+add_subdirectory(qcklnch)
add_subdirectory(shellbtrfs)
add_subdirectory(stobject)
Modified: branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/shellext/reactos/dll/…
==============================================================================
--- branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CMakeLists.txt [iso-8859-1]
(original)
+++ branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CMakeLists.txt [iso-8859-1]
Sun Jun 4 09:56:54 2017
@@ -15,7 +15,8 @@
spec2def(qcklnch.dll qcklnch.spec)
add_library(qcklnch SHARED
- qcklnch.cpp
+ qcklnch.cpp
+ CQuickLaunchBand.cpp
${CMAKE_CURRENT_BINARY_DIR}/qcklnch.def)
set_module_type(qcklnch win32dll UNICODE)
Added: branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CQuickLaunchBand.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/shellext/reactos/dll/…
==============================================================================
--- branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CQuickLaunchBand.cpp (added)
+++
branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CQuickLaunchBand.cpp [iso-8859-1]
Sun Jun 4 09:56:54 2017
@@ -0,0 +1,269 @@
+/*
+ * PROJECT: ReactOS shell extensions
+ * LICENSE: GPL - See COPYING in the top level directory
+ * FILE: dll/shellext/qcklnch/CQuickLaunchBand.cpp
+ * PURPOSE: Quick Launch Toolbar (Taskbar Shell Extension)
+ * PROGRAMMERS: Shriraj Sawant a.k.a SR13 <sr.official(a)hotmail.com>
+ */
+
+#include "precomp.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(qcklnch);
+
+// {260CB95D-4544-44F6-A079-575BAA60B72F}
+static const GUID CLSID_QuickLaunchBand = { 0x260cb95d, 0x4544, 0x44f6, { 0xa0, 0x79,
0x57, 0x5b, 0xaa, 0x60, 0xb7, 0x2f } };
+
+//CQuickLaunchBand
+
+ CQuickLaunchBand::CQuickLaunchBand() :
+ m_hWnd(NULL),
+ m_BandID(0)
+ {
+
+ }
+
+ CQuickLaunchBand::~CQuickLaunchBand() { }
+
+/*****************************************************************************/
+//IObjectWithSite
+ HRESULT STDMETHODCALLTYPE CQuickLaunchBand::SetSite(IUnknown *pUnkSite)
+ {
+ /*HRESULT hRet;
+ HWND hwndSite;
+
+ TRACE("CQuickLaunchBand::SetSite(0x%p)\n", pUnkSite);
+
+ hRet = IUnknown_GetWindow(pUnkSite, &hwndSite);
+ if (FAILED(hRet))
+ {
+ TRACE("Querying site window failed: 0x%x\n", hRet);
+ return hRet;
+ }
+
+ TRACE("CreateTaskSwitchWnd(Parent: 0x%p)\n", hwndSite);
+
+ HWND hwndTaskSwitch = CreateTaskSwitchWnd(hwndSite, m_Tray);
+ if (!hwndTaskSwitch)
+ {
+ ERR("CreateTaskSwitchWnd failed");
+ return E_FAIL;
+ }
+
+ m_Site = pUnkSite;
+ m_hWnd = hwndTaskSwitch;*/
+
+ return S_OK;
+ }
+
+ HRESULT STDMETHODCALLTYPE CQuickLaunchBand::GetSite(
+ IN REFIID riid,
+ OUT VOID **ppvSite)
+ {
+ /*TRACE("CQuickLaunchBand::GetSite(0x%p,0x%p)\n", riid, ppvSite);
+
+ if (m_Site != NULL)
+ {
+ return m_Site->QueryInterface(riid, ppvSite);
+ }
+
+ *ppvSite = NULL;*/
+ return E_FAIL;
+ }
+
+/*****************************************************************************/
+//IDeskBand
+ HRESULT STDMETHODCALLTYPE CQuickLaunchBand::GetWindow(OUT HWND *phwnd)
+ {
+ /*if (!m_hWnd)
+ return E_FAIL;
+ if (!phwnd)
+ return E_INVALIDARG;
+ *phwnd = m_hWnd;*/
+ return S_OK;
+ }
+
+ HRESULT STDMETHODCALLTYPE CQuickLaunchBand::ContextSensitiveHelp(
+ IN BOOL fEnterMode)
+ {
+ /* FIXME: Implement */
+ return E_NOTIMPL;
+ }
+
+ HRESULT STDMETHODCALLTYPE CQuickLaunchBand::ShowDW(
+ IN BOOL bShow)
+ {
+ /* We don't do anything... */
+ return S_OK;
+ }
+
+ HRESULT STDMETHODCALLTYPE CQuickLaunchBand::CloseDW(
+ IN DWORD dwReserved)
+ {
+ /* We don't do anything... */
+ return S_OK;
+ }
+
+ HRESULT STDMETHODCALLTYPE CQuickLaunchBand::ResizeBorderDW(
+ LPCRECT prcBorder,
+ IUnknown *punkToolbarSite,
+ BOOL fReserved)
+ {
+ /* No need to implement this method */
+ return E_NOTIMPL;
+ }
+
+ HRESULT STDMETHODCALLTYPE CQuickLaunchBand::GetBandInfo(
+ IN DWORD dwBandID,
+ IN DWORD dwViewMode,
+ IN OUT DESKBANDINFO *pdbi)
+ {
+ //TRACE("CQuickLaunchBand::GetBandInfo(0x%x,0x%x,0x%p) hWnd=0x%p\n",
dwBandID, dwViewMode, pdbi, m_hWnd);
+
+ return E_FAIL;
+ }
+
+ /*****************************************************************************/
+ //IDeskBar
+ HRESULT STDMETHODCALLTYPE CQuickLaunchBand::SetClient(
+ IN IUnknown *punkClient)
+ {
+ /*TRACE("IDeskBar::SetClient(0x%p)\n", punkClient);*/
+ return E_NOTIMPL;
+ }
+
+ HRESULT STDMETHODCALLTYPE CQuickLaunchBand::GetClient(
+ OUT IUnknown **ppunkClient)
+ {
+ /*TRACE("IDeskBar::GetClient(0x%p)\n", ppunkClient);*/
+ return E_NOTIMPL;
+ }
+
+ HRESULT STDMETHODCALLTYPE CQuickLaunchBand::OnPosRectChangeDB(
+ IN RECT *prc)
+ {
+ /*TRACE("IDeskBar::OnPosRectChangeDB(0x%p=(%d,%d,%d,%d))\n", prc,
prc->left, prc->top, prc->right, prc->bottom);
+ if (prc->bottom - prc->top == 0)
+ return S_OK;*/
+
+ return S_FALSE;
+ }
+
+/*****************************************************************************/
+//IPersistStream
+ HRESULT STDMETHODCALLTYPE CQuickLaunchBand::GetClassID(
+ OUT CLSID *pClassID)
+ {
+ TRACE("CQuickLaunchBand::GetClassID(0x%p)\n", pClassID);
+ /* We're going to return the (internal!) CLSID of the task band interface */
+ //*pClassID = CLSID_ITaskBand;
+ return S_OK;
+ }
+
+ HRESULT STDMETHODCALLTYPE CQuickLaunchBand::IsDirty()
+ {
+ /* The object hasn't changed since the last save! */
+ return S_FALSE;
+ }
+
+ HRESULT STDMETHODCALLTYPE CQuickLaunchBand::Load(
+ IN IStream *pStm)
+ {
+ //TRACE("CQuickLaunchBand::Load called\n");
+ /* Nothing to do */
+ return S_OK;
+ }
+
+ HRESULT STDMETHODCALLTYPE CQuickLaunchBand::Save(
+ IN IStream *pStm,
+ IN BOOL fClearDirty)
+ {
+ /* Nothing to do */
+ return S_OK;
+ }
+
+ HRESULT STDMETHODCALLTYPE CQuickLaunchBand::GetSizeMax(
+ OUT ULARGE_INTEGER *pcbSize)
+ {
+ TRACE("CQuickLaunchBand::GetSizeMax called\n");
+ /* We don't need any space for the task band */
+ //pcbSize->QuadPart = 0;
+ return S_OK;
+ }
+
+
+/*****************************************************************************/
+//IWinEventHandler
+ HRESULT STDMETHODCALLTYPE CQuickLaunchBand::ProcessMessage(
+ IN HWND hWnd,
+ IN UINT uMsg,
+ IN WPARAM wParam,
+ IN LPARAM lParam,
+ OUT LRESULT *plrResult)
+ {
+ //TRACE("CQuickLaunchBand: IWinEventHandler::ProcessMessage(0x%p, 0x%x,
0x%p, 0x%p, 0x%p)\n", hWnd, uMsg, wParam, lParam, plrResult);
+ return E_NOTIMPL;
+ }
+
+ HRESULT STDMETHODCALLTYPE CQuickLaunchBand::ContainsWindow(
+ IN HWND hWnd)
+ {
+ /*if (hWnd == m_hWnd ||
+ IsChild(m_hWnd, hWnd))
+ {
+ TRACE("CQuickLaunchBand::ContainsWindow(0x%p) returns S_OK\n",
hWnd);
+ return S_OK;
+ }*/
+
+ return S_FALSE;
+ }
+
+ HRESULT STDMETHODCALLTYPE CQuickLaunchBand::OnWinEvent(HWND hWnd, UINT uMsg, WPARAM
wParam, LPARAM lParam, LRESULT *theResult)
+ {
+ UNIMPLEMENTED;
+ return E_NOTIMPL;
+ }
+
+ HRESULT STDMETHODCALLTYPE CQuickLaunchBand::IsWindowOwner(HWND hWnd)
+ {
+ return (hWnd == m_hWnd) ? S_OK : S_FALSE;
+ }
+
+/*****************************************************************************/
+// *** IOleCommandTarget methods ***
+ HRESULT STDMETHODCALLTYPE CQuickLaunchBand::QueryStatus(const GUID *pguidCmdGroup,
ULONG cCmds, OLECMD prgCmds [], OLECMDTEXT *pCmdText)
+ {
+ UNIMPLEMENTED;
+ return E_NOTIMPL;
+ }
+
+ HRESULT STDMETHODCALLTYPE CQuickLaunchBand::Exec(const GUID *pguidCmdGroup, DWORD
nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
+ {
+ /*if (IsEqualIID(*pguidCmdGroup, IID_IBandSite))
+ {
+ return S_OK;
+ }
+
+ if (IsEqualIID(*pguidCmdGroup, IID_IDeskBand))
+ {
+ return S_OK;
+ }*/
+
+ UNIMPLEMENTED;
+ return E_NOTIMPL;
+ }
+
+
+
+
+
+
+/*****************************************************************************/
+
+ /* HRESULT STDMETHODCALLTYPE Initialize(IN OUT ITrayWindow *tray, HWND
hWndStartButton)
+ {
+ m_Tray = tray;
+ m_BandID = (DWORD) -1;
+ m_hWndStartButton = hWndStartButton;
+ return S_OK;
+ }
+*/
Propchange: branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CQuickLaunchBand.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CQuickLaunchBand.h
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/shellext/reactos/dll/…
==============================================================================
--- branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CQuickLaunchBand.h (added)
+++
branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CQuickLaunchBand.h [iso-8859-1]
Sun Jun 4 09:56:54 2017
@@ -0,0 +1,163 @@
+/*
+ * PROJECT: ReactOS shell extensions
+ * LICENSE: GPL - See COPYING in the top level directory
+ * FILE: dll/shellext/qcklnch/CQuickLaunchBand.h
+ * PURPOSE: Quick Launch Toolbar (Taskbar Shell Extension)
+ * PROGRAMMERS: Shriraj Sawant a.k.a SR13 <sr.official(a)hotmail.com>
+ */
+#pragma once
+
+extern const GUID CLSID_QuickLaunchBand;
+
+class CQuickLaunchBand :
+ public CComCoClass<CQuickLaunchBand, &CLSID_QuickLaunchBand>,
+ public CComObjectRootEx<CComMultiThreadModelNoCS>,
+ public IObjectWithSite,
+ public IDeskBand,
+ public IDeskBar,
+ public IPersistStream,
+ public IWinEventHandler,
+ public IOleCommandTarget
+{
+ HWND m_hWnd;
+ DWORD m_BandID;
+
+public:
+
+ CQuickLaunchBand();
+ virtual ~CQuickLaunchBand();
+
+//IObjectWithSite
+
+ virtual HRESULT STDMETHODCALLTYPE GetSite(
+ /*[in]*/ REFIID riid,
+ /*[out]*/ void **ppvSite
+ );
+
+ virtual HRESULT STDMETHODCALLTYPE SetSite(
+ /*[in]*/ IUnknown *pUnkSite
+ );
+
+//IDeskBand
+
+ virtual HRESULT STDMETHODCALLTYPE GetWindow(
+ OUT HWND *phwnd
+ );
+
+ virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(
+ IN BOOL fEnterMode
+ );
+
+ virtual HRESULT STDMETHODCALLTYPE ShowDW(
+ IN BOOL bShow
+ );
+
+ virtual HRESULT STDMETHODCALLTYPE CloseDW(
+ IN DWORD dwReserved
+ );
+
+ virtual HRESULT STDMETHODCALLTYPE ResizeBorderDW(
+ LPCRECT prcBorder,
+ IUnknown *punkToolbarSite,
+ BOOL fReserved
+ );
+
+ virtual HRESULT STDMETHODCALLTYPE GetBandInfo(
+ IN DWORD dwBandID,
+ IN DWORD dwViewMode,
+ IN OUT DESKBANDINFO *pdbi
+ );
+
+//IDeskBar
+
+ virtual HRESULT STDMETHODCALLTYPE GetClient(
+ /*[out]*/ IUnknown **ppunkClient
+ );
+
+ virtual HRESULT STDMETHODCALLTYPE OnPosRectChangeDB(
+ /*[in]*/ LPRECT prc
+ );
+
+ virtual HRESULT STDMETHODCALLTYPE SetClient(
+ /*[in, optional]*/ IUnknown *punkClient
+ );
+
+//IPersistStream
+
+ virtual HRESULT STDMETHODCALLTYPE GetClassID(
+ /*[out]*/ OUT CLSID *pClassID
+ );
+
+ virtual HRESULT STDMETHODCALLTYPE GetSizeMax(
+ /*[out]*/ ULARGE_INTEGER *pcbSize
+ );
+
+ virtual HRESULT STDMETHODCALLTYPE IsDirty();
+
+ virtual HRESULT STDMETHODCALLTYPE Load(
+ /*[in]*/ IStream *pStm
+ );
+
+ virtual HRESULT STDMETHODCALLTYPE Save(
+ /*[in]*/ IStream *pStm,
+ /*[in]*/ BOOL fClearDirty
+ );
+
+//IWinEventHandler
+
+ virtual HRESULT STDMETHODCALLTYPE ProcessMessage(
+ IN HWND hWnd,
+ IN UINT uMsg,
+ IN WPARAM wParam,
+ IN LPARAM lParam,
+ OUT LRESULT *plrResult
+ );
+
+ virtual HRESULT STDMETHODCALLTYPE ContainsWindow(
+ IN HWND hWnd
+ );
+
+ virtual HRESULT STDMETHODCALLTYPE OnWinEvent(
+ HWND hWnd,
+ UINT uMsg,
+ WPARAM wParam,
+ LPARAM lParam,
+ LRESULT *theResult
+ );
+
+ virtual HRESULT STDMETHODCALLTYPE IsWindowOwner(
+ HWND hWnd
+ );
+
+//IOleCommandTarget
+
+ virtual HRESULT STDMETHODCALLTYPE Exec(
+ /*[in]*/ const GUID *pguidCmdGroup,
+ /*[in]*/ DWORD nCmdID,
+ /*[in]*/ DWORD nCmdexecopt,
+ /*[in]*/ VARIANT *pvaIn,
+ /*[in, out]*/ VARIANT *pvaOut
+ );
+
+ virtual HRESULT STDMETHODCALLTYPE QueryStatus(
+ /*[in]*/ const GUID *pguidCmdGroup,
+ /*[in]*/ ULONG cCmds,
+ /*[in, out]*/ OLECMD prgCmds[],
+ /*[in, out]*/ OLECMDTEXT *pCmdText
+ );
+
+//*****************************************************************************************************
+
+ DECLARE_NOT_AGGREGATABLE(CQuickLaunchBand)
+ DECLARE_PROTECT_FINAL_CONSTRUCT()
+
+ BEGIN_COM_MAP(CQuickLaunchBand)
+ COM_INTERFACE_ENTRY2_IID(IID_IOleWindow, IOleWindow, IDeskBand)
+ COM_INTERFACE_ENTRY_IID(IID_IDeskBand, IDeskBand)
+ COM_INTERFACE_ENTRY_IID(IID_IObjectWithSite, IObjectWithSite)
+ COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist)
+ COM_INTERFACE_ENTRY_IID(IID_IPersistStream, IPersistStream)
+ COM_INTERFACE_ENTRY_IID(IID_IWinEventHandler, IWinEventHandler)
+ COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget)
+ END_COM_MAP()
+};
Propchange: branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/CQuickLaunchBand.h
------------------------------------------------------------------------------
svn:eol-style = native
Modified: branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/precomp.h
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/shellext/reactos/dll/…
==============================================================================
--- branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/precomp.h [iso-8859-1]
(original)
+++ branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/precomp.h [iso-8859-1] Sun
Jun 4 09:56:54 2017
@@ -38,6 +38,8 @@
#undef DbgPrint
+#include "CQuickLaunchBand.h"
+
/*extern HINSTANCE g_hInstance;
#define ID_ICON_VOLUME (WM_APP + 0x4CB)
Modified: branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/qcklnch.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/shellext/reactos/dll/…
==============================================================================
--- branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/qcklnch.cpp [iso-8859-1]
(original)
+++ branches/GSoC_2017/shellext/reactos/dll/shellext/qcklnch/qcklnch.cpp [iso-8859-1] Sun
Jun 4 09:56:54 2017
@@ -10,10 +10,10 @@
#include <atlwin.h>
-WINE_DEFAULT_DEBUG_CHANNEL(ntobjshex);
+WINE_DEFAULT_DEBUG_CHANNEL(qcklnch);
BEGIN_OBJECT_MAP(ObjectMap)
- //OBJECT_ENTRY(CLSID_RegistryFolder, CRegistryFolder)
+ //OBJECT_ENTRY(CLSID_QuickLaunchBand, CQuickLaunchBand)
END_OBJECT_MAP()
HINSTANCE g_hInstance;