#include <ch.h>
#include <gtkdial.h>

EXPORTCH GtkWidget* gtk_dial_new_chdl(void *varg) {
    ChInterp_t interp;
    va_list ap;
    GtkAdjustment *adjustment;
    GtkWidget* retval;

    Ch_VaStart(interp, ap, varg);
    adjustment = Ch_VaArg(interp, ap, GtkAdjustment *);
    retval = gtk_dial_new(adjustment);
    Ch_VaEnd(interp, ap);
    return retval;
}

EXPORTCH guint gtk_dial_get_type_chdl(void *varg) {
    guint retval;
    retval = gtk_dial_get_type();
    return retval;
}

EXPORTCH GtkAdjustment* gtk_dial_get_adjustment_chdl(void *varg) {
    ChInterp_t interp;
    va_list ap;
    GtkDial *dial;
    GtkAdjustment* retval;

    Ch_VaStart(interp, ap, varg);
    dial = Ch_VaArg(interp, ap, GtkDial *);
    retval = gtk_dial_get_adjustment(dial);
    Ch_VaEnd(interp, ap);
    return retval;
}

EXPORTCH void gtk_dial_set_update_policy_chdl(void *varg) {
    ChInterp_t interp;
    va_list ap;
    GtkDial *dial;
    GtkUpdateType policy;

    Ch_VaStart(interp, ap, varg);
    dial = Ch_VaArg(interp, ap, GtkDial *);
    policy = Ch_VaArg(interp, ap, GtkUpdateType);
    gtk_dial_set_update_policy(dial, policy);
    Ch_VaEnd(interp, ap);
}

EXPORTCH void gtk_dial_set_adjustment_chdl(void *varg) {
    ChInterp_t interp;
    va_list ap;
    GtkDial *dial;
    GtkAdjustment *adjustment;

    Ch_VaStart(interp, ap, varg);
    dial = Ch_VaArg(interp, ap, GtkDial *);
    adjustment = Ch_VaArg(interp, ap, GtkAdjustment *);
    gtk_dial_set_adjustment(dial, adjustment);
    Ch_VaEnd(interp, ap);
}
