fat: Greatly simplify and clean up dosfs_get_file_map().
[haiku.git] / src / preferences / touchpad / TouchpadPref.h
blob94aab9c3453fd84724e7ef8aefc2f438a8897521
1 /*
2 * Copyright 2008-2009, Haiku, Inc.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Clemens Zeidler (haiku@Clemens-Zeidler.de)
7 */
8 #ifndef TOUCHPAD_PREF_H
9 #define TOUCHPAD_PREF_H
12 #include <Debug.h>
14 #include "touchpad_settings.h"
15 #include <Input.h>
16 #include <Path.h>
18 #if DEBUG
19 # define LOG(text...) PRINT((text))
20 #else
21 # define LOG(text...)
22 #endif
25 class TouchpadPref {
26 public:
27 TouchpadPref();
28 ~TouchpadPref();
30 void Revert();
31 void Defaults();
33 BPoint WindowPosition()
34 { return fWindowPosition; }
35 void SetWindowPosition(BPoint position)
36 { fWindowPosition = position; }
38 touchpad_settings& Settings()
39 { return fSettings; }
41 status_t UpdateSettings();
43 private:
44 status_t GetSettingsPath(BPath& path);
45 status_t LoadSettings();
46 status_t SaveSettings();
48 status_t ConnectToTouchPad();
50 bool fConnected;
51 BInputDevice* fTouchPad;
53 touchpad_settings fSettings;
54 touchpad_settings fStartSettings;
55 BPoint fWindowPosition;
59 #endif // TOUCHPAD_PREF_H