Fixed some build errors in the Windows backend.
This commit is contained in:
parent
0a34d4f894
commit
83cb200582
|
@ -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;
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue