OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 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 viz.hit_test.mojom; | |
6 | |
7 import "cc/ipc/surface_id.mojom"; | |
8 import "ui/gfx/geometry/mojo/geometry.mojom"; | |
9 import "ui/gfx/mojo/transform.mojom"; | |
10 | |
11 enum HitTestRegionFlags { | |
12 | |
13 // Defines the bounds of the surface ( embedder ). | |
14 HIT_TEST_BOUNDS = 0, | |
15 | |
16 // Region maps to this surface ( me ). | |
rjkroege
2017/06/07 21:19:06
It would make sense to me that HIT_TEST_MINE | HIT
gklassen
2017/06/12 16:30:41
The current implementation is using HIT_TEST_MINE
| |
17 HIT_TEST_MINE, | |
18 | |
19 // Region maps to child surface ( OOPIF ). | |
20 HIT_TEST_CHILD_SURFACE, | |
21 | |
22 // Irregular boundary - send HitTestRequest to resolve. | |
23 HIT_TEST_ASK, | |
24 | |
25 // No touch event handler exists - no need to send touch events. | |
26 HIT_TEST_NO_TOUCH_EVENT_HANDLER, | |
27 | |
28 // Region ignored for hit testing ( eg. hover:none ). | |
29 HIT_TEST_IGNORE | |
30 }; | |
31 | |
32 struct HitTestRegion { | |
33 | |
34 // Flags to indicate the type of HitTestRegion. | |
35 HitTestRegionFlags flags_; | |
36 | |
37 // SurfaceId for the HIT_TEST_CHILD_SURFACE | |
rjkroege
2017/06/07 21:19:07
If HIT_TEST_CHILD_SURFACE is set, this is not empt
gklassen
2017/06/12 16:30:41
Good call. I have added Validation methods to DCH
| |
38 cc.mojom.SurfaceId surface_id_; | |
39 | |
40 // The rect of the region in the current surface coordinate space | |
41 gfx.mojom.Rect rect_; | |
42 | |
43 // The transform applied to the child region. | |
44 gfx.mojom.Transform transform_; | |
45 }; | |
46 | |
47 struct HitTestData { | |
48 | |
49 // SurfaceId corresponding to this HitTestData. | |
50 cc.mojom.SurfaceId surface_id_; | |
51 | |
52 // The clipping bounds of the surface. | |
53 gfx.mojom.Rect bounds_; | |
54 | |
55 // The list of sub-regions in this surface. | |
56 array<HitTestRegion> regions_; // in front to back z-order | |
57 }; | |
OLD | NEW |