Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 module ui.mojom; | 5 module ui.mojom; |
| 6 | 6 |
| 7 import "services/ui/public/interfaces/cursor.mojom"; | 7 import "services/ui/public/interfaces/cursor.mojom"; |
| 8 import "services/ui/public/interfaces/display/display.mojom"; | 8 import "services/ui/public/interfaces/display/display.mojom"; |
| 9 import "services/ui/public/interfaces/event_matcher.mojom"; | 9 import "services/ui/public/interfaces/event_matcher.mojom"; |
| 10 import "services/ui/public/interfaces/window_manager_constants.mojom"; | 10 import "services/ui/public/interfaces/window_manager_constants.mojom"; |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 131 | 131 |
| 132 // Asks the WindowManager to cancel any outstanding move loop on |change_id|. | 132 // Asks the WindowManager to cancel any outstanding move loop on |change_id|. |
| 133 WmCancelMoveLoop(uint32 change_id); | 133 WmCancelMoveLoop(uint32 change_id); |
| 134 | 134 |
| 135 // An accelerator registered via AddAccelerator() has been triggered. If | 135 // An accelerator registered via AddAccelerator() has been triggered. If |
| 136 // |ack_id| is non-zero the accelerator matches a PRE_TARGET and must be | 136 // |ack_id| is non-zero the accelerator matches a PRE_TARGET and must be |
| 137 // acknowledged by WindowManagerClient::OnAcceleratorAck(). | 137 // acknowledged by WindowManagerClient::OnAcceleratorAck(). |
| 138 OnAccelerator(uint32 ack_id, uint32 accelerator_id, ui.mojom.Event event); | 138 OnAccelerator(uint32 ack_id, uint32 accelerator_id, ui.mojom.Event event); |
| 139 }; | 139 }; |
| 140 | 140 |
| 141 struct AcceleratorEvent{ | |
|
mfomitchev
2016/11/22 22:44:16
"AcceleratorEvent" implies to me "event that trigg
thanhph
2016/11/24 16:10:13
Done, I use AcceleratorTransport to avoid name con
| |
| 142 uint32 id; | |
| 143 EventMatcher event_matcher; | |
| 144 }; | |
| 145 | |
| 141 // This interface is only used as an associated interface and is associated | 146 // This interface is only used as an associated interface and is associated |
| 142 // with WindowTree. | 147 // with WindowTree. |
| 143 interface WindowManagerClient { | 148 interface WindowManagerClient { |
| 144 // Enables (or disables) child windows of |window_id| to be activated. | 149 // Enables (or disables) child windows of |window_id| to be activated. |
| 145 AddActivationParent(uint32 window_id); | 150 AddActivationParent(uint32 window_id); |
| 146 RemoveActivationParent(uint32 window_id); | 151 RemoveActivationParent(uint32 window_id); |
| 147 | 152 |
| 148 ActivateNextWindow(); | 153 ActivateNextWindow(); |
| 149 | 154 |
| 150 // Sets the underlay surface offset for the specified window and additional | 155 // Sets the underlay surface offset for the specified window and additional |
| 151 // hit area. The underlay surface is drawn at the bounds of the window minus | 156 // hit area. The underlay surface is drawn at the bounds of the window minus |
| 152 // the offset. The hit area is extended from the bounds of the window by | 157 // the offset. The hit area is extended from the bounds of the window by |
| 153 // |hit_area|. | 158 // |hit_area|. |
| 154 SetUnderlaySurfaceOffsetAndExtendedHitArea(uint32 window_id, | 159 SetUnderlaySurfaceOffsetAndExtendedHitArea(uint32 window_id, |
| 155 int32 x_offset, | 160 int32 x_offset, |
| 156 int32 y_offset, | 161 int32 y_offset, |
| 157 gfx.mojom.Insets hit_area); | 162 gfx.mojom.Insets hit_area); |
| 158 | 163 |
| 159 // Add and remove accelerators. When accelerators are registered the | 164 // Add and remove accelerators. When accelerators are registered the |
| 160 // WindowManager receives the event via OnAccelerator() rather than the | 165 // WindowManager receives the event via OnAccelerator() rather than the |
| 161 // target window. The id is defined by the client and can be used to more | 166 // target window. The id is defined by the client and can be used to more |
| 162 // easily identify the accelerator's action. If an accelerator with the same | 167 // easily identify the accelerator's action. If an accelerator with the same |
| 163 // id or the same matcher already exists, then the accelerator is not added. | 168 // id or the same matcher already exists, then the accelerator is not added. |
| 164 // Accelerator ids 1 << 31 and above are reserved for internal use. | 169 // Accelerator ids 1 << 31 and above are reserved for internal use. |
| 165 // | 170 // |
| 166 // See WindowTree for details on event dispatch. | 171 // See WindowTree for details on event dispatch. |
| 167 AddAccelerator(uint32 id, EventMatcher matcher) => (bool success); | 172 AddAccelerator(array<AcceleratorEvent> multi_accelerators) => (bool success); |
| 168 RemoveAccelerator(uint32 id); | 173 RemoveAccelerator(uint32 id); |
| 169 | 174 |
| 170 // The window manager has completed a request with the specific change id. | 175 // The window manager has completed a request with the specific change id. |
| 171 WmResponse(uint32 change_id, bool response); | 176 WmResponse(uint32 change_id, bool response); |
| 172 | 177 |
| 173 // Calls WindowTreeClient::RequestClose() on the embedded app at the | 178 // Calls WindowTreeClient::RequestClose() on the embedded app at the |
| 174 // specified window. | 179 // specified window. |
| 175 WmRequestClose(uint32 window_id); | 180 WmRequestClose(uint32 window_id); |
| 176 | 181 |
| 177 // Sets the frame decoration constants of the display the window manager is | 182 // Sets the frame decoration constants of the display the window manager is |
| 178 // associated with. | 183 // associated with. |
| 179 WmSetFrameDecorationValues(FrameDecorationValues values); | 184 WmSetFrameDecorationValues(FrameDecorationValues values); |
| 180 | 185 |
| 181 // Sets the cursor that the non-client areas of the window should use. | 186 // Sets the cursor that the non-client areas of the window should use. |
| 182 WmSetNonClientCursor(uint32 window_id, Cursor cursor_id); | 187 WmSetNonClientCursor(uint32 window_id, Cursor cursor_id); |
| 183 | 188 |
| 184 // Response from WmCreateTopLevelWindow() informing the client of the id for | 189 // Response from WmCreateTopLevelWindow() informing the client of the id for |
| 185 // the new window. | 190 // the new window. |
| 186 OnWmCreatedTopLevelWindow(uint32 change_id, uint32 window_id); | 191 OnWmCreatedTopLevelWindow(uint32 change_id, uint32 window_id); |
| 187 | 192 |
| 188 // See description in WindowManager::OnAccelerator(). |ack_id| is the value | 193 // See description in WindowManager::OnAccelerator(). |ack_id| is the value |
| 189 // that was passed to OnAccelerator(). | 194 // that was passed to OnAccelerator(). |
| 190 OnAcceleratorAck(uint32 ack_id, EventResult event_result); | 195 OnAcceleratorAck(uint32 ack_id, EventResult event_result); |
| 191 }; | 196 }; |
| OLD | NEW |