objc2_accessibility/generated/
AXSettings.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::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10#[inline]
11pub unsafe extern "C-unwind" fn AXPrefersHorizontalTextLayout() -> bool {
12    extern "C-unwind" {
13        fn AXPrefersHorizontalTextLayout() -> Bool;
14    }
15    unsafe { AXPrefersHorizontalTextLayout() }.as_bool()
16}
17
18extern "C" {
19    /// [Apple's documentation](https://developer.apple.com/documentation/accessibility/axprefershorizontaltextlayoutdidchangenotification?language=objc)
20    pub static AXPrefersHorizontalTextLayoutDidChangeNotification: &'static NSNotificationName;
21}
22
23#[inline]
24pub unsafe extern "C-unwind" fn AXAnimatedImagesEnabled() -> bool {
25    extern "C-unwind" {
26        fn AXAnimatedImagesEnabled() -> Bool;
27    }
28    unsafe { AXAnimatedImagesEnabled() }.as_bool()
29}
30
31extern "C" {
32    /// [Apple's documentation](https://developer.apple.com/documentation/accessibility/axanimatedimagesenableddidchangenotification?language=objc)
33    pub static AXAnimatedImagesEnabledDidChangeNotification: &'static NSNotificationName;
34}
35
36/// Returns whether Assistive Access is running.
37/// The value does not change during a process's lifetime, so it is not necessary to observe changes.
38#[inline]
39pub unsafe extern "C-unwind" fn AXAssistiveAccessEnabled() -> bool {
40    extern "C-unwind" {
41        fn AXAssistiveAccessEnabled() -> Bool;
42    }
43    unsafe { AXAssistiveAccessEnabled() }.as_bool()
44}
45
46#[inline]
47pub unsafe extern "C-unwind" fn AXPrefersNonBlinkingTextInsertionIndicator() -> bool {
48    extern "C-unwind" {
49        fn AXPrefersNonBlinkingTextInsertionIndicator() -> Bool;
50    }
51    unsafe { AXPrefersNonBlinkingTextInsertionIndicator() }.as_bool()
52}
53
54extern "C" {
55    /// [Apple's documentation](https://developer.apple.com/documentation/accessibility/axprefersnonblinkingtextinsertionindicatordidchangenotification?language=objc)
56    pub static AXPrefersNonBlinkingTextInsertionIndicatorDidChangeNotification:
57        &'static NSNotificationName;
58}
59
60/// [Apple's documentation](https://developer.apple.com/documentation/accessibility/axsettingsfeature?language=objc)
61// NS_ENUM
62#[repr(transparent)]
63#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
64pub struct AXSettingsFeature(pub NSInteger);
65impl AXSettingsFeature {
66    #[doc(alias = "AXSettingsFeaturePersonalVoiceAllowAppsToRequestToUse")]
67    pub const PersonalVoiceAllowAppsToRequestToUse: Self = Self(1);
68    #[doc(alias = "AXSettingsFeatureAllowAppsToAddAudioToCalls")]
69    pub const AllowAppsToAddAudioToCalls: Self = Self(2);
70}
71
72unsafe impl Encode for AXSettingsFeature {
73    const ENCODING: Encoding = NSInteger::ENCODING;
74}
75
76unsafe impl RefEncode for AXSettingsFeature {
77    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
78}
79
80extern "C-unwind" {
81    #[cfg(feature = "block2")]
82    pub fn AXOpenSettingsFeature(
83        feature: AXSettingsFeature,
84        completion_handler: Option<&block2::DynBlock<dyn Fn(*mut NSError)>>,
85    );
86}