Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / onlineupdate / workben / test_dialog.cxx
blobba9f258df9139376dad3cd0c73eaa22904a68d68
1 #include "progressui.h"
3 #if defined(_WIN32)
4 #include "progressui_win.cxx"
5 #else
6 #include "progressui_gtk.cxx"
7 #endif
9 #include <thread>
10 #include <chrono>
11 #include <iostream>
13 void func()
15 for (int i = 0; i <= 100; ++i)
17 std::this_thread::sleep_for(std::chrono::milliseconds(200));
18 UpdateProgressUI(i);
20 QuitProgressUI();
23 int NS_main(int argc, NS_tchar** argv)
25 InitProgressUI(&argc, &argv);
26 std::thread a(func);
28 volatile bool b = false;
31 std::this_thread::sleep_for(std::chrono::seconds(1));
33 while (!b);
35 int result = ShowProgressUI();
36 std::cout << result << std::endl;
37 a.join();
38 return 0;