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
// WARNING:  This file was autogenerated by jni-bindgen.  Any changes to this file may be lost!!!


#[cfg(any(feature = "all", feature = "android-media-projection-MediaProjection"))]
__jni_bindgen! {
    /// public final class [MediaProjection](https://developer.android.com/reference/android/media/projection/MediaProjection.html)
    ///
    /// Required feature: "android-media-projection-MediaProjection"
    public final class MediaProjection ("android/media/projection/MediaProjection") extends crate::java::lang::Object {

        /// [registerCallback](https://developer.android.com/reference/android/media/projection/MediaProjection.html#registerCallback(android.media.projection.MediaProjection.Callback,%20android.os.Handler))
        ///
        /// Required features: "android-media-projection-MediaProjection_Callback", "android-os-Handler"
        #[cfg(any(feature = "all", all(feature = "android-media-projection-MediaProjection_Callback", feature = "android-os-Handler")))]
        pub fn registerCallback<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::media::projection::MediaProjection_Callback>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::os::Handler>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/media/projection/MediaProjection", java.flags == PUBLIC, .name == "registerCallback", .descriptor == "(Landroid/media/projection/MediaProjection$Callback;Landroid/os/Handler;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/media/projection/MediaProjection\0", "registerCallback\0", "(Landroid/media/projection/MediaProjection$Callback;Landroid/os/Handler;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [unregisterCallback](https://developer.android.com/reference/android/media/projection/MediaProjection.html#unregisterCallback(android.media.projection.MediaProjection.Callback))
        ///
        /// Required features: "android-media-projection-MediaProjection_Callback"
        #[cfg(any(feature = "all", all(feature = "android-media-projection-MediaProjection_Callback")))]
        pub fn unregisterCallback<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::media::projection::MediaProjection_Callback>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/media/projection/MediaProjection", java.flags == PUBLIC, .name == "unregisterCallback", .descriptor == "(Landroid/media/projection/MediaProjection$Callback;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/media/projection/MediaProjection\0", "unregisterCallback\0", "(Landroid/media/projection/MediaProjection$Callback;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [createVirtualDisplay](https://developer.android.com/reference/android/media/projection/MediaProjection.html#createVirtualDisplay(java.lang.String,%20int,%20int,%20int,%20int,%20android.view.Surface,%20android.hardware.display.VirtualDisplay.Callback,%20android.os.Handler))
        ///
        /// Required features: "android-hardware-display-VirtualDisplay", "android-hardware-display-VirtualDisplay_Callback", "android-os-Handler", "android-view-Surface", "java-lang-String"
        #[cfg(any(feature = "all", all(feature = "android-hardware-display-VirtualDisplay", feature = "android-hardware-display-VirtualDisplay_Callback", feature = "android-os-Handler", feature = "android-view-Surface", feature = "java-lang-String")))]
        pub fn createVirtualDisplay<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::String>>, arg1: i32, arg2: i32, arg3: i32, arg4: i32, arg5: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::view::Surface>>, arg6: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::hardware::display::VirtualDisplay_Callback>>, arg7: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::os::Handler>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::android::hardware::display::VirtualDisplay>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/media/projection/MediaProjection", java.flags == PUBLIC, .name == "createVirtualDisplay", .descriptor == "(Ljava/lang/String;IIIILandroid/view/Surface;Landroid/hardware/display/VirtualDisplay$Callback;Landroid/os/Handler;)Landroid/hardware/display/VirtualDisplay;"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1), __jni_bindgen::AsJValue::as_jvalue(&arg2), __jni_bindgen::AsJValue::as_jvalue(&arg3), __jni_bindgen::AsJValue::as_jvalue(&arg4), __jni_bindgen::AsJValue::as_jvalue(&arg5.into()), __jni_bindgen::AsJValue::as_jvalue(&arg6.into()), __jni_bindgen::AsJValue::as_jvalue(&arg7.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/media/projection/MediaProjection\0", "createVirtualDisplay\0", "(Ljava/lang/String;IIIILandroid/view/Surface;Landroid/hardware/display/VirtualDisplay$Callback;Landroid/os/Handler;)Landroid/hardware/display/VirtualDisplay;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [stop](https://developer.android.com/reference/android/media/projection/MediaProjection.html#stop())
        pub fn stop<'env>(&'env self) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "android/media/projection/MediaProjection", java.flags == PUBLIC, .name == "stop", .descriptor == "()V"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/media/projection/MediaProjection\0", "stop\0", "()V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }
    }
}