1/*
2 * Copyright (C) 2023 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
17import {Point} from 'common/geometry_types';
18import {Padding} from 'common/padding';
19import {Trace} from 'trace/trace';
20import {CanvasMouseHandler} from './canvas_mouse_handler';
21
22export interface MiniTimelineDrawer {
23  draw(): Promise<void>;
24  updateHover(mousePoint: Point | undefined): Promise<void>;
25  getTraceClicked(mousePoint: Point): Promise<Trace<object> | undefined>;
26  getXScale(): number;
27  getYScale(): number;
28  getHeight(): number;
29  getWidth(): number;
30  getPadding(): Padding;
31  getUsableRange(): {from: number; to: number};
32  getClickRange(clickPos: Point): {from: number; to: number};
33  canvas: HTMLCanvasElement;
34  handler: CanvasMouseHandler;
35}
36