objc2_browser_engine_kit/generated/
BEKeyEntryContext.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/browserenginekit/bekeyentrycontext?language=objc)
11    #[unsafe(super(NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    pub struct BEKeyEntryContext;
14);
15
16extern_conformance!(
17    unsafe impl NSObjectProtocol for BEKeyEntryContext {}
18);
19
20impl BEKeyEntryContext {
21    extern_methods!(
22        #[cfg(feature = "BEKeyEntry")]
23        /// BEKeyEntry for which this context is representing.
24        #[unsafe(method(keyEntry))]
25        #[unsafe(method_family = none)]
26        pub unsafe fn keyEntry(&self) -> Retained<BEKeyEntry>;
27
28        /// Represents whether the web document is editable
29        #[unsafe(method(isDocumentEditable))]
30        #[unsafe(method_family = none)]
31        pub unsafe fn isDocumentEditable(&self) -> bool;
32
33        /// Setter for [`isDocumentEditable`][Self::isDocumentEditable].
34        #[unsafe(method(setDocumentEditable:))]
35        #[unsafe(method_family = none)]
36        pub unsafe fn setDocumentEditable(&self, document_editable: bool);
37
38        /// Represents whether a character should be inserted.
39        #[unsafe(method(shouldInsertCharacter))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn shouldInsertCharacter(&self) -> bool;
42
43        /// Setter for [`shouldInsertCharacter`][Self::shouldInsertCharacter].
44        #[unsafe(method(setShouldInsertCharacter:))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn setShouldInsertCharacter(&self, should_insert_character: bool);
47
48        /// Represents whether the key event should be evaluated within the context of a composed input mode.
49        ///
50        /// When using an input mode with composed input, such as Chinese/Japanese/Korean, the markedText
51        /// will be used to combine multiple key events into a single character.
52        #[unsafe(method(shouldEvaluateForInputSystemHandling))]
53        #[unsafe(method_family = none)]
54        pub unsafe fn shouldEvaluateForInputSystemHandling(&self) -> bool;
55
56        /// Setter for [`shouldEvaluateForInputSystemHandling`][Self::shouldEvaluateForInputSystemHandling].
57        #[unsafe(method(setShouldEvaluateForInputSystemHandling:))]
58        #[unsafe(method_family = none)]
59        pub unsafe fn setShouldEvaluateForInputSystemHandling(
60            &self,
61            should_evaluate_for_input_system_handling: bool,
62        );
63
64        #[cfg(feature = "BEKeyEntry")]
65        /// Initializes an instance of BEKeyEventContext with its corresponding `keyState`
66        #[unsafe(method(initWithKeyEntry:))]
67        #[unsafe(method_family = init)]
68        pub unsafe fn initWithKeyEntry(
69            this: Allocated<Self>,
70            key_entry: &BEKeyEntry,
71        ) -> Retained<Self>;
72
73        #[unsafe(method(init))]
74        #[unsafe(method_family = init)]
75        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
76
77        #[unsafe(method(new))]
78        #[unsafe(method_family = new)]
79        pub unsafe fn new() -> Retained<Self>;
80    );
81}