mc/lib/widget/wtools.h

54 lines
2.0 KiB
C
Raw Normal View History

/** \file wtools.h
* \brief Header: widget based utility functions
*/
#ifndef MC__WTOOLS_H
#define MC__WTOOLS_H
1998-02-27 07:54:42 +03:00
/*** typedefs(not structures) and defined constants **********************************************/
1998-02-27 07:54:42 +03:00
/* Pass this as def_text to request a password */
#define INPUT_PASSWORD ((char *) -1)
/* Use this as header for message() - it expands to "Error" */
#define MSG_ERROR ((char *) -1)
/*** enums ***************************************************************************************/
/* flags for message() and query_dialog() */
enum
{
D_NORMAL = 0,
D_ERROR = (1 << 0),
D_CENTER = (1 << 1)
} /* dialog options */ ;
/*** structures declarations (and typedefs of structures)*****************************************/
/*** global variables defined in .c file *********************************************************/
/*** declarations of public functions ************************************************************/
1998-02-27 07:54:42 +03:00
/* The input dialogs */
char *input_dialog (const char *header, const char *text,
const char *history_name, const char *def_text);
char *input_dialog_help (const char *header, const char *text, const char *help,
const char *history_name, const char *def_text);
char *input_expand_dialog (const char *header, const char *text,
const char *history_name, const char *def_text);
1998-02-27 07:54:42 +03:00
int query_dialog (const char *header, const char *text, int flags, int count, ...);
1998-02-27 07:54:42 +03:00
void query_set_sel (int new_sel);
/* Create message box but don't dismiss it yet, not background safe */
struct Dlg_head *create_message (int flags, const char *title,
const char *text, ...) __attribute__ ((format (__printf__, 3, 4)));
/* Show message box, background safe */
void message (int flags, const char *title, const char *text, ...)
2006-02-03 17:42:36 +03:00
__attribute__ ((format (__printf__, 3, 4)));
/*** inline functions ****************************************************************************/
#endif /* MC__WTOOLS_H */