|
| 1 | +[Register ("com/xamarin/android/MyInterface", DoNotGenerateAcw=true)] |
| 2 | +public abstract class MyInterface : Java.Lang.Object { |
| 3 | + internal MyInterface () |
| 4 | + { |
| 5 | + } |
| 6 | + |
| 7 | + // Metadata.xml XPath field reference: path="/api/package[@name='com.xamarin.android']/interface[@name='MyInterface']/field[@name='EGL_NATIVE_VISUAL_ID']" |
| 8 | + [Register ("EGL_NATIVE_VISUAL_ID")] |
| 9 | + public const int EglNativeVisualId = (int) 12334; |
| 10 | + |
| 11 | + |
| 12 | + // Metadata.xml XPath field reference: path="/api/package[@name='com.xamarin.android']/interface[@name='MyInterface']/field[@name='EGL_NO_SURFACE']" |
| 13 | + [Register ("EGL_NO_SURFACE")] |
| 14 | + public static int EglNoSurface { |
| 15 | + get { |
| 16 | + const string __id = "EGL_NO_SURFACE.I"; |
| 17 | + |
| 18 | + var __v = _members.StaticFields.GetInt32Value (__id); |
| 19 | + return __v; |
| 20 | + } |
| 21 | + set { |
| 22 | + const string __id = "EGL_NO_SURFACE.I"; |
| 23 | + |
| 24 | + try { |
| 25 | + _members.StaticFields.SetValue (__id, value); |
| 26 | + } finally { |
| 27 | + } |
| 28 | + } |
| 29 | + } |
| 30 | + |
| 31 | + static readonly JniPeerMembers _members = new JniPeerMembers ("com/xamarin/android/MyInterface", typeof (MyInterface)); |
| 32 | + |
| 33 | +} |
| 34 | + |
| 35 | +[Register ("com/xamarin/android/MyInterface", DoNotGenerateAcw=true)] |
| 36 | +[global::System.Obsolete ("Use the 'MyInterface' type. This type will be removed in a future release.", error: true)] |
| 37 | +public abstract class MyInterfaceConsts : MyInterface { |
| 38 | + private MyInterfaceConsts () |
| 39 | + { |
| 40 | + } |
| 41 | + |
| 42 | +} |
| 43 | + |
| 44 | +// Metadata.xml XPath interface reference: path="/api/package[@name='com.xamarin.android']/interface[@name='MyInterface']" |
| 45 | +[Register ("com/xamarin/android/MyInterface", "", "Com.Xamarin.Android.IMyInterfaceInvoker")] |
| 46 | +public partial interface IMyInterface : IJavaObject, IJavaPeerable { |
| 47 | + private static readonly JniPeerMembers _members = new JniPeerMembers ("com/xamarin/android/MyInterface", typeof (IMyInterface), isInterface: true); |
| 48 | + |
| 49 | + |
| 50 | + // Metadata.xml XPath field reference: path="/api/package[@name='com.xamarin.android']/interface[@name='MyInterface']/field[@name='EGL_NO_SURFACE']" |
| 51 | + [Register ("EGL_NO_SURFACE")] |
| 52 | + public static int EglNoSurface { |
| 53 | + get { |
| 54 | + const string __id = "EGL_NO_SURFACE.I"; |
| 55 | + |
| 56 | + var __v = _members.StaticFields.GetInt32Value (__id); |
| 57 | + return __v; |
| 58 | + } |
| 59 | + set { |
| 60 | + const string __id = "EGL_NO_SURFACE.I"; |
| 61 | + |
| 62 | + try { |
| 63 | + _members.StaticFields.SetValue (__id, value); |
| 64 | + } finally { |
| 65 | + } |
| 66 | + } |
| 67 | + } |
| 68 | + |
| 69 | +} |
| 70 | + |
| 71 | +[global::Android.Runtime.Register ("com/xamarin/android/MyInterface", DoNotGenerateAcw=true)] |
| 72 | +internal partial class IMyInterfaceInvoker : global::Java.Lang.Object, IMyInterface { |
| 73 | + static readonly JniPeerMembers _members = new JniPeerMembers ("com/xamarin/android/MyInterface", typeof (IMyInterfaceInvoker)); |
| 74 | + |
| 75 | + static IntPtr java_class_ref { |
| 76 | + get { return _members.JniPeerType.PeerReference.Handle; } |
| 77 | + } |
| 78 | + |
| 79 | + [global::System.Diagnostics.DebuggerBrowsable (global::System.Diagnostics.DebuggerBrowsableState.Never)] |
| 80 | + [global::System.ComponentModel.EditorBrowsable (global::System.ComponentModel.EditorBrowsableState.Never)] |
| 81 | + public override global::Java.Interop.JniPeerMembers JniPeerMembers { |
| 82 | + get { return _members; } |
| 83 | + } |
| 84 | + |
| 85 | + [global::System.Diagnostics.DebuggerBrowsable (global::System.Diagnostics.DebuggerBrowsableState.Never)] |
| 86 | + [global::System.ComponentModel.EditorBrowsable (global::System.ComponentModel.EditorBrowsableState.Never)] |
| 87 | + protected override IntPtr ThresholdClass { |
| 88 | + get { return class_ref; } |
| 89 | + } |
| 90 | + |
| 91 | + [global::System.Diagnostics.DebuggerBrowsable (global::System.Diagnostics.DebuggerBrowsableState.Never)] |
| 92 | + [global::System.ComponentModel.EditorBrowsable (global::System.ComponentModel.EditorBrowsableState.Never)] |
| 93 | + protected override global::System.Type ThresholdType { |
| 94 | + get { return _members.ManagedPeerType; } |
| 95 | + } |
| 96 | + |
| 97 | + IntPtr class_ref; |
| 98 | + |
| 99 | + public static IMyInterface GetObject (IntPtr handle, JniHandleOwnership transfer) |
| 100 | + { |
| 101 | + return global::Java.Lang.Object.GetObject<IMyInterface> (handle, transfer); |
| 102 | + } |
| 103 | + |
| 104 | + static IntPtr Validate (IntPtr handle) |
| 105 | + { |
| 106 | + if (!JNIEnv.IsInstanceOf (handle, java_class_ref)) |
| 107 | + throw new InvalidCastException ($"Unable to convert instance of type '{JNIEnv.GetClassNameFromInstance (handle)}' to type 'com.xamarin.android.MyInterface'."); |
| 108 | + return handle; |
| 109 | + } |
| 110 | + |
| 111 | + protected override void Dispose (bool disposing) |
| 112 | + { |
| 113 | + if (this.class_ref != IntPtr.Zero) |
| 114 | + JNIEnv.DeleteGlobalRef (this.class_ref); |
| 115 | + this.class_ref = IntPtr.Zero; |
| 116 | + base.Dispose (disposing); |
| 117 | + } |
| 118 | + |
| 119 | + public IMyInterfaceInvoker (IntPtr handle, JniHandleOwnership transfer) : base (Validate (handle), transfer) |
| 120 | + { |
| 121 | + IntPtr local_ref = JNIEnv.GetObjectClass (((global::Java.Lang.Object) this).Handle); |
| 122 | + this.class_ref = JNIEnv.NewGlobalRef (local_ref); |
| 123 | + JNIEnv.DeleteLocalRef (local_ref); |
| 124 | + } |
| 125 | + |
| 126 | +} |
0 commit comments