diff options
| author | Pietro Gagliardi <[email protected]> | 2015-04-07 13:22:46 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2015-04-07 13:22:46 -0400 |
| commit | 5b929084f8b80409ee39d21ef80f562042807e0b (patch) | |
| tree | 513a6bbf595a0b43dc6fcc4ec9fa620f1116cdb1 /new/window_unix.c | |
| parent | 587da1f40fd7aa64119657c30017da4a63eb1a68 (diff) | |
Tied everything together. Now to fix build issues.
Diffstat (limited to 'new/window_unix.c')
| -rw-r--r-- | new/window_unix.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/new/window_unix.c b/new/window_unix.c index 3a145ac..ecc520c 100644 --- a/new/window_unix.c +++ b/new/window_unix.c @@ -3,6 +3,7 @@ struct uiWindow { GtkWidget *widget; + GtkWidget *container; int (*onClosing)(uiWindow *, void *); void *onClosingData; }; @@ -15,6 +16,8 @@ uiWindow *uiNewWindow(char *title, int width, int height) w->widget = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(w->widget), title); gtk_window_resize(GTK_WINDOW(w->widget), width, height); + w->container = newContainer(); + gtk_container_add(GTK_CONTAINER(w->widget), w->container); return w; } @@ -58,3 +61,9 @@ void uiWindowOnClosing(uiWindow *w, int (*f)(uiWindow *, void *), void *data) w->onClosingData = data; g_signal_connect(w->widget, "delete-event", G_CALLBACK(onClosing), w); } + +void uiWindowSetChild(uiWindow *w, uiControl *c) +{ + uiContainer(w->container)->child = c; + (*(c->setParent))(c, (uintptr_t) (w->container)); +} |
