Started migrating out implbug() in the windows backend. I'm gonna need a cstrf() to go along with wstrf().

This commit is contained in:
Pietro Gagliardi 2016-05-13 21:07:48 -04:00
parent 0205f2e5ca
commit 15b370bc36
1 changed files with 8 additions and 8 deletions

View File

@ -22,7 +22,7 @@ static std::map<HWND, struct handler> handlers;
void uiWindowsRegisterWM_COMMANDHandler(HWND hwnd, BOOL (*handler)(uiControl *, HWND, WORD, LRESULT *), uiControl *c)
{
if (handlers[hwnd].commandHandler != NULL)
implbug(L"already registered a WM_COMMAND handler to window handle %p", hwnd);
implbug("already registered a WM_COMMAND handler to window handle %p", hwnd);
handlers[hwnd].commandHandler = handler;
handlers[hwnd].c = c;
}
@ -30,7 +30,7 @@ void uiWindowsRegisterWM_COMMANDHandler(HWND hwnd, BOOL (*handler)(uiControl *,
void uiWindowsRegisterWM_NOTIFYHandler(HWND hwnd, BOOL (*handler)(uiControl *, HWND, NMHDR *, LRESULT *), uiControl *c)
{
if (handlers[hwnd].notifyHandler != NULL)
implbug(L"already registered a WM_NOTIFY handler to window handle %p", hwnd);
implbug("already registered a WM_NOTIFY handler to window handle %p", hwnd);
handlers[hwnd].notifyHandler = handler;
handlers[hwnd].c = c;
}
@ -38,7 +38,7 @@ void uiWindowsRegisterWM_NOTIFYHandler(HWND hwnd, BOOL (*handler)(uiControl *, H
void uiWindowsRegisterWM_HSCROLLHandler(HWND hwnd, BOOL (*handler)(uiControl *, HWND, WORD, LRESULT *), uiControl *c)
{
if (handlers[hwnd].hscrollHandler != NULL)
implbug(L"already registered a WM_HSCROLL handler to window handle %p", hwnd);
implbug("already registered a WM_HSCROLL handler to window handle %p", hwnd);
handlers[hwnd].hscrollHandler = handler;
handlers[hwnd].c = c;
}
@ -46,21 +46,21 @@ void uiWindowsRegisterWM_HSCROLLHandler(HWND hwnd, BOOL (*handler)(uiControl *,
void uiWindowsUnregisterWM_COMMANDHandler(HWND hwnd)
{
if (handlers[hwnd].commandHandler == NULL)
implbug(L"window handle %p not registered to receive WM_COMMAND events", hwnd);
implbug("window handle %p not registered to receive WM_COMMAND events", hwnd);
handlers[hwnd].commandHandler = NULL;
}
void uiWindowsUnregisterWM_NOTIFYHandler(HWND hwnd)
{
if (handlers[hwnd].notifyHandler == NULL)
implbug(L"window handle %p not registered to receive WM_NOTIFY events", hwnd);
implbug("window handle %p not registered to receive WM_NOTIFY events", hwnd);
handlers[hwnd].notifyHandler = NULL;
}
void uiWindowsUnregisterWM_HSCROLLHandler(HWND hwnd)
{
if (handlers[hwnd].hscrollHandler == NULL)
implbug(L"window handle %p not registered to receive WM_HSCROLL events", hwnd);
implbug("window handle %p not registered to receive WM_HSCROLL events", hwnd);
handlers[hwnd].hscrollHandler = NULL;
}
@ -130,14 +130,14 @@ static std::map<HWND, bool> wininichanges;
void uiWindowsRegisterReceiveWM_WININICHANGE(HWND hwnd)
{
if (wininichanges[hwnd])
implbug(L"window handle %p already subscribed to receive WM_WINICHANGEs", hwnd);
implbug("window handle %p already subscribed to receive WM_WINICHANGEs", hwnd);
wininichanges[hwnd] = true;
}
void uiWindowsUnregisterReceiveWM_WININICHANGE(HWND hwnd)
{
if (!wininichanges[hwnd])
implbug(L"window handle %p not registered to receive WM_WININICHANGEs", hwnd);
implbug("window handle %p not registered to receive WM_WININICHANGEs", hwnd);
wininichanges[hwnd] = false;
}