public static float GetRotationX(global::Android.Views.View p0)
        {
            if (id_getRotationX_Landroid_view_View_ == IntPtr.Zero)
            {
                id_getRotationX_Landroid_view_View_ = JNIEnv.GetStaticMethodID(class_ref, "getRotationX", "(Landroid/view/View;)F");
            }
            float __ret = JNIEnv.CallStaticFloatMethod(class_ref, id_getRotationX_Landroid_view_View_, new JValue(p0));

            return(__ret);
        }
 public static unsafe float SwapFloat(float p0)
 {
     if (id_swapFloat_F == IntPtr.Zero)
     {
         id_swapFloat_F = JNIEnv.GetStaticMethodID(class_ref, "swapFloat", "(F)F");
     }
     try {
         JValue *__args = stackalloc JValue [1];
         __args [0] = new JValue(p0);
         return(JNIEnv.CallStaticFloatMethod(class_ref, id_swapFloat_F, __args));
     } finally {
     }
 }
コード例 #3
0
 public static unsafe float GetDimension(int p0)
 {
     if (id_getDimension_I == IntPtr.Zero)
     {
         id_getDimension_I = JNIEnv.GetStaticMethodID(class_ref, "getDimension", "(I)F");
     }
     try {
         JValue *__args = stackalloc JValue [1];
         __args [0] = new JValue(p0);
         return(JNIEnv.CallStaticFloatMethod(class_ref, id_getDimension_I, __args));
     } finally {
     }
 }
コード例 #4
0
 public static unsafe float LightnessOfColor(int p0)
 {
     if (id_lightnessOfColor_I == IntPtr.Zero)
     {
         id_lightnessOfColor_I = JNIEnv.GetStaticMethodID(class_ref, "lightnessOfColor", "(I)F");
     }
     try {
         JValue *__args = stackalloc JValue [1];
         __args [0] = new JValue(p0);
         return(JNIEnv.CallStaticFloatMethod(class_ref, id_lightnessOfColor_I, __args));
     } finally {
     }
 }
コード例 #5
0
 public static unsafe float GetX(global::Android.Views.View p0)
 {
     if (id_getX_Landroid_view_View_ == IntPtr.Zero)
     {
         id_getX_Landroid_view_View_ = JNIEnv.GetStaticMethodID(class_ref, "getX", "(Landroid/view/View;)F");
     }
     try {
         JValue *__args = stackalloc JValue [1];
         __args [0] = new JValue(p0);
         float __ret = JNIEnv.CallStaticFloatMethod(class_ref, id_getX_Landroid_view_View_, __args);
         return(__ret);
     } finally {
     }
 }
 public static unsafe float Rnd(float min, float max)
 {
     if (id_rnd_FF == IntPtr.Zero)
     {
         id_rnd_FF = JNIEnv.GetStaticMethodID(class_ref, "rnd", "(FF)F");
     }
     try {
         JValue *__args = stackalloc JValue [2];
         __args [0] = new JValue(min);
         __args [1] = new JValue(max);
         return(JNIEnv.CallStaticFloatMethod(class_ref, id_rnd_FF, __args));
     } finally {
     }
 }
コード例 #7
0
 public static unsafe float TryParse(global::Java.Lang.Object p0, float p1)
 {
     if (id_tryParse_Ljava_lang_Object_F == IntPtr.Zero)
     {
         id_tryParse_Ljava_lang_Object_F = JNIEnv.GetStaticMethodID(class_ref, "tryParse", "(Ljava/lang/Object;F)F");
     }
     try {
         JValue *__args = stackalloc JValue [2];
         __args [0] = new JValue(p0);
         __args [1] = new JValue(p1);
         float __ret = JNIEnv.CallStaticFloatMethod(class_ref, id_tryParse_Ljava_lang_Object_F, __args);
         return(__ret);
     } finally {
     }
 }
コード例 #8
0
 public static unsafe float DpToPx(float p0, global::Android.Content.Context p1)
 {
     if (id_dpToPx_FLandroid_content_Context_ == IntPtr.Zero)
     {
         id_dpToPx_FLandroid_content_Context_ = JNIEnv.GetStaticMethodID(class_ref, "dpToPx", "(FLandroid/content/Context;)F");
     }
     try {
         JValue *__args = stackalloc JValue [2];
         __args [0] = new JValue(p0);
         __args [1] = new JValue(p1);
         float __ret = JNIEnv.CallStaticFloatMethod(class_ref, id_dpToPx_FLandroid_content_Context_, __args);
         return(__ret);
     } finally {
     }
 }
コード例 #9
0
 public static unsafe float MinMax(float p0, float p1, float p2)
 {
     if (id_minMax_FFF == IntPtr.Zero)
     {
         id_minMax_FFF = JNIEnv.GetStaticMethodID(class_ref, "minMax", "(FFF)F");
     }
     try {
         JValue *__args = stackalloc JValue [3];
         __args [0] = new JValue(p0);
         __args [1] = new JValue(p1);
         __args [2] = new JValue(p2);
         return(JNIEnv.CallStaticFloatMethod(class_ref, id_minMax_FFF, __args));
     } finally {
     }
 }
 public static unsafe float ComputeImageScale(global::Com.Nostra13.Universalimageloader.Core.Assist.ImageSize p0, global::Com.Nostra13.Universalimageloader.Core.Assist.ImageSize p1, global::Com.Nostra13.Universalimageloader.Core.Assist.ViewScaleType p2, bool p3)
 {
     if (id_computeImageScale_Lcom_nostra13_universalimageloader_core_assist_ImageSize_Lcom_nostra13_universalimageloader_core_assist_ImageSize_Lcom_nostra13_universalimageloader_core_assist_ViewScaleType_Z == IntPtr.Zero)
     {
         id_computeImageScale_Lcom_nostra13_universalimageloader_core_assist_ImageSize_Lcom_nostra13_universalimageloader_core_assist_ImageSize_Lcom_nostra13_universalimageloader_core_assist_ViewScaleType_Z = JNIEnv.GetStaticMethodID(class_ref, "computeImageScale", "(Lcom/nostra13/universalimageloader/core/assist/ImageSize;Lcom/nostra13/universalimageloader/core/assist/ImageSize;Lcom/nostra13/universalimageloader/core/assist/ViewScaleType;Z)F");
     }
     try {
         JValue *__args = stackalloc JValue [4];
         __args [0] = new JValue(p0);
         __args [1] = new JValue(p1);
         __args [2] = new JValue(p2);
         __args [3] = new JValue(p3);
         float __ret = JNIEnv.CallStaticFloatMethod(class_ref, id_computeImageScale_Lcom_nostra13_universalimageloader_core_assist_ImageSize_Lcom_nostra13_universalimageloader_core_assist_ImageSize_Lcom_nostra13_universalimageloader_core_assist_ViewScaleType_Z, __args);
         return(__ret);
     } finally {
     }
 }
        public static unsafe float ParsePercentage(string p0)
        {
            if (id_parsePercentage_Ljava_lang_String_ == IntPtr.Zero)
            {
                id_parsePercentage_Ljava_lang_String_ = JNIEnv.GetStaticMethodID(class_ref, "parsePercentage", "(Ljava/lang/String;)F");
            }
            IntPtr native_p0 = JNIEnv.NewString(p0);

            try {
                JValue *__args = stackalloc JValue [1];
                __args [0] = new JValue(native_p0);
                float __ret = JNIEnv.CallStaticFloatMethod(class_ref, id_parsePercentage_Ljava_lang_String_, __args);
                return(__ret);
            } finally {
                JNIEnv.DeleteLocalRef(native_p0);
            }
        }
コード例 #12
0
        //CJW
        public T CallMethod <T>(IntPtr methodId, bool bIsStaticMethod, String sig, List <object> param)
        {
            try
            {
                if (typeof(T) == typeof(byte))
                {
                    // Call the byte method
                    byte res;
                    if (bIsStaticMethod)
                    {
                        res = env.CallStaticByteMethod(javaObject, methodId, ParseParameters(sig, param));
                    }
                    else
                    {
                        res = env.CallByteMethod(javaObject, methodId, ParseParameters(sig, param));
                    }
                    return((T)(object)res);
                }
                else if (typeof(T) == typeof(bool))
                {
                    // Call the boolean method
                    bool res;
                    if (bIsStaticMethod)
                    {
                        res = env.CallStaticBooleanMethod(javaObject, methodId, ParseParameters(sig, param));
                    }
                    else
                    {
                        res = env.CallBooleanMethod(javaObject, methodId, ParseParameters(sig, param));
                    }
                    return((T)(object)res);
                }
                if (typeof(T) == typeof(char))
                {
                    // Call the char method
                    char res;
                    if (bIsStaticMethod)
                    {
                        res = env.CallStaticCharMethod(javaObject, methodId, ParseParameters(sig, param));
                    }
                    else
                    {
                        res = env.CallCharMethod(javaObject, methodId, ParseParameters(sig, param));
                    }
                    return((T)(object)res);
                }
                else if (typeof(T) == typeof(short))
                {
                    // Call the short method
                    short res;
                    if (bIsStaticMethod)
                    {
                        res = env.CallStaticShortMethod(javaObject, methodId, ParseParameters(sig, param));
                    }
                    else
                    {
                        res = env.CallShortMethod(javaObject, methodId, ParseParameters(sig, param));
                    }
                    return((T)(object)res);
                }
                else if (typeof(T) == typeof(int))
                {
                    // Call the int method
                    int res;
                    if (bIsStaticMethod)
                    {
                        res = env.CallStaticIntMethod(javaObject, methodId, ParseParameters(sig, param));
                    }
                    else
                    {
                        res = env.CallIntMethod(javaObject, methodId, ParseParameters(sig, param));
                    }
                    return((T)(object)res);
                }
                else if (typeof(T) == typeof(long))
                {
                    // Call the long method
                    long res;
                    if (bIsStaticMethod)
                    {
                        res = env.CallStaticLongMethod(javaObject, methodId, ParseParameters(sig, param));
                    }
                    else
                    {
                        res = env.CallLongMethod(javaObject, methodId, ParseParameters(sig, param));
                    }
                    return((T)(object)res);
                }
                else if (typeof(T) == typeof(float))
                {
                    // Call the float method
                    float res;
                    if (bIsStaticMethod)
                    {
                        res = env.CallStaticFloatMethod(javaObject, methodId, ParseParameters(sig, param));
                    }
                    else
                    {
                        res = env.CallFloatMethod(javaObject, methodId, ParseParameters(sig, param));
                    }
                    return((T)(object)res);
                }
                else if (typeof(T) == typeof(double))
                {
                    // Call the double method
                    double res;
                    if (bIsStaticMethod)
                    {
                        res = env.CallStaticDoubleMethod(javaObject, methodId, ParseParameters(sig, param));
                    }
                    else
                    {
                        res = env.CallDoubleMethod(javaObject, methodId, ParseParameters(sig, param));
                    }
                    return((T)(object)res); // need to fix this
                }
                else if (typeof(T) == typeof(string))
                {
                    // Call the string method
                    IntPtr jstr;
                    if (bIsStaticMethod)
                    {
                        jstr = env.CallStaticObjectMethod(javaObject, methodId, ParseParameters(sig, param));
                    }
                    else
                    {
                        jstr = env.CallObjectMethod(javaObject, methodId, ParseParameters(sig, param));
                    }

                    string res = env.JStringToString(jstr);
                    env.DeleteLocalRef(jstr);
                    return((T)(object)res);
                }
                else if (typeof(T) == typeof(byte[]))
                {
                    // Call the byte method
                    IntPtr jobj;
                    if (bIsStaticMethod)
                    {
                        jobj = env.CallStaticObjectMethod(javaObject, methodId, ParseParameters(sig, param));
                    }
                    else
                    {
                        jobj = env.CallObjectMethod(javaObject, methodId, ParseParameters(sig, param));
                    }
                    if (jobj == IntPtr.Zero)
                    {
                        return(default(T));
                    }
                    byte[] res = env.JStringToByte(jobj);
                    env.DeleteLocalRef(jobj);
                    return((T)(object)res);
                }
                else if (typeof(T) == typeof(string[]))
                {
                    // Call the string array method
                    IntPtr jobj;
                    if (bIsStaticMethod)
                    {
                        jobj = env.CallStaticObjectMethod(javaObject, methodId, ParseParameters(sig, param));
                    }
                    else
                    {
                        jobj = env.CallObjectMethod(javaObject, methodId, ParseParameters(sig, param));
                    }
                    if (jobj == IntPtr.Zero)
                    {
                        return(default(T));
                    }

                    IntPtr[] objArray = env.GetObjectArray(jobj);
                    string[] res      = new string[objArray.Length];

                    for (int i = 0; i < objArray.Length; i++)
                    {
                        res[i] = env.JStringToString(objArray[i]);
                    }

                    env.DeleteLocalRef(jobj);
                    return((T)(object)res);
                }
                else if (typeof(T) == typeof(int[]))
                {
                    // Call the int array method
                    IntPtr jobj;
                    if (bIsStaticMethod)
                    {
                        jobj = env.CallStaticObjectMethod(javaObject, methodId, ParseParameters(sig, param));
                    }
                    else
                    {
                        jobj = env.CallObjectMethod(javaObject, methodId, ParseParameters(sig, param));
                    }
                    if (jobj == IntPtr.Zero)
                    {
                        return(default(T));
                    }
                    int[] res = env.GetIntArray(jobj);
                    env.DeleteLocalRef(jobj);
                    return((T)(object)res);
                }
                else if (typeof(T) == typeof(IntPtr))
                {
                    // Call the object method and deal with whatever comes back in the call code
                    IntPtr res;
                    if (bIsStaticMethod)
                    {
                        res = env.CallStaticObjectMethod(javaObject, methodId, ParseParameters(sig, param));
                    }
                    else
                    {
                        res = env.CallObjectMethod(javaObject, methodId, ParseParameters(sig, param));
                    }
                    return((T)(object)res);
                }
                return(default(T));
            }
            catch (Exception e)
            {
                throw new Exception("JNICode Error:" + e.Message);
            }
        }