Code

the updated sources
[ncmpc.git] / src / wreadln.h
1 #ifndef WREADLN_H
2 #define WREADLN_H
4 /* max size allocated for a line */
5 extern guint wrln_max_line_size;
7 /* max items stored in the history list */
8 extern guint wrln_max_history_length;
10 /* custom wgetch function */
11 typedef int (*wrln_wgetch_fn_t) (WINDOW *w);
12 extern wrln_wgetch_fn_t wrln_wgetch;
14 /* called after TAB is pressed but before g_completion_complete */
15 typedef void (*wrln_gcmp_pre_cb_t) (GCompletion *gcmp, gchar *buf);
16 extern wrln_gcmp_pre_cb_t wrln_pre_completion_callback;
18 /* post completion callback */
19 typedef void (*wrln_gcmp_post_cb_t) (GCompletion *gcmp, gchar *s, GList *l);
20 extern wrln_gcmp_post_cb_t wrln_post_completion_callback;
22 /* Note, wreadln calls curs_set() and noecho(), to enable cursor and 
23  * disable echo. wreadln will not restore these settings when exiting! */
24 gchar *wreadln(WINDOW *w,            /* the curses window to use */
25                gchar *prompt,        /* the prompt string or NULL */
26                gchar *initial_value, /* initial value or NULL for a empty line
27                                       * (char *) -1 = get value from history */
28                gint x1,              /* the maximum x position or 0 */
29                GList **history,     /* a pointer to a history list or NULL */ 
30                GCompletion *gcmp    /* a GCompletion structure or NULL */
31                );
34 #endif