OSDN Git Service

aa2ef6198df7703df1d94d507833546856bdfeaf
[mikumikustudio/libgdx-mikumikustudio.git] / gdx / src / com / badlogic / gdx / LifecycleListener.java
1 /*******************************************************************************\r
2  * Copyright 2011 See AUTHORS file.\r
3  * \r
4  * Licensed under the Apache License, Version 2.0 (the "License");\r
5  * you may not use this file except in compliance with the License.\r
6  * You may obtain a copy of the License at\r
7  * \r
8  *   http://www.apache.org/licenses/LICENSE-2.0\r
9  * \r
10  * Unless required by applicable law or agreed to in writing, software\r
11  * distributed under the License is distributed on an "AS IS" BASIS,\r
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
13  * See the License for the specific language governing permissions and\r
14  * limitations under the License.\r
15  ******************************************************************************/
16
17 package com.badlogic.gdx;\r
18 \r
19 /**\r
20  * A LifecycleListener can be added to an {@link Application} via\r
21  * {@link Application#addLifecycleListener(LifecycleListener)}. It \r
22  * will receive notification of pause, resume and dispose events.\r
23  * This is mainly meant to be used by extensions that need to\r
24  * manage resources based on the life-cycle. Normal, application\r
25  * level development should rely on the {@link ApplicationListener}\r
26  * interface.</p>\r
27  * \r
28  * The methods will be invoked on the rendering thread. The methods\r
29  * will be executed before the {@link ApplicationListener} methods\r
30  * are executed.\r
31  * \r
32  * @author mzechner\r
33  *\r
34  */\r
35 public interface LifecycleListener {\r
36         /**\r
37          * Called when the {@link Application} is about to pause\r
38          */\r
39         public void pause();\r
40         \r
41         /**\r
42          * Called when the Application is about to be resumed\r
43          */\r
44         public void resume();\r
45         \r
46         /**\r
47          * Called when the {@link Application} is about to be disposed\r
48          */\r
49         public void dispose();\r
50 }