IInputService Interface Reference


Description

This is the internal part of the interface against the input service. It allows services to reserve keys

import "IInputService.idl";

List of all members.

Public Member Functions

void GetKeyState (in TInputKey key, out boolean state) raises (TToiInvalidArgumentException)
void GetModifiers (out long modifiers)
void ReserveKey (in TInputKey key, in long modifiers) raises (TToiInvalidPreconditionException, TToiInvalidArgumentException)
void ReleaseKey (in TInputKey key, in long modifiers) raises (TToiInvalidPreconditionException,TToiInvalidArgumentException)
void RegisterObserver (in string address) raises (TToiInvalidArgumentException)
void ReleaseObserver (in string address) raises (TToiInvalidArgumentException)

Public Types

enum  TInputModifier {
  INPUT_NO_MODIFIER, INPUT_MODIFIER_SHIFT, INPUT_MODIFIER_CAPS_LOCK, INPUT_MODIFIER_CTRL,
  INPUT_MODIFIER_ALT, INPUT_MODIFIER_NUM_LOCK, INPUT_MODIFIER_GROUP_SHIFT
}
enum  TInputKey {
  INPUT_KEY_E0, INPUT_KEY_E1, INPUT_KEY_E2, INPUT_KEY_E3,
  INPUT_KEY_E4, INPUT_KEY_E5, INPUT_KEY_E6, INPUT_KEY_E7,
  INPUT_KEY_E8, INPUT_KEY_E9, INPUT_KEY_E10, INPUT_KEY_E11,
  INPUT_KEY_E12, INPUT_KEY_E13, INPUT_KEY_BACKSPACE, INPUT_KEY_TAB,
  INPUT_KEY_D1, INPUT_KEY_D2, INPUT_KEY_D3, INPUT_KEY_D4,
  INPUT_KEY_D5, INPUT_KEY_D6, INPUT_KEY_D7, INPUT_KEY_D8,
  INPUT_KEY_D9, INPUT_KEY_D10, INPUT_KEY_D11, INPUT_KEY_D12,
  INPUT_KEY_D13, INPUT_KEY_ENTER, INPUT_KEY_CAPS_LOCK, INPUT_KEY_C1,
  INPUT_KEY_C2, INPUT_KEY_C3, INPUT_KEY_C4, INPUT_KEY_C5,
  INPUT_KEY_C6, INPUT_KEY_C7, INPUT_KEY_C8, INPUT_KEY_C9,
  INPUT_KEY_C10, INPUT_KEY_C11, INPUT_KEY_C12, INPUT_KEY_LEFT_SHIFT,
  INPUT_KEY_B0, INPUT_KEY_B1, INPUT_KEY_B2, INPUT_KEY_B3,
  INPUT_KEY_B4, INPUT_KEY_B5, INPUT_KEY_B6, INPUT_KEY_B7,
  INPUT_KEY_B8, INPUT_KEY_B9, INPUT_KEY_B10, INPUT_KEY_B11,
  INPUT_KEY_RIGHT_SHIFT, INPUT_KEY_LEFT_CTRL, INPUT_KEY_LEFT_WIN, INPUT_KEY_LEFT_ALT,
  INPUT_KEY_SPACE, INPUT_KEY_RIGHT_ALT, INPUT_KEY_RIGHT_WIN, INPUT_KEY_MENU,
  INPUT_KEY_RIGHT_CTRL, INPUT_KEY_ESC, INPUT_KEY_F1, INPUT_KEY_F2,
  INPUT_KEY_F3, INPUT_KEY_F4, INPUT_KEY_F5, INPUT_KEY_F6,
  INPUT_KEY_F7, INPUT_KEY_F8, INPUT_KEY_F9, INPUT_KEY_F10,
  INPUT_KEY_F11, INPUT_KEY_F12, INPUT_KEY_PRINT_SCREEN, INPUT_KEY_SCROLL_LOCK,
  INPUT_KEY_PAUSE, INPUT_KEY_INSERT, INPUT_KEY_HOME, INPUT_KEY_PAGE_UP,
  INPUT_KEY_DELETE, INPUT_KEY_END, INPUT_KEY_PAGE_DOWN, INPUT_KEY_UP,
  INPUT_KEY_LEFT, INPUT_KEY_DOWN, INPUT_KEY_RIGHT, INPUT_KEY_NUM_LOCK,
  INPUT_KEY_KEYPAD_DIVIDE, INPUT_KEY_KEYPAD_MULTIPLY, INPUT_KEY_KEYPAD_SUBTRACT, INPUT_KEY_KEYPAD_7,
  INPUT_KEY_KEYPAD_8, INPUT_KEY_KEYPAD_9, INPUT_KEY_KEYPAD_4, INPUT_KEY_KEYPAD_5,
  INPUT_KEY_KEYPAD_6, INPUT_KEY_KEYPAD_ADD, INPUT_KEY_KEYPAD_1, INPUT_KEY_KEYPAD_2,
  INPUT_KEY_KEYPAD_3, INPUT_KEY_KEYPAD_0, INPUT_KEY_KEYPAD_SEPARATOR, INPUT_KEY_KEYPAD_ENTER
}

Member Enumeration Documentation

Enumeration of keys.

Enumerator:
INPUT_KEY_E13 

Japanese keyboard only

INPUT_KEY_D13 

Alias for US keyboards, same as C12

INPUT_KEY_C12 

International keyboards, same as D13

INPUT_KEY_B0 

Not on US or japanese keyboards

INPUT_KEY_B11 

Japanese keyboard only

Enumeration of possible input modifiers.

Enumerator:
INPUT_NO_MODIFIER 

No Modifier

INPUT_MODIFIER_SHIFT 

Shift

INPUT_MODIFIER_CAPS_LOCK 

Caps lock

INPUT_MODIFIER_CTRL 

Control

INPUT_MODIFIER_ALT 

Alt

INPUT_MODIFIER_NUM_LOCK 

Num lock

INPUT_MODIFIER_GROUP_SHIFT 

Group shift (AltGr)


Member Function Documentation

void IInputService::GetKeyState ( in TInputKey  key,
out boolean  state 
) raises (TToiInvalidArgumentException)

Get the current state of a key.

Parameters:
key Key which state should be polled.
state True if active (down), false otherwise.
Exceptions:
TToiInvalidArgumentException. The exception is raised if the designated key doesn't exist.
void IInputService::GetModifiers ( out long  modifiers  ) 

Get all currently active modifiers.

Parameters:
modifiers Bitmask with currently active modifiers.
void IInputService::RegisterObserver ( in string  address  )  raises (TToiInvalidArgumentException)

Services can call this function to register themselves to get informed about key presses.

Parameters:
address The address to the observer implementing the IInputServiceObserver interface.
Exceptions:
TToiInvalidArgumentException Raised if the specified address is illegal.
See also:
IInputServiceObserver
void IInputService::ReleaseKey ( in TInputKey  key,
in long  modifiers 
) raises (TToiInvalidPreconditionException,TToiInvalidArgumentException)

Release a previously reserved key.

Parameters:
key Key that should be released.
modifiers A bitmask with modifiers.
Exceptions:
TToiInvalidPreconditionException. The exception is raised if the calling application hasn't made the reservation that it is trying to revert
TToiInvalidArgumentException. The exception is raised if the either the key or modifier is invalid, e.g. outside the values specified for each type.
void IInputService::ReleaseObserver ( in string  address  )  raises (TToiInvalidArgumentException)

Calling this function undoes the effect of a previous call to RegisterObserver().

Parameters:
address The name identifying the observer to be removed from the list of observers.
Exceptions:
TToiInvalidArgumentException Raised if the specified address is illegal.
See also:
RegisterObserver()
void IInputService::ReserveKey ( in TInputKey  key,
in long  modifiers 
) raises (TToiInvalidPreconditionException, TToiInvalidArgumentException)

Reserve a key. Reserved keys are reported to the application that made the reservation when it is active. It is possible to make multiple reservations for the same keycode with different modifiers.

Parameters:
key Key that should be reserved.
modifiers A bitmask with modifiers.
Exceptions:
TToiInvalidPreconditionException. The exception is raised if a previous reservation for the key with modifier has been reserved.
TToiInvalidArgumentException. The exception is raised if the either the key or modifier is invalid, e.g. outside the values specified for each type.