Migrated the GTK+ basic controls back. It doesn't quite work...

This commit is contained in:
Pietro Gagliardi 2015-04-29 10:36:31 -04:00
parent ec7f461af1
commit ff14f76bad
5 changed files with 8 additions and 4 deletions

View File

@ -3,7 +3,11 @@
osCFILES = \ osCFILES = \
unix/alloc.c \ unix/alloc.c \
unix/bin.c \ unix/bin.c \
unix/button.c \
unix/checkbox.c \
unix/container.c \ unix/container.c \
unix/entry.c \
unix/label.c \
unix/main.c \ unix/main.c \
unix/menu.c \ unix/menu.c \
unix/newcontrol.c \ unix/newcontrol.c \

View File

@ -61,7 +61,7 @@ uiButton *uiNewButton(const char *text)
"label", text, "label", text,
NULL); NULL);
b->widget = WIDGET(b); b->widget = GTK_WIDGET(uiControlHandle(uiControl(b)));
b->button = GTK_BUTTON(b->widget); b->button = GTK_BUTTON(b->widget);
g_signal_connect(b->widget, "clicked", G_CALLBACK(onClicked), b); g_signal_connect(b->widget, "clicked", G_CALLBACK(onClicked), b);

View File

@ -85,7 +85,7 @@ uiCheckbox *uiNewCheckbox(const char *text)
"label", text, "label", text,
NULL); NULL);
c->widget = WIDGET(c); c->widget = GTK_WIDGET(uiControlHandle(uiControl(c)));
c->button = GTK_BUTTON(c->widget); c->button = GTK_BUTTON(c->widget);
c->toggleButton = GTK_TOGGLE_BUTTON(c->widget); c->toggleButton = GTK_TOGGLE_BUTTON(c->widget);
c->checkButton = GTK_CHECK_BUTTON(c->widget); c->checkButton = GTK_CHECK_BUTTON(c->widget);

View File

@ -38,7 +38,7 @@ uiEntry *uiNewEntry(void)
FALSE, FALSE, onDestroy, e, FALSE, FALSE, onDestroy, e,
NULL); NULL);
e->widget = WIDGET(e); e->widget = GTK_WIDGET(uiControlHandle(uiControl(e)));
e->entry = GTK_ENTRY(e->widget); e->entry = GTK_ENTRY(e->widget);
uiEntry(e)->Text = entryText; uiEntry(e)->Text = entryText;

View File

@ -42,7 +42,7 @@ uiLabel *uiNewLabel(const char *text)
// TODO yalign 0? // TODO yalign 0?
NULL); NULL);
l->widget = WIDGET(l); l->widget = GTK_WIDGET(uiControlHandle(uiControl(l)));
l->label = GTK_LABEL(l->widget); l->label = GTK_LABEL(l->widget);
uiLabel(l)->Text = labelText; uiLabel(l)->Text = labelText;