-- EFL LuaJIT bindings: efl_ui_progress.eo (class Efl.Ui.Progress)
-- 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.efl_ui_progress_interface_get()
    eo.class_register("Efl_Ui_Progress", nil, nil, __body, __class)
end

cutil.init_module(init, function() end)

ffi.cdef [[
    const Eo_Class *efl_ui_progress_interface_get(void);
    void efl_ui_progress_span_size_set(int size);
    int efl_ui_progress_span_size_get(void);
    void efl_ui_progress_value_set(double val);
    double efl_ui_progress_value_get(void);
    void efl_ui_progress_unit_format_set(const char * units);
    const char *efl_ui_progress_unit_format_get(void);
]]

local __M = util.get_namespace(M, { "ui" })
__body = {
    span_size_set = function(self, size)
        eo.__do_start(self, __class)
        __lib.efl_ui_progress_span_size_set(size)
        eo.__do_end()
    end,

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

    progress_value_set = function(self, val)
        eo.__do_start(self, __class)
        __lib.efl_ui_progress_value_set(val)
        eo.__do_end()
    end,

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

    unit_format_set = function(self, units)
        eo.__do_start(self, __class)
        __lib.efl_ui_progress_unit_format_set(units)
        eo.__do_end()
    end,

    unit_format_get = function(self)
        eo.__do_start(self, __class)
        local v = __lib.efl_ui_progress_unit_format_get()
        eo.__do_end()
        return v
    end,

    __properties = {
        ["progress_value"] = { 0, 0, 1, 1, true, true },
        ["unit_format"] = { 0, 0, 1, 1, true, true },
        ["span_size"] = { 0, 0, 1, 1, true, true }
    }
}
__body["__iface_Efl_Ui_Progress"] = true

return M
