1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-20 00:15:31 +00:00

[bfu] msgbox_flags_T

This commit is contained in:
Witold Filipczyk 2022-01-28 16:41:23 +01:00
parent 5ec6572ed7
commit ef24855aa7
4 changed files with 10 additions and 8 deletions

View File

@ -22,7 +22,7 @@
struct dialog_data *
msg_box(struct terminal *term, struct memory_list *ml, /*enum msgbox_flags*/ unsigned int flags,
msg_box(struct terminal *term, struct memory_list *ml, msgbox_flags_T flags,
char *title, format_align_T align,
char *text, void *udata, int buttons, ...)
{
@ -155,7 +155,7 @@ refresh_msg_box(struct dialog_data *dlg_data, void *data)
}
void
refreshed_msg_box(struct terminal *term, /*enum msgbox_flags*/ unsigned int flags,
refreshed_msg_box(struct terminal *term, msgbox_flags_T flags,
char *title, format_align_T align,
char *(get_info)(struct terminal *, void *),
void *data)
@ -182,7 +182,7 @@ refreshed_msg_box(struct terminal *term, /*enum msgbox_flags*/ unsigned int flag
}
struct dialog_data *
info_box(struct terminal *term, /*enum msgbox_flags*/ unsigned int flags,
info_box(struct terminal *term, msgbox_flags_T flags,
char *title, format_align_T align,
char *text)
{

View File

@ -27,6 +27,8 @@ enum msgbox_flags {
MSGBOX_NO_TEXT_INTL = 0x8,
};
typedef unsigned char msgbox_flags_T;
/* This is _the_ dialog function used in almost all parts of the code. It is
* used to easily format dialogs containing only text and few buttons below.
*
@ -94,7 +96,7 @@ enum msgbox_flags {
* ...no matter that it could fit on one line in case of a tiny message box. */
struct dialog_data *
msg_box(struct terminal *term, struct memory_list *mem_list,
/*enum msgbox_flags*/ unsigned int flags, char *title, format_align_T align,
msgbox_flags_T flags, char *title, format_align_T align,
char *text, void *udata, int buttons, ...);
/* Cast @value to @type and warn if the conversion is suspicious.
@ -127,13 +129,13 @@ char *msg_text(struct terminal *term, const char *format, ...);
* message box is updated using the get_info() function. If get_info() returns
* NULL the message box is closed. */
void
refreshed_msg_box(struct terminal *term, /*enum msgbox_flags*/ unsigned int flags,
refreshed_msg_box(struct terminal *term, msgbox_flags_T flags,
char *title, format_align_T align,
char *(get_info)(struct terminal *, void *),
void *data);
struct dialog_data *
info_box(struct terminal *term, /*enum msgbox_flags*/ unsigned int flags,
info_box(struct terminal *term, msgbox_flags_T flags,
char *title, format_align_T align,
char *text);

View File

@ -249,7 +249,7 @@ dlg_show_bittorrent_info(struct dialog_data *dlg_data, struct widget_data *widge
&& init_string(&msg)) {
struct terminal *term = file_download->term;
struct bittorrent_connection *bittorrent;
enum msgbox_flags flags = MSGBOX_FREE_TEXT;
msgbox_flags_T flags = MSGBOX_FREE_TEXT;
bittorrent = (struct bittorrent_connection *)download->conn->info;

View File

@ -104,7 +104,7 @@ msg_text(struct terminal *term, char *format, ...)
/* declared in "bfu/msgbox.h" */
struct dialog_data *
msg_box(struct terminal *term, struct memory_list *mem_list,
enum msgbox_flags flags, char *title, format_align_T align,
msgbox_flags_T flags, char *title, format_align_T align,
char *text, void *udata, int buttons, ...)
{
/* mem_list should be freed here but because this is just a