diff options
author | Arisotura <thetotalworm@gmail.com> | 2019-06-04 15:53:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-04 15:53:08 +0200 |
commit | 97f4b5f70b67ea5cc142fbd1f3982c36b915a5d9 (patch) | |
tree | bd3fb3325db3743eef00cf3ddffafdeb644370a9 /src/libui_sdl/libui/unix/window.c | |
parent | f769d6e23f7635910e3f6659c6b55d8c6a8e96ff (diff) | |
parent | 3134c8fc66d1fbd5706930a3e3e64ce118406fe5 (diff) |
Merge branch 'master' into fast-forward-hotkey
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; } + |