/* Automatically generated by mkexports.lua */
#include <libextl/extl.h>
#include <libextl/private.h>

/* quiet warnings for generated code */
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wunused-macros"
#endif

EXTL_DEFCLASS(WInput);
EXTL_DEFCLASS(WComplProxy);
EXTL_DEFCLASS(WMPlex);
EXTL_DEFCLASS(WMessage);
EXTL_DEFCLASS(WEdln);
static bool l2chnd_t__(ExtlTab (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    out[0].t=fn();
    return TRUE;
}
static bool l2chnd_s_o__WEdln(char* (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WEdln)) return FALSE;
    out[0].s=fn(in[0].o);
    return TRUE;
}
static bool l2chnd_v__(void (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    fn();
    return TRUE;
}
static bool l2chnd_i_o__WEdln(int (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WEdln)) return FALSE;
    out[0].i=fn(in[0].o);
    return TRUE;
}
static bool l2chnd_v_o__WInput(void (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WInput)) return FALSE;
    fn(in[0].o);
    return TRUE;
}
static bool l2chnd_o_os__WMPlex_(Obj* (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WMPlex)) return FALSE;
    out[0].o=fn(in[0].o, in[1].s);
    return TRUE;
}
static bool l2chnd_v_t__(void (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    fn(in[0].t);
    return TRUE;
}
static bool l2chnd_v_os__WEdln_(void (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WEdln)) return FALSE;
    fn(in[0].o, in[1].s);
    return TRUE;
}
static bool l2chnd_b_s__(bool (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    out[0].b=fn(in[0].s);
    return TRUE;
}
static bool l2chnd_v_o__WEdln(void (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WEdln)) return FALSE;
    fn(in[0].o);
    return TRUE;
}
static bool l2chnd_v_oss__WEdln__(void (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WEdln)) return FALSE;
    fn(in[0].o, in[1].s, in[2].s);
    return TRUE;
}
static bool l2chnd_b_ot__WComplProxy_(bool (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WComplProxy)) return FALSE;
    out[0].b=fn(in[0].o, in[1].t);
    return TRUE;
}
static bool l2chnd_s_i__(char* (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    out[0].s=fn(in[0].i);
    return TRUE;
}
static bool l2chnd_i_sibb_____(int (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    out[0].i=fn(in[0].s, in[1].i, in[2].b, in[3].b);
    return TRUE;
}
static bool l2chnd_v_ob__WEdln_(void (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WEdln)) return FALSE;
    fn(in[0].o, in[1].b);
    return TRUE;
}
static bool l2chnd_b_o__WEdln(bool (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WEdln)) return FALSE;
    out[0].b=fn(in[0].o);
    return TRUE;
}
static bool l2chnd_o_ossffff__WMPlex______(Obj* (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WMPlex)) return FALSE;
    out[0].o=fn(in[0].o, in[1].s, in[2].s, in[3].f, in[4].f, in[5].f, in[6].f);
    return TRUE;
}

extern void input_scrolldown();
extern void input_cancel();
extern void input_scrollup();


static ExtlExportedFnSpec WInput_exports[] = {
    {"scrolldown", input_scrolldown, "o", NULL, (ExtlL2CallHandler*)l2chnd_v_o__WInput, FALSE, FALSE, FALSE},
    {"cancel", input_cancel, "o", NULL, (ExtlL2CallHandler*)l2chnd_v_o__WInput, FALSE, FALSE, FALSE},
    {"scrollup", input_scrollup, "o", NULL, (ExtlL2CallHandler*)l2chnd_v_o__WInput, FALSE, FALSE, FALSE},
    {NULL, NULL, NULL, NULL, NULL, FALSE, FALSE, FALSE}
};

extern void complproxy_set_completions();


static ExtlExportedFnSpec WComplProxy_exports[] = {
    {"set_completions", complproxy_set_completions, "ot", "b", (ExtlL2CallHandler*)l2chnd_b_ot__WComplProxy_, FALSE, FALSE, FALSE},
    {NULL, NULL, NULL, NULL, NULL, FALSE, FALSE, FALSE}
};

#define WMPlex_exports NULL
#define WMessage_exports NULL
extern void mod_query_do_message();
extern void mod_query_history_push();
extern void mod_query_do_query();
extern void mod_query_do_warn();
extern void mod_query_get();
extern void mod_query_history_clear();
extern void mod_query_history_get();
extern void mod_query_history_search();
extern void mod_query_history_table();
extern void mod_query_set();


static ExtlExportedFnSpec mod_query_exports[] = {
    {"do_message", mod_query_do_message, "oS", "o", (ExtlL2CallHandler*)l2chnd_o_os__WMPlex_, FALSE, FALSE, FALSE},
    {"history_push", mod_query_history_push, "S", "b", (ExtlL2CallHandler*)l2chnd_b_s__, FALSE, FALSE, FALSE},
    {"do_query", mod_query_do_query, "oSSffff", "o", (ExtlL2CallHandler*)l2chnd_o_ossffff__WMPlex______, FALSE, FALSE, FALSE},
    {"do_warn", mod_query_do_warn, "oS", "o", (ExtlL2CallHandler*)l2chnd_o_os__WMPlex_, FALSE, FALSE, FALSE},
    {"get", mod_query_get, NULL, "t", (ExtlL2CallHandler*)l2chnd_t__, TRUE, FALSE, FALSE},
    {"history_clear", mod_query_history_clear, NULL, NULL, (ExtlL2CallHandler*)l2chnd_v__, FALSE, FALSE, FALSE},
    {"history_get", mod_query_history_get, "i", "S", (ExtlL2CallHandler*)l2chnd_s_i__, TRUE, FALSE, FALSE},
    {"history_search", mod_query_history_search, "Sibb", "i", (ExtlL2CallHandler*)l2chnd_i_sibb_____, TRUE, FALSE, FALSE},
    {"history_table", mod_query_history_table, NULL, "t", (ExtlL2CallHandler*)l2chnd_t__, TRUE, FALSE, FALSE},
    {"set", mod_query_set, "t", NULL, (ExtlL2CallHandler*)l2chnd_v_t__, FALSE, FALSE, FALSE},
    {NULL, NULL, NULL, NULL, NULL, FALSE, FALSE, FALSE}
};

extern void wedln_finish();
extern void wedln_history_prev();
extern void wedln_backspace();
extern void wedln_set_mark();
extern void wedln_bskip_word();
extern void wedln_set_context();
extern void wedln_insstr_exported();
extern void wedln_copy();
extern void wedln_cut();
extern void wedln_transpose_words();
extern void wedln_prev_completion();
extern void wedln_kill_to_bol();
extern void wedln_transpose_chars();
extern void wedln_bkill_word();
extern void wedln_contents();
extern void wedln_eol();
extern void wedln_is_histcompl();
extern void wedln_skip_word();
extern void wedln_clear_mark();
extern void wedln_mark();
extern void wedln_context();
extern void wedln_paste();
extern void wedln_back();
extern void wedln_delete();
extern void wedln_next_completion();
extern void wedln_complete();
extern void wedln_kill_to_eol();
extern void wedln_kill_word();
extern void wedln_history_next();
extern void wedln_bol();
extern void wedln_kill_line();
extern void wedln_forward();
extern void wedln_point();


static ExtlExportedFnSpec WEdln_exports[] = {
    {"finish", wedln_finish, "o", NULL, (ExtlL2CallHandler*)l2chnd_v_o__WEdln, FALSE, FALSE, FALSE},
    {"history_prev", wedln_history_prev, "ob", NULL, (ExtlL2CallHandler*)l2chnd_v_ob__WEdln_, FALSE, FALSE, FALSE},
    {"backspace", wedln_backspace, "o", NULL, (ExtlL2CallHandler*)l2chnd_v_o__WEdln, FALSE, FALSE, FALSE},
    {"set_mark", wedln_set_mark, "o", NULL, (ExtlL2CallHandler*)l2chnd_v_o__WEdln, FALSE, FALSE, FALSE},
    {"bskip_word", wedln_bskip_word, "o", NULL, (ExtlL2CallHandler*)l2chnd_v_o__WEdln, FALSE, FALSE, FALSE},
    {"set_context", wedln_set_context, "oS", NULL, (ExtlL2CallHandler*)l2chnd_v_os__WEdln_, FALSE, FALSE, FALSE},
    {"insstr", wedln_insstr_exported, "oS", NULL, (ExtlL2CallHandler*)l2chnd_v_os__WEdln_, FALSE, FALSE, FALSE},
    {"copy", wedln_copy, "o", NULL, (ExtlL2CallHandler*)l2chnd_v_o__WEdln, FALSE, FALSE, FALSE},
    {"cut", wedln_cut, "o", NULL, (ExtlL2CallHandler*)l2chnd_v_o__WEdln, FALSE, FALSE, FALSE},
    {"transpose_words", wedln_transpose_words, "o", NULL, (ExtlL2CallHandler*)l2chnd_v_o__WEdln, FALSE, FALSE, FALSE},
    {"prev_completion", wedln_prev_completion, "o", "b", (ExtlL2CallHandler*)l2chnd_b_o__WEdln, FALSE, FALSE, FALSE},
    {"kill_to_bol", wedln_kill_to_bol, "o", NULL, (ExtlL2CallHandler*)l2chnd_v_o__WEdln, FALSE, FALSE, FALSE},
    {"transpose_chars", wedln_transpose_chars, "o", NULL, (ExtlL2CallHandler*)l2chnd_v_o__WEdln, FALSE, FALSE, FALSE},
    {"bkill_word", wedln_bkill_word, "o", NULL, (ExtlL2CallHandler*)l2chnd_v_o__WEdln, FALSE, FALSE, FALSE},
    {"contents", wedln_contents, "o", "S", (ExtlL2CallHandler*)l2chnd_s_o__WEdln, TRUE, FALSE, FALSE},
    {"eol", wedln_eol, "o", NULL, (ExtlL2CallHandler*)l2chnd_v_o__WEdln, FALSE, FALSE, FALSE},
    {"is_histcompl", wedln_is_histcompl, "o", "b", (ExtlL2CallHandler*)l2chnd_b_o__WEdln, FALSE, FALSE, FALSE},
    {"skip_word", wedln_skip_word, "o", NULL, (ExtlL2CallHandler*)l2chnd_v_o__WEdln, FALSE, FALSE, FALSE},
    {"clear_mark", wedln_clear_mark, "o", NULL, (ExtlL2CallHandler*)l2chnd_v_o__WEdln, FALSE, FALSE, FALSE},
    {"mark", wedln_mark, "o", "i", (ExtlL2CallHandler*)l2chnd_i_o__WEdln, TRUE, FALSE, FALSE},
    {"context", wedln_context, "o", "S", (ExtlL2CallHandler*)l2chnd_s_o__WEdln, TRUE, FALSE, FALSE},
    {"paste", wedln_paste, "o", NULL, (ExtlL2CallHandler*)l2chnd_v_o__WEdln, FALSE, FALSE, FALSE},
    {"back", wedln_back, "o", NULL, (ExtlL2CallHandler*)l2chnd_v_o__WEdln, FALSE, FALSE, FALSE},
    {"delete", wedln_delete, "o", NULL, (ExtlL2CallHandler*)l2chnd_v_o__WEdln, FALSE, FALSE, FALSE},
    {"next_completion", wedln_next_completion, "o", "b", (ExtlL2CallHandler*)l2chnd_b_o__WEdln, FALSE, FALSE, FALSE},
    {"complete", wedln_complete, "oSS", NULL, (ExtlL2CallHandler*)l2chnd_v_oss__WEdln__, FALSE, FALSE, FALSE},
    {"kill_to_eol", wedln_kill_to_eol, "o", NULL, (ExtlL2CallHandler*)l2chnd_v_o__WEdln, FALSE, FALSE, FALSE},
    {"kill_word", wedln_kill_word, "o", NULL, (ExtlL2CallHandler*)l2chnd_v_o__WEdln, FALSE, FALSE, FALSE},
    {"history_next", wedln_history_next, "ob", NULL, (ExtlL2CallHandler*)l2chnd_v_ob__WEdln_, FALSE, FALSE, FALSE},
    {"bol", wedln_bol, "o", NULL, (ExtlL2CallHandler*)l2chnd_v_o__WEdln, FALSE, FALSE, FALSE},
    {"kill_line", wedln_kill_line, "o", NULL, (ExtlL2CallHandler*)l2chnd_v_o__WEdln, FALSE, FALSE, FALSE},
    {"forward", wedln_forward, "o", NULL, (ExtlL2CallHandler*)l2chnd_v_o__WEdln, FALSE, FALSE, FALSE},
    {"point", wedln_point, "o", "i", (ExtlL2CallHandler*)l2chnd_i_o__WEdln, TRUE, FALSE, FALSE},
    {NULL, NULL, NULL, NULL, NULL, FALSE, FALSE, FALSE}
};

bool mod_query_register_exports()
{
    if(!extl_register_class("WInput", WInput_exports, "WWindow")) return FALSE;
    if(!extl_register_class("WComplProxy", WComplProxy_exports, "Obj")) return FALSE;
    if(!extl_register_class("WMessage", WMessage_exports, "WInput")) return FALSE;
    if(!extl_register_module("mod_query", mod_query_exports)) return FALSE;
    if(!extl_register_class("WEdln", WEdln_exports, "WInput")) return FALSE;
    return TRUE;
}

void mod_query_unregister_exports()
{
    extl_unregister_class("WInput", WInput_exports);
    extl_unregister_class("WComplProxy", WComplProxy_exports);
    extl_unregister_class("WMessage", WMessage_exports);
    extl_unregister_module("mod_query", mod_query_exports);
    extl_unregister_class("WEdln", WEdln_exports);
}

