Home | History | Annotate | Download | only in widget
      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 {
     32     void setWindowCallback(Window.Callback cb);
     33     void setWindowTitle(CharSequence title);
     34     CharSequence getTitle();
     35     void initFeature(int windowFeature);
     36     void setUiOptions(int uiOptions);
     37     boolean hasIcon();
     38     boolean hasLogo();
     39     void setIcon(int resId);
     40     void setIcon(Drawable d);
     41     void setLogo(int resId);
     42     boolean canShowOverflowMenu();
     43     boolean isOverflowMenuShowing();
     44     boolean isOverflowMenuShowPending();
     45     boolean showOverflowMenu();
     46     boolean hideOverflowMenu();
     47     void setMenuPrepared();
     48     void setMenu(Menu menu, MenuPresenter.Callback cb);
     49     void saveToolbarHierarchyState(SparseArray<Parcelable> toolbarStates);
     50     void restoreToolbarHierarchyState(SparseArray<Parcelable> toolbarStates);
     51     void dismissPopups();
     52 }
     53