Loading...
Searching...
No Matches
Classes | Enumerations | Functions
Input.h File Reference

Undocumented file. More...

Classes

class  BInputDevice
 Undocumented class. More...
 

Enumerations

enum  input_device_notification {
  B_INPUT_DEVICE_ADDED = 0x0001 ,
  B_INPUT_DEVICE_STARTED = 0x0002 ,
  B_INPUT_DEVICE_STOPPED = 0x0004 ,
  B_INPUT_DEVICE_REMOVED = 0x0008
}
 
enum  input_device_type {
  B_POINTING_DEVICE = 0 ,
  B_KEYBOARD_DEVICE = 1 ,
  B_UNDEFINED_DEVICE = 2
}
 
enum  input_method_op {
  B_INPUT_METHOD_STARTED = 0 ,
  B_INPUT_METHOD_STOPPED = 1 ,
  B_INPUT_METHOD_CHANGED = 2 ,
  B_INPUT_METHOD_LOCATION_REQUEST = 3
}
 

Functions

BInputDevicefind_input_device (const char *name)
 Undocumented function.
 
status_t get_input_devices (BList *list)
 Undocumented function.
 
status_t watch_input_devices (BMessenger target, bool start)
 Start/stop watching input devices for state changes.
 

Detailed Description

Undocumented file.

Since
Haiku R1

Enumeration Type Documentation

◆ input_device_notification

Enumerator
B_INPUT_DEVICE_ADDED 

An input device was added to the system.

Since
Haiku R1
B_INPUT_DEVICE_STARTED 

An input device was started.

Since
Haiku R1
B_INPUT_DEVICE_STOPPED 

An input device was stopped.

Since
Haiku R1
B_INPUT_DEVICE_REMOVED 

An input device was removed from the system.

Since
Haiku R1

◆ input_device_type

Enumerator
B_POINTING_DEVICE 

Pointing devices like mice, drawing tablets, touch screens, etc.

These devices generate B_MOUSE_MOVED, B_MOUSE_UP, and B_MOUSE_DOWN messages.

Since
Haiku R1
B_KEYBOARD_DEVICE 

Key-based input devices like a keyboard, number pad, etc.

These devices generate B_KEY_DOWN, B_UNMAPPED_KEY_DOWN, B_KEY_UP, B_UNMAPPED_KEY_UP, and B_MODIFIERS_CHANGED messages.

Since
Haiku R1
B_UNDEFINED_DEVICE 

An undefined/unknown type of input device.

Since
Haiku R1

◆ input_method_op

Enumerator
B_INPUT_METHOD_STARTED 

Undocumented enum value.

Since
Haiku R1
B_INPUT_METHOD_STOPPED 

Undocumented enum value.

Since
Haiku R1
B_INPUT_METHOD_CHANGED 

Undocumented enum value.

Since
Haiku R1
B_INPUT_METHOD_LOCATION_REQUEST 

Undocumented enum value.

Since
Haiku R1

Function Documentation

◆ find_input_device()

BInputDevice * find_input_device ( const char *  name)

Undocumented function.

Parameters
nameUndocumented
Returns
Undocumented
Return values
<value>Undocumented
Since
Haiku R1

◆ get_input_devices()

status_t get_input_devices ( BList list)

Undocumented function.

Parameters
listUndocumented
Returns
Undocumented
Return values
<value>Undocumented
Since
Haiku R1

◆ watch_input_devices()

status_t watch_input_devices ( BMessenger  target,
bool  start 
)

Start/stop watching input devices for state changes.

Informs the Input Server that target would like to start/stop receiving B_INPUT_DEVICES_CHANGED messages, reflecting the state of input devices the Input Server is aware of.

The B_INPUT_DEVICES_CHANGED message contains:

  • be:opcode An input_device_notifcation constant that identifies which event occured.
  • be:device_name A string containing the device's name.
  • be:device_type An input_device_type constant representing the device's type.
Parameters
targetWhere the device state change messages should or should not be sent.
startWhether target should start/stop receiving device state change messages.
Returns
A status code.
Return values
B_OKWatching has successfully been started or stopped.
B_BAD_VALUEtarget never started watching for device state changes, though a request was made to stop watching for changes.
Othererrors depending on the state of the Input Server.
Since
Haiku R1