gwenhywfar  4.11.0beta
gui_be.h
Go to the documentation of this file.
1 /***************************************************************************
2  begin : Tue Oct 02 2002
3  copyright : (C) 2002-2010 by Martin Preuss
4  email : martin@libchipcard.de
5 
6  ***************************************************************************
7  * *
8  * This library is free software; you can redistribute it and/or *
9  * modify it under the terms of the GNU Lesser General Public *
10  * License as published by the Free Software Foundation; either *
11  * version 2.1 of the License, or (at your option) any later version. *
12  * *
13  * This library is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16  * Lesser General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU Lesser General Public *
19  * License along with this library; if not, write to the Free Software *
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
21  * MA 02111-1307 USA *
22  * *
23  ***************************************************************************/
24 
25 #ifndef GWENHYWFAR_GUI_GUI_BE_H
26 #define GWENHYWFAR_GUI_GUI_BE_H
27 
28 
29 #include <gwenhywfar/gui.h>
30 
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 
37 
39 void GWEN_Gui_SetName(GWEN_GUI *gui, const char *name);
40 
41 
42 
49 int GWEN_Gui_ConvertFromUtf8(const GWEN_GUI *gui, const char *text, int len, GWEN_BUFFER *tbuf);
50 
51 
59 int GWEN_Gui_StdPrintf(const GWEN_GUI *gui, FILE *stream,
60  const char *fmt, ...) GWEN_FORMAT(printf, 3, 4);
61 
68 void GWEN_Gui_GetRawText(const GWEN_GUI *gui, const char *text, GWEN_BUFFER *tbuf);
69 
70 
71 
72 
77 
78 
86  const char *docTitle,
87  const char *docType,
88  const char *descr,
89  const char *text,
90  uint32_t guiid);
91 
96  uint32_t flags,
97  const char *token,
98  const char *title,
99  const char *text,
100  char *buffer,
101  int minLen,
102  int maxLen,
103  uint32_t guiid);
104 
109  const char *token,
110  const char *pin,
112  uint32_t guiid);
113 
114 
128  const char *logDomain,
129  GWEN_LOGGER_LEVEL priority, const char *s);
130 
132  GWEN_SOCKET_LIST2 *readSockets,
133  GWEN_SOCKET_LIST2 *writeSockets,
134  int msecs,
135  uint32_t guiid);
136 
138  const GWEN_SSLCERTDESCR *cert,
139  GWEN_SYNCIO *sio,
140  uint32_t guiid);
141 
143  const char *text,
144  unsigned char *buffer,
145  unsigned int bufLength);
146 
148  GWEN_DIALOG *dlg,
149  uint32_t guiid);
150 
151 
153  GWEN_DIALOG *dlg,
154  uint32_t guiid);
155 
157 
158 typedef int GWENHYWFAR_CB (*GWEN_GUI_RUN_DIALOG_FN)(GWEN_GUI *gui, GWEN_DIALOG *dlg, int timeout);
159 
160 
161 typedef int GWENHYWFAR_CB (*GWEN_GUI_READ_DIALOG_PREFS_FN)(GWEN_GUI *gui, const char *groupName, const char *altName,
162  GWEN_DB_NODE **pDb);
163 
164 typedef int GWENHYWFAR_CB (*GWEN_GUI_WRITE_DIALOG_PREFS_FN)(GWEN_GUI *gui, const char *groupName,
165  GWEN_DB_NODE *db);
166 
167 
169  const char *caption,
171  uint32_t flags,
172  const char *patterns,
173  GWEN_BUFFER *pathBuffer,
174  uint32_t guiid);
175 
176 typedef int GWENHYWFAR_CB (*GWEN_GUI_GETSYNCIO_FN)(GWEN_GUI *gui, const char *url,
177  const char *defaultProto,
178  int defaultPort,
179  GWEN_SYNCIO **pSio);
180 
181 
194 
195 
198 
201 
205 
206 
209 
210 
213 
216 
221 
224 
225 
228 
231 
234 
235 
239 
243 
244 
247 
248 
251 
252 
263 
269 void GWEN_Gui_UseDialogs(GWEN_GUI *gui);
270 
271 
288 int GWEN_Gui_ReadDialogPrefs(const char *groupName,
289  const char *altName,
290  GWEN_DB_NODE **pDb);
291 
303 int GWEN_Gui_WriteDialogPrefs(const char *groupName,
304  GWEN_DB_NODE *db);
305 
306 
325 typedef int (*GWEN_GUI_MESSAGEBOX_FN)(GWEN_GUI *gui,
326  uint32_t flags,
327  const char *title,
328  const char *text,
329  const char *b1,
330  const char *b2,
331  const char *b3,
332  uint32_t guiid);
333 
338 typedef int (*GWEN_GUI_INPUTBOX_FN)(GWEN_GUI *gui,
339  uint32_t flags,
340  const char *title,
341  const char *text,
342  char *buffer,
343  int minLen,
344  int maxLen,
345  uint32_t guiid);
346 
351 typedef uint32_t (*GWEN_GUI_SHOWBOX_FN)(GWEN_GUI *gui,
352  uint32_t flags,
353  const char *title,
354  const char *text,
355  uint32_t guiid);
356 
361 typedef void (*GWEN_GUI_HIDEBOX_FN)(GWEN_GUI *gui, uint32_t id);
362 
367 typedef uint32_t
369  uint32_t progressFlags,
370  const char *title,
371  const char *text,
372  uint64_t total,
373  uint32_t guiid);
374 
380  uint32_t id,
381  uint64_t progress);
382 
383 
389  uint32_t id,
390  uint64_t total);
391 
396 typedef int (*GWEN_GUI_PROGRESS_LOG_FN)(GWEN_GUI *gui,
397  uint32_t id,
398  GWEN_LOGGER_LEVEL level,
399  const char *text);
404 typedef int (*GWEN_GUI_PROGRESS_END_FN)(GWEN_GUI *gui, uint32_t id);
419 
432 
436 
440 
444 
448 
452 
453 
457 #ifdef __cplusplus
458 }
459 #endif
460 
461 
462 #endif
463