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/time'; 18import {TraceEntry} from 'trace/trace'; 19import {TextFilter} from 'viewers/common/text_filter'; 20import {ListedSearch} 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 RectsDblClick = 'RectsDblClick', 39 MiniRectsDblClick = 'MiniRectsDblClick', 40 RectTypeButtonClick = 'RectTypeButtonClick', 41 42 OverlayDblClick = 'OverlayDblClick', 43 44 AdditionalPropertySelected = 'AdditionalPropertySelected', 45 PropagatePropertyClick = 'PropagatePropertyClick', 46 47 TimestampClick = 'TimestampClick', 48 LogEntryClick = 'LogEntryClick', 49 LogFilterChange = 'LogFilterChange', 50 LogTextFilterChange = 'LogTextFilterChange', 51 ArrowDownPress = 'ArrowDownPress', 52 ArrowUpPress = 'ArrowUpPress', 53 54 GlobalSearchSectionClick = 'GlobalSearchSectionClick', 55 SearchQueryClick = 'SearchQueryClick', 56 SaveQueryClick = 'SaveQueryClick', 57 DeleteSavedQueryClick = 'DeleteSavedQueryClick', 58 AddQueryClick = 'AddQueryClick', 59 ClearQueryClick = 'ClearQueryClick', 60} 61 62export class RectDblClickDetail { 63 constructor(public clickedRectId: string) {} 64} 65 66export class TimestampClickDetail { 67 constructor( 68 public entry?: TraceEntry<object>, 69 public timestamp?: Timestamp, 70 ) {} 71} 72 73export class LogFilterChangeDetail { 74 constructor(public header: LogHeader, public value: string[]) {} 75} 76 77export class LogTextFilterChangeDetail { 78 constructor(public header: LogHeader, public filter: TextFilter) {} 79} 80 81export class SearchQueryClickDetail { 82 constructor(public query: string, public uid: number) {} 83} 84 85export class AddQueryClickDetail { 86 constructor(public query: string) {} 87} 88 89export class ClearQueryClickDetail { 90 constructor(public uid: number) {} 91} 92 93export class SaveQueryClickDetail { 94 constructor(public query: string, public name: string) {} 95} 96 97export class DeleteSavedQueryClickDetail { 98 constructor(public search: ListedSearch) {} 99} 100