/* 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(WWindow);
EXTL_DEFCLASS(WMPlex);
EXTL_DEFCLASS(WMenu);
static bool l2chnd_v_o__WMenu(void (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WMenu)) return FALSE;
    fn(in[0].o);
    return TRUE;
}
static bool l2chnd_t__(ExtlTab (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    out[0].t=fn();
    return TRUE;
}
static bool l2chnd_o_oft__WWindow__(Obj* (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WWindow)) return FALSE;
    out[0].o=fn(in[0].o, in[1].f, in[2].t);
    return TRUE;
}
static bool l2chnd_v_t__(void (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    fn(in[0].t);
    return TRUE;
}
static bool l2chnd_o_oftt__WMPlex___(Obj* (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WMPlex)) return FALSE;
    out[0].o=fn(in[0].o, in[1].f, in[2].t, in[3].t);
    return TRUE;
}
static bool l2chnd_v_oi__WMenu_(void (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WMenu)) return FALSE;
    fn(in[0].o, in[1].i);
    return TRUE;
}

extern void mod_menu_do_pmenu();
extern void mod_menu_do_grabmenu();
extern void mod_menu_do_menu();
extern void mod_menu_get();
extern void mod_menu_set();


static ExtlExportedFnSpec mod_menu_exports[] = {
    {"do_pmenu", mod_menu_do_pmenu, "oft", "o", (ExtlL2CallHandler*)l2chnd_o_oft__WWindow__, FALSE, FALSE, FALSE},
    {"do_grabmenu", mod_menu_do_grabmenu, "oftt", "o", (ExtlL2CallHandler*)l2chnd_o_oftt__WMPlex___, FALSE, FALSE, FALSE},
    {"do_menu", mod_menu_do_menu, "oftt", "o", (ExtlL2CallHandler*)l2chnd_o_oftt__WMPlex___, FALSE, FALSE, FALSE},
    {"get", mod_menu_get, NULL, "t", (ExtlL2CallHandler*)l2chnd_t__, TRUE, FALSE, FALSE},
    {"set", mod_menu_set, "t", NULL, (ExtlL2CallHandler*)l2chnd_v_t__, FALSE, FALSE, FALSE},
    {NULL, NULL, NULL, NULL, NULL, FALSE, FALSE, FALSE}
};

#define WWindow_exports NULL
#define WMPlex_exports NULL
extern void menu_select_nth();
extern void menu_finish();
extern void menu_typeahead_clear();
extern void menu_cancel();
extern void menu_select_prev();
extern void menu_select_next();


static ExtlExportedFnSpec WMenu_exports[] = {
    {"select_nth", menu_select_nth, "oi", NULL, (ExtlL2CallHandler*)l2chnd_v_oi__WMenu_, FALSE, FALSE, FALSE},
    {"finish", menu_finish, "o", NULL, (ExtlL2CallHandler*)l2chnd_v_o__WMenu, FALSE, FALSE, FALSE},
    {"typeahead_clear", menu_typeahead_clear, "o", NULL, (ExtlL2CallHandler*)l2chnd_v_o__WMenu, FALSE, FALSE, FALSE},
    {"cancel", menu_cancel, "o", NULL, (ExtlL2CallHandler*)l2chnd_v_o__WMenu, FALSE, FALSE, FALSE},
    {"select_prev", menu_select_prev, "o", NULL, (ExtlL2CallHandler*)l2chnd_v_o__WMenu, FALSE, FALSE, FALSE},
    {"select_next", menu_select_next, "o", NULL, (ExtlL2CallHandler*)l2chnd_v_o__WMenu, FALSE, FALSE, FALSE},
    {NULL, NULL, NULL, NULL, NULL, FALSE, FALSE, FALSE}
};

bool mod_menu_register_exports()
{
    if(!extl_register_module("mod_menu", mod_menu_exports)) return FALSE;
    if(!extl_register_class("WMenu", WMenu_exports, "WWindow")) return FALSE;
    return TRUE;
}

void mod_menu_unregister_exports()
{
    extl_unregister_module("mod_menu", mod_menu_exports);
    extl_unregister_class("WMenu", WMenu_exports);
}

