The app's Timers should still continue when a window is hidden. Especially since an app could have multiple windows, with some being shown and some being hidden. If only one were hidden, the other shown windows would clearly behave in a broken manner because the one hidden window would cause all app timers, even those associated with other windows, to be paused.
Introduces new WINDOW_SHOW AND WINDOW_HIDE events from C++ to Haxe, and new onShow and onHide events on Haxe Window.
Followup to 0918ee2381
57 lines
730 B
C++
57 lines
730 B
C++
#ifndef LIME_UI_WINDOW_EVENT_H
|
|
#define LIME_UI_WINDOW_EVENT_H
|
|
|
|
|
|
#include <system/CFFI.h>
|
|
#include <system/ValuePointer.h>
|
|
#include <stdint.h>
|
|
|
|
|
|
namespace lime {
|
|
|
|
|
|
enum WindowEventType {
|
|
|
|
WINDOW_ACTIVATE,
|
|
WINDOW_CLOSE,
|
|
WINDOW_DEACTIVATE,
|
|
WINDOW_ENTER,
|
|
WINDOW_EXPOSE,
|
|
WINDOW_FOCUS_IN,
|
|
WINDOW_FOCUS_OUT,
|
|
WINDOW_LEAVE,
|
|
WINDOW_MAXIMIZE,
|
|
WINDOW_MINIMIZE,
|
|
WINDOW_MOVE,
|
|
WINDOW_RESIZE,
|
|
WINDOW_RESTORE,
|
|
WINDOW_SHOW,
|
|
WINDOW_HIDE
|
|
|
|
};
|
|
|
|
|
|
struct WindowEvent {
|
|
|
|
hl_type* t;
|
|
int height;
|
|
WindowEventType type;
|
|
int width;
|
|
int windowID;
|
|
int x;
|
|
int y;
|
|
|
|
static ValuePointer* callback;
|
|
static ValuePointer* eventObject;
|
|
|
|
WindowEvent ();
|
|
|
|
static void Dispatch (WindowEvent* event);
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif |