summaryrefslogtreecommitdiffstats
path: root/onlineupdate/workben
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:51:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:51:28 +0000
commit940b4d1848e8c70ab7642901a68594e8016caffc (patch)
treeeb72f344ee6c3d9b80a7ecc079ea79e9fba8676d /onlineupdate/workben
parentInitial commit. (diff)
downloadlibreoffice-upstream.tar.xz
libreoffice-upstream.zip
Adding upstream version 1:7.0.4.upstream/1%7.0.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'onlineupdate/workben')
-rw-r--r--onlineupdate/workben/test_dialog.cxx39
1 files changed, 39 insertions, 0 deletions
diff --git a/onlineupdate/workben/test_dialog.cxx b/onlineupdate/workben/test_dialog.cxx
new file mode 100644
index 000000000..ba9f258df
--- /dev/null
+++ b/onlineupdate/workben/test_dialog.cxx
@@ -0,0 +1,39 @@
+#include "progressui.h"
+
+#if defined(_WIN32)
+#include "progressui_win.cxx"
+#else
+#include "progressui_gtk.cxx"
+#endif
+
+#include <thread>
+#include <chrono>
+#include <iostream>
+
+void func()
+{
+ for (int i = 0; i <= 100; ++i)
+ {
+ std::this_thread::sleep_for(std::chrono::milliseconds(200));
+ UpdateProgressUI(i);
+ }
+ QuitProgressUI();
+}
+
+int NS_main(int argc, NS_tchar** argv)
+{
+ InitProgressUI(&argc, &argv);
+ std::thread a(func);
+ /*
+ volatile bool b = false;
+ do
+ {
+ std::this_thread::sleep_for(std::chrono::seconds(1));
+ }
+ while (!b);
+ */
+ int result = ShowProgressUI();
+ std::cout << result << std::endl;
+ a.join();
+ return 0;
+}