Ticket #2598: u7z: Improve handling of missing p7zip binaries.
[midnight-commander.git] / lib / widget / wtools.h
blob1cb055e8f4d9be6e86e764aa125d01a37601ff14
1 /** \file wtools.h
2 * \brief Header: widget based utility functions
3 */
5 #ifndef MC__WTOOLS_H
6 #define MC__WTOOLS_H
8 /*** typedefs(not structures) and defined constants **********************************************/
10 /* Pass this as def_text to request a password */
11 #define INPUT_PASSWORD ((char *) -1)
13 /* Use this as header for message() - it expands to "Error" */
14 #define MSG_ERROR ((char *) -1)
16 /*** enums ***************************************************************************************/
18 /* flags for message() and query_dialog() */
19 enum
21 D_NORMAL = 0,
22 D_ERROR = 1
23 } /* dialog options */ ;
25 /*** structures declarations (and typedefs of structures)*****************************************/
27 /*** global variables defined in .c file *********************************************************/
29 /*** declarations of public functions ************************************************************/
31 /* The input dialogs */
32 char *input_dialog (const char *header, const char *text,
33 const char *history_name, const char *def_text);
34 char *input_dialog_help (const char *header, const char *text, const char *help,
35 const char *history_name, const char *def_text);
36 char *input_expand_dialog (const char *header, const char *text,
37 const char *history_name, const char *def_text);
39 int query_dialog (const char *header, const char *text, int flags, int count, ...);
40 void query_set_sel (int new_sel);
42 /* Create message box but don't dismiss it yet, not background safe */
43 struct Dlg_head *create_message (int flags, const char *title,
44 const char *text, ...) __attribute__ ((format (__printf__, 3, 4)));
46 /* Show message box, background safe */
47 void message (int flags, const char *title, const char *text, ...)
48 __attribute__ ((format (__printf__, 3, 4)));
50 /* Clear screen */
51 void mc_refresh (void);
53 /*** inline functions ****************************************************************************/
55 #endif /* MC__WTOOLS_H */