[PATCH 0/6] MR5916: Add some idl files
Required by React Native apps. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5916
From: Zhiyi Zhang <zzhang(a)codeweavers.com> --- include/Makefile.in | 1 + include/windows.devices.input.idl | 117 ++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+) create mode 100644 include/windows.devices.input.idl diff --git a/include/Makefile.in b/include/Makefile.in index 6b66918d564..f4badf9c8b0 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -831,6 +831,7 @@ SOURCES = \ windows.devices.enumeration.idl \ windows.devices.geolocation.idl \ windows.devices.haptics.idl \ + windows.devices.input.idl \ windows.devices.power.idl \ windows.devices.radios.idl \ windows.devices.usb.idl \ diff --git a/include/windows.devices.input.idl b/include/windows.devices.input.idl new file mode 100644 index 00000000000..492d43c5807 --- /dev/null +++ b/include/windows.devices.input.idl @@ -0,0 +1,117 @@ +/* + * Copyright (C) 2024 Zhiyi Zhang for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifdef __WIDL__ +#pragma winrt ns_prefix +#endif + +#ifndef DO_NO_IMPORTS +import "inspectable.idl"; +import "asyncinfo.idl"; +import "eventtoken.idl"; +import "windowscontracts.idl"; +import "windows.foundation.idl"; +#endif + +namespace Windows.Devices.Input { + typedef enum PointerDeviceType PointerDeviceType; + typedef struct PointerDeviceUsage PointerDeviceUsage; + + interface IPointerDevice; + interface IPointerDevice2; + interface IPointerDeviceStatics; + + runtimeclass PointerDevice; + + declare { + interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Input.PointerDevice *>; + interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Input.PointerDeviceUsage>; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0) + ] + enum PointerDeviceType + { + Touch = 0, + Pen = 1, + Mouse = 2 + }; + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0) + ] + struct PointerDeviceUsage + { + UINT32 UsagePage; + UINT32 Usage; + INT32 MinLogical; + INT32 MaxLogical; + INT32 MinPhysical; + INT32 MaxPhysical; + UINT32 Unit; + FLOAT PhysicalMultiplier; + }; + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Devices.Input.PointerDevice), + uuid(93c9bafc-ebcb-467e-82c6-276feae36b5a) + ] + interface IPointerDevice : IInspectable + { + [propget] HRESULT PointerDeviceType([out, retval] Windows.Devices.Input.PointerDeviceType *value); + [propget] HRESULT IsIntegrated([out, retval] boolean *value); + [propget] HRESULT MaxContacts([out, retval] UINT32 *value); + [propget] HRESULT PhysicalDeviceRect([out, retval] Windows.Foundation.Rect *value); + [propget] HRESULT ScreenRect([out, retval] Windows.Foundation.Rect *value); + [propget] HRESULT SupportedUsages([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Input.PointerDeviceUsage> **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Devices.Input.PointerDevice), + uuid(f8a6d2a0-c484-489f-ae3e-30d2ee1ffd3e) + ] + interface IPointerDevice2 : IInspectable + { + [propget] HRESULT MaxPointersWithZDistance([out, retval] UINT32 *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Devices.Input.PointerDevice), + uuid(d8b89aa1-d1c6-416e-bd8d-5790914dc563) + ] + interface IPointerDeviceStatics : IInspectable + { + HRESULT GetPointerDevice([in] UINT32 pointer_id, [out, retval] Windows.Devices.Input.PointerDevice **pointer_device); + HRESULT GetPointerDevices([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Input.PointerDevice *> **pointer_devices); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(none), + static(Windows.Devices.Input.IPointerDeviceStatics, Windows.Foundation.UniversalApiContract, 1.0) + ] + runtimeclass PointerDevice + { + [default] interface Windows.Devices.Input.IPointerDevice; + [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Devices.Input.IPointerDevice2; + } +} -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/5916
From: Zhiyi Zhang <zzhang(a)codeweavers.com> --- include/windows.foundation.idl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/windows.foundation.idl b/include/windows.foundation.idl index 6978d45fd02..0ac0f78fa5e 100644 --- a/include/windows.foundation.idl +++ b/include/windows.foundation.idl @@ -64,6 +64,7 @@ namespace Windows.Foundation { interface IClosable; interface IDeferral; interface IDeferralFactory; + interface IGetActivationFactory; interface IMemoryBuffer; interface IMemoryBufferFactory; interface IMemoryBufferReference; @@ -109,6 +110,7 @@ namespace Windows.Foundation { interface Windows.Foundation.IReference<BYTE>; interface Windows.Foundation.IReference<INT32>; interface Windows.Foundation.IReference<DOUBLE>; + interface Windows.Foundation.IReference<FLOAT>; interface Windows.Foundation.IReference<UINT32>; interface Windows.Foundation.IReference<UINT64>; interface Windows.Foundation.IReference<Windows.Foundation.DateTime>; @@ -248,6 +250,15 @@ namespace Windows.Foundation { HRESULT Create([in] Windows.Foundation.DeferralCompletedHandler *handler, [out, retval] Windows.Foundation.Deferral **result); } + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + uuid(4edb8ee2-96dd-49a7-94f7-4607ddab8e3c) + ] + interface IGetActivationFactory : IInspectable + { + HRESULT GetActivationFactory([in] HSTRING activatable_class_id, [out, retval] IInspectable **factory); + } + [ contract(Windows.Foundation.FoundationContract, 1.0), uuid(5a648006-843a-4da9-865b-9d26e5dfad7b) -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/5916
From: Zhiyi Zhang <zzhang(a)codeweavers.com> --- include/windows.system.idl | 235 +++++++++++++++++++++++++++++++++++++ 1 file changed, 235 insertions(+) diff --git a/include/windows.system.idl b/include/windows.system.idl index 84e7e2baeae..3a349edd4f8 100644 --- a/include/windows.system.idl +++ b/include/windows.system.idl @@ -30,6 +30,8 @@ namespace Windows.System { typedef enum DispatcherQueuePriority DispatcherQueuePriority; typedef enum ProcessorArchitecture ProcessorArchitecture; + typedef enum VirtualKey VirtualKey; + typedef enum VirtualKeyModifiers VirtualKeyModifiers; interface IDispatcherQueue; interface IDispatcherQueue2; @@ -83,6 +85,239 @@ namespace Windows.System Unknown = 65535 }; + [ + contract(Windows.Foundation.UniversalApiContract, 1.0) + ] + enum VirtualKey + { + None = 0, + LeftButton = 1, + RightButton = 2, + Cancel = 3, + MiddleButton = 4, + XButton1 = 5, + XButton2 = 6, + Back = 8, + Tab = 9, + Clear = 12, + Enter = 13, + Shift = 16, + Control = 17, + Menu = 18, + Pause = 19, + CapitalLock = 20, + Kana = 21, + Hangul = 21, + [contract(Windows.Foundation.UniversalApiContract, 10.0)] + ImeOn = 22, + Junja = 23, + Final = 24, + Hanja = 25, + Kanji = 25, + [contract(Windows.Foundation.UniversalApiContract, 10.0)] + ImeOff = 26, + Escape = 27, + Convert = 28, + NonConvert = 29, + Accept = 30, + ModeChange = 31, + Space = 32, + PageUp = 33, + PageDown = 34, + End = 35, + Home = 36, + Left = 37, + Up = 38, + Right = 39, + Down = 40, + Select = 41, + Print = 42, + Execute = 43, + Snapshot = 44, + Insert = 45, + Delete = 46, + Help = 47, + Number0 = 48, + Number1 = 49, + Number2 = 50, + Number3 = 51, + Number4 = 52, + Number5 = 53, + Number6 = 54, + Number7 = 55, + Number8 = 56, + Number9 = 57, + A = 65, + B = 66, + C = 67, + D = 68, + E = 69, + F = 70, + G = 71, + H = 72, + I = 73, + J = 74, + K = 75, + L = 76, + M = 77, + N = 78, + O = 79, + P = 80, + Q = 81, + R = 82, + S = 83, + T = 84, + U = 85, + V = 86, + W = 87, + X = 88, + Y = 89, + Z = 90, + LeftWindows = 91, + RightWindows = 92, + Application = 93, + Sleep = 95, + NumberPad0 = 96, + NumberPad1 = 97, + NumberPad2 = 98, + NumberPad3 = 99, + NumberPad4 = 100, + NumberPad5 = 101, + NumberPad6 = 102, + NumberPad7 = 103, + NumberPad8 = 104, + NumberPad9 = 105, + Multiply = 106, + Add = 107, + Separator = 108, + Subtract = 109, + Decimal = 110, + Divide = 111, + F1 = 112, + F2 = 113, + F3 = 114, + F4 = 115, + F5 = 116, + F6 = 117, + F7 = 118, + F8 = 119, + F9 = 120, + F10 = 121, + F11 = 122, + F12 = 123, + F13 = 124, + F14 = 125, + F15 = 126, + F16 = 127, + F17 = 128, + F18 = 129, + F19 = 130, + F20 = 131, + F21 = 132, + F22 = 133, + F23 = 134, + F24 = 135, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + NavigationView = 136, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + NavigationMenu = 137, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + NavigationUp = 138, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + NavigationDown = 139, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + NavigationLeft = 140, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + NavigationRight = 141, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + NavigationAccept = 142, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + NavigationCancel = 143, + NumberKeyLock = 144, + Scroll = 145, + LeftShift = 160, + RightShift = 161, + LeftControl = 162, + RightControl = 163, + LeftMenu = 164, + RightMenu = 165, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + GoBack = 166, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + GoForward = 167, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + Refresh = 168, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + Stop = 169, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + Search = 170, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + Favorites = 171, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + GoHome = 172, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + GamepadA = 195, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + GamepadB = 196, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + GamepadX = 197, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + GamepadY = 198, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + GamepadRightShoulder = 199, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + GamepadLeftShoulder = 200, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + GamepadLeftTrigger = 201, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + GamepadRightTrigger = 202, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + GamepadDPadUp = 203, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + GamepadDPadDown = 204, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + GamepadDPadLeft = 205, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + GamepadDPadRight = 206, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + GamepadMenu = 207, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + GamepadView = 208, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + GamepadLeftThumbstickButton = 209, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + GamepadRightThumbstickButton = 210, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + GamepadLeftThumbstickUp = 211, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + GamepadLeftThumbstickDown = 212, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + GamepadLeftThumbstickRight = 213, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + GamepadLeftThumbstickLeft = 214, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + GamepadRightThumbstickUp = 215, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + GamepadRightThumbstickDown = 216, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + GamepadRightThumbstickRight = 217, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + GamepadRightThumbstickLeft = 218 + }; + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + flags + ] + enum VirtualKeyModifiers + { + None = 0x0, + Control = 0x1, + Menu = 0x2, + Shift = 0x4, + Windows = 0x8 + }; + [ contract(Windows.Foundation.UniversalApiContract, 5.0), uuid(dfa2dc9c-1a2d-4917-98f2-939af1d6e0c8) -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/5916
From: Zhiyi Zhang <zzhang(a)codeweavers.com> --- dlls/windows.applicationmodel/classes.idl | 3 + include/Makefile.in | 2 + .../windows.applicationmodel.activation.idl | 198 +++++++++ .../windows.applicationmodel.background.idl | 310 ++++++++++++++ include/windows.applicationmodel.core.idl | 393 ++++++++++++++++++ include/windows.applicationmodel.idl | 105 +++++ 6 files changed, 1011 insertions(+) create mode 100644 include/windows.applicationmodel.activation.idl create mode 100644 include/windows.applicationmodel.background.idl diff --git a/dlls/windows.applicationmodel/classes.idl b/dlls/windows.applicationmodel/classes.idl index c0c706787bc..c1f76f67d2f 100644 --- a/dlls/windows.applicationmodel/classes.idl +++ b/dlls/windows.applicationmodel/classes.idl @@ -29,5 +29,8 @@ import "windows.storage.idl"; import "windows.system.idl"; #define DO_NO_IMPORTS +#define _WINDOWS_APPLICATIONMODEL #include "windows.applicationmodel.core.idl" #include "windows.applicationmodel.idl" +#include "windows.applicationmodel.activation.idl" +#include "windows.applicationmodel.background.idl" diff --git a/include/Makefile.in b/include/Makefile.in index 390b41dfa4d..b38fc979dad 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -825,6 +825,8 @@ SOURCES = \ windef.h \ windns.h \ windot11.h \ + windows.applicationmodel.activation.idl \ + windows.applicationmodel.background.idl \ windows.applicationmodel.core.idl \ windows.applicationmodel.idl \ windows.devices.bluetooth.idl \ diff --git a/include/windows.applicationmodel.activation.idl b/include/windows.applicationmodel.activation.idl new file mode 100644 index 00000000000..3392a5bb316 --- /dev/null +++ b/include/windows.applicationmodel.activation.idl @@ -0,0 +1,198 @@ +/* + * Copyright (C) 2024 Zhiyi Zhang for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifdef __WIDL__ +#pragma winrt ns_prefix +#endif + +#ifndef DO_NO_IMPORTS +import "inspectable.idl"; +import "asyncinfo.idl"; +import "eventtoken.idl"; +import "windowscontracts.idl"; +import "windows.foundation.idl"; +import "windows.applicationmodel.background.idl"; +import "windows.applicationmodel.core.idl"; +import "windows.storage.idl"; +import "windows.system.idl"; +#endif + +namespace Windows.ApplicationModel.Background { + interface IBackgroundTaskInstance; + + runtimeclass BackgroundTaskRegistrationGroup; +} + +namespace Windows.ApplicationModel.Core { + runtimeclass CoreApplicationView; +} + +namespace Windows.ApplicationModel.Activation { + typedef enum ActivationKind ActivationKind; + typedef enum ApplicationExecutionState ApplicationExecutionState; + + interface IActivatedEventArgs; + interface IBackgroundActivatedEventArgs; + interface ISplashScreen; + + runtimeclass BackgroundActivatedEventArgs; + runtimeclass SplashScreen; + + declare { + interface Windows.Foundation.EventHandler<Windows.ApplicationModel.Activation.BackgroundActivatedEventArgs *>; + interface Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Activation.SplashScreen *, IInspectable *>; + interface Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup *, Windows.ApplicationModel.Activation.BackgroundActivatedEventArgs *>; + interface Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Core.CoreApplicationView *, Windows.ApplicationModel.Activation.IActivatedEventArgs *>; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0) + ] + enum ActivationKind + { + Launch = 0, + Search = 1, + ShareTarget = 2, + File = 3, + Protocol = 4, + FileOpenPicker = 5, + FileSavePicker = 6, + CachedFileUpdater = 7, + ContactPicker = 8, + Device = 9, + PrintTaskSettings = 10, + CameraSettings = 11, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + RestrictedLaunch = 12, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + AppointmentsProvider = 13, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + Contact = 14, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + LockScreenCall = 15, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + VoiceCommand = 16, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + LockScreen = 17, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + PickerReturned = 1000, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + WalletAction = 1001, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + PickFileContinuation = 1002, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + PickSaveFileContinuation = 1003, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + PickFolderContinuation = 1004, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + WebAuthenticationBrokerContinuation = 1005, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + WebAccountProvider = 1006, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + ComponentUI = 1007, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + ProtocolForResults = 1009, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + ToastNotification = 1010, + [contract(Windows.Foundation.UniversalApiContract, 2.0)] + Print3DWorkflow = 1011, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] + DialReceiver = 1012, + [contract(Windows.Foundation.UniversalApiContract, 2.0)] + DevicePairing = 1013, + [contract(Windows.Foundation.UniversalApiContract, 3.0)] + UserDataAccountsProvider = 1014, + [contract(Windows.Foundation.UniversalApiContract, 3.0)] + FilePickerExperience = 1015, + [contract(Windows.Foundation.UniversalApiContract, 4.0)] + LockScreenComponent = 1016, + [contract(Windows.Foundation.UniversalApiContract, 4.0)] + ContactPanel = 1017, + [contract(Windows.Foundation.UniversalApiContract, 5.0)] + PrintWorkflowForegroundTask = 1018, + [contract(Windows.Foundation.UniversalApiContract, 5.0)] + GameUIProvider = 1019, + [contract(Windows.Foundation.UniversalApiContract, 5.0)] + StartupTask = 1020, + [contract(Windows.Foundation.UniversalApiContract, 5.0)] + CommandLineLaunch = 1021, + [contract(Windows.Foundation.UniversalApiContract, 6.0)] + BarcodeScannerProvider = 1022 + }; + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0) + ] + enum ApplicationExecutionState + { + NotRunning = 0, + Running = 1, + Suspended = 2, + Terminated = 3, + ClosedByUser = 4 + }; + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + uuid(cf651713-cd08-4fd8-b697-a281b6544e2e) + ] + interface IActivatedEventArgs : IInspectable + { + [propget] HRESULT Kind([out, retval] Windows.ApplicationModel.Activation.ActivationKind *value); + [propget] HRESULT PreviousExecutionState([out, retval] Windows.ApplicationModel.Activation.ApplicationExecutionState *value); + [propget] HRESULT SplashScreen([out, retval] Windows.ApplicationModel.Activation.SplashScreen **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 3.0), + uuid(ab14bee0-e760-440e-a91c-44796de3a92d) + ] + interface IBackgroundActivatedEventArgs : IInspectable + { + [propget] HRESULT TaskInstance([out, retval] Windows.ApplicationModel.Background.IBackgroundTaskInstance **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.ApplicationModel.Activation.SplashScreen), + uuid(ca4d975c-d4d6-43f0-97c0-0833c6391c24) + ] + interface ISplashScreen : IInspectable + { + [propget] HRESULT ImageLocation([out, retval] Windows.Foundation.Rect *value); + [eventadd] HRESULT Dismissed([in] Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Activation.SplashScreen *, IInspectable *> *handler, [out, retval] EventRegistrationToken *cookie); + [eventremove] HRESULT Dismissed([in] EventRegistrationToken cookie); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 3.0), + marshaling_behavior(agile) + ] + runtimeclass BackgroundActivatedEventArgs + { + [default] interface Windows.ApplicationModel.Activation.IBackgroundActivatedEventArgs; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0) + ] + runtimeclass SplashScreen + { + [default] interface Windows.ApplicationModel.Activation.ISplashScreen; + } +} diff --git a/include/windows.applicationmodel.background.idl b/include/windows.applicationmodel.background.idl new file mode 100644 index 00000000000..12780e5c9c6 --- /dev/null +++ b/include/windows.applicationmodel.background.idl @@ -0,0 +1,310 @@ +/* + * Copyright (C) 2024 Zhiyi Zhang for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifdef __WIDL__ +#pragma winrt ns_prefix +#endif + +#ifndef DO_NO_IMPORTS +import "inspectable.idl"; +import "asyncinfo.idl"; +import "eventtoken.idl"; +import "windowscontracts.idl"; +import "windows.foundation.idl"; +import "windows.applicationmodel.activation.idl"; +import "windows.storage.idl"; +import "windows.system.idl"; +#endif + +namespace Windows.ApplicationModel.Activation { + runtimeclass BackgroundActivatedEventArgs; +} + +namespace Windows.ApplicationModel.Background { + runtimeclass BackgroundTaskRegistrationGroup; +} + +namespace Windows.ApplicationModel.Activation { + declare { + interface Windows.Foundation.EventHandler<Windows.ApplicationModel.Activation.BackgroundActivatedEventArgs *>; + interface Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup *, Windows.ApplicationModel.Activation.BackgroundActivatedEventArgs *>; + } +} + +namespace Windows.ApplicationModel.Background { + typedef enum BackgroundTaskCancellationReason BackgroundTaskCancellationReason; + + interface IBackgroundTaskCompletedEventArgs; + interface IBackgroundTaskDeferral; + interface IBackgroundTaskProgressEventArgs; + interface IBackgroundTaskInstance; + interface IBackgroundTaskRegistration; + interface IBackgroundTaskRegistration2; + interface IBackgroundTaskRegistration3; + interface IBackgroundTaskRegistrationGroup; + interface IBackgroundTaskRegistrationGroupFactory; + interface IBackgroundTaskRegistrationStatics; + interface IBackgroundTaskRegistrationStatics2; + interface IBackgroundTrigger; + + runtimeclass BackgroundTaskCompletedEventArgs; + runtimeclass BackgroundTaskDeferral; + runtimeclass BackgroundTaskProgressEventArgs; + runtimeclass BackgroundTaskRegistration; + runtimeclass BackgroundTaskRegistrationGroup; + + declare { + interface Windows.Foundation.Collections.IMapView<GUID, Windows.ApplicationModel.Background.BackgroundTaskRegistration *>; + interface Windows.Foundation.Collections.IMapView<GUID, Windows.ApplicationModel.Background.IBackgroundTaskRegistration *>; + interface Windows.Foundation.Collections.IMapView<HSTRING, Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup *>; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0) + ] + enum BackgroundTaskCancellationReason + { + Abort = 0, + Terminating = 1, + LoggingOff = 2, + ServicingUpdate = 3, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] IdleTask = 4, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] Uninstall = 5, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] ConditionLoss = 6, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] SystemPolicy = 7, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] QuietHoursEntered = 8, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] ExecutionTimeExceeded = 9, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] ResourceRevocation = 10, + [contract(Windows.Foundation.UniversalApiContract, 1.0)] EnergySaver = 11 + }; + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + uuid(a6c4bac0-51f8-4c57-ac3f-156dd1680c4f) + ] + delegate + HRESULT BackgroundTaskCanceledEventHandler([in] Windows.ApplicationModel.Background.IBackgroundTaskInstance *sender, [in] Windows.ApplicationModel.Background.BackgroundTaskCancellationReason reason); + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + uuid(5B38E929-A086-46A7-A678-439135822BCF) + ] + delegate + HRESULT BackgroundTaskCompletedEventHandler([in] Windows.ApplicationModel.Background.BackgroundTaskRegistration *sender, [in] Windows.ApplicationModel.Background.BackgroundTaskCompletedEventArgs *args); + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + uuid(46e0683c-8a88-4c99-804c-76897f6277a6) + ] + delegate + HRESULT BackgroundTaskProgressEventHandler([in] Windows.ApplicationModel.Background.BackgroundTaskRegistration *sender, [in] Windows.ApplicationModel.Background.BackgroundTaskProgressEventArgs *args); + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.ApplicationModel.Background.BackgroundTaskCompletedEventArgs), + uuid(565d25cf-f209-48f4-9967-2b184f7bfbf0) + ] + interface IBackgroundTaskCompletedEventArgs : IInspectable + { + [propget] HRESULT InstanceId([out, retval] GUID *value); + HRESULT CheckResult(); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.ApplicationModel.Background.BackgroundTaskDeferral), + uuid(93cc156d-af27-4dd3-846e-24ee40cadd25) + ] + interface IBackgroundTaskDeferral : IInspectable + { + HRESULT Complete(); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.ApplicationModel.Background.BackgroundTaskProgressEventArgs), + uuid(fb1468ac-8332-4d0a-9532-03eae684da31) + ] + interface IBackgroundTaskProgressEventArgs : IInspectable + { + [propget] HRESULT InstanceId([out, retval] GUID *value); + [propget] HRESULT Progress([out, retval] UINT32 *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + uuid(865bda7a-21d8-4573-8f32-928a1b0641f6) + ] + interface IBackgroundTaskInstance : IInspectable + { + [propget] HRESULT InstanceId([out, retval] GUID *value); + [propget] HRESULT Task([out, retval] Windows.ApplicationModel.Background.BackgroundTaskRegistration **task); + [propget] HRESULT Progress([out, retval] UINT32 *value); + [propput] HRESULT Progress([in] UINT32 value); + [propget] HRESULT TriggerDetails([out, retval] IInspectable **details); + [eventadd] HRESULT Canceled([in] Windows.ApplicationModel.Background.BackgroundTaskCanceledEventHandler *handler, [out, retval] EventRegistrationToken *cookie); + [eventremove] HRESULT Canceled([in] EventRegistrationToken cookie); + [propget] HRESULT SuspendedCount([out, retval] UINT32 *value); + HRESULT GetDeferral([out, retval] Windows.ApplicationModel.Background.BackgroundTaskDeferral **deferral); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + uuid(10654cc2-a26e-43bf-8c12-1fb40dbfbfa0) + ] + interface IBackgroundTaskRegistration : IInspectable + { + [propget] HRESULT TaskId([out, retval] GUID *value); + [propget] HRESULT Name([out, retval] HSTRING *value); + [eventadd] HRESULT Progress([in] Windows.ApplicationModel.Background.BackgroundTaskProgressEventHandler *handler, [out, retval] EventRegistrationToken *cookie); + [eventremove] HRESULT Progress([in] EventRegistrationToken cookie); + [eventadd] HRESULT Completed([in] Windows.ApplicationModel.Background.BackgroundTaskCompletedEventHandler *handler, [out, retval] EventRegistrationToken *cookie); + [eventremove] HRESULT Completed([in] EventRegistrationToken cookie); + HRESULT Unregister([in] boolean cancel_task); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + uuid(6138c703-bb86-4112-afc3-7f939b166e3b) + ] + interface IBackgroundTaskRegistration2 : IInspectable + requires Windows.ApplicationModel.Background.IBackgroundTaskRegistration + { + [propget] HRESULT Trigger([out, retval] Windows.ApplicationModel.Background.IBackgroundTrigger **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 4.0), + uuid(fe338195-9423-4d8b-830d-b1dd2c7badd5) + ] + interface IBackgroundTaskRegistration3 : IInspectable + requires Windows.ApplicationModel.Background.IBackgroundTaskRegistration + { + [propget] HRESULT TaskGroup([out, retval] Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 4.0), + exclusiveto(Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup), + uuid(2ab1919a-871b-4167-8a76-055cd67b5b23) + ] + interface IBackgroundTaskRegistrationGroup : IInspectable + { + [propget] HRESULT Id([out, retval] HSTRING *value); + [propget] HRESULT Name([out, retval] HSTRING *value); + [eventadd] HRESULT BackgroundActivated([in] Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup *, Windows.ApplicationModel.Activation.BackgroundActivatedEventArgs *> *handler, [out, retval] EventRegistrationToken *token); + [eventremove] HRESULT BackgroundActivated([in] EventRegistrationToken token); + [propget] HRESULT AllTasks([out, retval] Windows.Foundation.Collections.IMapView<GUID, Windows.ApplicationModel.Background.BackgroundTaskRegistration *> **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 4.0), + exclusiveto(Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup), + uuid(83d92b69-44cf-4631-9740-03c7d8741bc5) + ] + interface IBackgroundTaskRegistrationGroupFactory : IInspectable + { + HRESULT Create([in] HSTRING id, [out, retval] Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup **group); + HRESULT CreateWithName([in] HSTRING id, [in] HSTRING name, [out, retval] Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup **group); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.ApplicationModel.Background.BackgroundTaskRegistration), + uuid(4c542f69-b000-42ba-a093-6a563c65e3f8) + ] + interface IBackgroundTaskRegistrationStatics : IInspectable + { + [propget] HRESULT AllTasks([out, retval] Windows.Foundation.Collections.IMapView<GUID, Windows.ApplicationModel.Background.IBackgroundTaskRegistration *> **tasks); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 4.0), + exclusiveto(Windows.ApplicationModel.Background.BackgroundTaskRegistration), + uuid(174b671e-b20d-4fa9-ad9a-e93ad6c71e01) + ] + interface IBackgroundTaskRegistrationStatics2 : IInspectable + { + [propget] HRESULT AllTaskGroups([out, retval] Windows.Foundation.Collections.IMapView<HSTRING, Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup *> **value); + HRESULT GetTaskGroup([in] HSTRING groupId, [out, retval] Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup **value); + } + + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + uuid(84b3a058-6027-4b87-9790-bdf3f757dbd7) + ] + interface IBackgroundTrigger : IInspectable + { + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile), + threading(both) + ] + runtimeclass BackgroundTaskCompletedEventArgs + { + [default] interface Windows.ApplicationModel.Background.IBackgroundTaskCompletedEventArgs; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile), + threading(mta) + ] + runtimeclass BackgroundTaskDeferral + { + [default] interface Windows.ApplicationModel.Background.IBackgroundTaskDeferral; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile), + threading(both) + ] + runtimeclass BackgroundTaskProgressEventArgs + { + [default] interface Windows.ApplicationModel.Background.IBackgroundTaskProgressEventArgs; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile), + static(Windows.ApplicationModel.Background.IBackgroundTaskRegistrationStatics, Windows.Foundation.UniversalApiContract, 1.0), + static(Windows.ApplicationModel.Background.IBackgroundTaskRegistrationStatics2, Windows.Foundation.UniversalApiContract, 4.0), + threading(both) + ] + runtimeclass BackgroundTaskRegistration + { + [default] interface Windows.ApplicationModel.Background.IBackgroundTaskRegistration; + [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.ApplicationModel.Background.IBackgroundTaskRegistration2; + [contract(Windows.Foundation.UniversalApiContract, 4.0)] interface Windows.ApplicationModel.Background.IBackgroundTaskRegistration3; + } + + [ + activatable(Windows.ApplicationModel.Background.IBackgroundTaskRegistrationGroupFactory, Windows.Foundation.UniversalApiContract, 4.0), + contract(Windows.Foundation.UniversalApiContract, 4.0), + marshaling_behavior(agile), + threading(both) + ] + runtimeclass BackgroundTaskRegistrationGroup + { + [default] interface Windows.ApplicationModel.Background.IBackgroundTaskRegistrationGroup; + } +} diff --git a/include/windows.applicationmodel.core.idl b/include/windows.applicationmodel.core.idl index 7a4ea85c642..4d3504ede68 100644 --- a/include/windows.applicationmodel.core.idl +++ b/include/windows.applicationmodel.core.idl @@ -25,16 +25,99 @@ import "windows.foundation.idl"; import "windows.storage.idl"; import "windows.system.idl"; import "windows.applicationmodel.idl"; +import "windows.applicationmodel.activation.idl"; +import "windows.ui.core.idl"; #endif +namespace Windows.ApplicationModel.Core { + runtimeclass CoreApplicationView; +} + +namespace Windows.ApplicationModel.Activation { + interface IActivatedEventArgs; + + runtimeclass BackgroundActivatedEventArgs; + + declare { + interface Windows.Foundation.EventHandler<Windows.ApplicationModel.Activation.BackgroundActivatedEventArgs *>; + interface Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Core.CoreApplicationView *, Windows.ApplicationModel.Activation.IActivatedEventArgs *>; + } +} + namespace Windows.ApplicationModel { runtimeclass AppDisplayInfo; + runtimeclass EnteredBackgroundEventArgs; + runtimeclass LeavingBackgroundEventArgs; + runtimeclass SuspendingEventArgs; + + declare { + interface Windows.Foundation.EventHandler<Windows.ApplicationModel.EnteredBackgroundEventArgs *>; + interface Windows.Foundation.EventHandler<Windows.ApplicationModel.LeavingBackgroundEventArgs *>; + interface Windows.Foundation.EventHandler<Windows.ApplicationModel.SuspendingEventArgs *>; + } +} + +namespace Windows.Foundation { + interface IGetActivationFactory; +} + +namespace Windows.UI.Core { + runtimeclass CoreDispatcher; + runtimeclass CoreWindow; } namespace Windows.ApplicationModel.Core { + typedef enum AppRestartFailureReason AppRestartFailureReason; + interface IAppListEntry; + interface ICoreApplication; + interface ICoreApplication2; + interface ICoreApplication3; + interface ICoreApplicationExit; + interface ICoreApplicationUnhandledError; + interface ICoreApplicationUseCount; + interface ICoreApplicationView; + interface ICoreApplicationView2; + interface ICoreApplicationView3; + interface ICoreApplicationView5; + interface ICoreApplicationView6; + interface ICoreApplicationViewTitleBar; + interface ICoreImmersiveApplication; + interface ICoreImmersiveApplication2; + interface ICoreImmersiveApplication3; + interface IFrameworkView; + interface IFrameworkViewSource; + interface IHostedViewClosingEventArgs; + interface IUnhandledError; + interface IUnhandledErrorDetectedEventArgs; runtimeclass AppListEntry; + runtimeclass CoreApplication; + runtimeclass CoreApplicationView; + runtimeclass CoreApplicationViewTitleBar; + runtimeclass HostedViewClosingEventArgs; + runtimeclass UnhandledError; + runtimeclass UnhandledErrorDetectedEventArgs; + + declare { + interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.ApplicationModel.Core.AppRestartFailureReason>; + interface Windows.Foundation.Collections.IVectorView<Windows.ApplicationModel.Core.CoreApplicationView *>; + interface Windows.Foundation.EventHandler<Windows.ApplicationModel.Core.UnhandledErrorDetectedEventArgs *>; + interface Windows.Foundation.IAsyncOperation<Windows.ApplicationModel.Core.AppRestartFailureReason>; + interface Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Core.CoreApplicationView *, Windows.ApplicationModel.Core.HostedViewClosingEventArgs *>; + interface Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Core.CoreApplicationViewTitleBar *, IInspectable *>; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 5.0) + ] + enum AppRestartFailureReason + { + RestartPending = 0, + NotInForeground = 1, + InvalidUser = 2, + Other = 3 + }; [ contract(Windows.Foundation.UniversalApiContract, 1.0), @@ -47,6 +130,248 @@ namespace Windows.ApplicationModel.Core { HRESULT LaunchAsync([out, retval] Windows.Foundation.IAsyncOperation<boolean> **operation); } + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.ApplicationModel.Core.CoreApplication), + uuid(0aacf7a4-5e1d-49df-8034-fb6a68bc5ed1) + ] + interface ICoreApplication : IInspectable + { + [propget] HRESULT Id([out, retval] HSTRING *value); + [eventadd] HRESULT Suspending([in] Windows.Foundation.EventHandler<Windows.ApplicationModel.SuspendingEventArgs *> *handler, [out, retval] EventRegistrationToken *token); + [eventremove] HRESULT Suspending([in] EventRegistrationToken token); + [eventadd] HRESULT Resuming([in] Windows.Foundation.EventHandler<IInspectable *> *handler, [out, retval] EventRegistrationToken *token); + [eventremove] HRESULT Resuming([in] EventRegistrationToken token); + [propget] HRESULT Properties([out, retval] Windows.Foundation.Collections.IPropertySet **value); + HRESULT GetCurrentView([out, retval] Windows.ApplicationModel.Core.CoreApplicationView **value); + HRESULT Run([in] Windows.ApplicationModel.Core.IFrameworkViewSource *view_source); + HRESULT RunWithActivationFactories([in] Windows.Foundation.IGetActivationFactory *factory); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 3.0), + exclusiveto(Windows.ApplicationModel.Core.CoreApplication), + uuid(998681fb-1ab6-4b7f-be4a-9a0645224c04) + ] + interface ICoreApplication2 : IInspectable + { + [eventadd] HRESULT BackgroundActivated([in] Windows.Foundation.EventHandler<Windows.ApplicationModel.Activation.BackgroundActivatedEventArgs *> *handler, [out, retval] EventRegistrationToken *token); + [eventremove] HRESULT BackgroundActivated([in] EventRegistrationToken token); + [eventadd] HRESULT LeavingBackground([in] Windows.Foundation.EventHandler<Windows.ApplicationModel.LeavingBackgroundEventArgs *> *handler, [out, retval] EventRegistrationToken *token); + [eventremove] HRESULT LeavingBackground([in] EventRegistrationToken token); + [eventadd] HRESULT EnteredBackground([in] Windows.Foundation.EventHandler<Windows.ApplicationModel.EnteredBackgroundEventArgs *> *handler, [out, retval] EventRegistrationToken *token); + [eventremove] HRESULT EnteredBackground([in] EventRegistrationToken token); + HRESULT EnablePrelaunch([in] boolean value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 5.0), + exclusiveto(Windows.ApplicationModel.Core.CoreApplication), + uuid(feec0d39-598b-4507-8a67-772632580a57) + ] + interface ICoreApplication3 : IInspectable + { + HRESULT RequestRestartAsync([in] HSTRING launch_arguments, [out, retval] Windows.Foundation.IAsyncOperation<Windows.ApplicationModel.Core.AppRestartFailureReason> **operation); + HRESULT RequestRestartForUserAsync([in] Windows.System.User *user, [in] HSTRING launch_arguments, [out, retval] Windows.Foundation.IAsyncOperation<Windows.ApplicationModel.Core.AppRestartFailureReason> **operation); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.ApplicationModel.Core.CoreApplication), + uuid(cf86461d-261e-4b72-9acd-44ed2ace6a29) + ] + interface ICoreApplicationExit : IInspectable + { + HRESULT Exit(); + [eventadd] HRESULT Exiting([in] Windows.Foundation.EventHandler<IInspectable *> *handler, [out, retval] EventRegistrationToken *token); + [eventremove] HRESULT Exiting([in] EventRegistrationToken token); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + uuid(f0e24ab0-dd09-42e1-b0bc-e0e131f78d7e) + ] + interface ICoreApplicationUnhandledError : IInspectable + { + [eventadd] HRESULT UnhandledErrorDetected([in] Windows.Foundation.EventHandler<Windows.ApplicationModel.Core.UnhandledErrorDetectedEventArgs *> *handler, [out, retval] EventRegistrationToken *token); + [eventremove] HRESULT UnhandledErrorDetected([in] EventRegistrationToken token); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.ApplicationModel.Core.CoreApplication), + uuid(518dc408-c077-475b-809e-0bc0c57e4b74) + ] + interface ICoreApplicationUseCount : IInspectable + { + HRESULT IncrementApplicationUseCount(); + HRESULT DecrementApplicationUseCount(); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.ApplicationModel.Core.CoreApplicationView), + uuid(638bb2db-451d-4661-b099-414f34ffb9f1) + ] + interface ICoreApplicationView : IInspectable + { + [propget] HRESULT CoreWindow([out, retval] Windows.UI.Core.CoreWindow **value); + [eventadd] HRESULT Activated([in] Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Core.CoreApplicationView *, Windows.ApplicationModel.Activation.IActivatedEventArgs *> *handler, [out, retval] EventRegistrationToken *token); + [eventremove] HRESULT Activated([in] EventRegistrationToken token); + [propget] HRESULT IsMain([out, retval] boolean *value); + [propget] HRESULT IsHosted([out, retval] boolean *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.ApplicationModel.Core.CoreApplicationView), + uuid(68eb7adf-917f-48eb-9aeb-7de53e086ab1) + ] + interface ICoreApplicationView2 : IInspectable + { + [propget] HRESULT Dispatcher([out, retval] Windows.UI.Core.CoreDispatcher **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.ApplicationModel.Core.CoreApplicationView), + uuid(07ebe1b3-a4cf-4550-ab70-b07e85330bc8) + ] + interface ICoreApplicationView3 : IInspectable + { + [propget] HRESULT IsComponent([out, retval] boolean *value); + [propget] HRESULT TitleBar([out, retval] Windows.ApplicationModel.Core.CoreApplicationViewTitleBar **value); + [eventadd] HRESULT HostedViewClosing([in] Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Core.CoreApplicationView *, Windows.ApplicationModel.Core.HostedViewClosingEventArgs *> *handler, [out, retval] EventRegistrationToken *token); + [eventremove] HRESULT HostedViewClosing([in] EventRegistrationToken token); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 4.0), + exclusiveto(Windows.ApplicationModel.Core.CoreApplicationView), + uuid(2bc095a8-8ef0-446d-9e60-3a3e0428c671) + ] + interface ICoreApplicationView5 : IInspectable + { + [propget] HRESULT Properties([out, retval] Windows.Foundation.Collections.IPropertySet **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 5.0), + exclusiveto(Windows.ApplicationModel.Core.CoreApplicationView), + uuid(c119d49a-0679-49ba-803f-b79c5cf34cca) + ] + interface ICoreApplicationView6 : IInspectable + { + [propget] HRESULT DispatcherQueue([out, retval] Windows.System.DispatcherQueue **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.ApplicationModel.Core.CoreApplicationViewTitleBar), + uuid(006d35e3-e1f1-431b-9508-29b96926ac53) + ] + interface ICoreApplicationViewTitleBar : IInspectable + { + [propput] HRESULT ExtendViewIntoTitleBar([in] boolean value); + [propget] HRESULT ExtendViewIntoTitleBar([out, retval] boolean *value); + [propget] HRESULT SystemOverlayLeftInset([out, retval] DOUBLE *value); + [propget] HRESULT SystemOverlayRightInset([out, retval] DOUBLE *value); + [propget] HRESULT Height([out, retval] DOUBLE *value); + [eventadd] HRESULT LayoutMetricsChanged([in] Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Core.CoreApplicationViewTitleBar *, IInspectable *> *handler, [out, retval] EventRegistrationToken *token); + [eventremove] HRESULT LayoutMetricsChanged([in] EventRegistrationToken token); + [propget] HRESULT IsVisible([out, retval] boolean *value); + [eventadd] HRESULT IsVisibleChanged([in] Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Core.CoreApplicationViewTitleBar *, IInspectable *> *handler, [out, retval] EventRegistrationToken *token); + [eventremove] HRESULT IsVisibleChanged([in] EventRegistrationToken token); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.ApplicationModel.Core.CoreApplication), + uuid(1ada0e3e-e4a2-4123-b451-dc96bf800419) + ] + interface ICoreImmersiveApplication : IInspectable + { + [propget] HRESULT Views([out, retval] Windows.Foundation.Collections.IVectorView<Windows.ApplicationModel.Core.CoreApplicationView *> **value); + [overload("CreateNewView"), default_overload] + HRESULT CreateNewView([in] HSTRING runtime_type, [in] HSTRING entry_point, [out, retval] Windows.ApplicationModel.Core.CoreApplicationView **view); + [propget] HRESULT MainView([out, retval] Windows.ApplicationModel.Core.CoreApplicationView **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.ApplicationModel.Core.CoreApplication), + uuid(828e1e36-e9e3-4cfc-9b66-48b78ea9bb2c) + ] + interface ICoreImmersiveApplication2 : IInspectable + { + [overload("CreateNewView")] + HRESULT CreateNewViewFromMainView([out, retval] Windows.ApplicationModel.Core.CoreApplicationView **view); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.ApplicationModel.Core.CoreApplication), + uuid(34a05b2f-ee0d-41e5-8314-cf10c91bf0af) + ] + interface ICoreImmersiveApplication3 : IInspectable + { + [overload("CreateNewView")] + HRESULT CreateNewViewWithViewSource([in] Windows.ApplicationModel.Core.IFrameworkViewSource *view_source, [out, retval] Windows.ApplicationModel.Core.CoreApplicationView **view); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + uuid(faab5cd0-8924-45ac-ad0f-a08fae5d0324) + ] + interface IFrameworkView : IInspectable + { + HRESULT Initialize([in] Windows.ApplicationModel.Core.CoreApplicationView *application_view); + HRESULT SetWindow([in] Windows.UI.Core.CoreWindow *window); + HRESULT Load([in] HSTRING entry_point); + HRESULT Run(); + HRESULT Uninitialize(); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + uuid(cd770614-65c4-426c-9494-34fc43554862) + ] + interface IFrameworkViewSource : IInspectable + { + HRESULT CreateView([out, retval] Windows.ApplicationModel.Core.IFrameworkView **view); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.ApplicationModel.Core.HostedViewClosingEventArgs), + uuid(d238943c-b24e-4790-acb5-3e4243c4ff87) + ] + interface IHostedViewClosingEventArgs : IInspectable + { + HRESULT GetDeferral([out, retval] Windows.Foundation.Deferral **result); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.ApplicationModel.Core.UnhandledError), + uuid(9459b726-53b5-4686-9eaf-fa8162dc3980) + ] + interface IUnhandledError : IInspectable + { + [propget] HRESULT Handled([out, retval] boolean *value); + HRESULT Propagate(); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.ApplicationModel.Core.UnhandledErrorDetectedEventArgs), + uuid(679ab78b-b336-4822-ac40-0d750f0b7a2b) + ] + interface IUnhandledErrorDetectedEventArgs : IInspectable + { + [propget] HRESULT UnhandledError([out, retval] Windows.ApplicationModel.Core.UnhandledError **value); + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), marshaling_behavior(agile), @@ -59,4 +384,72 @@ namespace Windows.ApplicationModel.Core { [contract(Windows.Foundation.UniversalApiContract, 6.0)] interface Windows.ApplicationModel.Core.IAppListEntry3; [contract(Windows.Foundation.UniversalApiContract, 11.0)] interface Windows.ApplicationModel.Core.IAppListEntry4; } + +#ifndef _WINDOWS_APPLICATIONMODEL + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile), + static(Windows.ApplicationModel.Core.ICoreApplication, Windows.Foundation.UniversalApiContract, 1.0), + static(Windows.ApplicationModel.Core.ICoreApplication2, Windows.Foundation.UniversalApiContract, 3.0), + static(Windows.ApplicationModel.Core.ICoreApplication3, Windows.Foundation.UniversalApiContract, 5.0), + static(Windows.ApplicationModel.Core.ICoreApplicationExit, Windows.Foundation.UniversalApiContract, 1.0), + static(Windows.ApplicationModel.Core.ICoreApplicationUnhandledError, Windows.Foundation.UniversalApiContract, 1.0), + static(Windows.ApplicationModel.Core.ICoreApplicationUseCount, Windows.Foundation.UniversalApiContract, 1.0), + static(Windows.ApplicationModel.Core.ICoreImmersiveApplication, Windows.Foundation.UniversalApiContract, 1.0), + static(Windows.ApplicationModel.Core.ICoreImmersiveApplication2, Windows.Foundation.UniversalApiContract, 1.0), + static(Windows.ApplicationModel.Core.ICoreImmersiveApplication3, Windows.Foundation.UniversalApiContract, 1.0) + ] + runtimeclass CoreApplication + { + } +#endif + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(standard) + ] + runtimeclass CoreApplicationView + { + [default] interface Windows.ApplicationModel.Core.ICoreApplicationView; + [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.ApplicationModel.Core.ICoreApplicationView2; + [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.ApplicationModel.Core.ICoreApplicationView3; + [contract(Windows.Foundation.UniversalApiContract, 4.0)] interface Windows.ApplicationModel.Core.ICoreApplicationView5; + [contract(Windows.Foundation.UniversalApiContract, 5.0)] interface Windows.ApplicationModel.Core.ICoreApplicationView6; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(standard) + ] + runtimeclass CoreApplicationViewTitleBar + { + [default] interface Windows.ApplicationModel.Core.ICoreApplicationViewTitleBar; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile) + ] + runtimeclass HostedViewClosingEventArgs + { + [default] interface Windows.ApplicationModel.Core.IHostedViewClosingEventArgs; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile) + ] + runtimeclass UnhandledError + { + [default] interface Windows.ApplicationModel.Core.IUnhandledError; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile) + ] + runtimeclass UnhandledErrorDetectedEventArgs + { + [default] interface Windows.ApplicationModel.Core.IUnhandledErrorDetectedEventArgs; + } } diff --git a/include/windows.applicationmodel.idl b/include/windows.applicationmodel.idl index dfb22d5c371..3d6f4c60d0f 100644 --- a/include/windows.applicationmodel.idl +++ b/include/windows.applicationmodel.idl @@ -24,6 +24,7 @@ import "windows.foundation.idl"; import "windows.storage.idl"; import "windows.system.idl"; +import "windows.applicationmodel.activation.idl"; import "windows.applicationmodel.core.idl"; #endif @@ -35,6 +36,8 @@ namespace Windows.ApplicationModel { typedef struct PackageVersion PackageVersion; interface IAppDisplayInfo; + interface IEnteredBackgroundEventArgs; + interface ILeavingBackgroundEventArgs; interface IPackage; interface IPackage2; interface IPackage3; @@ -42,17 +45,28 @@ namespace Windows.ApplicationModel { interface IPackageId; interface IPackageIdWithMetadata; interface IPackageStatics; + interface ISuspendingDeferral; + interface ISuspendingEventArgs; + interface ISuspendingOperation; runtimeclass AppDisplayInfo; + runtimeclass EnteredBackgroundEventArgs; + runtimeclass LeavingBackgroundEventArgs; runtimeclass Package; runtimeclass PackageId; runtimeclass PackageStatus; + runtimeclass SuspendingDeferral; + runtimeclass SuspendingEventArgs; + runtimeclass SuspendingOperation; declare { interface Windows.Foundation.Collections.IIterable<Windows.ApplicationModel.Package *>; interface Windows.Foundation.Collections.IIterator<Windows.ApplicationModel.Package *>; interface Windows.Foundation.Collections.IVectorView<Windows.ApplicationModel.Package *>; interface Windows.Foundation.Collections.IVectorView<Windows.ApplicationModel.Core.AppListEntry *>; + interface Windows.Foundation.EventHandler<Windows.ApplicationModel.EnteredBackgroundEventArgs *>; + interface Windows.Foundation.EventHandler<Windows.ApplicationModel.LeavingBackgroundEventArgs *>; + interface Windows.Foundation.EventHandler<Windows.ApplicationModel.SuspendingEventArgs *>; interface Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.ApplicationModel.Core.AppListEntry *> *>; interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Foundation.Collections.IVectorView<Windows.ApplicationModel.Core.AppListEntry *> *>; } @@ -80,6 +94,24 @@ namespace Windows.ApplicationModel { HRESULT GetLogo([in] Windows.Foundation.Size size, [out, retval] Windows.Storage.Streams.RandomAccessStreamReference **value); } + [ + contract(Windows.Foundation.UniversalApiContract, 3.0), + uuid(f722dcc2-9827-403d-aaed-ecca9ac17398) + ] + interface IEnteredBackgroundEventArgs : IInspectable + { + HRESULT GetDeferral([out] [retval] Windows.Foundation.Deferral **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 3.0), + uuid(39c6ec9a-ae6e-46f9-a07a-cfc23f88733e) + ] + interface ILeavingBackgroundEventArgs : IInspectable + { + HRESULT GetDeferral([out] [retval] Windows.Foundation.Deferral **value); + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), exclusiveto(Windows.ApplicationModel.Package), @@ -180,6 +212,34 @@ namespace Windows.ApplicationModel { [propget] HRESULT Current([out, retval] Windows.ApplicationModel.Package **value); } + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + uuid(59140509-8bc9-4eb4-b636-dabdc4f46f66) + ] + interface ISuspendingDeferral : IInspectable + { + HRESULT Complete(); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + uuid(96061c05-2dba-4d08-b0bd-2b30a131c6aa) + ] + interface ISuspendingEventArgs : IInspectable + { + [propget] HRESULT SuspendingOperation([out, retval] Windows.ApplicationModel.SuspendingOperation **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + uuid(9da4ca41-20e1-4e9b-9f65-a9f435340c3a) + ] + interface ISuspendingOperation : IInspectable + { + HRESULT GetDeferral([out, retval] Windows.ApplicationModel.SuspendingDeferral **deferral); + [propget] HRESULT Deadline([out, retval] Windows.Foundation.DateTime *value); + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), marshaling_behavior(agile), @@ -190,6 +250,24 @@ namespace Windows.ApplicationModel { [default] interface Windows.ApplicationModel.IAppDisplayInfo; } + [ + contract(Windows.Foundation.UniversalApiContract, 3.0), + marshaling_behavior(agile) + ] + runtimeclass EnteredBackgroundEventArgs + { + [default] interface Windows.ApplicationModel.IEnteredBackgroundEventArgs; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 3.0), + marshaling_behavior(agile) + ] + runtimeclass LeavingBackgroundEventArgs + { + [default] interface Windows.ApplicationModel.ILeavingBackgroundEventArgs; + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), marshaling_behavior(agile), @@ -228,4 +306,31 @@ namespace Windows.ApplicationModel { [default] interface Windows.ApplicationModel.IPackageId; [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.ApplicationModel.IPackageIdWithMetadata; } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile) + ] + runtimeclass SuspendingDeferral + { + [default] interface Windows.ApplicationModel.ISuspendingDeferral; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile) + ] + runtimeclass SuspendingEventArgs + { + [default] interface Windows.ApplicationModel.ISuspendingEventArgs; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile) + ] + runtimeclass SuspendingOperation + { + [default] interface Windows.ApplicationModel.ISuspendingOperation; + } } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/5916
Hi, It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated. The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=146513 Your paranoid android. === debian11 (build log) === ../wine/include/windows.ui.core.idl:330:64: error: type 'VirtualKey' not found in System namespace ../wine/include/windows.ui.core.idl:330:64: error: type 'VirtualKey' not found in System namespace ../wine/include/windows.ui.core.idl:330:64: error: type 'VirtualKey' not found in System namespace ../wine/include/windows.ui.core.idl:330:64: error: type 'VirtualKey' not found in System namespace ../wine/include/windows.ui.core.idl:330:64: error: type 'VirtualKey' not found in System namespace ../wine/include/windows.ui.core.idl:330:64: error: type 'VirtualKey' not found in System namespace ../wine/include/windows.ui.core.idl:330:64: error: type 'VirtualKey' not found in System namespace ../wine/include/windows.ui.core.idl:330:64: error: type 'VirtualKey' not found in System namespace Task: The win32 Wine build failed === debian11b (build log) === ../wine/include/windows.ui.core.idl:330:64: error: type 'VirtualKey' not found in System namespace ../wine/include/windows.ui.core.idl:330:64: error: type 'VirtualKey' not found in System namespace ../wine/include/windows.ui.core.idl:330:64: error: type 'VirtualKey' not found in System namespace ../wine/include/windows.ui.core.idl:330:64: error: type 'VirtualKey' not found in System namespace ../wine/include/windows.ui.core.idl:330:64: error: type 'VirtualKey' not found in System namespace ../wine/include/windows.ui.core.idl:330:64: error: type 'VirtualKey' not found in System namespace ../wine/include/windows.ui.core.idl:330:64: error: type 'VirtualKey' not found in System namespace ../wine/include/windows.ui.core.idl:330:64: error: type 'VirtualKey' not found in System namespace Task: The wow64 Wine build failed
From: Zhiyi Zhang <zzhang(a)codeweavers.com> --- include/Makefile.in | 1 + include/windows.ui.input.idl | 172 +++++++++++++++++++++++++++++++++++ 2 files changed, 173 insertions(+) create mode 100644 include/windows.ui.input.idl diff --git a/include/Makefile.in b/include/Makefile.in index f4badf9c8b0..390b41dfa4d 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -887,6 +887,7 @@ SOURCES = \ windows.ui.composition.interop.idl \ windows.ui.core.idl \ windows.ui.idl \ + windows.ui.input.idl \ windows.ui.viewmanagement.idl \ windows.ui.xaml.hosting.desktopwindowxamlsource.idl \ windowscontracts.idl \ diff --git a/include/windows.ui.input.idl b/include/windows.ui.input.idl new file mode 100644 index 00000000000..f160671f232 --- /dev/null +++ b/include/windows.ui.input.idl @@ -0,0 +1,172 @@ +/* + * Copyright (C) 2024 Zhiyi Zhang for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifdef __WIDL__ +#pragma winrt ns_prefix +#endif + +#ifndef DO_NO_IMPORTS +import "inspectable.idl"; +import "asyncinfo.idl"; +import "eventtoken.idl"; +import "windowscontracts.idl"; +import "windows.foundation.idl"; +import "windows.devices.input.idl"; +import "windows.system.idl"; +import "windows.ui.core.idl"; +#endif + +namespace Windows.UI.Input { + typedef enum PointerUpdateKind PointerUpdateKind; + + interface IPointerPoint; + interface IPointerPointProperties; + interface IPointerPointProperties2; + interface IPointerPointStatics; + interface IPointerPointTransform; + + runtimeclass PointerPoint; + runtimeclass PointerPointProperties; + + declare { + interface Windows.Foundation.Collections.IVectorView<Windows.UI.Input.PointerPoint *>; + interface Windows.Foundation.Collections.IVector<Windows.UI.Input.PointerPoint *>; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0) + ] + enum PointerUpdateKind + { + Other = 0, + LeftButtonPressed = 1, + LeftButtonReleased = 2, + RightButtonPressed = 3, + RightButtonReleased = 4, + MiddleButtonPressed = 5, + MiddleButtonReleased = 6, + XButton1Pressed = 7, + XButton1Released = 8, + XButton2Pressed = 9, + XButton2Released = 10 + }; + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.UI.Input.PointerPoint), + uuid(e995317d-7296-42d9-8233-c5be73b74a4a) + ] + interface IPointerPoint : IInspectable + { + [propget] HRESULT PointerDevice([out, retval] Windows.Devices.Input.PointerDevice **value); + [propget] HRESULT Position([out, retval] Windows.Foundation.Point *value); + [propget] HRESULT RawPosition([out, retval] Windows.Foundation.Point *value); + [propget] HRESULT pointer_id([out, retval] UINT32 *value); + [propget] HRESULT FrameId([out, retval] UINT32 *value); + [propget] HRESULT Timestamp([out, retval] UINT64 *value); + [propget] HRESULT IsInContact([out, retval] boolean *value); + [propget] HRESULT Properties([out, retval] Windows.UI.Input.PointerPointProperties **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.UI.Input.PointerPointProperties), + uuid(c79d8a4b-c163-4ee7-803f-67ce79f9972d) + ] + interface IPointerPointProperties : IInspectable + { + [propget] HRESULT Pressure([out, retval] FLOAT *value); + [propget] HRESULT IsInverted([out, retval] boolean *value); + [propget] HRESULT IsEraser([out, retval] boolean *value); + [propget] HRESULT Orientation([out, retval] FLOAT *value); + [propget] HRESULT XTilt([out, retval] FLOAT *value); + [propget] HRESULT YTilt([out, retval] FLOAT *value); + [propget] HRESULT Twist([out, retval] FLOAT *value); + [propget] HRESULT ContactRect([out, retval] Windows.Foundation.Rect *value); + [propget] HRESULT ContactRectRaw([out, retval] Windows.Foundation.Rect *value); + [propget] HRESULT TouchConfidence([out, retval] boolean *value); + [propget] HRESULT IsLeftButtonPressed([out, retval] boolean *value); + [propget] HRESULT IsRightButtonPressed([out, retval] boolean *value); + [propget] HRESULT IsMiddleButtonPressed([out, retval] boolean *value); + [propget] HRESULT MouseWheelDelta([out, retval] INT32 *value); + [propget] HRESULT IsHorizontalMouseWheel([out, retval] boolean *value); + [propget] HRESULT IsPrimary([out, retval] boolean *value); + [propget] HRESULT IsInRange([out, retval] boolean *value); + [propget] HRESULT IsCanceled([out, retval] boolean *value); + [propget] HRESULT IsBarrelButtonPressed([out, retval] boolean *value); + [propget] HRESULT IsXButton1Pressed([out, retval] boolean *value); + [propget] HRESULT IsXButton2Pressed([out, retval] boolean *value); + [propget] HRESULT PointerUpdateKind([out, retval] Windows.UI.Input.PointerUpdateKind *value); + HRESULT HasUsage([in] UINT32 usage_page, [in] UINT32 usage_id, [out, retval] boolean *value); + HRESULT GetUsageValue([in] UINT32 usage_page, [in] UINT32 usage_id, [out, retval] INT32 *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.UI.Input.PointerPointProperties), + uuid(22c3433a-c83b-41c0-a296-5e232d64d6af) + ] + interface IPointerPointProperties2 : IInspectable + { + [propget] HRESULT ZDistance([out, retval] Windows.Foundation.IReference<FLOAT> **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.UI.Input.PointerPoint), + uuid(a506638d-2a1a-413e-bc75-9f38381cc069) + ] + interface IPointerPointStatics : IInspectable + { + [overload("GetCurrentPoint")] HRESULT GetCurrentPoint([in] UINT32 pointer_id, [out, retval] Windows.UI.Input.PointerPoint **point); + [overload("GetIntermediatePoints")] HRESULT GetIntermediatePoints([in] UINT32 pointer_id, [out, retval] Windows.Foundation.Collections.IVector<Windows.UI.Input.PointerPoint *> **points); + [overload("GetCurrentPoint")] HRESULT GetCurrentPointTransformed([in] UINT32 pointer_id, [in] Windows.UI.Input.IPointerPointTransform *transform, [out, retval] Windows.UI.Input.PointerPoint **point); + [overload("GetIntermediatePoints")] HRESULT GetIntermediatePointsTransformed([in] UINT32 pointer_id, [in] Windows.UI.Input.IPointerPointTransform *transform, [out, retval] Windows.Foundation.Collections.IVector<Windows.UI.Input.PointerPoint *> **points); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + uuid(4d5fe14f-b87c-4028-bc9c-59e9947fb056) + ] + interface IPointerPointTransform : IInspectable + { + [propget] HRESULT Inverse([out, retval] Windows.UI.Input.IPointerPointTransform **value); + HRESULT TryTransform([in] Windows.Foundation.Point in_point, [out] Windows.Foundation.Point *out_point, [out, retval] boolean *value); + HRESULT TransformBounds([in] Windows.Foundation.Rect rect, [out, retval] Windows.Foundation.Rect *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(none), + static(Windows.UI.Input.IPointerPointStatics, Windows.Foundation.UniversalApiContract, 1.0) + ] + runtimeclass PointerPoint + { + [default] interface Windows.UI.Input.IPointerPoint; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(none) + ] + runtimeclass PointerPointProperties + { + [default] interface Windows.UI.Input.IPointerPointProperties; + [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.UI.Input.IPointerPointProperties2; + } +} -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/5916
From: Zhiyi Zhang <zzhang(a)codeweavers.com> --- include/windows.ui.core.idl | 569 +++++++++++++++++++++++++++++++++++- 1 file changed, 568 insertions(+), 1 deletion(-) diff --git a/include/windows.ui.core.idl b/include/windows.ui.core.idl index aa6d4b1f040..d6bbf7ee9fb 100644 --- a/include/windows.ui.core.idl +++ b/include/windows.ui.core.idl @@ -28,24 +28,113 @@ import "windows.foundation.idl"; import "windows.system.idl"; import "windows.ui.idl"; /* import "windows.ui.composition.idl"; */ -/* import "windows.ui.input.idl"; */ +import "windows.ui.input.idl"; /* import "windows.ui.input.inking.idl"; */ /* import "windows.ui.input.inking.core.idl"; */ /* import "windows.ui.popups.idl"; */ +namespace Windows.UI.Input { + runtimeclass PointerPoint; + + declare { + interface Windows.Foundation.Collections.IVectorView<Windows.UI.Input.PointerPoint *>; + interface Windows.Foundation.Collections.IVector<Windows.UI.Input.PointerPoint *>; + } +} + namespace Windows.UI.Core { + typedef enum CoreCursorType CoreCursorType; typedef enum CoreDispatcherPriority CoreDispatcherPriority; typedef enum CoreProcessEventsOption CoreProcessEventsOption; + typedef enum CoreVirtualKeyStates CoreVirtualKeyStates; + typedef enum CoreWindowActivationMode CoreWindowActivationMode; + typedef enum CoreWindowActivationState CoreWindowActivationState; + typedef enum CoreWindowFlowDirection CoreWindowFlowDirection; + typedef struct CorePhysicalKeyStatus CorePhysicalKeyStatus; + typedef struct CoreProximityEvaluation CoreProximityEvaluation; + interface IAutomationProviderRequestedEventArgs; + interface ICharacterReceivedEventArgs; + interface IClosestInteractiveBoundsRequestedEventArgs; interface ICoreAcceleratorKeys; + interface ICoreCursor; + interface ICoreCursorFactory; interface ICoreDispatcher; interface ICoreDispatcher2; interface ICoreDispatcherWithTaskPriority; + interface ICoreWindow; + interface ICoreWindow2; + interface ICoreWindow3; + interface ICoreWindow4; + interface ICoreWindow5; + interface ICoreWindowEventArgs; + interface ICoreWindowStatic; interface IIdleDispatchedHandlerArgs; + interface IInputEnabledEventArgs; + interface IKeyEventArgs; + interface IKeyEventArgs2; + interface IPointerEventArgs; + interface ITouchHitTestingEventArgs; + interface IVisibilityChangedEventArgs; + interface IWindowActivatedEventArgs; + interface IWindowSizeChangedEventArgs; + runtimeclass AutomationProviderRequestedEventArgs; runtimeclass AcceleratorKeyEventArgs; + runtimeclass CharacterReceivedEventArgs; + runtimeclass ClosestInteractiveBoundsRequestedEventArgs; + runtimeclass CoreCursor; runtimeclass CoreDispatcher; + runtimeclass CoreWindow; + runtimeclass CoreWindowEventArgs; runtimeclass IdleDispatchedHandlerArgs; + runtimeclass InputEnabledEventArgs; + runtimeclass KeyEventArgs; + runtimeclass PointerEventArgs; + runtimeclass TouchHitTestingEventArgs; + runtimeclass VisibilityChangedEventArgs; + runtimeclass WindowActivatedEventArgs; + runtimeclass WindowSizeChangedEventArgs; + + declare { + interface Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, IInspectable *>; + interface Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.AutomationProviderRequestedEventArgs *>; + interface Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.CharacterReceivedEventArgs *>; + interface Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.ClosestInteractiveBoundsRequestedEventArgs *>; + interface Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.CoreWindowEventArgs *>; + interface Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.InputEnabledEventArgs *>; + interface Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.KeyEventArgs *>; + interface Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.PointerEventArgs *>; + interface Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.TouchHitTestingEventArgs *>; + interface Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.VisibilityChangedEventArgs *>; + interface Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.WindowActivatedEventArgs *>; + interface Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.WindowSizeChangedEventArgs *>; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0) + ] + enum CoreCursorType + { + Arrow = 0, + Cross = 1, + Custom = 2, + Hand = 3, + Help = 4, + IBeam = 5, + SizeAll = 6, + SizeNortheastSouthwest = 7, + SizeNorthSouth = 8, + SizeNorthwestSoutheast = 9, + SizeWestEast = 10, + UniversalNo = 11, + UpArrow = 12, + Wait = 13, + [contract(Windows.Foundation.UniversalApiContract, 5.0)] + Pin = 14, + [contract(Windows.Foundation.UniversalApiContract, 5.0)] + Person = 15 + }; [ contract(Windows.Foundation.UniversalApiContract, 1.0) @@ -70,6 +159,69 @@ namespace Windows.UI.Core { ProcessAllIfPresent = 3, }; + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + flags + ] + enum CoreVirtualKeyStates + { + None = 0x0, + Down = 0x1, + Locked = 0x2 + }; + + [ + contract(Windows.Foundation.UniversalApiContract, 5.0) + ] + enum CoreWindowActivationMode + { + None = 0, + Deactivated = 1, + ActivatedNotForeground = 2, + ActivatedInForeground = 3 + }; + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0) + ] + enum CoreWindowActivationState + { + CodeActivated = 0, + Deactivated = 1, + PointerActivated = 2 + }; + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0) + ] + enum CoreWindowFlowDirection + { + LeftToRight = 0, + RightToLeft = 1 + }; + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0) + ] + struct CorePhysicalKeyStatus + { + UINT32 RepeatCount; + UINT32 ScanCode; + boolean IsExtendedKey; + boolean IsMenuKeyDown; + boolean WasKeyDown; + boolean IsKeyReleased; + }; + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0) + ] + struct CoreProximityEvaluation + { + INT32 Score; + Windows.Foundation.Point AdjustedPoint; + }; + [ contract(Windows.Foundation.UniversalApiContract, 1.0), uuid(d1f276c4-98d8-4636-bf49-eb79507548e9) @@ -82,6 +234,64 @@ namespace Windows.UI.Core { ] delegate HRESULT IdleDispatchedHandler([in] Windows.UI.Core.IdleDispatchedHandlerArgs *e); + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.UI.Core.AutomationProviderRequestedEventArgs), + uuid(961ff258-21bf-4b42-a298-fa479d4c52e2) + ] + interface IAutomationProviderRequestedEventArgs : IInspectable + requires Windows.UI.Core.ICoreWindowEventArgs + { + [propget] HRESULT AutomationProvider([out, retval] IInspectable **value); + [propput] HRESULT AutomationProvider([in] IInspectable *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.UI.Core.CharacterReceivedEventArgs), + uuid(c584659f-99b2-4bcc-bd33-04e63f42902e) + ] + interface ICharacterReceivedEventArgs : IInspectable + requires Windows.UI.Core.ICoreWindowEventArgs + { + [propget] HRESULT KeyCode([out, retval] UINT32 *value); + [propget] HRESULT KeyStatus([out, retval] Windows.UI.Core.CorePhysicalKeyStatus *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 3.0), + exclusiveto(Windows.UI.Core.ClosestInteractiveBoundsRequestedEventArgs), + uuid(347c11d7-f6f8-40e3-b29f-ae50d3e86486) + ] + interface IClosestInteractiveBoundsRequestedEventArgs : IInspectable + { + [propget] HRESULT PointerPosition([out, retval] Windows.Foundation.Point *value); + [propget] HRESULT SearchBounds([out, retval] Windows.Foundation.Rect *value); + [propget] HRESULT ClosestInteractiveBounds([out, retval] Windows.Foundation.Rect *value); + [propput] HRESULT ClosestInteractiveBounds([in] Windows.Foundation.Rect value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.UI.Core.CoreCursor), + uuid(96893acf-111d-442c-8a77-b87992f8e2d6) + ] + interface ICoreCursor : IInspectable + { + [propget] HRESULT Id([out, retval] UINT32 *value); + [propget] HRESULT Type([out, retval] Windows.UI.Core.CoreCursorType *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.UI.Core.CoreCursor), + uuid(f6359621-a79d-4ed3-8c32-a9ef9d6b76a4) + ] + interface ICoreCursorFactory : IInspectable + { + HRESULT CreateCursor([in] Windows.UI.Core.CoreCursorType type, [in] UINT32 id, [out, retval] Windows.UI.Core.CoreCursor **cursor); + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), exclusiveto(Windows.UI.Core.CoreDispatcher), @@ -97,6 +307,132 @@ namespace Windows.UI.Core { HRESULT RunIdleAsync([in] Windows.UI.Core.IdleDispatchedHandler *callback, [out, retval] Windows.Foundation.IAsyncAction **action); } + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + uuid(79b9d5f2-879e-4b89-b798-79e47598030c) + ] + interface ICoreWindow : IInspectable + { + [propget] HRESULT AutomationHostProvider([out, retval] IInspectable **value); + [propget] HRESULT Bounds([out, retval] Windows.Foundation.Rect *value); + [propget] HRESULT CustomProperties([out, retval] Windows.Foundation.Collections.IPropertySet **value); + [propget] HRESULT Dispatcher([out, retval] Windows.UI.Core.CoreDispatcher **value); + [propget] HRESULT FlowDirection([out, retval] Windows.UI.Core.CoreWindowFlowDirection *value); + [propput] HRESULT FlowDirection([in] Windows.UI.Core.CoreWindowFlowDirection value); + [propget] HRESULT IsInputEnabled([out, retval] boolean *value); + [propput] HRESULT IsInputEnabled([in] boolean value); + [propget] HRESULT PointerCursor([out, retval] Windows.UI.Core.CoreCursor **value); + [propput] HRESULT PointerCursor([in] Windows.UI.Core.CoreCursor *value); + [propget] HRESULT PointerPosition([out, retval] Windows.Foundation.Point *value); + [propget] HRESULT Visible([out, retval] boolean *value); + HRESULT Activate(); + HRESULT Close(); + HRESULT GetAsyncKeyState([in] Windows.System.VirtualKey key, [out, retval] Windows.UI.Core.CoreVirtualKeyStates *state); + HRESULT GetKeyState([in] Windows.System.VirtualKey key, [out, retval] Windows.UI.Core.CoreVirtualKeyStates *state); + HRESULT ReleasePointerCapture(); + HRESULT SetPointerCapture(); + [eventadd] HRESULT Activated([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.WindowActivatedEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie); + [eventremove] HRESULT Activated([in] EventRegistrationToken cookie); + [eventadd] HRESULT AutomationProviderRequested([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.AutomationProviderRequestedEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie); + [eventremove] HRESULT AutomationProviderRequested([in] EventRegistrationToken cookie); + [eventadd] HRESULT CharacterReceived([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.CharacterReceivedEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie); + [eventremove] HRESULT CharacterReceived([in] EventRegistrationToken cookie); + [eventadd] HRESULT Closed([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.CoreWindowEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie); + [eventremove] HRESULT Closed([in] EventRegistrationToken cookie); + [eventadd] HRESULT InputEnabled([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.InputEnabledEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie); + [eventremove] HRESULT InputEnabled([in] EventRegistrationToken cookie); + [eventadd] HRESULT KeyDown([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.KeyEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie); + [eventremove] HRESULT KeyDown([in] EventRegistrationToken cookie); + [eventadd] HRESULT KeyUp([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.KeyEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie); + [eventremove] HRESULT KeyUp([in] EventRegistrationToken cookie); + [eventadd] HRESULT PointerCaptureLost([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.PointerEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie); + [eventremove] HRESULT PointerCaptureLost([in] EventRegistrationToken cookie); + [eventadd] HRESULT PointerEntered([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.PointerEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie); + [eventremove] HRESULT PointerEntered([in] EventRegistrationToken cookie); + [eventadd] HRESULT PointerExited([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.PointerEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie); + [eventremove] HRESULT PointerExited([in] EventRegistrationToken cookie); + [eventadd] HRESULT PointerMoved([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.PointerEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie); + [eventremove] HRESULT PointerMoved([in] EventRegistrationToken cookie); + [eventadd] HRESULT PointerPressed([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.PointerEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie); + [eventremove] HRESULT PointerPressed([in] EventRegistrationToken cookie); + [eventadd] HRESULT PointerReleased([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.PointerEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie); + [eventremove] HRESULT PointerReleased([in] EventRegistrationToken cookie); + [eventadd] HRESULT TouchHitTesting([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.TouchHitTestingEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie); + [eventremove] HRESULT TouchHitTesting([in] EventRegistrationToken cookie); + [eventadd] HRESULT PointerWheelChanged([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.PointerEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie); + [eventremove] HRESULT PointerWheelChanged([in] EventRegistrationToken cookie); + [eventadd] HRESULT SizeChanged([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.WindowSizeChangedEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie); + [eventremove] HRESULT SizeChanged([in] EventRegistrationToken cookie); + [eventadd] HRESULT VisibilityChanged([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.VisibilityChangedEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie); + [eventremove] HRESULT VisibilityChanged([in] EventRegistrationToken cookie); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.UI.Core.CoreWindow), + uuid(7c2b1b85-6917-4361-9c02-0d9e3a420b95) + ] + interface ICoreWindow2 : IInspectable + { + [propput] HRESULT PointerPosition([in] Windows.Foundation.Point value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 3.0), + exclusiveto(Windows.UI.Core.CoreWindow), + uuid(32c20dd8-faef-4375-a2ab-32640e4815c7) + ] + interface ICoreWindow3 : IInspectable + { + [eventadd] HRESULT ClosestInteractiveBoundsRequested([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.ClosestInteractiveBoundsRequestedEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie); + [eventremove] HRESULT ClosestInteractiveBoundsRequested([in] EventRegistrationToken cookie); + HRESULT GetCurrentKeyEventDeviceId([out, retval] HSTRING *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 4.0), + exclusiveto(Windows.UI.Core.CoreWindow), + uuid(35caf0d0-47f0-436c-af97-0dd88f6f5f02) + ] + interface ICoreWindow4 : IInspectable + { + [eventadd] HRESULT ResizeStarted([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, IInspectable *> *handler, [out, retval] EventRegistrationToken *cookie); + [eventremove] HRESULT ResizeStarted([in] EventRegistrationToken cookie); + [eventadd] HRESULT ResizeCompleted([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, IInspectable *> *handler, [out, retval] EventRegistrationToken *cookie); + [eventremove] HRESULT ResizeCompleted([in] EventRegistrationToken cookie); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 5.0), + exclusiveto(Windows.UI.Core.CoreWindow), + uuid(4b4ae1e1-2e6d-4eaa-bda1-1c5cc1bee141) + ] + interface ICoreWindow5 : IInspectable + { + [propget] HRESULT DispatcherQueue([out, retval] Windows.System.DispatcherQueue **value); + [propget] HRESULT ActivationMode([out, retval] Windows.UI.Core.CoreWindowActivationMode *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + uuid(272b1ef3-c633-4da5-a26c-c6d0f56b29da) + ] + interface ICoreWindowEventArgs : IInspectable + { + [propget] HRESULT Handled([out, retval] boolean *value); + [propput] HRESULT Handled([in] boolean value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.UI.Core.CoreWindow), + uuid(4d239005-3c2a-41b1-9022-536bb9cf93b1) + ] + interface ICoreWindowStatic : IInspectable + { + HRESULT GetForCurrentThread([out, retval] Windows.UI.Core.CoreWindow **windows); + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), exclusiveto(Windows.UI.Core.IdleDispatchedHandlerArgs), @@ -107,6 +443,141 @@ namespace Windows.UI.Core { [propget] HRESULT IsDispatcherIdle([out, retval] boolean *value); } + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.UI.Core.InputEnabledEventArgs), + uuid(80371d4f-2fd8-4c24-aa86-3163a87b4e5a) + ] + interface IInputEnabledEventArgs : IInspectable + requires Windows.UI.Core.ICoreWindowEventArgs + { + [propget] HRESULT InputEnabled([out, retval] boolean *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.UI.Core.KeyEventArgs), + uuid(5ff5e930-2544-4a17-bd78-1f2fdebb106b) + ] + interface IKeyEventArgs : IInspectable + requires Windows.UI.Core.ICoreWindowEventArgs + { + [propget] HRESULT VirtualKey([out, retval] Windows.System.VirtualKey *value); + [propget] HRESULT KeyStatus([out, retval] Windows.UI.Core.CorePhysicalKeyStatus *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 3.0), + exclusiveto(Windows.UI.Core.KeyEventArgs), + uuid(583add98-0790-4571-9b12-645ef9d79e42) + ] + interface IKeyEventArgs2 : IInspectable + requires Windows.UI.Core.ICoreWindowEventArgs + { + [propget] HRESULT DeviceId([out, retval] HSTRING *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.UI.Core.PointerEventArgs), + uuid(920d9cb1-a5fc-4a21-8c09-49dfe6ffe25f) + ] + interface IPointerEventArgs : IInspectable + requires Windows.UI.Core.ICoreWindowEventArgs + { + [propget] HRESULT CurrentPoint([out, retval] Windows.UI.Input.PointerPoint **value); + [propget] HRESULT KeyModifiers([out, retval] Windows.System.VirtualKeyModifiers *value); + HRESULT GetIntermediatePoints([out, retval] Windows.Foundation.Collections.IVector<Windows.UI.Input.PointerPoint *> **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.UI.Core.TouchHitTestingEventArgs), + uuid(22f3b823-0b7c-424e-9df7-33d4f962931b) + ] + interface ITouchHitTestingEventArgs : IInspectable + requires Windows.UI.Core.ICoreWindowEventArgs + { + [propget] HRESULT ProximityEvaluation([out, retval] Windows.UI.Core.CoreProximityEvaluation *value); + [propput] HRESULT ProximityEvaluation([in] Windows.UI.Core.CoreProximityEvaluation value); + [propget] HRESULT Point([out, retval] Windows.Foundation.Point *value); + [propget] HRESULT BoundingBox([out, retval] Windows.Foundation.Rect *value); + [default_overload] [overload("EvaluateProximity")] HRESULT EvaluateProximityToRect([in] Windows.Foundation.Rect bounding_box, [out, retval] Windows.UI.Core.CoreProximityEvaluation *evaluation); + [overload("EvaluateProximity")] HRESULT EvaluateProximityToPolygon([in] UINT32 vertice_size, [in] [size_is(vertice_size)] Windows.Foundation.Point *vertices, [out, retval] Windows.UI.Core.CoreProximityEvaluation *evaluation); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.UI.Core.VisibilityChangedEventArgs), + uuid(bf9918ea-d801-4564-a495-b1e84f8ad085) + ] + interface IVisibilityChangedEventArgs : IInspectable + requires Windows.UI.Core.ICoreWindowEventArgs + { + [propget] HRESULT Visible([out, retval] boolean *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.UI.Core.WindowActivatedEventArgs), + uuid(179d65e7-4658-4cb6-aa13-41d094ea255e) + ] + interface IWindowActivatedEventArgs : IInspectable + requires Windows.UI.Core.ICoreWindowEventArgs + { + [propget] HRESULT WindowActivationState([out, retval] Windows.UI.Core.CoreWindowActivationState *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.UI.Core.WindowSizeChangedEventArgs), + uuid(5a200ec7-0426-47dc-b86c-6f475915e451) + ] + interface IWindowSizeChangedEventArgs : IInspectable + requires Windows.UI.Core.ICoreWindowEventArgs + { + [propget] HRESULT Size([out, retval] Windows.Foundation.Size *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(standard) + ] + runtimeclass AutomationProviderRequestedEventArgs + { + [default] interface Windows.UI.Core.IAutomationProviderRequestedEventArgs; + interface Windows.UI.Core.ICoreWindowEventArgs; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(standard) + ] + runtimeclass CharacterReceivedEventArgs + { + [default] interface Windows.UI.Core.ICharacterReceivedEventArgs; + interface Windows.UI.Core.ICoreWindowEventArgs; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 3.0), + marshaling_behavior(standard) + ] + runtimeclass ClosestInteractiveBoundsRequestedEventArgs + { + [default] interface Windows.UI.Core.IClosestInteractiveBoundsRequestedEventArgs; + } + + [ + activatable(Windows.UI.Core.ICoreCursorFactory, Windows.Foundation.UniversalApiContract, 1.0), + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile) + ] + runtimeclass CoreCursor + { + [default] interface Windows.UI.Core.ICoreCursor; + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), marshaling_behavior(agile) @@ -119,6 +590,31 @@ namespace Windows.UI.Core { [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.UI.Core.ICoreDispatcher2; } + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(standard), + static(Windows.UI.Core.ICoreWindowStatic, Windows.Foundation.UniversalApiContract, 1.0) + ] + runtimeclass CoreWindow + { + [default] interface Windows.UI.Core.ICoreWindow; + [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.UI.Core.ICoreWindow2; + [contract(Windows.Foundation.UniversalApiContract, 2.0)] interface Windows.UI.Core.ICorePointerRedirector; + [contract(Windows.Foundation.UniversalApiContract, 3.0)] interface Windows.UI.Core.ICoreWindow3; + [contract(Windows.Foundation.UniversalApiContract, 4.0)] interface Windows.UI.Core.ICoreWindow4; + [contract(Windows.Foundation.UniversalApiContract, 5.0)] interface Windows.UI.Core.ICoreWindow5; + [contract(Windows.Foundation.UniversalApiContract, 8.0)] interface Windows.UI.Core.ICoreWindowWithContext; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(standard) + ] + runtimeclass CoreWindowEventArgs + { + [default] interface Windows.UI.Core.ICoreWindowEventArgs; + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), marshaling_behavior(standard) @@ -127,4 +623,75 @@ namespace Windows.UI.Core { { [default] interface Windows.UI.Core.IIdleDispatchedHandlerArgs; } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(standard) + ] + runtimeclass InputEnabledEventArgs + { + [default] interface Windows.UI.Core.IInputEnabledEventArgs; + interface Windows.UI.Core.ICoreWindowEventArgs; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(standard) + ] + runtimeclass KeyEventArgs + { + [default] interface Windows.UI.Core.IKeyEventArgs; + interface Windows.UI.Core.ICoreWindowEventArgs; + [contract(Windows.Foundation.UniversalApiContract, 3.0)] interface Windows.UI.Core.IKeyEventArgs2; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(standard) + ] + runtimeclass PointerEventArgs + { + [default] interface Windows.UI.Core.IPointerEventArgs; + interface Windows.UI.Core.ICoreWindowEventArgs; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(standard) + ] + runtimeclass TouchHitTestingEventArgs + { + [default] interface Windows.UI.Core.ITouchHitTestingEventArgs; + interface Windows.UI.Core.ICoreWindowEventArgs; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(standard) + ] + runtimeclass VisibilityChangedEventArgs + { + [default] interface Windows.UI.Core.IVisibilityChangedEventArgs; + interface Windows.UI.Core.ICoreWindowEventArgs; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(standard) + ] + runtimeclass WindowActivatedEventArgs + { + [default] interface Windows.UI.Core.IWindowActivatedEventArgs; + interface Windows.UI.Core.ICoreWindowEventArgs; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(standard) + ] + runtimeclass WindowSizeChangedEventArgs + { + [default] interface Windows.UI.Core.IWindowSizeChangedEventArgs; + interface Windows.UI.Core.ICoreWindowEventArgs; + } } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/5916
participants (3)
-
Marvin -
Zhiyi Zhang -
Zhiyi Zhang (@zhiyi)