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