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