NvInputCallbacks Class Reference
Input handling callback interfaces. More...
#include <NvPlatformContext.h>
Inheritance diagram for NvInputCallbacks:
Public Member Functions | |
virtual bool | pointerInput (NvInputDeviceType::Enum device, NvPointerActionType::Enum action, uint32_t modifiers, int32_t count, NvPointerEvent *points, int64_t timestamp=0)=0 |
Pointer input event. | |
virtual bool | keyInput (uint32_t code, NvKeyActionType::Enum action)=0 |
Key input event Called when a key is pressed, released or held param[in] code the keycode of the event. | |
virtual bool | characterInput (uint8_t c)=0 |
Character input event Called when a keypressed, release or hold is unhandled and maps to a character param[in] c the ASCII character of the event. | |
virtual bool | gamepadChanged (uint32_t changedPadFlags)=0 |
Gamepad input event Called when any button or axis value on any active gamepad changes. |
Detailed Description
Input handling callback interfaces.Member Function Documentation
virtual bool NvInputCallbacks::characterInput | ( | uint8_t | c | ) | [pure virtual] |
Character input event Called when a keypressed, release or hold is unhandled and maps to a character param[in] c the ASCII character of the event.
- Returns:
- true if the recipient handled the event, false if the recipient wishes the caller to handle the event
Implemented in NvSampleApp.
virtual bool NvInputCallbacks::gamepadChanged | ( | uint32_t | changedPadFlags | ) | [pure virtual] |
Gamepad input event Called when any button or axis value on any active gamepad changes.
- Parameters:
-
[in] changedPadFlags a mask of the changed pad indices. For each gamepad i that has changed, bit (1<<i) will be set.
- Returns:
- true if the recipient handled the event, false if the recipient wishes the caller to handle the event
Implemented in NvSampleApp.
virtual bool NvInputCallbacks::keyInput | ( | uint32_t | code, | |
NvKeyActionType::Enum | action | |||
) | [pure virtual] |
Key input event Called when a key is pressed, released or held param[in] code the keycode of the event.
This is an NvKey mask param[in] action the action for the given key
- Returns:
- true if the recipient handled the event, false if the recipient wishes the caller to handle the event. Returning true from a key event will generally preclude any characterInput events coming from the action
Implemented in NvSampleApp.
virtual bool NvInputCallbacks::pointerInput | ( | NvInputDeviceType::Enum | device, | |
NvPointerActionType::Enum | action, | |||
uint32_t | modifiers, | |||
int32_t | count, | |||
NvPointerEvent * | points, | |||
int64_t | timestamp = 0 | |||
) | [pure virtual] |
Pointer input event.
Called when any pointer device has changed
- Parameters:
-
[in] device the device generating the event [in] action the action represented by the event [in] modifiers any modifiers to the event (normally only for mice) [in] count the number of points in the points array parameter [in] points an array of the points in the event (normally a single point unless the device is a multi-touch screen
- Returns:
- true if the recipient handled the event, false if the recipient wishes the caller to handle the event
Implemented in NvSampleApp.
The documentation for this class was generated from the following file: