Programming Field - ドキュメント無し関数 / 名前無し関数

IApplicationView

Immersive Shellにおけるアプリケーションのメイン画面を扱います。

※ Windows.UI.ViewManagement.ApplicationView (ABI::Windows::UI::ViewManagement::IApplicationView) とは異なります。

確認済み OS

Windows 10 (Build 10240, 10586, 14393) (Windows 8.1には存在しません)

※ Build 10586 でメソッドが追加、Build 14393 でIIDが変更されているのを確認しています。

構文

※ Windows 10 Build 14393 と Windows 10 Build 10240/10586 でIIDおよびメソッドが異なります(Build 14393 ではメソッドが追加されています)。

[C/C++] - Windows 10 Build 14393

// struct IApplicationView : public IUnknown
DECLARE_INTERFACE_IID_(IApplicationView, IUnknown, "9AC0B5C8-1484-4C5B-9533-4134A0F97CEA")
{
    /*** IUnknown methods ***/
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObject) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /*** IApplicationView methods ***/
    STDMETHOD(SetFocus)(THIS) PURE;
    STDMETHOD(SwitchTo)(THIS) PURE;
    STDMETHOD(TryInvokeBack)(THIS_ IAsyncCallback*) PURE;
    STDMETHOD(GetThumbnailWindow)(THIS_ HWND*) PURE;
    STDMETHOD(GetMonitor)(THIS_ IImmersiveMonitor**) PURE;
    STDMETHOD(GetVisibility)(THIS_ int*) PURE;
    STDMETHOD(SetCloak)(THIS_ APPLICATION_VIEW_CLOAK_TYPE, int) PURE;
    STDMETHOD(GetPosition)(THIS_ REFIID, void**) PURE;
    STDMETHOD(SetPosition)(THIS_ IApplicationViewPosition*) PURE;
    STDMETHOD(InsertAfterWindow)(THIS_ HWND) PURE;
    STDMETHOD(GetExtendedFramePosition)(THIS_ RECT*) PURE;
    STDMETHOD(GetAppUserModelId)(THIS_ PWSTR*) PURE;
    STDMETHOD(SetAppUserModelId)(THIS_ PCWSTR) PURE;
    STDMETHOD(IsEqualByAppUserModelId)(THIS_ PCWSTR, int*) PURE;
    STDMETHOD(GetViewState)(THIS_ UINT*) PURE;
    STDMETHOD(SetViewState)(THIS_ UINT) PURE;
    STDMETHOD(GetNeediness)(THIS_ int*) PURE;
    STDMETHOD(GetLastActivationTimestamp)(THIS_ ULONGLONG*) PURE;
    STDMETHOD(SetLastActivationTimestamp)(THIS_ ULONGLONG) PURE;
    STDMETHOD(GetVirtualDesktopId)(THIS_ GUID*) PURE;
    STDMETHOD(SetVirtualDesktopId)(THIS_ REFGUID) PURE;
    STDMETHOD(GetShowInSwitchers)(THIS_ int*) PURE;
    STDMETHOD(SetShowInSwitchers)(THIS_ int) PURE;
    STDMETHOD(GetScaleFactor)(THIS_ int*) PURE;
    STDMETHOD(CanReceiveInput)(THIS_ BOOL*) PURE;
    STDMETHOD(GetCompatibilityPolicyType)(THIS_ APPLICATION_VIEW_COMPATIBILITY_POLICY*) PURE;
    STDMETHOD(SetCompatibilityPolicyType)(THIS_ APPLICATION_VIEW_COMPATIBILITY_POLICY) PURE;
    STDMETHOD(GetPositionPriority)(THIS_ IShellPositionerPriority**) PURE;
    STDMETHOD(SetPositionPriority)(THIS_ IShellPositionerPriority*) PURE;
    STDMETHOD(GetSizeConstraints)(THIS_ IImmersiveMonitor*, SIZE*, SIZE*) PURE;
    STDMETHOD(GetSizeConstraintsForDpi)(THIS_ UINT, SIZE*, SIZE*) PURE;
    STDMETHOD(SetSizeConstraintsForDpi)(THIS_ const UINT*, const SIZE*, const SIZE*) PURE;
    STDMETHOD(QuerySizeConstraintsFromApp)(THIS) PURE;
    STDMETHOD(OnMinSizePreferencesUpdated)(THIS_ HWND) PURE;
    STDMETHOD(ApplyOperation)(THIS_ IApplicationViewOperation*) PURE;
    STDMETHOD(IsTray)(THIS_ BOOL*) PURE;
    STDMETHOD(IsInHighZOrderBand)(THIS_ BOOL*) PURE;
    STDMETHOD(IsSplashScreenPresented)(THIS_ BOOL*) PURE;
    STDMETHOD(Flash)(THIS) PURE;
    STDMETHOD(GetRootSwitchableOwner)(THIS_ IApplicationView**) PURE;
    STDMETHOD(EnumerateOwnershipTree)(THIS_ IObjectArray**) PURE;
    STDMETHOD(GetEnterpriseId)(THIS_ PWSTR*) PURE;
    STDMETHOD(GetEnterpriseChromePreference)(THIS_ int*) PURE; /*** (added: Windows 10 Build 14393) ***/
    STDMETHOD(IsMirrored)(THIS_ BOOL*) PURE;
};

※ すべてのメソッドの挙動は確認しておらず、「int」はBOOL型である可能性があります。

[C/C++] - Windows 10 Build 10240 / 10586

※ 旧形式のためHTML要素の表示の高さを小さくしています。

// struct IApplicationView : public IUnknown
DECLARE_INTERFACE_IID_(IApplicationView, IUnknown, "855BCAAD-3177-47B5-8571-23803421F9D8")
{
    /*** IUnknown methods ***/
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObject) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /*** IApplicationView methods ***/
    STDMETHOD(SetFocus)(THIS) PURE;
    STDMETHOD(SwitchTo)(THIS) PURE;
    STDMETHOD(TryInvokeBack)(THIS_ IAsyncCallback*) PURE;
    STDMETHOD(GetThumbnailWindow)(THIS_ HWND*) PURE;
    STDMETHOD(GetMonitor)(THIS_ IImmersiveMonitor**) PURE;
    STDMETHOD(GetVisibility)(THIS_ int*) PURE;
    STDMETHOD(SetCloak)(THIS_ APPLICATION_VIEW_CLOAK_TYPE, int) PURE;
    STDMETHOD(GetPosition)(THIS_ REFIID, void**) PURE;
    STDMETHOD(SetPosition)(THIS_ IApplicationViewPosition*) PURE;
    STDMETHOD(InsertAfterWindow)(THIS_ HWND) PURE;
    STDMETHOD(GetExtendedFramePosition)(THIS_ RECT*) PURE;
    STDMETHOD(GetAppUserModelId)(THIS_ PWSTR*) PURE;
    STDMETHOD(SetAppUserModelId)(THIS_ PCWSTR) PURE;
    STDMETHOD(IsEqualByAppUserModelId)(THIS_ PCWSTR, int*) PURE;
    STDMETHOD(GetViewState)(THIS_ UINT*) PURE;
    STDMETHOD(SetViewState)(THIS_ UINT) PURE;
    STDMETHOD(GetNeediness)(THIS_ int*) PURE;
    STDMETHOD(GetLastActivationTimestamp)(THIS_ ULONGLONG*) PURE;
    STDMETHOD(SetLastActivationTimestamp)(THIS_ ULONGLONG) PURE;
    STDMETHOD(GetVirtualDesktopId)(THIS_ GUID*) PURE;
    STDMETHOD(SetVirtualDesktopId)(THIS_ REFGUID) PURE;
    STDMETHOD(GetShowInSwitchers)(THIS_ int*) PURE;
    STDMETHOD(SetShowInSwitchers)(THIS_ int) PURE;
    STDMETHOD(GetScaleFactor)(THIS_ int*) PURE;
    STDMETHOD(CanReceiveInput)(THIS_ BOOL*) PURE;
    STDMETHOD(GetCompatibilityPolicyType)(THIS_ APPLICATION_VIEW_COMPATIBILITY_POLICY*) PURE;
    STDMETHOD(SetCompatibilityPolicyType)(THIS_ APPLICATION_VIEW_COMPATIBILITY_POLICY) PURE;
    STDMETHOD(GetPositionPriority)(THIS_ IShellPositionerPriority**) PURE;
    STDMETHOD(SetPositionPriority)(THIS_ IShellPositionerPriority*) PURE;
    STDMETHOD(GetSizeConstraints)(THIS_ IImmersiveMonitor*, SIZE*, SIZE*) PURE;
    STDMETHOD(GetSizeConstraintsForDpi)(THIS_ UINT, SIZE*, SIZE*) PURE;
    STDMETHOD(SetSizeConstraintsForDpi)(THIS_ const UINT*, const SIZE*, const SIZE*) PURE;
    STDMETHOD(QuerySizeConstraintsFromApp)(THIS) PURE;
    STDMETHOD(OnMinSizePreferencesUpdated)(THIS_ HWND) PURE;
    STDMETHOD(ApplyOperation)(THIS_ IApplicationViewOperation*) PURE;
    STDMETHOD(IsTray)(THIS_ BOOL*) PURE;
    STDMETHOD(IsInHighZOrderBand)(THIS_ BOOL*) PURE;
    STDMETHOD(IsSplashScreenPresented)(THIS_ BOOL*) PURE;
    STDMETHOD(Flash)(THIS) PURE;
    STDMETHOD(GetRootSwitchableOwner)(THIS_ IApplicationView**) PURE;
    STDMETHOD(EnumerateOwnershipTree)(THIS_ IObjectArray**) PURE;
    /*** (Windows 10 Build 10584 or later?) ***/
    STDMETHOD(GetEnterpriseId)(THIS_ PWSTR*) PURE;
    STDMETHOD(IsMirrored)(THIS_ BOOL*) PURE;
};

※ すべてのメソッドの挙動は確認しておらず、「int」はBOOL型である可能性があります。

関連する型

インターフェイス

列挙子

APPLICATION_VIEW_CLOAK_TYPE:

enum APPLICATION_VIEW_CLOAK_TYPE
{
    AVCT_NONE = 0,
    AVCT_DEFAULT = 1,
    AVCT_VIRTUAL_DESKTOP = 2
};

APPLICATION_VIEW_COMPATIBILITY_POLICY:

enum APPLICATION_VIEW_COMPATIBILITY_POLICY
{
    AVCP_NONE = 0,
    AVCP_SMALL_SCREEN = 1,
    AVCP_TABLET_SMALL_SCREEN = 2,
    AVCP_VERY_SMALL_SCREEN = 3,
    AVCP_HIGH_SCALE_FACTOR = 4
};

使用上の注意点

解説

Windows 10では、従来のデスクトップアプリケーションのウィンドウとWindows 8以降のModern UIアプリのビューを同等に扱うように実装されており、その中心となるインターフェイスがこの IApplicationView です。

なお、IApplicationView に対して以下のインターフェイスを IUnknown::QueryInterface 経由で取得することができます。

このインターフェイスの取得元

最終更新日: 2016/10/10