7#include <gwenhywfar/gwenhywfar.h>
8#include <gwenhywfar/gui.h>
9#include <gwenhywfar/dialog.h>
10#include <gwenhywfar/debug.h>
12#include <QApplication>
16int test1(
int argc,
char **argv) {
17 QApplication a(argc, argv);
36 fprintf(stderr,
"Could not create dialog.\n");
41 fprintf(stderr,
"Result: %d\n", rv);
48int test2(
int argc,
char **argv) {
49 QApplication a(argc, argv);
71 "This is an example progress with 2 steps"
72 "<html>This is an <strong>example</strong> progress with 2 steps</html>",
78 "This is an <b>example</b> progress with 2 steps",
86 "This message box should appear in the context of the open progress dialog",
99int test3(
int argc,
char **argv) {
105 QApplication a(argc, argv);
116 "<p><b>This</b> is an example <i>text</i>..</p>"
117 "<p>As you can see <font color=red>colors</font> can "
122 for (i1=1; i1<=10; i1++) {
125 snprintf(numbuf,
sizeof(numbuf)-1,
"Step %d\n", (
int)i1);
131 "Starting 2nd progress...",
134 for (i2=1; i2<=10; i2++) {
136 fprintf(stderr,
"Advancing %d/%d\n", (
int)i1, (
int)i2);
139 fprintf(stderr,
"Aborted by user (2)\n");
147 fprintf(stderr,
"Aborted by user (1)\n");
159int main(
int argc,
char **argv) {
160 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)