00001 00002 00003 00004 #ifndef GWENHYWFAR_GUI_CPROGRESS_H 00005 #define GWENHYWFAR_GUI_CPROGRESS_H 00006 00007 #include <gwenhywfar/list.h> 00008 #include <gwenhywfar/gui.h> 00009 #include <gwenhywfar/buffer.h> 00010 #include <gwenhywfar/logger.h> 00011 00012 00013 00014 typedef struct GWEN_GUI_CPROGRESS GWEN_GUI_CPROGRESS; 00015 GWEN_LIST_FUNCTION_DEFS(GWEN_GUI_CPROGRESS, GWEN_Gui_CProgress) 00016 00017 00018 GWEN_GUI_CPROGRESS *GWEN_Gui_CProgress_new(GWEN_GUI *gui, 00019 uint32_t id, 00020 uint32_t progressFlags, 00021 const char *title, 00022 const char *text, 00023 uint64_t total); 00024 void GWEN_Gui_CProgress_free(GWEN_GUI_CPROGRESS *cp); 00025 00026 00027 GWEN_GUI *GWEN_Gui_CProgress_GetGui(const GWEN_GUI_CPROGRESS *cp); 00028 uint32_t GWEN_Gui_CProgress_GetId(const GWEN_GUI_CPROGRESS *cp); 00029 const char *GWEN_Gui_CProgress_GetTitle(const GWEN_GUI_CPROGRESS *cp); 00030 const char *GWEN_Gui_CProgress_GetText(const GWEN_GUI_CPROGRESS *cp); 00031 uint64_t GWEN_Gui_CProgress_GetTotal(const GWEN_GUI_CPROGRESS *cp); 00032 uint64_t GWEN_Gui_CProgress_GetCurrent(const GWEN_GUI_CPROGRESS *cp); 00033 const char *GWEN_Gui_CProgress_GetLogBuf(const GWEN_GUI_CPROGRESS *cp); 00034 int GWEN_Gui_CProgress_GetAborted(const GWEN_GUI_CPROGRESS *cp); 00035 00036 00037 int GWEN_Gui_CProgress_Advance(GWEN_GUI_CPROGRESS *cp, uint64_t progress); 00038 00039 int GWEN_Gui_CProgress_Log(GWEN_GUI_CPROGRESS *cp, 00040 GWEN_LOGGER_LEVEL level, 00041 const char *text); 00042 00043 int GWEN_Gui_CProgress_End(GWEN_GUI_CPROGRESS *cp); 00044 00045 00046 00047 #endif 00048