GetStateInteractionContext function (interactioncontext.h)

Gets current Interaction Context state and the time when the context will return to idle state.

Syntax

HRESULT GetStateInteractionContext(
  [in]  HINTERACTIONCONTEXT interactionContext,
  [in]  const POINTER_INFO  *pointerInfo,
  [out] INTERACTION_STATE   *state
);

Parameters

[in] interactionContext

Pointer to a handle for the Interaction Context.

[in] pointerInfo

Basic pointer information common to all pointer types.

[out] state

One of the constants from INTERACTION_STATE enumeration.

Return value

If this function succeeds, it returns S_OK.

Otherwise, it returns an HRESULT error code.

Remarks

After interaction ends, the interaction context might still be busy reporting inertia, or expecting second tap in a double tap gesture (in general, if multi-stroke gesture is possible). This function allows the caller to find out when it is safe to treat the Interaction Context object as idle. The main purpose of this function is management of pools of interaction contexts.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header interactioncontext.h
Library Ninput.lib
DLL Ninput.dll