1 /* 2 * Copyright (C) 2014 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 17 18 package com.android.internal.widget; 19 20 import android.graphics.drawable.Drawable; 21 import android.os.Parcelable; 22 import android.util.SparseArray; 23 import android.view.Menu; 24 import android.view.Window; 25 import com.android.internal.view.menu.MenuPresenter; 26 27 /** 28 * Implemented by the top-level decor layout for a window. DecorContentParent offers 29 * entry points for a number of title/window decor features. 30 */ 31 public interface DecorContentParent { setWindowCallback(Window.Callback cb)32 void setWindowCallback(Window.Callback cb); setWindowTitle(CharSequence title)33 void setWindowTitle(CharSequence title); getTitle()34 CharSequence getTitle(); initFeature(int windowFeature)35 void initFeature(int windowFeature); setUiOptions(int uiOptions)36 void setUiOptions(int uiOptions); hasIcon()37 boolean hasIcon(); hasLogo()38 boolean hasLogo(); setIcon(int resId)39 void setIcon(int resId); setIcon(Drawable d)40 void setIcon(Drawable d); setLogo(int resId)41 void setLogo(int resId); canShowOverflowMenu()42 boolean canShowOverflowMenu(); isOverflowMenuShowing()43 boolean isOverflowMenuShowing(); isOverflowMenuShowPending()44 boolean isOverflowMenuShowPending(); showOverflowMenu()45 boolean showOverflowMenu(); hideOverflowMenu()46 boolean hideOverflowMenu(); setMenuPrepared()47 void setMenuPrepared(); setMenu(Menu menu, MenuPresenter.Callback cb)48 void setMenu(Menu menu, MenuPresenter.Callback cb); saveToolbarHierarchyState(SparseArray<Parcelable> toolbarStates)49 void saveToolbarHierarchyState(SparseArray<Parcelable> toolbarStates); restoreToolbarHierarchyState(SparseArray<Parcelable> toolbarStates)50 void restoreToolbarHierarchyState(SparseArray<Parcelable> toolbarStates); dismissPopups()51 void dismissPopups(); 52 } 53