ELinks 0.16.1.1
|
#include "bfu/style.h"
#include "bfu/widget.h"
#include "main/timer.h"
#include "terminal/terminal.h"
#include "terminal/window.h"
#include "util/memlist.h"
Data Structures | |
struct | dialog_layout |
struct | dialog_refresh |
struct | dialog |
struct | dialog_data |
Macros | |
#define | sizeof_dialog(n, add_size) |
Gets the amount of memory needed for a dialog. | |
#define | calloc_dialog(n, add_size) |
Allocates and clears memory for a dialog. | |
#define | get_dialog_offset(dlg, n) |
Gets the address of the additional data of a dialog. | |
#define | dialog_has_refresh(dlg_data) |
#define | selected_widget(dlg_data) |
#define | before_widgets(dlg_data) |
#define | end_of_widgets(dlg_data) |
#define | first_widget(dlg_data) |
#define | last_widget(dlg_data) |
#define | foreach_widget(dlg_data, widget_data) |
#define | foreach_widget_back(dlg_data, widget_data) |
#define | is_selected_widget(dlg_data, widget_data) |
#define | add_dlg_end(dlg, n) |
Typedefs | |
typedef enum dlg_refresh_code(* | dialog_refresh_handler_T) (struct dialog_data *, void *) |
Enumerations | |
enum | dlg_refresh_code { REFRESH_DIALOG , REFRESH_CANCEL , REFRESH_NONE , REFRESH_STOP } |
Functions | |
static int | dialog_max_width (struct terminal *term) |
static int | dialog_max_height (struct terminal *term) |
struct dialog_data * | do_dialog (struct terminal *, struct dialog *, struct memory_list *) |
void | draw_dialog (struct dialog_data *dlg_data, int width, int height) |
void | redraw_dialog (struct dialog_data *dlg_data, int layout) |
widget_handler_status_T | ok_dialog (struct dialog_data *, struct widget_data *) |
widget_handler_status_T | cancel_dialog (struct dialog_data *, struct widget_data *) |
widget_handler_status_T | clear_dialog (struct dialog_data *, struct widget_data *) |
int | check_dialog (struct dialog_data *) |
int | update_dialog_data (struct dialog_data *) |
void | generic_dialog_layouter (struct dialog_data *dlg_data) |
void | refresh_dialog (struct dialog_data *, dialog_refresh_handler_T handler, void *data) |
void | select_widget (struct dialog_data *dlg_data, struct widget_data *widget_data) |
struct widget_data * | select_widget_by_id (struct dialog_data *dlg_data, int i) |
#define add_dlg_end | ( | dlg, | |
n ) |
#define before_widgets | ( | dlg_data | ) |
#define calloc_dialog | ( | n, | |
add_size ) |
Allocates and clears memory for a dialog.
n | How many widgets there will be in the dialog. |
add_size | The size of the additional data, in bytes. |
This macro sets dialog.number_of_widgets = 0. The caller can then add widgets to the dialog until dialog.number_of_widgets reaches n.
#define dialog_has_refresh | ( | dlg_data | ) |
#define end_of_widgets | ( | dlg_data | ) |
#define first_widget | ( | dlg_data | ) |
#define foreach_widget | ( | dlg_data, | |
widget_data ) |
#define foreach_widget_back | ( | dlg_data, | |
widget_data ) |
#define get_dialog_offset | ( | dlg, | |
n ) |
Gets the address of the additional data of a dialog.
dlg | struct dialog *dlg; the dialog that carries the additional data. |
n | For how many widgets the dialog was allocated; i.e. the n parameter of sizeof_dialog() and calloc_dialog(). This macro does not read dialog.number_of_widgets because that is typically still zero when this macro is used. |
#define is_selected_widget | ( | dlg_data, | |
widget_data ) |
#define last_widget | ( | dlg_data | ) |
#define selected_widget | ( | dlg_data | ) |
#define sizeof_dialog | ( | n, | |
add_size ) |
Gets the amount of memory needed for a dialog.
n | How many widgets there will be in the dialog. |
add_size | The size of the additional data, in bytes. |
struct dialog already reserves memory for one widget.
typedef enum dlg_refresh_code(* dialog_refresh_handler_T) (struct dialog_data *, void *) |
enum dlg_refresh_code |
widget_handler_status_T cancel_dialog | ( | struct dialog_data * | dlg_data, |
struct widget_data * | xxx ) |
int check_dialog | ( | struct dialog_data * | dlg_data | ) |
widget_handler_status_T clear_dialog | ( | struct dialog_data * | dlg_data, |
struct widget_data * | xxx ) |
|
inlinestatic |
|
inlinestatic |
struct dialog_data * do_dialog | ( | struct terminal * | term, |
struct dialog * | dlg, | ||
struct memory_list * | ml ) |
void draw_dialog | ( | struct dialog_data * | dlg_data, |
int | width, | ||
int | height ) |
void generic_dialog_layouter | ( | struct dialog_data * | dlg_data | ) |
widget_handler_status_T ok_dialog | ( | struct dialog_data * | dlg_data, |
struct widget_data * | widget_data ) |
void redraw_dialog | ( | struct dialog_data * | dlg_data, |
int | layout ) |
void refresh_dialog | ( | struct dialog_data * | dlg_data, |
dialog_refresh_handler_T | handler, | ||
void * | data ) |
void select_widget | ( | struct dialog_data * | dlg_data, |
struct widget_data * | widget_data ) |
struct widget_data * select_widget_by_id | ( | struct dialog_data * | dlg_data, |
int | i ) |
int update_dialog_data | ( | struct dialog_data * | dlg_data | ) |