summaryrefslogtreecommitdiffstats
path: root/chromium/components/exo/keyboard_modifiers.h
blob: a232988faf232ad4e550566474093b24878fa366 (plain)
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
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_EXO_KEYBOARD_MODIFIERS_H_
#define COMPONENTS_EXO_KEYBOARD_MODIFIERS_H_

#include <stdint.h>

#include <tuple>

namespace exo {

// Represents keyboard modifiers.
struct KeyboardModifiers {
  uint32_t depressed;
  uint32_t locked;
  uint32_t latched;
  uint32_t group;
};

inline bool operator==(const KeyboardModifiers& lhs,
                       const KeyboardModifiers& rhs) {
  return std::tie(lhs.depressed, lhs.locked, lhs.latched, lhs.group) ==
         std::tie(rhs.depressed, rhs.locked, rhs.latched, rhs.group);
}

}  // namespace exo

#endif  // COMPONENTS_EXO_KEYBOARD_MODIFIERS_H_