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


__jni_bindgen! {
    /// public interface [KeyEvent.Callback](https://developer.android.com/reference/android/view/KeyEvent.Callback.html)
    ///
    /// Required feature: android-view-KeyEvent_Callback
    #[cfg(any(feature = "all", feature = "android-view-KeyEvent_Callback"))]
    public interface KeyEvent_Callback extends crate::java::lang::Object {

        /// [onKeyDown](https://developer.android.com/reference/android/view/KeyEvent.Callback.html#onKeyDown(int,%2520android,%2520view,%2520KeyEvent))
        ///
        /// Required features: "android-view-KeyEvent"
        #[cfg(any(feature = "all", all(feature = "android-view-KeyEvent")))]
        pub fn on_key_down<'env>(&'env self, arg0: i32, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::view::KeyEvent>>) -> __jni_bindgen::Result<bool> {
            // class.path == "android/view/KeyEvent$Callback", java.flags == PUBLIC | ABSTRACT, .name == "onKeyDown", .descriptor == "(ILandroid/view/KeyEvent;)Z"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __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/view/KeyEvent$Callback\0", "onKeyDown\0", "(ILandroid/view/KeyEvent;)Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [onKeyLongPress](https://developer.android.com/reference/android/view/KeyEvent.Callback.html#onKeyLongPress(int,%2520android,%2520view,%2520KeyEvent))
        ///
        /// Required features: "android-view-KeyEvent"
        #[cfg(any(feature = "all", all(feature = "android-view-KeyEvent")))]
        pub fn on_key_long_press<'env>(&'env self, arg0: i32, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::view::KeyEvent>>) -> __jni_bindgen::Result<bool> {
            // class.path == "android/view/KeyEvent$Callback", java.flags == PUBLIC | ABSTRACT, .name == "onKeyLongPress", .descriptor == "(ILandroid/view/KeyEvent;)Z"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __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/view/KeyEvent$Callback\0", "onKeyLongPress\0", "(ILandroid/view/KeyEvent;)Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [onKeyUp](https://developer.android.com/reference/android/view/KeyEvent.Callback.html#onKeyUp(int,%2520android,%2520view,%2520KeyEvent))
        ///
        /// Required features: "android-view-KeyEvent"
        #[cfg(any(feature = "all", all(feature = "android-view-KeyEvent")))]
        pub fn on_key_up<'env>(&'env self, arg0: i32, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::view::KeyEvent>>) -> __jni_bindgen::Result<bool> {
            // class.path == "android/view/KeyEvent$Callback", java.flags == PUBLIC | ABSTRACT, .name == "onKeyUp", .descriptor == "(ILandroid/view/KeyEvent;)Z"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __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/view/KeyEvent$Callback\0", "onKeyUp\0", "(ILandroid/view/KeyEvent;)Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [onKeyMultiple](https://developer.android.com/reference/android/view/KeyEvent.Callback.html#onKeyMultiple(int,%2520int,%2520android,%2520view,%2520KeyEvent))
        ///
        /// Required features: "android-view-KeyEvent"
        #[cfg(any(feature = "all", all(feature = "android-view-KeyEvent")))]
        pub fn on_key_multiple<'env>(&'env self, arg0: i32, arg1: i32, arg2: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::android::view::KeyEvent>>) -> __jni_bindgen::Result<bool> {
            // class.path == "android/view/KeyEvent$Callback", java.flags == PUBLIC | ABSTRACT, .name == "onKeyMultiple", .descriptor == "(IILandroid/view/KeyEvent;)Z"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __jni_bindgen::AsJValue::as_jvalue(&arg1), __jni_bindgen::AsJValue::as_jvalue(&arg2.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("android/view/KeyEvent$Callback\0", "onKeyMultiple\0", "(IILandroid/view/KeyEvent;)Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }
    }
}