summaryrefslogtreecommitdiff
path: root/new
diff options
context:
space:
mode:
Diffstat (limited to 'new')
-rw-r--r--new/button_windows.c2
-rw-r--r--new/checkbox_windows.c2
-rw-r--r--new/entry_windows.c2
-rw-r--r--new/newcontrol_windows.c4
-rw-r--r--new/ui_windows.h3
5 files changed, 6 insertions, 7 deletions
diff --git a/new/button_windows.c b/new/button_windows.c
index c57b778..149c52b 100644
--- a/new/button_windows.c
+++ b/new/button_windows.c
@@ -17,7 +17,7 @@ static BOOL onWM_COMMAND(uiControl *c, WORD code, LRESULT *lResult)
return TRUE;
}
-static BOOL onWM_NOTIFY(uiControl *c, WPARAM wParam, LPARAM lParam, LRESULT *lResult)
+static BOOL onWM_NOTIFY(uiControl *c, NMHDR *nm, LRESULT *lResult)
{
return FALSE;
}
diff --git a/new/checkbox_windows.c b/new/checkbox_windows.c
index abe128d..4f903ef 100644
--- a/new/checkbox_windows.c
+++ b/new/checkbox_windows.c
@@ -27,7 +27,7 @@ static BOOL onWM_COMMAND(uiControl *c, WORD code, LRESULT *lResult)
return TRUE;
}
-static BOOL onWM_NOTIFY(uiControl *c, WPARAM wParam, LPARAM lParam, LRESULT *lResult)
+static BOOL onWM_NOTIFY(uiControl *c, NMHDR *nm, LRESULT *lResult)
{
return FALSE;
}
diff --git a/new/entry_windows.c b/new/entry_windows.c
index df4a91d..41614c5 100644
--- a/new/entry_windows.c
+++ b/new/entry_windows.c
@@ -9,7 +9,7 @@ static BOOL onWM_COMMAND(uiControl *c, WORD code, LRESULT *lResult)
return FALSE;
}
-static BOOL onWM_NOTIFY(uiControl *c, WPARAM wParam, LPARAM lParam, LRESULT *lResult)
+static BOOL onWM_NOTIFY(uiControl *c, NMHDR *nm, LRESULT *lResult)
{
return FALSE;
}
diff --git a/new/newcontrol_windows.c b/new/newcontrol_windows.c
index f95f67f..0122db7 100644
--- a/new/newcontrol_windows.c
+++ b/new/newcontrol_windows.c
@@ -6,7 +6,7 @@ typedef struct singleHWND singleHWND;
struct singleHWND {
HWND hwnd;
BOOL (*onWM_COMMAND)(uiControl *, WORD, LRESULT *);
- BOOL (*onWM_NOTIFY)(uiControl *, WPARAM, LPARAM, LRESULT *);
+ BOOL (*onWM_NOTIFY)(uiControl *, NMHDR *, LRESULT *);
void (*onWM_DESTROY)(uiControl *);
uintptr_t parent;
};
@@ -69,7 +69,7 @@ static LRESULT CALLBACK singleSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam,
return lResult;
break;
case msgNOTIFY:
- if ((*(s->onWM_NOTIFY))(c, wParam, lParam, &lResult) != FALSE)
+ if ((*(s->onWM_NOTIFY))(c, (NMHDR *) lParam, &lResult) != FALSE)
return lResult;
break;
case WM_DESTROY:
diff --git a/new/ui_windows.h b/new/ui_windows.h
index b89af3a..cfea287 100644
--- a/new/ui_windows.h
+++ b/new/ui_windows.h
@@ -22,9 +22,8 @@ struct uiWindowsNewControlParams {
// ui redirects the message back and calls these functions.
// Store the result in *lResult and return any non-FALSE value (such as TRUE) to return the given result; return FALSE to pass the notification up to your window procedure.
// Note that these are only issued if they come from the uiControl itself; notifications from children of the uiControl (such as a header control) will be received normally.
- // TODO don't give WPARAM/LPARAM raw
BOOL (*onWM_COMMAND)(uiControl *c, WORD code, LRESULT *lResult);
- BOOL (*onWM_NOTIFY)(uiControl *c, WPARAM wParam, LPARAM lParam, LRESULT *lResult);
+ BOOL (*onWM_NOTIFY)(uiControl *c, NMHDR *nm, LRESULT *lResult);
// This is called in WM_DESTROY.
void (*onWM_DESTROY)(uiControl *c);
};