Cleaned up some easy-to-fix TODOs on Windows, including a LONGTERM that will not be relevant to libui in its current architecture (that'll be handled with a custom build step that converts resources to source code). Next: making resources.rc truly shared-only to reduce the noise further.

This commit is contained in:
Pietro Gagliardi 2019-06-01 10:18:47 -04:00
parent 48cd6e1dd8
commit ed378d4e0b
2 changed files with 4 additions and 9 deletions

View File

@ -105,10 +105,8 @@ void uiMain(void)
hr = uiprivHrGetMessageW(&msg, NULL, 0, 0); hr = uiprivHrGetMessageW(&msg, NULL, 0, 0);
if (hr == S_FALSE) // WM_QUIT if (hr == S_FALSE) // WM_QUIT
return; return;
if (hr != S_OK) { if (hr != S_OK)
// TODO log error uiprivInternalError("GetMessageW() failed in uiMain(): 0x%08I32X", hr);
return;
}
// TODO IsDialogMessage() // TODO IsDialogMessage()
TranslateMessage(&msg); TranslateMessage(&msg);
DispatchMessageW(&msg); DispatchMessageW(&msg);
@ -127,9 +125,8 @@ void uiprivSysQueueMain(void (*f)(void *data), void *data)
HRESULT hr; HRESULT hr;
hr = uiprivHrPostMessageW(uiprivUtilWindow, uiprivUtilWindowMsgQueueMain, (WPARAM) f, (LPARAM) data); hr = uiprivHrPostMessageW(uiprivUtilWindow, uiprivUtilWindowMsgQueueMain, (WPARAM) f, (LPARAM) data);
if (hr != S_OK) { if (hr != S_OK)
// TODO handle error uiprivInternalError("PostMessageW() failed in uiQueueMain(): 0x%08I32X", hr);
}
} }
bool uiprivSysCheckThread(void) bool uiprivSysCheckThread(void)

View File

@ -1,13 +1,11 @@
// 30 may 2015 // 30 may 2015
#include "winapi.hpp" #include "winapi.hpp"
//TODO#include "resources.hpp"
// this is a UTF-8 file // this is a UTF-8 file
#pragma code_page(65001) #pragma code_page(65001)
// this is the Common Controls 6 manifest // this is the Common Controls 6 manifest
// we only define it in a shared build; static builds have to include the appropriate parts of the manifest in the output executable // we only define it in a shared build; static builds have to include the appropriate parts of the manifest in the output executable
// LONGTERM set up the string values here
#ifndef uiStatic #ifndef uiStatic
ISOLATIONAWARE_MANIFEST_RESOURCE_ID RT_MANIFEST "libui.manifest" ISOLATIONAWARE_MANIFEST_RESOURCE_ID RT_MANIFEST "libui.manifest"
#endif #endif