1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef MOJO_EXAMPLES_KEYBOARD_KEYS_H_
6 #define MOJO_EXAMPLES_KEYBOARD_KEYS_H_
10 #include "base/basictypes.h"
16 SPECIAL_KEY_SHIFT
= -1,
17 SPECIAL_KEY_NUMERIC
= -2,
18 SPECIAL_KEY_ALPHA
= -3,
22 int keyboard_code() const {
23 // Handling of keycodes differs between in windows and others.
25 return generated_code
? generated_code
: display_code
;
31 // Code used to get the value to display in the UI. This is either a
32 // KeyboardCode or a SpecialKey.
35 // How much space (as a percentage) the key is to take up.
38 // Any ui::EventFlags that are required to produce the key.
41 // If non-zero KeyboardCode to generate. If 0 use the |display_code|.
51 // Returns the rows for a qwerty style keyboard. The returned values are owned
52 // by this object and should not be deleted.
53 std::vector
<const Row
*> GetQWERTYRows();
55 // Returns the rows for a numeric keyboard. The returned values are owned
56 // by this object and should not be deleted.
57 std::vector
<const Row
*> GetNumericRows();
59 } // namespace examples
62 #endif // MOJO_EXAMPLES_KEYBOARD_KEYS_H_