create changelog entry
[debian/openrocket] / android-libraries / ActionBarSherlock / src / com / actionbarsherlock / view / Window.java
1 /*\r
2  * Copyright (C) 2006 The Android Open Source Project\r
3  * Copyright (C) 2011 Jake Wharton\r
4  *\r
5  * Licensed under the Apache License, Version 2.0 (the "License");\r
6  * you may not use this file except in compliance with the License.\r
7  * You may obtain a copy of the License at\r
8  *\r
9  *      http://www.apache.org/licenses/LICENSE-2.0\r
10  *\r
11  * Unless required by applicable law or agreed to in writing, software\r
12  * distributed under the License is distributed on an "AS IS" BASIS,\r
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
14  * See the License for the specific language governing permissions and\r
15  * limitations under the License.\r
16  */\r
17 \r
18 package com.actionbarsherlock.view;\r
19 \r
20 import android.content.Context;\r
21 \r
22 /**\r
23  * <p>Abstract base class for a top-level window look and behavior policy. An\r
24  * instance of this class should be used as the top-level view added to the\r
25  * window manager. It provides standard UI policies such as a background, title\r
26  * area, default key processing, etc.</p>\r
27  *\r
28  * <p>The only existing implementation of this abstract class is\r
29  * android.policy.PhoneWindow, which you should instantiate when needing a\r
30  * Window. Eventually that class will be refactored and a factory method added\r
31  * for creating Window instances without knowing about a particular\r
32  * implementation.</p>\r
33  */\r
34 public abstract class Window extends android.view.Window {\r
35     public static final long FEATURE_ACTION_BAR = android.view.Window.FEATURE_ACTION_BAR;\r
36     public static final long FEATURE_ACTION_BAR_OVERLAY = android.view.Window.FEATURE_ACTION_BAR_OVERLAY;\r
37     public static final long FEATURE_ACTION_MODE_OVERLAY = android.view.Window.FEATURE_ACTION_MODE_OVERLAY;\r
38     public static final long FEATURE_NO_TITLE = android.view.Window.FEATURE_NO_TITLE;\r
39     public static final long FEATURE_PROGRESS = android.view.Window.FEATURE_PROGRESS;\r
40     public static final long FEATURE_INDETERMINATE_PROGRESS = android.view.Window.FEATURE_INDETERMINATE_PROGRESS;\r
41 \r
42     /**\r
43      * Create a new instance for a context.\r
44      *\r
45      * @param context Context.\r
46      */\r
47     private Window(Context context) {\r
48         super(context);\r
49     }\r
50 \r
51 \r
52     public interface Callback {\r
53         /**\r
54          * Called when a panel's menu item has been selected by the user.\r
55          *\r
56          * @param featureId The panel that the menu is in.\r
57          * @param item The menu item that was selected.\r
58          *\r
59          * @return boolean Return true to finish processing of selection, or\r
60          *         false to perform the normal menu handling (calling its\r
61          *         Runnable or sending a Message to its target Handler).\r
62          */\r
63         public boolean onMenuItemSelected(int featureId, MenuItem item);\r
64     }\r
65 }\r