wxr
2023-07-31 27cb19320ed4ac5552c17a263d0887a7cb88edc9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
using System;
using System.Collections.Generic;
using Android.Runtime;
using Java.Interop;
 
namespace Com.Hdl.Hdllinphonesdk.Utils {
 
    // Metadata.xml XPath class reference: path="/api/package[@name='com.hdl.hdllinphonesdk.utils']/class[@name='HDLImageUtils']"
    [global::Android.Runtime.Register ("com/hdl/hdllinphonesdk/utils/HDLImageUtils", DoNotGenerateAcw=true)]
    public partial class HDLImageUtils : global::Java.Lang.Object {
        static readonly JniPeerMembers _members = new XAPeerMembers ("com/hdl/hdllinphonesdk/utils/HDLImageUtils", typeof (HDLImageUtils));
 
        internal static IntPtr class_ref {
            get { return _members.JniPeerType.PeerReference.Handle; }
        }
 
        [global::System.Diagnostics.DebuggerBrowsable (global::System.Diagnostics.DebuggerBrowsableState.Never)]
        [global::System.ComponentModel.EditorBrowsable (global::System.ComponentModel.EditorBrowsableState.Never)]
        public override global::Java.Interop.JniPeerMembers JniPeerMembers {
            get { return _members; }
        }
 
        [global::System.Diagnostics.DebuggerBrowsable (global::System.Diagnostics.DebuggerBrowsableState.Never)]
        [global::System.ComponentModel.EditorBrowsable (global::System.ComponentModel.EditorBrowsableState.Never)]
        protected override IntPtr ThresholdClass {
            get { return _members.JniPeerType.PeerReference.Handle; }
        }
 
        [global::System.Diagnostics.DebuggerBrowsable (global::System.Diagnostics.DebuggerBrowsableState.Never)]
        [global::System.ComponentModel.EditorBrowsable (global::System.ComponentModel.EditorBrowsableState.Never)]
        protected override global::System.Type ThresholdType {
            get { return _members.ManagedPeerType; }
        }
 
        protected HDLImageUtils (IntPtr javaReference, JniHandleOwnership transfer) : base (javaReference, transfer)
        {
        }
 
        // Metadata.xml XPath constructor reference: path="/api/package[@name='com.hdl.hdllinphonesdk.utils']/class[@name='HDLImageUtils']/constructor[@name='HDLImageUtils' and count(parameter)=0]"
        [Register (".ctor", "()V", "")]
        public unsafe HDLImageUtils () : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            const string __id = "()V";
 
            if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
                return;
 
            try {
                var __r = _members.InstanceMethods.StartCreateInstance (__id, ((object) this).GetType (), null);
                SetHandle (__r.Handle, JniHandleOwnership.TransferLocalRef);
                _members.InstanceMethods.FinishCreateInstance (__id, this, null);
            } finally {
            }
        }
 
        // Metadata.xml XPath method reference: path="/api/package[@name='com.hdl.hdllinphonesdk.utils']/class[@name='HDLImageUtils']/method[@name='byteToBitmap' and count(parameter)=1 and parameter[1][@type='byte[]']]"
        [Register ("byteToBitmap", "([B)Landroid/graphics/Bitmap;", "")]
        public static unsafe global::Android.Graphics.Bitmap ByteToBitmap (byte[] imgByte)
        {
            const string __id = "byteToBitmap.([B)Landroid/graphics/Bitmap;";
            IntPtr native_imgByte = JNIEnv.NewArray (imgByte);
            try {
                JniArgumentValue* __args = stackalloc JniArgumentValue [1];
                __args [0] = new JniArgumentValue (native_imgByte);
                var __rm = _members.StaticMethods.InvokeObjectMethod (__id, __args);
                return global::Java.Lang.Object.GetObject<global::Android.Graphics.Bitmap> (__rm.Handle, JniHandleOwnership.TransferLocalRef);
            } finally {
                if (imgByte != null) {
                    JNIEnv.CopyArray (native_imgByte, imgByte);
                    JNIEnv.DeleteLocalRef (native_imgByte);
                }
                global::System.GC.KeepAlive (imgByte);
            }
        }
 
        // Metadata.xml XPath method reference: path="/api/package[@name='com.hdl.hdllinphonesdk.utils']/class[@name='HDLImageUtils']/method[@name='saveImageToGallery' and count(parameter)=2 and parameter[1][@type='android.content.Context'] and parameter[2][@type='android.graphics.Bitmap']]"
        [Register ("saveImageToGallery", "(Landroid/content/Context;Landroid/graphics/Bitmap;)Z", "")]
        public static unsafe bool SaveImageToGallery (global::Android.Content.Context context, global::Android.Graphics.Bitmap bitmap)
        {
            const string __id = "saveImageToGallery.(Landroid/content/Context;Landroid/graphics/Bitmap;)Z";
            try {
                JniArgumentValue* __args = stackalloc JniArgumentValue [2];
                __args [0] = new JniArgumentValue ((context == null) ? IntPtr.Zero : ((global::Java.Lang.Object) context).Handle);
                __args [1] = new JniArgumentValue ((bitmap == null) ? IntPtr.Zero : ((global::Java.Lang.Object) bitmap).Handle);
                var __rm = _members.StaticMethods.InvokeBooleanMethod (__id, __args);
                return __rm;
            } finally {
                global::System.GC.KeepAlive (context);
                global::System.GC.KeepAlive (bitmap);
            }
        }
 
        // Metadata.xml XPath method reference: path="/api/package[@name='com.hdl.hdllinphonesdk.utils']/class[@name='HDLImageUtils']/method[@name='saveImageToGallery' and count(parameter)=2 and parameter[1][@type='android.content.Context'] and parameter[2][@type='byte[]']]"
        [Register ("saveImageToGallery", "(Landroid/content/Context;[B)Z", "")]
        public static unsafe bool SaveImageToGallery (global::Android.Content.Context context, byte[] image_bytes)
        {
            const string __id = "saveImageToGallery.(Landroid/content/Context;[B)Z";
            IntPtr native_image_bytes = JNIEnv.NewArray (image_bytes);
            try {
                JniArgumentValue* __args = stackalloc JniArgumentValue [2];
                __args [0] = new JniArgumentValue ((context == null) ? IntPtr.Zero : ((global::Java.Lang.Object) context).Handle);
                __args [1] = new JniArgumentValue (native_image_bytes);
                var __rm = _members.StaticMethods.InvokeBooleanMethod (__id, __args);
                return __rm;
            } finally {
                if (image_bytes != null) {
                    JNIEnv.CopyArray (native_image_bytes, image_bytes);
                    JNIEnv.DeleteLocalRef (native_image_bytes);
                }
                global::System.GC.KeepAlive (context);
                global::System.GC.KeepAlive (image_bytes);
            }
        }
 
        // Metadata.xml XPath method reference: path="/api/package[@name='com.hdl.hdllinphonesdk.utils']/class[@name='HDLImageUtils']/method[@name='saveSignImage' and count(parameter)=3 and parameter[1][@type='android.content.Context'] and parameter[2][@type='java.lang.String'] and parameter[3][@type='android.graphics.Bitmap']]"
        [Register ("saveSignImage", "(Landroid/content/Context;Ljava/lang/String;Landroid/graphics/Bitmap;)V", "")]
        public static unsafe void SaveSignImage (global::Android.Content.Context context, string fileName, global::Android.Graphics.Bitmap bitmap)
        {
            const string __id = "saveSignImage.(Landroid/content/Context;Ljava/lang/String;Landroid/graphics/Bitmap;)V";
            IntPtr native_fileName = JNIEnv.NewString (fileName);
            try {
                JniArgumentValue* __args = stackalloc JniArgumentValue [3];
                __args [0] = new JniArgumentValue ((context == null) ? IntPtr.Zero : ((global::Java.Lang.Object) context).Handle);
                __args [1] = new JniArgumentValue (native_fileName);
                __args [2] = new JniArgumentValue ((bitmap == null) ? IntPtr.Zero : ((global::Java.Lang.Object) bitmap).Handle);
                _members.StaticMethods.InvokeVoidMethod (__id, __args);
            } finally {
                JNIEnv.DeleteLocalRef (native_fileName);
                global::System.GC.KeepAlive (context);
                global::System.GC.KeepAlive (bitmap);
            }
        }
 
    }
}