1 /* 2 * Copyright 2004-2006, Haiku. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Stefano Ceccherini 7 */ 8 #ifndef MOUSE_INPUT_DEVICE_H 9 #define MOUSE_INPUT_DEVICE_H 10 11 12 #include <InputServerDevice.h> 13 #include <InterfaceDefs.h> 14 #include <List.h> 15 16 17 class MouseDevice; 18 19 class MouseInputDevice : public BInputServerDevice { 20 public: 21 MouseInputDevice(); 22 ~MouseInputDevice(); 23 24 virtual status_t InitCheck(); 25 26 virtual status_t Start(const char* name, void* cookie); 27 virtual status_t Stop(const char* name, void* cookie); 28 29 virtual status_t Control(const char* name, void* cookie, 30 uint32 command, BMessage* message); 31 32 private: 33 status_t _HandleMonitor(BMessage* message); 34 void _RecursiveScan(const char* directory); 35 36 MouseDevice* _FindDevice(const char* path); 37 status_t _AddDevice(const char* path); 38 status_t _RemoveDevice(const char* path); 39 40 BList fDevices; 41 #ifdef DEBUG 42 public: 43 static FILE *sLogFile; 44 #endif 45 }; 46 47 extern "C" BInputServerDevice* instantiate_input_device(); 48 49 #endif // MOUSE_INPUT_DEVICE_H 50