summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2015-04-16 09:53:00 -0400
committerPietro Gagliardi <[email protected]>2015-04-16 09:53:44 -0400
commit8f4788d506c4d1a054b2b713510b021f8f101ea6 (patch)
tree03a288cfea9aeb821ea27190d33ec68a000e8073
parent54c5d551f0d994b6ebb177e2542190220d6638bc (diff)
Fixed some build errors in the Windows backend.
-rw-r--r--new/windows/button.c6
-rw-r--r--new/windows/checkbox.c8
-rw-r--r--new/windows/tab.c4
3 files changed, 9 insertions, 9 deletions
diff --git a/new/windows/button.c b/new/windows/button.c
index d216d79..fd7afa3 100644
--- a/new/windows/button.c
+++ b/new/windows/button.c
@@ -63,7 +63,7 @@ static void defaultOnClicked(uiButton *b, void *data)
static char *getText(uiButton *b)
{
- return uiWindowsControlText(uiControl(c));
+ return uiWindowsControlText(uiControl(b));
}
static void setText(uiButton *b, const char *text)
@@ -71,9 +71,9 @@ static void setText(uiButton *b, const char *text)
uiWindowsControlSetText(uiControl(b), text);
}
-static void setOnClicked(uiButton *b, void (*f)(uiButton *, void *), void *data)
+static void setOnClicked(uiButton *bb, void (*f)(uiButton *, void *), void *data)
{
- struct button *b = (struct button *) b;
+ struct button *b = (struct button *) bb;
b->onClicked = f;
b->onClickedData = data;
diff --git a/new/windows/checkbox.c b/new/windows/checkbox.c
index 5d81620..c1d5a6f 100644
--- a/new/windows/checkbox.c
+++ b/new/windows/checkbox.c
@@ -3,7 +3,7 @@
struct checkbox {
uiCheckbox c;
- void (*onToggled)(uiControl *, void *);
+ void (*onToggled)(uiCheckbox *, void *);
void *onToggledData;
};
@@ -17,7 +17,7 @@ static BOOL onWM_COMMAND(uiControl *cc, WORD code, LRESULT *lResult)
return FALSE;
// we didn't use BS_AUTOCHECKBOX (see controls_windows.go) so we have to manage the check state ourselves
- hwnd = uiControlHWND(c);
+ hwnd = uiControlHWND(uiControl(c));
check = BST_CHECKED;
if (SendMessage(hwnd, BM_GETCHECK, 0, 0) == BST_CHECKED)
check = BST_UNCHECKED;
@@ -74,7 +74,7 @@ static void setOnToggled(uiCheckbox *cc, void (*f)(uiCheckbox *, void *), void *
c->onToggledData = data;
}
-static int getChecked(uiChecckbox *c)
+static int getChecked(uiCheckbox *c)
{
HWND hwnd;
@@ -100,7 +100,7 @@ uiCheckbox *uiNewCheckbox(const char *text)
uiWindowsNewControlParams p;
WCHAR *wtext;
- c = uiNew(struct checkbox)
+ c = uiNew(struct checkbox);
p.dwExStyle = 0;
p.lpClassName = L"button";
diff --git a/new/windows/tab.c b/new/windows/tab.c
index 1afef82..09d8abf 100644
--- a/new/windows/tab.c
+++ b/new/windows/tab.c
@@ -132,7 +132,7 @@ void addPage(uiTab *tt, const char *name, uiControl *child)
t->pages = (uiParent **) uiRealloc(t->pages, t->cap * sizeof (uiParent *), "uiParent *[]");
}
- hwnd = uiControlHWND(c);
+ hwnd = uiControlHWND(uiControl(t));
n = SendMessageW(hwnd, TCM_GETITEMCOUNT, 0, 0);
parent = uiNewParent((uintptr_t) hwnd);
@@ -179,7 +179,7 @@ uiTab *uiNewTab(void)
uiWindowsNewControl(uiControl(t), &p);
hwnd = uiControlHWND(uiControl(t));
- if ((*fv_SetWindowSubclass)(hwnd, tabSubProc, 0, (DWORD_PTR) c) == FALSE)
+ if ((*fv_SetWindowSubclass)(hwnd, tabSubProc, 0, (DWORD_PTR) t) == FALSE)
logLastError("error subclassing Tab to give it its own resize handler in uiNewTab()");
uiControl(t)->PreferredSize = preferredSize;