NeoMutt  2023-05-17-16-g61469c
Teaching an old dog new tricks
DOXYGEN
wdata.h
Go to the documentation of this file.
1
23#ifndef MUTT_PROGRESS_WDATA_H
24#define MUTT_PROGRESS_WDATA_H
25
26#include <stdio.h>
27#include <stdbool.h>
28#include <stdint.h>
29
30struct MuttWindow;
31
36{
37 struct MuttWindow *win;
38
39 // Settings for the Progress Bar
40 char msg[1024];
41 char pretty_size[24];
42 size_t size;
43 size_t size_inc;
44 size_t time_inc;
45 bool is_bytes;
46
47 // Current display
48 size_t display_pos;
50 uint64_t display_time;
51 char pretty_pos[24];
52
53 // Updates waiting for display
54 size_t update_pos;
56 uint64_t update_time;
57};
58
59void progress_wdata_free(struct MuttWindow *win, void **ptr);
61
62#endif /* MUTT_PROGRESS_WDATA_H */
void progress_wdata_free(struct MuttWindow *win, void **ptr)
Free Progress Bar Window data - Implements MuttWindow::wdata_free() -.
Definition: wdata.c:45
struct ProgressWindowData * progress_wdata_new(void)
Create new Progress Bar Window Data.
Definition: wdata.c:37
Progress Bar Window Data.
Definition: wdata.h:36
int update_percent
Updated percentage complete.
Definition: wdata.h:55
char msg[1024]
Message to display.
Definition: wdata.h:40
size_t size
Total expected size.
Definition: wdata.h:42
char pretty_pos[24]
Pretty string for the position.
Definition: wdata.h:51
size_t time_inc
Time increment.
Definition: wdata.h:44
uint64_t update_time
Time of last update.
Definition: wdata.h:56
int display_percent
Displayed percentage complete.
Definition: wdata.h:49
size_t display_pos
Displayed position.
Definition: wdata.h:48
size_t size_inc
Size increment.
Definition: wdata.h:43
bool is_bytes
true if measuring bytes
Definition: wdata.h:45
size_t update_pos
Updated position.
Definition: wdata.h:54
struct MuttWindow * win
Window to draw on.
Definition: wdata.h:37
uint64_t display_time
Time of last display.
Definition: wdata.h:50
char pretty_size[24]
Pretty string for size.
Definition: wdata.h:41