Patch by Clemens Zeilder:
* Implemented Synaptics touchpad support in the PS2 bus_manager by refactoring/splitting the structure some and adding touchpad device handling. * Implemented Touchpad input_server device add-on * Created Touchpad preflet for configuring advances Synaptics touchpad options like scroll region (both horizontal and vertical) as well as other neat stuff Thanks a lot, Clemens! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28416 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -62,6 +62,8 @@ enum {
|
||||
MS_GET_CLICKSPEED,
|
||||
MS_SET_CLICKSPEED,
|
||||
MS_NUM_SERIAL_MICE,
|
||||
MS_IS_TOUCHPAD,
|
||||
MS_SET_TOUCHPAD_SETTINGS,
|
||||
|
||||
IIC_WRITE = B_DEVICE_OP_CODES_END + 200,
|
||||
RESTART_SYSTEM,
|
||||
@@ -117,6 +119,25 @@ typedef struct {
|
||||
float tilt_y;
|
||||
} tablet_movement;
|
||||
|
||||
#define B_ONE_FINGER 0x01
|
||||
#define B_TWO_FINGER 0x02
|
||||
#define B_MULTI_FINGER 0x04
|
||||
#define B_PEN 0x08
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8 buttons;
|
||||
uint32 xPosition;
|
||||
uint32 yPosition;
|
||||
uint8 zPressure;
|
||||
uint8 fingers;
|
||||
bool gesture;
|
||||
uint8 fingerWidth;
|
||||
// 1 - 4 normal width
|
||||
// 5 - 11 very wide finger or palm
|
||||
// 12 maximum reportable width; extrem wide contact
|
||||
} touchpad_movement;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// kb_mouse_driver.h
|
||||
//
|
||||
#ifndef _TOUCHPAD_DRIVER_H
|
||||
#define _TOUCHPAD_DRIVER_H
|
||||
|
||||
#include <SupportDefs.h>
|
||||
#include <Drivers.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define B_ONE_FINGER 0x01
|
||||
#define B_TWO_FINGER 0x02
|
||||
#define B_MULTI_FINGER 0x04
|
||||
#define B_PEN 0x08
|
||||
|
||||
typedef struct {
|
||||
uint8 buttons;
|
||||
uint32 xPosition;
|
||||
uint32 yPosition;
|
||||
uint8 zPressure;
|
||||
uint8 fingers;
|
||||
bool gesture;
|
||||
uint8 fingerWidth;
|
||||
// 1 - 4 normal width
|
||||
// 5 - 11 very wide finger or palm
|
||||
// 12 maximum reportable width; extrem wide contact
|
||||
} touchpad_movement;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright 2001-2008, Haiku, Inc. All Rights Reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef TOUCHPAD_SETTINGS_H
|
||||
#define TOUCHPAD_SETTINGS_H
|
||||
|
||||
#include <SupportDefs.h>
|
||||
|
||||
|
||||
typedef struct {
|
||||
bool scroll_twofinger;
|
||||
bool scroll_multifinger;
|
||||
float scroll_rightrange; // from 0 to 1
|
||||
float scroll_bottomrange; // from 0 to 1
|
||||
uint16 scroll_xstepsize;
|
||||
uint16 scroll_ystepsize;
|
||||
uint8 scroll_acceleration; // from 0 to 20
|
||||
|
||||
uint8 tapgesture_sensibility; // 0 : no tapgesture
|
||||
// 20: very light tip is enough (default)
|
||||
} touchpad_settings;
|
||||
|
||||
|
||||
const static touchpad_settings kDefaultTouchpadSettings = {
|
||||
true,
|
||||
true,
|
||||
0.15,
|
||||
0.15,
|
||||
7,
|
||||
10,
|
||||
10,
|
||||
20
|
||||
};
|
||||
|
||||
#define TOUCHPAD_SETTINGS_FILE "Touchpad_settings"
|
||||
|
||||
|
||||
#endif /* TOUCHPAD_SETTINGS_H */
|
||||
Reference in New Issue
Block a user