7#include <gwenhywfar/gwenhywfar.h>
8#include <gwenhywfar/gui.h>
9#include <gwenhywfar/dialog.h>
10#include <gwenhywfar/debug.h>
12#include <qapplication.h>
18int test1(
int argc,
char **argv) {
19 QApplication a(argc, argv);
38 fprintf(stderr,
"Could not create dialog.\n");
43 fprintf(stderr,
"Result: %d\n", rv);
50int test2(
int argc,
char **argv) {
51 QApplication a(argc, argv);
73 "This is an example progress with 2 steps"
74 "<html>This is an <strong>example</strong> progress with 2 steps</html>",
80 "This is an <b>example</b> progress with 2 steps",
88 "This message box should appear in the context of the open progress dialog",
107 QApplication a(argc, argv);
118 "<p><b>This</b> is an example <i>text</i>..</p>"
119 "<p>As you can see <font color=red>colors</font> can "
124 for (i1=1; i1<=10; i1++) {
127 snprintf(numbuf,
sizeof(numbuf)-1,
"Step %d\n", (
int)i1);
133 "Starting 2nd progress...",
136 for (i2=1; i2<=10; i2++) {
138 fprintf(stderr,
"Advancing %d/%d\n", (
int)i1, (
int)i2);
141 fprintf(stderr,
"Aborted by user (2)\n");
149 fprintf(stderr,
"Aborted by user (1)\n");
161int main(
int argc,
char **argv) {
162 return test1(argc, argv);
GWEN_GUI * getCInterface()
#define DBG_ERROR_ERR(dbg_logger, dbg_err)
struct GWEN_DIALOG GWEN_DIALOG
GWEN_DIALOG * Dlg_Test1_new()
#define GWEN_ERROR_USER_ABORTED
void GWEN_Gui_SetGui(GWEN_GUI *gui)
GWENHYWFAR_API int GWEN_Gui_ExecDialog(GWEN_DIALOG *dlg, uint32_t guiid)
#define GWEN_GUI_PROGRESS_DELAY
#define GWEN_GUI_PROGRESS_KEEP_OPEN
GWENHYWFAR_API uint32_t GWEN_Gui_ProgressStart(uint32_t progressFlags, const char *title, const char *text, uint64_t total, uint32_t guiid)
#define GWEN_GUI_PROGRESS_SHOW_PROGRESS
#define GWEN_GUI_MSG_FLAGS_TYPE_INFO
GWENHYWFAR_API int GWEN_Gui_ProgressEnd(uint32_t id)
GWENHYWFAR_API int GWEN_Gui_MessageBox(uint32_t flags, const char *title, const char *text, const char *b1, const char *b2, const char *b3, uint32_t guiid)
GWENHYWFAR_API int GWEN_Gui_ProgressLog(uint32_t id, GWEN_LOGGER_LEVEL level, const char *text)
#define GWEN_GUI_PROGRESS_SHOW_ABORT
#define GWEN_GUI_PROGRESS_SHOW_LOG
GWENHYWFAR_API int GWEN_Gui_ProgressAdvance(uint32_t id, uint32_t progress)
void GWEN_Logger_SetLevel(const char *logDomain, GWEN_LOGGER_LEVEL l)
@ GWEN_LoggerLevel_Notice
int main(int argc, char **argv)
int test3(int argc, char **argv)
int test2(int argc, char **argv)