Skip to content

Commit 2e038bb

Browse files
committed
[API:SHOBJIDL] Improve IVirtualDesktopManagerInternal definition to match Win11 24h2 (26100)
1 parent 7121c49 commit 2e038bb

File tree

3 files changed

+274
-3
lines changed

3 files changed

+274
-3
lines changed

Source/Include/KNSoft/NDK/Win32/API/ShObjIdl/VirtualDesktop/VirtualDesktop.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,16 @@
99

1010
EXTERN_C_START
1111

12+
// {C2F03A33-21F5-47FA-B4BB-156362A2F239}
1213
DEFINE_GUID(CLSID_ImmersiveShell, 0xC2F03A33, 0x21F5, 0x47FA, 0xB4, 0xBB, 0x15, 0x63, 0x62, 0xA2, 0xF2, 0x39);
14+
15+
// {C5E0CDCA-7B6E-41B2-9FC4-D93975CC467B}
1316
DEFINE_GUID(CLSID_VirtualDesktopManagerInternal, 0xC5E0CDCA, 0x7B6E, 0x41B2, 0x9F, 0xC4, 0xD9, 0x39, 0x75, 0xCC, 0x46, 0x7B);
17+
18+
// {AA509086-5CA9-4C25-8F95-589D3C07B48A}
1419
DEFINE_GUID(CLSID_VirtualDesktopManager, 0xAA509086, 0x5CA9, 0x4C25, 0x8F, 0x95, 0x58, 0x9D, 0x3C, 0x07, 0xB4, 0x8A);
20+
21+
// {B5A399E7-1C87-46B8-88E9-FC5747B171BD}
1522
DEFINE_GUID(CLSID_VirtualDesktopPinnedApps, 0xB5A399E7, 0x1C87, 0x46B8, 0x88, 0xE9, 0xFC, 0x57, 0x47, 0xB1, 0x71, 0xBD);
1623

1724
/* Win11 26100 {53F5CA0B-158F-4124-900C-057158060B27} */

Source/Include/KNSoft/NDK/Win32/API/ShObjIdl/VirtualDesktop/VirtualDesktop.idl

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,15 @@ interface IVirtualDesktopPinnedApps : IUnknown
342342

343343
#pragma region IVirtualDesktopManagerInternal
344344

345+
typedef enum
346+
{
347+
VDMI_ADD_LEFT_DIRECTION = 3,
348+
VDMI_ADD_RIGHT_DIRECTION = 4
349+
} VDMI_ADJACENT_DESKTOP_DIRECTION;
350+
345351
/*
346-
* This interface changes frequently, only unchanged methods are listed
352+
* This interface changes frequently,
353+
* support the latest version only (Win11 24h2, 26100)
347354
*/
348355
[
349356
object,
@@ -353,11 +360,30 @@ interface IVirtualDesktopPinnedApps : IUnknown
353360
interface IVirtualDesktopManagerInternal : IUnknown
354361
{
355362
HRESULT GetCount([out] int* Count);
356-
// HRESULT GetCount([in] HANDLE* hWndOrMon, [out] int* Count);
357363

358-
/* Only following methods are not changed */
364+
/* Only following 2 methods are not changed */
359365
HRESULT MoveViewToDesktop([in] IApplicationView* view, [in] IVirtualDesktop* desktop);
360366
HRESULT CanViewMoveDesktops([in] IApplicationView* view, [out] boolean* canMove);
367+
368+
HRESULT GetCurrentDesktop([out] IVirtualDesktop** desktop);
369+
HRESULT GetDesktops([out] IObjectArray** desktops);
370+
HRESULT GetAdjacentDesktop([in] IVirtualDesktop* from, [in, v1_enum] VDMI_ADJACENT_DESKTOP_DIRECTION direction, [out] IVirtualDesktop** desktop);
371+
HRESULT SwitchDesktop([in] IVirtualDesktop* desktop);
372+
HRESULT SwitchDesktopAndMoveForegroundView([in] IVirtualDesktop* desktop);
373+
HRESULT CreateDesktop([out] IVirtualDesktop** desktop);
374+
HRESULT MoveDesktop([in] IVirtualDesktop* desktop, [in] int nIndex);
375+
HRESULT RemoveDesktop([in] IVirtualDesktop* desktop, [in] IVirtualDesktop* fallback);
376+
HRESULT FindDesktop([in, ptr] GUID* desktopid, [out] IVirtualDesktop** desktop);
377+
HRESULT GetDesktopSwitchIncludeExcludeViews([in] IVirtualDesktop* desktop, [out] IObjectArray** unknown1, [out] IObjectArray** unknown2);
378+
HRESULT SetDesktopName([in] IVirtualDesktop* desktop, [in] HSTRING* name);
379+
HRESULT SetDesktopWallpaper([in] IVirtualDesktop* desktop, [in] HSTRING* path);
380+
HRESULT UpdateWallpaperPathForAllDesktops([in] HSTRING* path);
381+
HRESULT CopyDesktopState([in] IApplicationView* pView0, [in] IApplicationView* pView1);
382+
HRESULT CreateRemoteDesktop([in] HSTRING* path, [out] IVirtualDesktop** desktop);
383+
HRESULT SwitchRemoteDesktop([in] IVirtualDesktop* desktop, [in] int switchtype);
384+
HRESULT SwitchDesktopWithAnimation([in] IVirtualDesktop* desktop);
385+
HRESULT GetLastActiveDesktop([out] IVirtualDesktop** desktop);
386+
HRESULT WaitForAnimationToComplete();
361387
}
362388

363389
#pragma endregion

Source/Include/KNSoft/NDK/Win32/API/ShObjIdl/VirtualDesktop/VirtualDesktop.idl_h.h

Lines changed: 238 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3018,6 +3018,13 @@ EXTERN_C const IID IID_IVirtualDesktopPinnedApps;
30183018

30193019
#pragma endregion
30203020
#pragma region IVirtualDesktopManagerInternal
3021+
typedef /* [public][public] */
3022+
enum __MIDL___MIDL_itf_VirtualDesktop_0000_0010_0001
3023+
{
3024+
VDMI_ADD_LEFT_DIRECTION = 3,
3025+
VDMI_ADD_RIGHT_DIRECTION = 4
3026+
} VDMI_ADJACENT_DESKTOP_DIRECTION;
3027+
30213028

30223029

30233030
extern RPC_IF_HANDLE __MIDL_itf_VirtualDesktop_0000_0010_v0_0_c_ifspec;
@@ -3049,6 +3056,74 @@ EXTERN_C const IID IID_IVirtualDesktopManagerInternal;
30493056
/* [in] */ IApplicationView *view,
30503057
/* [out] */ boolean *canMove) = 0;
30513058

3059+
virtual HRESULT STDMETHODCALLTYPE GetCurrentDesktop(
3060+
/* [out] */ IVirtualDesktop **desktop) = 0;
3061+
3062+
virtual HRESULT STDMETHODCALLTYPE GetDesktops(
3063+
/* [out] */ IObjectArray **desktops) = 0;
3064+
3065+
virtual HRESULT STDMETHODCALLTYPE GetAdjacentDesktop(
3066+
/* [in] */ IVirtualDesktop *from,
3067+
/* [v1_enum][in] */ VDMI_ADJACENT_DESKTOP_DIRECTION direction,
3068+
/* [out] */ IVirtualDesktop **desktop) = 0;
3069+
3070+
virtual HRESULT STDMETHODCALLTYPE SwitchDesktop(
3071+
/* [in] */ IVirtualDesktop *desktop) = 0;
3072+
3073+
virtual HRESULT STDMETHODCALLTYPE SwitchDesktopAndMoveForegroundView(
3074+
/* [in] */ IVirtualDesktop *desktop) = 0;
3075+
3076+
virtual HRESULT STDMETHODCALLTYPE CreateDesktop(
3077+
/* [out] */ IVirtualDesktop **desktop) = 0;
3078+
3079+
virtual HRESULT STDMETHODCALLTYPE MoveDesktop(
3080+
/* [in] */ IVirtualDesktop *desktop,
3081+
/* [in] */ int nIndex) = 0;
3082+
3083+
virtual HRESULT STDMETHODCALLTYPE RemoveDesktop(
3084+
/* [in] */ IVirtualDesktop *desktop,
3085+
/* [in] */ IVirtualDesktop *fallback) = 0;
3086+
3087+
virtual HRESULT STDMETHODCALLTYPE FindDesktop(
3088+
/* [full][in] */ GUID *desktopid,
3089+
/* [out] */ IVirtualDesktop **desktop) = 0;
3090+
3091+
virtual HRESULT STDMETHODCALLTYPE GetDesktopSwitchIncludeExcludeViews(
3092+
/* [in] */ IVirtualDesktop *desktop,
3093+
/* [out] */ IObjectArray **unknown1,
3094+
/* [out] */ IObjectArray **unknown2) = 0;
3095+
3096+
virtual HRESULT STDMETHODCALLTYPE SetDesktopName(
3097+
/* [in] */ IVirtualDesktop *desktop,
3098+
/* [in] */ HSTRING *name) = 0;
3099+
3100+
virtual HRESULT STDMETHODCALLTYPE SetDesktopWallpaper(
3101+
/* [in] */ IVirtualDesktop *desktop,
3102+
/* [in] */ HSTRING *path) = 0;
3103+
3104+
virtual HRESULT STDMETHODCALLTYPE UpdateWallpaperPathForAllDesktops(
3105+
/* [in] */ HSTRING *path) = 0;
3106+
3107+
virtual HRESULT STDMETHODCALLTYPE CopyDesktopState(
3108+
/* [in] */ IApplicationView *pView0,
3109+
/* [in] */ IApplicationView *pView1) = 0;
3110+
3111+
virtual HRESULT STDMETHODCALLTYPE CreateRemoteDesktop(
3112+
/* [in] */ HSTRING *path,
3113+
/* [out] */ IVirtualDesktop **desktop) = 0;
3114+
3115+
virtual HRESULT STDMETHODCALLTYPE SwitchRemoteDesktop(
3116+
/* [in] */ IVirtualDesktop *desktop,
3117+
/* [in] */ int switchtype) = 0;
3118+
3119+
virtual HRESULT STDMETHODCALLTYPE SwitchDesktopWithAnimation(
3120+
/* [in] */ IVirtualDesktop *desktop) = 0;
3121+
3122+
virtual HRESULT STDMETHODCALLTYPE GetLastActiveDesktop(
3123+
/* [out] */ IVirtualDesktop **desktop) = 0;
3124+
3125+
virtual HRESULT STDMETHODCALLTYPE WaitForAnimationToComplete( void) = 0;
3126+
30523127
};
30533128

30543129

@@ -3090,6 +3165,112 @@ EXTERN_C const IID IID_IVirtualDesktopManagerInternal;
30903165
/* [in] */ IApplicationView *view,
30913166
/* [out] */ boolean *canMove);
30923167

3168+
DECLSPEC_XFGVIRT(IVirtualDesktopManagerInternal, GetCurrentDesktop)
3169+
HRESULT ( STDMETHODCALLTYPE *GetCurrentDesktop )(
3170+
IVirtualDesktopManagerInternal * This,
3171+
/* [out] */ IVirtualDesktop **desktop);
3172+
3173+
DECLSPEC_XFGVIRT(IVirtualDesktopManagerInternal, GetDesktops)
3174+
HRESULT ( STDMETHODCALLTYPE *GetDesktops )(
3175+
IVirtualDesktopManagerInternal * This,
3176+
/* [out] */ IObjectArray **desktops);
3177+
3178+
DECLSPEC_XFGVIRT(IVirtualDesktopManagerInternal, GetAdjacentDesktop)
3179+
HRESULT ( STDMETHODCALLTYPE *GetAdjacentDesktop )(
3180+
IVirtualDesktopManagerInternal * This,
3181+
/* [in] */ IVirtualDesktop *from,
3182+
/* [v1_enum][in] */ VDMI_ADJACENT_DESKTOP_DIRECTION direction,
3183+
/* [out] */ IVirtualDesktop **desktop);
3184+
3185+
DECLSPEC_XFGVIRT(IVirtualDesktopManagerInternal, SwitchDesktop)
3186+
HRESULT ( STDMETHODCALLTYPE *SwitchDesktop )(
3187+
IVirtualDesktopManagerInternal * This,
3188+
/* [in] */ IVirtualDesktop *desktop);
3189+
3190+
DECLSPEC_XFGVIRT(IVirtualDesktopManagerInternal, SwitchDesktopAndMoveForegroundView)
3191+
HRESULT ( STDMETHODCALLTYPE *SwitchDesktopAndMoveForegroundView )(
3192+
IVirtualDesktopManagerInternal * This,
3193+
/* [in] */ IVirtualDesktop *desktop);
3194+
3195+
DECLSPEC_XFGVIRT(IVirtualDesktopManagerInternal, CreateDesktop)
3196+
HRESULT ( STDMETHODCALLTYPE *CreateDesktop )(
3197+
IVirtualDesktopManagerInternal * This,
3198+
/* [out] */ IVirtualDesktop **desktop);
3199+
3200+
DECLSPEC_XFGVIRT(IVirtualDesktopManagerInternal, MoveDesktop)
3201+
HRESULT ( STDMETHODCALLTYPE *MoveDesktop )(
3202+
IVirtualDesktopManagerInternal * This,
3203+
/* [in] */ IVirtualDesktop *desktop,
3204+
/* [in] */ int nIndex);
3205+
3206+
DECLSPEC_XFGVIRT(IVirtualDesktopManagerInternal, RemoveDesktop)
3207+
HRESULT ( STDMETHODCALLTYPE *RemoveDesktop )(
3208+
IVirtualDesktopManagerInternal * This,
3209+
/* [in] */ IVirtualDesktop *desktop,
3210+
/* [in] */ IVirtualDesktop *fallback);
3211+
3212+
DECLSPEC_XFGVIRT(IVirtualDesktopManagerInternal, FindDesktop)
3213+
HRESULT ( STDMETHODCALLTYPE *FindDesktop )(
3214+
IVirtualDesktopManagerInternal * This,
3215+
/* [full][in] */ GUID *desktopid,
3216+
/* [out] */ IVirtualDesktop **desktop);
3217+
3218+
DECLSPEC_XFGVIRT(IVirtualDesktopManagerInternal, GetDesktopSwitchIncludeExcludeViews)
3219+
HRESULT ( STDMETHODCALLTYPE *GetDesktopSwitchIncludeExcludeViews )(
3220+
IVirtualDesktopManagerInternal * This,
3221+
/* [in] */ IVirtualDesktop *desktop,
3222+
/* [out] */ IObjectArray **unknown1,
3223+
/* [out] */ IObjectArray **unknown2);
3224+
3225+
DECLSPEC_XFGVIRT(IVirtualDesktopManagerInternal, SetDesktopName)
3226+
HRESULT ( STDMETHODCALLTYPE *SetDesktopName )(
3227+
IVirtualDesktopManagerInternal * This,
3228+
/* [in] */ IVirtualDesktop *desktop,
3229+
/* [in] */ HSTRING *name);
3230+
3231+
DECLSPEC_XFGVIRT(IVirtualDesktopManagerInternal, SetDesktopWallpaper)
3232+
HRESULT ( STDMETHODCALLTYPE *SetDesktopWallpaper )(
3233+
IVirtualDesktopManagerInternal * This,
3234+
/* [in] */ IVirtualDesktop *desktop,
3235+
/* [in] */ HSTRING *path);
3236+
3237+
DECLSPEC_XFGVIRT(IVirtualDesktopManagerInternal, UpdateWallpaperPathForAllDesktops)
3238+
HRESULT ( STDMETHODCALLTYPE *UpdateWallpaperPathForAllDesktops )(
3239+
IVirtualDesktopManagerInternal * This,
3240+
/* [in] */ HSTRING *path);
3241+
3242+
DECLSPEC_XFGVIRT(IVirtualDesktopManagerInternal, CopyDesktopState)
3243+
HRESULT ( STDMETHODCALLTYPE *CopyDesktopState )(
3244+
IVirtualDesktopManagerInternal * This,
3245+
/* [in] */ IApplicationView *pView0,
3246+
/* [in] */ IApplicationView *pView1);
3247+
3248+
DECLSPEC_XFGVIRT(IVirtualDesktopManagerInternal, CreateRemoteDesktop)
3249+
HRESULT ( STDMETHODCALLTYPE *CreateRemoteDesktop )(
3250+
IVirtualDesktopManagerInternal * This,
3251+
/* [in] */ HSTRING *path,
3252+
/* [out] */ IVirtualDesktop **desktop);
3253+
3254+
DECLSPEC_XFGVIRT(IVirtualDesktopManagerInternal, SwitchRemoteDesktop)
3255+
HRESULT ( STDMETHODCALLTYPE *SwitchRemoteDesktop )(
3256+
IVirtualDesktopManagerInternal * This,
3257+
/* [in] */ IVirtualDesktop *desktop,
3258+
/* [in] */ int switchtype);
3259+
3260+
DECLSPEC_XFGVIRT(IVirtualDesktopManagerInternal, SwitchDesktopWithAnimation)
3261+
HRESULT ( STDMETHODCALLTYPE *SwitchDesktopWithAnimation )(
3262+
IVirtualDesktopManagerInternal * This,
3263+
/* [in] */ IVirtualDesktop *desktop);
3264+
3265+
DECLSPEC_XFGVIRT(IVirtualDesktopManagerInternal, GetLastActiveDesktop)
3266+
HRESULT ( STDMETHODCALLTYPE *GetLastActiveDesktop )(
3267+
IVirtualDesktopManagerInternal * This,
3268+
/* [out] */ IVirtualDesktop **desktop);
3269+
3270+
DECLSPEC_XFGVIRT(IVirtualDesktopManagerInternal, WaitForAnimationToComplete)
3271+
HRESULT ( STDMETHODCALLTYPE *WaitForAnimationToComplete )(
3272+
IVirtualDesktopManagerInternal * This);
3273+
30933274
END_INTERFACE
30943275
} IVirtualDesktopManagerInternalVtbl;
30953276

@@ -3122,6 +3303,63 @@ EXTERN_C const IID IID_IVirtualDesktopManagerInternal;
31223303
#define IVirtualDesktopManagerInternal_CanViewMoveDesktops(This,view,canMove) \
31233304
( (This)->lpVtbl -> CanViewMoveDesktops(This,view,canMove) )
31243305

3306+
#define IVirtualDesktopManagerInternal_GetCurrentDesktop(This,desktop) \
3307+
( (This)->lpVtbl -> GetCurrentDesktop(This,desktop) )
3308+
3309+
#define IVirtualDesktopManagerInternal_GetDesktops(This,desktops) \
3310+
( (This)->lpVtbl -> GetDesktops(This,desktops) )
3311+
3312+
#define IVirtualDesktopManagerInternal_GetAdjacentDesktop(This,from,direction,desktop) \
3313+
( (This)->lpVtbl -> GetAdjacentDesktop(This,from,direction,desktop) )
3314+
3315+
#define IVirtualDesktopManagerInternal_SwitchDesktop(This,desktop) \
3316+
( (This)->lpVtbl -> SwitchDesktop(This,desktop) )
3317+
3318+
#define IVirtualDesktopManagerInternal_SwitchDesktopAndMoveForegroundView(This,desktop) \
3319+
( (This)->lpVtbl -> SwitchDesktopAndMoveForegroundView(This,desktop) )
3320+
3321+
#define IVirtualDesktopManagerInternal_CreateDesktop(This,desktop) \
3322+
( (This)->lpVtbl -> CreateDesktop(This,desktop) )
3323+
3324+
#define IVirtualDesktopManagerInternal_MoveDesktop(This,desktop,nIndex) \
3325+
( (This)->lpVtbl -> MoveDesktop(This,desktop,nIndex) )
3326+
3327+
#define IVirtualDesktopManagerInternal_RemoveDesktop(This,desktop,fallback) \
3328+
( (This)->lpVtbl -> RemoveDesktop(This,desktop,fallback) )
3329+
3330+
#define IVirtualDesktopManagerInternal_FindDesktop(This,desktopid,desktop) \
3331+
( (This)->lpVtbl -> FindDesktop(This,desktopid,desktop) )
3332+
3333+
#define IVirtualDesktopManagerInternal_GetDesktopSwitchIncludeExcludeViews(This,desktop,unknown1,unknown2) \
3334+
( (This)->lpVtbl -> GetDesktopSwitchIncludeExcludeViews(This,desktop,unknown1,unknown2) )
3335+
3336+
#define IVirtualDesktopManagerInternal_SetDesktopName(This,desktop,name) \
3337+
( (This)->lpVtbl -> SetDesktopName(This,desktop,name) )
3338+
3339+
#define IVirtualDesktopManagerInternal_SetDesktopWallpaper(This,desktop,path) \
3340+
( (This)->lpVtbl -> SetDesktopWallpaper(This,desktop,path) )
3341+
3342+
#define IVirtualDesktopManagerInternal_UpdateWallpaperPathForAllDesktops(This,path) \
3343+
( (This)->lpVtbl -> UpdateWallpaperPathForAllDesktops(This,path) )
3344+
3345+
#define IVirtualDesktopManagerInternal_CopyDesktopState(This,pView0,pView1) \
3346+
( (This)->lpVtbl -> CopyDesktopState(This,pView0,pView1) )
3347+
3348+
#define IVirtualDesktopManagerInternal_CreateRemoteDesktop(This,path,desktop) \
3349+
( (This)->lpVtbl -> CreateRemoteDesktop(This,path,desktop) )
3350+
3351+
#define IVirtualDesktopManagerInternal_SwitchRemoteDesktop(This,desktop,switchtype) \
3352+
( (This)->lpVtbl -> SwitchRemoteDesktop(This,desktop,switchtype) )
3353+
3354+
#define IVirtualDesktopManagerInternal_SwitchDesktopWithAnimation(This,desktop) \
3355+
( (This)->lpVtbl -> SwitchDesktopWithAnimation(This,desktop) )
3356+
3357+
#define IVirtualDesktopManagerInternal_GetLastActiveDesktop(This,desktop) \
3358+
( (This)->lpVtbl -> GetLastActiveDesktop(This,desktop) )
3359+
3360+
#define IVirtualDesktopManagerInternal_WaitForAnimationToComplete(This) \
3361+
( (This)->lpVtbl -> WaitForAnimationToComplete(This) )
3362+
31253363
#endif /* COBJMACROS */
31263364

31273365

0 commit comments

Comments
 (0)