62cdfcd034
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9055 a95241bf-73f2-0310-859d-f6bbb57e9c96
64 lines
1.6 KiB
C++
64 lines
1.6 KiB
C++
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
|
//
|
|
// Copyright (c) 2004, Haiku
|
|
//
|
|
// This software is part of the Haiku distribution and is covered
|
|
// by the Haiku license.
|
|
//
|
|
//
|
|
// File: MouseSettings.h
|
|
// Authors: Jérôme Duval,
|
|
// Andrew McCall (mccall@digitalparadise.co.uk),
|
|
// Axel Dörfler (axeld@pinc-software.de)
|
|
// Description: Input Server
|
|
// Created: August 29, 2004
|
|
//
|
|
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
|
|
|
#ifndef MOUSE_SETTINGS_H_
|
|
#define MOUSE_SETTINGS_H_
|
|
|
|
#include <SupportDefs.h>
|
|
#include <InterfaceDefs.h>
|
|
#include <kb_mouse_settings.h>
|
|
|
|
|
|
class MouseSettings {
|
|
public:
|
|
MouseSettings();
|
|
~MouseSettings();
|
|
|
|
void Defaults();
|
|
void Dump();
|
|
|
|
int32 MouseType() const { return fSettings.type; }
|
|
void SetMouseType(int32 type);
|
|
|
|
bigtime_t ClickSpeed() const;
|
|
void SetClickSpeed(bigtime_t click_speed);
|
|
|
|
int32 MouseSpeed() const { return fSettings.accel.speed; }
|
|
void SetMouseSpeed(int32 speed);
|
|
|
|
int32 AccelerationFactor() const { return fSettings.accel.accel_factor; }
|
|
void SetAccelerationFactor(int32 factor);
|
|
|
|
uint32 Mapping(int32 index) const;
|
|
void Mapping(mouse_map &map) const;
|
|
void SetMapping(int32 index, uint32 button);
|
|
void SetMapping(mouse_map &map);
|
|
|
|
mode_mouse MouseMode() const { return fMode; }
|
|
void SetMouseMode(mode_mouse mode);
|
|
|
|
private:
|
|
static status_t GetSettingsPath(BPath &path);
|
|
void RetrieveSettings();
|
|
status_t SaveSettings();
|
|
|
|
mouse_settings fSettings, fOriginalSettings;
|
|
mode_mouse fMode, fOriginalMode;
|
|
};
|
|
|
|
#endif
|