| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/ |
Upload File : |
//****************************************************************************
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// File: directmanipulation.idl
//
// Contents: Direct Manipulation interface definitions and related types and enums.
//
//****************************************************************************
cpp_quote("//--------------------------------------------------------------------------")
cpp_quote("//")
cpp_quote("// directmanipulation.h")
cpp_quote("//")
cpp_quote("// Direct Manipulation interface definitions and related types and enums")
cpp_quote("//")
cpp_quote("// Copyright (c) Microsoft Corporation. All rights reserved.")
cpp_quote("//")
cpp_quote("//--------------------------------------------------------------------------")
cpp_quote("#include <winapifamily.h>")
#pragma region Desktop Family
cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)")
import "oaidl.idl";
import "ocidl.idl";
cpp_quote("#if (NTDDI_VERSION >= NTDDI_WIN8)")
cpp_quote("#if 0")
typedef void* HWND;
cpp_quote("#endif")
interface IDirectManipulationManager;
interface IDirectManipulationUpdateManager;
interface IDirectManipulationUpdateHandler;
interface IDirectManipulationFrameInfoProvider;
interface IDirectManipulationViewport;
interface IDirectManipulationViewportEventHandler;
interface IDirectManipulationContent;
// Defines manipulation states
typedef enum DIRECTMANIPULATION_STATUS
{
DIRECTMANIPULATION_BUILDING = 0, // Not yet been enabled
DIRECTMANIPULATION_ENABLED = 1, // Enabled to accept input
DIRECTMANIPULATION_DISABLED = 2, // Disabled and can be re-enabled
DIRECTMANIPULATION_RUNNING = 3, // Currently accepting input
DIRECTMANIPULATION_INERTIA = 4, // Currently accepting inertia
DIRECTMANIPULATION_READY = 5, // Ready to accept input
DIRECTMANIPULATION_SUSPENDED = 6 // Accepting input but output is suspended
} DIRECTMANIPULATION_STATUS;
// Defines hit-testing options
// Note: if new types are ever added, make sure to update DIRECTMANIPULATION_HITTEST_TYPE_SYNCHRONOUS_INCLUDE_PTP
typedef enum DIRECTMANIPULATION_HITTEST_TYPE
{
// The hit-test thread receives WM_POINTERDOWN always
DIRECTMANIPULATION_HITTEST_TYPE_ASYNCHRONOUS = 0x00000000,
// The UI thread receives WM_POINTERDOWN always
DIRECTMANIPULATION_HITTEST_TYPE_SYNCHRONOUS = 0x00000001,
// The hit-test thread receives WM_POINTERDOWN first. If it doesn't call SetContact() for this pointer, the UI thread receives WM_POINTERDOWN
DIRECTMANIPULATION_HITTEST_TYPE_AUTO_SYNCHRONOUS = 0x00000002
} DIRECTMANIPULATION_HITTEST_TYPE;
cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(DIRECTMANIPULATION_HITTEST_TYPE)")
// Defines interaction configuration states
typedef enum DIRECTMANIPULATION_CONFIGURATION
{
// Configuration settings for all types
DIRECTMANIPULATION_CONFIGURATION_NONE = 0x00000000,
DIRECTMANIPULATION_CONFIGURATION_INTERACTION = 0x00000001,
// Configuration settings for manipulation type
DIRECTMANIPULATION_CONFIGURATION_TRANSLATION_X = 0x00000002,
DIRECTMANIPULATION_CONFIGURATION_TRANSLATION_Y = 0x00000004,
DIRECTMANIPULATION_CONFIGURATION_SCALING = 0x00000010,
DIRECTMANIPULATION_CONFIGURATION_TRANSLATION_INERTIA = 0x00000020,
DIRECTMANIPULATION_CONFIGURATION_SCALING_INERTIA = 0x00000080,
DIRECTMANIPULATION_CONFIGURATION_RAILS_X = 0x00000100,
DIRECTMANIPULATION_CONFIGURATION_RAILS_Y = 0x00000200,
} DIRECTMANIPULATION_CONFIGURATION;
cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(DIRECTMANIPULATION_CONFIGURATION)")
// Defines gestures detected by Direct Manipulation
typedef enum DIRECTMANIPULATION_GESTURE_CONFIGURATION
{
// Default gestures are always detected
DIRECTMANIPULATION_GESTURE_NONE = 0x00000000,
DIRECTMANIPULATION_GESTURE_DEFAULT = 0x00000000,
DIRECTMANIPULATION_GESTURE_CROSS_SLIDE_VERTICAL = 0x00000008,
DIRECTMANIPULATION_GESTURE_CROSS_SLIDE_HORIZONTAL = 0x00000010,
DIRECTMANIPULATION_GESTURE_PINCH_ZOOM = 0x00000020,
} DIRECTMANIPULATION_GESTURE_CONFIGURATION;
cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(DIRECTMANIPULATION_GESTURE_CONFIGURATION)")
// Defines the manipulation motion types
typedef enum DIRECTMANIPULATION_MOTION_TYPES
{
DIRECTMANIPULATION_MOTION_NONE = 0x0000, // None
DIRECTMANIPULATION_MOTION_TRANSLATEX = 0x0001, // Translation in the horizontal axis
DIRECTMANIPULATION_MOTION_TRANSLATEY = 0x0002, // Translation in the vertical axis
DIRECTMANIPULATION_MOTION_ZOOM = 0x0004, // Zoom
DIRECTMANIPULATION_MOTION_CENTERX = 0x0010, // The horizontal center of the manipulation
DIRECTMANIPULATION_MOTION_CENTERY = 0x0020, // The vertical center of the manipulation
DIRECTMANIPULATION_MOTION_ALL = DIRECTMANIPULATION_MOTION_TRANSLATEX |
DIRECTMANIPULATION_MOTION_TRANSLATEY |
DIRECTMANIPULATION_MOTION_ZOOM |
DIRECTMANIPULATION_MOTION_CENTERX |
DIRECTMANIPULATION_MOTION_CENTERY
} DIRECTMANIPULATION_MOTION_TYPES;
cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(DIRECTMANIPULATION_MOTION_TYPES)")
// Defines viewport options
typedef enum DIRECTMANIPULATION_VIEWPORT_OPTIONS
{
DIRECTMANIPULATION_VIEWPORT_OPTIONS_DEFAULT = 0x0000,
// This viewport automatically disables itself when a manipulation or a gesture is over
DIRECTMANIPULATION_VIEWPORT_OPTIONS_AUTODISABLE = 0x0001,
// This viewport updates its content manually by a call to IDirectManipulationUpdateManager::Update (instead of during an input event)
DIRECTMANIPULATION_VIEWPORT_OPTIONS_MANUALUPDATE = 0x0002,
// The UI thread receives all input for contacts associated first with this viewport, when it is running
DIRECTMANIPULATION_VIEWPORT_OPTIONS_INPUT = 0x0004,
// This viewport is not implicitly hittested
DIRECTMANIPULATION_VIEWPORT_OPTIONS_EXPLICITHITTEST = 0x0008,
// Disable pixel snapping on this viewport
DIRECTMANIPULATION_VIEWPORT_OPTIONS_DISABLEPIXELSNAPPING = 0x0010,
} DIRECTMANIPULATION_VIEWPORT_OPTIONS;
cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(DIRECTMANIPULATION_VIEWPORT_OPTIONS)")
// Defines the rest point behavior of a region
typedef enum DIRECTMANIPULATION_SNAPPOINT_TYPE
{
DIRECTMANIPULATION_SNAPPOINT_MANDATORY = 0, // The motion will always rest at a snap point
DIRECTMANIPULATION_SNAPPOINT_OPTIONAL = 1, // The motion will rest at a snap point if it ends near it
DIRECTMANIPULATION_SNAPPOINT_MANDATORY_SINGLE = 2, // The motion will always rest at the next snap point
DIRECTMANIPULATION_SNAPPOINT_OPTIONAL_SINGLE = 3, // The motion will rest at the next snap point if it starts far from it
} DIRECTMANIPULATION_SNAPPOINT_TYPE;
// Define the coordinate system for snap points
typedef enum DIRECTMANIPULATION_SNAPPOINT_COORDINATE
{
DIRECTMANIPULATION_COORDINATE_BOUNDARY = 0x00, // The origin of snap points coordinates is the content rectangle
DIRECTMANIPULATION_COORDINATE_ORIGIN = 0x01, // The origin of snap points coordinates is a specified origin
DIRECTMANIPULATION_COORDINATE_MIRRORED = 0x10 // The direction of snap points coordinates is reversed relative to the origin
} DIRECTMANIPULATION_SNAPPOINT_COORDINATE;
cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(DIRECTMANIPULATION_SNAPPOINT_COORDINATE)")
// Defines horizontal content alignment inside a viewport
typedef enum DIRECTMANIPULATION_HORIZONTALALIGNMENT
{
DIRECTMANIPULATION_HORIZONTALALIGNMENT_NONE = 0x00,
DIRECTMANIPULATION_HORIZONTALALIGNMENT_LEFT = 0x01,
DIRECTMANIPULATION_HORIZONTALALIGNMENT_CENTER = 0x02,
DIRECTMANIPULATION_HORIZONTALALIGNMENT_RIGHT = 0x04,
DIRECTMANIPULATION_HORIZONTALALIGNMENT_UNLOCKCENTER = 0x08
} DIRECTMANIPULATION_HORIZONTALALIGNMENT;
cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(DIRECTMANIPULATION_HORIZONTALALIGNMENT)")
// Defines vertical content alignment inside a viewport
typedef enum DIRECTMANIPULATION_VERTICALALIGNMENT
{
DIRECTMANIPULATION_VERTICALALIGNMENT_NONE = 0x00,
DIRECTMANIPULATION_VERTICALALIGNMENT_TOP = 0x01,
DIRECTMANIPULATION_VERTICALALIGNMENT_CENTER = 0x02,
DIRECTMANIPULATION_VERTICALALIGNMENT_BOTTOM = 0x04,
DIRECTMANIPULATION_VERTICALALIGNMENT_UNLOCKCENTER = 0x08
} DIRECTMANIPULATION_VERTICALALIGNMENT;
cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(DIRECTMANIPULATION_VERTICALALIGNMENT)")
// Viewport mode options (superseded by DIRECTMANIPULATION_VIEWPORT_OPTIONS)
typedef enum DIRECTMANIPULATION_INPUT_MODE
{
DIRECTMANIPULATION_INPUT_MODE_AUTOMATIC = 0,
DIRECTMANIPULATION_INPUT_MODE_MANUAL = 1
} DIRECTMANIPULATION_INPUT_MODE;
// Constants
const UINT32 DIRECTMANIPULATION_KEYBOARDFOCUS = 0xFFFFFFFE; // Pseudo-pointer ID for keyboard
const UINT32 DIRECTMANIPULATION_MOUSEFOCUS = 0xFFFFFFFD; // Pseudo-pointer ID for mouse
const float DIRECTMANIPULATION_MINIMUM_ZOOM = (float) 0.1; // The minimum zoom boundary permitted is 10%
// Secondary content class-ids
// {A10B5F17-AFE0-4AA2-91E9-3E7001D2E6B4}
cpp_quote("DEFINE_GUID(CLSID_VerticalIndicatorContent, 0xa10b5f17, 0xafe0, 0x4aa2, 0x91, 0xe9, 0x3e, 0x70, 0x1, 0xd2, 0xe6, 0xb4);")
// {E7D18CF5-3EC7-44D5-A76B-3770F3CF903D}
cpp_quote("DEFINE_GUID(CLSID_HorizontalIndicatorContent, 0xe7d18cf5, 0x3ec7, 0x44d5, 0xa7, 0x6b, 0x37, 0x70, 0xf3, 0xcf, 0x90, 0x3d);")
// {3206A19A-86F0-4CB4-A7F3-16E3B7E2D852}
cpp_quote("DEFINE_GUID(CLSID_VirtualViewportContent, 0x3206a19a, 0x86f0, 0x4cb4, 0xa7, 0xf3, 0x16, 0xe3, 0xb7, 0xe2, 0xd8, 0x52);")
// Behavior objects' class-ids
// {09B01B3E-BA6C-454D-82E8-95E352329F23}
cpp_quote("DEFINE_GUID(CLSID_DragDropConfigurationBehavior, 0x09b01b3e, 0xba6c, 0x454d, 0x82, 0xe8, 0x95, 0xe3, 0x52, 0x32, 0x9f, 0x23);")
// {26126A51-3C70-4C9A-AEC2-948849EEB093}
cpp_quote("DEFINE_GUID(CLSID_AutoScrollBehavior, 0x26126a51, 0x3c70, 0x4c9a, 0xae, 0xc2, 0x94, 0x88, 0x49, 0xee, 0xb0, 0x93);")
// Services
// {D7B67CF4-84BB-434E-86AE-6592BBC9ABD9}
cpp_quote("DEFINE_GUID(CLSID_DeferContactService , 0xd7b67cf4, 0x84bb, 0x434e, 0x86, 0xae, 0x65, 0x92, 0xbb, 0xc9, 0xab, 0xd9);")
// Direct Manipulation manager object and factory.
[
local,
object,
uuid(FBF5D3B4-70C7-4163-9322-5A6F660D6FBC),
helpstring("IDirectManipulationManager Interface"),
pointer_default(unique)
]
interface IDirectManipulationManager : IUnknown
{
// Reference counted activation for Direct Manipulation, always pair with Deactivate().
// Activation is specific to a single window handle.
HRESULT Activate([in, annotation("_In_")] HWND window);
// Deactivates a reference of Direct Manipulation, specific to a particular window handle.
HRESULT Deactivate([in, annotation("_In_")] HWND window);
// Registers an optional window for hit-testing, which will receive WM_POINTERDOWN first
HRESULT RegisterHitTestTarget([in, annotation("_In_")] HWND window,
[in, annotation("_In_opt_")] HWND hitTestWindow,
[in, annotation("_In_")] DIRECTMANIPULATION_HITTEST_TYPE type);
// Process a keyboard or mouse message to drive manipulations.
// An output value of handled == TRUE indicates that Direct Manipulation has handled the event and no further action
// should be taken.
HRESULT ProcessInput([in, annotation("_In_")] const MSG *message,
[out, retval, annotation("_Out_")] BOOL *handled);
// Gets an instance of IDirectManipulationUpdateManager which manages how content updates are triggered
HRESULT GetUpdateManager([in, annotation("_In_")] REFIID riid,
[out, iid_is(riid), retval, annotation("_COM_Outptr_")] void **object);
// Factory method to create a new instance of viewport. The retrieved object implements IDirectManipulationViewport
HRESULT CreateViewport([in, annotation("_In_opt_")] IDirectManipulationFrameInfoProvider *frameInfo,
[in, annotation("_In_")] HWND window,
[in, annotation("_In_")] REFIID riid,
[out, iid_is(riid), retval, annotation("_COM_Outptr_")] void **object);
// Factory method to create a new instance of content, the retrieved object implements IDirectManipulationContent
HRESULT CreateContent([in, annotation("_In_opt_")] IDirectManipulationFrameInfoProvider *frameInfo,
[in, annotation("_In_")] REFCLSID clsid,
[in, annotation("_In_")] REFIID riid,
[out, iid_is(riid), retval, annotation("_COM_Outptr_")] void **object);
}
// Direct Manipulation manager (v2).
[
local,
object,
uuid(FA1005E9-3D16-484C-BFC9-62B61E56EC4E),
helpstring("IDirectManipulationManager2 Interface"),
pointer_default(unique)
]
interface IDirectManipulationManager2 : IDirectManipulationManager
{
// Factory method to create a behavior. The returned object could then be attached to a viewport object.
HRESULT CreateBehavior([in, annotation("_In_")] REFCLSID clsid,
[in, annotation("_In_")] REFIID riid,
[out, iid_is(riid), retval, annotation("_COM_Outptr_")] void **object);
}
// Direct Manipulation manager (v3).
[
local,
object,
uuid(2CB6B33D-FFE8-488C-B750-FBDFE88DCA8C),
helpstring("IDirectManipulationManager3 Interface"),
pointer_default(unique)
]
interface IDirectManipulationManager3 : IDirectManipulationManager2
{
// Return the requested global DirectManipulation service
HRESULT GetService([in, annotation("_In_")] REFCLSID clsid,
[in, annotation("_In_")] REFIID riid,
[out, iid_is(riid), retval, annotation("_COM_Outptr_")] void **object);
}
// Defines a Direct Manipulation viewport
[
local,
object,
uuid(28b85a3d-60a0-48bd-9ba1-5ce8d9ea3a6d),
helpstring("IDirectManipulationViewport Interface"),
pointer_default(unique)
]
interface IDirectManipulationViewport : IUnknown
{
// Directs the viewport to begin or resume responding to input
HRESULT Enable();
// Directs the viewport to disable responding to input
HRESULT Disable();
// Adds a specific touch contact identifier to the manipulation processor associated with this viewport object.
// The pointer identifier is retrieved using GET_POINTERID_WPARAM from a pointer message.
// The contact is automatically removed on WM_POINTERUP.
HRESULT SetContact([in, annotation("_In_")] UINT32 pointerId);
// Removes the association between a specific touch contact and a viewport object prior to
// WM_POINTERUP, for example if touch capture changes.
HRESULT ReleaseContact([in, annotation("_In_")] UINT32 pointerId);
// This releases all contacts currently associated with this object
HRESULT ReleaseAllContacts();
// Gets the viewport's current status
HRESULT GetStatus([out, retval, annotation("_Out_")] DIRECTMANIPULATION_STATUS *status);
// Gets the viewport's object and identifier tag which was set by the client. The object can be
// any object which inherits from IUnknown.
HRESULT GetTag([in, annotation("_In_")] REFIID riid,
[out, iid_is(riid), annotation("_COM_Outptr_opt_")] void **object,
[out, annotation("_Out_opt_")] UINT32 *id);
// Sets an identifier object and identifier on the viewport object
HRESULT SetTag([in, unique, annotation("_In_opt_")] IUnknown *object, [in, annotation("_In_")] UINT32 id);
// Gets the viewport coordinates inside its window
HRESULT GetViewportRect([out, retval, annotation("_Out_")] RECT *viewport);
// Sets the viewport coordinates inside its window
HRESULT SetViewportRect([in, annotation("_In_")] const RECT *viewport);
// Zooms to a specific area of the primary content
HRESULT ZoomToRect([in, annotation("_In_")] const float left, [in, annotation("_In_")] const float top,
[in, annotation("_In_")] const float right, [in, annotation("_In_")] const float bottom, [in, annotation("_In_")] BOOL animate);
// Specifies the transform from viewport coordinates to window coordinates
HRESULT SetViewportTransform([in, annotation("_In_reads_(pointCount)")] const float *matrix, [in, annotation("_In_")] DWORD pointCount);
// Specifies a transform to apply to visual updates of the content
HRESULT SyncDisplayTransform([in, annotation("_In_reads_(pointCount)")] const float *matrix, [in, annotation("_In_")] DWORD pointCount);
// Gets the primary content, which implements IDirectManipulationContent and IDirectManipulationPrimaryContent
HRESULT GetPrimaryContent([in, annotation("_In_")] REFIID riid,
[out, iid_is(riid), retval, annotation("_COM_Outptr_")] void **object);
// Adds a new content instance to the viewport
HRESULT AddContent([in, unique, annotation("_In_")] IDirectManipulationContent *content);
// Removes a content instance from the viewport
HRESULT RemoveContent([in, unique, annotation("_In_")] IDirectManipulationContent *content);
// Specifies control options for this viewport
HRESULT SetViewportOptions([in, annotation("_In_")] DIRECTMANIPULATION_VIEWPORT_OPTIONS options);
// Adds a manipulation configuration to the list of configurations supported by this viewport
HRESULT AddConfiguration([in, annotation("_In_")] DIRECTMANIPULATION_CONFIGURATION configuration);
// Removes a manipulation configuration from the list of configurations supported by this viewport
HRESULT RemoveConfiguration([in, annotation("_In_")] DIRECTMANIPULATION_CONFIGURATION configuration);
// Sets the current manipulation configuration
HRESULT ActivateConfiguration([in, annotation("_In_")] DIRECTMANIPULATION_CONFIGURATION configuration);
// Defines for which gestures the corresponding input will be forwarded to the UI thread
HRESULT SetManualGesture([in, annotation("_In_")] DIRECTMANIPULATION_GESTURE_CONFIGURATION configuration);
// Determines if this viewport allows chaining input to parent viewports
HRESULT SetChaining([in, annotation("_In_")] DIRECTMANIPULATION_MOTION_TYPES enabledTypes);
// Specifies a handler for viewport status and content update events
HRESULT AddEventHandler([in, annotation("_In_opt_")] HWND window,
[in, annotation("_In_")] IDirectManipulationViewportEventHandler *eventHandler,
[out, retval, annotation("_Out_")] DWORD *cookie);
// Removes an event handler from the viewport
HRESULT RemoveEventHandler([in, annotation("_In_")] DWORD cookie);
// Defines if the UI thread will receive all input for contacts associated first with this viewport, when it is running
// (here DIRECTMANIPULATION_INPUT_MODE_MANUAL has the same effect as DIRECTMANIPULATION_VIEWPORT_OPTIONS_INPUT)
HRESULT SetInputMode([in, annotation("_In_")] DIRECTMANIPULATION_INPUT_MODE mode);
// Defines if this viewport updates its content manually by a call to IDirectManipulationUpdateManager::Update (instead of during an input event)
// (here DIRECTMANIPULATION_INPUT_MODE_MANUAL has the same effect as DIRECTMANIPULATION_VIEWPORT_OPTIONS_MANUALUPDATE)
HRESULT SetUpdateMode([in, annotation("_In_")] DIRECTMANIPULATION_INPUT_MODE mode);
// Directs the viewport to stop its current manipulation immediately, and go back to the READY state
HRESULT Stop();
// Release all resources used by this viewport and prepare it for destruction from memory
HRESULT Abandon();
}
// Defines a Direct Manipulation viewport (v2)
[
local,
object,
uuid(923CCAAC-61E1-4385-B726-017AF189882A),
helpstring("IDirectManipulationViewport2 Interface"),
pointer_default(unique)
]
interface IDirectManipulationViewport2 : IDirectManipulationViewport
{
// Add a behavior to this viewport and return a cookie to the caller.
HRESULT AddBehavior([in, unique, annotation("_In_")] IUnknown *behavior,
[out, retval, annotation("_Out_")] DWORD *cookie);
// Remove a behavior from this viewport that matches the given cookie.
HRESULT RemoveBehavior([in, annotation("_In_")] DWORD cookie);
// Removes all the behaviors previously attached to this viewport.
HRESULT RemoveAllBehaviors();
}
// Application-implemented interface to receive notifications about manipulations
[
local,
object,
uuid(952121DA-D69F-45F9-B0F9-F23944321A6D),
helpstring("IDirectManipulationViewportEventHandler Interface"),
pointer_default(unique)
]
interface IDirectManipulationViewportEventHandler : IUnknown
{
// This method is called when the viewport's status changes
HRESULT OnViewportStatusChanged([in, annotation("_In_")] IDirectManipulationViewport *viewport,
[in, annotation("_In_")] DIRECTMANIPULATION_STATUS current,
[in, annotation("_In_")] DIRECTMANIPULATION_STATUS previous);
// This method is called after all the content instances in the viewport have been updated for the current input
HRESULT OnViewportUpdated([in, annotation("_In_")] IDirectManipulationViewport *viewport);
// This method is called when a content intance inside viewport is updated
HRESULT OnContentUpdated([in, annotation("_In_")] IDirectManipulationViewport *viewport,
[in, annotation("_In_")] IDirectManipulationContent *content);
}
// Represents visual content that gets transformed by a manipulation
[
local,
object,
uuid(B89962CB-3D89-442B-BB58-5098FA0F9F16),
helpstring("IDirectManipulationContent Interface"),
pointer_default(unique)
]
interface IDirectManipulationContent : IUnknown
{
// Gets the current content size and boundaries
HRESULT GetContentRect([out, annotation("_Out_")] RECT *contentSize);
// Sets the current content size and boundaries
HRESULT SetContentRect([in, annotation("_In_")] const RECT *contentSize);
// Gets the viewport object that is currently attached to the content; the returned object is a IDirectManipulationViewport
HRESULT GetViewport([in, annotation("_In_")] REFIID riid,
[out, iid_is(riid), retval, annotation("_COM_Outptr_")] void **object);
// Gets the content's object and identifier tag which was set by the client. The object can be
// any object which inherits from IUnknown.
HRESULT GetTag([in, annotation("_In_")] REFIID riid,
[out, iid_is(riid), annotation("_COM_Outptr_opt_")] void **object,
[out, annotation("_Out_opt_")] UINT32 *id);
// Sets an identifier object and identifier on the content object
HRESULT SetTag([in, unique, annotation("_In_opt_")] IUnknown *object, [in, annotation("_In_")] UINT32 id);
// Gets the current visual transform applied to the content
HRESULT GetOutputTransform([out, annotation("_Out_writes_(pointCount)")] float *matrix, [in, annotation("_In_")] DWORD pointCount);
// Gets the current manipulation transform for the content
HRESULT GetContentTransform([out, annotation("_Out_writes_(pointCount)")] float *matrix, [in, annotation("_In_")] DWORD pointCount);
// Syncs the manipulation transform for the content to a transform provided by the application, while preserving the output transform
HRESULT SyncContentTransform([in, annotation("_In_reads_(pointCount)")] const float *matrix, [in, annotation("_In_")] DWORD pointCount);
}
// This describes operations only possible on the primary instance of content for a given viewport
[
local,
object,
uuid(C12851E4-1698-4625-B9B1-7CA3EC18630B),
helpstring("IDirectManipulationPrimaryContent Interface"),
pointer_default(unique)
]
interface IDirectManipulationPrimaryContent : IUnknown
{
// Specifies a uniform snap interval for the motion type
HRESULT SetSnapInterval([in, annotation("_In_")] DIRECTMANIPULATION_MOTION_TYPES motion, [in, annotation("_In_")] float interval,
[in, annotation("_In_")] float offset);
// Specifies an array of fixed snap points for the motion type
HRESULT SetSnapPoints([in, annotation("_In_")] DIRECTMANIPULATION_MOTION_TYPES motion,
[in, annotation("_In_reads_opt_(pointCount)")] const float *points, [in, annotation("_In_")] DWORD pointCount);
// Specifies the snap point behavior for all snap points on the motion type
HRESULT SetSnapType([in, annotation("_In_")] DIRECTMANIPULATION_MOTION_TYPES motion,
[in, annotation("_In_")] DIRECTMANIPULATION_SNAPPOINT_TYPE type);
// Sets the coordinate to which snap points will be relative to. Snap points can be set to count "in reverse" and from any start value.
// In that case, "origin" is used to determine the far anchor point that valid snap points can take (the near anchor point being 0.0f).
// This only applies when coordinateType is DIRECTMANIPULATION_COORDINATE_ORIGIN or DIRECTMANIPULATION_COORDINATE_MIRRORED_ORIGIN.
// When using DIRECTMANIPULATION_COORDINATE_BOUNDARY, "origin" is ignored.
HRESULT SetSnapCoordinate([in, annotation("_In_")] DIRECTMANIPULATION_MOTION_TYPES motion,
[in, annotation("_In_")] DIRECTMANIPULATION_SNAPPOINT_COORDINATE coordinate,
[in, annotation("_In_")] float origin);
// Sets the zoom boundaries for the content. ZoomMininum must be at least DIRECTMANIPULATION_MINIMUM_ZOOM.
HRESULT SetZoomBoundaries([in, annotation("_In_")] float zoomMinimum, [in, annotation("_In_")] float zoomMaximum);
// Sets the horizontal content alignment
HRESULT SetHorizontalAlignment([in, annotation("_In_")] DIRECTMANIPULATION_HORIZONTALALIGNMENT alignment);
// Sets the vertical content alignment
HRESULT SetVerticalAlignment([in, annotation("_In_")] DIRECTMANIPULATION_VERTICALALIGNMENT alignment);
// Gets the rest position transform of inertia for the primary content
HRESULT GetInertiaEndTransform([out, annotation("_Out_writes_(pointCount)")] float *matrix, [in, annotation("_In_")] DWORD pointCount);
// Gets the center point for the current manipulation, if it exists
HRESULT GetCenterPoint([out, annotation("_Out_")] float *centerX, [out, annotation("_Out_")] float *centerY);
}
// Defines drag-drop behavior states
typedef enum DIRECTMANIPULATION_DRAG_DROP_STATUS
{
DIRECTMANIPULATION_DRAG_DROP_READY = 0,
DIRECTMANIPULATION_DRAG_DROP_PRESELECT = 1,
DIRECTMANIPULATION_DRAG_DROP_SELECTING = 2,
DIRECTMANIPULATION_DRAG_DROP_DRAGGING = 3,
DIRECTMANIPULATION_DRAG_DROP_CANCELLED = 4,
DIRECTMANIPULATION_DRAG_DROP_COMMITTED = 5
} DIRECTMANIPULATION_DRAG_DROP_STATUS;
// Application-implemented interface to receive notifications about drag-drop behavior specific events
[
local,
object,
uuid(1FA11B10-701B-41AE-B5F2-49E36BD595AA),
helpstring("IDirectManipulationDragDropEventHandler Interface"),
pointer_default(unique)
]
interface IDirectManipulationDragDropEventHandler : IUnknown
{
// Called when a status change happens in the viewport the drag-drop behavior is attached to.
HRESULT OnDragDropStatusChange([in, annotation("_In_")] IDirectManipulationViewport2 *viewport,
[in, annotation("_In_")] DIRECTMANIPULATION_DRAG_DROP_STATUS current,
[in, annotation("_In_")] DIRECTMANIPULATION_DRAG_DROP_STATUS previous);
}
typedef enum DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION
{
// Configuration setting for drag-drop type.
// SELECT_ONLY and SELECT_DRAG are valid only when either HORIZONTAL or VERTICAL is set, but not both.
// For HOLD_DRAG, both HORIZONTAL and VERTICAL must be set.
DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_VERTICAL = 0x00000001,
DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_HORIZONTAL = 0x00000002,
DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_SELECT_ONLY = 0x00000010,
DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_SELECT_DRAG = 0x00000020,
DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_HOLD_DRAG = 0x00000040
} DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION;
cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION)")
[
local,
object,
uuid(814B5AF5-C2C8-4270-A9B7-A198CE8D02FA),
helpstring("IDirectManipulationDragDropBehavior Interface"),
pointer_default(unique)
]
interface IDirectManipulationDragDropBehavior : IUnknown
{
// Call to set the configuration of the drag-drop behavior
HRESULT SetConfiguration([in, annotation("_In_")] DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION configuration);
// Call to get the current status of the behavior
HRESULT GetStatus([out, retval, annotation("_Out_")] DIRECTMANIPULATION_DRAG_DROP_STATUS *status);
}
// Defines gesture types
typedef enum DIRECTMANIPULATION_INTERACTION_TYPE
{
DIRECTMANIPULATION_INTERACTION_BEGIN = 0,
DIRECTMANIPULATION_INTERACTION_TYPE_MANIPULATION = 1,
DIRECTMANIPULATION_INTERACTION_TYPE_GESTURE_TAP = 2,
DIRECTMANIPULATION_INTERACTION_TYPE_GESTURE_HOLD = 3,
DIRECTMANIPULATION_INTERACTION_TYPE_GESTURE_CROSS_SLIDE = 4,
DIRECTMANIPULATION_INTERACTION_TYPE_GESTURE_PINCH_ZOOM = 5,
DIRECTMANIPULATION_INTERACTION_END = 100
} DIRECTMANIPULATION_INTERACTION_TYPE;
// Application-implemented interface to receive notifications about interaction type events
[
local,
object,
uuid(E43F45B8-42B4-403E-B1F2-273B8F510830),
helpstring("IDirectManipulationInteractionEventHandler Interface"),
pointer_default(unique)
]
interface IDirectManipulationInteractionEventHandler : IUnknown
{
// Called when a gesture is detected.
HRESULT OnInteraction([in, annotation("_In_")] IDirectManipulationViewport2 *viewport,
[in, annotation("_In_")] DIRECTMANIPULATION_INTERACTION_TYPE interaction);
}
// This interface represents time-based information used by manipulations
[
local,
object,
uuid(fb759dba-6f4c-4c01-874e-19c8a05907f9),
helpstring("IDirectManipulationFrameInfoProvider Interface"),
pointer_default(unique)
]
interface IDirectManipulationFrameInfoProvider : IUnknown
{
// Retrieves the time, in ms, to the next frame to render.
HRESULT GetNextFrameInfo([out, annotation("_Out_")] ULONGLONG *time,
[out, annotation("_Out_")] ULONGLONG *processTime,
[out, annotation("_Out_")] ULONGLONG *compositionTime);
}
// Defines a compositor object, which drives visual updates of content on screen
[
local,
object,
uuid(537A0825-0387-4EFA-B62F-71EB1F085A7E),
helpstring("IDirectManipulationCompositor Interface"),
pointer_default(unique)
]
interface IDirectManipulationCompositor : IUnknown
{
// Adds an instance of content to be managed by the compositor, with parent and child IDCompositionVisual
HRESULT AddContent([in, annotation("_In_")] IDirectManipulationContent *content,
[in, annotation("_In_opt_")] IUnknown *device,
[in, annotation("_In_opt_")] IUnknown *parentVisual,
[in, annotation("_In_opt_")] IUnknown *childVisual);
// Removes an instance of content from being managed by the compositor
HRESULT RemoveContent([in, annotation("_In_")] IDirectManipulationContent *content);
// Specifies the update manager which will be used to handle inertia animations
HRESULT SetUpdateManager([in, annotation("_In_")] IDirectManipulationUpdateManager *updateManager);
// Flushes any pending visuals from the compositor
HRESULT Flush();
}
// Defines a compositor object, which drives visual updates of content on screen
[
local,
object,
uuid(D38C7822-F1CB-43CB-B4B9-AC0C767A412E),
helpstring("IDirectManipulationCompositor2 Interface"),
pointer_default(unique)
]
interface IDirectManipulationCompositor2 : IDirectManipulationCompositor
{
// Adds an instance of content to be managed by the compositor, with cross process chaining enabled
HRESULT AddContentWithCrossProcessChaining([in, annotation("_In_")] IDirectManipulationPrimaryContent *content,
[in, annotation("_In_opt_")] IUnknown *device,
[in, annotation("_In_opt_")] IUnknown *parentVisual,
[in, annotation("_In_opt_")] IUnknown *childVisual);
}
// Defines methods for handling inertia animation update events
[
local,
object,
uuid(790B6337-64F8-4FF5-A269-B32BC2AF27A7),
helpstring("IDirectManipulationUpdateHandler Interface"),
pointer_default(unique)
]
interface IDirectManipulationUpdateHandler : IUnknown
{
HRESULT Update();
}
// Defines methods for driving a compositor object automatically or manually
[
local,
object,
uuid(B0AE62FD-BE34-46E7-9CAA-D361FACBB9CC),
helpstring("IDirectManipulationUpdateManager Interface"),
pointer_default(unique)
]
interface IDirectManipulationUpdateManager : IUnknown
{
// Registers a callback triggered by an event handle
HRESULT RegisterWaitHandleCallback([in, annotation("_In_")] HANDLE handle,
[in, annotation("_In_")] IDirectManipulationUpdateHandler *eventHandler,
[out, annotation("_Out_")] DWORD *cookie);
// Unregisters a callback
HRESULT UnregisterWaitHandleCallback([in, annotation("_In_")] DWORD cookie);
// Manually updates Direct Manipulation for the current time
HRESULT Update([in, annotation("_In_opt_")] IDirectManipulationFrameInfoProvider *frameInfo);
}
// Defines automatic-scrolling behavior.
typedef enum DIRECTMANIPULATION_AUTOSCROLL_CONFIGURATION
{
// If there is an ongoing scrolling motion, slowly stops the motion along its direction of motion.
DIRECTMANIPULATION_AUTOSCROLL_CONFIGURATION_STOP = 0,
// Performs scrolling motion towards the end of the content.
DIRECTMANIPULATION_AUTOSCROLL_CONFIGURATION_FORWARD = 1,
// Performs scrolling motion towards the origin of the viewport.
DIRECTMANIPULATION_AUTOSCROLL_CONFIGURATION_REVERSE = 2,
} DIRECTMANIPULATION_AUTOSCROLL_CONFIGURATION;
// Behavior to perform automatic-scrolling on the viewport.
[
local,
object,
uuid(6D5954D4-2003-4356-9B31-D051C9FF0AF7),
helpstring("IDirectManipulationAutoScrollBehavior Interface"),
pointer_default(unique)
]
interface IDirectManipulationAutoScrollBehavior : IUnknown
{
// Perform a starting or stopping auto-scroll animation on the viewport.
// Note: Only translation motions x and y are supported. Combining x and y motion types is also allowed.
HRESULT SetConfiguration([in, annotation("_In_")] DIRECTMANIPULATION_MOTION_TYPES motionTypes,
[in, annotation("_In_")] DIRECTMANIPULATION_AUTOSCROLL_CONFIGURATION scrollMotion);
}
// Service to enable deferring SetContact calls with a timeout
[
local,
object,
uuid(652D5C71-FE60-4A98-BE70-E5F21291E7F1),
helpstring("IDirectManipulationDeferContactService Interface"),
pointer_default(unique)
]
interface IDirectManipulationDeferContactService : IUnknown
{
// Specifies an amount of time (in ms) before SetContact (pointerId, viewport) associations take effect.
// The maximum amount of time which can be specified is 500ms.
// This function needs to be called before SetContact (for a given pointerId).
HRESULT DeferContact([in, annotation("_In_")] UINT32 pointerId, [in, annotation("_In_")] UINT32 timeout);
// Cancel all scheduled SetContact calls for this pointerId.
// This function fails if the previously specified timeout has already been reached
HRESULT CancelContact([in, annotation("_In_")] UINT32 pointerId);
// Immediately process a previously scheduled SetContact
HRESULT CancelDeferral([in, annotation("_In_")] UINT32 pointerId);
}
cpp_quote("#endif // #if (NTDDI_VERSION > NTDDI_WIN8)")
[
uuid(9FBEDF98-F6D8-4E3B-B488-FA66DBF5E9F3),
version(1.0),
helpstring("Direct Manipulation 1.0 Type Library")
]
library DirectManipulation
{
[
noncreatable, hidden, restricted,
uuid(34E211B6-3650-4F75-8334-FA359598E1C5),
helpstring("DirectManipulationViewport Class, exposed for managed interop definitions")
]
coclass DirectManipulationViewport
{
interface IDirectManipulationViewport2;
[default] interface IDirectManipulationViewport;
}
[
noncreatable, hidden, restricted,
uuid(9FC1BFD5-1835-441A-B3B1-B6CC74B727D0),
helpstring("DirectManipulationUpdateManager Class, exposed for managed interop definitions")
]
coclass DirectManipulationUpdateManager
{
[default] interface IDirectManipulationUpdateManager;
}
[
noncreatable, hidden, restricted,
uuid(CAA02661-D59E-41C7-8393-3BA3BACB6B57),
helpstring("DirectManipulationPrimaryContent Class, exposed for managed interop definitions")
]
coclass DirectManipulationPrimaryContent
{
[default] interface IDirectManipulationPrimaryContent;
}
[
uuid(54E211B6-3650-4F75-8334-FA359598E1C5),
helpstring("DirectManipulationManager Class")
]
coclass DirectManipulationManager
{
interface IDirectManipulationManager2;
[default] interface IDirectManipulationManager;
}
[
uuid(99793286-77CC-4B57-96DB-3B354F6F9FB5),
helpstring("DirectManipulationSharedManager Class")
]
coclass DirectManipulationSharedManager
{
interface IDirectManipulationManager2;
[default] interface IDirectManipulationManager;
}
[
uuid(79DEA627-A08A-43AC-8EF5-6900B9299126),
helpstring("DCompManipulationCompositor Class")
]
coclass DCompManipulationCompositor
{
[default] interface IDirectManipulationCompositor;
interface IDirectManipulationCompositor2;
interface IDirectManipulationFrameInfoProvider;
}
}
cpp_quote("#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */")
#pragma endregion