/** <p>\r
* An <code>Application</code> is the main entry point of your project. It sets up a window and rendering surface and manages the\r
* different aspects of your application, namely {@link Graphics}, {@link Audio}, {@link Input} and {@link Files}. Think of an\r
- * Application being equivalent to a JFrame of Activity.\r
+ * Application being equivalent to Swing's <code>JFrame</code> or Android's <code>Activity</code>.\r
* </p>\r
* \r
* <p>\r
- * An application can either be a desktop application (LwjglApplication found in gdx-backends-lwjgl.jar), or an Android\r
- * application (AndroidApplication found in gdx-backends-android.jar). Each application class has it's own startup and\r
+ * An application can be an instance of any of the following:\r
+ * <ul>\r
+ * <li>a desktop application (see <code>LwjglApplication</code> found in gdx-backends-lwjgl.jar)</li>\r
+ * <li>an Android application (see <code>AndroidApplication</code> found in gdx-backends-android.jar)</li>\r
+ * <li>a HTML5 application (see <code>GwtApplication</code> found in gdx-backends-gwt.jar)</li>\r
+ * <li>an iOS application (see <code>IOSApplication</code> found in gdx-backends-iosmonotouch.jar)</li>\r
+ * </ul>\r
+ * Each application class has it's own startup and\r
* initialization methods. Please refer to their documentation for more information.\r
* </p>\r
* \r
* <p>\r
- * While game programmers are used to having a main loop, libgdx employs a different concept to accomodate the event based nature\r
+ * While game programmers are used to having a main loop, libgdx employs a different concept to accommodate the event based nature\r
* of Android applications a little more. You application logic must be implemented in a {@link ApplicationListener} which has\r
* methods that get called by the Application when the application is created, resumed, paused, disposed or rendered. As a\r
* developer you will simply implement the ApplicationListener interface and fill in the functionality accordingly. The\r
* \r
* <p>\r
* {@link Files} offers you various methods to access internal and external files. An internal file is a file that is stored near\r
- * your application. On Android internal file are equivalent to assets. On the desktop the classpath is first scanned for the\r
+ * your application. On Android internal files are equivalent to assets. On the desktop the classpath is first scanned for the\r
* specified file. If that fails then the root directory of your application is used for a look up. External files are resources\r
* you create in your application and write to an external storage. On Android external files reside on the SD-card, on the\r
- * desktop external files are written to a users home directory. If you know what you do you can also specify absolute file names.\r
- * This is not portable, so take great care when using this feature.\r
+ * desktop external files are written to a users home directory. If you know what you are doing you can also specify absolute file names.\r
+ * Absolute filenames are not portable, so take great care when using this feature.\r
* </p>\r
* \r
* <p>\r
* @param runnable the runnable. */\r
public void postRunnable (Runnable runnable);\r
\r
- /** Exits the application. On android, this will cause a call to pause() and dispose() some time in the future, it will not\r
+ /** Schedule an exit from the application. On android, this will cause a call to pause() and dispose() some time in the future, it will not\r
* immediately finish your application. */\r
public void exit ();\r
\r
\r
package com.badlogic.gdx;\r
\r
-/** Convenience implementation of {@link ApplicationListener}. Derrive from this and only override what you need.\r
+/** Convenience implementation of {@link ApplicationListener}. Derive from this and only override what you need.\r
* @author mzechner */\r
public abstract class ApplicationAdapter implements ApplicationListener {\r
@Override\r
import com.badlogic.gdx.graphics.glutils.VertexBufferObject;\r
\r
/** <p>\r
- * This interface encapsulates the communication with the graphics processor. It allows to retrieve {@link GL10}, {@link GL11} and\r
- * {@link GL20} instances depending on the available hardware and configuration of the {@link Application}. Additionally it\r
- * features methods to generate {@link Pixmap}s and {@link Texture}s.\r
+ * This interface encapsulates communication with the graphics processor. Depending on the available hardware and the current\r
+ * {@link Application} configuration, access to the {@link GL10}, {@link GL11}, {@link GL20}, and/or {@link GLCommon} are provided\r
+ * here.\r
* </p>\r
* \r
* <p>\r
- * {@link Texture}s can be either managed or not managed. Managed and Textures will be restored when the OpenGL context is lost.\r
- * An OpenGL ES context loss happens when a user pauses the Application ( {@link ApplicationListener#pause()}) and switches to\r
- * another application on Android. On the desktop there is no concept of context loss for OpenGL.\r
+ * If supported by the backend, this interface lets you query the available display modes (graphics resolution and color depth)\r
+ * and change it.\r
* </p>\r
* \r
* <p>\r
- * There are many more utility classes that are not directly generated by the {@link Graphics} interfaces. See {@link VertexArray}, {@link VertexBufferObject}, {@link IndexBufferObject}, {@link Mesh}, {@link ShaderProgram} and {@link FrameBuffer},\r
- * {@link BitmapFont}, {@link SpriteBatch} and so on. All these classes are managed, meaning they don't need to be reloaded on a\r
- * context loss. Explore the com.badlogic.gdx.graphics package for more classes that might come in handy.\r
+ * This interface can be used to switch between continuous and non-continuous rendering (see\r
+ * {@link #setContinuousRendering(boolean)}), and to explicitly {@link #requestRendering()}.\r
* </p>\r
* \r
* <p>\r
- * All graphical resources, be the generated by the {@link Graphics} interface or via a constructor <b>must</b> be disposed when\r
- * no longer used!\r
+ * There are many more utility classes that are not directly generated by the {@link Graphics} interfaces. See {@link VertexArray}, {@link VertexBufferObject}, {@link IndexBufferObject}, {@link Mesh}, {@link ShaderProgram} and {@link FrameBuffer},\r
+ * {@link BitmapFont}, {@link SpriteBatch} and so on. All these classes are managed, meaning they don't need to be reloaded on a\r
+ * context loss. Explore the com.badlogic.gdx.graphics package for more classes that might come in handy.\r
* </p>\r
* \r
* @author mzechner */\r
AndroidGL, LWJGL, Angle, WebGL, iOSGL\r
}\r
\r
- /** Class describing a fullscreen display mode\r
+ /** Describe a fullscreen display mode\r
* \r
* @author mzechner */\r
public class DisplayMode {\r
\r
/** Class describing the bits per pixel, depth buffer precision, stencil precision and number of MSAA samples. */\r
public static class BufferFormat {\r
- /** number of bits per color channel **/\r
+ /* number of bits per color channel */\r
public final int r, g, b, a;\r
- /** number of bits for depth and stencil buffer **/\r
+ /* number of bits for depth and stencil buffer */\r
public final int depth, stencil;\r
- /** number of samples for MSAA **/\r
+ /** number of samples for multi-sample anti-aliasing (MSAA) **/\r
public final int samples;\r
/** whether coverage sampling anti-aliasing is used. in that case you have to clear the coverage buffer as well! */\r
public final boolean coverageSampling;\r
* @return whether display mode changes are supported or not. */\r
public boolean supportsDisplayModeChange ();\r
\r
- /** @return the supported fullscreen {@link DisplayMode}. */\r
+ /** @return the supported fullscreen {@link DisplayMode}(s). */\r
public DisplayMode[] getDisplayModes ();\r
\r
/** @return the display mode of the primary graphics adapter. */\r
public DisplayMode getDesktopDisplayMode ();\r
\r
- /** Sets the current {@link DisplayMode}. Returns false in case the operation failed. Not all backends support this methods. See\r
+ /** Sets the current {@link DisplayMode}. Returns false in case the operation failed. Not all backends support this method. See\r
* {@link Graphics#supportsDisplayModeChange()}.\r
* \r
* @param displayMode the display mode.\r
package com.badlogic.gdx;\r
\r
/** <p>\r
- * Interface to the input facilities. This allows to poll the state of the keyboard, touch screen and accelerometer. On the\r
- * desktop the touch screen is replaced by mouse input, the accelerometer is of course not available.\r
+ * Interface to the input facilities. This allows polling the state of the keyboard, the touch screen and the accelerometer. On\r
+ * some backends (desktop, gwt, etc) the touch screen is replaced by mouse input. The accelerometer is of course not available on\r
+ * all backends.\r
* </p>\r
* \r
* <p>\r
- * Additionally one can process events with an {@link InputProcessor} with this module. You can set the InputProcessor via the\r
+ * Instead of polling for events, one can process all input events with an {@link InputProcessor}. You can set the InputProcessor via the\r
* {@link #setInputProcessor(InputProcessor)} method. It will be called before the {@link ApplicationListener#render()} method in\r
* each frame.\r
* </p>\r
* \r
* <p>\r
- * Keyboard keys are translated to the constants in {@link Keys} transparantely on all systems. Do not use system specific key\r
+ * Keyboard keys are translated to the constants in {@link Keys} transparently on all systems. Do not use system specific key\r
* constants.\r
* </p>\r
* \r
* <p>\r
- * The class also offers methods to let the phone vibrate as well as getting compass readings.\r
+ * The class also offers methods to use (and test for the presence of) other input systems like vibration, compass,\r
+ * on-screen keyboards, and cursor capture. Support for simple input dialogs is also provided.\r
* </p>\r
* \r
* @author mzechner */\r
\r
/** An InputProcessor is used to receive input events from the keyboard and the touch screen (mouse on the desktop). For this it\r
* has to be registered with the {@link Input#setInputProcessor(InputProcessor)} method. It will be called each frame before the\r
- * call to {@link ApplicationListener#render()}. The methods return a* boolean in case you want to write a multiplexing\r
- * InputProcessor that has a chain of child processors that signal whether they processed the event. The {@link InputMultiplexer}\r
- * offers you exactly this functionality.\r
+ * call to {@link ApplicationListener#render()}. Each method returns a boolean in case you want to use this with the {@link InputMultiplexer}\r
+ * to chain input processors.\r
* \r
- * @author badlogicgames@gmail.com */\r
+ * @author mzechner */\r
public interface InputProcessor {\r
/** Called when a key was pressed\r
* \r
* <ul>\r
* <li>GET</li>\r
* <li>POST</li>\r
- * <li>JSON</li>\r
* </ul> */\r
public static interface HttpMethods {\r
\r
\r
/** <p>\r
* A Preference instance is a hash map holding different values. It is stored alongside your application (SharedPreferences on\r
- * Android, flat file in apps root directory on desktop).\r
+ * Android, LocalStorage on GWT, on the desktop a Java Preferences file in a ".prefs" directory will be created, \r
+ * and on iOS an NSMutableDictonary will be written to the given file). \r
* </p>\r
* \r
* <p>\r
- * On the desktop the file will be located in the user directory. Make sure you give the preferences instance a name that can be\r
- * used as a filename.\r
+ * Changes to a preferences instance will be cached in memory until {@link #flush()} is invoked.\r
+ * </p>\r
+ * \r
+ * <p>\r
+ * Use {@link Application#getPreferences(String)} to look up a specific preferences instance. Note that \r
+ * on several backends the preferences name will be used as the filename, so make sure the name is valid\r
+ * for a filename.\r
* </p>\r
* \r
* @author mzechner */\r
import com.badlogic.gdx.Net.HttpRequest;
-/** Provides utility methods to work streams */
+/** Provides utility methods to copy streams */
public class StreamUtils {
/** Copy the data from an {@link InputStream} to an {@link OutputStream}.
* \r
* @author mzechner */\r
public class Version {\r
- /** the current version of libgdx in the major.minor format **/\r
+ /** the current version of libgdx in the major.minor.minorer format **/\r
public static String VERSION = "0.9.9";\r
}\r