| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 "ui/gfx/geometry/mojo/geometry.mojom"; | 7 import "ui/gfx/geometry/mojo/geometry.mojom"; |
| 8 | 8 |
| 9 // Contains state of a single window. | 9 // Contains state of a single window. |
| 10 struct WindowData { | 10 struct WindowData { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 // OnWindowParentDrawnStateChanged() for details). | 28 // OnWindowParentDrawnStateChanged() for details). |
| 29 bool visible; | 29 bool visible; |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 // The result of an input event sent to a client app. | 32 // The result of an input event sent to a client app. |
| 33 enum EventResult { | 33 enum EventResult { |
| 34 HANDLED, | 34 HANDLED, |
| 35 UNHANDLED, | 35 UNHANDLED, |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 enum EventTargetingPolicy { |
| 39 // The target is a valid target for events, but none of its descendants are |
| 40 // considered. |
| 41 TARGET_ONLY, |
| 42 |
| 43 // The target and its descendants are possible targets. This is the default. |
| 44 TARGET_AND_DESCENDANTS, |
| 45 |
| 46 // The target is not a valid target, but its descendants are possible targets. |
| 47 DESCENDANTS_ONLY, |
| 48 |
| 49 // Neither the target nor its descendants are valid targets. |
| 50 NONE |
| 51 }; |
| 52 |
| 38 // A bitfield of what drag operations are possible. | 53 // A bitfield of what drag operations are possible. |
| 39 const uint32 kDropEffectNone = 0; | 54 const uint32 kDropEffectNone = 0; |
| 40 const uint32 kDropEffectMove = 1; | 55 const uint32 kDropEffectMove = 1; |
| 41 const uint32 kDropEffectCopy = 2; | 56 const uint32 kDropEffectCopy = 2; |
| 42 const uint32 kDropEffectLink = 4; | 57 const uint32 kDropEffectLink = 4; |
| 43 | 58 |
| 44 // When this flag is set in a call to Embed(), the embedder (i.e. the client | 59 // When this flag is set in a call to Embed(), the embedder (i.e. the client |
| 45 // that is making the call to Embed()) will receive events that are targeted to | 60 // that is making the call to Embed()) will receive events that are targeted to |
| 46 // the embedded client. The embedded client will not receive any input events | 61 // the embedded client. The embedded client will not receive any input events |
| 47 // from the window server. However, the embedder can choose to dispatch events | 62 // from the window server. However, the embedder can choose to dispatch events |
| 48 // to the embedded client through other mechanism. | 63 // to the embedded client through other mechanism. |
| 49 // TODO(sad): Provide an API in mus for the embedder to dispatch events to the | 64 // TODO(sad): Provide an API in mus for the embedder to dispatch events to the |
| 50 // embedded client. https://crbug.com/621085 | 65 // embedded client. https://crbug.com/621085 |
| 51 const uint32 kEmbedFlagEmbedderInterceptsEvents = 0x01; | 66 const uint32 kEmbedFlagEmbedderInterceptsEvents = 0x01; |
| OLD | NEW |