// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package designcompose.definition.plugin;
option java_multiple_files = true;
option java_package = "com.android.designcompose.definition.plugin";
option optimize_for = LITE_RUNTIME;
// Represents data for a rotation meter, including whether it's enabled, its
// start and end angles, whether it's discrete, and the discrete value.
message RotationMeterData {
bool enabled = 1;
float start = 2;
float end = 3;
bool discrete = 4;
float discrete_value = 5;
}
// Represents data for an arc meter, including whether it's enabled, its start
// and end angles, whether it's discrete, the discrete value, and the corner
// radius.
message ArcMeterData {
bool enabled = 1;
float start = 2;
float end = 3;
bool discrete = 4;
float discrete_value = 5;
float corner_radius = 6;
}
// Represents data for a progress bar meter, including whether it's enabled,
// whether it's discrete, the discrete value, whether it's vertical, and the end
// coordinates.
message ProgressBarMeterData {
bool enabled = 1;
bool discrete = 2;
float discrete_value = 3;
bool vertical = 4;
float end_x = 5;
float end_y = 6;
float start_x = 7;
float start_y = 8;
bool draggable = 9;
}
// Represents data for a progress marker meter, including whether it's enabled,
// whether it's discrete, the discrete value, whether it's vertical, and the
// start and end coordinates.
message ProgressMarkerMeterData {
bool enabled = 1;
bool discrete = 2;
float discrete_value = 3;
bool vertical = 4;
float start_x = 5;
float end_x = 6;
float start_y = 7;
float end_y = 8;
bool draggable = 9;
}
// Schema for progress vector data that we write to serialized data
message ProgressVectorMeterData {
bool enabled = 1;
bool discrete = 2;
float discrete_value = 3;
}
// A container message that holds one of the meter data types (rotation, arc,
// progress bar, or progress marker).
message MeterData {
oneof meter_data_type {
RotationMeterData rotation_data = 1;
ArcMeterData arc_data = 2;
ProgressBarMeterData progress_bar_data = 3;
ProgressMarkerMeterData progress_marker_data = 4;
ProgressVectorMeterData progress_vector_data = 5;
}
}