-- EFL LuaJIT bindings: elm_segment_control.eo (class Elm.Segment_Control)
-- 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_segment_control_class_get()
    eo.class_register("Elm_Segment_Control", {"Elm_Layout"}, nil, __body, __class)
end

cutil.init_module(init, function() end)

ffi.cdef [[
    const Eo_Class *elm_segment_control_class_get(void);
    int elm_obj_segment_control_item_count_get(void);
    Elm_Widget_Item *elm_obj_segment_control_item_selected_get(void);
    const char *elm_obj_segment_control_item_label_get(int idx);
    Elm_Widget_Item *elm_obj_segment_control_item_insert_at(Efl_Canvas_Object * icon, const char * label, int idx);
    Elm_Widget_Item *elm_obj_segment_control_item_get(int idx);
    void elm_obj_segment_control_item_del_at(int idx);
    Elm_Widget_Item *elm_obj_segment_control_item_add(Efl_Canvas_Object * icon, const char * label);
    Efl_Canvas_Object *elm_obj_segment_control_item_icon_get(int idx);
    extern const Eo_Event_Description _ELM_SEGMENT_CONTROL_EVENT_CHANGED;
]]

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

    item_count_get = function(self)
        eo.__do_start(self, __class)
        local v = __lib.elm_obj_segment_control_item_count_get()
        eo.__do_end()
    end,

    item_selected_get = function(self)
        eo.__do_start(self, __class)
        local v = __lib.elm_obj_segment_control_item_selected_get()
        eo.__do_end()
    end,

    item_label_get = function(self, idx)
        eo.__do_start(self, __class)
        local v = __lib.elm_obj_segment_control_item_label_get(idx)
        eo.__do_end()
        return v
    end,

    item_insert_at = function(self, icon, label, idx)
        eo.__do_start(self, __class)
        local v = __lib.elm_obj_segment_control_item_insert_at(icon, label, idx)
        eo.__do_end()
        return v
    end,

    item_get = function(self, idx)
        eo.__do_start(self, __class)
        local v = __lib.elm_obj_segment_control_item_get(idx)
        eo.__do_end()
        return v
    end,

    item_del_at = function(self, idx)
        eo.__do_start(self, __class)
        __lib.elm_obj_segment_control_item_del_at(idx)
        eo.__do_end()
    end,

    item_add = function(self, icon, label)
        eo.__do_start(self, __class)
        local v = __lib.elm_obj_segment_control_item_add(icon, label)
        eo.__do_end()
        return v
    end,

    item_icon_get = function(self, idx)
        eo.__do_start(self, __class)
        local v = __lib.elm_obj_segment_control_item_icon_get(idx)
        eo.__do_end()
        return v
    end,

    __events = {
        ["changed"] = __lib._ELM_SEGMENT_CONTROL_EVENT_CHANGED
    },

    __properties = {
        ["item_selected"] = { 0, 0, 1, 0, true, false },
        ["item_count"] = { 0, 0, 1, 0, true, false }
    }
}

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

return M
