Skip to content

Commit 3bea531

Browse files
committedMar 5, 2024·
Make listscreens example work even when backend=none
We've refactored the System hierarchy so we can make an instance of SystemWin/OSX/X11 classes even when LAF_BACKEND=none. We've made System::makeWin/OSX/X11() functions available as they might be enough in certain cases where the whole Skia is not needed. Some important changes in this patch: * os::instance() is deprecated, replaced with os::System::instance() * os::make_instance() is deprecated, replaced with os::System::make() * os::System::instance() returns an os::SystemRef
1 parent 13bc6a3 commit 3bea531

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+313
-228
lines changed
 

‎examples/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ function(laf_add_example name console="")
1515
endfunction()
1616

1717
laf_add_example(base64 CONSOLE)
18+
laf_add_example(listfonts CONSOLE)
19+
laf_add_example(listscreens CONSOLE)
1820
laf_add_example(show_platform CONSOLE)
1921
if(LAF_BACKEND STREQUAL "skia")
2022
laf_add_example(allevents GUI)
2123
laf_add_example(complextextlayout GUI)
2224
laf_add_example(custom_window GUI)
2325
laf_add_example(floating_window GUI)
2426
laf_add_example(helloworld GUI)
25-
laf_add_example(listfonts CONSOLE)
26-
laf_add_example(listscreens CONSOLE)
2727
laf_add_example(multiple_windows GUI)
2828
laf_add_example(panviewport GUI)
2929
laf_add_example(shader GUI)

‎examples/allevents.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ class LogWindow {
252252

253253
int app_main(int argc, char* argv[])
254254
{
255-
auto system = make_system();
255+
SystemRef system = System::make();
256256
system->setAppMode(AppMode::GUI);
257257

258258
LogWindow window(system);

0 commit comments

Comments
 (0)
Please sign in to comment.