The Input Server: Input Server Structures and Constants
| The Input Server Table of Contents | The Input Server Index |
Input Server Structures and Constants
Structures
input_device_ref
Declared in: be/add-ons/input_server/InputServerDevice.h
|
The input_device_ref structure is used to identify specific devices that a BInputServerDevices manages. To tell the Input Server about the devices your object manages, you create an array of these structures and pass them in a BInputServerDevice::RegisterDevices() call.
The fields are:
| Field | Meaning |
|---|---|
| const char *name | An arbitrary—but preferably human-readable—name that you invent. Although the name is used as an identifier (in Control() calls), you should choose a name that's "UI-suitable" (e.g. "ADB Mouse", or "USB Keyboard"). |
| input_device_type type | This is either B_POINTING_DEVICE (i.e. mice), B_KEYBOARD_DEVICE, or B_UNDEFINED_DEVICE, where the last of these is a catchall for anything that isn't a mouse or a keyboard. |
| void *cookie | This is an arbitrary piece of data that you can associate with the device. Use it to conveniently store some cogent piece of data (such as *this), or to more specifically identify the device (such as the pathname of the driver it corresponds to), and so on. |
Constants
Device Types
Declared in: be/interface/Input.h
|
These constants represent the different types of input devices; they're used when defining an input_device_ref structure, and when sending control messages through a BInput object.
- B_POINTING_DEVICE signifies devices, such as mice and tablets, that are used to control the cursor.
- B_KEYBOARD_DEVICE signfies keyboards.
- B_UNDEFINED_DEVICE is anything that isn't a pointer or keyboard.
![]() |
Note that there is no "joystick device"—the Input Server doesn't currently handle joysticks. |
Input, Method, Operations
Declared in: be/interface/Input.h
|
Input, Device, Notifications
Declared in: be/interface/Input.h
|
Input, Device, Control, Messages
Declared in: be/add-ons/input_server/InputServerDevice.h
|
These constants are used in the BInputServerDevice::Control() function to tell a BInputServerDevice that a change to a device parameter has been requested. See 11436: className: Control Messages for more information.
| The Input Server Table of Contents | The Input Server Index |
...in lovely HTML...
for BeOS Release 4.5.
Copyright © 1999 Be, Inc. All rights reserved.
Text last modified
