/* 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(WTiling);
EXTL_DEFCLASS(WRegion);
EXTL_DEFCLASS(WSplit);
EXTL_DEFCLASS(WSplitFloat);
EXTL_DEFCLASS(WSplitST);
EXTL_DEFCLASS(WFrame);
EXTL_DEFCLASS(WSplitInner);
EXTL_DEFCLASS(WSplitSplit);
EXTL_DEFCLASS(WSplitRegion);
static bool l2chnd_o_os__WTiling_(Obj* (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WTiling)) return FALSE;
    out[0].o=fn(in[0].o, in[1].s);
    return TRUE;
}
static bool l2chnd_t__(ExtlTab (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    out[0].t=fn();
    return TRUE;
}
static bool l2chnd_o_oosb__WTiling_WFrame__(Obj* (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WTiling)) return FALSE;
    if(!EXTL_CHKO(in, 1, WFrame)) return FALSE;
    out[0].o=fn(in[0].o, in[1].o, in[2].s, in[3].b);
    return TRUE;
}
static bool l2chnd_v_o__WSplitSplit(void (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WSplitSplit)) return FALSE;
    fn(in[0].o);
    return TRUE;
}
static bool l2chnd_b_o__WRegion(bool (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WRegion)) return FALSE;
    out[0].b=fn(in[0].o);
    return TRUE;
}
static bool l2chnd_t_o__WSplit(ExtlTab (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WSplit)) return FALSE;
    out[0].t=fn(in[0].o);
    return TRUE;
}
static bool l2chnd_o_o__WSplitInner(Obj* (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WSplitInner)) return FALSE;
    out[0].o=fn(in[0].o);
    return TRUE;
}
static bool l2chnd_v_t__(void (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    fn(in[0].t);
    return TRUE;
}
static bool l2chnd_v_oo__WTiling_WRegion(void (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WTiling)) return FALSE;
    if(!EXTL_CHKO(in, 1, WRegion)) return FALSE;
    fn(in[0].o, in[1].o);
    return TRUE;
}
static bool l2chnd_t_ot__WSplit_(ExtlTab (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WSplit)) return FALSE;
    out[0].t=fn(in[0].o, in[1].t);
    return TRUE;
}
static bool l2chnd_o_oo__WTiling_WRegion(Obj* (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WTiling)) return FALSE;
    if(!EXTL_CHKO(in, 1, WRegion)) return FALSE;
    out[0].o=fn(in[0].o, in[1].o);
    return TRUE;
}
static bool l2chnd_b_o__WTiling(bool (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WTiling)) return FALSE;
    out[0].b=fn(in[0].o);
    return TRUE;
}
static bool l2chnd_o_oos__WTiling_WSplit_(Obj* (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WTiling)) return FALSE;
    if(!EXTL_CHKO(in, 1, WSplit)) return FALSE;
    out[0].o=fn(in[0].o, in[1].o, in[2].s);
    return TRUE;
}
static bool l2chnd_s_o__WSplitSplit(char* (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WSplitSplit)) return FALSE;
    out[0].s=fn(in[0].o);
    return TRUE;
}
static bool l2chnd_o_o__WSplitSplit(Obj* (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WSplitSplit)) return FALSE;
    out[0].o=fn(in[0].o);
    return TRUE;
}
static bool l2chnd_o_o__WSplit(Obj* (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WSplit)) return FALSE;
    out[0].o=fn(in[0].o);
    return TRUE;
}
static bool l2chnd_v_o__WSplit(void (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WSplit)) return FALSE;
    fn(in[0].o);
    return TRUE;
}
static bool l2chnd_o_o__WTiling(Obj* (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WTiling)) return FALSE;
    out[0].o=fn(in[0].o);
    return TRUE;
}
static bool l2chnd_o_osb__WTiling__(Obj* (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WTiling)) return FALSE;
    out[0].o=fn(in[0].o, in[1].s, in[2].b);
    return TRUE;
}
static bool l2chnd_o_oos__WTiling_WSplitSplit_(Obj* (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WTiling)) return FALSE;
    if(!EXTL_CHKO(in, 1, WSplitSplit)) return FALSE;
    out[0].o=fn(in[0].o, in[1].o, in[2].s);
    return TRUE;
}
static bool l2chnd_b_of__WTiling_(bool (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WTiling)) return FALSE;
    out[0].b=fn(in[0].o, in[1].f);
    return TRUE;
}
static bool l2chnd_b_oo__WTiling_WRegion(bool (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WTiling)) return FALSE;
    if(!EXTL_CHKO(in, 1, WRegion)) return FALSE;
    out[0].b=fn(in[0].o, in[1].o);
    return TRUE;
}
static bool l2chnd_o_o__WSplitRegion(Obj* (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WSplitRegion)) return FALSE;
    out[0].o=fn(in[0].o);
    return TRUE;
}
static bool l2chnd_o_oosb__WTiling_WRegion__(Obj* (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WTiling)) return FALSE;
    if(!EXTL_CHKO(in, 1, WRegion)) return FALSE;
    out[0].o=fn(in[0].o, in[1].o, in[2].s, in[3].b);
    return TRUE;
}
static bool l2chnd_b_ooss__WTiling_WRegion__(bool (*fn)(), ExtlL2Param *in, ExtlL2Param *out)
{
    if(!EXTL_CHKO1(in, 0, WTiling)) return FALSE;
    if(!EXTL_CHKO(in, 1, WRegion)) return FALSE;
    out[0].b=fn(in[0].o, in[1].o, in[2].s, in[3].s);
    return TRUE;
}

extern void tiling_split();
extern void tiling_split_top();
extern void tiling_set_floating_extl();
extern void tiling_split_at();
extern void tiling_farthest();
extern void tiling_set_floating_at_extl();
extern void iowns_transpose_at();
extern void tiling_managed_i();
extern void tiling_split_tree();
extern void tiling_unsplit_at();
extern void iowns_flip_at();
extern void tiling_node_of();
extern void tiling_nextto();


static ExtlExportedFnSpec WTiling_exports[] = {
    {"split", tiling_split, "ooS", "o", (ExtlL2CallHandler*)l2chnd_o_oos__WTiling_WSplit_, FALSE, FALSE, FALSE},
    {"split_top", tiling_split_top, "oS", "o", (ExtlL2CallHandler*)l2chnd_o_os__WTiling_, FALSE, FALSE, FALSE},
    {"set_floating", tiling_set_floating_extl, "ooS", "o", (ExtlL2CallHandler*)l2chnd_o_oos__WTiling_WSplitSplit_, FALSE, FALSE, FALSE},
    {"split_at", tiling_split_at, "ooSb", "o", (ExtlL2CallHandler*)l2chnd_o_oosb__WTiling_WFrame__, FALSE, FALSE, FALSE},
    {"farthest", tiling_farthest, "oSb", "o", (ExtlL2CallHandler*)l2chnd_o_osb__WTiling__, TRUE, FALSE, FALSE},
    {"set_floating_at", tiling_set_floating_at_extl, "ooSS", "b", (ExtlL2CallHandler*)l2chnd_b_ooss__WTiling_WRegion__, FALSE, FALSE, FALSE},
    {"transpose_at", iowns_transpose_at, "oo", "b", (ExtlL2CallHandler*)l2chnd_b_oo__WTiling_WRegion, FALSE, FALSE, FALSE},
    {"managed_i", tiling_managed_i, "of", "b", (ExtlL2CallHandler*)l2chnd_b_of__WTiling_, TRUE, FALSE, FALSE},
    {"split_tree", tiling_split_tree, "o", "o", (ExtlL2CallHandler*)l2chnd_o_o__WTiling, TRUE, FALSE, FALSE},
    {"unsplit_at", tiling_unsplit_at, "oo", NULL, (ExtlL2CallHandler*)l2chnd_v_oo__WTiling_WRegion, FALSE, FALSE, FALSE},
    {"flip_at", iowns_flip_at, "oo", "b", (ExtlL2CallHandler*)l2chnd_b_oo__WTiling_WRegion, FALSE, FALSE, FALSE},
    {"node_of", tiling_node_of, "oo", "o", (ExtlL2CallHandler*)l2chnd_o_oo__WTiling_WRegion, TRUE, FALSE, FALSE},
    {"nextto", tiling_nextto, "ooSb", "o", (ExtlL2CallHandler*)l2chnd_o_oosb__WTiling_WRegion__, TRUE, FALSE, FALSE},
    {NULL, NULL, NULL, NULL, NULL, FALSE, FALSE, FALSE}
};

#define WRegion_exports NULL
extern void split_parent();
extern void split_geom();
extern void split_rqgeom();
extern void split_transpose();


static ExtlExportedFnSpec WSplit_exports[] = {
    {"parent", split_parent, "o", "o", (ExtlL2CallHandler*)l2chnd_o_o__WSplit, TRUE, FALSE, FALSE},
    {"geom", split_geom, "o", "t", (ExtlL2CallHandler*)l2chnd_t_o__WSplit, TRUE, FALSE, FALSE},
    {"rqgeom", split_rqgeom, "ot", "t", (ExtlL2CallHandler*)l2chnd_t_ot__WSplit_, FALSE, FALSE, FALSE},
    {"transpose", split_transpose, "o", NULL, (ExtlL2CallHandler*)l2chnd_v_o__WSplit, FALSE, FALSE, FALSE},
    {NULL, NULL, NULL, NULL, NULL, FALSE, FALSE, FALSE}
};

#define WSplitFloat_exports NULL
#define WSplitST_exports NULL
extern void mod_tiling_get();
extern void mod_tiling_untile();
extern void mod_tiling_set();
extern void mod_tiling_mkbottom();


static ExtlExportedFnSpec mod_tiling_exports[] = {
    {"get", mod_tiling_get, NULL, "t", (ExtlL2CallHandler*)l2chnd_t__, TRUE, FALSE, FALSE},
    {"untile", mod_tiling_untile, "o", "b", (ExtlL2CallHandler*)l2chnd_b_o__WTiling, FALSE, FALSE, FALSE},
    {"set", mod_tiling_set, "t", NULL, (ExtlL2CallHandler*)l2chnd_v_t__, FALSE, FALSE, FALSE},
    {"mkbottom", mod_tiling_mkbottom, "o", "b", (ExtlL2CallHandler*)l2chnd_b_o__WRegion, FALSE, FALSE, FALSE},
    {NULL, NULL, NULL, NULL, NULL, FALSE, FALSE, FALSE}
};

#define WFrame_exports NULL
extern void splitinner_current();


static ExtlExportedFnSpec WSplitInner_exports[] = {
    {"current", splitinner_current, "o", "o", (ExtlL2CallHandler*)l2chnd_o_o__WSplitInner, TRUE, FALSE, FALSE},
    {NULL, NULL, NULL, NULL, NULL, FALSE, FALSE, FALSE}
};

extern void splitsplit_dir();
extern void splitsplit_flip();
extern void splitsplit_br();
extern void splitsplit_tl();


static ExtlExportedFnSpec WSplitSplit_exports[] = {
    {"dir", splitsplit_dir, "o", "S", (ExtlL2CallHandler*)l2chnd_s_o__WSplitSplit, TRUE, FALSE, FALSE},
    {"flip", splitsplit_flip, "o", NULL, (ExtlL2CallHandler*)l2chnd_v_o__WSplitSplit, FALSE, FALSE, FALSE},
    {"br", splitsplit_br, "o", "o", (ExtlL2CallHandler*)l2chnd_o_o__WSplitSplit, TRUE, FALSE, FALSE},
    {"tl", splitsplit_tl, "o", "o", (ExtlL2CallHandler*)l2chnd_o_o__WSplitSplit, TRUE, FALSE, FALSE},
    {NULL, NULL, NULL, NULL, NULL, FALSE, FALSE, FALSE}
};

extern void splitregion_reg();


static ExtlExportedFnSpec WSplitRegion_exports[] = {
    {"reg", splitregion_reg, "o", "o", (ExtlL2CallHandler*)l2chnd_o_o__WSplitRegion, TRUE, FALSE, FALSE},
    {NULL, NULL, NULL, NULL, NULL, FALSE, FALSE, FALSE}
};

bool mod_tiling_register_exports()
{
    if(!extl_register_class("WTiling", WTiling_exports, "WRegion")) return FALSE;
    if(!extl_register_class("WSplit", WSplit_exports, "Obj")) return FALSE;
    if(!extl_register_class("WSplitInner", WSplitInner_exports, "WSplit")) return FALSE;
    if(!extl_register_class("WSplitSplit", WSplitSplit_exports, "WSplitInner")) return FALSE;
    if(!extl_register_class("WSplitFloat", WSplitFloat_exports, "WSplitSplit")) return FALSE;
    if(!extl_register_class("WSplitRegion", WSplitRegion_exports, "WSplit")) return FALSE;
    if(!extl_register_class("WSplitST", WSplitST_exports, "WSplitRegion")) return FALSE;
    if(!extl_register_module("mod_tiling", mod_tiling_exports)) return FALSE;
    return TRUE;
}

void mod_tiling_unregister_exports()
{
    extl_unregister_class("WTiling", WTiling_exports);
    extl_unregister_class("WSplit", WSplit_exports);
    extl_unregister_class("WSplitInner", WSplitInner_exports);
    extl_unregister_class("WSplitSplit", WSplitSplit_exports);
    extl_unregister_class("WSplitFloat", WSplitFloat_exports);
    extl_unregister_class("WSplitRegion", WSplitRegion_exports);
    extl_unregister_class("WSplitST", WSplitST_exports);
    extl_unregister_module("mod_tiling", mod_tiling_exports);
}

