File: synaptics.h

package info (click to toggle)
libsynaptics 0.14.6b-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,116 kB
  • ctags: 194
  • sloc: sh: 8,570; cpp: 701; makefile: 13
file content (104 lines) | stat: -rw-r--r-- 2,327 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
//
// License: GPL2
// Author: Stefan Kombrink
// Description:
//    a library to access the synaptics touch pad (nearly) independent of the used driver version
//

#ifndef __SYNAPTICS

#define __SYNAPTICS

#include "synshm.h"

#include <string>
#include <iostream>
#include <map>
#include <list>

namespace Synaptics
{
    //
    // type of detected pad
    //
    typedef enum
    {
        PT_NONE = 0,
        PT_ALPS,
        PT_SYNAPTICS,
        PT_MULTISYN,
        PT_UNKNOWN
    } PadType;

    //
    // type of detected driver version
    //
    typedef enum
    {
        DV_UNKNOWN = 0,     // unknown driver version or - more likely - no driver at all
        DV_OUTDATED,        // driver version is outdated and hence not supported
	DV_TOORECENT,       // driver version is too recent and hence not yet supported
        DV_SUPPORTED,       // driver version is supported
    } DriverVersion;


    // the different possible types of the shm elements
    enum ParamType
    {
        PT_VOID,
        PT_INT,
        PT_BOOL,
        PT_DOUBLE,
        PT_INT_RO,
        PT_BOOL_RO,
        PT_DOUBLE_RO
    };

    // parameter type
    typedef struct
    {
        int offset;                             // offset in shared memory area
        enum ParamType type;                    // type of parameter
        double min_val;                         // minimum allowed value
        double max_val;                         // maximum allowed value
    } Param;


    typedef enum
    {
        NoTrigger=-1,
        AllCorners=0,
        TopEdge,
        TopRightCorner,
        RightEdge,
        BottomRightCorner,
        BottomEdge,
        BottomLeftCorner,
        LeftEdge,
        TopLeftCorner
    } ScrollTrigger;

    typedef enum
    {
        NoButton=0,
        Left,
        Middle,
        Right
    } Button;

    typedef enum
    {
        RightTop = 0,          // Right top corner
        RightBottom,           // Right bottom corner
        LeftTop,               // Left top corner
        LeftBottom,            // Left bottom corner
        OneFinger,             // Non-corner tap, one finger
        TwoFingers,            // Non-corner tap, two fingers
        ThreeFingers,          // Non-corner tap, three fingers
        MaxTap
    } TapType;
}

#include "pad.h"

#endif