Subversion Repositories AndroidProjects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
356 chris 1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
<!--NewPage-->
3
<HTML>
4
<HEAD>
5
<!-- Generated by javadoc (build 1.6.0_26) on Sun Jan 27 20:37:04 CET 2013 -->
6
<TITLE>
7
ApplicationListener (libgdx API)
8
</TITLE>
9
 
10
<META NAME="date" CONTENT="2013-01-27">
11
 
12
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
13
 
14
<SCRIPT type="text/javascript">
15
function windowTitle()
16
{
17
    if (location.href.indexOf('is-external=true') == -1) {
18
        parent.document.title="ApplicationListener (libgdx API)";
19
    }
20
}
21
</SCRIPT>
22
<NOSCRIPT>
23
</NOSCRIPT>
24
 
25
</HEAD>
26
 
27
<BODY BGCOLOR="white" onload="windowTitle();">
28
<HR>
29
 
30
 
31
<!-- ========= START OF TOP NAVBAR ======= -->
32
<A NAME="navbar_top"><!-- --></A>
33
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
34
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
35
<TR>
36
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
37
<A NAME="navbar_top_firstrow"><!-- --></A>
38
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
39
  <TR ALIGN="center" VALIGN="top">
40
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
41
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
42
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
43
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/ApplicationListener.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
44
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
45
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
46
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
47
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
48
  </TR>
49
</TABLE>
50
</TD>
51
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
52
 
53
                                libgdx API
54
                                <style>
55
                                body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt }
56
                                pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif }
57
                                h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%;  font-weight:bold }
58
                                .TableHeadingColor { background:#EEEEFF; }
59
                                a { text-decoration:none }
60
                                a:hover { text-decoration:underline }
61
                                a:link, a:visited { color:blue }
62
                                table { border:0px }
63
                                .TableRowColor td:first-child { border-left:1px solid black }
64
                                .TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black }
65
                                hr { border:0px; border-bottom:1px solid #333366; }
66
                                </style>
67
                        </EM>
68
</TD>
69
</TR>
70
 
71
<TR>
72
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
73
&nbsp;<A HREF="../../../com/badlogic/gdx/ApplicationAdapter.html" title="class in com.badlogic.gdx"><B>PREV CLASS</B></A>&nbsp;
74
&nbsp;<A HREF="../../../com/badlogic/gdx/Audio.html" title="interface in com.badlogic.gdx"><B>NEXT CLASS</B></A></FONT></TD>
75
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
76
  <A HREF="../../../index.html?com/badlogic/gdx/ApplicationListener.html" target="_top"><B>FRAMES</B></A>  &nbsp;
77
&nbsp;<A HREF="ApplicationListener.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
78
&nbsp;<SCRIPT type="text/javascript">
79
  <!--
80
  if(window==top) {
81
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
82
  }
83
  //-->
84
</SCRIPT>
85
<NOSCRIPT>
86
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
87
</NOSCRIPT>
88
 
89
 
90
</FONT></TD>
91
</TR>
92
<TR>
93
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
94
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
95
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
96
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
97
</TR>
98
</TABLE>
99
<A NAME="skip-navbar_top"></A>
100
<!-- ========= END OF TOP NAVBAR ========= -->
101
 
102
<HR>
103
<!-- ======== START OF CLASS DATA ======== -->
104
<H2>
105
<FONT SIZE="-1">
106
com.badlogic.gdx</FONT>
107
<BR>
108
Interface ApplicationListener</H2>
109
<DL>
110
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../com/badlogic/gdx/ApplicationAdapter.html" title="class in com.badlogic.gdx">ApplicationAdapter</A>, <A HREF="../../../com/badlogic/gdx/Game.html" title="class in com.badlogic.gdx">Game</A></DD>
111
</DL>
112
<HR>
113
<DL>
114
<DT><PRE>public interface <B>ApplicationListener</B></DL>
115
</PRE>
116
 
117
<P>
118
<p>
119
 An <code>ApplicationListener</code> is called when the <A HREF="../../../com/badlogic/gdx/Application.html" title="interface in com.badlogic.gdx"><CODE>Application</CODE></A> is created, resumed, rendering, paused or destroyed.
120
 All methods are called in a thread that has the OpenGL context current. You can thus safely create and manipulate graphics
121
 resources.
122
 </p>
123
 
124
 <p>
125
 The <code>ApplicationListener</code> interface follows the standard Android activity life-cycle and is emulated on the desktop
126
 accordingly.
127
 </p>
128
<P>
129
 
130
<P>
131
<DL>
132
<DT><B>Author:</B></DT>
133
  <DD>mzechner</DD>
134
</DL>
135
<HR>
136
 
137
<P>
138
 
139
<!-- ========== METHOD SUMMARY =========== -->
140
 
141
<A NAME="method_summary"><!-- --></A>
142
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
143
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
144
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
145
<B>Method Summary</B></FONT></TH>
146
</TR>
147
<TR BGCOLOR="white" CLASS="TableRowColor">
148
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
149
<CODE>&nbsp;void</CODE></FONT></TD>
150
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/ApplicationListener.html#create()">create</A></B>()</CODE>
151
 
152
<BR>
153
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called when the <A HREF="../../../com/badlogic/gdx/Application.html" title="interface in com.badlogic.gdx"><CODE>Application</CODE></A> is first created.</TD>
154
</TR>
155
<TR BGCOLOR="white" CLASS="TableRowColor">
156
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
157
<CODE>&nbsp;void</CODE></FONT></TD>
158
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/ApplicationListener.html#dispose()">dispose</A></B>()</CODE>
159
 
160
<BR>
161
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called when the <A HREF="../../../com/badlogic/gdx/Application.html" title="interface in com.badlogic.gdx"><CODE>Application</CODE></A> is destroyed.</TD>
162
</TR>
163
<TR BGCOLOR="white" CLASS="TableRowColor">
164
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
165
<CODE>&nbsp;void</CODE></FONT></TD>
166
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/ApplicationListener.html#pause()">pause</A></B>()</CODE>
167
 
168
<BR>
169
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called when the <A HREF="../../../com/badlogic/gdx/Application.html" title="interface in com.badlogic.gdx"><CODE>Application</CODE></A> is paused.</TD>
170
</TR>
171
<TR BGCOLOR="white" CLASS="TableRowColor">
172
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
173
<CODE>&nbsp;void</CODE></FONT></TD>
174
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/ApplicationListener.html#render()">render</A></B>()</CODE>
175
 
176
<BR>
177
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called when the <A HREF="../../../com/badlogic/gdx/Application.html" title="interface in com.badlogic.gdx"><CODE>Application</CODE></A> should render itself.</TD>
178
</TR>
179
<TR BGCOLOR="white" CLASS="TableRowColor">
180
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
181
<CODE>&nbsp;void</CODE></FONT></TD>
182
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/ApplicationListener.html#resize(int, int)">resize</A></B>(int&nbsp;width,
183
       int&nbsp;height)</CODE>
184
 
185
<BR>
186
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called when the <A HREF="../../../com/badlogic/gdx/Application.html" title="interface in com.badlogic.gdx"><CODE>Application</CODE></A> is resized.</TD>
187
</TR>
188
<TR BGCOLOR="white" CLASS="TableRowColor">
189
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
190
<CODE>&nbsp;void</CODE></FONT></TD>
191
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/ApplicationListener.html#resume()">resume</A></B>()</CODE>
192
 
193
<BR>
194
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called when the <A HREF="../../../com/badlogic/gdx/Application.html" title="interface in com.badlogic.gdx"><CODE>Application</CODE></A> is resumed from a paused state.</TD>
195
</TR>
196
</TABLE>
197
&nbsp;
198
<P>
199
 
200
<!-- ============ METHOD DETAIL ========== -->
201
 
202
<A NAME="method_detail"><!-- --></A>
203
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
204
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
205
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
206
<B>Method Detail</B></FONT></TH>
207
</TR>
208
</TABLE>
209
 
210
<A NAME="create()"><!-- --></A><H3>
211
create</H3>
212
<PRE>
213
void <B>create</B>()</PRE>
214
<DL>
215
<DD>Called when the <A HREF="../../../com/badlogic/gdx/Application.html" title="interface in com.badlogic.gdx"><CODE>Application</CODE></A> is first created.
216
<P>
217
<DD><DL>
218
</DL>
219
</DD>
220
</DL>
221
<HR>
222
 
223
<A NAME="resize(int, int)"><!-- --></A><H3>
224
resize</H3>
225
<PRE>
226
void <B>resize</B>(int&nbsp;width,
227
            int&nbsp;height)</PRE>
228
<DL>
229
<DD>Called when the <A HREF="../../../com/badlogic/gdx/Application.html" title="interface in com.badlogic.gdx"><CODE>Application</CODE></A> is resized. This can happen at any point during a non-paused state but will never happen
230
 before a call to <A HREF="../../../com/badlogic/gdx/ApplicationListener.html#create()"><CODE>create()</CODE></A>.
231
<P>
232
<DD><DL>
233
<DT><B>Parameters:</B><DD><CODE>width</CODE> - the new width in pixels<DD><CODE>height</CODE> - the new height in pixels</DL>
234
</DD>
235
</DL>
236
<HR>
237
 
238
<A NAME="render()"><!-- --></A><H3>
239
render</H3>
240
<PRE>
241
void <B>render</B>()</PRE>
242
<DL>
243
<DD>Called when the <A HREF="../../../com/badlogic/gdx/Application.html" title="interface in com.badlogic.gdx"><CODE>Application</CODE></A> should render itself.
244
<P>
245
<DD><DL>
246
</DL>
247
</DD>
248
</DL>
249
<HR>
250
 
251
<A NAME="pause()"><!-- --></A><H3>
252
pause</H3>
253
<PRE>
254
void <B>pause</B>()</PRE>
255
<DL>
256
<DD>Called when the <A HREF="../../../com/badlogic/gdx/Application.html" title="interface in com.badlogic.gdx"><CODE>Application</CODE></A> is paused. An Application is paused before it is destroyed, when a user pressed the Home
257
 button on Android or an incoming call happend. On the desktop this will only be called immediately before <A HREF="../../../com/badlogic/gdx/ApplicationListener.html#dispose()"><CODE>dispose()</CODE></A>
258
 is called.
259
<P>
260
<DD><DL>
261
</DL>
262
</DD>
263
</DL>
264
<HR>
265
 
266
<A NAME="resume()"><!-- --></A><H3>
267
resume</H3>
268
<PRE>
269
void <B>resume</B>()</PRE>
270
<DL>
271
<DD>Called when the <A HREF="../../../com/badlogic/gdx/Application.html" title="interface in com.badlogic.gdx"><CODE>Application</CODE></A> is resumed from a paused state. On Android this happens when the activity gets focus
272
 again. On the desktop this method will never be called.
273
<P>
274
<DD><DL>
275
</DL>
276
</DD>
277
</DL>
278
<HR>
279
 
280
<A NAME="dispose()"><!-- --></A><H3>
281
dispose</H3>
282
<PRE>
283
void <B>dispose</B>()</PRE>
284
<DL>
285
<DD>Called when the <A HREF="../../../com/badlogic/gdx/Application.html" title="interface in com.badlogic.gdx"><CODE>Application</CODE></A> is destroyed. Preceded by a call to <A HREF="../../../com/badlogic/gdx/ApplicationListener.html#pause()"><CODE>pause()</CODE></A>.
286
<P>
287
<DD><DL>
288
</DL>
289
</DD>
290
</DL>
291
<!-- ========= END OF CLASS DATA ========= -->
292
<HR>
293
 
294
 
295
<!-- ======= START OF BOTTOM NAVBAR ====== -->
296
<A NAME="navbar_bottom"><!-- --></A>
297
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
298
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
299
<TR>
300
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
301
<A NAME="navbar_bottom_firstrow"><!-- --></A>
302
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
303
  <TR ALIGN="center" VALIGN="top">
304
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
305
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
306
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
307
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/ApplicationListener.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
308
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
309
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
310
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
311
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
312
  </TR>
313
</TABLE>
314
</TD>
315
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
316
libgdx API</EM>
317
</TD>
318
</TR>
319
 
320
<TR>
321
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
322
&nbsp;<A HREF="../../../com/badlogic/gdx/ApplicationAdapter.html" title="class in com.badlogic.gdx"><B>PREV CLASS</B></A>&nbsp;
323
&nbsp;<A HREF="../../../com/badlogic/gdx/Audio.html" title="interface in com.badlogic.gdx"><B>NEXT CLASS</B></A></FONT></TD>
324
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
325
  <A HREF="../../../index.html?com/badlogic/gdx/ApplicationListener.html" target="_top"><B>FRAMES</B></A>  &nbsp;
326
&nbsp;<A HREF="ApplicationListener.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
327
&nbsp;<SCRIPT type="text/javascript">
328
  <!--
329
  if(window==top) {
330
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
331
  }
332
  //-->
333
</SCRIPT>
334
<NOSCRIPT>
335
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
336
</NOSCRIPT>
337
 
338
 
339
</FONT></TD>
340
</TR>
341
<TR>
342
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
343
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
344
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
345
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
346
</TR>
347
</TABLE>
348
<A NAME="skip-navbar_bottom"></A>
349
<!-- ======== END OF BOTTOM NAVBAR ======= -->
350
 
351
<HR>
352
 
353
                                <div style="font-size:9pt"><i>
354
                                Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
355
                                </i></div>
356
 
357
</BODY>
358
</HTML>