window: exposed "raise()" function from SDL to bring the specified window to the top of the display stack

This commit is contained in:
Lars A. Doucet
2015-08-20 20:57:49 -05:00
parent ea6cac44a6
commit 36538a4b3e
6 changed files with 31 additions and 0 deletions

View File

@@ -1172,6 +1172,13 @@ namespace lime {
}
value lime_window_raise (value window) {
Window* targetWindow = (Window*)(intptr_t)val_float (window);
targetWindow->Raise ();
return alloc_null ();
}
value lime_window_resize (value window, value width, value height) {
@@ -1316,6 +1323,7 @@ namespace lime {
DEFINE_PRIM (lime_window_get_x, 1);
DEFINE_PRIM (lime_window_get_y, 1);
DEFINE_PRIM (lime_window_move, 3);
DEFINE_PRIM (lime_window_raise, 1);
DEFINE_PRIM (lime_window_resize, 3);
DEFINE_PRIM (lime_window_set_enable_text_events, 2);
DEFINE_PRIM (lime_window_set_fullscreen, 2);

View File

@@ -184,6 +184,12 @@ namespace lime {
}
void SDLWindow::Raise () {
SDL_RaiseWindow (sdlWindow);
}
void SDLWindow::Resize (int width, int height) {

View File

@@ -25,6 +25,7 @@ namespace lime {
virtual int GetX ();
virtual int GetY ();
virtual void Move (int x, int y);
virtual void Raise ();
virtual void Resize (int width, int height);
virtual void SetEnableTextEvents (bool enabled);
virtual bool SetFullscreen (bool fullscreen);