![]() | ![]() | ![]() | libuser Reference Manual | ![]() |
---|
prompt — Sample prompter functions for use with the libuser library.
gboolean lu_prompt_console (struct lu_prompt *prompts, int count, gpointer callback_data, struct lu_error **error); gboolean lu_prompt_console_quiet (struct lu_prompt *prompts, int count, gpointer callback_data, struct lu_error **error);
prompt.h declares two predefined prompter functions which applications can use instead of providing their own. These should suffice for most command-line applications. Authors of graphical applications are encouraged to supply graphical implementations.
gboolean lu_prompt_console (struct lu_prompt *prompts, int count, gpointer callback_data, struct lu_error **error);
Prompts the user using a text console.
prompts : | An array of lu_prompt structures. |
count : | The number of elements in the prompts array. |
callback_data : | Ignored. |
error : | The location to store error information in the event of an error. |
Returns : | A gboolean indicating success or failure. |
gboolean lu_prompt_console_quiet (struct lu_prompt *prompts, int count, gpointer callback_data, struct lu_error **error);
Prompts the user using a text console. Unlike lu_prompt_console(), this function will not prompt users for a question for which the calling application or module supplies a default, and will simply return the default.
prompts : | An array of lu_prompt structures. |
count : | The number of elements in the prompts array. |
callback_data : | Ignored. |
error : | The location to store error information in the event of an error. |
Returns : | A gboolean indicating success or failure. |
<< error | quota >> |