summaryrefslogtreecommitdiff
path: root/new
diff options
context:
space:
mode:
Diffstat (limited to 'new')
-rw-r--r--new/TODO.md4
-rw-r--r--new/unix/button.c4
-rw-r--r--new/unix/checkbox.c4
-rw-r--r--new/unix/newcontrol.c1
-rw-r--r--new/unix/tab.c1
-rw-r--r--new/unix/window.c2
6 files changed, 8 insertions, 8 deletions
diff --git a/new/TODO.md b/new/TODO.md
index 73e2e15..cfd298a 100644
--- a/new/TODO.md
+++ b/new/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/new/unix/button.c b/new/unix/button.c
index ac6c9b4..d67b9a4 100644
--- a/new/unix/button.c
+++ b/new/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/new/unix/checkbox.c b/new/unix/checkbox.c
index 5111c0e..f3563a1 100644
--- a/new/unix/checkbox.c
+++ b/new/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/new/unix/newcontrol.c b/new/unix/newcontrol.c
index f7743f4..d23e190 100644
--- a/new/unix/newcontrol.c
+++ b/new/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/new/unix/tab.c b/new/unix/tab.c
index 8332bbd..bb168f5 100644
--- a/new/unix/tab.c
+++ b/new/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/new/unix/window.c b/new/unix/window.c
index c030d87..039feb7 100644
--- a/new/unix/window.c
+++ b/new/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;
}