- add sources.
[platform/framework/web/crosswalk.git] / src / chromeos / ime / ime_constants.h
1 // Copyright 2013 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.
4
5 #ifndef CHROMEOS_IME_IME_CONSTANTS_H_
6 #define CHROMEOS_IME_IME_CONSTANTS_H_
7
8 namespace chromeos {
9
10 // TODO(nona): Remove ibus namespace
11 namespace ibus {
12
13 // Following button indicator value is introduced from
14 // http://developer.gnome.org/gdk/stable/gdk-Event-Structures.html#GdkEventButton
15 enum IBusMouseButton {
16   IBUS_MOUSE_BUTTON_LEFT = 1U,
17   IBUS_MOUSE_BUTTON_MIDDLE = 2U,
18   IBUS_MOUSE_BUTTON_RIGHT = 3U,
19 };
20
21 // Following variables indicate state of IBusProperty.
22 enum IBusPropertyState {
23   IBUS_PROPERTY_STATE_UNCHECKED = 0,
24   IBUS_PROPERTY_STATE_CHECKED = 1,
25   IBUS_PROPERTY_STATE_INCONSISTENT = 2,
26 };
27
28 // We can't use ui/gfx/rect.h in chromeos/, so we should use ibus::Rect instead.
29 struct Rect {
30  Rect() : x(0), y(0), width(0), height(0) {}
31  Rect(int x, int y, int width, int height)
32      : x(x),
33        y(y),
34        width(width),
35        height(height) {}
36  int x;
37  int y;
38  int width;
39  int height;
40 };
41
42 // We can't use ui/base/ime/text_input_type.h in chromeos/, so we should
43 // redefine that.
44 enum TextInputType {
45   TEXT_INPUT_TYPE_NONE,
46   TEXT_INPUT_TYPE_TEXT,
47   TEXT_INPUT_TYPE_PASSWORD,
48   TEXT_INPUT_TYPE_SEARCH,
49   TEXT_INPUT_TYPE_EMAIL,
50   TEXT_INPUT_TYPE_NUMBER,
51   TEXT_INPUT_TYPE_TELEPHONE,
52   TEXT_INPUT_TYPE_URL,
53   TEXT_INPUT_TYPE_DATE,
54   TEXT_INPUT_TYPE_DATE_TIME,
55   TEXT_INPUT_TYPE_DATE_TIME_LOCAL,
56   TEXT_INPUT_TYPE_MONTH,
57   TEXT_INPUT_TYPE_TIME,
58   TEXT_INPUT_TYPE_WEEK,
59   TEXT_INPUT_TYPE_TEXT_AREA,
60   TEXT_INPUT_TYPE_CONTENT_EDITABLE,
61   TEXT_INPUT_TYPE_DATE_TIME_FIELD,
62   TEXT_INPUT_TYPE_MAX = TEXT_INPUT_TYPE_DATE_TIME_FIELD,
63 };
64
65 }  // namespace ibus
66 }  // namespace chromeos
67
68 #endif  // CHROMEOS_IME_IME_CONSTANTS_H_