Biswapriyo Nath : include: Add Windows.Foundation.MemoryBuffer runtimeclass declaration.

Alexandre Julliard julliard at winehq.org
Mon Apr 25 16:30:32 CDT 2022


Module: wine
Branch: master
Commit: 8c50a9508ccb8f10b7e4d7bb1a7c4c5eaca61f2d
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=8c50a9508ccb8f10b7e4d7bb1a7c4c5eaca61f2d

Author: Biswapriyo Nath <nathbappai at gmail.com>
Date:   Mon Apr 25 11:00:40 2022 +0200

include: Add Windows.Foundation.MemoryBuffer runtimeclass declaration.

Signed-off-by: Biswapriyo Nath <nathbappai at gmail.com>
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 include/windows.foundation.idl | 53 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 52 insertions(+), 1 deletion(-)

diff --git a/include/windows.foundation.idl b/include/windows.foundation.idl
index 08a6af4ea7b..cdc603f8e84 100644
--- a/include/windows.foundation.idl
+++ b/include/windows.foundation.idl
@@ -23,7 +23,7 @@
 import "inspectable.idl";
 import "asyncinfo.idl";
 import "windowscontracts.idl";
-/* import "eventtoken.idl"; */
+import "eventtoken.idl";
 /* import "ivectorchangedeventargs.idl"; */
 import "windows.foundation.collections.idl";
 
@@ -36,7 +36,11 @@ namespace Windows.Foundation {
     typedef struct TimeSpan TimeSpan;
     interface IAsyncAction;
     interface IClosable;
+    interface IMemoryBuffer;
+    interface IMemoryBufferFactory;
+    interface IMemoryBufferReference;
     interface IStringable;
+    runtimeclass MemoryBuffer;
 
     declare {
         interface Windows.Foundation.Collections.IIterable<HSTRING>;
@@ -55,6 +59,7 @@ namespace Windows.Foundation {
         interface Windows.Foundation.IAsyncOperation<boolean>;
         interface Windows.Foundation.IReference<INT32>;
         interface Windows.Foundation.TypedEventHandler<IInspectable *, IInspectable *>;
+        interface Windows.Foundation.TypedEventHandler<Windows.Foundation.IMemoryBufferReference *, IInspectable *>;
     }
 
     [
@@ -173,4 +178,50 @@ namespace Windows.Foundation {
         [propget] HRESULT Completed([out, retval] Windows.Foundation.AsyncActionCompletedHandler **handler);
         HRESULT GetResults();
     }
+
+    [
+        contract(Windows.Foundation.UniversalApiContract, 1.0),
+        uuid(fbc4dd2a-245b-11e4-af98-689423260cf8)
+    ]
+    interface IMemoryBuffer : IInspectable
+        requires Windows.Foundation.IClosable
+    {
+        HRESULT CreateReference([out, retval] Windows.Foundation.IMemoryBufferReference **reference);
+    }
+
+    [
+        contract(Windows.Foundation.UniversalApiContract, 1.0),
+        exclusiveto(Windows.Foundation.MemoryBuffer),
+        uuid(fbc4dd2b-245b-11e4-af98-689423260cf8)
+    ]
+    interface IMemoryBufferFactory : IInspectable
+    {
+        HRESULT Create([in, range(0x00000000, 0x7fffffff)] UINT32 capacity,
+                       [out, retval] Windows.Foundation.MemoryBuffer **value);
+    }
+
+    [
+        contract(Windows.Foundation.UniversalApiContract, 1.0),
+        uuid(fbc4dd29-245b-11e4-af98-689423260cf8)
+    ]
+    interface IMemoryBufferReference : IInspectable
+        requires Windows.Foundation.IClosable
+    {
+        [propget] HRESULT Capacity([out, retval] UINT32 *value);
+        [eventadd] HRESULT Closed([in] Windows.Foundation.TypedEventHandler<Windows.Foundation.IMemoryBufferReference *, IInspectable *> *handler,
+                                  [out, retval] EventRegistrationToken *cookie);
+        [eventremove] HRESULT Closed([in] EventRegistrationToken cookie);
+    }
+
+    [
+        activatable(Windows.Foundation.IMemoryBufferFactory, Windows.Foundation.UniversalApiContract, 1.0),
+        contract(Windows.Foundation.UniversalApiContract, 1.0),
+        marshaling_behavior(agile),
+        threading(both)
+    ]
+    runtimeclass MemoryBuffer
+    {
+        [default] interface Windows.Foundation.IMemoryBuffer;
+        interface Windows.Foundation.IClosable;
+    }
 }




More information about the wine-cvs mailing list