Updated doc/NEWS file
[midnight-commander.git] / lib / widget / wtools.h
blob4e23e9ce6df078c6bb8b1aaee825ecd3aad4ea81
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 << 0),
23 D_CENTER = (1 << 1)
24 } /* dialog options */ ;
26 /*** structures declarations (and typedefs of structures)*****************************************/
28 /*** global variables defined in .c file *********************************************************/
30 /*** declarations of public functions ************************************************************/
32 /* The input dialogs */
33 char *input_dialog (const char *header, const char *text,
34 const char *history_name, const char *def_text);
35 char *input_dialog_help (const char *header, const char *text, const char *help,
36 const char *history_name, const char *def_text, gboolean strip_password);
37 char *input_expand_dialog (const char *header, const char *text,
38 const char *history_name, const char *def_text);
40 int query_dialog (const char *header, const char *text, int flags, int count, ...);
41 void query_set_sel (int new_sel);
43 /* Create message box but don't dismiss it yet, not background safe */
44 struct WDialog *create_message (int flags, const char *title,
45 const char *text, ...) __attribute__ ((format (__printf__, 3, 4)));
47 /* Show message box, background safe */
48 void message (int flags, const char *title, const char *text, ...)
49 __attribute__ ((format (__printf__, 3, 4)));
51 /*** inline functions ****************************************************************************/
53 #endif /* MC__WTOOLS_H */