Beispiel #1
0
 static void SetAsIntPtr(IntPtr myMetArgN, int index, IntPtr value)
 {
     unsafe
     {
         MyMetArgsN *metArg = (MyMetArgsN *)myMetArgN;
         JsValue *   arr    = metArg->jsArr;
         (arr + index)->Ptr = value;
     }
 }
Beispiel #2
0
 static bool GetAsBool(IntPtr myMetArgN, int index)
 {
     unsafe
     {
         MyMetArgsN *metArg = (MyMetArgsN *)myMetArgN;
         JsValue *   arr    = metArg->jsArr;
         return((arr + index)->I32 != 0);
     }
 }
Beispiel #3
0
 static uint GetAsUInt32(IntPtr myMetArgN, int index)
 {
     unsafe
     {
         MyMetArgsN *metArg = (MyMetArgsN *)myMetArgN;
         JsValue *   arr    = metArg->jsArr;
         return((uint)(arr + index)->I32);
     }
 }
Beispiel #4
0
 static IntPtr GetAsIntPtr(IntPtr myMetArgN, int index)
 {
     unsafe
     {
         MyMetArgsN *metArg = (MyMetArgsN *)myMetArgN;
         JsValue *   arr    = metArg->jsArr;
         return((arr + index)->Ptr);
         //return ((JsValue*)varr + index)->Ptr;
     }
 }
Beispiel #5
0
 static float GetAsFloat(IntPtr myMetArgN, int index)
 {
     unsafe
     {
         MyMetArgsN *metArg = (MyMetArgsN *)myMetArgN;
         JsValue *   arr    = metArg->jsArr;
         return((float)(arr + index)->Num);
         //return (float)((JsValue*)varr + index)->Num;
     }
 }
Beispiel #6
0
 static double GetAsDouble(IntPtr myMetArgN, int index)
 {
     unsafe
     {
         MyMetArgsN *metArg = (MyMetArgsN *)myMetArgN;
         JsValue *   arr    = metArg->jsArr;
         return((arr + index)->Num);
         //return ((JsValue*)varr + index)->Num;
     }
 }
Beispiel #7
0
 static ulong GetAsUInt64(IntPtr myMetArgN, int index)
 {
     unsafe
     {
         MyMetArgsN *metArg = (MyMetArgsN *)myMetArgN;
         JsValue *   arr    = metArg->jsArr;
         return((ulong)(arr + index)->I64);
         //return (ulong)((JsValue*)varr + index)->I64;
     }
 }
Beispiel #8
0
 static void SetAsInt32(IntPtr myMetArgN, int index, int value)
 {
     unsafe
     {
         MyMetArgsN *metArg = (MyMetArgsN *)myMetArgN;
         JsValue *   arr    = metArg->jsArr;
         (arr + index)->I32 = value;
         // ((JsValue*)varr + index)->I32 = value;
     }
 }
Beispiel #9
0
 static int GetAsInt32(IntPtr myMetArgN, int index)
 {
     unsafe
     {
         MyMetArgsN *metArg = (MyMetArgsN *)myMetArgN;
         JsValue *   arr    = metArg->jsArr;
         return((arr + index)->I32);
         //return ((JsValue*)varr + index)->I32;
     }
 }
Beispiel #10
0
 static string GetAsString(IntPtr myMetArgN, int index)
 {
     unsafe
     {
         MyMetArgsN *metArg = (MyMetArgsN *)myMetArgN;
         JsValue *   arr    = metArg->jsArr;
         return(MyCefJsReadString(arr + index));
         //return MyCefJsReadString(((MyMetArgsN*)varr)->jsArr[index]);
     }
 }
Beispiel #11
0
        static void SetBoolToAddress(IntPtr myMetArgN, int index, bool value)
        {
            unsafe
            {
                MyMetArgsN *metArg = (MyMetArgsN *)myMetArgN;
                JsValue *   arr    = metArg->jsArr;
                *((bool *)(arr + index)->Ptr) = value;

                //JsValue* jsvalue = ((JsValue*)myMetArgN + index);
                //*((bool*)jsvalue->Ptr) = value;
            }
        }