Make UEFI boot-platform build again
[haiku.git] / headers / os / add-ons / input_server / InputServerDevice.h
blob3c335887cc99c2d9c1944c5092b9f85fe76ce88f
1 /*
2 * Copyright 2008, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _INPUTSERVERDEVICE_H
6 #define _INPUTSERVERDEVICE_H
9 #include <Input.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 {
16 char* name;
17 input_device_type type; // see Input.h
18 void* cookie;
21 // BInputServerDevice::Control() codes
22 enum {
23 // B_KEYBOARD_DEVICE notifications
24 B_KEY_MAP_CHANGED = 1,
25 B_KEY_LOCKS_CHANGED,
26 B_KEY_REPEAT_DELAY_CHANGED,
27 B_KEY_REPEAT_RATE_CHANGED,
29 // B_POINTING_DEVICE notifications
30 B_MOUSE_TYPE_CHANGED,
31 B_MOUSE_MAP_CHANGED,
32 B_MOUSE_SPEED_CHANGED,
33 B_CLICK_SPEED_CHANGED,
34 B_MOUSE_ACCELERATION_CHANGED,
37 namespace BPrivate {
38 class DeviceAddOn;
41 class BInputServerDevice {
42 public:
43 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,
52 BMessage* message);
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);
63 private:
64 virtual void _ReservedInputServerDevice1();
65 virtual void _ReservedInputServerDevice2();
66 virtual void _ReservedInputServerDevice3();
67 virtual void _ReservedInputServerDevice4();
69 BPrivate::DeviceAddOn* fOwner;
70 uint32 _reserved[4];
73 #endif // _INPUTSERVERDEVICE_H