bin/pc: Mark non-returning function as void
[haiku.git] / src / servers / input / MouseSettings.h
blobc1a385bd306f9c5652c57f82fa8e948e33d62b91
1 // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
2 //
3 // Copyright (c) 2004, Haiku
4 //
5 // This software is part of the Haiku distribution and is covered
6 // by the Haiku license.
7 //
8 //
9 // File: MouseSettings.h
10 // Authors: Jérôme Duval,
11 // Andrew McCall (mccall@digitalparadise.co.uk),
12 // Axel Dörfler (axeld@pinc-software.de)
13 // Description: Input Server
14 // Created: August 29, 2004
16 // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
18 #ifndef MOUSE_SETTINGS_H_
19 #define MOUSE_SETTINGS_H_
21 #include <InterfaceDefs.h>
22 #include <kb_mouse_settings.h>
23 #include <Path.h>
24 #include <SupportDefs.h>
27 class MouseSettings {
28 public:
29 MouseSettings();
30 ~MouseSettings();
32 void Defaults();
33 void Dump();
35 int32 MouseType() const { return fSettings.type; }
36 void SetMouseType(int32 type);
38 bigtime_t ClickSpeed() const;
39 void SetClickSpeed(bigtime_t click_speed);
41 int32 MouseSpeed() const { return fSettings.accel.speed; }
42 void SetMouseSpeed(int32 speed);
44 int32 AccelerationFactor() const
45 { return fSettings.accel.accel_factor; }
46 void SetAccelerationFactor(int32 factor);
48 uint32 Mapping(int32 index) const;
49 void Mapping(mouse_map &map) const;
50 void SetMapping(int32 index, uint32 button);
51 void SetMapping(mouse_map &map);
53 mode_mouse MouseMode() const { return fMode; }
54 void SetMouseMode(mode_mouse mode);
56 mode_focus_follows_mouse FocusFollowsMouseMode() const
57 { return fFocusFollowsMouseMode; }
58 void SetFocusFollowsMouseMode(mode_focus_follows_mouse mode);
60 bool AcceptFirstClick() const { return fAcceptFirstClick; }
61 void SetAcceptFirstClick(bool acceptFirstClick);
63 status_t SaveSettings();
65 private:
66 static status_t GetSettingsPath(BPath &path);
67 void RetrieveSettings();
69 mouse_settings fSettings, fOriginalSettings;
70 mode_mouse fMode, fOriginalMode;
71 mode_focus_follows_mouse fFocusFollowsMouseMode;
72 mode_focus_follows_mouse fOriginalFocusFollowsMouseMode;
73 bool fAcceptFirstClick;
74 bool fOriginalAcceptFirstClick;
77 #endif