~afrantzis/unity-system-compositor/fix-1491566-deadlock

« back to all changes in this revision

Viewing changes to src/mir_input_configuration.h

  • Committer: Tarmac
  • Author(s): Andreas Pokorny
  • Date: 2015-09-09 16:10:58 UTC
  • mfrom: (247.4.11 input-configuration)
  • Revision ID: tarmac-20150909161058-6kr0qayin068tgx1
Adds com.Canonical.Unity.Input to unity-system-compositor

A dbus interface to configure mouse and touchpad (and maybe other device types later). The dbus interface is modelled after the gsettings schema for the upcoming desktop. With this change the settings are just exposed but not yet forwarded to the mirserver or even the input platform.

Approved by PS Jenkins bot, Chris Halse Rogers, Alan Griffiths.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright © 2015 Canonical Ltd.
 
3
 *
 
4
 * This program is free software: you can redistribute it and/or modify
 
5
 * it under the terms of the GNU General Public License version 3 as
 
6
 * published by the Free Software Foundation.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful,
 
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
 * GNU General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU General Public License
 
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 */
 
16
 
 
17
 
 
18
#ifndef USC_MIR_INPUT_CONFIGRATION_H_
 
19
#define USC_MIR_INPUT_CONFIGRATION_H_
 
20
 
 
21
#include "input_configuration.h"
 
22
 
 
23
namespace usc
 
24
{
 
25
 
 
26
struct MirInputConfiguration : InputConfiguration
 
27
{
 
28
public:
 
29
    void set_mouse_primary_button(int32_t button) override;
 
30
    void set_mouse_cursor_speed(double speed) override;
 
31
    void set_mouse_scroll_speed(double speed) override;
 
32
    void set_touchpad_primary_button(int32_t button) override;
 
33
    void set_touchpad_cursor_speed(double speed) override;
 
34
    void set_touchpad_scroll_speed(double speed) override;
 
35
    void set_two_finger_scroll(bool enable) override;
 
36
    void set_tap_to_click(bool enable) override;
 
37
    void set_disable_touchpad_while_typing(bool enable) override;
 
38
    void set_disable_touchpad_with_mouse(bool enable) override;
 
39
private:
 
40
    int32_t mouse_primary_button{0};
 
41
    double mouse_cursor_speed{0.5};
 
42
    double mouse_scroll_speed{0.5};
 
43
    int32_t touchpad_primary_button{0};
 
44
    double touchpad_cursor_speed{0.5};
 
45
    double touchpad_scroll_speed{0.5};
 
46
    bool two_finger_scroll{false};
 
47
    bool tap_to_click{false};
 
48
    bool disable_while_typing{false};
 
49
    bool disable_with_mouse{true};
 
50
};
 
51
 
 
52
}
 
53
 
 
54
#endif