- Added the application state events (not supported yet by any platform).
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5228 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
bf3273cb5f
commit
98c608dc7e
|
@ -79,6 +79,9 @@ namespace irr
|
|||
//! Pass on raw events from the OS
|
||||
EET_SYSTEM_EVENT,
|
||||
|
||||
//! Application state events like a resume, pause etc.
|
||||
EET_APPLICATION_EVENT,
|
||||
|
||||
//! This enum is never used, it only forces the compiler to
|
||||
//! compile these enumeration values to 32 bit.
|
||||
EGUIET_FORCE_32_BIT = 0x7fffffff
|
||||
|
@ -176,7 +179,7 @@ namespace irr
|
|||
enum ESYSTEM_EVENT_TYPE
|
||||
{
|
||||
//! From Android command handler for native activity messages
|
||||
ESET_ANDROID_CMD,
|
||||
ESET_ANDROID_CMD = 0,
|
||||
|
||||
// TODO: for example ESET_WINDOWS_MESSAGE for win32 message loop events
|
||||
|
||||
|
@ -184,6 +187,31 @@ namespace irr
|
|||
ESET_COUNT
|
||||
};
|
||||
|
||||
//! Enumeration for a commonly used application state events (it's useful mainly for mobile devices)
|
||||
enum EAPPLICATION_EVENT_TYPE
|
||||
{
|
||||
//! The application will be resumed.
|
||||
EAET_WILL_RESUME = 0,
|
||||
|
||||
//! The application has been resumed.
|
||||
EAET_DID_RESUME,
|
||||
|
||||
//! The application will be paused.
|
||||
EAET_WILL_PAUSE,
|
||||
|
||||
//! The application has been paused.
|
||||
EAET_DID_PAUSE,
|
||||
|
||||
//! The application will be terminated.
|
||||
EAET_WILL_TERMINATE,
|
||||
|
||||
//! The application received a memory warning.
|
||||
EAET_MEMORY_WARNING,
|
||||
|
||||
//! No real event, but to get number of event types.
|
||||
EAET_COUNT
|
||||
};
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
|
@ -526,13 +554,19 @@ struct SEvent
|
|||
|
||||
// TOOD: more structs for iphone, Windows, X11, etc.
|
||||
|
||||
ESYSTEM_EVENT_TYPE EventType;
|
||||
ESYSTEM_EVENT_TYPE EventType;
|
||||
union
|
||||
{
|
||||
struct SAndroidCmd AndroidCmd;
|
||||
};
|
||||
};
|
||||
|
||||
// Application state event
|
||||
struct SApplicationEvent
|
||||
{
|
||||
EAPPLICATION_EVENT_TYPE EventType;
|
||||
};
|
||||
|
||||
EEVENT_TYPE EventType;
|
||||
union
|
||||
{
|
||||
|
@ -547,6 +581,7 @@ struct SEvent
|
|||
struct SLogEvent LogEvent;
|
||||
struct SUserEvent UserEvent;
|
||||
struct SSystemEvent SystemEvent;
|
||||
struct SApplicationEvent ApplicationEvent;
|
||||
};
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue