[PSDK] Add a minimal IActiveDesktop definition
authorMark Jansen <mark.jansen@reactos.org>
Sun, 9 Dec 2018 14:58:00 +0000 (15:58 +0100)
committerMark Jansen <mark.jansen@reactos.org>
Wed, 12 Dec 2018 18:28:58 +0000 (19:28 +0100)
CORE-15424

modules/rostests/apitests/com/com_apitest.h
sdk/include/psdk/shlguid.h
sdk/include/psdk/shlobj.h

index 28d774c..3014221 100644 (file)
@@ -70,7 +70,6 @@ TestClasses(
 #define FARAWY (-65535)
 
 // TODO: fix our headers... we really shouldn't need these here
-DEFINE_GUID(CLSID_ActiveDesktop,           0x75048700, 0xef1f, 0x11d0, 0x98, 0x88, 0x00, 0x60, 0x97, 0xde, 0xac, 0xf9);
 DEFINE_GUID(CLSID_AugmentedShellFolder,    0x91ea3f8b, 0xc99b, 0x11d0, 0x98, 0x15, 0x00, 0xc0, 0x4f, 0xd9, 0x19, 0x72);
 DEFINE_GUID(CLSID_AugmentedShellFolder2,   0x6413ba2c, 0xb461, 0x11d1, 0xa1, 0x8a, 0x08, 0x00, 0x36, 0xb1, 0x1a, 0x03);
 DEFINE_GUID(CLSID_BrowserBand,             0x7ba4c742, 0x9e81, 0x11cf, 0x99, 0xd3, 0x00, 0xaa, 0x00, 0x4a, 0xe8, 0x37);
@@ -104,14 +103,11 @@ DEFINE_GUID(CLSID_UserAssist,              0xdd313e04, 0xfeff, 0x11d1, 0x8e, 0xc
 DEFINE_GUID(CLSID_WebSearchExt,            0x07798131, 0xaf23, 0x11d1, 0x91, 0x11, 0x00, 0xa0, 0xc9, 0x8b, 0xa6, 0x7d);
 DEFINE_GUID(CLSID_AttachmentServices,      0x4125dd96, 0xe03a, 0x4103, 0x8f, 0x70, 0xe0, 0x59, 0x7d, 0x80, 0x3b, 0x9c);
 
-DEFINE_GUID(IID_IADesktopP2,               0xb22754e2, 0x4574, 0x11d1, 0x98, 0x88, 0x00, 0x60, 0x97, 0xde, 0xac, 0xf9);
 DEFINE_GUID(IID_IAccessControl,            0xeedd23e0, 0x8410, 0x11ce, 0xa1, 0xc3, 0x08, 0x00, 0x2b, 0x2b, 0x8d, 0x8f);
 DEFINE_GUID(IID_IAccessor,                 0x0c733a8c, 0x2a1c, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
 DEFINE_GUID(IID_IACLCustomMRU,             0xf729fc5e, 0x8769, 0x4f3e, 0xbd, 0xb2, 0xd7, 0xb5, 0x0f, 0xd2, 0x27, 0x5b);
 DEFINE_GUID(IID_IActionProgress,           0x49ff1173, 0xeadc, 0x446d, 0x92, 0x85, 0x15, 0x64, 0x53, 0xa6, 0x43, 0x1c);
 DEFINE_GUID(IID_IActionProgressDialog,     0x49ff1172, 0xeadc, 0x446d, 0x92, 0x85, 0x15, 0x64, 0x53, 0xa6, 0x43, 0x1c);
-DEFINE_GUID(IID_IActiveDesktop,            0xf490eb00, 0x1240, 0x11d1, 0x98, 0x88, 0x00, 0x60, 0x97, 0xde, 0xac, 0xf9);
-DEFINE_GUID(IID_IActiveDesktopP,           0x52502ee0, 0xec80, 0x11d0, 0x89, 0xab, 0x00, 0xc0, 0x4f, 0xc2, 0x97, 0x2d);
 DEFINE_GUID(IID_IAddressBarParser,         0xc9d81948, 0x443a, 0x40c7, 0x94, 0x5c, 0x5e, 0x17, 0x1b, 0x8c, 0x66, 0xb4);
 DEFINE_GUID(IID_IAttachmentExecute,        0x73db1241, 0x1e85, 0x4581, 0x8e, 0x4f, 0xa8, 0x1e, 0x1d, 0x0f, 0x8c, 0x57);
 DEFINE_GUID(IID_IAugmentedShellFolder,     0x91ea3f8c, 0xc99b, 0x11d0, 0x98, 0x15, 0x00, 0xc0, 0x4f, 0xd9, 0x19, 0x72);
index c790a8d..25937b0 100644 (file)
@@ -110,6 +110,14 @@ DEFINE_GUID(CLSID_ACLCustomMRU,   0x6935db93, 0x21e8, 0x4ccc, 0xbe, 0xb9, 0x9f,
 
 #endif /* NO_SHDOCVW_GUIDS */
 
+
+DEFINE_GUID(CLSID_ActiveDesktop, 0x75048700, 0xef1f, 0x11d0, 0x98, 0x88, 0x00, 0x60, 0x97, 0xde, 0xac, 0xf9);
+DEFINE_GUID(IID_IActiveDesktop,  0xf490eb00, 0x1240, 0x11d1, 0x98, 0x88, 0x00, 0x60, 0x97, 0xde, 0xac, 0xf9);
+DEFINE_GUID(IID_IActiveDesktopP, 0x52502ee0, 0xec80, 0x11d0, 0x89, 0xab, 0x00, 0xc0, 0x4f, 0xc2, 0x97, 0x2d);
+DEFINE_GUID(IID_IADesktopP2,     0xb22754e2, 0x4574, 0x11d1, 0x98, 0x88, 0x0, 0x60, 0x97, 0xde, 0xac, 0xf9);
+
+
+
 DEFINE_GUID(SID_STopWindow,       0x49e1b500, 0x4636, 0x11d3, 0x97, 0xf7, 0x00, 0xc0, 0x4f, 0x45, 0xd0, 0xb3);
 DEFINE_GUID(SID_SCommDlgBrowser,  0x80f30233, 0xb7df, 0x11d2, 0xa3, 0x3b, 0x00, 0x60, 0x97, 0xdf, 0x5b, 0xd4);
 
index 8a916cf..2a48e40 100644 (file)
@@ -959,6 +959,118 @@ DECLARE_INTERFACE_(IDeskBarClient,IOleWindow)
 #define DBC_SHOWOBSCURE 2
 
 
+/* As indicated by the documentation for IActiveDesktop,
+   you must include wininet.h before shlobj.h */
+#ifdef _WINE_WININET_H_
+
+
+/* Structs are taken from msdn, and not verified!
+   Only stuff needed to make it compile are here, no flags or anything */
+
+typedef struct _tagWALLPAPEROPT
+{
+    DWORD dwSize;
+    DWORD dwStyle;
+} WALLPAPEROPT;
+
+typedef WALLPAPEROPT *LPWALLPAPEROPT;
+typedef const WALLPAPEROPT *LPCWALLPAPEROPT;
+
+typedef struct _tagCOMPONENTSOPT
+{
+    DWORD dwSize;
+    BOOL  fEnableComponents;
+    BOOL  fActiveDesktop;
+} COMPONENTSOPT;
+
+typedef COMPONENTSOPT *LPCOMPONENTSOPT;
+typedef const COMPONENTSOPT *LPCCOMPONENTSOPT;
+
+
+typedef struct _tagCOMPPOS
+{
+    DWORD dwSize;
+    int   iLeft;
+    int   iTop;
+    DWORD dwWidth;
+    DWORD dwHeight;
+    int   izIndex;
+    BOOL  fCanResize;
+    BOOL  fCanResizeX;
+    BOOL  fCanResizeY;
+    int   iPreferredLeftPercent;
+    int   iPreferredTopPercent;
+} COMPPOS;
+
+typedef struct _tagCOMPSTATEINFO
+{
+    DWORD dwSize;
+    int   iLeft;
+    int   iTop;
+    DWORD dwWidth;
+    DWORD dwHeight;
+    DWORD dwItemState;
+} COMPSTATEINFO;
+
+typedef struct _tagCOMPONENT
+{
+    DWORD         dwSize;
+    DWORD         dwID;
+    int           iComponentType;
+    BOOL          fChecked;
+    BOOL          fDirty;
+    BOOL          fNoScroll;
+    COMPPOS       cpPos;
+    WCHAR         wszFriendlyName[MAX_PATH];
+    WCHAR         wszSource[INTERNET_MAX_URL_LENGTH];
+    WCHAR         wszSubscribedURL[INTERNET_MAX_URL_LENGTH];
+    DWORD         dwCurItemState;
+    COMPSTATEINFO csiOriginal;
+    COMPSTATEINFO csiRestored;
+} COMPONENT;
+
+typedef COMPONENT *LPCOMPONENT;
+typedef const COMPONENT *LPCCOMPONENT;
+
+#pragma push_macro("AddDesktopItem")
+#undef AddDesktopItem
+
+/* IDeskBarClient interface */
+#define INTERFACE IActiveDesktop
+DECLARE_INTERFACE_(IActiveDesktop, IUnknown)
+{
+    /*** IUnknown methods ***/
+    STDMETHOD(QueryInterface) (THIS_ _In_ REFIID riid, _Outptr_ void **ppv) PURE;
+    STDMETHOD_(ULONG,AddRef)  (THIS) PURE;
+    STDMETHOD_(ULONG,Release) (THIS) PURE;
+
+    /*** IActiveDesktop methods ***/
+    STDMETHOD(ApplyChanges)(THIS_ DWORD dwFlags) PURE;
+    STDMETHOD(GetWallpaper)(THIS_ PWSTR pwszWallpaper, UINT cchWallpaper, DWORD dwFlags) PURE;
+    STDMETHOD(SetWallpaper)(THIS_ PCWSTR pwszWallpaper, DWORD dwReserved) PURE;
+    STDMETHOD(GetWallpaperOptions)(THIS_ LPWALLPAPEROPT pwpo, DWORD dwReserved) PURE;
+    STDMETHOD(SetWallpaperOptions)(THIS_ LPCWALLPAPEROPT pwpo, DWORD dwReserved) PURE;
+    STDMETHOD(GetPattern)(THIS_ PWSTR pwszPattern, UINT cchPattern, DWORD dwReserved) PURE;
+    STDMETHOD(SetPattern)(THIS_ PCWSTR pwszPattern, DWORD dwReserved) PURE;
+    STDMETHOD(GetDesktopItemOptions)(THIS_ LPCOMPONENTSOPT pco, DWORD dwReserved) PURE;
+    STDMETHOD(SetDesktopItemOptions)(THIS_ LPCCOMPONENTSOPT pco, DWORD dwReserved) PURE;
+    STDMETHOD(AddDesktopItem)(THIS_ LPCCOMPONENT pcomp, DWORD dwReserved) PURE;
+    STDMETHOD(AddDesktopItemWithUI)(THIS_ HWND hwnd, LPCOMPONENT pcomp, DWORD dwReserved) PURE;
+    STDMETHOD(ModifyDesktopItem)(THIS_ LPCCOMPONENT pcomp, DWORD dwFlags) PURE;
+    STDMETHOD(RemoveDesktopItem)(THIS_ LPCCOMPONENT pcomp, DWORD dwReserved) PURE;
+    STDMETHOD(GetDesktopItemCount)(THIS_ int *pcItems, DWORD dwReserved) PURE;
+    STDMETHOD(GetDesktopItem)(THIS_ int nComponent, LPCOMPONENT pcomp, DWORD dwReserved) PURE;
+    STDMETHOD(GetDesktopItemByID)(THIS_ ULONG_PTR dwID, LPCOMPONENT pcomp, DWORD dwReserved) PURE;
+    STDMETHOD(GenerateDesktopItemHtml)(THIS_ PCWSTR pwszFileName, LPCOMPONENT pcomp, DWORD dwReserved) PURE;
+    STDMETHOD(AddUrl)(THIS_ HWND hwnd, PCWSTR pszSource, LPCOMPONENT pcomp, DWORD dwFlags) PURE;
+    STDMETHOD(GetDesktopItemBySource)(THIS_ PCWSTR pwszSource, LPCOMPONENT pcomp, DWORD dwReserved) PURE;
+};
+#undef INTERFACE
+
+#pragma pop_macro("AddDesktopItem")
+
+#endif
+
 /****************************************************************************
 * SHAddToRecentDocs API
 */