1 /* 2 * PROJECT: shell32 3 * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later) 4 * PURPOSE: IActiveDesktop header 5 * COPYRIGHT: Copyright 2018 Mark Jansen (mark.jansen@reactos.org) 6 */ 7 8 #ifndef _CACTIVEDESKTOP_H_ 9 #define _CACTIVEDESKTOP_H_ 10 11 #undef AddDesktopItem 12 13 class CActiveDesktop : 14 public CComCoClass<CActiveDesktop, &CLSID_ActiveDesktop>, 15 public CComObjectRootEx<CComMultiThreadModelNoCS>, 16 public IActiveDesktop, 17 //public IActiveDesktopP, 18 //public IADesktopP2, 19 public IPropertyBag 20 { 21 public: 22 CActiveDesktop(); 23 virtual ~CActiveDesktop(); 24 25 /*** IActiveDesktop methods ***/ 26 virtual HRESULT WINAPI ApplyChanges(DWORD dwFlags); 27 virtual HRESULT WINAPI GetWallpaper(PWSTR pwszWallpaper, UINT cchWallpaper, DWORD dwFlags); 28 virtual HRESULT WINAPI SetWallpaper(PCWSTR pwszWallpaper, DWORD dwReserved); 29 virtual HRESULT WINAPI GetWallpaperOptions(LPWALLPAPEROPT pwpo, DWORD dwReserved); 30 virtual HRESULT WINAPI SetWallpaperOptions(LPCWALLPAPEROPT pwpo, DWORD dwReserved); 31 virtual HRESULT WINAPI GetPattern(PWSTR pwszPattern, UINT cchPattern, DWORD dwReserved); 32 virtual HRESULT WINAPI SetPattern(PCWSTR pwszPattern, DWORD dwReserved); 33 virtual HRESULT WINAPI GetDesktopItemOptions(LPCOMPONENTSOPT pco, DWORD dwReserved); 34 virtual HRESULT WINAPI SetDesktopItemOptions(LPCCOMPONENTSOPT pco, DWORD dwReserved); 35 virtual HRESULT WINAPI AddDesktopItem(LPCCOMPONENT pcomp, DWORD dwReserved); 36 virtual HRESULT WINAPI AddDesktopItemWithUI(HWND hwnd, LPCOMPONENT pcomp, DWORD dwReserved); 37 virtual HRESULT WINAPI ModifyDesktopItem(LPCCOMPONENT pcomp, DWORD dwFlags); 38 virtual HRESULT WINAPI RemoveDesktopItem(LPCCOMPONENT pcomp, DWORD dwReserved); 39 virtual HRESULT WINAPI GetDesktopItemCount(int *pcItems, DWORD dwReserved); 40 virtual HRESULT WINAPI GetDesktopItem(int nComponent, LPCOMPONENT pcomp, DWORD dwReserved); 41 virtual HRESULT WINAPI GetDesktopItemByID(ULONG_PTR dwID, LPCOMPONENT pcomp, DWORD dwReserved); 42 virtual HRESULT WINAPI GenerateDesktopItemHtml(PCWSTR pwszFileName, LPCOMPONENT pcomp, DWORD dwReserved); 43 virtual HRESULT WINAPI AddUrl(HWND hwnd, PCWSTR pszSource, LPCOMPONENT pcomp, DWORD dwFlags); 44 virtual HRESULT WINAPI GetDesktopItemBySource(PCWSTR pwszSource, LPCOMPONENT pcomp, DWORD dwReserved); 45 46 /*** IPropertyBag methods ***/ 47 virtual HRESULT STDMETHODCALLTYPE Read(LPCOLESTR pszPropName, VARIANT *pVar, IErrorLog *pErrorLog); 48 virtual HRESULT STDMETHODCALLTYPE Write(LPCOLESTR pszPropName, VARIANT *pVar); 49 50 51 DECLARE_REGISTRY_RESOURCEID(IDR_ACTIVEDESKTOP) 52 DECLARE_NOT_AGGREGATABLE(CActiveDesktop) 53 54 DECLARE_PROTECT_FINAL_CONSTRUCT() 55 56 BEGIN_COM_MAP(CActiveDesktop) 57 COM_INTERFACE_ENTRY_IID(IID_IActiveDesktop, IActiveDesktop) 58 //COM_INTERFACE_ENTRY_IID(IID_IActiveDesktopP, IActiveDesktopP) 59 //COM_INTERFACE_ENTRY_IID(IID_IADesktopP2, IADesktopP2) 60 COM_INTERFACE_ENTRY_IID(IID_IPropertyBag, IPropertyBag) 61 END_COM_MAP() 62 }; 63 64 65 #endif // _CACTIVEDESKTOP_H_ 66