diff options
author | Arisotura <thetotalworm@gmail.com> | 2019-05-26 00:52:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-26 00:52:11 +0200 |
commit | 23eccc943973e32a0c0bb367a4b2ba19d8e54030 (patch) | |
tree | 1bedf83ae85b51c5321d5f1d8bec4be311812152 /src/libui_sdl/libui/unix/window.c | |
parent | 99dbbb0b0464d91ed07ffd67c0b6ef83bc6a293e (diff) | |
parent | ebad773a3881f31ab668cc0cbea89cc34f5cd2b7 (diff) |
Merge pull request #412 from PoroCYon/master
Make OpenGL renderer work on Linux
Diffstat (limited to 'src/libui_sdl/libui/unix/window.c')
-rw-r--r-- | src/libui_sdl/libui/unix/window.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/libui_sdl/libui/unix/window.c b/src/libui_sdl/libui/unix/window.c index 7da1134..6d5e2de 100644 --- a/src/libui_sdl/libui/unix/window.c +++ b/src/libui_sdl/libui/unix/window.c @@ -102,6 +102,23 @@ static void uiWindowDestroy(uiControl *c) uiFreeControl(uiControl(w)); } +void uiWindowSetPosition(uiWindow *w, int x, int y) +{ + if (!w) return; + + gtk_window_move(w->window, x, y); +} + +void uiWindowPosition(uiWindow *w, int *x, int *y) +{ + if (!w) return; + + int xx, yy; + gtk_window_get_position(w->window, &xx, &yy); + if (x) *x = xx; + if (y) *y = yy; +} + uiUnixControlDefaultHandle(uiWindow) uiControl *uiWindowParent(uiControl *c) @@ -442,3 +459,4 @@ uiWindow *uiNewWindow(const char *title, int width, int height, int maximized, i return w; } + |