SharpDX.DirectManipulation

Represents the animation behavior of content as it approaches the boundary of a given axis or axes.

dn280387 IDirectManipulationAutoScrollBehavior IDirectManipulationAutoScrollBehavior
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Performs the auto-scroll animation for the viewport this behavior is attached to.

A combination of and from . cannot be specified.

One of the values from .

If this method succeeds, it returns . Otherwise, it returns an error code.

SetConfiguration takes effect immediately. If the content is not in inertia, and is specified for scrollMotion, then this method returns S_FALSE.

dn280388 HRESULT IDirectManipulationAutoScrollBehavior::SetConfiguration([In] DIRECTMANIPULATION_MOTION_TYPES motionTypes,[In] DIRECTMANIPULATION_AUTOSCROLL_CONFIGURATION scrollMotion) IDirectManipulationAutoScrollBehavior::SetConfiguration

Represents a compositor object that associates manipulated content with a drawing surface, such as canvas (Windows Store app using JavaScript) or Canvas (Windows Store app using C++, C#, or Visual Basic).

The content of a Direct Manipulation viewport must be manually updated during an input event for custom implementations of . Call Update to redraw the content within the viewport.

You specify manual mode on a viewport by calling either of these functions:

  • SetViewportOptions, with specified.
  • SetUpdateMode, with specified.
hh446975 IDirectManipulationCompositor IDirectManipulationCompositor

Associates content with the compositor, assigns a composition device to the content, and specifies the position of the content in the composition tree relative to other composition visuals.

Syntax
 AddContent( [in]???????????? *content, [in, optional]??   device, [in]???????????? *parentVisual, [in]???????????? *childVisual	
            );
Parameters
content [in]

The content to add to the composition tree.

content is placed between parentVisual and childVisual in the composition tree.

device [in, optional]

The device used to compose the content.

Note??device is created by the application.

parentVisual [in]

The parent in the composition tree for the content being added.

parentVisual must also be a parent of childVisual in the composition tree.

childVisual [in]

The child in the composition tree for the content being added.

parentVisual must also be a parent of childVisual in the composition tree.

Return value

If the method succeeds, it returns . Otherwise, it returns an error code.

Remarks

All content, regardless of type, must be added to the compositor. This can be primary content, obtained from the viewport by calling GetPrimaryContent, or secondary content, such as a panning indicator, created by calling CreateContent.

If the application uses a system-provided :

  • device must be an object, and parent and child visuals must be objects.
  • device, parentVisual, and childVisual cannot be null.
  • device, parentVisual, and childVisual objects are created and owned by the application.
  • When content is added to the composition tree using this method, the new composition visuals are inserted between parentVisual and childVisual. The new visuals should not be destroyed until they are disassociated from the compositor with RemoveContent.

If the application uses a custom implementation of :

  • device, parentVisual, and childVisual must be a valid type for the compositor. They do not have to be or objects.
  • device, parentVisual, and childVisual can be null, depending on the compositor.
Requirements

The content to add to the composition tree.

content is placed between parentVisual and childVisual in the composition tree.

The device used to compose the content.

Note??device is created by the application.

The parent in the composition tree for the content being added.

parentVisual must also be a parent of childVisual in the composition tree.

The child in the composition tree for the content being added.

parentVisual must also be a parent of childVisual in the composition tree.

No documentation. Hh768898 HRESULT IDirectManipulationCompositor::AddContent([In] IDirectManipulationContent* content,[In, Optional] IUnknown* device,[In, Optional] IUnknown* parentVisual,[In, Optional] IUnknown* childVisual) IDirectManipulationCompositor::AddContent

Removes content from the compositor.

Syntax
 RemoveContent( [in]?? *content	
            );
Parameters
content [in]

The content to remove from the composition tree.

Return value

If the method succeeds, it returns . Otherwise, it returns an error code.

Remarks

This method removes content added with AddContent and restores the original relationships between parent visuals and child visuals in the composition tree. In other words, RemoveContent undoes AddContent.

Requirements

The content to remove from the composition tree.

No documentation. Hh768899 HRESULT IDirectManipulationCompositor::RemoveContent([In] IDirectManipulationContent* content) IDirectManipulationCompositor::RemoveContent

Sets the update manager used to send compositor updates to Direct Manipulation.

Syntax
 SetUpdateManager( [in]?? *updateManager	
            );
Parameters
updateManager [in]

The update manager.

Return value

If the method succeeds, it returns . Otherwise, it returns an error code.

Remarks

Retrieve updateManager by calling GetUpdateManager.

Call this method during Direct Manipulation initialization to connect the compositor to the update manager.

Requirements
No documentation. No documentation. Hh768900 HRESULT IDirectManipulationCompositor::SetUpdateManager([In] IDirectManipulationUpdateManager* updateManager) IDirectManipulationCompositor::SetUpdateManager

Commits all pending updates in the compositor to the system for rendering.

Syntax
 Flush();
Parameters

This method has no parameters.

Return value

If the method succeeds, it returns . Otherwise, it returns an error code.

Remarks

This method enables Direct Manipulation to flush any pending changes to its visuals before a system event, such as a process suspension.

Requirements
No documentation. jj647930 HRESULT IDirectManipulationCompositor::Flush() IDirectManipulationCompositor::Flush

Represents a compositor object that associates manipulated content with a drawing surface, such as canvas (Windows Store app using JavaScript) or Canvas (Windows Store app using C++, C#, or Visual Basic).

The content of a Direct Manipulation viewport must be manually updated during an input event for custom implementations of . Call Update to redraw the content within the viewport.

You specify manual mode on a viewport by calling either of these functions:

  • SetViewportOptions, with specified.
  • SetUpdateMode, with specified.
hh446975 IDirectManipulationCompositor IDirectManipulationCompositor
Creates a default implementation of IDirectManipulationCompositor that wraps a DirectComposition render tree.

Associates content with the compositor, assigns a composition device to the content, and specifies the position of the content in the composition tree relative to other composition visuals.

Syntax
 AddContent( [in]???????????? *content, [in, optional]??   device, [in]???????????? *parentVisual, [in]???????????? *childVisual	
            );
Parameters
content [in]

The content to add to the composition tree.

content is placed between parentVisual and childVisual in the composition tree.

device [in, optional]

The device used to compose the content.

Note??device is created by the application.

parentVisual [in]

The parent in the composition tree for the content being added.

parentVisual must also be a parent of childVisual in the composition tree.

childVisual [in]

The child in the composition tree for the content being added.

parentVisual must also be a parent of childVisual in the composition tree.

Return value

If the method succeeds, it returns . Otherwise, it returns an error code.

Remarks

All content, regardless of type, must be added to the compositor. This can be primary content, obtained from the viewport by calling GetPrimaryContent, or secondary content, such as a panning indicator, created by calling CreateContent.

If the application uses a system-provided :

  • device must be an object, and parent and child visuals must be objects.
  • device, parentVisual, and childVisual cannot be null.
  • device, parentVisual, and childVisual objects are created and owned by the application.
  • When content is added to the composition tree using this method, the new composition visuals are inserted between parentVisual and childVisual. The new visuals should not be destroyed until they are disassociated from the compositor with RemoveContent.

If the application uses a custom implementation of :

  • device, parentVisual, and childVisual must be a valid type for the compositor. They do not have to be or objects.
  • device, parentVisual, and childVisual can be null, depending on the compositor.
Requirements

The content to add to the composition tree.

content is placed between parentVisual and childVisual in the composition tree.

The device used to compose the content.

Note??device is created by the application.

The parent in the composition tree for the content being added.

parentVisual must also be a parent of childVisual in the composition tree.

The child in the composition tree for the content being added.

parentVisual must also be a parent of childVisual in the composition tree.

No documentation. Hh768898 HRESULT IDirectManipulationCompositor::AddContent([In] IDirectManipulationContent* content,[In, Optional] IUnknown* device,[In, Optional] IUnknown* parentVisual,[In, Optional] IUnknown* childVisual) IDirectManipulationCompositor::AddContent

Removes content from the compositor.

Syntax
 RemoveContent( [in]?? *content	
            );
Parameters
content [in]

The content to remove from the composition tree.

Return value

If the method succeeds, it returns . Otherwise, it returns an error code.

Remarks

This method removes content added with AddContent and restores the original relationships between parent visuals and child visuals in the composition tree. In other words, RemoveContent undoes AddContent.

Requirements

The content to remove from the composition tree.

No documentation. Hh768899 HRESULT IDirectManipulationCompositor::RemoveContent([In] IDirectManipulationContent* content) IDirectManipulationCompositor::RemoveContent

Sets the update manager used to send compositor updates to Direct Manipulation.

Syntax
 SetUpdateManager( [in]?? *updateManager	
            );
Parameters
updateManager [in]

The update manager.

Return value

If the method succeeds, it returns . Otherwise, it returns an error code.

Remarks

Retrieve updateManager by calling GetUpdateManager.

Call this method during Direct Manipulation initialization to connect the compositor to the update manager.

Requirements
No documentation. No documentation. Hh768900 HRESULT IDirectManipulationCompositor::SetUpdateManager([In] IDirectManipulationUpdateManager* updateManager) IDirectManipulationCompositor::SetUpdateManager

Commits all pending updates in the compositor to the system for rendering.

Syntax
 Flush();
Parameters

This method has no parameters.

Return value

If the method succeeds, it returns . Otherwise, it returns an error code.

Remarks

This method enables Direct Manipulation to flush any pending changes to its visuals before a system event, such as a process suspension.

Requirements
No documentation. jj647930 HRESULT IDirectManipulationCompositor::Flush() IDirectManipulationCompositor::Flush
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Associates content with the compositor, assigns a composition device to the content, and specifies the position of the content in the composition tree relative to other composition visuals.

The content to add to the composition tree.

content is placed between parentVisual and childVisual in the composition tree.

The device used to compose the content.

Note??device is created by the application.

The parent in the composition tree for the content being added.

parentVisual must also be a parent of childVisual in the composition tree.

The child in the composition tree for the content being added.

parentVisual must also be a parent of childVisual in the composition tree.

If the method succeeds, it returns . Otherwise, it returns an error code.

All content, regardless of type, must be added to the compositor. This can be primary content, obtained from the viewport by calling GetPrimaryContent, or secondary content, such as a panning indicator, created by calling CreateContent.

If the application uses a system-provided :

  • device must be an object, and parent and child visuals must be objects.
  • device, parentVisual, and childVisual cannot be null.
  • device, parentVisual, and childVisual objects are created and owned by the application.
  • When content is added to the composition tree using this method, the new composition visuals are inserted between parentVisual and childVisual. The new visuals should not be destroyed until they are disassociated from the compositor with RemoveContent.

If the application uses a custom implementation of :

  • device, parentVisual, and childVisual must be a valid type for the compositor. They do not have to be or objects.
  • device, parentVisual, and childVisual can be null, depending on the compositor.
Hh768898 HRESULT IDirectManipulationCompositor::AddContent([In] IDirectManipulationContent* content,[In, Optional] IUnknown* device,[In, Optional] IUnknown* parentVisual,[In, Optional] IUnknown* childVisual) IDirectManipulationCompositor::AddContent

Removes content from the compositor.

The content to remove from the composition tree.

If the method succeeds, it returns . Otherwise, it returns an error code.

This method removes content added with AddContent and restores the original relationships between parent visuals and child visuals in the composition tree. In other words, RemoveContent undoes AddContent.

Hh768899 HRESULT IDirectManipulationCompositor::RemoveContent([In] IDirectManipulationContent* content) IDirectManipulationCompositor::RemoveContent

Sets the update manager used to send compositor updates to Direct Manipulation.

No documentation.

If the method succeeds, it returns . Otherwise, it returns an error code.

Retrieve updateManager by calling GetUpdateManager.

Call this method during Direct Manipulation initialization to connect the compositor to the update manager.

Hh768900 HRESULT IDirectManipulationCompositor::SetUpdateManager([In] IDirectManipulationUpdateManager* updateManager) IDirectManipulationCompositor::SetUpdateManager

Commits all pending updates in the compositor to the system for rendering.

If the method succeeds, it returns . Otherwise, it returns an error code.

This method enables Direct Manipulation to flush any pending changes to its visuals before a system event, such as a process suspension.

jj647930 HRESULT IDirectManipulationCompositor::Flush() IDirectManipulationCompositor::Flush
Return a pointer to the unmanaged version of this callback. The callback. A pointer to a shadow c++ callback

Encapsulates content inside a viewport, where content represents a visual surface clipped inside the viewport.

The content has a set of transforms that controls the visual movement of the surface during manipulation and inertia.

Note??When implementing a Direct Manipulation object, ensure that the implementation supports multithreading through thread-safe reference counting. For more information, see InterlockedIncrement and InterlockedDecrement.

The system provides an implementation of .

hh446983 IDirectManipulationContent IDirectManipulationContent
Modifies the content transform while maintaining the output transform. Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Retrieves the bounding rectangle of the content, relative to the bounding rectangle of the viewport (if defined).

The bounding rectangle of the content.

If the method succeeds, it returns . Otherwise, it returns an error code.

If the bounding rectangle has not been set using SetContentRect, then UI_E_VALUE_NOT_SET is returned. However, the actual content rectangle is (-FLT_MAX, -FLT_MAX, FLT_MAX, FLT_MAX).

Hh768901 HRESULT IDirectManipulationContent::GetContentRect([Out] RECT* contentSize) IDirectManipulationContent::GetContentRect

Specifies the bounding rectangle of the content, relative to its viewport.

The bounding rectangle of the content.

If the method succeeds, it returns . Otherwise, it returns an error code.

The default bounding rectangle is (-FLT_MAX, -FLT_MAX, FLT_MAX, FLT_MAX).

Hh768903 HRESULT IDirectManipulationContent::SetContentRect([In] const RECT* contentSize) IDirectManipulationContent::SetContentRect

Retrieves the viewport that contains the content.

A reference to the identifier of the interface to use.

The viewport object.

If the method succeeds, it returns . Otherwise, it returns an error code.

hh447011 HRESULT IDirectManipulationContent::GetViewport([In] const GUID& riid,[Out] void** object) IDirectManipulationContent::GetViewport

Retrieves the tag object set on this content.

A reference to the identifier of the interface to use. The tag object typically implements this interface.

The tag object.

The ID portion of the tag.

If the method succeeds, it returns . Otherwise, it returns an error code.

GetTag and SetTag are useful for associating an external COM object with the content without an external mapping between the two. They can also be used to pass information to callbacks generated for the content.

GetTag queries the tag value for the specified interface and returns a reference to that interface.

A tag is a pairing of an integer ID (id) with a Component Object Model (COM) object (object). It can be used by an app to identify a motion. The parameters are optional, so that the method can return both parts of the tag, the identifier portion, or the tag object.

hh447009 HRESULT IDirectManipulationContent::GetTag([In] const GUID& riid,[Out, Optional] void** object,[Out, Optional] unsigned int* id) IDirectManipulationContent::GetTag

Specifies the tag object for the content.

The object portion of the tag.

The ID portion of the tag.

If the method succeeds, it returns . Otherwise, it returns an error code.

GetTag and SetTag are useful for associating an external COM object with the content without an external mapping between the two. They can also be used to pass information to callbacks generated for the content.

A tag is a pairing of an integer ID (id) with a Component Object Model (COM) object (object). It can be used by an app to store and retrieve an arbitrary object associated with the content.

The object parameter is optional, so that the method can set just the identifier portion.

hh447021 HRESULT IDirectManipulationContent::SetTag([In, Optional] IUnknown* object,[In] unsigned int id) IDirectManipulationContent::SetTag

Gets the final transform applied to the content.

The transform matrix.

The size of the transform matrix. This value is always 6, because a 3x2 matrix is used for all direct manipulation transforms.

If the method succeeds, it returns . Otherwise, it returns an error code.

This transform might contain the other custom curves applied during manipulation and inertia.

This transform contains both the content transform and the sync transform set with SyncContentTransform.

The relationship between the three primary transforms is defined as:
Output transform = Pixel rounding (Sync transform * Content transform)
hh447007 HRESULT IDirectManipulationContent::GetOutputTransform([Out, Buffer] float* matrix,[In] unsigned int pointCount) IDirectManipulationContent::GetOutputTransform

Retrieves the transform applied to the content.

The transform matrix.

The size of the transform matrix. This value is always 6, because a 3x2 matrix is used for all direct manipulation transforms.

If the method succeeds, it returns . Otherwise, it returns an error code.

This transform contains the default overpan and bounce curves during manipulation and inertia.

This transform does not contain the sync transform set with SyncContentTransform.

The relationship between the three primary transforms is defined as:
Output transform = Pixel rounding (Sync transform * Content transform)

When this method returns, the format of matrix is:

matrix[0]=ScaleX
matrix[1]=Unused
matrix[2]=Unused
matrix[3]=ScaleY
matrix[4]=TranslateX
matrix[5]=TranslateY
Hh768902 HRESULT IDirectManipulationContent::GetContentTransform([Out, Buffer] float* matrix,[In] unsigned int pointCount) IDirectManipulationContent::GetContentTransform

Modifies the content transform while maintaining the output transform.

The transform matrix.

The size of the transform matrix. This value is always 6, because a 3x2 matrix is used for all direct manipulation transforms.

If the method succeeds, it returns . Otherwise, it returns an error code.

This method will fail if the viewport state is , or .

This method is useful when the application wants to apply transforms on top of the content transforms at the end of a manipulation, while preserving the visual output transform of the content.

The relationship between the three primary transforms is defined as:
Output transform = Pixel rounding (Sync transform * Content transform)
Hh768904 HRESULT IDirectManipulationContent::SyncContentTransform([In, Buffer] const float* matrix,[In] unsigned int pointCount) IDirectManipulationContent::SyncContentTransform
Retrieves the transform applied to the content. Gets the final transform applied to the content.

Retrieves or sets the bounding rectangle of the content, relative to the bounding rectangle of the viewport (if defined).

If the bounding rectangle has not been set using SetContentRect, then UI_E_VALUE_NOT_SET is returned. However, the actual content rectangle is (-FLT_MAX, -FLT_MAX, FLT_MAX, FLT_MAX).

Hh768901 GetContentRect / SetContentRect GetContentRect HRESULT IDirectManipulationContent::GetContentRect([Out] RECT* contentSize)

Represents behaviors for drag and drop interactions, which are triggered by cross-slide or press-and-hold gestures.

Call AddBehavior to apply the behavior on a viewport and RemoveBehavior to remove it.

If AddConfiguration, RemoveConfiguration, ActivateConfiguration, or SetManualGesture has been called successfully on a viewport, AddBehavior fails for the remaining lifetime of the viewport.

Once the behavior is added to the viewport, calls to AddConfiguration, RemoveConfiguration, ActivateConfiguration, or SetManualGesture will fail until RemoveBehavior is called.

dn280389 IDirectManipulationDragDropBehavior IDirectManipulationDragDropBehavior
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Sets the configuration of the drag-drop interaction for the viewport this behavior is attached to.

Combination of values from .

For the configuration to be valid, configuration must contain exactly one of the following three values:

If or is specified, one of or is required.

If is specified, both and are required.

If this method succeeds, it returns . Otherwise, it returns an error code.

The configuration of the behavior can be set before or after it has been added to a viewport. If a configuration change is made while an interaction is occurring, the new configuration takes effect on the next interaction. ?

should not be called prior to calling . This will result in unexpected behavior.

dn280391 HRESULT IDirectManipulationDragDropBehavior::SetConfiguration([In] DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION configuration) IDirectManipulationDragDropBehavior::SetConfiguration

Gets the status of the drag-drop interaction for the viewport this behavior is attached to.

One of the values from .

If this method succeeds, it returns . Otherwise, it returns an error code.

This method returns the drag-drop status at the time of the call and not at the time when the return value is read.

dn280390 HRESULT IDirectManipulationDragDropBehavior::GetStatus([Out] DIRECTMANIPULATION_DRAG_DROP_STATUS* status) IDirectManipulationDragDropBehavior::GetStatus

Sets the configuration of the drag-drop interaction for the viewport this behavior is attached to.

The configuration of the behavior can be set before or after it has been added to a viewport. If a configuration change is made while an interaction is occurring, the new configuration takes effect on the next interaction. ?

should not be called prior to calling . This will result in unexpected behavior.

dn280391 SetConfiguration SetConfiguration HRESULT IDirectManipulationDragDropBehavior::SetConfiguration([In] DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION configuration)

Gets the status of the drag-drop interaction for the viewport this behavior is attached to.

This method returns the drag-drop status at the time of the call and not at the time when the return value is read.

dn280390 GetStatus GetStatus HRESULT IDirectManipulationDragDropBehavior::GetStatus([Out] DIRECTMANIPULATION_DRAG_DROP_STATUS* status)

Provides access to all the Direct Manipulation features and APIs available to the client application

This is the first COM object (the object factory) created by the application to retrieve other COM objects in the Direct Manipulation API surface. It also serves to activate and deactivate Direct Manipulation functionality on a per- basis.

hh447028 IDirectManipulationManager IDirectManipulationManager
The factory method that is used to create an instance of secondary content (such as a panning indicator) inside a viewport. The type of the COM object to create. The frame info provider for the secondary content. This should match the frame info provider used to create the viewport. Class identifier (CLSID) of the secondary content. This ID specifies the content type. Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion. Constant VerticalIndicatorContent. CLSID_VerticalIndicatorContent Constant HorizontalIndicatorContent. CLSID_HorizontalIndicatorContent Constant VirtualViewportContent. CLSID_VirtualViewportContent

Activates Direct Manipulation for processing input and handling callbacks on the specified window.

No documentation.

If the method succeeds, it returns . Otherwise, it returns an error code.

The manipulation manager is deactivated, by default. The manager does not receive or respond to input and callbacks until Activate is called for the window.

Calls to Activate and Deactivate are reference counted.

hh447029 HRESULT IDirectManipulationManager::Activate([In] HWND window) IDirectManipulationManager::Activate

Deactivates Direct Manipulation for processing input and handling callbacks on the specified window.

No documentation.

If the method succeeds, it returns . Otherwise, it returns an error code.

The manipulation manager is deactivated by default. The manager does not receive or respond to input until Activate is called. The manipulation manager should be deactivated when the app does not receive or respond to input. For example, when the app is minimized.

Calls to Activate and Deactivate are reference counted.

hh447036 HRESULT IDirectManipulationManager::Deactivate([In] HWND window) IDirectManipulationManager::Deactivate

Registers a dedicated thread for hit testing.

The handle of the main app window (typically created from the UI thread).

The handle of the window in which hit testing is registered (should be created from the hit testing thread). Pass in nullptr to unregister a previously registered hit-test target.

One of the values from . Specifies whether the UI window or the hit testing window (or both) receives the hit testing WM_POINTERDOWN message , and in what order.

If the method succeeds, it returns . Otherwise, it returns an error code.

Hit testing is typically performed on the application UI thread. The application receives a WM_POINTERDOWN message on which hit-testing is performed. If a manipulation is required, SetContact is called on one or more viewports. An application can use the RegisterHitTestTarget method to delegate this hit-testing responsibility to a separate hit-testing thread.

Once a dedicated hit-test target is successfully registered, WM_POINTERDOWN messages are processed on the hit-testing thread. If a manipulation, such as pan or zoom, is required, SetContact is called from this thread.

If SetContact is not called from the hit-testing thread, WM_POINTERDOWN messages may be processed on the UI thread, depending on the specified during registration.

If SetContact is not called by either the hit-test thread or the UI thread, Direct Manipulation ignores the input which is then handled on the UI thread.

Hh768905 HRESULT IDirectManipulationManager::RegisterHitTestTarget([In] HWND window,[In, Optional] HWND hitTestWindow,[In] DIRECTMANIPULATION_HITTEST_TYPE type) IDirectManipulationManager::RegisterHitTestTarget

Passes keyboard and mouse messages to the manipulation manager on the app's UI thread.

The input message to process.

TRUE if no further processing should be done with this message; otherwise, .

If the method succeeds, it returns . Otherwise, it returns an error code.

Call this method for mouse and keyboard input.

hh447040 HRESULT IDirectManipulationManager::ProcessInput([In] const MSG* message,[Out] BOOL* handled) IDirectManipulationManager::ProcessInput

Gets a reference to an object that receives compositor updates.

No documentation. No documentation.

If the method succeeds, it returns . Otherwise, it returns an error code.

For the compositor to respond to update events from Direct Manipulation, you must associate to an object during initialization. Use GetUpdateManager to obtain a reference to a object. Pass this reference to the compositor using the SetUpdateManager method.

hh447038 HRESULT IDirectManipulationManager::GetUpdateManager([In] const GUID& riid,[Out] void** object) IDirectManipulationManager::GetUpdateManager

The factory method that is used to create a new object.

The viewport manages the interaction state and mapping of input to output actions.

No documentation. No documentation. No documentation. No documentation.

If the method succeeds, it returns . Otherwise, it returns an error code.

hh447034 HRESULT IDirectManipulationManager::CreateViewport([In, Optional] IDirectManipulationFrameInfoProvider* frameInfo,[In] HWND window,[In] const GUID& riid,[Out] void** object) IDirectManipulationManager::CreateViewport

The factory method that is used to create an instance of secondary content (such as a panning indicator) inside a viewport.

The frame info provider for the secondary content. This should match the frame info provider used to create the viewport.

Class identifier (CLSID) of the secondary content. This ID specifies the content type.

IID of the interface.

The secondary content object that implements the specified interface.

If the method succeeds, it returns . Otherwise, it returns an error code.

Primary content is automatically created at the same time as the viewport and has a one-to-one relationship to a viewport. Therefore, it is not possible to create, add, or remove primary content.

Secondary content is created independently from the viewport. There is no limit to how much secondary content can be added or removed from a viewport. All secondary content transforms are derived from those supported by the primary content with specific rules applied based on the intended purpose of the element (identified by its Class identifier (CLSID)).

hh447030 HRESULT IDirectManipulationManager::CreateContent([In, Optional] IDirectManipulationFrameInfoProvider* frameInfo,[In] const GUID& clsid,[In] const GUID& riid,[Out] void** object) IDirectManipulationManager::CreateContent

Provides a method to create configuration behaviors that can be attached to a viewport.

Note??To obtain an interface reference, QueryInterface on an existing interface reference.

dn280396 IDirectManipulationManager2 IDirectManipulationManager2
Factory method to create a behavior. The type of the COM object to create. CLSID of the behavior. The CLSID specifies the type of behavior. Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion. Constant DragDropConfigurationBehavior. CLSID_DragDropConfigurationBehavior Constant AutoScrollBehavior. CLSID_AutoScrollBehavior

Factory method to create a behavior.

CLSID of the behavior. The CLSID specifies the type of behavior.

The IID of the behavior interface to create.

The new behavior object that implements the specified interface.

If this method succeeds, it returns . Otherwise, it returns an error code.

dn280397 HRESULT IDirectManipulationManager2::CreateBehavior([In] const GUID& clsid,[In] const GUID& riid,[Out] void** object) IDirectManipulationManager2::CreateBehavior

Determines the type and direction of automatic scrolling animation to apply.

dn280383 DIRECTMANIPULATION_AUTOSCROLL_CONFIGURATION DIRECTMANIPULATION_AUTOSCROLL_CONFIGURATION

If content is scrolling, slowly stop along the direction of the motion.

dn280383 DIRECTMANIPULATION_AUTOSCROLL_CONFIGURATION_STOP DIRECTMANIPULATION_AUTOSCROLL_CONFIGURATION_STOP

Scroll towards the positive boundary of the content.

dn280383 DIRECTMANIPULATION_AUTOSCROLL_CONFIGURATION_FORWARD DIRECTMANIPULATION_AUTOSCROLL_CONFIGURATION_FORWARD

Scroll towards the origin of the content.

dn280383 DIRECTMANIPULATION_AUTOSCROLL_CONFIGURATION_REVERSE DIRECTMANIPULATION_AUTOSCROLL_CONFIGURATION_REVERSE

Defines the interaction configuration states available in Direct Manipulation.

hh446956 DIRECTMANIPULATION_CONFIGURATION DIRECTMANIPULATION_CONFIGURATION
No documentation. hh446956 DIRECTMANIPULATION_CONFIGURATION_NONE DIRECTMANIPULATION_CONFIGURATION_NONE No documentation. hh446956 DIRECTMANIPULATION_CONFIGURATION_INTERACTION DIRECTMANIPULATION_CONFIGURATION_INTERACTION No documentation. hh446956 DIRECTMANIPULATION_CONFIGURATION_TRANSLATION_X DIRECTMANIPULATION_CONFIGURATION_TRANSLATION_X No documentation. hh446956 DIRECTMANIPULATION_CONFIGURATION_TRANSLATION_Y DIRECTMANIPULATION_CONFIGURATION_TRANSLATION_Y No documentation. hh446956 DIRECTMANIPULATION_CONFIGURATION_SCALING DIRECTMANIPULATION_CONFIGURATION_SCALING No documentation. hh446956 DIRECTMANIPULATION_CONFIGURATION_TRANSLATION_INERTIA DIRECTMANIPULATION_CONFIGURATION_TRANSLATION_INERTIA No documentation. hh446956 DIRECTMANIPULATION_CONFIGURATION_SCALING_INERTIA DIRECTMANIPULATION_CONFIGURATION_SCALING_INERTIA No documentation. hh446956 DIRECTMANIPULATION_CONFIGURATION_RAILS_X DIRECTMANIPULATION_CONFIGURATION_RAILS_X No documentation. hh446956 DIRECTMANIPULATION_CONFIGURATION_RAILS_Y DIRECTMANIPULATION_CONFIGURATION_RAILS_Y

Defines behaviors for the drag-drop interaction.

dn280384 DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION

Specifies that vertical movement is applicable to the chosen gesture.

dn280384 DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_VERTICAL DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_VERTICAL

Specifies that horizontal movement is applicable to the chosen gesture.

dn280384 DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_HORIZONTAL DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_HORIZONTAL

Specifies that the gesture is to be cross-slide only.

dn280384 DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_SELECT_ONLY DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_SELECT_ONLY

Specifies that the gesture is a drag initiated by cross-slide.

dn280384 DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_SELECT_DRAG DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_SELECT_DRAG

Specifies that the gesture a drag initiated by press-and-hold.

dn280384 DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_HOLD_DRAG DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_HOLD_DRAG

Defines the drag-and-drop interaction states for the viewport.

For each interaction, the status always starts at and ends at either or . There are no explicit callbacks for the transition from CANCELLED/COMMITTED to READY.

The meaning of the CANCELLED and COMMITED values depend on the previous status.

  • For , they mean the same thing: the content goes back to the original location and no other actions should be taken.
  • FOR , COMMITED means apply the selection change; CANCELLED means avoid the selection change.
  • For , COMMITED means perform the drop action; CANCELLED means cancel the drop action.
dn280385 DIRECTMANIPULATION_DRAG_DROP_STATUS DIRECTMANIPULATION_DRAG_DROP_STATUS

The viewport is at rest and ready for input.

dn280385 DIRECTMANIPULATION_DRAG_DROP_READY DIRECTMANIPULATION_DRAG_DROP_READY

The viewport is updating its content and the content is not selected.

dn280385 DIRECTMANIPULATION_DRAG_DROP_PRESELECT DIRECTMANIPULATION_DRAG_DROP_PRESELECT

The viewport is updating its content and the content is selected.

dn280385 DIRECTMANIPULATION_DRAG_DROP_SELECTING DIRECTMANIPULATION_DRAG_DROP_SELECTING

The viewport is updating its content and the content is being dragged.

dn280385 DIRECTMANIPULATION_DRAG_DROP_DRAGGING DIRECTMANIPULATION_DRAG_DROP_DRAGGING

The viewport has concluded the interaction and requests a revert.

dn280385 DIRECTMANIPULATION_DRAG_DROP_CANCELLED DIRECTMANIPULATION_DRAG_DROP_CANCELLED

The viewport has concluded the interaction and requests a commit.

dn280385 DIRECTMANIPULATION_DRAG_DROP_COMMITTED DIRECTMANIPULATION_DRAG_DROP_COMMITTED

Defines the gestures that can be passed to SetManualGesture.

By default, Direct Manipulation always reassigns tap and press-and-hold gestures to the application.

Use to zoom instead of scale.

jj647928 DIRECTMANIPULATION_GESTURE_CONFIGURATION DIRECTMANIPULATION_GESTURE_CONFIGURATION
No documentation. jj647928 DIRECTMANIPULATION_GESTURE_NONE DIRECTMANIPULATION_GESTURE_NONE No documentation. jj647928 DIRECTMANIPULATION_GESTURE_DEFAULT DIRECTMANIPULATION_GESTURE_DEFAULT No documentation. jj647928 DIRECTMANIPULATION_GESTURE_CROSS_SLIDE_VERTICAL DIRECTMANIPULATION_GESTURE_CROSS_SLIDE_VERTICAL No documentation. jj647928 DIRECTMANIPULATION_GESTURE_CROSS_SLIDE_HORIZONTAL DIRECTMANIPULATION_GESTURE_CROSS_SLIDE_HORIZONTAL No documentation. jj647928 DIRECTMANIPULATION_GESTURE_PINCH_ZOOM DIRECTMANIPULATION_GESTURE_PINCH_ZOOM

Defines how hit testing is handled by Direct Manipulation when using a dedicated hit-test thread registered through RegisterHitTestTarget.

Hh768894 DIRECTMANIPULATION_HITTEST_TYPE DIRECTMANIPULATION_HITTEST_TYPE
No documentation. Hh768894 DIRECTMANIPULATION_HITTEST_TYPE_ASYNCHRONOUS DIRECTMANIPULATION_HITTEST_TYPE_ASYNCHRONOUS No documentation. Hh768894 DIRECTMANIPULATION_HITTEST_TYPE_SYNCHRONOUS DIRECTMANIPULATION_HITTEST_TYPE_SYNCHRONOUS No documentation. Hh768894 DIRECTMANIPULATION_HITTEST_TYPE_AUTO_SYNCHRONOUS DIRECTMANIPULATION_HITTEST_TYPE_AUTO_SYNCHRONOUS

Defines the horizontal alignment options for content within a viewport.

hh446957 DIRECTMANIPULATION_HORIZONTALALIGNMENT DIRECTMANIPULATION_HORIZONTALALIGNMENT

No alignment. The object can be positioned anywhere within the viewport.

hh446957 DIRECTMANIPULATION_HORIZONTALALIGNMENT_NONE DIRECTMANIPULATION_HORIZONTALALIGNMENT_NONE

Align object along the left side of the viewport.

hh446957 DIRECTMANIPULATION_HORIZONTALALIGNMENT_LEFT DIRECTMANIPULATION_HORIZONTALALIGNMENT_LEFT

Align object to the center of the viewport.

hh446957 DIRECTMANIPULATION_HORIZONTALALIGNMENT_CENTER DIRECTMANIPULATION_HORIZONTALALIGNMENT_CENTER

Align object along the right side of the viewport.

hh446957 DIRECTMANIPULATION_HORIZONTALALIGNMENT_RIGHT DIRECTMANIPULATION_HORIZONTALALIGNMENT_RIGHT

Content zooms around the center point of the contacts, instead of being locked with the horizontal alignment.

hh446957 DIRECTMANIPULATION_HORIZONTALALIGNMENT_UNLOCKCENTER DIRECTMANIPULATION_HORIZONTALALIGNMENT_UNLOCKCENTER

Defines the threading behavior for SetInputMode or SetUpdateMode. The exact meaning of each constant depends on the method called.

hh446958 DIRECTMANIPULATION_INPUT_MODE DIRECTMANIPULATION_INPUT_MODE
No documentation. hh446958 DIRECTMANIPULATION_INPUT_MODE_AUTOMATIC DIRECTMANIPULATION_INPUT_MODE_AUTOMATIC No documentation. hh446958 DIRECTMANIPULATION_INPUT_MODE_MANUAL DIRECTMANIPULATION_INPUT_MODE_MANUAL

Defines gestures recognized by Direct Manipulation.

dn280386 DIRECTMANIPULATION_INTERACTION_TYPE DIRECTMANIPULATION_INTERACTION_TYPE
No documentation. dn280386 DIRECTMANIPULATION_INTERACTION_BEGIN DIRECTMANIPULATION_INTERACTION_BEGIN No documentation. dn280386 DIRECTMANIPULATION_INTERACTION_TYPE_MANIPULATION DIRECTMANIPULATION_INTERACTION_TYPE_MANIPULATION No documentation. dn280386 DIRECTMANIPULATION_INTERACTION_TYPE_GESTURE_TAP DIRECTMANIPULATION_INTERACTION_TYPE_GESTURE_TAP No documentation. dn280386 DIRECTMANIPULATION_INTERACTION_TYPE_GESTURE_HOLD DIRECTMANIPULATION_INTERACTION_TYPE_GESTURE_HOLD No documentation. dn280386 DIRECTMANIPULATION_INTERACTION_TYPE_GESTURE_CROSS_SLIDE DIRECTMANIPULATION_INTERACTION_TYPE_GESTURE_CROSS_SLIDE No documentation. dn280386 DIRECTMANIPULATION_INTERACTION_TYPE_GESTURE_PINCH_ZOOM DIRECTMANIPULATION_INTERACTION_TYPE_GESTURE_PINCH_ZOOM No documentation. dn280386 DIRECTMANIPULATION_INTERACTION_END DIRECTMANIPULATION_INTERACTION_END

Defines the Direct Manipulation motion type.

hh446960 DIRECTMANIPULATION_MOTION_TYPES DIRECTMANIPULATION_MOTION_TYPES
No documentation. hh446960 DIRECTMANIPULATION_MOTION_NONE DIRECTMANIPULATION_MOTION_NONE No documentation. hh446960 DIRECTMANIPULATION_MOTION_TRANSLATEX DIRECTMANIPULATION_MOTION_TRANSLATEX No documentation. hh446960 DIRECTMANIPULATION_MOTION_TRANSLATEY DIRECTMANIPULATION_MOTION_TRANSLATEY No documentation. hh446960 DIRECTMANIPULATION_MOTION_ZOOM DIRECTMANIPULATION_MOTION_ZOOM No documentation. hh446960 DIRECTMANIPULATION_MOTION_CENTERX DIRECTMANIPULATION_MOTION_CENTERX No documentation. hh446960 DIRECTMANIPULATION_MOTION_CENTERY DIRECTMANIPULATION_MOTION_CENTERY No documentation. hh446960 DIRECTMANIPULATION_MOTION_ALL DIRECTMANIPULATION_MOTION_ALL

Defines the coordinate system for a collection of snap points.

If and are both specified, the snap points are interpreted as specified from the bottom and right boundaries of the content (the size of the content - the size of the viewport). This is intended for RTL reading scenarios where content is normally specified and rendered from right-to-left or bottom-to-top.

Hh768895 DIRECTMANIPULATION_SNAPPOINT_COORDINATE DIRECTMANIPULATION_SNAPPOINT_COORDINATE

Default.

Snap points are specified relative to the top and left boundaries of the content unless is also specified, in which case they are relative to the bottom and right boundaries of the content. For zoom, the boundary is 1.0f.

Hh768895 DIRECTMANIPULATION_COORDINATE_BOUNDARY DIRECTMANIPULATION_COORDINATE_BOUNDARY

Snap points are specified relative to the origin of the viewport.

Hh768895 DIRECTMANIPULATION_COORDINATE_ORIGIN DIRECTMANIPULATION_COORDINATE_ORIGIN

Snap points are interpreted as specified in the negative direction of the origin. The origin is shifted to the bottom and right of the viewport or content. Cannot be set for zoom.

Hh768895 DIRECTMANIPULATION_COORDINATE_MIRRORED DIRECTMANIPULATION_COORDINATE_MIRRORED

Modifies how the final inertia end position is calculated.

For or snap points, the snap points are chosen based on the natural ending position of inertia as calculated by the touch interaction engine. For or snap points, the selected snap point depends on where inertia started.

Hh768896 DIRECTMANIPULATION_SNAPPOINT_TYPE DIRECTMANIPULATION_SNAPPOINT_TYPE

Content always stops at the snap point closest to where inertia would naturally stop along the direction of inertia.

Hh768896 DIRECTMANIPULATION_SNAPPOINT_MANDATORY DIRECTMANIPULATION_SNAPPOINT_MANDATORY

Content stops at a snap point closest to where inertia would naturally stop along the direction of inertia, depending on how close the snap point is.

Hh768896 DIRECTMANIPULATION_SNAPPOINT_OPTIONAL DIRECTMANIPULATION_SNAPPOINT_OPTIONAL

Content always stops at the snap point closest to the release point along the direction of inertia.

Hh768896 DIRECTMANIPULATION_SNAPPOINT_MANDATORY_SINGLE DIRECTMANIPULATION_SNAPPOINT_MANDATORY_SINGLE

Content stops at the next snap point, if the motion starts far from it.

Hh768896 DIRECTMANIPULATION_SNAPPOINT_OPTIONAL_SINGLE DIRECTMANIPULATION_SNAPPOINT_OPTIONAL_SINGLE

Defines the possible states of Direct Manipulation. The viewport can process input in any state unless otherwise noted.

hh446962 DIRECTMANIPULATION_STATUS DIRECTMANIPULATION_STATUS
No documentation. hh446962 DIRECTMANIPULATION_BUILDING DIRECTMANIPULATION_BUILDING No documentation. hh446962 DIRECTMANIPULATION_ENABLED DIRECTMANIPULATION_ENABLED No documentation. hh446962 DIRECTMANIPULATION_DISABLED DIRECTMANIPULATION_DISABLED No documentation. hh446962 DIRECTMANIPULATION_RUNNING DIRECTMANIPULATION_RUNNING No documentation. hh446962 DIRECTMANIPULATION_INERTIA DIRECTMANIPULATION_INERTIA No documentation. hh446962 DIRECTMANIPULATION_READY DIRECTMANIPULATION_READY No documentation. hh446962 DIRECTMANIPULATION_SUSPENDED DIRECTMANIPULATION_SUSPENDED

Defines the vertical alignment settings for content within the viewport.

hh446964 DIRECTMANIPULATION_VERTICALALIGNMENT DIRECTMANIPULATION_VERTICALALIGNMENT

No alignment. The object can be positioned anywhere within the viewport.

hh446964 DIRECTMANIPULATION_VERTICALALIGNMENT_NONE DIRECTMANIPULATION_VERTICALALIGNMENT_NONE

Align object along the top of the viewport.

hh446964 DIRECTMANIPULATION_VERTICALALIGNMENT_TOP DIRECTMANIPULATION_VERTICALALIGNMENT_TOP

Align object to the center of the viewport.

hh446964 DIRECTMANIPULATION_VERTICALALIGNMENT_CENTER DIRECTMANIPULATION_VERTICALALIGNMENT_CENTER

Align object along the bottom of the viewport.

hh446964 DIRECTMANIPULATION_VERTICALALIGNMENT_BOTTOM DIRECTMANIPULATION_VERTICALALIGNMENT_BOTTOM

Content zooms around the center point of the contacts, instead of being locked with the vertical alignment.

hh446964 DIRECTMANIPULATION_VERTICALALIGNMENT_UNLOCKCENTER DIRECTMANIPULATION_VERTICALALIGNMENT_UNLOCKCENTER

Defines the input behavior options for the viewport.

is used in the SetViewportOptions method. These flags can be combined to set the input behavior for a viewport.

jj647929 DIRECTMANIPULATION_VIEWPORT_OPTIONS DIRECTMANIPULATION_VIEWPORT_OPTIONS

No special behaviors. This is the default value used to set or revert to default behavior.

jj647929 DIRECTMANIPULATION_VIEWPORT_OPTIONS_DEFAULT DIRECTMANIPULATION_VIEWPORT_OPTIONS_DEFAULT

At the end of an interaction, the viewport transitions to and then immediately to . The viewport must be explicitly enabled through the Enable method before the next interaction can be processed.

jj647929 DIRECTMANIPULATION_VIEWPORT_OPTIONS_AUTODISABLE DIRECTMANIPULATION_VIEWPORT_OPTIONS_AUTODISABLE

Update must be called to redraw the content within the viewport. The content is not updated automatically during an input event.

jj647929 DIRECTMANIPULATION_VIEWPORT_OPTIONS_MANUALUPDATE DIRECTMANIPULATION_VIEWPORT_OPTIONS_MANUALUPDATE

All input from a contact associated with the viewport is passed to the UI thread for processing.

jj647929 DIRECTMANIPULATION_VIEWPORT_OPTIONS_INPUT DIRECTMANIPULATION_VIEWPORT_OPTIONS_INPUT

If set, all WM_POINTERDOWN messages are passed to the application for hit testing. Otherwise, Direct Manipulation will process the messages for hit testing against the existing list of running viewports, and the application will not see the input.

Applies only when viewport state is or .

jj647929 DIRECTMANIPULATION_VIEWPORT_OPTIONS_EXPLICITHITTEST DIRECTMANIPULATION_VIEWPORT_OPTIONS_EXPLICITHITTEST
Functions Functions Constant KeyboardFocus. DIRECTMANIPULATION_KEYBOARDFOCUS Constant MouseFocus. DIRECTMANIPULATION_MOUSEFOCUS Constant MinimumZoom. DIRECTMANIPULATION_MINIMUM_ZOOM

Defines methods to handle drag-drop behavior events.

Note??When implementing this interface, ensure that the implementation supports multithreading through thread-safe reference counting. For more information, see InterlockedIncrement and InterlockedDecrement.

dn280392 IDirectManipulationDragDropEventHandler IDirectManipulationDragDropEventHandler
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Called when a status change happens in the viewport that the drag-and-drop behavior is attached to.

The updated viewport.

The current state of the drag-drop interaction from .

The previous state of the drag-drop interaction from .

If this method succeeds, it returns . Otherwise, it returns an error code.

If a class is implementing it should also implement if that viewport will use drag and drop. Direct Manipulation will query the instances to verify that they also implement .

dn280393 HRESULT IDirectManipulationDragDropEventHandler::OnDragDropStatusChange([In] IDirectManipulationViewport2* viewport,[In] DIRECTMANIPULATION_DRAG_DROP_STATUS current,[In] DIRECTMANIPULATION_DRAG_DROP_STATUS previous) IDirectManipulationDragDropEventHandler::OnDragDropStatusChange

Represents a time-keeping object that measures the latency of the composition infrastructure used by the application and provides this data to Direct Manipulation.

jj647931 IDirectManipulationFrameInfoProvider IDirectManipulationFrameInfoProvider
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Retrieves the composition timing information from the compositor.

The current time, in milliseconds.

The time, in milliseconds, when the compositor begins constructing the next frame.

The time, in milliseconds, when the compositor finishes composing and drawing the next frame on the screen.

If the method succeeds, it returns . Otherwise, it returns an error code.

The system implementation of uses DirectComposition. GetFrameStatistics is used to calculate the parameter values for GetNextFrameInfo.

hh446977 HRESULT IDirectManipulationFrameInfoProvider::GetNextFrameInfo([Out] unsigned longlong* time,[Out] unsigned longlong* processTime,[Out] unsigned longlong* compositionTime) IDirectManipulationFrameInfoProvider::GetNextFrameInfo

Defines methods to handle interactions when they are detected.

Note??When implementing this interface, ensure that the implementation supports multithreading through thread-safe reference counting. For more information, see InterlockedIncrement and InterlockedDecrement.

dn280394 IDirectManipulationInteractionEventHandler IDirectManipulationInteractionEventHandler
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Called when an interaction is detected.

The viewport on which the interaction was detected.

One of the values from .

If this method succeeds, it returns . Otherwise, it returns an error code.

dn280395 HRESULT IDirectManipulationInteractionEventHandler::OnInteraction([In] IDirectManipulationViewport2* viewport,[In] DIRECTMANIPULATION_INTERACTION_TYPE interaction) IDirectManipulationInteractionEventHandler::OnInteraction

Encapsulates the primary content inside a viewport. Primary content is the content specified during the creation of a viewport.

Hh768906 IDirectManipulationPrimaryContent IDirectManipulationPrimaryContent
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Specifies snap points for the inertia end position at uniform intervals.

One of the enumeration values.

The interval between each snap point.

The offset from the coordinate specified in SetSnapCoordinate.

If the method succeeds, it returns . Otherwise, it returns an error code.

Snap point locations are in content coordinate units.

Specify snap points through SetSnapPoints or SetSnapInterval.

If snap points are invalid (for example, outside of the content boundaries), they are ignored and the content is always within the content boundaries.

Snap points are not at boundaries by default. If you wish for content to stop at a boundary, a snap point must be set at the boundary.

Snap points set by SetSnapInterval can be cleared by calling SetSnapInterval with an interval of 0.0f.

Hh768911 HRESULT IDirectManipulationPrimaryContent::SetSnapInterval([In] DIRECTMANIPULATION_MOTION_TYPES motion,[In] float interval,[In] float offset) IDirectManipulationPrimaryContent::SetSnapInterval

Specifies the snap points for the inertia rest position.

One or more of the enumeration values. Only DIRECTMANIPULATION_MOTION_TRANSLATE_X, DIRECTMANIPULATION_MOTION_TRANSLATE_Y, or are allowed.

An array of snap points within the boundaries of the content to snap to. Should be specified in increasing order relative to the origin set in SetSnapCoordinate.

The size of the array of snap points. Should be greater than 0.

If the method succeeds, it returns . If there is no change in the snap points, this method can return S_FALSE. Otherwise, it returns an error code. If invalid snap points are specified, existing snap points might be affected.

If snap points are invalid (for example, outside of the content boundaries), they are ignored and the content is always within the content boundaries.

Hh768912 HRESULT IDirectManipulationPrimaryContent::SetSnapPoints([In] DIRECTMANIPULATION_MOTION_TYPES motion,[In, Buffer, Optional] const float* points,[In] unsigned int pointCount) IDirectManipulationPrimaryContent::SetSnapPoints

Specifies the type of snap point.

One or more of the enumeration values.

One of the enumeration values.

If set to DIRECTMANIPULATION_SNAPPOINT_TYPE_NONE, snap points specified through SetSnapPoints or SetSnapInterval are cleared.

If the method succeeds, it returns . Otherwise, it returns an error code.

Hh768913 HRESULT IDirectManipulationPrimaryContent::SetSnapType([In] DIRECTMANIPULATION_MOTION_TYPES motion,[In] DIRECTMANIPULATION_SNAPPOINT_TYPE type) IDirectManipulationPrimaryContent::SetSnapType

Specifies the coordinate system for snap points or snap intervals.

One of the values from .

One of the values from .

If motion is set to translation ( or ), all values of are valid.

If motion is set to , only of is valid (origin must be set to 0.0f).

The initial, or starting, snap point. All snap points are relative to this one. Only used when is set.

If motion is set to , then origin must be set to 0.0f.

If the method succeeds, it returns . Otherwise, it returns an error code.

The origin is relative to the content boundaries. If no boundary has been set (SetContentRect is never called) the default boundaries are (-FLT_MAX, FLT_MAX).

Hh768910 HRESULT IDirectManipulationPrimaryContent::SetSnapCoordinate([In] DIRECTMANIPULATION_MOTION_TYPES motion,[In] DIRECTMANIPULATION_SNAPPOINT_COORDINATE coordinate,[In] float origin) IDirectManipulationPrimaryContent::SetSnapCoordinate

Specifies the minimum and maximum boundaries for zoom.

The minimum zoom level allowed. Must be greater than or equal to 0.1f, which corresponds to 100% zoom.

The maximum zoom allowed. Must be greater than zoomMinimum and less than FLT_MAX.

If the method succeeds, it returns . Otherwise, it returns an error code.

If the content is outside the new boundaries, and the viewport is ENABLED or READY, then the content is reset to be within the new boundaries. If inertia configuration is enabled, the reset operation uses an inertia animation.

Hh768915 HRESULT IDirectManipulationPrimaryContent::SetZoomBoundaries([In] float zoomMinimum,[In] float zoomMaximum) IDirectManipulationPrimaryContent::SetZoomBoundaries

Sets the horizontal alignment of the primary content relative to the viewport.

One or more values from . The default is .

Note??You cannot combine the following options: , DIRECTMANIPULATION-HORIZONTALALIGNMENT_CENTER, . can be combined with any option but cannot be configured by itself.

If the method succeeds, it returns . Otherwise, it returns an error code.

If you have activated a configuration consisting only of zoom or zoom inertia, specify to respect the zoom center point.

Hh768909 HRESULT IDirectManipulationPrimaryContent::SetHorizontalAlignment([In] DIRECTMANIPULATION_HORIZONTALALIGNMENT alignment) IDirectManipulationPrimaryContent::SetHorizontalAlignment

Specifies the vertical alignment of the primary content in the viewport.

One or more values from .

Note??You cannot combine , , or . can be combined with any option but cannot be configured by itself.

If the method succeeds, it returns . Otherwise, it returns an error code.

If you have activated a configuration consisting only of zoom or zoom inertia, specify to respect the zoom center point.

Hh768914 HRESULT IDirectManipulationPrimaryContent::SetVerticalAlignment([In] DIRECTMANIPULATION_VERTICALALIGNMENT alignment) IDirectManipulationPrimaryContent::SetVerticalAlignment

Gets the final transform, including inertia, of the primary content.

The transformed matrix that represents the inertia ending position.

The size of the matrix.

This value is always 6, because a 3x2 matrix is used for all direct manipulation transforms.

If the method succeeds, it returns . Otherwise, it returns an error code.

Warning??Calling this method can cause a race condition if inertia has ended or been interrupted. This can also occur during the OnViewportStatusChanged callback.

Hh768908 HRESULT IDirectManipulationPrimaryContent::GetInertiaEndTransform([Out, Buffer] float* matrix,[In] unsigned int pointCount) IDirectManipulationPrimaryContent::GetInertiaEndTransform

Retrieves the center point of the manipulation in content coordinates. If there is no manipulation in progress, retrieves the center point of the viewport.

The center on the horizontal axis.

The center on the vertical axis.

If the method succeeds, it returns . Otherwise, it returns an error code.

Hh768907 HRESULT IDirectManipulationPrimaryContent::GetCenterPoint([Out] float* centerX,[Out] float* centerY) IDirectManipulationPrimaryContent::GetCenterPoint

Sets the horizontal alignment of the primary content relative to the viewport.

If you have activated a configuration consisting only of zoom or zoom inertia, specify to respect the zoom center point.

Hh768909 SetHorizontalAlignment SetHorizontalAlignment HRESULT IDirectManipulationPrimaryContent::SetHorizontalAlignment([In] DIRECTMANIPULATION_HORIZONTALALIGNMENT alignment)

Specifies the vertical alignment of the primary content in the viewport.

If you have activated a configuration consisting only of zoom or zoom inertia, specify to respect the zoom center point.

Hh768914 SetVerticalAlignment SetVerticalAlignment HRESULT IDirectManipulationPrimaryContent::SetVerticalAlignment([In] DIRECTMANIPULATION_VERTICALALIGNMENT alignment)

Defines methods for handling manipulation update events.

Note??When implementing a Direct Manipulation object, ensure that the implementation supports multithreading through thread-safe reference counting. For more information, see InterlockedIncrement and InterlockedDecrement.

hh447128 IDirectManipulationUpdateHandler IDirectManipulationUpdateHandler
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Notifies the compositor when to update inertia animation.

If this method succeeds, it returns . Otherwise, it returns an error code.

hh447130 HRESULT IDirectManipulationUpdateHandler::Update() IDirectManipulationUpdateHandler::Update

Updates Direct Manipulation at the current time.

If the application provides its own implementation of , this implementation should call Update whenever there is a compositor update. Frame timing information can be provided to Direct Manipulation through the interface.

hh447142 IDirectManipulationUpdateManager IDirectManipulationUpdateManager
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Registers a callback that is triggered by a handle.

The event handle that triggers the callback.

The event handler to call when the event is fired.

The unique ID of the event callback instance.

If the method succeeds, it returns . Otherwise, it returns an error code.

hh447134 HRESULT IDirectManipulationUpdateManager::RegisterWaitHandleCallback([In] void* handle,[In] IDirectManipulationUpdateHandler* eventHandler,[Out] unsigned int* cookie) IDirectManipulationUpdateManager::RegisterWaitHandleCallback

Deregisters a callback.

The unique ID of the event callback instance.

If the method succeeds, it returns . Otherwise, it returns an error code.

hh447136 HRESULT IDirectManipulationUpdateManager::UnregisterWaitHandleCallback([In] unsigned int cookie) IDirectManipulationUpdateManager::UnregisterWaitHandleCallback

Updates Direct Manipulation at the current time.

No documentation.

If this method succeeds, it returns . Otherwise, it returns an error code.

If the application provides its own implementation of , this implementation should call Update whenever there is a compositor update. Frame timing information can be provided to Direct Manipulation through the interface.

hh447142 HRESULT IDirectManipulationUpdateManager::Update([In, Optional] IDirectManipulationFrameInfoProvider* frameInfo) IDirectManipulationUpdateManager::Update

Defines a region within a window (referred to as a viewport) that is able to receive and process input from user interactions. The viewport contains content that moves in response to a user interaction.

hh447144 IDirectManipulationViewport IDirectManipulationViewport
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Starts or resumes input processing by the viewport.

If the method succeeds, it returns , or S_FALSE if there is no work to do (for example, the viewport is already enabled). Otherwise, it returns an error code.

This method directs a viewport to attempt to respond to input.

Call this method if the AUTODISABLE option is set.

hh447163 HRESULT IDirectManipulationViewport::Enable() IDirectManipulationViewport::Enable

Stops input processing by the viewport.

If this method succeeds, it returns . Otherwise, it returns an error code.

When a viewport is disabled, it immediately stops all transforms and moves the content to the final location.

Call this method when you want to modify multiple attributes atomically. This method can be called at any time.

The viewport will not resume processing input until Enable is called.

hh447162 HRESULT IDirectManipulationViewport::Disable() IDirectManipulationViewport::Disable

Specifies an association between a contact and the viewport.

The ID of the reference.

If the method succeeds, it returns . Otherwise, it returns an error code.

Call this method when it a WM_POINTERDOWN message is received. Upon receiving a WM_POINTERDOWN, the application can use the coordinates of the input to hit-test and determine the viewports to which the contact is associated.

After initialization, Direct Manipulation is not aware of viewport z-order or parent-child relations between viewports. The order of SetContact calls defines the viewport tree. To establish the correct viewport hierarchy, SetContact should be called first on the child-most viewport, followed by the parent, grand-parent, and so on.

Use GET_POINTERID_WPARAM to get the reference identifier from a reference message. The contact is removed automatically when WM_POINTERUP is received.

If a contact is associated with one or more viewports using the SetContact method, Direct Manipulation will examine further input from that contact and attempt to identify an appropriate manipulation based on the configuration of the associated viewports. If a manipulation is recognized, the application will then receive a WM_POINTERCAPTURECHANGED message for this contact. In this context, the WM_POINTERCAPTURECHANGED message indicates that Direct Manipulation has captured the contact and the application will not receive input from this contact that is consumed for this manipulation.

Hh768921 HRESULT IDirectManipulationViewport::SetContact([In] unsigned int pointerId) IDirectManipulationViewport::SetContact

Removes a contact that is associated with a viewport.

The ID of the reference.

If the method succeeds, it returns . Otherwise, it returns an error code.

This method releases a contact from a specific Direct Manipulation viewport (equivalent to the user removing a touch point).

The viewport state is not affected unless the last remaining contact on the viewport is removed, in which case the viewport will transition to inertia, if supported.

Hh768920 HRESULT IDirectManipulationViewport::ReleaseContact([In] unsigned int pointerId) IDirectManipulationViewport::ReleaseContact

Removes all contacts that are associated with the viewport. Inertia is started if the viewport supports inertia.

If the method succeeds, it returns . Otherwise, it returns an error code.

This is equivalent to calling ReleaseContact on every contact associated with the viewport. The outcome is equivalent to the user removing all touch points from the viewport.

If supported, inertia will be started after calling this method.

Hh768919 HRESULT IDirectManipulationViewport::ReleaseAllContacts() IDirectManipulationViewport::ReleaseAllContacts

Gets the state of the viewport.

One of the values from .

If the method succeeds, it returns . Otherwise, it returns an error code.

This method returns the viewport state at the time of the call and not at the time when the return value is read.

This method will fail if called after Abandon.

hh447167 HRESULT IDirectManipulationViewport::GetStatus([Out] DIRECTMANIPULATION_STATUS* status) IDirectManipulationViewport::GetStatus

Gets the tag value of a viewport.

IID to the interface.

The object portion of the tag.

The identifier portion of the tag.

If the method succeeds, it returns . Otherwise, it returns an error code.

A tag is a pairing of an integer ID with a Component Object Model (COM) object. It can be used by an app to identify the viewport.

The out parameters are optional, so the method can return an ID, the viewport object, or both.

hh447168 HRESULT IDirectManipulationViewport::GetTag([In] const GUID& riid,[Out, Optional] void** object,[Out, Optional] unsigned int* id) IDirectManipulationViewport::GetTag

Sets a viewport tag.

The object portion of the tag.

The ID portion of the tag.

If the method succeeds, it returns . Otherwise, it returns an error code.

A tag is a pairing of an integer ID with a Component Object Model (COM) object. It can be used by an app to identify the viewport.

The object parameter is optional, so that the method can set just an ID.

hh447180 HRESULT IDirectManipulationViewport::SetTag([In, Optional] IUnknown* object,[In] unsigned int id) IDirectManipulationViewport::SetTag

Retrieves the rectangle for the viewport relative to the origin of the viewport coordinate system specified by SetViewportRect.

No documentation.

If the method succeeds, it returns . Otherwise, it returns an error code.

Hh768918 HRESULT IDirectManipulationViewport::GetViewportRect([Out] RECT* viewport) IDirectManipulationViewport::GetViewportRect

Sets the bounding rectangle for the viewport, relative to the origin of the viewport coordinate system.

The bounding rectangle.

If the method succeeds, it returns . Otherwise, it returns an error code.

The viewport rectangle specifies the region of content that is visible to the user. In conjunction with the primary content rectangle, the viewport rectangle is used to determine chaining behaviors.

Hh768923 HRESULT IDirectManipulationViewport::SetViewportRect([In] const RECT* viewport) IDirectManipulationViewport::SetViewportRect

Moves the viewport to a specific area of the primary content and specifies whether to animate the transition.

The leftmost coordinate of the rectangle in the primary content coordinate space.

The topmost coordinate of the rectangle in the primary content coordinate space.

The rightmost coordinate of the rectangle in the primary content coordinate space.

The bottommost coordinate of the rectangle in the primary content coordinate space.

Specifies whether to animate the zoom behavior.

If the method succeeds, it returns . Otherwise, it returns an error code.

hh447184 HRESULT IDirectManipulationViewport::ZoomToRect([In] const float left,[In] const float top,[In] const float right,[In] const float bottom,[In] BOOL animate) IDirectManipulationViewport::ZoomToRect

Specifies the transform from the viewport coordinate system to the window client coordinate system.

The transform matrix, in row-wise order: _11, _12, _21, _22, _31, _32.

The size of the transform matrix. This value is always 6, because a 3x2 matrix is used for all direct manipulation transforms.

If the method succeeds, it returns . Otherwise, it returns an error code.

Call this function to specify the viewport position, scaling and orientation on the screen. Viewport position, scaling, orientation and size are uniquely determined by the viewport transform and the viewport rectangle. The application can specify the viewport transform using this method, and the viewport rectangle using SetViewportRect.

The viewport rectangle (the rectangular area inside the content that is visible to the user) is specified in viewport coordinates. If the viewport rectangle top-left point is (0,0), the viewport rectangle is positioned exactly at the viewport coordinate system origin. Viewports offset from the viewport coordinate system origin can be specified in two ways:

  • Through the viewport rectangle top-left point
  • Through the viewport transform translation component (_31, _32)

The viewport transform converts from the viewport coordinate system to the window client coordinate system. Direct Manipulation ignores the window RTL property, so the client area origin is always the top-left point. The transforms are applied in the following order:

  1. Viewport rectangle offset
  2. Viewport transform (from viewport to client coordinate system)
  3. Client to screen mapping (from client to screen coordinate system)
Hh768924 HRESULT IDirectManipulationViewport::SetViewportTransform([In, Buffer] const float* matrix,[In] unsigned int pointCount) IDirectManipulationViewport::SetViewportTransform

Specifies a display transform for the viewport, and synchronizes the output transform with the new value of the display transform.

The transform matrix, in row-wise order: _11, _12, _21, _22, _31, _32.

The size of the transform matrix. This value is always 6, because a 3x2 matrix is used for all direct manipulation transforms.

If the method succeeds, it returns . Otherwise, it returns an error code.

If the application performs special output processing of the content outside of the compositor (content not fully captured in the viewport transform), it should call this method to specify the display transform for the special processing.

The display transform affects how manipulation updates are applied to the output transform. For example, if the display transform is set to scale 3x, panning will move the content 3x the original distance.

When a display transform is changed using this method, the output transform will be synchronized to the new value of the display transform.

This method cannot be called if the viewport status is or .

Hh768926 HRESULT IDirectManipulationViewport::SyncDisplayTransform([In, Buffer] const float* matrix,[In] unsigned int pointCount) IDirectManipulationViewport::SyncDisplayTransform

Gets the primary content of a viewport that implements and .

Primary content is an element that gets transformed (e.g. moved, scaled, rotated) in response to a user interaction. Primary content is created at the same time as the viewport and cannot be added or removed.

No documentation. No documentation.

If the method succeeds, it returns . Otherwise, it returns an error code.

This method gets the content of the viewport that implements and .

hh447166 HRESULT IDirectManipulationViewport::GetPrimaryContent([In] const GUID& riid,[Out] void** object) IDirectManipulationViewport::GetPrimaryContent

Adds secondary content, such as a panning indicator, to a viewport.

The content to add to the viewport.

If this method succeeds, it returns . Otherwise, it returns an error code.

Secondary content is created by calling CreateContent. Once added, the secondary content will move relative to the primary content in response to a manipulation. Its motion is determined by rules associated with each type of secondary content.

hh447158 HRESULT IDirectManipulationViewport::AddContent([In] IDirectManipulationContent* content) IDirectManipulationViewport::AddContent

Removes secondary content from a viewport.

The content object to remove.

If this method succeeds, it returns . Otherwise, it returns an error code.

Secondary content can be removed from the viewport at any time.

hh447171 HRESULT IDirectManipulationViewport::RemoveContent([In] IDirectManipulationContent* content) IDirectManipulationViewport::RemoveContent

Sets how the viewport should handle input and output (non-default).

One or more of the values from .

If the method succeeds, it returns . Otherwise, it returns an error code.

Calling this method with set, has the same effect as calling SetViewportOptions().

jj647932 HRESULT IDirectManipulationViewport::SetViewportOptions([In] DIRECTMANIPULATION_VIEWPORT_OPTIONS options) IDirectManipulationViewport::SetViewportOptions

Adds an interaction configuration for the viewport.

One of the values from that specifies the interaction configuration for the viewport.

If the method succeeds, it returns . Otherwise, it returns an error code.

An interaction configuration specifies how the manipulation engine responds to input and which manipulations are supported. Any number of possible configurations can be added to the viewport using AddConfiguration before processing input.

Configurations can be switched by the application at runtime using ActivateConfiguration.

When a configuration is no longer required (and is not currently active), it can be removed using RemoveConfiguration.

If a configuration has not been added using AddConfiguration, it can be automatically added and then activated by calling ActivateConfiguration.

Note??If input processing is occurring, this call will fail.

This method fails if a drag and drop behavior has been specified.

A drag and drop behavior object cannot be attached after successfully calling this method.

You cannot add another drag and drop behavior after an existing one has already been added.

This method is designed to allow an application to switch pre-added configurations, as a configuration cannot be changed while a manipulation is occurring. Under most circumstances it is better to update the configuration using ActivateConfiguration.

hh447156 HRESULT IDirectManipulationViewport::AddConfiguration([In] DIRECTMANIPULATION_CONFIGURATION configuration) IDirectManipulationViewport::AddConfiguration

Removes an interaction configuration for the viewport.

One of the values from that specifies the interaction configuration for the viewport.

If the method succeeds, it returns . Otherwise, it returns an error code.

This method removes a possible configuration that was added by using AddConfiguration. This method can be called only if the configuration is not active.

An interaction configuration specifies how the manipulation engine responds to input and which gestures are supported. Any number of configurations can be added to the viewport using AddConfiguration. Configurations can be switched by the application at runtime using ActivateConfiguration. When a configuration is no longer required (and is not currently active), it can be removed using RemoveConfiguration.

hh447170 HRESULT IDirectManipulationViewport::RemoveConfiguration([In] DIRECTMANIPULATION_CONFIGURATION configuration) IDirectManipulationViewport::RemoveConfiguration

Sets the configuration for input interaction.

One or more values from that specify the interaction configuration for the viewport.

If the method succeeds, it returns . Otherwise, it returns an error code.

An interaction configuration specifies how the manipulation engine responds to input and which manipulations are supported. Any number of possible configurations can be added to the viewport using AddConfiguration before processing input.

Configurations can be switched by the application at runtime using ActivateConfiguration.

When a configuration is no longer required (and is not currently active), it can be removed using RemoveConfiguration.

If a configuration has not been added using AddConfiguration, it can be automatically added and then activated by calling ActivateConfiguration.

Note??If input processing is occurring, this call will fail.

This method fails if a drag and drop behavior has been specified.

A drag and drop behavior object cannot be attached after successfully calling this method.

hh447154 HRESULT IDirectManipulationViewport::ActivateConfiguration([In] DIRECTMANIPULATION_CONFIGURATION configuration) IDirectManipulationViewport::ActivateConfiguration

Sets which gestures are ignored by Direct Manipulation.

No documentation.

If the method succeeds, it returns . Otherwise, it returns an error code.

Use this method to specify which gestures the application processes on the UI thread. If a gesture is recognized, it will be passed to the application for processing and ignored by Direct Manipulation.

jj654881 HRESULT IDirectManipulationViewport::SetManualGesture([In] DIRECTMANIPULATION_GESTURE_CONFIGURATION configuration) IDirectManipulationViewport::SetManualGesture

Specifies the motion types supported in a viewport that can be chained to a parent viewport.

One of the values from that specifies the motion types that are enabled for this viewport.

If the method succeeds, it returns . Otherwise, it returns an error code.

hh447174 HRESULT IDirectManipulationViewport::SetChaining([In] DIRECTMANIPULATION_MOTION_TYPES enabledTypes) IDirectManipulationViewport::SetChaining

Adds a new event handler to listen for viewport events.

The handle of a window owned by the thread for the event callback.

The handler that is called when viewport status and update events occur. The specified object must implement the interface.

The handle that represents this event handler callback.

If this method succeeds, it returns . Otherwise, it returns an error code.

The event callback is fired from the thread that owns the specified window. Consecutive events of the same callback method may be coalesced.

Note??If the viewport has a drag-drop behavior attached, the event handler should implement .

hh447161 HRESULT IDirectManipulationViewport::AddEventHandler([In, Optional] HWND window,[In] IDirectManipulationViewportEventHandler* eventHandler,[Out] unsigned int* cookie) IDirectManipulationViewport::AddEventHandler

Removes an existing event handler from the viewport.

A value that was returned by a previous call to AddEventHandler.

If the method succeeds, it returns . Otherwise, it returns an error code.

hh447173 HRESULT IDirectManipulationViewport::RemoveEventHandler([In] unsigned int cookie) IDirectManipulationViewport::RemoveEventHandler

Specifies if input is visible to the UI thread.

One of the values from .

If the method succeeds, it returns . Otherwise, it returns an error code.

is the default mode for Direct Manipulation.

Direct Manipulation consumes all the input that drives the manipulation and the application receives WM_POINTERCAPTURECHANGED messages.

In some situations an application may want to receive input that is driving a manipulation. Set in this case. The application will receive all input messages, even input used by Direct Manipulation to drive a manipulation.

Note??The application will not receive WM_POINTERCAPTURECHANGED messages.

Calling this method with set, has the same effect as calling SetViewportOptions().

hh447176 HRESULT IDirectManipulationViewport::SetInputMode([In] DIRECTMANIPULATION_INPUT_MODE mode) IDirectManipulationViewport::SetInputMode

Specifies whether a viewport updates content manually instead of during an input event.

One of the values from .

If the method succeeds, it returns . Otherwise, it returns an error code.

is the default mode for Direct Manipulation. In this mode, visual updates are pushed to compositor driven by input. This is the expected mode of operation if the application is using system-provided implementation of .

If the application provides its own implementation of , it should switch viewport update mode to manual by setting . When in manual mode, the compositor pulls visual updates whenever it calls Update on Direct Manipulation.

Calling this method with set, has the same effect as calling SetViewportOptions().

Hh768922 HRESULT IDirectManipulationViewport::SetUpdateMode([In] DIRECTMANIPULATION_INPUT_MODE mode) IDirectManipulationViewport::SetUpdateMode

Stops the manipulation and returns the viewport to a ready state.

If the method succeeds, it returns . Otherwise, it returns an error code.

If a mandatory snap point has been configured, the content may animate to the nearest snap point.

Hh768925 HRESULT IDirectManipulationViewport::Stop() IDirectManipulationViewport::Stop

Releases all resources that are used by the viewport and prepares it for destruction from memory.

If the method succeeds, it returns . Otherwise, it returns an error code.

Once Abandon has been called, do not make subsequent function calls on the viewport. If a function is called after Abandon, E_INVALID_STATE will be returned.

Hh768916 HRESULT IDirectManipulationViewport::Abandon() IDirectManipulationViewport::Abandon

Specifies an association between a contact and the viewport.

Call this method when it a WM_POINTERDOWN message is received. Upon receiving a WM_POINTERDOWN, the application can use the coordinates of the input to hit-test and determine the viewports to which the contact is associated.

After initialization, Direct Manipulation is not aware of viewport z-order or parent-child relations between viewports. The order of SetContact calls defines the viewport tree. To establish the correct viewport hierarchy, SetContact should be called first on the child-most viewport, followed by the parent, grand-parent, and so on.

Use GET_POINTERID_WPARAM to get the reference identifier from a reference message. The contact is removed automatically when WM_POINTERUP is received.

If a contact is associated with one or more viewports using the SetContact method, Direct Manipulation will examine further input from that contact and attempt to identify an appropriate manipulation based on the configuration of the associated viewports. If a manipulation is recognized, the application will then receive a WM_POINTERCAPTURECHANGED message for this contact. In this context, the WM_POINTERCAPTURECHANGED message indicates that Direct Manipulation has captured the contact and the application will not receive input from this contact that is consumed for this manipulation.

Hh768921 SetContact SetContact HRESULT IDirectManipulationViewport::SetContact([In] unsigned int pointerId)

Gets the state of the viewport.

This method returns the viewport state at the time of the call and not at the time when the return value is read.

This method will fail if called after Abandon.

hh447167 GetStatus GetStatus HRESULT IDirectManipulationViewport::GetStatus([Out] DIRECTMANIPULATION_STATUS* status)

Retrieves or sets the rectangle for the viewport relative to the origin of the viewport coordinate system specified by SetViewportRect.

Hh768918 GetViewportRect / SetViewportRect GetViewportRect HRESULT IDirectManipulationViewport::GetViewportRect([Out] RECT* viewport)

Sets how the viewport should handle input and output (non-default).

Calling this method with set, has the same effect as calling SetViewportOptions().

jj647932 SetViewportOptions SetViewportOptions HRESULT IDirectManipulationViewport::SetViewportOptions([In] DIRECTMANIPULATION_VIEWPORT_OPTIONS options)

Sets which gestures are ignored by Direct Manipulation.

Use this method to specify which gestures the application processes on the UI thread. If a gesture is recognized, it will be passed to the application for processing and ignored by Direct Manipulation.

jj654881 SetManualGesture SetManualGesture HRESULT IDirectManipulationViewport::SetManualGesture([In] DIRECTMANIPULATION_GESTURE_CONFIGURATION configuration)

Specifies the motion types supported in a viewport that can be chained to a parent viewport.

hh447174 SetChaining SetChaining HRESULT IDirectManipulationViewport::SetChaining([In] DIRECTMANIPULATION_MOTION_TYPES enabledTypes)

Specifies if input is visible to the UI thread.

is the default mode for Direct Manipulation.

Direct Manipulation consumes all the input that drives the manipulation and the application receives WM_POINTERCAPTURECHANGED messages.

In some situations an application may want to receive input that is driving a manipulation. Set in this case. The application will receive all input messages, even input used by Direct Manipulation to drive a manipulation.

Note??The application will not receive WM_POINTERCAPTURECHANGED messages.

Calling this method with set, has the same effect as calling SetViewportOptions().

hh447176 SetInputMode SetInputMode HRESULT IDirectManipulationViewport::SetInputMode([In] DIRECTMANIPULATION_INPUT_MODE mode)

Specifies whether a viewport updates content manually instead of during an input event.

is the default mode for Direct Manipulation. In this mode, visual updates are pushed to compositor driven by input. This is the expected mode of operation if the application is using system-provided implementation of .

If the application provides its own implementation of , it should switch viewport update mode to manual by setting . When in manual mode, the compositor pulls visual updates whenever it calls Update on Direct Manipulation.

Calling this method with set, has the same effect as calling SetViewportOptions().

Hh768922 SetUpdateMode SetUpdateMode HRESULT IDirectManipulationViewport::SetUpdateMode([In] DIRECTMANIPULATION_INPUT_MODE mode)

Provides management of behaviors on a viewport. A behavior affects the functionality of a particular part of the Direct Manipulation workflow.

can be used in place of .

Behaviors are created using and an appropriate class ID.

A behavior can be attached or removed at any time and takes effect immediately (even during an active manipulation or inertia animation).

dn280398 IDirectManipulationViewport2 IDirectManipulationViewport2
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Adds a behavior to the viewport and returns a cookie to the caller.

A behavior created using the CreateBehavior method.

A cookie is returned so the caller can remove this behavior later. This allows the caller to release any reference on the behavior and let Direct Manipulation maintain an appropriate lifetime, similar to event handlers.

If the method succeeds, it returns . Otherwise, it returns an error code. Attaching a behavior that is already attached to this viewport or another viewport results in a failure.

A behavior takes effect immediately after AddBehavior is called. This must be considered when adding a behavior during an active manipulation or inertia phase.

dn280399 HRESULT IDirectManipulationViewport2::AddBehavior([In] IUnknown* behavior,[Out] unsigned int* cookie) IDirectManipulationViewport2::AddBehavior

Removes a behavior from the viewport that matches the given cookie.

A valid cookie returned from the AddBehavior call on the same viewport.

If the method succeeds, it returns . Otherwise, it returns an error code. If the behavior has already been removed or if the behavior is not attached to this viewport a failure is returned.

dn280401 HRESULT IDirectManipulationViewport2::RemoveBehavior([In] unsigned int cookie) IDirectManipulationViewport2::RemoveBehavior

Removes all behaviors added to the viewport.

If this method succeeds, it returns . Otherwise, it returns an error code.

RemoveAllBehaviors only returns an error if the removal of a behavior from the viewport was unsuccessful. In the event that a specific behavior is not removed successfully, RemoveAllBehaviors removes all remaining behaviors.

dn280400 HRESULT IDirectManipulationViewport2::RemoveAllBehaviors() IDirectManipulationViewport2::RemoveAllBehaviors

Called when content inside a viewport is updated.

This method is called once for each content change in the viewport. This can result in multiple OnContentUpdated calls. For instance, when the position of the content is changed, you can use IDirectManipualtionContent::GetContentTransform to retrieve the new value.

If you have actions that need to be executed once for a viewport update, implement OnViewportUpdated.

hh447148 IDirectManipulationViewportEventHandler IDirectManipulationViewportEventHandler
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Called when the status of a viewport changes.

The viewport for which status has changed.

The new status of the viewport.

The previous status of the viewport.

If the method succeeds, it returns . Otherwise, it returns an error code.

If you call GetStatus from within this handler, the status returned is not guaranteed to be the same as at the time of the call. This is because of the asynchronous nature of the notification.

hh447150 HRESULT IDirectManipulationViewportEventHandler::OnViewportStatusChanged([In] IDirectManipulationViewport* viewport,[In] DIRECTMANIPULATION_STATUS current,[In] DIRECTMANIPULATION_STATUS previous) IDirectManipulationViewportEventHandler::OnViewportStatusChanged

Called after all content in the viewport has been updated.

The viewport that has been updated.

If the method succeeds, it returns . Otherwise, it returns an error code.

If you have actions that need to be executed once for a viewport update, implement OnViewportUpdated. OnContentUpdated is called once for each content change in the viewport. This can result in multiple OnContentUpdated calls.

hh447152 HRESULT IDirectManipulationViewportEventHandler::OnViewportUpdated([In] IDirectManipulationViewport* viewport) IDirectManipulationViewportEventHandler::OnViewportUpdated

Called when content inside a viewport is updated.

The viewport that is updated.

The content in the viewport that has changed.

If the method succeeds, it returns . Otherwise, it returns an error code.

This method is called once for each content change in the viewport. This can result in multiple OnContentUpdated calls. For instance, when the position of the content is changed, you can use IDirectManipualtionContent::GetContentTransform to retrieve the new value.

If you have actions that need to be executed once for a viewport update, implement OnViewportUpdated.

hh447148 HRESULT IDirectManipulationViewportEventHandler::OnContentUpdated([In] IDirectManipulationViewport* viewport,[In] IDirectManipulationContent* content) IDirectManipulationViewportEventHandler::OnContentUpdated