// C++/WinRT v2.0.250303.1 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #ifndef WINRT_Windows_UI_Popups_0_H #define WINRT_Windows_UI_Popups_0_H WINRT_EXPORT namespace winrt::Windows::Foundation { struct Point; struct Rect; } WINRT_EXPORT namespace winrt::Windows::UI::Popups { enum class MessageDialogOptions : uint32_t { None = 0, AcceptUserInputAfterDelay = 0x1, }; enum class Placement : int32_t { Default = 0, Above = 1, Below = 2, Left = 3, Right = 4, }; struct IMessageDialog; struct IMessageDialogFactory; struct IPopupMenu; struct IUICommand; struct IUICommandFactory; struct MessageDialog; struct PopupMenu; struct UICommand; struct UICommandSeparator; struct UICommandInvokedHandler; } namespace winrt::impl { template <> struct category{ using type = interface_category; }; template <> struct category{ using type = interface_category; }; template <> struct category{ using type = interface_category; }; template <> struct category{ using type = interface_category; }; template <> struct category{ using type = interface_category; }; template <> struct category{ using type = class_category; }; template <> struct category{ using type = class_category; }; template <> struct category{ using type = class_category; }; template <> struct category{ using type = class_category; }; template <> struct category{ using type = enum_category; }; template <> struct category{ using type = enum_category; }; template <> struct category{ using type = delegate_category; }; template <> inline constexpr auto& name_v = L"Windows.UI.Popups.MessageDialog"; template <> inline constexpr auto& name_v = L"Windows.UI.Popups.PopupMenu"; template <> inline constexpr auto& name_v = L"Windows.UI.Popups.UICommand"; template <> inline constexpr auto& name_v = L"Windows.UI.Popups.UICommandSeparator"; template <> inline constexpr auto& name_v = L"Windows.UI.Popups.MessageDialogOptions"; template <> inline constexpr auto& name_v = L"Windows.UI.Popups.Placement"; template <> inline constexpr auto& name_v = L"Windows.UI.Popups.IMessageDialog"; template <> inline constexpr auto& name_v = L"Windows.UI.Popups.IMessageDialogFactory"; template <> inline constexpr auto& name_v = L"Windows.UI.Popups.IPopupMenu"; template <> inline constexpr auto& name_v = L"Windows.UI.Popups.IUICommand"; template <> inline constexpr auto& name_v = L"Windows.UI.Popups.IUICommandFactory"; template <> inline constexpr auto& name_v = L"Windows.UI.Popups.UICommandInvokedHandler"; template <> inline constexpr guid guid_v{ 0x33F59B01,0x5325,0x43AB,{ 0x9A,0xB3,0xBD,0xAE,0x44,0x0E,0x41,0x21 } }; // 33F59B01-5325-43AB-9AB3-BDAE440E4121 template <> inline constexpr guid guid_v{ 0x2D161777,0xA66F,0x4EA5,{ 0xBB,0x87,0x79,0x3F,0xFA,0x49,0x41,0xF2 } }; // 2D161777-A66F-4EA5-BB87-793FFA4941F2 template <> inline constexpr guid guid_v{ 0x4E9BC6DC,0x880D,0x47FC,{ 0xA0,0xA1,0x72,0xB6,0x39,0xE6,0x25,0x59 } }; // 4E9BC6DC-880D-47FC-A0A1-72B639E62559 template <> inline constexpr guid guid_v{ 0x4FF93A75,0x4145,0x47FF,{ 0xAC,0x7F,0xDF,0xF1,0xC1,0xFA,0x5B,0x0F } }; // 4FF93A75-4145-47FF-AC7F-DFF1C1FA5B0F template <> inline constexpr guid guid_v{ 0xA21A8189,0x26B0,0x4676,{ 0xAE,0x94,0x54,0x04,0x1B,0xC1,0x25,0xE8 } }; // A21A8189-26B0-4676-AE94-54041BC125E8 template <> inline constexpr guid guid_v{ 0xDAF77A4F,0xC27A,0x4298,{ 0x9A,0xC6,0x29,0x22,0xC4,0x5E,0x7D,0xA6 } }; // DAF77A4F-C27A-4298-9AC6-2922C45E7DA6 template <> struct default_interface{ using type = winrt::Windows::UI::Popups::IMessageDialog; }; template <> struct default_interface{ using type = winrt::Windows::UI::Popups::IPopupMenu; }; template <> struct default_interface{ using type = winrt::Windows::UI::Popups::IUICommand; }; template <> struct default_interface{ using type = winrt::Windows::UI::Popups::IUICommand; }; template <> struct abi { struct WINRT_IMPL_NOVTABLE type : inspectable_abi { virtual int32_t __stdcall get_Title(void**) noexcept = 0; virtual int32_t __stdcall put_Title(void*) noexcept = 0; virtual int32_t __stdcall get_Commands(void**) noexcept = 0; virtual int32_t __stdcall get_DefaultCommandIndex(uint32_t*) noexcept = 0; virtual int32_t __stdcall put_DefaultCommandIndex(uint32_t) noexcept = 0; virtual int32_t __stdcall get_CancelCommandIndex(uint32_t*) noexcept = 0; virtual int32_t __stdcall put_CancelCommandIndex(uint32_t) noexcept = 0; virtual int32_t __stdcall get_Content(void**) noexcept = 0; virtual int32_t __stdcall put_Content(void*) noexcept = 0; virtual int32_t __stdcall ShowAsync(void**) noexcept = 0; virtual int32_t __stdcall get_Options(uint32_t*) noexcept = 0; virtual int32_t __stdcall put_Options(uint32_t) noexcept = 0; }; }; template <> struct abi { struct WINRT_IMPL_NOVTABLE type : inspectable_abi { virtual int32_t __stdcall Create(void*, void**) noexcept = 0; virtual int32_t __stdcall CreateWithTitle(void*, void*, void**) noexcept = 0; }; }; template <> struct abi { struct WINRT_IMPL_NOVTABLE type : inspectable_abi { virtual int32_t __stdcall get_Commands(void**) noexcept = 0; virtual int32_t __stdcall ShowAsync(winrt::Windows::Foundation::Point, void**) noexcept = 0; virtual int32_t __stdcall ShowAsyncWithRect(winrt::Windows::Foundation::Rect, void**) noexcept = 0; virtual int32_t __stdcall ShowAsyncWithRectAndPlacement(winrt::Windows::Foundation::Rect, int32_t, void**) noexcept = 0; }; }; template <> struct abi { struct WINRT_IMPL_NOVTABLE type : inspectable_abi { virtual int32_t __stdcall get_Label(void**) noexcept = 0; virtual int32_t __stdcall put_Label(void*) noexcept = 0; virtual int32_t __stdcall get_Invoked(void**) noexcept = 0; virtual int32_t __stdcall put_Invoked(void*) noexcept = 0; virtual int32_t __stdcall get_Id(void**) noexcept = 0; virtual int32_t __stdcall put_Id(void*) noexcept = 0; }; }; template <> struct abi { struct WINRT_IMPL_NOVTABLE type : inspectable_abi { virtual int32_t __stdcall Create(void*, void**) noexcept = 0; virtual int32_t __stdcall CreateWithHandler(void*, void*, void**) noexcept = 0; virtual int32_t __stdcall CreateWithHandlerAndId(void*, void*, void*, void**) noexcept = 0; }; }; template <> struct abi { struct WINRT_IMPL_NOVTABLE type : unknown_abi { virtual int32_t __stdcall Invoke(void*) noexcept = 0; }; }; template struct consume_Windows_UI_Popups_IMessageDialog { [[nodiscard]] auto Title() const; auto Title(param::hstring const& value) const; [[nodiscard]] auto Commands() const; [[nodiscard]] auto DefaultCommandIndex() const; auto DefaultCommandIndex(uint32_t value) const; [[nodiscard]] auto CancelCommandIndex() const; auto CancelCommandIndex(uint32_t value) const; [[nodiscard]] auto Content() const; auto Content(param::hstring const& value) const; auto ShowAsync() const; [[nodiscard]] auto Options() const; auto Options(winrt::Windows::UI::Popups::MessageDialogOptions const& value) const; }; template <> struct consume { template using type = consume_Windows_UI_Popups_IMessageDialog; }; template struct consume_Windows_UI_Popups_IMessageDialogFactory { auto Create(param::hstring const& content) const; auto CreateWithTitle(param::hstring const& content, param::hstring const& title) const; }; template <> struct consume { template using type = consume_Windows_UI_Popups_IMessageDialogFactory; }; template struct consume_Windows_UI_Popups_IPopupMenu { [[nodiscard]] auto Commands() const; auto ShowAsync(winrt::Windows::Foundation::Point const& invocationPoint) const; auto ShowForSelectionAsync(winrt::Windows::Foundation::Rect const& selection) const; auto ShowForSelectionAsync(winrt::Windows::Foundation::Rect const& selection, winrt::Windows::UI::Popups::Placement const& preferredPlacement) const; }; template <> struct consume { template using type = consume_Windows_UI_Popups_IPopupMenu; }; template struct consume_Windows_UI_Popups_IUICommand { [[nodiscard]] auto Label() const; auto Label(param::hstring const& value) const; [[nodiscard]] auto Invoked() const; auto Invoked(winrt::Windows::UI::Popups::UICommandInvokedHandler const& value) const; [[nodiscard]] auto Id() const; auto Id(winrt::Windows::Foundation::IInspectable const& value) const; }; template <> struct consume { template using type = consume_Windows_UI_Popups_IUICommand; }; template struct consume_Windows_UI_Popups_IUICommandFactory { auto Create(param::hstring const& label) const; auto CreateWithHandler(param::hstring const& label, winrt::Windows::UI::Popups::UICommandInvokedHandler const& action) const; auto CreateWithHandlerAndId(param::hstring const& label, winrt::Windows::UI::Popups::UICommandInvokedHandler const& action, winrt::Windows::Foundation::IInspectable const& commandId) const; }; template <> struct consume { template using type = consume_Windows_UI_Popups_IUICommandFactory; }; } #endif