| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 mus.mojom; | 5 module mus.mojom; |
| 6 | 6 |
| 7 import "components/mus/public/interfaces/compositor_frame.mojom"; | 7 import "components/mus/public/interfaces/compositor_frame.mojom"; |
| 8 import "components/mus/public/interfaces/mus_constants.mojom"; |
| 8 import "components/mus/public/interfaces/surface_id.mojom"; | 9 import "components/mus/public/interfaces/surface_id.mojom"; |
| 9 import "components/mus/public/interfaces/mus_constants.mojom"; | 10 import "components/mus/public/interfaces/window_manager_constants.mojom"; |
| 10 import "mojo/application/public/interfaces/service_provider.mojom"; | 11 import "mojo/application/public/interfaces/service_provider.mojom"; |
| 11 import "network/public/interfaces/url_loader.mojom"; | 12 import "network/public/interfaces/url_loader.mojom"; |
| 12 import "ui/mojo/events/input_events.mojom"; | 13 import "ui/mojo/events/input_events.mojom"; |
| 13 import "ui/mojo/ime/text_input_state.mojom"; | 14 import "ui/mojo/ime/text_input_state.mojom"; |
| 14 import "ui/mojo/geometry/geometry.mojom"; | 15 import "ui/mojo/geometry/geometry.mojom"; |
| 15 | 16 |
| 16 struct ViewportMetrics { | 17 struct ViewportMetrics { |
| 17 mojo.Size size_in_pixels; | 18 mojo.Size size_in_pixels; |
| 18 // A value of 0 indicates the real value is not yet available. | 19 // A value of 0 indicates the real value is not yet available. |
| 19 float device_pixel_ratio = 0.0; | 20 float device_pixel_ratio = 0.0; |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 166 |
| 166 SetFocus(uint32 window_id); | 167 SetFocus(uint32 window_id); |
| 167 | 168 |
| 168 // Set text input state for the given window. | 169 // Set text input state for the given window. |
| 169 SetWindowTextInputState(uint32 window_id, mojo.TextInputState state); | 170 SetWindowTextInputState(uint32 window_id, mojo.TextInputState state); |
| 170 | 171 |
| 171 // Set the input method editor UI (software keyboard, etc) visibility. | 172 // Set the input method editor UI (software keyboard, etc) visibility. |
| 172 // If state is non-null, the specified window's text input state is updated. | 173 // If state is non-null, the specified window's text input state is updated. |
| 173 // Otherwise the existing state is used. | 174 // Otherwise the existing state is used. |
| 174 SetImeVisibility(uint32 window_id, bool visible, mojo.TextInputState? state); | 175 SetImeVisibility(uint32 window_id, bool visible, mojo.TextInputState? state); |
| 176 |
| 177 // -------------------------------------------------------------------------- |
| 178 // This section is for functions that call through directly to the |
| 179 // WindowManager. It is expected this will move into an associated interface. |
| 180 // See window_manager.mojom for details of these functions. |
| 181 // OpenWindow(WindowTreeClient client); |
| 182 SetPreferredSize(uint32 window_id, mojo.Size size) => |
| 183 (WindowManagerErrorCode result); |
| 184 SetBounds(uint32 window_id, mojo.Rect bounds) => |
| 185 (WindowManagerErrorCode result); |
| 186 SetShowState(uint32 window_id, ShowState show_state) => |
| 187 (WindowManagerErrorCode result); |
| 188 GetDisplays() => (array<Display> displays); |
| 175 }; | 189 }; |
| 176 | 190 |
| 177 // Changes to windows are not sent to the connection that originated the | 191 // Changes to windows are not sent to the connection that originated the |
| 178 // change. For example, if connection 1 changes the bounds of a window by | 192 // change. For example, if connection 1 changes the bounds of a window by |
| 179 // calling SetBounds(), connection 1 does not receive OnWindowBoundsChanged(). | 193 // calling SetBounds(), connection 1 does not receive OnWindowBoundsChanged(). |
| 180 interface WindowTreeClient { | 194 interface WindowTreeClient { |
| 181 // Invoked when the client application has been embedded at |root|. | 195 // Invoked when the client application has been embedded at |root|. |
| 182 // See Embed() on WindowTree for more details. |tree| will be a handle back to | 196 // See Embed() on WindowTree for more details. |tree| will be a handle back to |
| 183 // the window manager service, unless the connection is to the root connection | 197 // the window manager service, unless the connection is to the root connection |
| 184 // in which case it will be null. | 198 // in which case it will be null. |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 // |new_data| is null. | 264 // |new_data| is null. |
| 251 OnWindowSharedPropertyChanged(uint32 window, | 265 OnWindowSharedPropertyChanged(uint32 window, |
| 252 string name, | 266 string name, |
| 253 array<uint8>? new_data); | 267 array<uint8>? new_data); |
| 254 | 268 |
| 255 // Invoked when an event is targeted at the specified window. | 269 // Invoked when an event is targeted at the specified window. |
| 256 OnWindowInputEvent(uint32 window, mojo.Event event) => (); | 270 OnWindowInputEvent(uint32 window, mojo.Event event) => (); |
| 257 | 271 |
| 258 OnWindowFocused(uint32 focused_window_id); | 272 OnWindowFocused(uint32 focused_window_id); |
| 259 }; | 273 }; |
| OLD | NEW |