• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2021 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = "proto2";
18
19package com.android.car.rotary;
20
21option java_package = "com.android.car.rotary";
22option java_outer_classname = "RotaryProtos";
23
24message RotaryService {
25  optional int32 rotation_acceleration_2x_ms = 1;
26  optional int32 rotation_acceleration_3x_ms = 2;
27  optional string focused_node = 3;
28  optional string edit_node = 4;
29  optional string focus_area = 5;
30  optional string last_touched_node = 6;
31  optional int32 ignore_view_clicked_ms = 7;
32  optional string ignore_view_clicked_node = 8;
33  optional int64 last_view_clicked_time = 9;
34  optional string rotary_input_method = 10;
35  optional string default_touch_input_method = 11;
36  optional string touch_input_method = 12;
37  optional FocusRealDirection hun_nudge_direction = 13;
38  optional FocusRealDirection hun_escape_nudge_direction = 14;
39  repeated int32 off_screen_nudge_global_actions = 15;
40  repeated int32 off_screen_nudge_key_codes = 16;
41  repeated string off_screen_nudge_intents = 17;
42  optional int32 after_scroll_timeout_ms = 18;
43  optional AfterScrollAction after_scroll_action = 19;
44  optional int64 after_scroll_action_until = 20;
45  optional bool in_rotary_mode = 21;
46  optional bool in_direct_manipulation_mode = 22;
47  optional int64 last_rotate_event_time = 23;
48  optional int64 long_press_ms = 24;
49  optional bool long_press_triggered = 25;
50  optional ComponentName foreground_activity = 26;
51  optional int64 after_focus_timeout_ms = 27;
52  optional string pending_focused_node = 28;
53  optional int64 pending_focused_expiration_time = 29;
54  optional Navigator navigator = 30;
55  optional WindowCache window_cache = 31;
56}
57
58message Navigator {
59  optional int32 hun_left = 1;
60  optional int32 hun_right = 2;
61  optional FocusRealDirection hun_nudge_direction = 3;
62  optional Rect app_window_bounds = 4;
63  optional SurfaceViewHelper surface_view_helper = 5;
64}
65
66message SurfaceViewHelper {
67  optional string host_app = 1;
68  repeated string clientApps = 2;
69}
70
71message WindowCache {
72  repeated int32 window_ids = 1;
73  map<int32, int32> window_types = 2;
74  map<int32, string> focused_nodes = 3;
75}
76
77message ComponentName {
78  optional string package_name = 1;
79  optional string class_name = 2;
80}
81
82message Rect {
83  optional int32 left = 1;
84  optional int32 top = 2;
85  optional int32 right = 3;
86  optional int32 bottom = 4;
87}
88enum AfterScrollAction {
89  AFTER_SCROLL_UNSPECIFIED = 0;
90  AFTER_SCROLL_DO_NOTHING = 1;
91  AFTER_SCROLL_FOCUS_PREVIOUS = 2;
92  AFTER_SCROLL_FOCUS_NEXT = 3;
93  AFTER_SCROLL_FOCUS_FIRST = 4;
94  AFTER_SCROLL_FOCUS_LAST = 5;
95}
96
97enum FocusRealDirection {
98  FOCUS_DIRECTION_UNSPECIFIED = 0;
99  FOCUS_LEFT = 1;
100  FOCUS_UP = 2;
101  FOCUS_RIGHT = 3;
102  FOCUS_DOWN = 4;
103}
104