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 // Region maps to this surface ( me ). |
| 12 const uint32 kHitTestMine = 0x01; |
| 13 |
| 14 // Region ignored for hit testing ( transparent backgrounds & hover:none ). |
| 15 const uint32 kHitTestIgnore = 0x02; |
| 16 |
| 17 // Region maps to child surface ( OOPIF ). |
| 18 const uint32 kHitTestChildSurface = 0x04; |
| 19 |
| 20 // Irregular boundary - send HitTestRequest to resolve. |
| 21 const uint32 kHitTestAsk = 0x08; |
| 22 |
| 23 // No touch event handler exists - no need to send touch events. |
| 24 const uint32 kHitTestNoTouchEventHandler = 0x10; |
| 25 |
| 26 struct HitTestRegion { |
| 27 |
| 28 // Flags to indicate the type of HitTestRegion. |
| 29 uint32 flags; |
| 30 |
| 31 // SurfaceId is required when flags = kHitTestChildSurface. |
| 32 cc.mojom.SurfaceId surface_id; |
| 33 |
| 34 // The rect of the region in the coordinate space of the embedder. |
| 35 gfx.mojom.Rect rect; |
| 36 |
| 37 // The transform applied to the child region. |
| 38 gfx.mojom.Transform transform; |
| 39 }; |
| 40 |
| 41 struct HitTestData { |
| 42 |
| 43 // SurfaceId corresponding to this HitTestData. |
| 44 cc.mojom.SurfaceId surface_id; |
| 45 |
| 46 // The list of sub-regions in this surface. |
| 47 array<HitTestRegion> regions; // in front to back z-order |
| 48 }; |
OLD | NEW |