Device orientation is the orientation of the phone/tablet. Display orientation is the orientation of what is rendered on the display. By default, they should usually be the same. If orientation is locked, device orientation will update, but display orientation usually won't.
40 lines
523 B
C++
40 lines
523 B
C++
#ifndef LIME_SYSTEM_ORIENTATION_EVENT_H
|
|
#define LIME_SYSTEM_ORIENTATION_EVENT_H
|
|
|
|
|
|
#include <system/CFFI.h>
|
|
#include <system/ValuePointer.h>
|
|
|
|
|
|
namespace lime {
|
|
|
|
|
|
enum OrientationEventType {
|
|
|
|
DISPLAY_ORIENTATION_CHANGE,
|
|
DEVICE_ORIENTATION_CHANGE
|
|
|
|
};
|
|
|
|
|
|
struct OrientationEvent {
|
|
|
|
hl_type* t;
|
|
int orientation;
|
|
int display;
|
|
OrientationEventType type;
|
|
|
|
static ValuePointer* callback;
|
|
static ValuePointer* eventObject;
|
|
|
|
OrientationEvent ();
|
|
|
|
static void Dispatch (OrientationEvent* event);
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif |