objc2_application_services/generated/HIServices/
AXError.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3#[cfg(feature = "objc2")]
4use objc2::__framework_prelude::*;
5
6use crate::*;
7
8/// Error codes returned by accessibility functions.
9///
10/// See also [Apple's documentation](https://developer.apple.com/documentation/applicationservices/axerror?language=objc)
11// NS_ENUM
12#[repr(transparent)]
13#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
14pub struct AXError(pub i32);
15impl AXError {
16    /// No error occurred.
17    #[doc(alias = "kAXErrorSuccess")]
18    pub const Success: Self = Self(0);
19    /// A system error occurred, such as the failure to allocate an object.
20    #[doc(alias = "kAXErrorFailure")]
21    pub const Failure: Self = Self(-25200);
22    /// An illegal argument was passed to the function.
23    #[doc(alias = "kAXErrorIllegalArgument")]
24    pub const IllegalArgument: Self = Self(-25201);
25    /// The AXUIElementRef passed to the function is invalid.
26    #[doc(alias = "kAXErrorInvalidUIElement")]
27    pub const InvalidUIElement: Self = Self(-25202);
28    /// The AXObserverRef passed to the function is not a valid observer.
29    #[doc(alias = "kAXErrorInvalidUIElementObserver")]
30    pub const InvalidUIElementObserver: Self = Self(-25203);
31    /// The function cannot complete because messaging failed in some way or because the application with which the function is communicating is busy or unresponsive.
32    #[doc(alias = "kAXErrorCannotComplete")]
33    pub const CannotComplete: Self = Self(-25204);
34    /// The attribute is not supported by the AXUIElementRef.
35    #[doc(alias = "kAXErrorAttributeUnsupported")]
36    pub const AttributeUnsupported: Self = Self(-25205);
37    /// The action is not supported by the AXUIElementRef.
38    #[doc(alias = "kAXErrorActionUnsupported")]
39    pub const ActionUnsupported: Self = Self(-25206);
40    /// The notification is not supported by the AXUIElementRef.
41    #[doc(alias = "kAXErrorNotificationUnsupported")]
42    pub const NotificationUnsupported: Self = Self(-25207);
43    /// Indicates that the function or method is not implemented (this can be returned if a process does not support the accessibility API).
44    #[doc(alias = "kAXErrorNotImplemented")]
45    pub const NotImplemented: Self = Self(-25208);
46    /// This notification has already been registered for.
47    #[doc(alias = "kAXErrorNotificationAlreadyRegistered")]
48    pub const NotificationAlreadyRegistered: Self = Self(-25209);
49    /// Indicates that a notification is not registered yet.
50    #[doc(alias = "kAXErrorNotificationNotRegistered")]
51    pub const NotificationNotRegistered: Self = Self(-25210);
52    /// The accessibility API is disabled (as when, for example, the user deselects "Enable access for assistive devices" in Universal Access Preferences).
53    #[doc(alias = "kAXErrorAPIDisabled")]
54    pub const APIDisabled: Self = Self(-25211);
55    /// The requested value or AXUIElementRef does not exist.
56    #[doc(alias = "kAXErrorNoValue")]
57    pub const NoValue: Self = Self(-25212);
58    /// The parameterized attribute is not supported by the AXUIElementRef.
59    #[doc(alias = "kAXErrorParameterizedAttributeUnsupported")]
60    pub const ParameterizedAttributeUnsupported: Self = Self(-25213);
61    /// Not enough precision.
62    #[doc(alias = "kAXErrorNotEnoughPrecision")]
63    pub const NotEnoughPrecision: Self = Self(-25214);
64}
65
66#[cfg(feature = "objc2")]
67unsafe impl Encode for AXError {
68    const ENCODING: Encoding = i32::ENCODING;
69}
70
71#[cfg(feature = "objc2")]
72unsafe impl RefEncode for AXError {
73    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
74}