2015-04-28 11:15:29 -05:00
|
|
|
// 28 april 2015
|
|
|
|
#include "uipriv_unix.h"
|
|
|
|
|
2015-05-10 13:05:59 -05:00
|
|
|
int binHasOSParent(uiBin *b)
|
2015-04-28 11:15:29 -05:00
|
|
|
{
|
2015-04-30 16:49:38 -05:00
|
|
|
GtkWidget *binWidget;
|
2015-04-28 11:15:29 -05:00
|
|
|
|
2015-04-30 16:49:38 -05:00
|
|
|
binWidget = GTK_WIDGET(uiControlHandle(uiControl(b)));
|
2015-05-10 13:05:59 -05:00
|
|
|
return gtk_widget_get_parent(binWidget) != NULL;
|
2015-04-28 11:15:29 -05:00
|
|
|
}
|
|
|
|
|
2015-05-10 13:05:59 -05:00
|
|
|
void binSetOSParent(uiBin *b, uintptr_t osParent)
|
2015-04-28 11:15:29 -05:00
|
|
|
{
|
2015-05-10 13:05:59 -05:00
|
|
|
GtkWidget *binWidget;
|
2015-04-28 11:15:29 -05:00
|
|
|
|
2015-05-10 13:05:59 -05:00
|
|
|
binWidget = GTK_WIDGET(uiControlHandle(uiControl(b)));
|
|
|
|
gtk_container_add(GTK_CONTAINER(osParent), binWidget);
|
2015-04-28 11:15:29 -05:00
|
|
|
}
|
|
|
|
|
2015-05-10 13:05:59 -05:00
|
|
|
void binRemoveOSParent(uiBin *b)
|
2015-04-28 11:15:29 -05:00
|
|
|
{
|
2015-05-10 13:05:59 -05:00
|
|
|
GtkWidget *binWidget;
|
|
|
|
GtkWidget *oldparent;
|
2015-04-28 11:15:29 -05:00
|
|
|
|
2015-05-10 13:05:59 -05:00
|
|
|
binWidget = GTK_WIDGET(uiControlHandle(uiControl(b)));
|
|
|
|
oldparent = gtk_widget_get_parent(binWidget);
|
|
|
|
gtk_container_remove(GTK_CONTAINER(oldparent), binWidget);
|
2015-04-28 11:15:29 -05:00
|
|
|
}
|
|
|
|
|
2015-05-10 13:05:59 -05:00
|
|
|
void binResizeRootAndUpdate(uiBin *b, intmax_t x, intmax_t y, intmax_t width, intmax_t height)
|
2015-04-28 11:15:29 -05:00
|
|
|
{
|
2015-05-10 13:05:59 -05:00
|
|
|
// not used on GTK+
|
2015-04-28 11:15:29 -05:00
|
|
|
}
|
|
|
|
|
2015-05-10 13:05:59 -05:00
|
|
|
void binTranslateMargins(uiBin *b, intmax_t *left, intmax_t *top, intmax_t *right, intmax_t *bottom, uiSizing *d)
|
2015-04-28 11:15:29 -05:00
|
|
|
{
|
2015-05-10 13:05:59 -05:00
|
|
|
// not used on GTK+
|
2015-04-28 11:15:29 -05:00
|
|
|
}
|