diff --git a/TODO.md b/TODO.md index 73e2e15b..cfd298a4 100644 --- a/TODO.md +++ b/TODO.md @@ -10,9 +10,10 @@ - make sure all terminology is consistent - 32-bit Mac OS X support (requires lots of code changes) - add a test for hidden controls when a window is shown -- WS_CLIPCHILDREN +- SWP_NOCOPYBITS (or was it WS_CLIPCHILDREN?) - buttons not in tab get drawover issues - buttons in tab without transparent drawing code get copied into the label when stack shown and rehidden +- see if we can clean up the GTK+ backend ultimately: - make everything vtable-based @@ -21,3 +22,4 @@ ultimately: - figure out what to do about custom containers - rename container to parent? - make the code flow of all platforms fully symmetrical +- add some sort of runtime type checking diff --git a/unix/button.c b/unix/button.c index ac6c9b43..d67b9a44 100644 --- a/unix/button.c +++ b/unix/button.c @@ -3,7 +3,7 @@ struct button { uiButton b; - void (*onClicked)(uiControl *, void *); + void (*onClicked)(uiButton *, void *); void *onClickedData; }; @@ -38,7 +38,7 @@ static void setText(uiButton *b, const char *text) gtk_button_set_label(BUTTON(b), text); } -static void setOnClicked(uiButton *bb, void (*f)(uiControl *, void *), void *data) +static void setOnClicked(uiButton *bb, void (*f)(uiButton *, void *), void *data) { struct button *b = (struct button *) bb; diff --git a/unix/checkbox.c b/unix/checkbox.c index 5111c0ed..f3563a16 100644 --- a/unix/checkbox.c +++ b/unix/checkbox.c @@ -31,12 +31,12 @@ static void onDestroy(GtkWidget *widget, gpointer data) static char *getText(uiCheckbox *c) { - return g_strdup(gtk_button_get_label(CHECKBOX(c))); + return g_strdup(gtk_button_get_label(GTK_BUTTON(CHECKBOX(c)))); } static void setText(uiCheckbox *c, const char *text) { - gtk_button_set_label(CHECKBOX(c), text); + gtk_button_set_label(GTK_BUTTON(CHECKBOX(c)), text); } static void setOnToggled(uiCheckbox *cc, void (*f)(uiCheckbox *, void *), void *data) diff --git a/unix/newcontrol.c b/unix/newcontrol.c index f7743f43..d23e1903 100644 --- a/unix/newcontrol.c +++ b/unix/newcontrol.c @@ -222,5 +222,4 @@ void uiUnixNewControl(uiControl *c, GType type, gboolean inScrolledWindow, gbool gtk_widget_show_all(s->immediate); c->Internal = s; - return c; } diff --git a/unix/tab.c b/unix/tab.c index 8332bbd2..bb168f56 100644 --- a/unix/tab.c +++ b/unix/tab.c @@ -43,7 +43,6 @@ static void addPage(uiTab *tt, const char *name, uiControl *child) uiTab *uiNewTab(void) { - uiControl *c; struct tab *t; GtkWidget *widget; diff --git a/unix/window.c b/unix/window.c index c030d87e..039feb7e 100644 --- a/unix/window.c +++ b/unix/window.c @@ -15,7 +15,7 @@ static gboolean onClosing(GtkWidget *win, GdkEvent *e, gpointer data) struct window *w = (struct window *) data; // return exact values just in case - if ((*(w->onClosing))(w, w->onClosingData)) + if ((*(w->onClosing))(uiWindow(w), w->onClosingData)) return FALSE; return TRUE; }