2 * Copyright 2008, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 #ifndef _INPUTSERVERDEVICE_H
6 #define _INPUTSERVERDEVICE_H
10 #include <SupportDefs.h>
13 // Register your actual devices using this one - you can subclass
14 // this to suit your needs
15 struct input_device_ref
{
17 input_device_type type
; // see Input.h
21 // BInputServerDevice::Control() codes
23 // B_KEYBOARD_DEVICE notifications
24 B_KEY_MAP_CHANGED
= 1,
26 B_KEY_REPEAT_DELAY_CHANGED
,
27 B_KEY_REPEAT_RATE_CHANGED
,
29 // B_POINTING_DEVICE notifications
32 B_MOUSE_SPEED_CHANGED
,
33 B_CLICK_SPEED_CHANGED
,
34 B_MOUSE_ACCELERATION_CHANGED
,
41 class BInputServerDevice
{
44 virtual ~BInputServerDevice();
46 virtual status_t
InitCheck();
47 virtual status_t
SystemShuttingDown();
49 virtual status_t
Start(const char* device
, void* cookie
);
50 virtual status_t
Stop(const char* device
, void* cookie
);
51 virtual status_t
Control(const char* device
, void* cookie
, uint32 code
,
54 status_t
RegisterDevices(input_device_ref
** devices
);
55 status_t
UnregisterDevices(input_device_ref
** devices
);
57 status_t
EnqueueMessage(BMessage
* message
);
59 status_t
StartMonitoringDevice(const char* device
);
60 status_t
StopMonitoringDevice(const char* device
);
61 status_t
AddDevices(const char* path
);
64 virtual void _ReservedInputServerDevice1();
65 virtual void _ReservedInputServerDevice2();
66 virtual void _ReservedInputServerDevice3();
67 virtual void _ReservedInputServerDevice4();
69 BPrivate::DeviceAddOn
* fOwner
;
73 #endif // _INPUTSERVERDEVICE_H