*** empty log message ***
[midnight-commander.git] / src / dialog.h
blob44eb116117ea60a2d538de4da83e36e8a3fdcf28
1 #ifndef __DIALOG_H
2 #define __DIALOG_H
4 #include "dlg.h"
6 #ifndef VFS_STANDALONE
7 #define MSG_ERROR ((char *) -1)
8 #else
9 #define MSG_ERROR "Error: "
10 #endif
11 Dlg_head *message (int error, char *header, const char *text, ...)
12 __attribute__ ((format (printf, 3, 4)));
14 int query_dialog (char *header, char *text, int flags, int count, ...);
16 enum {
17 D_NORMAL = 0,
18 D_ERROR = 1,
19 D_INSERT = 2
20 } /* dialog options */;
22 /* The refresh stack */
23 typedef struct Refresh {
24 void (*refresh_fn)(void *);
25 void *parameter;
26 int flags;
27 struct Refresh *next;
28 } Refresh;
30 /* We search under the stack until we find a refresh function that covers */
31 /* the complete screen, and from this point we go up refreshing the */
32 /* individual regions */
34 enum {
35 REFRESH_COVERS_PART, /* If the refresh fn convers only a part */
36 REFRESH_COVERS_ALL /* If the refresh fn convers all the screen */
39 void push_refresh (void (*new_refresh)(void *), void *data, int flags);
40 void pop_refresh (void);
41 void do_refresh (void);
42 char *input_dialog (char *header, char *text, char *def_text);
43 char *input_expand_dialog (char *header, char *text, char *def_text);
45 extern Refresh *refresh_list;
47 #endif /* __DIALOG_H */