OLD | NEW |
| (Empty) |
1 // Copyright 2016 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 module mus.mojom; | |
6 | |
7 import "ui/gfx/geometry/mojo/geometry.mojom"; | |
8 | |
9 // Contains state of a single window. | |
10 struct WindowData { | |
11 // Unique identifier of the parent. If the client can not see the parent an | |
12 // id of 0 is supplied. | |
13 uint32 parent_id; | |
14 | |
15 // Unique identifier of the window. | |
16 uint32 window_id; | |
17 | |
18 gfx.mojom.Rect bounds; | |
19 | |
20 // Arbitrary key/value pairs. The interpretation of these is left to the | |
21 // client. See SetWindowProperty() for more information. | |
22 map<string, array<uint8>> properties; | |
23 | |
24 // True if this window is visible. The window may not be drawn on screen (see | |
25 // OnWindowParentDrawnStateChanged() for details). | |
26 bool visible; | |
27 }; | |
28 | |
29 // Each Window has support for two surfaces. Generally the |DEFAULT| surface | |
30 // is used. The |UNDERLAY| surface is useful if the owner of a window wants to | |
31 // to Embed() another client and at the same time draw something under the | |
32 // embedded apps representation. | |
33 enum SurfaceType { | |
34 // Only the owner of a window may obtain this surface. | |
35 // The window manager can change the offset of this by way of | |
36 // SetUnderlaySurfaceOffsetAndExtendedHitArea(). | |
37 UNDERLAY, | |
38 | |
39 // Only the embedded app may obtain this surface. If an app is not embedded | |
40 // in the Window than the owner may also render to this surface as well. | |
41 DEFAULT, | |
42 }; | |
43 | |
44 // The result of an input event sent to a client app. | |
45 enum EventResult { | |
46 HANDLED, | |
47 UNHANDLED, | |
48 }; | |
49 | |
50 // When this flag is set in a call to Embed(), the embedder (i.e. the client | |
51 // that is making the call to Embed()) will receive events that are targeted to | |
52 // the embedded client. The embedded client will not receive any input events | |
53 // from the window server. However, the embedder can choose to dispatch events | |
54 // to the embedded client through other mechanism. | |
55 // TODO(sad): Provide an API in mus for the embedder to dispatch events to the | |
56 // embedded client. https://crbug.com/621085 | |
57 const uint32 kEmbedFlagEmbedderInterceptsEvents = 0x01; | |
OLD | NEW |