| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 
 | /*
 * ion/mod_query/wedln.h
 *
 * Copyright (c) Tuomo Valkonen 1999-2009. 
 *
 * See the included file LICENSE for details.
 */
#ifndef ION_MOD_QUERY_WEDLN_H
#define ION_MOD_QUERY_WEDLN_H
#include <libtu/obj.h>
#include <libextl/extl.h>
#include <libmainloop/signal.h>
#include <ioncore/common.h>
#include <ioncore/window.h>
#include <ioncore/xic.h>
#include <ioncore/rectangle.h>
#include <ioncore/binding.h>
#include "listing.h"
#include "input.h"
#include "edln.h"
INTRCLASS(WEdln);
INTRSTRUCT(WEdlnCreateParams);
DECLSTRUCT(WEdlnCreateParams){
    const char *prompt;
    const char *dflt;
    ExtlFn handler;
    ExtlFn completor;
};
DECLCLASS(WEdln){
    WInput input;
    Edln edln;
    char *prompt;
    int prompt_len;
    int prompt_w;
    
    char *info;
    int info_len;
    int info_w;
    
    int vstart;
    
    ExtlFn handler;
    ExtlFn completor;
    
    WTimer *autoshowcompl_timer;
    
    WListing compl_list;
    char *compl_beg;
    char *compl_end;
    int compl_waiting_id;
    int compl_current_id;
    int compl_timed_id;
    uint compl_tab:1;
    uint compl_history_mode:1;
    
    WBindmap *cycle_bindmap;
};
extern WEdln *create_wedln(WWindow *par, const WFitParams *fp,
                           WEdlnCreateParams *p);
extern void wedln_finish(WEdln *wedln);
extern void wedln_paste(WEdln *wedln);
extern void wedln_draw(WEdln *wedln, bool complete);
extern void wedln_set_completions(WEdln *wedln, ExtlTab completions,
                                  bool autoshow_select_first);
extern void wedln_hide_completions(WEdln *wedln);
extern bool wedln_set_histcompl(WEdln *wedln, int sp);
extern bool wedln_get_histcompl(WEdln *wedln);
#endif /* ION_MOD_QUERY_WEDLN_H */
 |