Commit Graph

831 Commits

Author SHA1 Message Date
Pietro Gagliardi c241e8676a Restructured the controls tests to allow for more flexibility and implemented that on Windows. Now I can start building ad-hoc controls in tests. 2022-07-30 18:40:10 -04:00
Pietro Gagliardi eb1250a32b Fixed the build and implemented some of the missing functions I just added. Not too happy with how these tests are structured so far; I might hack on that before continuing... 2022-07-30 12:13:36 -04:00
Pietro Gagliardi 1d7c530c32 More implementation of the new uiWindows control parenting and sizing system. 2022-07-30 04:14:16 -04:00
Pietro Gagliardi c9310e21b7 Implemented parenting on Windows; doing everything through uiControlSetParent() makes this trivial. Now I need to implement sizing, so we can actually test some things with this. 2022-07-29 22:28:38 -04:00
Pietro Gagliardi f3820ac4b0 Okay new plan: we're going to start with the Windows implementation instead, since that's the one that's going to have to be more complicated. I'll then decide if we should copy this strategy on the other platforms or not. 2022-07-27 21:43:15 -04:00
Pietro Gagliardi 47f2bffd8a Merge branch 'master' into remodel
Conflicts:
	windows/winapi.hpp
(manually resolved by elaborating comment)
2020-10-02 10:30:58 -04:00
Tim Gates ce8c2dc22c
docs: Fix simple typo, plaform -> platform
There is a small typo in windows/_rc2bin/winapi.hpp, windows/winapi.hpp.

Should read `platform` rather than `plaform`.
2020-09-30 07:05:44 +10:00
Pietro Gagliardi 7cdd6ee38c Finished all the necessary bits to implement what little of uiWindow we have now on Windows. Now to fill in the tests. 2020-06-07 14:10:16 -04:00
Pietro Gagliardi 188d9f736f Reintegrated UTF-16 stuff we need immediately and prepared the test suite for it. 2020-06-06 22:30:50 -04:00
Pietro Gagliardi 3f392d04ce Started migrating uiWindow on Windows. Oh boy it's UTF-16 time! 2020-06-06 19:27:05 -04:00
Pietro Gagliardi ecb5558d3d And changed the other OSs to define uiprivSysMain/Quit(). 2020-05-10 12:29:58 -04:00
Pietro Gagliardi 83129eeef5 Normalized uiprivInternalError() calls to always try to fail gracefully, and make sure errors don't call abort() so we can resume when debugging (and because this isn't really our decision to make...). (The debugger breaks will be removed from release builds when we get to that point.) Finally, refined some TODOs and removed some stale ones (in this case, that were related to the first few things). 2020-02-09 13:37:45 -05:00
Pietro Gagliardi c17f854d04 And added uiControlOSVtable on Windows. We're now back to building everywhere! :D 2019-06-18 20:31:28 -04:00
Pietro Gagliardi 8531710f03 More TODOs. 2019-06-01 12:11:16 -04:00
Pietro Gagliardi dea7436468 Changed LONGTERMs in windows/ to TODOs. If it's not worth doing soon, it should go in another list of things to do. 2019-06-01 10:33:03 -04:00
Pietro Gagliardi a8cd121003 Cleaned up resources on Windows. Now to do so for tester. 2019-06-01 10:24:32 -04:00
Pietro Gagliardi ed378d4e0b 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. 2019-06-01 10:18:47 -04:00
Pietro Gagliardi 48cd6e1dd8 Cleaned #include directives so C standard library headers are sorted and so each source file only includes one header file. This makes things clenaer, and alos allows us to more properly strip unneeded headers later. 2019-06-01 09:27:17 -04:00
Pietro Gagliardi 9daef443b2 Moved uiQueueMain() to common/init.c to avoid having multiple initialized variables; the per-OS versions are now uiprivSysQueueMain(). Also more TODOs. 2019-05-30 01:39:43 -04:00
Pietro Gagliardi ab5b3076ed Removed uiInitError length checking and just truncated too-long messages with an ellipsis. Also removed the non-printf version of uiprivReportInitError. 2019-05-30 01:16:33 -04:00
Pietro Gagliardi 19ad0d33a3 Changed uiInit() to return bool instead of int, now that we've settled on using bool. 2019-05-29 21:10:44 -04:00
Pietro Gagliardi 84a4fd8915 And wrote it on Windows. Okay, now we can FINALLY start working on controls!!!!! 2019-05-29 01:02:15 -04:00
Pietro Gagliardi a6c1e1ed17 Fixed build errors. Now to fix runtime errors. 2019-05-27 11:02:23 -04:00
Pietro Gagliardi 2e82d4aad4 Wrote uiprivReportError() on Windows. Now to fix the... lots of compiler errors :| 2019-05-27 10:45:55 -04:00
Pietro Gagliardi f97383f66c Rearranged things so that uiInit() itself is in common/init.c and the OS-specific initialization code is its own standalone internal function. This'll make testing a bit easier, especially after the next few commits, and will allow me to test pre-initialization and cross-thread stuff a bit more easily. 2019-05-09 12:07:28 -04:00
Pietro Gagliardi 559e4bc139 Changed uiprivHrGetMessageW() to return the BOOL ret value as S_OK and S_FALSE. 2019-04-29 23:12:39 -04:00
Pietro Gagliardi 8ffb2b1b1e Fixed build warnings and errors. Now we just need to implement testingRunWithTimeout() on Windows. 2019-04-28 16:35:25 -04:00
Pietro Gagliardi 5548119d8d Big oops 2019-04-28 16:26:00 -04:00
Pietro Gagliardi 812c559b11 Implemented uiMain() and friends on Windows. As a result, started the new HRESULT wrapper stuff. 2019-04-28 16:23:25 -04:00
Pietro Gagliardi 23591eeefa Executive decision: drop uiUnint(). This was really more for double-checking *my* work, mostly with regards to memory management, and we could probably do that in the test suite instead, or even with AddressSanitizer. 2019-04-21 20:59:36 -04:00
Pietro Gagliardi f548f6d4d2 Readded the manifest to libui.dll. The test suite passes! 2019-04-21 17:46:50 -04:00
Pietro Gagliardi f7867f3427 ALMOST fixed the build on Windows with MSVC. (For the change to test/testing.h: Even in VS2019 inline isn't available in C, ugh. That function doesn't need to be inline anyway, so eh.) 2019-04-21 15:08:09 -04:00
Pietro Gagliardi c6aa8c3324 Pruned windows/init.cpp to a minimal initialization that we can test things with, which includes adding a function to load err->Message with a formatted string.
Also added a better error for if InitCommonControlsEx() returns 0 without setting the last error; this usually means that v5 is loaded.
Fixes #451.
Updates #337.
2019-04-21 14:49:16 -04:00
Pietro Gagliardi b89a18f3dd Don't define DllMain() in a static build. Fixes #433. 2019-04-21 13:58:19 -04:00
Pietro Gagliardi 29c51b6348 Started readding the Windows code; added the Windows version headers to the docs as well now since I'm cleaning up winapi.hpp as well. 2019-04-21 13:54:39 -04:00
Pietro Gagliardi 992d8694a9 Let's start the remodel. Move almost everything out of the way. 2019-04-08 20:36:21 -04:00
Pietro Gagliardi e8daaf659e windows/direct2d: fix ID2D1RenderTarget::GetPixelFormat() and ID2D1RenderTarget::GetSize() typedefs in MinGW-w64 ABI workaround
MinGW-w64 recently added manual workarounds directly into the class via overloads that make existing Direct2D code source-compatible. However, that exposed an error in my definition of the typedefs I was using in my own workaround: both of these methods are const, even in MSVC, but I neglected to include the const qualifier. I'm not sure how this code compiled in the past, but now the overload resolution engine finds no match.

I want to remain compatible with versions of MinGW-w64 old enough to not have their fix, so our fix remains.

Fixes #446.
2019-04-07 21:56:35 -04:00
Pietro Gagliardi 4afebf4d8e Try again again. 2019-04-03 10:20:07 -04:00
Pietro Gagliardi 466f542bd3 Try again. 2019-04-03 10:11:57 -04:00
Pietro Gagliardi 30a8cbf8b1 Fixed VS2017 build for now. 2019-04-03 10:05:00 -04:00
Pietro Gagliardi 257536103f Clean up specification of Windows dependency listp also suggested by TheQwertiest in freenode #mesonbuild. Also more TODOs. 2019-03-29 11:03:07 -04:00
Pietro Gagliardi 7ea8c33547 Removed TODO about bulk Windows libraries as the answer is no; thanks TheQwertiest in freenode #mesonbuild. 2019-03-29 10:46:27 -04:00
Pietro Gagliardi 81e25f76f2 Moved the binary PIC as a TODO and marked merge blockers as MESONTODO. Also removed a stale cmake-era TODO, because the manifest distribution idea it had will eventually be part of the uires tool. 2019-03-27 21:34:09 -04:00
Pietro Gagliardi 6a5fedf3f4 Settled windows/CMakeLists.txt. 2019-03-27 00:59:32 -04:00
Pietro Gagliardi 1b9250e41e Removed include_directories hackery, as suggested by various people in freenode #mesonbuild. 2019-03-25 20:07:22 -04:00
Pietro Gagliardi 467a9102ec Fixed static builds on all platforms. So close to getting all this set up! 2019-03-24 14:11:02 -04:00
Pietro Gagliardi c1dfc0ab5d And got the Windows build working. Woo! 2019-03-24 12:57:25 -04:00
Pietro Gagliardi 2be9a4f3a3 Added the initial Windows meson.build. Windows Meson is having problems running, so we'll have to test this later. 2019-03-23 22:28:17 -04:00
Pietro Gagliardi 6a22c61cd4 More work on winrebarexplorertheme.cpp, including the boilerplate for custom draw. More TODOs in general. 2018-10-11 22:19:10 -04:00
Pietro Gagliardi e2222e414d Sigh MinGW 2018-09-01 20:03:15 -04:00