-- EFL LuaJIT bindings: evas_3d_texture.eo (class Evas_3D_Texture)
-- 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.evas_3d_texture_class_get()
    eo.class_register("Evas_3D_Texture", "Evas_3D_Object", __body, __class)
    eo.class_mixin("Evas_3D_Texture", "Evas_Common_Interface")
end

cutil.init_module(init, function() end)

ffi.cdef [[
    const Eo_Class *evas_3d_texture_class_get(void);
    void evas_3d_texture_source_visible_set(Eina_Bool visible);
    Eina_Bool evas_3d_texture_source_visible_get(void);
    void evas_3d_texture_data_set(Evas_3D_Color_Format color_format, Evas_3D_Pixel_Format pixel_format, int w, int h, const void * data);
    void evas_3d_texture_file_set(const char * file, const char * key);
    void evas_3d_texture_source_set(Evas_Object * source);
    Evas_3D_Color_Format evas_3d_texture_color_format_get(void);
    void evas_3d_texture_size_get(int *w, int *h);
    void evas_3d_texture_wrap_set(Evas_3D_Wrap_Mode s, Evas_3D_Wrap_Mode t);
    void evas_3d_texture_wrap_get(Evas_3D_Wrap_Mode *s, Evas_3D_Wrap_Mode *t);
    void evas_3d_texture_filter_set(Evas_3D_Texture_Filter min, Evas_3D_Texture_Filter mag);
    void evas_3d_texture_filter_get(Evas_3D_Texture_Filter *min, Evas_3D_Texture_Filter *mag);
]]

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

    source_visible_set = function(self, visible)
        eo.__do_start(self, __class)
        __lib.evas_3d_texture_source_visible_set(visible)
        eo.__do_end()
    end,

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

    data_set = function(self, color_format, pixel_format, w, h, data)
        eo.__do_start(self, __class)
        __lib.evas_3d_texture_data_set(color_format, pixel_format, w, h, data)
        eo.__do_end()
    end,

    file_set = function(self, file, key)
        eo.__do_start(self, __class)
        __lib.evas_3d_texture_file_set(file, key)
        eo.__do_end()
    end,

    source_set = function(self, source)
        eo.__do_start(self, __class)
        __lib.evas_3d_texture_source_set(source)
        eo.__do_end()
    end,

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

    size_get = function(self)
        eo.__do_start(self, __class)
        local w = ffi.new("int[1]")
        local h = ffi.new("int[1]")
        __lib.evas_3d_texture_size_get(w, h)
        eo.__do_end()
        return tonumber(w[0]), tonumber(h[0])
    end,

    wrap_set = function(self, s, t)
        eo.__do_start(self, __class)
        __lib.evas_3d_texture_wrap_set(s, t)
        eo.__do_end()
    end,

    wrap_get = function(self)
        eo.__do_start(self, __class)
        local s = ffi.new("Evas_3D_Wrap_Mode[1]")
        local t = ffi.new("Evas_3D_Wrap_Mode[1]")
        __lib.evas_3d_texture_wrap_get(s, t)
        eo.__do_end()
        return s[0], t[0]
    end,

    filter_set = function(self, min, mag)
        eo.__do_start(self, __class)
        __lib.evas_3d_texture_filter_set(min, mag)
        eo.__do_end()
    end,

    filter_get = function(self)
        eo.__do_start(self, __class)
        local min = ffi.new("Evas_3D_Texture_Filter[1]")
        local mag = ffi.new("Evas_3D_Texture_Filter[1]")
        __lib.evas_3d_texture_filter_get(min, mag)
        eo.__do_end()
        return min[0], mag[0]
    end,

    __properties = {
        ["source_visible"] = { 0, 1, true, true }
    }
}

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

return M
