Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

XFcApp Class Reference

Defines an X-Forge application. More...

List of all members.

Public Member Functions

XFCIMPORT XFcApp ()
 Constructor; sets application to be found with XFcCore::getApp().

virtual XFCIMPORT ~XFcApp ()
 Virtual destructor.

virtual XFCIMPORT void onAppInit ()
 Called upon application init.

virtual XFCIMPORT void onTick ()
 Called every frame (before rendering).

virtual XFCIMPORT void onAppDeinit ()
 Called on application quit (cleanup).

virtual XFCIMPORT INT onDeviceStateEvent (INT32 aEvent, INT32 aSeverity, void *aMoreInfo)
 Called when the device state changes in a way that affects the application.


Detailed Description

Defines an X-Forge application.

Each X-Forge application has exactly one copy of an application class. This object is owned by the core. The XFcApp-extended class is usually instantiated in the xfcAppInit() function. Since the default constructor stores a pointer to the class within the core, the application does not need to keep track of the object. (And since static global data is illegal, the application couldn't keep track of the object even if it wanted).


Constructor & Destructor Documentation

XFCIMPORT XFcApp::XFcApp  
 

Constructor; sets application to be found with XFcCore::getApp().

This constructor registers the application instance into the core. If more than one instance of XFcApp-extended classes are created, the application quits.

virtual XFCIMPORT XFcApp::~XFcApp   [virtual]
 

Virtual destructor.

The destructor is called by the core when application quits.


Member Function Documentation

virtual XFCIMPORT void XFcApp::onAppDeinit   [virtual]
 

Called on application quit (cleanup).

You should do most of your clean-up in this function. The core calls this function when it is shutting down.

virtual XFCIMPORT void XFcApp::onAppInit   [virtual]
 

Called upon application init.

Once the core has been initialized, the application onAppInit() method is called.

virtual XFCIMPORT INT XFcApp::onDeviceStateEvent INT32    aEvent,
INT32    aSeverity,
void *    aMoreInfo
[virtual]
 

Called when the device state changes in a way that affects the application.

It is highly recommended that the application overrides this method and acts according to the events. If severity is medium, it is recommended that the application goes to pause mode, and it is especially critical that all audio is paused. If severity is critical, the application should shut down its threads and quit.

Parameters:
aEvent See XFCDEVICESTATEEVENTS enumerated type.
aSeverity See XFCDEVICESTATEEVENTSEVERITY enumerated type.
aMoreInfo More information of the event; depends on the event type and platform.
Returns:
Undefined, should return 0.
Platform specific behavior

 
XFCDSE_FOCUSLOST
DesktopWindowsSupported, XFCDSE_SEVERITY_MODERATE
PocketPCSupported, XFCDSE_SEVERITY_MODERATE
Smartphone2002Supported, XFCDSE_SEVERITY_MODERATE
Series60Supported, XFCDSE_SEVERITY_MODERATE
UIQSupported, XFCDSE_SEVERITY_MODERATE
PalmSupported, XFCDSE_SEVERITY_MODERATE

 
XFCDSE_FOCUSGAIN
DesktopWindowsSupported, XFCDSE_SEVERITY_NOTE
PocketPCSupported, XFCDSE_SEVERITY_NOTE
Smartphone2002Supported, XFCDSE_SEVERITY_NOTE
Series60Supported, XFCDSE_SEVERITY_NOTE
UIQSupported, XFCDSE_SEVERITY_NOTE
PalmSupported, XFCDSE_SEVERITY_NOTE

 
XFCDSE_AUDIOLOST
DesktopWindowsUnsupported
PocketPCUnsupported
Smartphone2002Unsupported
Series60Supported, XFCDSE_SEVERITY_MODERATE
UIQSupported, XFCDSE_SEVERITY_MODERATE
PalmUnsupported

 
XFCDSE_KILLSIGNAL
DesktopWindowsSupported, XFCDSE_SEVERITY_CRITICAL
PocketPCSupported, XFCDSE_SEVERITY_CRITICAL
Smartphone2002Supported, XFCDSE_SEVERITY_CRITICAL
Series60Supported, XFCDSE_SEVERITY_CRITICAL
UIQSupported, XFCDSE_SEVERITY_CRITICAL
PalmSupported, XFCDSE_SEVERITY_CRITICAL

 
XFCDSE_MEDIACHANGED
DesktopWindowsUnsupported
PocketPCUnsupported
Smartphone2002Unsupported
Series60Unsupported
UIQUnsupported
PalmSupported, XFCDSE_SEVERITY_NOTE

 
XFCDSE_LOWMEMORY
DesktopWindowsUnsupported
PocketPCUnsupported
Smartphone2002Unsupported
Series60Unsupported
UIQUnsupported
PalmUnsupported

 
XFCDSE_PHONEEVENT
DesktopWindowsUnsupported
PocketPCUnsupported
Smartphone2002Unsupported
Series60Unsupported
UIQUnsupported
PalmUnsupported

virtual XFCIMPORT void XFcApp::onTick   [virtual]
 

Called every frame (before rendering).

This is a good candidate for events that must occur everywhere in the application, regardless of the current renderer.


   
X-Forge Documentation
Confidential
Copyright © 2002-2003 Fathammer
   
Documentation generated
with doxygen
by Dimitri van Heesch