1/* 2 * Copyright (C) 2022 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 {Timestamp} from 'common/time'; 18import {TraceEntry} from 'trace/trace'; 19import {TextFilter} from 'viewers/common/text_filter'; 20import {Search} from 'viewers/viewer_search/ui_data'; 21import {LogHeader} from './ui_data_log'; 22 23export enum ViewerEvents { 24 HighlightedNodeChange = 'HighlightedNodeChange', 25 HighlightedIdChange = 'HighlightedIdChange', 26 27 HierarchyPinnedChange = 'HierarchyPinnedChange', 28 HierarchyUserOptionsChange = 'HierarchyUserOptionsChange', 29 HierarchyFilterChange = 'HierarchyFilterChange', 30 RectShowStateChange = 'RectShowStateChange', 31 32 PropertiesUserOptionsChange = 'PropertiesUserOptionsChange', 33 PropertiesFilterChange = 'PropertiesFilterChange', 34 DispatchPropertiesFilterChange = 'DispatchPropertiesFilterChange', 35 HighlightedPropertyChange = 'HighlightedPropertyChange', 36 37 RectsUserOptionsChange = 'RectsUserOptionsChange', 38 39 AdditionalPropertySelected = 'AdditionalPropertySelected', 40 RectsDblClick = 'RectsDblClick', 41 MiniRectsDblClick = 'MiniRectsDblClick', 42 43 TimestampClick = 'TimestampClick', 44 LogEntryClick = 'LogEntryClick', 45 LogFilterChange = 'LogFilterChange', 46 LogTextFilterChange = 'LogTextFilterChange', 47 ArrowDownPress = 'ArrowDownPress', 48 ArrowUpPress = 'ArrowUpPress', 49 50 GlobalSearchSectionClick = 'GlobalSearchSectionClick', 51 SearchQueryClick = 'SearchQueryClick', 52 SaveQueryClick = 'SaveQueryClick', 53 DeleteSavedQueryClick = 'DeleteSavedQueryClick', 54} 55 56export class RectDblClickDetail { 57 constructor(public clickedRectId: string) {} 58} 59 60export class TimestampClickDetail { 61 constructor( 62 public entry?: TraceEntry<object>, 63 public timestamp?: Timestamp, 64 ) {} 65} 66 67export class LogFilterChangeDetail { 68 constructor(public header: LogHeader, public value: string[]) {} 69} 70 71export class LogTextFilterChangeDetail { 72 constructor(public header: LogHeader, public filter: TextFilter) {} 73} 74 75export class QueryClickDetail { 76 constructor(public query: string) {} 77} 78 79export class SaveQueryClickDetail { 80 constructor(public query: string, public name: string) {} 81} 82 83export class DeleteSavedQueryClickDetail { 84 constructor(public search: Search) {} 85} 86