windows_foundation library

Provides access to WinRT APIs from the Windows.Foundation namespace using FFI.

Classes

IClosable
Defines a method to release allocated resources.
IIterable<T>
Exposes an iterator that supports simple iteration over a collection of a specified type.
IIterator<T>
Supports simple iteration over a collection.
IKeyValuePair<K, V>
Represents a key-value pair.
IMap<K, V>
Represents an associative collection, also known as a map or a dictionary.
IMapView<K, V>
Represents an immutable view into a map.
IMemoryBuffer
Represents a reference counted memory buffer.
IMemoryBufferReference
Represents a reference to an IMemoryBuffer object.
InitializeWithWindow
Exposes a method through which a client can provide an owner window to a Windows Runtime (WinRT) object used in a desktop application.
IObservableMap<K, V>
Notifies listeners of dynamic changes to a map, such as when items are added or removed.
IPropertySet
Represents a collection of key-value pairs, correlating several other collection interfaces.
IStringable
Provides a way to represent the current object as a string.
IVector<T>
Represents a random-access collection of elements.
IVectorView<T>
Represents an immutable view into a vector.
Matrix3x2
Describes a 3*2 floating point matrix.
Matrix4x4
Describes a 4*4 floating point matrix.
MemoryBuffer
Represents a reference counted memory buffer.
Plane
Describes a plane (a flat, two-dimensional surface).
Point
Represents an x- and y-coordinate pair in two-dimensional space. Can also represent a logical point for certain property usages.
PropertySet
Represents a property set, which is a set of PropertyValue objects with string keys.
Quaternion
Describes a quaternion, which is an abstract representation of an orientation in space that is based on complex numbers.
Rational
Describes a number that can be created by the division of 2 integers.
Rect
Describes the width, height, and point origin of a rectangle.
Size
Describes the width and height of an object.
StringMap
An associative collection, also known as a map or a dictionary.
ValueSet
Implements a map with keys of type String and values of type Object. Object must be a WinRT PropertyValue or ValueSet. As a PropertyValue, it can be any type except PropertyType InspectableArray. This limitation exists to ensure that the value can be serialized; passed by value across a process boundary.
Vector2
Describes a vector of two floating-point components.
Vector3
Describes a vector of three floating-point components.
Vector4
Describes a vector of four floating-point components.
WinRTEnum
The base class that all WinRT enumerations extend or implement.
WinRTFlagsEnum<T extends WinRTEnum>
The base class that all WinRT Flags enumerations implement.
WinRTStruct<T extends Struct>
The base class that all WinRT structs implement.

Enums

DoubleType
Represents the double types supported by WinRT type system.
IntType
Represents the integer types supported by WinRT type system.

Extensions

IUnknownHelpers on IUnknown
WinRTEnumHelper on Iterable<T>

Functions

activateClass(String className, {Allocator allocator = calloc}) Pointer<COMObject>
Activates the specified Windows Runtime class in the className and returns a reference to the IInspectable interface.
createActivationFactory<T extends IInspectable>(T creator(Pointer<COMObject>), String className, String iid) → T
Creates the activation factory for the specified Windows Runtime class in className.
createObject<T extends IInspectable>(T creator(Pointer<COMObject>), String className, String iid) → T
Creates a WinRT object.
getWindowHandle() int
Returns the window handle (HWND) of the current window.
refCount(IInspectable object) int
Gets the reference count of the Windows Runtime object.