Upstream version 11.39.252.0
[platform/framework/web/crosswalk.git] / src / ozone / ui / public / messages.h
1 // Copyright 2013 Intel Corporation. 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 // Multiply-included message file, hence no include guard here.
6
7 #include <string>
8
9 #include "base/basictypes.h"
10 #include "base/memory/shared_memory.h"
11 #include "base/strings/string16.h"
12 #include "ipc/ipc_message_macros.h"
13 #include "ipc/ipc_message_utils.h"
14 #include "ipc/ipc_param_traits.h"
15 #include "ipc/param_traits_macros.h"
16 #include "ozone/ui/events/window_constants.h"
17 #include "ui/events/event_constants.h"
18 #include "ui/gfx/geometry/rect.h"
19 #include "ui/gfx/ipc/gfx_param_traits.h"
20
21
22 #define IPC_MESSAGE_START LastIPCMsgStart
23
24 IPC_ENUM_TRAITS_MAX_VALUE(ui::EventFlags,
25                           ui::EF_ALTGR_DOWN)
26 IPC_ENUM_TRAITS_MAX_VALUE(ui::EventType,
27                           ui::ET_LAST)
28 IPC_ENUM_TRAITS_MAX_VALUE(ui::WidgetState,
29                           ui::DESTROYED)
30 IPC_ENUM_TRAITS_MAX_VALUE(ui::WidgetType,
31                           ui::POPUP)
32
33 IPC_MESSAGE_CONTROL2(WaylandInput_InitializeXKB,  // NOLINT(readability/fn_size)
34                      base::SharedMemoryHandle /*fd*/,
35                      uint32_t /*size*/)
36
37 IPC_MESSAGE_CONTROL2(WaylandInput_KeyNotify,  // NOLINT(readability/fn_size)
38                      ui::EventType /*type*/,
39                      unsigned /*code*/)
40
41 IPC_MESSAGE_CONTROL3(WaylandInput_VirtualKeyNotify,  // NOLINT(readability/fn_size)
42                      ui::EventType /*type*/,
43                      uint32_t /*key*/,
44                      uint32_t /*modifiers*/)
45
46 IPC_MESSAGE_CONTROL4(WaylandInput_KeyModifiers,  // NOLINT(readability/fn_size)
47                      uint32_t /*mods_depressed*/,
48                      uint32_t /*mods_latched*/,
49                      uint32_t /*mods_locked*/,
50                      uint32_t /*group*/)
51
52 IPC_MESSAGE_CONTROL2(WaylandInput_MotionNotify,  // NOLINT(readability/fn_size)
53                      float /*x*/,
54                      float /*y*/)
55
56 IPC_MESSAGE_CONTROL5(WaylandInput_ButtonNotify,  // NOLINT(readability/fn_size)
57                      unsigned /*handle*/,
58                      ui::EventType /*type*/,
59                      ui::EventFlags /*flags*/,
60                      float /*x*/,
61                      float /*y*/)
62
63 IPC_MESSAGE_CONTROL5(WaylandInput_TouchNotify,  // NOLINT(readability/fn_size)
64                      ui::EventType /*type*/,
65                      float /*x*/,
66                      float /*y*/,
67                      int32_t /*touch_id*/,
68                      uint32_t /*time_stamp*/)
69
70 IPC_MESSAGE_CONTROL4(WaylandInput_AxisNotify,  // NOLINT(readability/fn_size)
71                      float /*x*/,
72                      float /*y*/,
73                      int /*x_offset*/,
74                      int /*y_offset*/)
75
76 IPC_MESSAGE_CONTROL3(WaylandInput_PointerEnter,  // NOLINT(readability/fn_size)
77                      unsigned /*handle*/,
78                      float /*x*/,
79                      float /*y*/)
80
81 IPC_MESSAGE_CONTROL3(WaylandInput_PointerLeave,  // NOLINT(readability/fn_size)
82                      unsigned /*handle*/,
83                      float /*x*/,
84                      float /*y*/)
85
86 IPC_MESSAGE_CONTROL2(WaylandInput_OutputSize,  // NOLINT(readability/fn_size)
87                      unsigned /*width*/,
88                      unsigned /*height*/)
89
90 IPC_MESSAGE_CONTROL1(WaylandInput_CloseWidget,  // NOLINT(readability/fn_size)
91                      unsigned /*handle*/)
92
93 IPC_MESSAGE_CONTROL3(WaylandWindow_Resized,  // NOLINT(readability/fn_size)
94                      unsigned /* window handle */,
95                      unsigned /* width */,
96                      unsigned /* height */)
97
98 IPC_MESSAGE_CONTROL1(WaylandWindow_Unminimized,  // NOLINT(readability/fn_size)
99                      unsigned /*handle*/)
100
101 IPC_MESSAGE_CONTROL4(WaylandWindow_State,  // NOLINT(readability/fn_size)
102                      unsigned /* window handle */,
103                      ui::WidgetState /*state*/,
104                      unsigned /*width*/,
105                      unsigned /*height*/)
106
107 IPC_MESSAGE_CONTROL5(WaylandWindow_Attributes,  // NOLINT(readability/fn_size)
108                      unsigned /* window handle */,
109                      unsigned /* window parent */,
110                      unsigned /* x */,
111                      unsigned /* y */,
112                      ui::WidgetType /* window type */)
113
114 IPC_MESSAGE_CONTROL2(WaylandWindow_Title,  // NOLINT(readability/fn_size)
115                      unsigned /* window handle */,
116                      base::string16 /* window title */)
117
118 IPC_MESSAGE_CONTROL1(WaylandWindow_Cursor,  // NOLINT(readability/fn_size)
119                      int /* cursor type */)
120
121 IPC_MESSAGE_CONTROL0(WaylandWindow_ImeReset)  // NOLINT(readability/fn_size)
122
123 IPC_MESSAGE_CONTROL1(WaylandWindow_ImeCaretBoundsChanged, // NOLINT(readability/
124                      gfx::Rect /* ImeCaretBoundsChanged */)  //      fn_size)
125
126 IPC_MESSAGE_CONTROL0(WaylandWindow_ShowInputPanel)  // NOLINT(readability/
127                                                    //         fn_size)
128
129 IPC_MESSAGE_CONTROL0(WaylandWindow_HideInputPanel)  // NOLINT(readability/
130                                                    //         fn_size)
131
132 IPC_MESSAGE_CONTROL2(WaylandInput_Commit,  // NOLINT(readability/fn_size)
133                      unsigned,
134                      std::string)
135
136 IPC_MESSAGE_CONTROL3(WaylandInput_PreeditChanged, // NOLINT(readability/
137                      unsigned,                    //        fn_size)
138                      std::string, std::string)
139
140 IPC_MESSAGE_CONTROL0(WaylandInput_PreeditEnd)  // NOLINT(readability/fn_size)
141
142 IPC_MESSAGE_CONTROL0(WaylandInput_PreeditStart)  // NOLINT(readability/fn_size)