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