gwenhywfar 5.10.1
dlg_progress.c
Go to the documentation of this file.
1/***************************************************************************
2 begin : Tue Feb 16 2010
3 copyright : (C) 2019 by Martin Preuss
4 email : martin@libchipcard.de
5
6 ***************************************************************************
7 * Please see toplevel file COPYING for license details *
8 ***************************************************************************/
9
10
11#ifdef HAVE_CONFIG_H
12# include <config.h>
13#endif
14
15#define DISABLE_DEBUGLOG
16
17
18#include "dlg_progress_p.h"
19
20#include <gwenhywfar/gwenhywfar.h>
21#include <gwenhywfar/pathmanager.h>
22#include <gwenhywfar/debug.h>
23#include <gwenhywfar/text.h>
24
25
26
27#define DIALOG_MINWIDTH 520
28#define DIALOG_MINHEIGHT 400
29#define DIALOG_MINHEIGHT_NOLOG 100
30
31
32
33GWEN_INHERIT(GWEN_DIALOG, GWEN_DLGPROGRESS)
34
35
36
37
38
40{
41 GWEN_DIALOG *dlg;
42 GWEN_DLGPROGRESS *xdlg;
43
44 dlg=GWEN_Dialog_CreateAndLoadWithPath("dlg_gwen_progress",
47 "gwenhywfar/dialogs/dlg_progress.dlg");
48 if (dlg==NULL) {
49 DBG_INFO(GWEN_LOGDOMAIN, "here");
50 return NULL;
51 }
52 GWEN_NEW_OBJECT(GWEN_DLGPROGRESS, xdlg);
53 GWEN_INHERIT_SETDATA(GWEN_DIALOG, GWEN_DLGPROGRESS, dlg, xdlg,
55
57
58 xdlg->logBufferTxt=GWEN_Buffer_new(0, 256, 0, 1);
59 xdlg->logBufferHtml=GWEN_Buffer_new(0, 256, 0, 1);
60
61 return dlg;
62}
63
64
65
67{
68 GWEN_DLGPROGRESS *xdlg;
69
70 xdlg=(GWEN_DLGPROGRESS *) p;
71
72 GWEN_Buffer_free(xdlg->logBufferHtml);
73 GWEN_Buffer_free(xdlg->logBufferTxt);
74
75 GWEN_FREE_OBJECT(xdlg);
76}
77
78
79
81{
82 GWEN_DLGPROGRESS *xdlg;
83
84 assert(dlg);
85 xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, GWEN_DLGPROGRESS, dlg);
86 assert(xdlg);
87
88 xdlg->allowClose=b;
89 if (xdlg->wasInit) {
90 GWEN_Dialog_SetIntProperty(dlg, "abortButton", GWEN_DialogProperty_Enabled, 0, 0, 0);
91 GWEN_Dialog_SetIntProperty(dlg, "closeButton", GWEN_DialogProperty_Enabled, 0, 1, 0);
92 }
93}
94
95
96
98{
99 GWEN_DLGPROGRESS *xdlg;
100
101 assert(dlg);
102 xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, GWEN_DLGPROGRESS, dlg);
103 assert(xdlg);
104
105 xdlg->stayOpen=b;
106}
107
108
109
111{
112 GWEN_DLGPROGRESS *xdlg;
113
114 assert(dlg);
115 xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, GWEN_DLGPROGRESS, dlg);
116 assert(xdlg);
117
118 return xdlg->stayOpen;
119}
120
121
122
124{
125 GWEN_DLGPROGRESS *xdlg;
126
127 assert(dlg);
128 xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, GWEN_DLGPROGRESS, dlg);
129 assert(xdlg);
130
131 if (xdlg->showLog!=b) {
132 xdlg->showLog=b;
133 if (xdlg->wasInit) {
134
136 if (b) {
137 int i;
138
139 i=xdlg->withLogWidth;
140 if (i<DIALOG_MINWIDTH)
143
144 i=xdlg->withLogHeight;
145 if (i<DIALOG_MINHEIGHT)
148 }
149 }
150 }
151}
152
153
154
156{
157 GWEN_DLGPROGRESS *xdlg;
158
159 assert(dlg);
160 xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, GWEN_DLGPROGRESS, dlg);
161 assert(xdlg);
162
163 return xdlg->firstProgress;
164}
165
166
167
169{
170 GWEN_DLGPROGRESS *xdlg;
171
172 assert(dlg);
173 xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, GWEN_DLGPROGRESS, dlg);
174 assert(xdlg);
175
176 xdlg->firstProgress=pd;
177
178 if (xdlg->wasInit) {
179 if (xdlg->firstProgress) {
180 const char *s;
181
182 s=GWEN_ProgressData_GetTitle(xdlg->firstProgress);
183 if (s && *s)
185
186 s=GWEN_ProgressData_GetText(xdlg->firstProgress);
187 if (s && *s)
188 GWEN_Dialog_SetCharProperty(dlg, "descrLabel", GWEN_DialogProperty_Title, 0, s, 0);
189
190 GWEN_Dialog_SetIntProperty(dlg, "allProgress", GWEN_DialogProperty_Enabled, 0, 1, 0);
192 GWEN_ProgressData_GetTotal(xdlg->firstProgress), 0);
194 GWEN_ProgressData_GetCurrent(xdlg->firstProgress), 0);
195 }
196 else {
197 /* let it show 100 % */
198 GWEN_Dialog_SetIntProperty(dlg, "allProgress", GWEN_DialogProperty_MaxValue, 0, 100, 0);
199 GWEN_Dialog_SetIntProperty(dlg, "allProgress", GWEN_DialogProperty_Value, 0, 100, 0);
200 }
201 }
202}
203
204
205
207{
208 GWEN_DLGPROGRESS *xdlg;
209
210 assert(dlg);
211 xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, GWEN_DLGPROGRESS, dlg);
212 assert(xdlg);
213
214 return xdlg->secondProgress;
215}
216
217
218
220{
221 GWEN_DLGPROGRESS *xdlg;
222
223 assert(dlg);
224 xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, GWEN_DLGPROGRESS, dlg);
225 assert(xdlg);
226
227 xdlg->secondProgress=pd;
228
229 if (xdlg->wasInit) {
230 if (xdlg->secondProgress) {
231 GWEN_Dialog_SetIntProperty(dlg, "currentProgress", GWEN_DialogProperty_Enabled, 0, 1, 0);
233 GWEN_ProgressData_GetTotal(xdlg->secondProgress), 0);
234 GWEN_Dialog_SetIntProperty(dlg, "currentProgress", GWEN_DialogProperty_Value, 0,
235 GWEN_ProgressData_GetCurrent(xdlg->secondProgress), 0);
236 }
237 else {
238 GWEN_Dialog_SetIntProperty(dlg, "currentProgress", GWEN_DialogProperty_Value, 0, 0, 0);
239 GWEN_Dialog_SetIntProperty(dlg, "currentProgress", GWEN_DialogProperty_Enabled, 0, 0, 0);
240 }
241 }
242}
243
244
245
247 GWEN_LOGGER_LEVEL level,
248 const char *s)
249{
250 GWEN_DLGPROGRESS *xdlg;
251 GWEN_TIME *ti;
252 int rv;
253 GWEN_BUFFER *tbuf;
254 const char *col;
255
256 assert(dlg);
257 xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, GWEN_DLGPROGRESS, dlg);
258 assert(xdlg);
259
260 ti=GWEN_CurrentTime();
261
262 /* setup text string */
263 if (GWEN_Buffer_GetUsedBytes(xdlg->logBufferTxt))
264 GWEN_Buffer_AppendString(xdlg->logBufferTxt, "\n");
265 if (ti)
266 rv=GWEN_Time_toString(ti, "hh:mm:ss", xdlg->logBufferTxt);
267 else
269 if (rv<0)
270 GWEN_Buffer_AppendString(xdlg->logBufferTxt, "??:??:??");
271 GWEN_Buffer_AppendString(xdlg->logBufferTxt, " ");
272 if (s)
273 GWEN_Buffer_AppendString(xdlg->logBufferTxt, s);
274
275 /* setup HTML string */
276 GWEN_Buffer_AppendString(xdlg->logBufferHtml, "<tr><td>");
277 if (ti)
278 rv=GWEN_Time_toString(ti, "hh:mm:ss", xdlg->logBufferHtml);
279 else
281 if (rv<0)
282 GWEN_Buffer_AppendString(xdlg->logBufferHtml, "??:??:??");
283 GWEN_Buffer_AppendString(xdlg->logBufferHtml, "</td><td>");
284
285 if (ti)
286 GWEN_Time_free(ti);
287
288 if (level<=GWEN_LoggerLevel_Error)
289 col="red";
290 else if (level==GWEN_LoggerLevel_Warning)
291 col="blue";
292 else if (level==GWEN_LoggerLevel_Info)
293 col="darkgreen";
294 else
295 col=NULL;
296 if (col) {
297 GWEN_Buffer_AppendString(xdlg->logBufferHtml, "<font color=\"");
298 GWEN_Buffer_AppendString(xdlg->logBufferHtml, col);
299 GWEN_Buffer_AppendString(xdlg->logBufferHtml, "\">");
300 }
301 if (s)
302 GWEN_Text_EscapeXmlToBuffer(s, xdlg->logBufferHtml);
303 if (col)
304 GWEN_Buffer_AppendString(xdlg->logBufferHtml, "</font>");
305 GWEN_Buffer_AppendString(xdlg->logBufferHtml, "</td></tr>");
306
307 /* assemble full string, containing HTML and text log */
308 tbuf=GWEN_Buffer_new(0,
309 GWEN_Buffer_GetUsedBytes(xdlg->logBufferHtml)+
310 GWEN_Buffer_GetUsedBytes(xdlg->logBufferTxt)+256,
311 0,
312 1);
313
314 GWEN_Buffer_AppendString(tbuf, "<html><table>");
315 GWEN_Buffer_AppendString(tbuf, GWEN_Buffer_GetStart(xdlg->logBufferHtml));
316 GWEN_Buffer_AppendString(tbuf, "</table></html>");
317 GWEN_Buffer_AppendString(tbuf, GWEN_Buffer_GetStart(xdlg->logBufferTxt));
318
320 GWEN_Buffer_GetStart(tbuf), 0);
321 GWEN_Buffer_free(tbuf);
322}
323
324
325
327{
328 GWEN_DLGPROGRESS *xdlg;
329 const char *s;
330
331 assert(dlg);
332 xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, GWEN_DLGPROGRESS, dlg);
333 assert(xdlg);
334
335 if (pd==xdlg->firstProgress)
336 s="allProgress";
337 else if (pd==xdlg->secondProgress)
338 s="currentProgress";
339 else {
340 DBG_ERROR(GWEN_LOGDOMAIN, "Progress %08x is neither primary nor secondary",
342 return;
343 }
344
345 if (xdlg->wasInit) {
348 }
349}
350
351
352
354{
355 GWEN_DLGPROGRESS *xdlg;
356 const char *s;
357
358 assert(dlg);
359 xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, GWEN_DLGPROGRESS, dlg);
360 assert(xdlg);
361
362 if (pd==xdlg->firstProgress)
363 s="allProgress";
364 else if (pd==xdlg->secondProgress)
365 s="currentProgress";
366 else {
367 DBG_ERROR(GWEN_LOGDOMAIN, "Progress %08x is neither primary nor secondary",
369 return;
370 }
371
372 if (xdlg->wasInit) {
375 }
376}
377
378
379
381{
382 GWEN_DLGPROGRESS *xdlg;
383 int i;
384 GWEN_DB_NODE *dbParams;
385
386 assert(dlg);
387 xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, GWEN_DLGPROGRESS, dlg);
388 assert(xdlg);
389
390 dbParams=GWEN_Dialog_GetPreferences(dlg);
391 assert(dbParams);
392
393 xdlg->withLogWidth=GWEN_DB_GetIntValue(dbParams, "dialog_width", 0, -1);
394 xdlg->withLogHeight=GWEN_DB_GetIntValue(dbParams, "dialog_height", 0, -1);
395
396 if (xdlg->showLog) {
397 int i;
398
399 i=xdlg->withLogWidth;
400 if (i>=DIALOG_MINWIDTH)
402
403 i=xdlg->withLogHeight;
404 if (i>=DIALOG_MINHEIGHT)
406
408 }
409 else {
410 /* read width */
411 i=GWEN_DB_GetIntValue(dbParams, "dialog_width_nolog", 0, -1);
412 if (i>=DIALOG_MINWIDTH)
414
415 /* read height */
416 i=GWEN_DB_GetIntValue(dbParams, "dialog_height_nolog", 0, -1);
420 }
421
422
423 if (xdlg->firstProgress) {
424 const char *s;
425
426 s=GWEN_ProgressData_GetTitle(xdlg->firstProgress);
427 if (s && *s)
429
430 s=GWEN_ProgressData_GetText(xdlg->firstProgress);
431 if (s && *s)
432 GWEN_Dialog_SetCharProperty(dlg, "descrLabel", GWEN_DialogProperty_Title, 0, s, 0);
433
435 GWEN_ProgressData_GetTotal(xdlg->firstProgress), 0);
437 GWEN_ProgressData_GetCurrent(xdlg->firstProgress), 0);
438 }
439
440 if (xdlg->secondProgress) {
442 GWEN_ProgressData_GetTotal(xdlg->secondProgress), 0);
443 GWEN_Dialog_SetIntProperty(dlg, "currentProgress", GWEN_DialogProperty_Value, 0,
444 GWEN_ProgressData_GetCurrent(xdlg->secondProgress), 0);
445 }
446
447 GWEN_Dialog_SetIntProperty(dlg, "abortButton", GWEN_DialogProperty_Enabled, 0, 1, 0);
448 GWEN_Dialog_SetIntProperty(dlg, "closeButton", GWEN_DialogProperty_Enabled, 0, 0, 0);
449
450 xdlg->wasInit=1;
451}
452
453
454
456{
457 GWEN_DLGPROGRESS *xdlg;
458 int i;
459 GWEN_DB_NODE *dbParams;
460
461 assert(dlg);
462 xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, GWEN_DLGPROGRESS, dlg);
463 assert(xdlg);
464
465 dbParams=GWEN_Dialog_GetPreferences(dlg);
466 assert(dbParams);
467
468 /* store dialog width */
469 if (xdlg->showLog) {
471 GWEN_DB_SetIntValue(dbParams,
473 "dialog_width",
474 i);
475
476 /* store dialog height */
478 GWEN_DB_SetIntValue(dbParams,
480 "dialog_height",
481 i);
482 }
483 else {
485 GWEN_DB_SetIntValue(dbParams,
487 "dialog_width_nolog",
488 i);
489
490 /* store dialog height */
492 GWEN_DB_SetIntValue(dbParams,
494 "dialog_height_nolog",
495 i);
496 }
497}
498
499
500
501
503{
504 GWEN_DLGPROGRESS *xdlg;
505
506 assert(dlg);
507 xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, GWEN_DLGPROGRESS, dlg);
508 assert(xdlg);
509
510 if (strcasecmp(sender, "closeButton")==0) {
512 }
513 else if (strcasecmp(sender, "abortButton")==0) {
514 if (xdlg->firstProgress)
515 GWEN_ProgressData_SetAborted(xdlg->firstProgress, 1);
516 if (xdlg->secondProgress)
517 GWEN_ProgressData_SetAborted(xdlg->secondProgress, 1);
518
519 xdlg->stayOpen=1;
520 GWEN_Dialog_SetIntProperty(dlg, "abortButton", GWEN_DialogProperty_Enabled, 0, 0, 0);
521 GWEN_Dialog_SetIntProperty(dlg, "closeButton", GWEN_DialogProperty_Enabled, 0, 1, 0);
522
524 }
525
527}
528
529
530
531
534 const char *sender)
535{
536 GWEN_DLGPROGRESS *xdlg;
537
538 assert(dlg);
539 xdlg=GWEN_INHERIT_GETDATA(GWEN_DIALOG, GWEN_DLGPROGRESS, dlg);
540 assert(xdlg);
541
542 switch (t) {
546
550
552 break;
553
555 return GWEN_DlgProgress_HandleActivated(dlg, sender);
556
559
561 if (xdlg->allowClose==0)
563 else
565
570 }
571
573
574}
575
576
577
578
579
580
#define NULL
Definition: binreloc.c:300
GWEN_BUFFER * GWEN_Buffer_new(char *buffer, uint32_t size, uint32_t used, int take)
Definition: buffer.c:42
void GWEN_Buffer_free(GWEN_BUFFER *bf)
Definition: buffer.c:89
int GWEN_Buffer_AppendString(GWEN_BUFFER *bf, const char *buffer)
Definition: buffer.c:989
uint32_t GWEN_Buffer_GetUsedBytes(const GWEN_BUFFER *bf)
Definition: buffer.c:277
char * GWEN_Buffer_GetStart(const GWEN_BUFFER *bf)
Definition: buffer.c:235
int GWEN_DB_SetIntValue(GWEN_DB_NODE *n, uint32_t flags, const char *path, int val)
Definition: db.c:1202
int GWEN_DB_GetIntValue(GWEN_DB_NODE *n, const char *path, int idx, int defVal)
Definition: db.c:1163
#define GWEN_DB_FLAGS_OVERWRITE_VARS
Definition: db.h:121
struct GWEN_DB_NODE GWEN_DB_NODE
Definition: db.h:228
#define DBG_INFO(dbg_logger, format, args...)
Definition: debug.h:181
#define DBG_ERROR(dbg_logger, format, args...)
Definition: debug.h:97
int GWEN_Dialog_SetIntProperty(GWEN_DIALOG *dlg, const char *name, GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal)
Definition: dialog.c:703
GWEN_DIALOG_SIGNALHANDLER GWEN_Dialog_SetSignalHandler(GWEN_DIALOG *dlg, GWEN_DIALOG_SIGNALHANDLER fn)
Definition: dialog.c:305
int GWEN_Dialog_SetCharProperty(GWEN_DIALOG *dlg, const char *name, GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal)
Definition: dialog.c:762
GWEN_DIALOG * GWEN_Dialog_CreateAndLoadWithPath(const char *dialogId, const char *pmLibName, const char *pmDataDir, const char *fileName)
Definition: dialog.c:90
GWEN_DB_NODE * GWEN_Dialog_GetPreferences(const GWEN_DIALOG *dlg)
Definition: dialog.c:1002
int GWEN_Dialog_GetIntProperty(GWEN_DIALOG *dlg, const char *name, GWEN_DIALOG_PROPERTY prop, int index, int defaultProperty)
Definition: dialog.c:733
@ GWEN_DialogEvent_ResultHandled
Definition: dialog.h:120
@ GWEN_DialogEvent_ResultAccept
Definition: dialog.h:122
@ GWEN_DialogEvent_ResultNotHandled
Definition: dialog.h:121
@ GWEN_DialogEvent_ResultReject
Definition: dialog.h:123
struct GWEN_DIALOG GWEN_DIALOG
Definition: dialog.h:54
@ GWEN_DialogProperty_Visibility
Definition: dialog.h:280
@ GWEN_DialogProperty_MaxValue
Definition: dialog.h:266
@ GWEN_DialogProperty_Title
Definition: dialog.h:263
@ GWEN_DialogProperty_Height
Definition: dialog.h:273
@ GWEN_DialogProperty_Enabled
Definition: dialog.h:267
@ GWEN_DialogProperty_Value
Definition: dialog.h:264
@ GWEN_DialogProperty_Width
Definition: dialog.h:272
GWEN_DIALOG_EVENTTYPE
Definition: dialog.h:98
@ GWEN_DialogEvent_TypeKeyPressed
Definition: dialog.h:106
@ GWEN_DialogEvent_TypeValueChanged
Definition: dialog.h:101
@ GWEN_DialogEvent_TypeInit
Definition: dialog.h:99
@ GWEN_DialogEvent_TypeFini
Definition: dialog.h:100
@ GWEN_DialogEvent_TypeClose
Definition: dialog.h:105
@ GWEN_DialogEvent_TypeKeyReleased
Definition: dialog.h:107
@ GWEN_DialogEvent_TypeActivated
Definition: dialog.h:102
@ GWEN_DialogEvent_TypeEnabled
Definition: dialog.h:103
@ GWEN_DialogEvent_TypeDisabled
Definition: dialog.h:104
@ GWEN_DialogEvent_TypeLast
Definition: dialog.h:109
void GWEN_DlgProgress_SetShowLog(GWEN_DIALOG *dlg, int b)
Definition: dlg_progress.c:123
void GWEN_DlgProgress_SetStayOpen(GWEN_DIALOG *dlg, int b)
Definition: dlg_progress.c:97
void GWEN_DlgProgress_SetSecondProgress(GWEN_DIALOG *dlg, GWEN_PROGRESS_DATA *pd)
Definition: dlg_progress.c:219
void GWEN_DlgProgress_SetFirstProgress(GWEN_DIALOG *dlg, GWEN_PROGRESS_DATA *pd)
Definition: dlg_progress.c:168
GWEN_DIALOG * GWEN_DlgProgress_new(void)
Definition: dlg_progress.c:39
#define DIALOG_MINWIDTH
Definition: dlg_progress.c:27
GWEN_PROGRESS_DATA * GWEN_DlgProgress_GetSecondProgress(const GWEN_DIALOG *dlg)
Definition: dlg_progress.c:206
void GWEN_DlgProgress_SetAllowClose(GWEN_DIALOG *dlg, int b)
Definition: dlg_progress.c:80
void GWEN_DlgProgress_Advanced(GWEN_DIALOG *dlg, GWEN_PROGRESS_DATA *pd)
Definition: dlg_progress.c:326
void GWEN_DlgProgress_Fini(GWEN_DIALOG *dlg)
Definition: dlg_progress.c:455
int GWEN_DlgProgress_HandleActivated(GWEN_DIALOG *dlg, const char *sender)
Definition: dlg_progress.c:502
#define DIALOG_MINHEIGHT_NOLOG
Definition: dlg_progress.c:29
#define DIALOG_MINHEIGHT
Definition: dlg_progress.c:28
void GWEN_DlgProgress_AddLogText(GWEN_DIALOG *dlg, GWEN_LOGGER_LEVEL level, const char *s)
Definition: dlg_progress.c:246
int GWENHYWFAR_CB GWEN_DlgProgress_SignalHandler(GWEN_DIALOG *dlg, GWEN_DIALOG_EVENTTYPE t, const char *sender)
Definition: dlg_progress.c:532
void GWEN_DlgProgress_TotalChanged(GWEN_DIALOG *dlg, GWEN_PROGRESS_DATA *pd)
Definition: dlg_progress.c:353
void GWENHYWFAR_CB GWEN_DlgProgress_FreeData(GWEN_UNUSED void *bp, void *p)
Definition: dlg_progress.c:66
GWEN_PROGRESS_DATA * GWEN_DlgProgress_GetFirstProgress(const GWEN_DIALOG *dlg)
Definition: dlg_progress.c:155
int GWEN_DlgProgress_GetStayOpen(const GWEN_DIALOG *dlg)
Definition: dlg_progress.c:110
void GWEN_DlgProgress_Init(GWEN_DIALOG *dlg)
Definition: dlg_progress.c:380
#define GWEN_ERROR_GENERIC
Definition: error.h:62
struct GWEN_BUFFER GWEN_BUFFER
A dynamically resizeable text buffer.
Definition: buffer.h:38
#define GWEN_PM_LIBNAME
Definition: gwenhywfar.h:42
#define GWEN_PM_SYSDATADIR
Definition: gwenhywfar.h:66
#define GWEN_UNUSED
#define GWENHYWFAR_CB
Definition: gwenhywfarapi.h:89
struct GWEN_TIME GWEN_TIME
Definition: gwentime.h:43
GWENHYWFAR_API GWEN_TIME * GWEN_CurrentTime(void)
Definition: gwentime_all.c:62
GWENHYWFAR_API int GWEN_Time_toString(const GWEN_TIME *t, const char *tmpl, GWEN_BUFFER *buf)
Definition: gwentime_all.c:830
GWENHYWFAR_API void GWEN_Time_free(GWEN_TIME *t)
Definition: gwentime_all.c:462
#define GWEN_INHERIT_SETDATA(bt, t, element, data, fn)
Definition: inherit.h:292
#define GWEN_INHERIT(bt, t)
Definition: inherit.h:264
#define GWEN_INHERIT_GETDATA(bt, t, element)
Definition: inherit.h:271
#define GWEN_LOGDOMAIN
Definition: logger.h:35
GWEN_LOGGER_LEVEL
Definition: logger.h:64
@ GWEN_LoggerLevel_Warning
Definition: logger.h:69
@ GWEN_LoggerLevel_Info
Definition: logger.h:71
@ GWEN_LoggerLevel_Error
Definition: logger.h:68
#define GWEN_FREE_OBJECT(varname)
Definition: memory.h:61
#define GWEN_NEW_OBJECT(typ, varname)
Definition: memory.h:55
uint64_t GWEN_ProgressData_GetCurrent(const GWEN_PROGRESS_DATA *pd)
Definition: progressdata.c:153
void GWEN_ProgressData_SetAborted(GWEN_PROGRESS_DATA *pd, int i)
Definition: progressdata.c:219
uint64_t GWEN_ProgressData_GetTotal(const GWEN_PROGRESS_DATA *pd)
Definition: progressdata.c:145
const char * GWEN_ProgressData_GetText(const GWEN_PROGRESS_DATA *pd)
Definition: progressdata.c:137
const char * GWEN_ProgressData_GetTitle(const GWEN_PROGRESS_DATA *pd)
Definition: progressdata.c:129
uint32_t GWEN_ProgressData_GetId(const GWEN_PROGRESS_DATA *pd)
Definition: progressdata.c:81
struct GWEN_PROGRESS_DATA GWEN_PROGRESS_DATA
int GWEN_Text_EscapeXmlToBuffer(const char *src, GWEN_BUFFER *buf)
Definition: text.c:1978