nCine  2025.04.r498-9d36345
A cross-platform 2D game engine
Public Member Functions | Static Public Member Functions | Friends | List of all members
ncine::AndroidApplication Class Reference

Main entry point and handler for nCine Android applications. More...

#include <AndroidApplication.h>

Inheritance diagram for ncine::AndroidApplication:
Inheritance graph
[legend]
Collaboration diagram for ncine::AndroidApplication:
Collaboration graph
[legend]

Public Member Functions

unsigned int sdkVersion () const
 Wrapper around AndroidJniHelper::sdkVersion()
 
void enableAccelerometer (bool enabled)
 Wrapper around AndroidInputManager::enableAccelerometer()
 
bool isInitialized () const
 Returns true if the application has already called init()
 
const char * packageName () const
 Returns the package name for the Android application.
 
const char * internalDataPath () const
 Returns the path to the internal data directory from the native activity.
 
const char * externalDataPath () const
 Returns the path to the external data directory from the native activity.
 
const char * obbPath () const
 Returns the path to the OBB directory from the native activity.
 
void toggleSoftInput ()
 Toggles the software keyboard.
 
- Public Member Functions inherited from ncine::Application
const AppConfigurationappConfiguration () const
 Returns the configuration used to initialize the application.
 
RenderingSettingsrenderingSettings ()
 Returns the run-time rendering settings.
 
GuiSettingsguiSettings ()
 Returns the run-time GUI settings.
 
IDebugOverlay::DisplaySettingsdebugOverlaySettings ()
 Returns the run-time debug overlay settings, if debug overlay is available.
 
const float * timings () const
 Returns all timings.
 
IGfxDevicegfxDevice ()
 Returns the graphics device instance.
 
SceneNoderootNode ()
 Returns the root node of the transformation graph.
 
ViewportscreenViewport ()
 Returns the screen viewport.
 
IInputManagerinputManager ()
 Returns the input manager instance.
 
unsigned long int numFrames () const
 Returns the total number of frames already rendered.
 
float frameTime () const
 Returns the time in seconds that last frame took to complete. More...
 
IFrameTimerframeTimer ()
 Returns the frame timer interface.
 
float width () const
 Returns the drawable screen width as a float number.
 
float height () const
 Returns the drawable screen height as a float number.
 
Vector2f resolution () const
 Returns the drawable screen resolution as a Vector2f object.
 
int widthInt () const
 Returns the drawable screen width as an integer number.
 
int heightInt () const
 Returns the drawable screen height as an integer number.
 
Vector2i resolutionInt () const
 Returns the drawable screen resolution as a Vector2i object.
 
bool isSuspended () const
 Returns the value of the suspension flag. More...
 
void setSuspended (bool suspended)
 Sets the suspension flag value.
 
bool autoSuspension () const
 Returns the value of the auto-suspension flag. More...
 
void setAutoSuspension (bool autoSuspension)
 Sets the auto-suspension flag value.
 
void quit ()
 Asks the application to quit as soon as possible (by raising the quit flag)
 
bool shouldQuit () const
 Returns the value of the quit flag.
 
bool hasFocus () const
 Returns the focus flag value.
 

Static Public Member Functions

static void start (struct android_app *state, nctl::UniquePtr< IAppEventHandler >(*createAppEventHandler)())
 Entry point method to be called in the android_main() function.
 
static void processCommand (struct android_app *state, int32_t cmd)
 Processes an Android application command.
 

Friends

DLL_PUBLIC ApplicationtheApplication ()
 Meyers' Singleton.
 

Additional Inherited Members

- Protected Member Functions inherited from ncine::Application
void initCommon ()
 Must be called before giving control to the application.
 
void step ()
 A single step of the game loop made to render a frame.
 
void shutdownCommon ()
 Must be called before exiting to shut down the application.
 
void suspend ()
 Called when the application gets suspended.
 
void resume ()
 Called when the application resumes execution.
 
bool resizeScreenViewport (int width, int height)
 Resizes the screen viewport, if it exists. More...
 
bool updateScalingFactor ()
 Checks if the window scaling factor has changed this frame. More...
 
- Protected Attributes inherited from ncine::Application
bool isSuspended_
 
bool autoSuspension_
 
bool hasFocus_
 
bool shouldQuit_
 
const AppConfiguration appCfg_
 
RenderingSettings renderingSettings_
 
GuiSettings guiSettings_
 
float timings_ [Timings::COUNT]
 
IDebugOverlay::DisplaySettings debugOverlayNullSettings_
 
TimeStamp profileStartTime_
 
nctl::UniquePtr< FrameTimer > frameTimer_
 
nctl::UniquePtr< IGfxDevicegfxDevice_
 
nctl::UniquePtr< SceneNoderootNode_
 
nctl::UniquePtr< ScreenViewport > screenViewport_
 
nctl::UniquePtr< IDebugOverlaydebugOverlay_
 
nctl::UniquePtr< IInputManagerinputManager_
 
nctl::UniquePtr< IAppEventHandlerappEventHandler_
 

Detailed Description

Main entry point and handler for nCine Android applications.


The documentation for this class was generated from the following files: