Exemple #1
0
 public static void open(Lua.lua_State L)
 {
     Luna.dostring(L, "if __luna==nil then __luna={} end");
     Luna.dostring(L, "    if __luna.copyMethodsFrom==nil then\n        function __luna.copyMethodsFrom(methodsChild, methodsParent)\n            for k,v in pairs(methodsParent) do\n                if k~='__index' and k~='__newindex' and methodsChild[k]==nil then\n                    methodsChild[k]=v\n                end\n            end\n        end\n        function __luna.overwriteMethodsFrom(methodsChild, methodsParent)\n            for k,v in pairs(methodsParent) do\n                if k~='__index' and k~='__newindex' then\n                    if verbose then print('registering', k, methodsChild[k]) end\n                    methodsChild[k]=v\n                end\n            end\n        end\n    end\n    ");
     impl_LunaTraits_LWF_LWF.luna_init_hashmap();
     impl_LunaTraits_LWF_LWF.luna_init_write_hashmap();
     Luna_LWF_LWF.Register(L);
     Luna.dostring(L, "if not LWF then LWF={} end LWF.LWF=__luna.LWF_LWF");
     Luna.dostring(L, "                __luna.LWF_LWF.luna_class='.LWF'");
     impl_LunaTraits_LWF_Button.luna_init_hashmap();
     impl_LunaTraits_LWF_Button.luna_init_write_hashmap();
     Luna_LWF_Button.Register(L);
     Luna.dostring(L, "if not LWF then LWF={} end LWF.Button=__luna.LWF_Button");
     Luna.dostring(L, "                __luna.LWF_Button.luna_class='.Button'");
     impl_LunaTraits_LWF_Movie.luna_init_hashmap();
     impl_LunaTraits_LWF_Movie.luna_init_write_hashmap();
     Luna_LWF_Movie.Register(L);
     Luna.dostring(L, "if not LWF then LWF={} end LWF.Movie=__luna.LWF_Movie");
     Luna.dostring(L, "                __luna.LWF_Movie.luna_class='.Movie'");
     impl_LunaTraits_LWF_Point.luna_init_hashmap();
     impl_LunaTraits_LWF_Point.luna_init_write_hashmap();
     Luna_LWF_Point.Register(L);
     Luna.dostring(L, "if not LWF then LWF={} end LWF.Point=__luna.LWF_Point");
     Luna.dostring(L, "                __luna.LWF_Point.luna_class='.Point'");
 }
Exemple #2
0
 public static void close(Lua.lua_State L)
 {
     Luna_LWF_LWF.Unregister(L);
     Luna_LWF_Button.Unregister(L);
     Luna_LWF_Movie.Unregister(L);
     Luna_LWF_Point.Unregister(L);
 }
Exemple #3
0
    public static int _bind__property_get_x(Lua.lua_State L)
    {
        if (Lua.lua_gettop(L) != 1 ||
            Luna.get_uniqueid(L, 1) != 32383421)
        {
            Luna.printStack(L); Lua.luaL_error(L, "luna typecheck failed:_property_get_x(LWF.Point a)");
        }

        LWF.Point a = Luna_LWF_Point.check(L, 1);
        try {
            float ret = _property_get_x(a);
            Lua.lua_pushnumber(L, ret);
        } catch (Exception e) { Lua.luaL_error(L, new Lua.CharPtr(e.ToString())); }
        return(1);
    }
Exemple #4
0
    public static int _bind__property_set_y(Lua.lua_State L)
    {
        if (Lua.lua_gettop(L) != 2 ||
            Luna.get_uniqueid(L, 1) != 32383421 ||
            Lua.lua_isnumber(L, 2) == 0)
        {
            Luna.printStack(L); Lua.luaL_error(L, "luna typecheck failed:_property_set_y(LWF.Point a, float b)");
        }

        LWF.Point a = Luna_LWF_Point.check(L, 1);
        float     b = (float)(float)Lua.lua_tonumber(L, 2);

        try {
            _property_set_y(a, b);
        } catch (Exception e) { Lua.luaL_error(L, new Lua.CharPtr(e.ToString())); }
        return(0);
    }
    public static int _bind_localToGlobal(Lua.lua_State L)
    {
        if (Lua.lua_gettop(L) != 2 ||
            Luna.get_uniqueid(L, 1) != 29625181 ||
            Luna.get_uniqueid(L, 2) != LunaTraits_LWF_Point.uniqueID)
        {
            Luna.printStack(L); Lua.luaL_error(L, "luna typecheck failed:localToGlobal(LWF.Movie self)");
        }

        LWF.Movie self  = Luna_LWF_Movie.check(L, 1);
        LWF.Point point = Luna_LWF_Point.check(L, 2);
        try {
            LWF.Point ret = self.LocalToGlobal(point);
            Luna_LWF_Point.push(L, ret, true, "LWF_Point");
        } catch (Exception e) { Lua.luaL_error(L, new Lua.CharPtr(e.ToString())); }
        return(1);
    }