Just a little correction at the it.po file.
[midnight-commander.git] / src / wtools.h
blob0e1b62403aaa301330fc40d38b503e725d973565
1 #ifndef __WTOOLS_H
2 #define __WTOOLS_H
4 struct Dlg_head;
5 struct WListbox;
7 /* Listbox utility functions */
8 typedef struct {
9 struct Dlg_head *dlg;
10 struct WListbox *list;
11 } Listbox;
13 Listbox *create_listbox_window (int cols, int lines, char *title, char *help);
14 #define LISTBOX_APPEND_TEXT(l,h,t,d) \
15 listbox_add_item (l->list, 0, h, t, d);
17 int run_listbox (Listbox *l);
19 /* Quick Widgets */
20 enum {
21 quick_end, quick_checkbox,
22 quick_button, quick_input,
23 quick_label, quick_radio
24 } /* quick_t */;
26 /* The widget is placed on relative_?/divisions_? of the parent widget */
27 /* Please note that the contents of the fields in the union are just */
28 /* used for setting up the dialog. They are a convenient place to put */
29 /* the values for a widget */
31 typedef struct {
32 int widget_type;
33 int relative_x;
34 int x_divisions;
35 int relative_y;
36 int y_divisions;
38 char *text; /* Text */
39 int hotkey_pos; /* the hotkey position */
40 int value; /* Buttons only: value of button */
41 int *result; /* Checkbutton: where to store result */
42 char **str_result; /* Input lines: destination */
43 char *tkname; /* Name of the widget used for Tk only */
44 } QuickWidget;
46 typedef struct {
47 int xlen, ylen;
48 int xpos, ypos; /* if -1, then center the dialog */
49 char *title;
50 char *help;
51 QuickWidget *widgets;
52 int i18n; /* If true, internationalization has happened */
53 } QuickDialog;
55 int quick_dialog (QuickDialog *qd);
56 int quick_dialog_skip (QuickDialog *qd, int nskip);
58 /* The input dialogs */
60 /* Pass this as def_text to request a password */
61 #define INPUT_PASSWORD ((char *) -1)
63 char *input_dialog (char *header, char *text, char *def_text);
64 char *input_dialog_help (char *header, char *text, char *help, char *def_text);
65 char *input_expand_dialog (char *header, char *text, char *def_text);
66 char *real_input_dialog (char *header, char *text, char *def_text);
67 char *real_input_dialog_help (char *header, char *text, char *help, char *def_text);
69 void query_set_sel (int new_sel);
71 struct Dlg_head *message (int error, char *header, const char *text, ...)
72 __attribute__ ((format (printf, 3, 4)));
74 /* Use this as header for message() - it expands to "Error" */
75 #define MSG_ERROR ((char *) -1)
77 int query_dialog (char *header, char *text, int flags, int count, ...);
79 /* flags for message() and query_dialog() */
80 enum {
81 D_NORMAL = 0,
82 D_ERROR = 1,
83 D_INSERT = 2
84 } /* dialog options */;
86 #endif /* __WTOOLS_H */