NeoMutt  2024-12-12-14-g7b49f7
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
lib.h
Go to the documentation of this file.
1
69#ifndef MUTT_PROGRESS_LIB_H
70#define MUTT_PROGRESS_LIB_H
71
72#include <stdbool.h>
73#include <stdio.h>
74
75struct Progress;
76
81{
85};
86
87void progress_free (struct Progress **ptr);
88struct Progress *progress_new (enum ProgressType type, size_t size);
89bool progress_update (struct Progress *progress, size_t pos, int percent);
90void progress_set_message(struct Progress *progress, const char *fmt, ...)
91 __attribute__((__format__(__printf__, 2, 3)));
92void progress_set_size (struct Progress *progress, size_t size);
93
94#endif /* MUTT_PROGRESS_LIB_H */
ProgressType
What kind of operation is this progress tracking?
Definition: lib.h:81
@ MUTT_PROGRESS_NET
Progress tracks bytes, according to $net_inc
Definition: lib.h:82
@ MUTT_PROGRESS_READ
Progress tracks elements, according to $read_inc
Definition: lib.h:83
@ MUTT_PROGRESS_WRITE
Progress tracks elements, according to $write_inc
Definition: lib.h:84
struct Progress * progress_new(enum ProgressType type, size_t size)
Create a new Progress Bar.
Definition: progress.c:139
void progress_free(struct Progress **ptr)
Free a Progress Bar.
Definition: progress.c:110
void progress_set_message(struct Progress *progress, const char *fmt,...) __attribute__((__format__(__printf__
void void progress_set_size(struct Progress *progress, size_t size)
Set the progress size.
Definition: progress.c:190
bool progress_update(struct Progress *progress, size_t pos, int percent)
Update the state of the progress bar.
Definition: progress.c:80