Пример #1
0
////////////////////// Display ///////////////////////////////////////
// constructors

// fields
    static void Display_displays(JSVCall vc)
    {
        if (vc.bGet)
        {
            var result = UnityEngine.Display.displays;
            var arrRet = result;
            for (int i = 0; arrRet != null && i < arrRet.Length; i++)
            {
                JSMgr.datax.setObject((int)JSApi.SetType.SaveAndTempTrace, arrRet[i]);
                JSApi.moveSaveID2Arr(i);
            }
            JSApi.setArrayS((int)JSApi.SetType.Rval, (arrRet != null ? arrRet.Length : 0), true);
        }
        else
        {
            UnityEngine.Display[] arg0 = JSDataExchangeMgr.GetJSArg <UnityEngine.Display[]>(() =>
            {
                int jsObjID = JSApi.getObject((int)JSApi.GetType.Arg);
                int length  = JSApi.getArrayLength(jsObjID);
                var ret     = new UnityEngine.Display[length];
                for (var i = 0; i < length; i++)
                {
                    JSApi.getElement(jsObjID, i);
                    ret[i] = (UnityEngine.Display)JSMgr.datax.getObject((int)JSApi.GetType.SaveAndRemove);
                }
                return(ret);
            });
            UnityEngine.Display.displays = arg0;
        }
    }
Пример #2
0
    static void Display_systemHeight(JSVCall vc)
    {
        UnityEngine.Display _this = (UnityEngine.Display)vc.csObj;
        var result = _this.systemHeight;

        JSApi.setInt32((int)JSApi.SetType.Rval, (System.Int32)(result));
    }
Пример #3
0
// properties
    static void Display_renderingWidth(JSVCall vc)
    {
        UnityEngine.Display _this = (UnityEngine.Display)vc.csObj;
        var result = _this.renderingWidth;

        JSApi.setInt32((int)JSApi.SetType.Rval, (System.Int32)(result));
    }
Пример #4
0
 static public int get_active(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         UnityEngine.Display self = (UnityEngine.Display)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.active);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
Пример #5
0
 static public int SetRenderingResolution(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         UnityEngine.Display self = (UnityEngine.Display)checkSelf(l);
         System.Int32        a1;
         checkType(l, 2, out a1);
         System.Int32 a2;
         checkType(l, 3, out a2);
         self.SetRenderingResolution(a1, a2);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
Пример #6
0
    static void Display_depthBuffer(JSVCall vc)
    {
        UnityEngine.Display _this = (UnityEngine.Display)vc.csObj;
        var result = _this.depthBuffer;

        JSMgr.datax.setObject((int)JSApi.SetType.Rval, result);
    }
Пример #7
0
 static public int Activate(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 1)
         {
             UnityEngine.Display self = (UnityEngine.Display)checkSelf(l);
             self.Activate();
             return(0);
         }
         else if (argc == 4)
         {
             UnityEngine.Display self = (UnityEngine.Display)checkSelf(l);
             System.Int32        a1;
             checkType(l, 2, out a1);
             System.Int32 a2;
             checkType(l, 3, out a2);
             System.Int32 a3;
             checkType(l, 4, out a3);
             self.Activate(a1, a2, a3);
             return(0);
         }
         LuaDLL.luaL_error(l, "No matched override function to call");
         return(0);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
Пример #8
0
 static public int Activate(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 1)
         {
             UnityEngine.Display self = (UnityEngine.Display)checkSelf(l);
             self.Activate();
             pushValue(l, true);
             return(1);
         }
         else if (argc == 4)
         {
             UnityEngine.Display self = (UnityEngine.Display)checkSelf(l);
             System.Int32        a1;
             checkType(l, 2, out a1);
             System.Int32 a2;
             checkType(l, 3, out a2);
             System.Int32 a3;
             checkType(l, 4, out a3);
             self.Activate(a1, a2, a3);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function Activate to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #9
0
 private static void RecreateDisplayList(IntPtr[] nativeDisplay)
 {
     displays = new Display[nativeDisplay.Length];
     for (int i = 0; i < nativeDisplay.Length; i++)
     {
         displays[i] = new Display(nativeDisplay[i]);
     }
     _mainDisplay = displays[0];
 }
Пример #10
0
 static public int get_renderingHeight(IntPtr l)
 {
     try {
         UnityEngine.Display self = (UnityEngine.Display)checkSelf(l);
         pushValue(l, self.renderingHeight);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #11
0
 static public int get_active(IntPtr l)
 {
     try {
         UnityEngine.Display self = (UnityEngine.Display)checkSelf(l);
         pushValue(l, self.active);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #12
0
 static public int get_depthBuffer(IntPtr l)
 {
     try {
         UnityEngine.Display self = (UnityEngine.Display)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.depthBuffer);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #13
0
 static public int get_systemHeight(IntPtr l)
 {
     try {
         UnityEngine.Display self = (UnityEngine.Display)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.systemHeight);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #14
0
 static public int Activate(IntPtr l)
 {
     try{
         UnityEngine.Display self = (UnityEngine.Display)checkSelf(l);
         self.Activate();
         return(0);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
Пример #15
0
 static public int Activate(IntPtr l)
 {
     try {
         UnityEngine.Display self = (UnityEngine.Display)checkSelf(l);
         self.Activate();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #16
0
 static public int get_depthBuffer(IntPtr l)
 {
     try {
         UnityEngine.Display self = (UnityEngine.Display)checkSelf(l);
         pushValue(l, self.depthBuffer);
         return(1);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
Пример #17
0
 static public int Activate(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 1)
         {
             UnityEngine.Display self = (UnityEngine.Display)checkSelf(l);
             self.Activate();
             pushValue(l, true);
             return(1);
         }
         else if (argc == 4)
         {
             UnityEngine.Display self = (UnityEngine.Display)checkSelf(l);
             System.Int32        a1;
             checkType(l, 2, out a1);
             System.Int32 a2;
             checkType(l, 3, out a2);
             System.Int32 a3;
             checkType(l, 4, out a3);
             self.Activate(a1, a2, a3);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function Activate to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
Пример #18
0
 static public int SetRenderingResolution(IntPtr l)
 {
     try {
         UnityEngine.Display self = (UnityEngine.Display)checkSelf(l);
         System.Int32        a1;
         checkType(l, 2, out a1);
         System.Int32 a2;
         checkType(l, 3, out a2);
         self.SetRenderingResolution(a1, a2);
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #19
0
 static public int Activate__Int32__Int32__Int32(IntPtr l)
 {
     try {
         UnityEngine.Display self = (UnityEngine.Display)checkSelf(l);
         System.Int32        a1;
         checkType(l, 2, out a1);
         System.Int32 a2;
         checkType(l, 3, out a2);
         System.Int32 a3;
         checkType(l, 4, out a3);
         self.Activate(a1, a2, a3);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #20
0
 static public int SetParams(IntPtr l)
 {
     try {
         UnityEngine.Display self = (UnityEngine.Display)checkSelf(l);
         System.Int32        a1;
         checkType(l, 2, out a1);
         System.Int32 a2;
         checkType(l, 3, out a2);
         System.Int32 a3;
         checkType(l, 4, out a3);
         System.Int32 a4;
         checkType(l, 5, out a4);
         self.SetParams(a1, a2, a3, a4);
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #21
0
 static public int get_colorBuffer(IntPtr l)
 {
     UnityEngine.Display o = (UnityEngine.Display)checkSelf(l);
     pushValue(l, o.colorBuffer);
     return(1);
 }
Пример #22
0
 static public int get_systemHeight(IntPtr l)
 {
     UnityEngine.Display o = (UnityEngine.Display)checkSelf(l);
     pushValue(l, o.systemHeight);
     return(1);
 }
Пример #23
0
 static public int get_renderingWidth(IntPtr l)
 {
     UnityEngine.Display o = (UnityEngine.Display)checkSelf(l);
     pushValue(l, o.renderingWidth);
     return(1);
 }
Пример #24
0
 private static void RecreateDisplayList(IntPtr[] nativeDisplay)
 {
   Display.displays = new Display[nativeDisplay.Length];
   for (int index = 0; index < nativeDisplay.Length; ++index)
     Display.displays[index] = new Display(nativeDisplay[index]);
   Display._mainDisplay = Display.displays[0];
 }