// // Copyright (c) Microsoft Corporation. All rights reserved. // // // File generated by WinMDIDL version 8.00.0021 // import "inspectable.idl"; import "AsyncInfo.idl"; import "EventToken.idl"; import "windowscontracts.idl"; import "Windows.Foundation.idl"; // Forward Declare namespace Windows { namespace Foundation { interface IAsyncAction; typedef struct TimeSpan TimeSpan; apicontract UniversalApiContract; } } namespace Windows { namespace System { namespace Threading { typedef enum WorkItemOptions WorkItemOptions; typedef enum WorkItemPriority WorkItemPriority; delegate TimerDestroyedHandler; delegate TimerElapsedHandler; delegate WorkItemHandler; interface IThreadPoolStatics; interface IThreadPoolTimer; interface IThreadPoolTimerStatics; runtimeclass ThreadPool; runtimeclass ThreadPoolTimer; } } } // Generic instantiations // Type definition namespace Windows { namespace System { namespace Threading { [contract(Windows.Foundation.UniversalApiContract, 1.0)] [flags] enum WorkItemOptions { None = 0x0, TimeSliced = 0x1 }; [contract(Windows.Foundation.UniversalApiContract, 1.0)] enum WorkItemPriority { Low = -1, Normal = 0, High = 1 }; [contract(Windows.Foundation.UniversalApiContract, 1.0)] [uuid(34ED19FA-8384-4EB9-8209-FB5094EEEC35)] delegate HRESULT TimerDestroyedHandler([in] Windows.System.Threading.ThreadPoolTimer* timer); [contract(Windows.Foundation.UniversalApiContract, 1.0)] [uuid(FAAEA667-FBEB-49CB-ADB2-71184C556E43)] delegate HRESULT TimerElapsedHandler([in] Windows.System.Threading.ThreadPoolTimer* timer); [contract(Windows.Foundation.UniversalApiContract, 1.0)] [uuid(1D1A8B8B-FA66-414F-9CBD-B65FC99D17FA)] delegate HRESULT WorkItemHandler([in] Windows.Foundation.IAsyncAction* operation); [contract(Windows.Foundation.UniversalApiContract, 1.0)] [exclusiveto(Windows.System.Threading.ThreadPool)] [uuid(B6BF67DD-84BD-44F8-AC1C-93EBCB9DBA91)] interface IThreadPoolStatics : IInspectable { [overload("RunAsync")] HRESULT RunAsync([in] Windows.System.Threading.WorkItemHandler* handler, [out] [retval] Windows.Foundation.IAsyncAction** operation); [overload("RunAsync")] HRESULT RunWithPriorityAsync([in] Windows.System.Threading.WorkItemHandler* handler, [in] Windows.System.Threading.WorkItemPriority priority, [out] [retval] Windows.Foundation.IAsyncAction** operation); [overload("RunAsync")] HRESULT RunWithPriorityAndOptionsAsync([in] Windows.System.Threading.WorkItemHandler* handler, [in] Windows.System.Threading.WorkItemPriority priority, [in] Windows.System.Threading.WorkItemOptions options, [out] [retval] Windows.Foundation.IAsyncAction** operation); } [contract(Windows.Foundation.UniversalApiContract, 1.0)] [exclusiveto(Windows.System.Threading.ThreadPoolTimer)] [uuid(594EBE78-55EA-4A88-A50D-3402AE1F9CF2)] interface IThreadPoolTimer : IInspectable { [propget] HRESULT Period([out] [retval] Windows.Foundation.TimeSpan* value); [propget] HRESULT Delay([out] [retval] Windows.Foundation.TimeSpan* value); HRESULT Cancel(); } [contract(Windows.Foundation.UniversalApiContract, 1.0)] [exclusiveto(Windows.System.Threading.ThreadPoolTimer)] [uuid(1A8A9D02-E482-461B-B8C7-8EFAD1CCE590)] interface IThreadPoolTimerStatics : IInspectable { [overload("CreatePeriodicTimer")] HRESULT CreatePeriodicTimer([in] Windows.System.Threading.TimerElapsedHandler* handler, [in] Windows.Foundation.TimeSpan period, [out] [retval] Windows.System.Threading.ThreadPoolTimer** timer); [overload("CreateTimer")] HRESULT CreateTimer([in] Windows.System.Threading.TimerElapsedHandler* handler, [in] Windows.Foundation.TimeSpan delay, [out] [retval] Windows.System.Threading.ThreadPoolTimer** timer); [overload("CreatePeriodicTimer")] HRESULT CreatePeriodicTimerWithCompletion([in] Windows.System.Threading.TimerElapsedHandler* handler, [in] Windows.Foundation.TimeSpan period, [in] Windows.System.Threading.TimerDestroyedHandler* destroyed, [out] [retval] Windows.System.Threading.ThreadPoolTimer** timer); [overload("CreateTimer")] HRESULT CreateTimerWithCompletion([in] Windows.System.Threading.TimerElapsedHandler* handler, [in] Windows.Foundation.TimeSpan delay, [in] Windows.System.Threading.TimerDestroyedHandler* destroyed, [out] [retval] Windows.System.Threading.ThreadPoolTimer** timer); } [contract(Windows.Foundation.UniversalApiContract, 1.0)] [marshaling_behavior(agile)] [static(Windows.System.Threading.IThreadPoolStatics, Windows.Foundation.UniversalApiContract, 1.0)] [threading(both)] runtimeclass ThreadPool { } [contract(Windows.Foundation.UniversalApiContract, 1.0)] [marshaling_behavior(agile)] [static(Windows.System.Threading.IThreadPoolTimerStatics, Windows.Foundation.UniversalApiContract, 1.0)] [threading(both)] runtimeclass ThreadPoolTimer { [default] interface Windows.System.Threading.IThreadPoolTimer; } } } }