use crate::core::FourCharCode;
use std::fmt;
#[repr(transparent)]
#[derive(Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash)]
pub struct AEEventClass(pub FourCharCode);
impl fmt::Debug for AEEventClass {
#[inline]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
self.0.fmt(f)
}
}
impl AEEventClass {
#[inline]
pub const fn from_int(int: u32) -> Self {
Self(FourCharCode::from_int(int))
}
#[inline]
pub const fn from_chars(chars: [u8; 4]) -> Self {
Self(FourCharCode::from_chars(chars))
}
#[inline]
pub const fn into_int(self) -> u32 {
self.0.into_int()
}
#[inline]
pub const fn into_chars(self) -> [u8; 4] {
self.0.into_chars()
}
}
impl AEEventClass {
#[doc(alias = "kCoreEventClass")]
pub const CORE: Self = Self::from_chars(*b"aevt");
}
impl AEEventClass {
#[doc(alias = "kEventClassMouse")]
pub const MOUSE: Self = Self::from_chars(*b"mous");
#[doc(alias = "kEventClassKeyboard")]
pub const KEYBOARD: Self = Self::from_chars(*b"keyb");
#[doc(alias = "kEventClassTextInput")]
pub const TEXT_INPUT: Self = Self::from_chars(*b"text");
#[doc(alias = "kEventClassApplication")]
pub const APPLICATION: Self = Self::from_chars(*b"appl");
#[doc(alias = "kEventClassAppleEvent")]
pub const APPLE_EVENT: Self = Self::from_chars(*b"eppc");
#[doc(alias = "kEventClassMenu")]
pub const MENU: Self = Self::from_chars(*b"menu");
#[doc(alias = "kEventClassWindow")]
pub const WINDOW: Self = Self::from_chars(*b"wind");
#[doc(alias = "kEventClassControl")]
pub const CONTROL: Self = Self::from_chars(*b"cntl");
#[doc(alias = "kEventClassCommand")]
pub const COMMAND: Self = Self::from_chars(*b"cmds");
#[doc(alias = "kEventClassTablet")]
pub const TABLET: Self = Self::from_chars(*b"tblt");
#[doc(alias = "kEventClassVolume")]
pub const VOLUME: Self = Self::from_chars(*b"vol ");
#[doc(alias = "kEventClassAppearance")]
pub const APPEARANCE_MANAGER: Self = Self::from_chars(*b"appm");
#[doc(alias = "kEventClassService")]
pub const SERVICE: Self = Self::from_chars(*b"serv");
#[doc(alias = "kEventClassToolbar")]
pub const TOOLBAR: Self = Self::from_chars(*b"tbar");
#[doc(alias = "kEventClassToolbarItem")]
pub const TOOLBAR_ITEM: Self = Self::from_chars(*b"tbit");
#[doc(alias = "kEventClassToolbarItemView")]
pub const TOOLBAR_ITEM_VIEW: Self = Self::from_chars(*b"tbiv");
#[doc(alias = "kEventClassAccessibility")]
pub const ACCESSIBILITY: Self = Self::from_chars(*b"acce");
#[doc(alias = "kEventClassSystem")]
pub const SYSTEM: Self = Self::from_chars(*b"macs");
#[doc(alias = "kEventClassInk")]
pub const INK: Self = Self::from_chars(*b"ink ");
#[doc(alias = "kEventClassTSMDocumentAccess")]
pub const TSM_DOCUMENT_ACCESS: Self = Self::from_chars(*b"tdac");
#[doc(alias = "kEventClassGesture")]
pub const GESTURE: Self = Self::from_chars(*b"gest");
#[doc(alias = "kEventClassClockView")]
pub const CLOCK_VIEW: Self = Self::from_chars(*b"cloc");
#[doc(alias = "kEventClassTextField")]
pub const TEXT_FIELD: Self = Self::from_chars(*b"txfd");
#[doc(alias = "kEventClassHIObject")]
pub const HI_OBJECT: Self = Self::from_chars(*b"hiob");
#[doc(alias = "kEventClassDelegate")]
pub const DELEGATE: Self = Self::from_chars(*b"dele");
#[doc(alias = "kEventClassScrollable")]
pub const SCROLLABLE: Self = Self::from_chars(*b"scrl");
#[doc(alias = "kEventClassHIComboBox")]
pub const HI_COMBO_BOX: Self = Self::from_chars(*b"hicb");
#[doc(alias = "kEventClassSearchField")]
pub const SEARCH_FIELD: Self = Self::from_chars(*b"srfd");
#[doc(alias = "kAppearanceEventClass")]
pub const APPEARANCE: Self = Self::from_chars(*b"appr");
#[doc(alias = "kEventClassDataBrowser")]
pub const DATA_BROWSER: Self = Self::from_chars(*b"hidb");
}
impl AEEventClass {
#[doc(alias = "kInternetEventClass")]
pub const INTERNET: Self = Self::from_chars(*b"GURL");
#[doc(alias = "kICEditPreferenceEventClass")]
pub const IC_EDIT_PREFERENCE: Self = Self::from_chars(*b"ICAp");
}
impl AEEventClass {
#[doc(alias = "kDigiHubEventClass")]
pub const DIGI_HUB: Self = Self::from_chars(*b"dhub");
}
impl AEEventClass {
#[doc(alias = "kEventClassFont")]
pub const FONT: Self = Self::from_chars(*b"font");
}
impl AEEventClass {
#[doc(alias = "kEventClassABPeoplePicker")]
pub const AB_PEOPLE_PICKER: Self = Self::from_chars(*b"abpp");
}