Now uses a global header

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9055 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval
2004-09-24 12:41:10 +00:00
parent 4c3d76fd9b
commit 62cdfcd034
4 changed files with 5 additions and 29 deletions
+2 -4
View File
@@ -15,8 +15,6 @@
#include "KeyboardSettings.h"
const char KeyboardSettings::kKeyboardSettingsFile[] = "Keyboard_settings";
KeyboardSettings::KeyboardSettings()
{
fSettings.key_repeat_delay=200;
@@ -25,7 +23,7 @@ KeyboardSettings::KeyboardSettings()
BPath path;
if (find_directory(B_USER_SETTINGS_DIRECTORY,&path) == B_OK) {
path.Append(kKeyboardSettingsFile);
path.Append(kb_settings_file);
BFile file(path.Path(), B_READ_ONLY);
if (file.InitCheck() == B_OK) {
// Now read in the data
@@ -44,7 +42,7 @@ KeyboardSettings::~KeyboardSettings()
if (find_directory(B_USER_SETTINGS_DIRECTORY,&path) < B_OK)
return;
path.Append(kKeyboardSettingsFile);
path.Append(kb_settings_file);
BFile file(path.Path(), B_WRITE_ONLY | B_CREATE_FILE);
if (file.InitCheck() == B_OK) {
+1 -5
View File
@@ -10,11 +10,7 @@
#define KEYBOARD_SETTINGS_H_
#include <SupportDefs.h>
typedef struct {
bigtime_t key_repeat_delay;
int32 key_repeat_rate;
} kb_settings;
#include <kb_mouse_settings.h>
class KeyboardSettings {
public :
+1 -3
View File
@@ -24,8 +24,6 @@
#include "MouseSettings.h"
static const char kMouseSettingsFile[] = "Mouse_settings";
static const bigtime_t kDefaultClickSpeed = 500000;
static const int32 kDefaultMouseSpeed = 65536;
static const int32 kDefaultMouseType = 3; // 3 button mouse
@@ -54,7 +52,7 @@ MouseSettings::GetSettingsPath(BPath &path)
if (status < B_OK)
return status;
path.Append(kMouseSettingsFile);
path.Append(mouse_settings_file);
return B_OK;
}
+1 -17
View File
@@ -20,23 +20,7 @@
#include <SupportDefs.h>
#include <InterfaceDefs.h>
// ToDo: these should be defined somewhere else; the mouse
// input driver or add-on must read them as well
typedef struct {
bool enabled; // Acceleration on / off
int32 accel_factor; // accel factor: 256 = step by 1, 128 = step by 1/2
int32 speed; // speed accelerator (1=1X, 2 = 2x)...
} mouse_accel;
typedef struct {
int32 type;
mouse_map map;
mouse_accel accel;
bigtime_t click_speed;
} mouse_settings;
#include <kb_mouse_settings.h>
class MouseSettings {