Implemented the fullscreen stuff on GTK+.
This commit is contained in:
parent
fd9af04123
commit
132d925b70
|
@ -28,6 +28,7 @@ struct uiWindow {
|
||||||
void (*onContentSizeChanged)(uiWindow *, void *);
|
void (*onContentSizeChanged)(uiWindow *, void *);
|
||||||
void *onContentSizeChangedData;
|
void *onContentSizeChangedData;
|
||||||
gboolean changingSize;
|
gboolean changingSize;
|
||||||
|
gboolean fullscreen;
|
||||||
};
|
};
|
||||||
|
|
||||||
static gboolean onClosing(GtkWidget *win, GdkEvent *e, gpointer data)
|
static gboolean onClosing(GtkWidget *win, GdkEvent *e, gpointer data)
|
||||||
|
@ -212,6 +213,22 @@ void uiWindowSetContentSize(uiWindow *w, int width, int height)
|
||||||
gtk_widget_set_size_request(w->childHolderWidget, -1, -1);
|
gtk_widget_set_size_request(w->childHolderWidget, -1, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int uiWindowFullscreen(uiWindow *w)
|
||||||
|
{
|
||||||
|
return w->fullscreen;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO use window-state-event to track
|
||||||
|
// TODO does this send an extra size changed?
|
||||||
|
void uiWindowSetFullscreen(uiWindow *w, int fullscreen)
|
||||||
|
{
|
||||||
|
w->fullscreen = fullscreen;
|
||||||
|
if (w->fullscreen)
|
||||||
|
gtk_window_fullscreen(w->window);
|
||||||
|
else
|
||||||
|
gtk_window_unfullscreen(w->window);
|
||||||
|
}
|
||||||
|
|
||||||
void uiWindowOnContentSizeChanged(uiWindow *w, void (*f)(uiWindow *, void *), void *data)
|
void uiWindowOnContentSizeChanged(uiWindow *w, void (*f)(uiWindow *, void *), void *data)
|
||||||
{
|
{
|
||||||
w->onContentSizeChanged = f;
|
w->onContentSizeChanged = f;
|
||||||
|
|
Loading…
Reference in New Issue