14 #include "../testdialogs/dlg_test.h"
15 #include "../testdialogs/dlg_test2.h"
17 #include <gwenhywfar/gwenhywfar.h>
18 #include <gwenhywfar/gui.h>
19 #include <gwenhywfar/dialog.h>
20 #include <gwenhywfar/debug.h>
28 int test1(
int argc,
char **argv) {
42 gtk_init (&argc, &argv);
50 fprintf(stderr,
"Could not create dialog.\n");
55 fprintf(stderr,
"Result: %d\n", rv);
64 int test2(
int argc,
char **argv) {
73 gtk_init (&argc, &argv);
83 "<p><b>This</b> is an example <i>text</i>..</p>"
84 "<p>As you can see <font color=red>colors</font> can "
89 for (i1=1; i1<=10; i1++) {
92 snprintf(numbuf,
sizeof(numbuf)-1,
"Step %d\n", (
int)i1);
98 "Starting 2nd progress...",
101 for (i2=1; i2<=10; i2++) {
103 fprintf(stderr,
"Advancing %d/%d\n", (
int)i1, (
int)i2);
106 fprintf(stderr,
"Aborted by user (2)\n");
114 fprintf(stderr,
"Aborted by user (1)\n");
140 gtk_init (&argc, &argv);
148 fprintf(stderr,
"Could not create dialog.\n");
153 fprintf(stderr,
"Result: %d\n", rv);
162 int main(
int argc,
char **argv) {
164 if (strcasecmp(argv[1],
"1")==0)
165 return test1(argc, argv);
166 else if (strcasecmp(argv[1],
"2")==0)
167 return test2(argc, argv);
168 else if (strcasecmp(argv[1],
"3")==0)
169 return test3(argc, argv);
171 return test1(argc, argv);
int GWEN_Gui_ProgressLog(uint32_t id, GWEN_LOGGER_LEVEL level, const char *text)
int GWEN_Gui_ProgressAdvance(uint32_t id, uint32_t progress)
void GWEN_Logger_SetLevel(const char *logDomain, GWEN_LOGGER_LEVEL l)
GWEN_GUI * Gtk2_Gui_new()
#define GWEN_GUI_PROGRESS_DELAY
int test1(int argc, char **argv)
#define DBG_ERROR_ERR(dbg_logger, dbg_err)
int GWEN_Gui_ExecDialog(GWEN_DIALOG *dlg, uint32_t guiid)
struct GWEN_DIALOG GWEN_DIALOG
int main(int argc, char **argv)
GWEN_DIALOG * Dlg_Test2_new()
uint32_t GWEN_Gui_ProgressStart(uint32_t progressFlags, const char *title, const char *text, uint64_t total, uint32_t guiid)
int GWEN_Gui_ProgressEnd(uint32_t id)
#define GWEN_GUI_PROGRESS_KEEP_OPEN
#define GWEN_GUI_PROGRESS_SHOW_LOG
int test2(int argc, char **argv)
int test3(int argc, char **argv)
GWEN_DIALOG * Dlg_Test1_new()
#define GWEN_ERROR_USER_ABORTED
void GWEN_Gui_SetGui(GWEN_GUI *gui)
#define GWEN_GUI_PROGRESS_SHOW_ABORT