Mir
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
include
common
mir
input
keymap.h
Go to the documentation of this file.
1
/*
2
* Copyright © 2016 Canonical Ltd.
3
*
4
* This program is free software: you can redistribute it and/or modify it
5
* under the terms of the GNU Lesser General Public License version 3,
6
* as 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 Lesser General Public License for more details.
12
*
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15
*
16
* Authored by:
17
* Andreas Pokorny <andreas.pokorny@canonical.com>
18
*/
19
20
#ifndef MIR_INPUT_KEYMAP_H_
21
#define MIR_INPUT_KEYMAP_H_
22
23
#include <string>
24
25
namespace
mir
26
{
27
namespace
input
28
{
29
30
struct
Keymap
31
{
32
Keymap
() =
default
;
33
Keymap
(
std::string
&&
model
,
34
std::string
&&
layout
,
35
std::string
&&
variant
,
36
std::string
&&
options
)
37
:
model
{
model
},
layout
{
layout
},
variant
{
variant
},
options
{
options
}
38
{
39
}
40
41
Keymap
(
std::string
const
&
model
,
42
std::string
const
&
layout
,
43
std::string
const
&
variant
,
44
std::string
const
&
options
)
45
: model{model},
layout
{
layout
},
variant
{
variant
},
options
{
options
}
46
{
47
}
48
49
std::string
model
{
"pc105+inet"
};
50
std::string
layout
{
"us"
};
51
std::string
variant
;
52
std::string
options
;
53
54
};
55
56
inline
bool
operator==
(
Keymap
const
& lhs,
Keymap
const
& rhs)
57
{
58
return
lhs.
model
== rhs.
model
&&
59
lhs.
layout
== rhs.
layout
&&
60
lhs.
variant
== rhs.
variant
&&
61
lhs.
options
== rhs.
options
;
62
}
63
64
inline
bool
operator!=
(
Keymap
const
& lhs,
Keymap
const
& rhs)
65
{
66
return
!(lhs == rhs);
67
}
68
69
}
70
}
71
72
#endif
73
mir
All things Mir.
Definition:
atomic_callback.h:25
mir::input::Keymap::options
std::string options
Definition:
keymap.h:52
mir::input::Keymap::Keymap
Keymap()=default
mir::input::Keymap::layout
std::string layout
Definition:
keymap.h:50
mir::OptionType::string
mir::input::Keymap::variant
std::string variant
Definition:
keymap.h:51
mir::input::Keymap::model
std::string model
Definition:
keymap.h:49
mir::input::Keymap
Definition:
keymap.h:30
mir::input::operator!=
bool operator!=(Keymap const &lhs, Keymap const &rhs)
Definition:
keymap.h:64
mir::input::Keymap::Keymap
Keymap(std::string &&model, std::string &&layout, std::string &&variant, std::string &&options)
Definition:
keymap.h:33
mir::input::Keymap::Keymap
Keymap(std::string const &model, std::string const &layout, std::string const &variant, std::string const &options)
Definition:
keymap.h:41
mir::input::operator==
bool operator==(Keymap const &lhs, Keymap const &rhs)
Definition:
keymap.h:56
Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Sep 8 14:50:19 UTC 2016