-- EFL LuaJIT bindings: elm_button.eo (class Elm.Button)
-- For use with Elua; automatically generated, do not modify

local cutil = require("cutil")
local util  = require("util")
local ffi   = require("ffi")
local eo    = require("eo")

local M, __lib = ...

local __class
local __body

local init = function()
    __class = __lib.elm_button_class_get()
    eo.class_register("Elm_Button", {"Elm_Layout"}, {"Efl_Ui_Clickable", "Elm_Interface_Atspi_Widget_Action"}, __body, __class)
end

cutil.init_module(init, function() end)

ffi.cdef [[
    const Eo_Class *elm_button_class_get(void);
    void elm_obj_button_autorepeat_initial_timeout_set(double t);
    double elm_obj_button_autorepeat_initial_timeout_get(void);
    void elm_obj_button_autorepeat_gap_timeout_set(double t);
    double elm_obj_button_autorepeat_gap_timeout_get(void);
    void elm_obj_button_autorepeat_set(Eina_Bool on);
    Eina_Bool elm_obj_button_autorepeat_get(void);
    Eina_Bool elm_obj_button_admits_autorepeat_get(void);
]]

__body = {
    __eo_ctor = function(self, __func)
        if __func then __func() end
    end,

    autorepeat_initial_timeout_set = function(self, t)
        eo.__do_start(self, __class)
        __lib.elm_obj_button_autorepeat_initial_timeout_set(t)
        eo.__do_end()
    end,

    autorepeat_initial_timeout_get = function(self)
        eo.__do_start(self, __class)
        local v = __lib.elm_obj_button_autorepeat_initial_timeout_get()
        eo.__do_end()
        return tonumber(v)
    end,

    autorepeat_gap_timeout_set = function(self, t)
        eo.__do_start(self, __class)
        __lib.elm_obj_button_autorepeat_gap_timeout_set(t)
        eo.__do_end()
    end,

    autorepeat_gap_timeout_get = function(self)
        eo.__do_start(self, __class)
        local v = __lib.elm_obj_button_autorepeat_gap_timeout_get()
        eo.__do_end()
        return tonumber(v)
    end,

    autorepeat_set = function(self, on)
        eo.__do_start(self, __class)
        __lib.elm_obj_button_autorepeat_set(on)
        eo.__do_end()
    end,

    autorepeat_get = function(self)
        eo.__do_start(self, __class)
        local v = __lib.elm_obj_button_autorepeat_get()
        eo.__do_end()
        return ((v) ~= 0)
    end,

    admits_autorepeat_get = function(self)
        eo.__do_start(self, __class)
        local v = __lib.elm_obj_button_admits_autorepeat_get()
        eo.__do_end()
        return ((v) ~= 0)
    end,

    __properties = {
        ["autorepeat_initial_timeout"] = { 0, 0, 1, 1, true, true },
        ["admits_autorepeat"] = { 0, 0, 1, 0, true, false },
        ["autorepeat"] = { 0, 0, 1, 1, true, true },
        ["autorepeat_gap_timeout"] = { 0, 0, 1, 1, true, true }
    }
}

M.Button = function(parent, ...)
    return eo.__ctor_common(__class, parent, eo.class_get("Elm_Button").__eo_ctor,
                            1, ...)
end

return M
