Add Window expose event
This commit is contained in:
@@ -640,6 +640,10 @@ class NativeApplication {
|
|||||||
|
|
||||||
window.onEnter.dispatch ();
|
window.onEnter.dispatch ();
|
||||||
|
|
||||||
|
case WINDOW_EXPOSE:
|
||||||
|
|
||||||
|
window.onExpose.dispatch ();
|
||||||
|
|
||||||
case WINDOW_FOCUS_IN:
|
case WINDOW_FOCUS_IN:
|
||||||
|
|
||||||
window.onFocusIn.dispatch ();
|
window.onFocusIn.dispatch ();
|
||||||
@@ -1200,12 +1204,13 @@ private class WindowEventInfo {
|
|||||||
var WINDOW_CLOSE = 1;
|
var WINDOW_CLOSE = 1;
|
||||||
var WINDOW_DEACTIVATE = 2;
|
var WINDOW_DEACTIVATE = 2;
|
||||||
var WINDOW_ENTER = 3;
|
var WINDOW_ENTER = 3;
|
||||||
var WINDOW_FOCUS_IN = 4;
|
var WINDOW_EXPOSE = 4;
|
||||||
var WINDOW_FOCUS_OUT = 5;
|
var WINDOW_FOCUS_IN = 5;
|
||||||
var WINDOW_LEAVE = 6;
|
var WINDOW_FOCUS_OUT = 6;
|
||||||
var WINDOW_MINIMIZE = 7;
|
var WINDOW_LEAVE = 7;
|
||||||
var WINDOW_MOVE = 8;
|
var WINDOW_MINIMIZE = 8;
|
||||||
var WINDOW_RESIZE = 9;
|
var WINDOW_MOVE = 9;
|
||||||
var WINDOW_RESTORE = 10;
|
var WINDOW_RESIZE = 10;
|
||||||
|
var WINDOW_RESTORE = 11;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ class Module implements IModule {
|
|||||||
window.onDeactivate.add (onWindowDeactivate.bind (window));
|
window.onDeactivate.add (onWindowDeactivate.bind (window));
|
||||||
window.onDropFile.add (onWindowDropFile.bind (window));
|
window.onDropFile.add (onWindowDropFile.bind (window));
|
||||||
window.onEnter.add (onWindowEnter.bind (window));
|
window.onEnter.add (onWindowEnter.bind (window));
|
||||||
|
window.onExpose.add (onWindowExpose.bind (window));
|
||||||
window.onFocusIn.add (onWindowFocusIn.bind (window));
|
window.onFocusIn.add (onWindowFocusIn.bind (window));
|
||||||
window.onFocusOut.add (onWindowFocusOut.bind (window));
|
window.onFocusOut.add (onWindowFocusOut.bind (window));
|
||||||
window.onFullscreen.add (onWindowFullscreen.bind (window));
|
window.onFullscreen.add (onWindowFullscreen.bind (window));
|
||||||
@@ -471,6 +472,13 @@ class Module implements IModule {
|
|||||||
public function onWindowEnter (window:Window):Void { }
|
public function onWindowEnter (window:Window):Void { }
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when a window expose event is fired
|
||||||
|
* @param window The window dispatching the event
|
||||||
|
*/
|
||||||
|
public function onWindowExpose (window:Window):Void { }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when a window focus in event is fired
|
* Called when a window focus in event is fired
|
||||||
* @param window The window dispatching the event
|
* @param window The window dispatching the event
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ class Window {
|
|||||||
public var onDeactivate = new Event<Void->Void> ();
|
public var onDeactivate = new Event<Void->Void> ();
|
||||||
public var onDropFile = new Event<String->Void> ();
|
public var onDropFile = new Event<String->Void> ();
|
||||||
public var onEnter = new Event<Void->Void> ();
|
public var onEnter = new Event<Void->Void> ();
|
||||||
|
public var onExpose = new Event<Void->Void> ();
|
||||||
public var onFocusIn = new Event<Void->Void> ();
|
public var onFocusIn = new Event<Void->Void> ();
|
||||||
public var onFocusOut = new Event<Void->Void> ();
|
public var onFocusOut = new Event<Void->Void> ();
|
||||||
public var onFullscreen = new Event<Void->Void> ();
|
public var onFullscreen = new Event<Void->Void> ();
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ namespace lime {
|
|||||||
WINDOW_CLOSE,
|
WINDOW_CLOSE,
|
||||||
WINDOW_DEACTIVATE,
|
WINDOW_DEACTIVATE,
|
||||||
WINDOW_ENTER,
|
WINDOW_ENTER,
|
||||||
|
WINDOW_EXPOSE,
|
||||||
WINDOW_FOCUS_IN,
|
WINDOW_FOCUS_IN,
|
||||||
WINDOW_FOCUS_OUT,
|
WINDOW_FOCUS_OUT,
|
||||||
WINDOW_LEAVE,
|
WINDOW_LEAVE,
|
||||||
|
|||||||
@@ -261,6 +261,8 @@ namespace lime {
|
|||||||
|
|
||||||
case SDL_WINDOWEVENT_EXPOSED:
|
case SDL_WINDOWEVENT_EXPOSED:
|
||||||
|
|
||||||
|
ProcessWindowEvent (event);
|
||||||
|
|
||||||
if (!inBackground) {
|
if (!inBackground) {
|
||||||
|
|
||||||
RenderEvent::Dispatch (&renderEvent);
|
RenderEvent::Dispatch (&renderEvent);
|
||||||
@@ -741,6 +743,7 @@ namespace lime {
|
|||||||
case SDL_WINDOWEVENT_FOCUS_LOST: windowEvent.type = WINDOW_FOCUS_OUT; break;
|
case SDL_WINDOWEVENT_FOCUS_LOST: windowEvent.type = WINDOW_FOCUS_OUT; break;
|
||||||
case SDL_WINDOWEVENT_LEAVE: windowEvent.type = WINDOW_LEAVE; break;
|
case SDL_WINDOWEVENT_LEAVE: windowEvent.type = WINDOW_LEAVE; break;
|
||||||
case SDL_WINDOWEVENT_MINIMIZED: windowEvent.type = WINDOW_MINIMIZE; break;
|
case SDL_WINDOWEVENT_MINIMIZED: windowEvent.type = WINDOW_MINIMIZE; break;
|
||||||
|
case SDL_WINDOWEVENT_EXPOSED: windowEvent.type = WINDOW_EXPOSE; break;
|
||||||
|
|
||||||
case SDL_WINDOWEVENT_MOVED:
|
case SDL_WINDOWEVENT_MOVED:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user