XFcInput class Reference

Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members

# XFcInput Class Reference

Input interface class. More...

List of all members.

## Public Member Functions

virtual XFCIMPORT void | onPointerDown (INT32 aX, INT32 aY)
| Called when pointer is down.
virtual XFCIMPORT void | onPointerMove (INT32 aX, INT32 aY)
| Called when pointer moves.
virtual XFCIMPORT void | onPointerUp (INT32 aX, INT32 aY)
| Called when pointer is released.
virtual XFCIMPORT void | onKeyDown (INT32 aCode)
| Called when key is pressed.
virtual XFCIMPORT void | onKeyUp (INT32 aCode)
| Called when key is released.
virtual XFCIMPORT void | onControlDown (INT32 aCode)
| Called when a "control" is pressed.
virtual XFCIMPORT void | onControlUp (INT32 aCode)
| Called when a "control" is released.
virtual XFCIMPORT void | onCharEntered (CHAR aChar)
| Called when a character is entered.
virtual XFCIMPORT void | onJoystickMoved (INT32 aX, INT32 aY)
| Called when the analog joystick has moved.

## Detailed Description

Input interface class.

The active input listener is set by calling the static XFcCore::setController() method. Only one class may be the active input receiver at any time.

## Member Function Documentation

virtual XFCIMPORT void XFcInput::onCharEntered | ( | CHAR | aChar | ) | `[virtual]`

Called when a character is entered.

On systems where character input is supported (via keyboard for instance), in addition to onKeyDown, onKeyUp, and possibly onControlDown and onControlUp, the core calls this function to report what character the operating system feels should be inputted. Theoretically some devices may call this function even without any key events if the input mechanism does not use any keys.

Parameters:

  aChar | entered character.

virtual XFCIMPORT void XFcInput::onControlDown | ( | INT32 | aCode | ) | `[virtual]`

Called when a "control" is pressed.

Parameters:

  aCode | XFCCL_KEYCODE control code for event.

See also:
  XFCCL_KEYCODE

virtual XFCIMPORT void XFcInput::onControlUp | ( | INT32 | aCode | ) | `[virtual]`

Called when a "control" is released.

Parameters:

  aCode | XFCCL_KEYCODE control code for event.

See also:
  XFCCL_KEYCODE

virtual XFCIMPORT void XFcInput::onJoystickMoved | ( | INT32 | aX,
|  | INT32 | aY
| ) | `[virtual]`

Called when the analog joystick has moved.

This call is only supported on devices with an analog joystick. The coordinates range from -32767 to 32768.

Parameters:

  aX | joystick position along the X-axis.
  aY | joystick position along the Y-axis.

virtual XFCIMPORT void XFcInput::onKeyDown | ( | INT32 | aCode | ) | `[virtual]`

Called when key is pressed.

Parameters:

  aCode | Direct hardware keycode for event.

virtual XFCIMPORT void XFcInput::onKeyUp | ( | INT32 | aCode | ) | `[virtual]`

Called when key is released.

Parameters:

  aCode | Direct hardware keycode for event.

virtual XFCIMPORT void XFcInput::onPointerDown | ( | INT32 | aX,
|  | INT32 | aY
| ) | `[virtual]`

Called when pointer is down.

This call is only supported on devices with a touchscreen (or mouse)

Parameters:

  aX | X-coordinate for event.
  aY | Y-coordinate for event.

virtual XFCIMPORT void XFcInput::onPointerMove | ( | INT32 | aX,
|  | INT32 | aY
| ) | `[virtual]`

Called when pointer moves.

This call is only supported on devices with a touchscreen (or mouse)

Parameters:

  aX | X-coordinate for event.
  aY | Y-coordinate for event.

virtual XFCIMPORT void XFcInput::onPointerUp | ( | INT32 | aX,
|  | INT32 | aY
| ) | `[virtual]`

Called when pointer is released.

This call is only supported on devices with a touchscreen (or mouse)

Parameters:

  aX | X-coordinate for event.
  aY | Y-coordinate for event.

|  | X-Forge Documentation Confidential Copyright © 2002-2003 Fathammer |  | Documentation generated with doxygen by Dimitri van Heesch