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 // Next MinVersion: 1 | |
6 | |
7 module arc.mojom; | |
8 | |
9 import "mojo/common/string16.mojom"; | |
10 import "screen_rect.mojom"; | |
11 | |
12 // Represents the start and end indices of the selected portion | |
13 // of the text. The indices are inclusive. | |
14 struct TextSelection { | |
15 int32 start_selection; | |
16 int32 end_selection; | |
17 }; | |
18 | |
19 // Represents view structure to be passed to ARC. The view | |
20 // structure is synthesized from the AXStructure, which | |
21 // is a simplified representation of the DOM tree. We | |
22 // map each node of the AXStructure into a view element. | |
23 struct VoiceInteractionStructure { | |
24 // Geometry of the view in pixels | |
25 ScreenRect rect; | |
26 | |
27 // Text of the view. | |
28 mojo.common.mojom.String16 text; | |
29 | |
30 // Text properties | |
31 float text_size; | |
32 int32 color; | |
33 int32 bgcolor; | |
34 bool bold; | |
35 bool italic; | |
36 bool underline; | |
37 bool line_through; | |
38 | |
39 // Selected portion of the text. | |
40 TextSelection? selection; | |
41 | |
42 // Fake Android view class name of the element. Each node is assigned | |
43 // a closest approximation of Android's views. | |
44 string class_name; | |
45 | |
46 // Children of current node | |
47 array<VoiceInteractionStructure> children; | |
48 }; | |
49 | |
50 // Handles voice interaction queries from Android. | |
51 // Next method ID: 1 | |
52 interface VoiceInteractionArcHomeHost { | |
Luis Héctor Chávez
2017/03/16 16:30:20
Maybe remove this file until we actually need it.
Muyuan
2017/03/16 20:41:34
Acknowledged.
| |
53 // Returns view hierarchy of current window represented as | |
54 // VoiceInteractionStructure. Returns empty if the request | |
55 // fails. | |
56 GetVoiceInteractionStructure@1() => (VoiceInteractionStructure? structure); | |
57 }; | |
58 | |
59 // Connects with ArcHome. | |
60 // Next method ID: 1 | |
61 interface VoiceInteractionArcHomeInstance { | |
62 Init@0(VoiceInteractionArcHomeHost host_ptr); | |
63 }; | |
OLD | NEW |