diff --git a/header-translator/Cargo.toml b/header-translator/Cargo.toml index f8fcdd9fd..c34771e4c 100644 --- a/header-translator/Cargo.toml +++ b/header-translator/Cargo.toml @@ -12,4 +12,3 @@ clang = { version = "2.0", features = ["runtime", "clang_10_0"] } toml = "0.5.9" serde = { version = "1.0.144", features = ["derive"] } apple-sdk = { version = "0.2.0" } -cexpr = "0.6.0" diff --git a/header-translator/src/expr.rs b/header-translator/src/expr.rs index 9f4ed4497..c254cb526 100644 --- a/header-translator/src/expr.rs +++ b/header-translator/src/expr.rs @@ -1,24 +1,37 @@ -use std::collections::HashMap; use std::fmt; -use std::num::Wrapping; +use std::fmt::Write; -use cexpr::expr::EvalResult; -use clang::token::{Token, TokenKind}; +use clang::token::TokenKind; use clang::{Entity, EntityKind, EntityVisitResult}; use crate::unexposed_macro::UnexposedMacro; #[derive(Clone, Debug, PartialEq)] -pub enum Expr { - Parsed(EvalResult), - DeclRef(String), - Todo, +pub struct Expr { + s: String, } -pub type Identifiers = HashMap, EvalResult>; - impl Expr { - pub fn parse(entity: &Entity<'_>, identifiers: &Identifiers) -> Option { + pub fn from_val((signed, unsigned): (i64, u64), is_signed: bool) -> Self { + let s = if is_signed { + format!("{}", signed) + } else { + format!("{}", unsigned) + }; + Expr { s } + } + + pub fn parse_enum_constant(entity: &Entity<'_>) -> Option { + let mut declaration_references = Vec::new(); + + entity.visit_children(|entity, _parent| { + if let EntityKind::DeclRefExpr = entity.get_kind() { + let name = entity.get_name().expect("expr decl ref name"); + declaration_references.push(name); + } + EntityVisitResult::Recurse + }); + let mut res = None; entity.visit_children(|entity, _parent| { @@ -28,77 +41,69 @@ impl Expr { panic!("parsed macro in expr: {macro_:?}, {entity:?}"); } } - EntityKind::UnexposedExpr => { - return EntityVisitResult::Recurse; - } - EntityKind::UnaryOperator - | EntityKind::IntegerLiteral - | EntityKind::ParenExpr - | EntityKind::BinaryOperator => { - if res.is_some() { - panic!("found multiple matching children in expr"); - } - let range = entity.get_range().expect("expr range"); - let tokens = range.tokenize(); - let tokens: Vec<_> = tokens.into_iter().filter_map(as_cexpr_token).collect(); - let parser = cexpr::expr::IdentifierParser::new(identifiers); - match parser.expr(&tokens) { - Ok((remaining_tokens, evaluated)) if remaining_tokens.is_empty() => { - res = Some(Self::Parsed(evaluated)); - } - _ => res = Some(Self::Todo), - } - } - EntityKind::DeclRefExpr => { - if res.is_some() { - panic!("found multiple matching children in expr"); + _ => { + if res.is_none() { + res = Self::parse(&entity, &declaration_references); + } else { + panic!("found multiple expressions where one was expected"); } - let name = entity.get_name().expect("expr decl ref"); - res = Some(Self::DeclRef(name)); } - kind => panic!("unknown expr kind {kind:?}"), } EntityVisitResult::Continue }); res } -} -impl fmt::Display for Expr { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - match self { - Self::Parsed(evaluated) => match evaluated { - EvalResult::Int(Wrapping(n)) => write!(f, "{n}"), - EvalResult::Float(n) => write!(f, "{n}"), - rest => panic!("invalid expr eval result {rest:?}"), - }, - Self::DeclRef(s) => write!(f, "Self::{}", s), - Self::Todo => write!(f, "todo"), + pub fn parse(entity: &Entity<'_>, declaration_references: &[String]) -> Option { + let range = entity.get_range().expect("expr range"); + let tokens = range.tokenize(); + + if tokens.is_empty() { + // TODO: Find a better way to parse macros + return None; } - } -} -/// Converts a clang::Token to a `cexpr` token if possible. -/// -/// Taken from `bindgen`. -pub fn as_cexpr_token(t: Token<'_>) -> Option { - use cexpr::token; + let mut s = String::new(); - let kind = match t.get_kind() { - TokenKind::Punctuation => token::Kind::Punctuation, - TokenKind::Literal => token::Kind::Literal, - TokenKind::Identifier => token::Kind::Identifier, - TokenKind::Keyword => token::Kind::Keyword, - // NB: cexpr is not too happy about comments inside - // expressions, so we strip them down here. - TokenKind::Comment => return None, - }; + for token in &tokens { + match (token.get_kind(), token.get_spelling()) { + (TokenKind::Identifier, ident) => { + if declaration_references.contains(&ident) { + // TODO: Handle these specially when we need to + } + write!(s, "{}", ident).unwrap(); + } + (TokenKind::Literal, lit) => { + let lit = lit + .trim_end_matches("UL") + .trim_end_matches("L") + .trim_end_matches("u") + .trim_end_matches("U"); + let lit = lit.replace("0X", "0x"); + write!(s, "{}", lit).unwrap(); + } + (TokenKind::Punctuation, punct) => { + match &*punct { + // These have the same semantics in C and Rust + "(" | ")" | "<<" | "-" | "+" | "|" | "&" | "^" => { + write!(s, "{}", punct).unwrap() + } + // Bitwise not + "~" => write!(s, "!").unwrap(), + punct => panic!("unknown expr punctuation {punct}"), + } + } + (kind, spelling) => panic!("unknown expr token {kind:?}/{spelling}"), + } + } - let spelling: Vec = t.get_spelling().into(); + Some(Self { s }) + } +} - Some(token::Token { - kind, - raw: spelling.into_boxed_slice(), - }) +impl fmt::Display for Expr { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{}", self.s) + } } diff --git a/header-translator/src/stmt.rs b/header-translator/src/stmt.rs index 728943a4c..16fe8f879 100644 --- a/header-translator/src/stmt.rs +++ b/header-translator/src/stmt.rs @@ -206,7 +206,7 @@ pub enum Stmt { name: Option, ty: RustType, kind: Option, - variants: Vec<(String, (i64, u64))>, + variants: Vec<(String, Expr)>, }, /// typedef Type TypedefName; AliasDecl { name: String, type_: RustType }, @@ -377,8 +377,9 @@ impl Stmt { } let name = entity.get_name(); - let ty = - RustType::parse_enum(entity.get_enum_underlying_type().expect("enum type")); + let ty = entity.get_enum_underlying_type().expect("enum type"); + let is_signed = ty.is_signed_integer(); + let ty = RustType::parse_enum(ty); let mut kind = None; let mut variants = Vec::new(); @@ -389,8 +390,9 @@ impl Stmt { let val = entity .get_enum_constant_value() .expect("enum constant value"); - let _expr = Expr::parse(&entity, &std::collections::HashMap::new()); - variants.push((name, val)); + let expr = Expr::parse_enum_constant(&entity) + .unwrap_or_else(|| Expr::from_val(val, is_signed)); + variants.push((name, expr)); } EntityKind::UnexposedAttr => { if let Some(macro_) = UnexposedMacro::parse(&entity) { @@ -580,12 +582,12 @@ impl fmt::Display for Stmt { } => { if let Some(name) = name { writeln!(f, "pub type {name} = {ty};")?; - for (variant_name, (signed_val, _unsigned_val)) in variants { - writeln!(f, "pub const {variant_name}: {name} = {signed_val};")?; + for (variant_name, expr) in variants { + writeln!(f, "pub const {variant_name}: {name} = {expr};")?; } } else { - for (variant_name, (signed_val, _unsigned_val)) in variants { - writeln!(f, "pub const {variant_name}: i32 = {signed_val};")?; + for (variant_name, expr) in variants { + writeln!(f, "pub const {variant_name}: i32 = {expr};")?; } } } diff --git a/icrate/src/AppKit/generated/NSApplication.rs b/icrate/src/AppKit/generated/NSApplication.rs index 61587f528..2d8e55629 100644 --- a/icrate/src/AppKit/generated/NSApplication.rs +++ b/icrate/src/AppKit/generated/NSApplication.rs @@ -11,28 +11,30 @@ pub const NSUpdateWindowsRunLoopOrdering: i32 = 500000; pub type NSApplicationPresentationOptions = NSUInteger; pub const NSApplicationPresentationDefault: NSApplicationPresentationOptions = 0; -pub const NSApplicationPresentationAutoHideDock: NSApplicationPresentationOptions = 1; -pub const NSApplicationPresentationHideDock: NSApplicationPresentationOptions = 2; -pub const NSApplicationPresentationAutoHideMenuBar: NSApplicationPresentationOptions = 4; -pub const NSApplicationPresentationHideMenuBar: NSApplicationPresentationOptions = 8; -pub const NSApplicationPresentationDisableAppleMenu: NSApplicationPresentationOptions = 16; -pub const NSApplicationPresentationDisableProcessSwitching: NSApplicationPresentationOptions = 32; -pub const NSApplicationPresentationDisableForceQuit: NSApplicationPresentationOptions = 64; +pub const NSApplicationPresentationAutoHideDock: NSApplicationPresentationOptions = (1 << 0); +pub const NSApplicationPresentationHideDock: NSApplicationPresentationOptions = (1 << 1); +pub const NSApplicationPresentationAutoHideMenuBar: NSApplicationPresentationOptions = (1 << 2); +pub const NSApplicationPresentationHideMenuBar: NSApplicationPresentationOptions = (1 << 3); +pub const NSApplicationPresentationDisableAppleMenu: NSApplicationPresentationOptions = (1 << 4); +pub const NSApplicationPresentationDisableProcessSwitching: NSApplicationPresentationOptions = + (1 << 5); +pub const NSApplicationPresentationDisableForceQuit: NSApplicationPresentationOptions = (1 << 6); pub const NSApplicationPresentationDisableSessionTermination: NSApplicationPresentationOptions = - 128; -pub const NSApplicationPresentationDisableHideApplication: NSApplicationPresentationOptions = 256; + (1 << 7); +pub const NSApplicationPresentationDisableHideApplication: NSApplicationPresentationOptions = + (1 << 8); pub const NSApplicationPresentationDisableMenuBarTransparency: NSApplicationPresentationOptions = - 512; -pub const NSApplicationPresentationFullScreen: NSApplicationPresentationOptions = 1024; -pub const NSApplicationPresentationAutoHideToolbar: NSApplicationPresentationOptions = 2048; + (1 << 9); +pub const NSApplicationPresentationFullScreen: NSApplicationPresentationOptions = (1 << 10); +pub const NSApplicationPresentationAutoHideToolbar: NSApplicationPresentationOptions = (1 << 11); pub const NSApplicationPresentationDisableCursorLocationAssistance: - NSApplicationPresentationOptions = 4096; + NSApplicationPresentationOptions = (1 << 12); pub type NSApplicationOcclusionState = NSUInteger; -pub const NSApplicationOcclusionStateVisible: NSApplicationOcclusionState = 2; +pub const NSApplicationOcclusionStateVisible: NSApplicationOcclusionState = 1 << 1; pub type NSWindowListOptions = NSInteger; -pub const NSWindowListOrderedFrontToBack: NSWindowListOptions = 1; +pub const NSWindowListOrderedFrontToBack: NSWindowListOptions = (1 << 0); pub type NSRequestUserAttentionType = NSUInteger; pub const NSCriticalRequest: NSRequestUserAttentionType = 0; @@ -444,9 +446,9 @@ extern_methods!( pub type NSRemoteNotificationType = NSUInteger; pub const NSRemoteNotificationTypeNone: NSRemoteNotificationType = 0; -pub const NSRemoteNotificationTypeBadge: NSRemoteNotificationType = 1; -pub const NSRemoteNotificationTypeSound: NSRemoteNotificationType = 2; -pub const NSRemoteNotificationTypeAlert: NSRemoteNotificationType = 4; +pub const NSRemoteNotificationTypeBadge: NSRemoteNotificationType = 1 << 0; +pub const NSRemoteNotificationTypeSound: NSRemoteNotificationType = 1 << 1; +pub const NSRemoteNotificationTypeAlert: NSRemoteNotificationType = 1 << 2; extern_methods!( /// NSRemoteNotifications @@ -470,9 +472,9 @@ extern_methods!( pub type NSServiceProviderName = NSString; -pub const NSRunStoppedResponse: i32 = -1000; -pub const NSRunAbortedResponse: i32 = -1001; -pub const NSRunContinuesResponse: i32 = -1002; +pub const NSRunStoppedResponse: i32 = (-1000); +pub const NSRunAbortedResponse: i32 = (-1001); +pub const NSRunContinuesResponse: i32 = (-1002); extern_methods!( /// NSDeprecated diff --git a/icrate/src/AppKit/generated/NSAttributedString.rs b/icrate/src/AppKit/generated/NSAttributedString.rs index d1fe669e8..e907117f5 100644 --- a/icrate/src/AppKit/generated/NSAttributedString.rs +++ b/icrate/src/AppKit/generated/NSAttributedString.rs @@ -6,26 +6,26 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, extern_methods, ClassType}; pub type NSUnderlineStyle = NSInteger; -pub const NSUnderlineStyleNone: NSUnderlineStyle = 0; -pub const NSUnderlineStyleSingle: NSUnderlineStyle = 1; -pub const NSUnderlineStyleThick: NSUnderlineStyle = 2; -pub const NSUnderlineStyleDouble: NSUnderlineStyle = 9; -pub const NSUnderlineStylePatternSolid: NSUnderlineStyle = 0; -pub const NSUnderlineStylePatternDot: NSUnderlineStyle = 256; -pub const NSUnderlineStylePatternDash: NSUnderlineStyle = 512; -pub const NSUnderlineStylePatternDashDot: NSUnderlineStyle = 768; -pub const NSUnderlineStylePatternDashDotDot: NSUnderlineStyle = 1024; -pub const NSUnderlineStyleByWord: NSUnderlineStyle = 32768; +pub const NSUnderlineStyleNone: NSUnderlineStyle = 0x00; +pub const NSUnderlineStyleSingle: NSUnderlineStyle = 0x01; +pub const NSUnderlineStyleThick: NSUnderlineStyle = 0x02; +pub const NSUnderlineStyleDouble: NSUnderlineStyle = 0x09; +pub const NSUnderlineStylePatternSolid: NSUnderlineStyle = 0x0000; +pub const NSUnderlineStylePatternDot: NSUnderlineStyle = 0x0100; +pub const NSUnderlineStylePatternDash: NSUnderlineStyle = 0x0200; +pub const NSUnderlineStylePatternDashDot: NSUnderlineStyle = 0x0300; +pub const NSUnderlineStylePatternDashDotDot: NSUnderlineStyle = 0x0400; +pub const NSUnderlineStyleByWord: NSUnderlineStyle = 0x8000; pub type NSWritingDirectionFormatType = NSInteger; -pub const NSWritingDirectionEmbedding: NSWritingDirectionFormatType = 0; -pub const NSWritingDirectionOverride: NSWritingDirectionFormatType = 2; +pub const NSWritingDirectionEmbedding: NSWritingDirectionFormatType = (0 << 1); +pub const NSWritingDirectionOverride: NSWritingDirectionFormatType = (1 << 1); pub type NSTextEffectStyle = NSString; pub type NSSpellingState = NSInteger; -pub const NSSpellingStateSpellingFlag: NSSpellingState = 1; -pub const NSSpellingStateGrammarFlag: NSSpellingState = 2; +pub const NSSpellingStateSpellingFlag: NSSpellingState = (1 << 0); +pub const NSSpellingStateGrammarFlag: NSSpellingState = (1 << 1); extern_methods!( /// NSAttributedStringAttributeFixing diff --git a/icrate/src/AppKit/generated/NSBitmapImageRep.rs b/icrate/src/AppKit/generated/NSBitmapImageRep.rs index 82546b659..2b764101a 100644 --- a/icrate/src/AppKit/generated/NSBitmapImageRep.rs +++ b/icrate/src/AppKit/generated/NSBitmapImageRep.rs @@ -32,13 +32,13 @@ pub const NSImageRepLoadStatusUnexpectedEOF: NSImageRepLoadStatus = -5; pub const NSImageRepLoadStatusCompleted: NSImageRepLoadStatus = -6; pub type NSBitmapFormat = NSUInteger; -pub const NSBitmapFormatAlphaFirst: NSBitmapFormat = 1; -pub const NSBitmapFormatAlphaNonpremultiplied: NSBitmapFormat = 2; -pub const NSBitmapFormatFloatingPointSamples: NSBitmapFormat = 4; -pub const NSBitmapFormatSixteenBitLittleEndian: NSBitmapFormat = 256; -pub const NSBitmapFormatThirtyTwoBitLittleEndian: NSBitmapFormat = 512; -pub const NSBitmapFormatSixteenBitBigEndian: NSBitmapFormat = 1024; -pub const NSBitmapFormatThirtyTwoBitBigEndian: NSBitmapFormat = 2048; +pub const NSBitmapFormatAlphaFirst: NSBitmapFormat = 1 << 0; +pub const NSBitmapFormatAlphaNonpremultiplied: NSBitmapFormat = 1 << 1; +pub const NSBitmapFormatFloatingPointSamples: NSBitmapFormat = 1 << 2; +pub const NSBitmapFormatSixteenBitLittleEndian: NSBitmapFormat = (1 << 8); +pub const NSBitmapFormatThirtyTwoBitLittleEndian: NSBitmapFormat = (1 << 9); +pub const NSBitmapFormatSixteenBitBigEndian: NSBitmapFormat = (1 << 10); +pub const NSBitmapFormatThirtyTwoBitBigEndian: NSBitmapFormat = (1 << 11); pub type NSBitmapImageRepPropertyKey = NSString; diff --git a/icrate/src/AppKit/generated/NSCell.rs b/icrate/src/AppKit/generated/NSCell.rs index 5db28f75e..3176c2d28 100644 --- a/icrate/src/AppKit/generated/NSCell.rs +++ b/icrate/src/AppKit/generated/NSCell.rs @@ -583,9 +583,9 @@ extern_methods!( pub type NSCellHitResult = NSUInteger; pub const NSCellHitNone: NSCellHitResult = 0; -pub const NSCellHitContentArea: NSCellHitResult = 1; -pub const NSCellHitEditableTextArea: NSCellHitResult = 2; -pub const NSCellHitTrackableArea: NSCellHitResult = 4; +pub const NSCellHitContentArea: NSCellHitResult = 1 << 0; +pub const NSCellHitEditableTextArea: NSCellHitResult = 1 << 1; +pub const NSCellHitTrackableArea: NSCellHitResult = 1 << 2; extern_methods!( /// NSCellHitTest diff --git a/icrate/src/AppKit/generated/NSCollectionView.rs b/icrate/src/AppKit/generated/NSCollectionView.rs index c34c57954..461cd945b 100644 --- a/icrate/src/AppKit/generated/NSCollectionView.rs +++ b/icrate/src/AppKit/generated/NSCollectionView.rs @@ -17,16 +17,19 @@ pub const NSCollectionViewItemHighlightAsDropTarget: NSCollectionViewItemHighlig pub type NSCollectionViewScrollPosition = NSUInteger; pub const NSCollectionViewScrollPositionNone: NSCollectionViewScrollPosition = 0; -pub const NSCollectionViewScrollPositionTop: NSCollectionViewScrollPosition = 1; -pub const NSCollectionViewScrollPositionCenteredVertically: NSCollectionViewScrollPosition = 2; -pub const NSCollectionViewScrollPositionBottom: NSCollectionViewScrollPosition = 4; -pub const NSCollectionViewScrollPositionNearestHorizontalEdge: NSCollectionViewScrollPosition = 512; -pub const NSCollectionViewScrollPositionLeft: NSCollectionViewScrollPosition = 8; -pub const NSCollectionViewScrollPositionCenteredHorizontally: NSCollectionViewScrollPosition = 16; -pub const NSCollectionViewScrollPositionRight: NSCollectionViewScrollPosition = 32; -pub const NSCollectionViewScrollPositionLeadingEdge: NSCollectionViewScrollPosition = 64; -pub const NSCollectionViewScrollPositionTrailingEdge: NSCollectionViewScrollPosition = 128; -pub const NSCollectionViewScrollPositionNearestVerticalEdge: NSCollectionViewScrollPosition = 256; +pub const NSCollectionViewScrollPositionTop: NSCollectionViewScrollPosition = 1 << 0; +pub const NSCollectionViewScrollPositionCenteredVertically: NSCollectionViewScrollPosition = 1 << 1; +pub const NSCollectionViewScrollPositionBottom: NSCollectionViewScrollPosition = 1 << 2; +pub const NSCollectionViewScrollPositionNearestHorizontalEdge: NSCollectionViewScrollPosition = + 1 << 9; +pub const NSCollectionViewScrollPositionLeft: NSCollectionViewScrollPosition = 1 << 3; +pub const NSCollectionViewScrollPositionCenteredHorizontally: NSCollectionViewScrollPosition = + 1 << 4; +pub const NSCollectionViewScrollPositionRight: NSCollectionViewScrollPosition = 1 << 5; +pub const NSCollectionViewScrollPositionLeadingEdge: NSCollectionViewScrollPosition = 1 << 6; +pub const NSCollectionViewScrollPositionTrailingEdge: NSCollectionViewScrollPosition = 1 << 7; +pub const NSCollectionViewScrollPositionNearestVerticalEdge: NSCollectionViewScrollPosition = + 1 << 8; pub type NSCollectionViewSupplementaryElementKind = NSString; diff --git a/icrate/src/AppKit/generated/NSCollectionViewCompositionalLayout.rs b/icrate/src/AppKit/generated/NSCollectionViewCompositionalLayout.rs index 255dcba34..cb1ba4133 100644 --- a/icrate/src/AppKit/generated/NSCollectionViewCompositionalLayout.rs +++ b/icrate/src/AppKit/generated/NSCollectionViewCompositionalLayout.rs @@ -7,11 +7,14 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSDirectionalRectEdge = NSUInteger; pub const NSDirectionalRectEdgeNone: NSDirectionalRectEdge = 0; -pub const NSDirectionalRectEdgeTop: NSDirectionalRectEdge = 1; -pub const NSDirectionalRectEdgeLeading: NSDirectionalRectEdge = 2; -pub const NSDirectionalRectEdgeBottom: NSDirectionalRectEdge = 4; -pub const NSDirectionalRectEdgeTrailing: NSDirectionalRectEdge = 8; -pub const NSDirectionalRectEdgeAll: NSDirectionalRectEdge = 15; +pub const NSDirectionalRectEdgeTop: NSDirectionalRectEdge = 1 << 0; +pub const NSDirectionalRectEdgeLeading: NSDirectionalRectEdge = 1 << 1; +pub const NSDirectionalRectEdgeBottom: NSDirectionalRectEdge = 1 << 2; +pub const NSDirectionalRectEdgeTrailing: NSDirectionalRectEdge = 1 << 3; +pub const NSDirectionalRectEdgeAll: NSDirectionalRectEdge = NSDirectionalRectEdgeTop + | NSDirectionalRectEdgeLeading + | NSDirectionalRectEdgeBottom + | NSDirectionalRectEdgeTrailing; pub type NSRectAlignment = NSInteger; pub const NSRectAlignmentNone: NSRectAlignment = 0; diff --git a/icrate/src/AppKit/generated/NSColorPanel.rs b/icrate/src/AppKit/generated/NSColorPanel.rs index 57710de2e..a16873b76 100644 --- a/icrate/src/AppKit/generated/NSColorPanel.rs +++ b/icrate/src/AppKit/generated/NSColorPanel.rs @@ -17,15 +17,15 @@ pub const NSColorPanelModeWheel: NSColorPanelMode = 6; pub const NSColorPanelModeCrayon: NSColorPanelMode = 7; pub type NSColorPanelOptions = NSUInteger; -pub const NSColorPanelGrayModeMask: NSColorPanelOptions = 1; -pub const NSColorPanelRGBModeMask: NSColorPanelOptions = 2; -pub const NSColorPanelCMYKModeMask: NSColorPanelOptions = 4; -pub const NSColorPanelHSBModeMask: NSColorPanelOptions = 8; -pub const NSColorPanelCustomPaletteModeMask: NSColorPanelOptions = 16; -pub const NSColorPanelColorListModeMask: NSColorPanelOptions = 32; -pub const NSColorPanelWheelModeMask: NSColorPanelOptions = 64; -pub const NSColorPanelCrayonModeMask: NSColorPanelOptions = 128; -pub const NSColorPanelAllModesMask: NSColorPanelOptions = 65535; +pub const NSColorPanelGrayModeMask: NSColorPanelOptions = 0x00000001; +pub const NSColorPanelRGBModeMask: NSColorPanelOptions = 0x00000002; +pub const NSColorPanelCMYKModeMask: NSColorPanelOptions = 0x00000004; +pub const NSColorPanelHSBModeMask: NSColorPanelOptions = 0x00000008; +pub const NSColorPanelCustomPaletteModeMask: NSColorPanelOptions = 0x00000010; +pub const NSColorPanelColorListModeMask: NSColorPanelOptions = 0x00000020; +pub const NSColorPanelWheelModeMask: NSColorPanelOptions = 0x00000040; +pub const NSColorPanelCrayonModeMask: NSColorPanelOptions = 0x00000080; +pub const NSColorPanelAllModesMask: NSColorPanelOptions = 0x0000ffff; extern_class!( #[derive(Debug)] diff --git a/icrate/src/AppKit/generated/NSDatePickerCell.rs b/icrate/src/AppKit/generated/NSDatePickerCell.rs index 942309986..2519ce3e6 100644 --- a/icrate/src/AppKit/generated/NSDatePickerCell.rs +++ b/icrate/src/AppKit/generated/NSDatePickerCell.rs @@ -15,12 +15,12 @@ pub const NSDatePickerModeSingle: NSDatePickerMode = 0; pub const NSDatePickerModeRange: NSDatePickerMode = 1; pub type NSDatePickerElementFlags = NSUInteger; -pub const NSDatePickerElementFlagHourMinute: NSDatePickerElementFlags = 12; -pub const NSDatePickerElementFlagHourMinuteSecond: NSDatePickerElementFlags = 14; -pub const NSDatePickerElementFlagTimeZone: NSDatePickerElementFlags = 16; -pub const NSDatePickerElementFlagYearMonth: NSDatePickerElementFlags = 192; -pub const NSDatePickerElementFlagYearMonthDay: NSDatePickerElementFlags = 224; -pub const NSDatePickerElementFlagEra: NSDatePickerElementFlags = 256; +pub const NSDatePickerElementFlagHourMinute: NSDatePickerElementFlags = 0x000c; +pub const NSDatePickerElementFlagHourMinuteSecond: NSDatePickerElementFlags = 0x000e; +pub const NSDatePickerElementFlagTimeZone: NSDatePickerElementFlags = 0x0010; +pub const NSDatePickerElementFlagYearMonth: NSDatePickerElementFlags = 0x00c0; +pub const NSDatePickerElementFlagYearMonthDay: NSDatePickerElementFlags = 0x00e0; +pub const NSDatePickerElementFlagEra: NSDatePickerElementFlags = 0x0100; extern_class!( #[derive(Debug)] diff --git a/icrate/src/AppKit/generated/NSDragging.rs b/icrate/src/AppKit/generated/NSDragging.rs index 0355a29c7..536863885 100644 --- a/icrate/src/AppKit/generated/NSDragging.rs +++ b/icrate/src/AppKit/generated/NSDragging.rs @@ -13,9 +13,9 @@ pub const NSDragOperationGeneric: NSDragOperation = 4; pub const NSDragOperationPrivate: NSDragOperation = 8; pub const NSDragOperationMove: NSDragOperation = 16; pub const NSDragOperationDelete: NSDragOperation = 32; -pub const NSDragOperationEvery: NSDragOperation = -1; +pub const NSDragOperationEvery: NSDragOperation = 18446744073709551615; pub const NSDragOperationAll_Obsolete: NSDragOperation = 15; -pub const NSDragOperationAll: NSDragOperation = 15; +pub const NSDragOperationAll: NSDragOperation = NSDragOperationAll_Obsolete; pub type NSDraggingFormation = NSInteger; pub const NSDraggingFormationDefault: NSDraggingFormation = 0; @@ -29,9 +29,10 @@ pub const NSDraggingContextOutsideApplication: NSDraggingContext = 0; pub const NSDraggingContextWithinApplication: NSDraggingContext = 1; pub type NSDraggingItemEnumerationOptions = NSUInteger; -pub const NSDraggingItemEnumerationConcurrent: NSDraggingItemEnumerationOptions = 1; +pub const NSDraggingItemEnumerationConcurrent: NSDraggingItemEnumerationOptions = + NSEnumerationConcurrent; pub const NSDraggingItemEnumerationClearNonenumeratedImages: NSDraggingItemEnumerationOptions = - 65536; + (1 << 16); pub type NSSpringLoadingHighlight = NSInteger; pub const NSSpringLoadingHighlightNone: NSSpringLoadingHighlight = 0; @@ -46,9 +47,9 @@ pub type NSDraggingSource = NSObject; pub type NSSpringLoadingOptions = NSUInteger; pub const NSSpringLoadingDisabled: NSSpringLoadingOptions = 0; -pub const NSSpringLoadingEnabled: NSSpringLoadingOptions = 1; -pub const NSSpringLoadingContinuousActivation: NSSpringLoadingOptions = 2; -pub const NSSpringLoadingNoHover: NSSpringLoadingOptions = 8; +pub const NSSpringLoadingEnabled: NSSpringLoadingOptions = 1 << 0; +pub const NSSpringLoadingContinuousActivation: NSSpringLoadingOptions = 1 << 1; +pub const NSSpringLoadingNoHover: NSSpringLoadingOptions = 1 << 3; pub type NSSpringLoadingDestination = NSObject; diff --git a/icrate/src/AppKit/generated/NSEvent.rs b/icrate/src/AppKit/generated/NSEvent.rs index 940146ceb..03486a2e0 100644 --- a/icrate/src/AppKit/generated/NSEvent.rs +++ b/icrate/src/AppKit/generated/NSEvent.rs @@ -42,51 +42,51 @@ pub const NSEventTypeDirectTouch: NSEventType = 37; pub const NSEventTypeChangeMode: NSEventType = 38; pub type NSEventMask = c_ulonglong; -pub const NSEventMaskLeftMouseDown: NSEventMask = 2; -pub const NSEventMaskLeftMouseUp: NSEventMask = 4; -pub const NSEventMaskRightMouseDown: NSEventMask = 8; -pub const NSEventMaskRightMouseUp: NSEventMask = 16; -pub const NSEventMaskMouseMoved: NSEventMask = 32; -pub const NSEventMaskLeftMouseDragged: NSEventMask = 64; -pub const NSEventMaskRightMouseDragged: NSEventMask = 128; -pub const NSEventMaskMouseEntered: NSEventMask = 256; -pub const NSEventMaskMouseExited: NSEventMask = 512; -pub const NSEventMaskKeyDown: NSEventMask = 1024; -pub const NSEventMaskKeyUp: NSEventMask = 2048; -pub const NSEventMaskFlagsChanged: NSEventMask = 4096; -pub const NSEventMaskAppKitDefined: NSEventMask = 8192; -pub const NSEventMaskSystemDefined: NSEventMask = 16384; -pub const NSEventMaskApplicationDefined: NSEventMask = 32768; -pub const NSEventMaskPeriodic: NSEventMask = 65536; -pub const NSEventMaskCursorUpdate: NSEventMask = 131072; -pub const NSEventMaskScrollWheel: NSEventMask = 4194304; -pub const NSEventMaskTabletPoint: NSEventMask = 8388608; -pub const NSEventMaskTabletProximity: NSEventMask = 16777216; -pub const NSEventMaskOtherMouseDown: NSEventMask = 33554432; -pub const NSEventMaskOtherMouseUp: NSEventMask = 67108864; -pub const NSEventMaskOtherMouseDragged: NSEventMask = 134217728; -pub const NSEventMaskGesture: NSEventMask = 536870912; -pub const NSEventMaskMagnify: NSEventMask = 1073741824; -pub const NSEventMaskSwipe: NSEventMask = 2147483648; -pub const NSEventMaskRotate: NSEventMask = 262144; -pub const NSEventMaskBeginGesture: NSEventMask = 524288; -pub const NSEventMaskEndGesture: NSEventMask = 1048576; -pub const NSEventMaskSmartMagnify: NSEventMask = 4294967296; -pub const NSEventMaskPressure: NSEventMask = 17179869184; -pub const NSEventMaskDirectTouch: NSEventMask = 137438953472; -pub const NSEventMaskChangeMode: NSEventMask = 274877906944; -pub const NSEventMaskAny: NSEventMask = -1; +pub const NSEventMaskLeftMouseDown: NSEventMask = 1 << NSEventTypeLeftMouseDown; +pub const NSEventMaskLeftMouseUp: NSEventMask = 1 << NSEventTypeLeftMouseUp; +pub const NSEventMaskRightMouseDown: NSEventMask = 1 << NSEventTypeRightMouseDown; +pub const NSEventMaskRightMouseUp: NSEventMask = 1 << NSEventTypeRightMouseUp; +pub const NSEventMaskMouseMoved: NSEventMask = 1 << NSEventTypeMouseMoved; +pub const NSEventMaskLeftMouseDragged: NSEventMask = 1 << NSEventTypeLeftMouseDragged; +pub const NSEventMaskRightMouseDragged: NSEventMask = 1 << NSEventTypeRightMouseDragged; +pub const NSEventMaskMouseEntered: NSEventMask = 1 << NSEventTypeMouseEntered; +pub const NSEventMaskMouseExited: NSEventMask = 1 << NSEventTypeMouseExited; +pub const NSEventMaskKeyDown: NSEventMask = 1 << NSEventTypeKeyDown; +pub const NSEventMaskKeyUp: NSEventMask = 1 << NSEventTypeKeyUp; +pub const NSEventMaskFlagsChanged: NSEventMask = 1 << NSEventTypeFlagsChanged; +pub const NSEventMaskAppKitDefined: NSEventMask = 1 << NSEventTypeAppKitDefined; +pub const NSEventMaskSystemDefined: NSEventMask = 1 << NSEventTypeSystemDefined; +pub const NSEventMaskApplicationDefined: NSEventMask = 1 << NSEventTypeApplicationDefined; +pub const NSEventMaskPeriodic: NSEventMask = 1 << NSEventTypePeriodic; +pub const NSEventMaskCursorUpdate: NSEventMask = 1 << NSEventTypeCursorUpdate; +pub const NSEventMaskScrollWheel: NSEventMask = 1 << NSEventTypeScrollWheel; +pub const NSEventMaskTabletPoint: NSEventMask = 1 << NSEventTypeTabletPoint; +pub const NSEventMaskTabletProximity: NSEventMask = 1 << NSEventTypeTabletProximity; +pub const NSEventMaskOtherMouseDown: NSEventMask = 1 << NSEventTypeOtherMouseDown; +pub const NSEventMaskOtherMouseUp: NSEventMask = 1 << NSEventTypeOtherMouseUp; +pub const NSEventMaskOtherMouseDragged: NSEventMask = 1 << NSEventTypeOtherMouseDragged; +pub const NSEventMaskGesture: NSEventMask = 1 << NSEventTypeGesture; +pub const NSEventMaskMagnify: NSEventMask = 1 << NSEventTypeMagnify; +pub const NSEventMaskSwipe: NSEventMask = 1 << NSEventTypeSwipe; +pub const NSEventMaskRotate: NSEventMask = 1 << NSEventTypeRotate; +pub const NSEventMaskBeginGesture: NSEventMask = 1 << NSEventTypeBeginGesture; +pub const NSEventMaskEndGesture: NSEventMask = 1 << NSEventTypeEndGesture; +pub const NSEventMaskSmartMagnify: NSEventMask = 1 << NSEventTypeSmartMagnify; +pub const NSEventMaskPressure: NSEventMask = 1 << NSEventTypePressure; +pub const NSEventMaskDirectTouch: NSEventMask = 1 << NSEventTypeDirectTouch; +pub const NSEventMaskChangeMode: NSEventMask = 1 << NSEventTypeChangeMode; +pub const NSEventMaskAny: NSEventMask = 18446744073709551615; pub type NSEventModifierFlags = NSUInteger; -pub const NSEventModifierFlagCapsLock: NSEventModifierFlags = 65536; -pub const NSEventModifierFlagShift: NSEventModifierFlags = 131072; -pub const NSEventModifierFlagControl: NSEventModifierFlags = 262144; -pub const NSEventModifierFlagOption: NSEventModifierFlags = 524288; -pub const NSEventModifierFlagCommand: NSEventModifierFlags = 1048576; -pub const NSEventModifierFlagNumericPad: NSEventModifierFlags = 2097152; -pub const NSEventModifierFlagHelp: NSEventModifierFlags = 4194304; -pub const NSEventModifierFlagFunction: NSEventModifierFlags = 8388608; -pub const NSEventModifierFlagDeviceIndependentFlagsMask: NSEventModifierFlags = 4294901760; +pub const NSEventModifierFlagCapsLock: NSEventModifierFlags = 1 << 16; +pub const NSEventModifierFlagShift: NSEventModifierFlags = 1 << 17; +pub const NSEventModifierFlagControl: NSEventModifierFlags = 1 << 18; +pub const NSEventModifierFlagOption: NSEventModifierFlags = 1 << 19; +pub const NSEventModifierFlagCommand: NSEventModifierFlags = 1 << 20; +pub const NSEventModifierFlagNumericPad: NSEventModifierFlags = 1 << 21; +pub const NSEventModifierFlagHelp: NSEventModifierFlags = 1 << 22; +pub const NSEventModifierFlagFunction: NSEventModifierFlags = 1 << 23; +pub const NSEventModifierFlagDeviceIndependentFlagsMask: NSEventModifierFlags = 0xffff0000; pub type NSPointingDeviceType = NSUInteger; pub const NSPointingDeviceTypeUnknown: NSPointingDeviceType = 0; @@ -101,12 +101,12 @@ pub const NSEventButtonMaskPenUpperSide: NSEventButtonMask = 4; pub type NSEventPhase = NSUInteger; pub const NSEventPhaseNone: NSEventPhase = 0; -pub const NSEventPhaseBegan: NSEventPhase = 1; -pub const NSEventPhaseStationary: NSEventPhase = 2; -pub const NSEventPhaseChanged: NSEventPhase = 4; -pub const NSEventPhaseEnded: NSEventPhase = 8; -pub const NSEventPhaseCancelled: NSEventPhase = 16; -pub const NSEventPhaseMayBegin: NSEventPhase = 32; +pub const NSEventPhaseBegan: NSEventPhase = 0x1 << 0; +pub const NSEventPhaseStationary: NSEventPhase = 0x1 << 1; +pub const NSEventPhaseChanged: NSEventPhase = 0x1 << 2; +pub const NSEventPhaseEnded: NSEventPhase = 0x1 << 3; +pub const NSEventPhaseCancelled: NSEventPhase = 0x1 << 4; +pub const NSEventPhaseMayBegin: NSEventPhase = 0x1 << 5; pub type NSEventGestureAxis = NSInteger; pub const NSEventGestureAxisNone: NSEventGestureAxis = 0; @@ -114,8 +114,8 @@ pub const NSEventGestureAxisHorizontal: NSEventGestureAxis = 1; pub const NSEventGestureAxisVertical: NSEventGestureAxis = 2; pub type NSEventSwipeTrackingOptions = NSUInteger; -pub const NSEventSwipeTrackingLockDirection: NSEventSwipeTrackingOptions = 1; -pub const NSEventSwipeTrackingClampGestureAmount: NSEventSwipeTrackingOptions = 2; +pub const NSEventSwipeTrackingLockDirection: NSEventSwipeTrackingOptions = 0x1 << 0; +pub const NSEventSwipeTrackingClampGestureAmount: NSEventSwipeTrackingOptions = 0x1 << 1; pub type NSEventSubtype = c_short; pub const NSEventSubtypeWindowExposed: NSEventSubtype = 0; @@ -463,75 +463,75 @@ extern_methods!( } ); -pub const NSUpArrowFunctionKey: i32 = 63232; -pub const NSDownArrowFunctionKey: i32 = 63233; -pub const NSLeftArrowFunctionKey: i32 = 63234; -pub const NSRightArrowFunctionKey: i32 = 63235; -pub const NSF1FunctionKey: i32 = 63236; -pub const NSF2FunctionKey: i32 = 63237; -pub const NSF3FunctionKey: i32 = 63238; -pub const NSF4FunctionKey: i32 = 63239; -pub const NSF5FunctionKey: i32 = 63240; -pub const NSF6FunctionKey: i32 = 63241; -pub const NSF7FunctionKey: i32 = 63242; -pub const NSF8FunctionKey: i32 = 63243; -pub const NSF9FunctionKey: i32 = 63244; -pub const NSF10FunctionKey: i32 = 63245; -pub const NSF11FunctionKey: i32 = 63246; -pub const NSF12FunctionKey: i32 = 63247; -pub const NSF13FunctionKey: i32 = 63248; -pub const NSF14FunctionKey: i32 = 63249; -pub const NSF15FunctionKey: i32 = 63250; -pub const NSF16FunctionKey: i32 = 63251; -pub const NSF17FunctionKey: i32 = 63252; -pub const NSF18FunctionKey: i32 = 63253; -pub const NSF19FunctionKey: i32 = 63254; -pub const NSF20FunctionKey: i32 = 63255; -pub const NSF21FunctionKey: i32 = 63256; -pub const NSF22FunctionKey: i32 = 63257; -pub const NSF23FunctionKey: i32 = 63258; -pub const NSF24FunctionKey: i32 = 63259; -pub const NSF25FunctionKey: i32 = 63260; -pub const NSF26FunctionKey: i32 = 63261; -pub const NSF27FunctionKey: i32 = 63262; -pub const NSF28FunctionKey: i32 = 63263; -pub const NSF29FunctionKey: i32 = 63264; -pub const NSF30FunctionKey: i32 = 63265; -pub const NSF31FunctionKey: i32 = 63266; -pub const NSF32FunctionKey: i32 = 63267; -pub const NSF33FunctionKey: i32 = 63268; -pub const NSF34FunctionKey: i32 = 63269; -pub const NSF35FunctionKey: i32 = 63270; -pub const NSInsertFunctionKey: i32 = 63271; -pub const NSDeleteFunctionKey: i32 = 63272; -pub const NSHomeFunctionKey: i32 = 63273; -pub const NSBeginFunctionKey: i32 = 63274; -pub const NSEndFunctionKey: i32 = 63275; -pub const NSPageUpFunctionKey: i32 = 63276; -pub const NSPageDownFunctionKey: i32 = 63277; -pub const NSPrintScreenFunctionKey: i32 = 63278; -pub const NSScrollLockFunctionKey: i32 = 63279; -pub const NSPauseFunctionKey: i32 = 63280; -pub const NSSysReqFunctionKey: i32 = 63281; -pub const NSBreakFunctionKey: i32 = 63282; -pub const NSResetFunctionKey: i32 = 63283; -pub const NSStopFunctionKey: i32 = 63284; -pub const NSMenuFunctionKey: i32 = 63285; -pub const NSUserFunctionKey: i32 = 63286; -pub const NSSystemFunctionKey: i32 = 63287; -pub const NSPrintFunctionKey: i32 = 63288; -pub const NSClearLineFunctionKey: i32 = 63289; -pub const NSClearDisplayFunctionKey: i32 = 63290; -pub const NSInsertLineFunctionKey: i32 = 63291; -pub const NSDeleteLineFunctionKey: i32 = 63292; -pub const NSInsertCharFunctionKey: i32 = 63293; -pub const NSDeleteCharFunctionKey: i32 = 63294; -pub const NSPrevFunctionKey: i32 = 63295; -pub const NSNextFunctionKey: i32 = 63296; -pub const NSSelectFunctionKey: i32 = 63297; -pub const NSExecuteFunctionKey: i32 = 63298; -pub const NSUndoFunctionKey: i32 = 63299; -pub const NSRedoFunctionKey: i32 = 63300; -pub const NSFindFunctionKey: i32 = 63301; -pub const NSHelpFunctionKey: i32 = 63302; -pub const NSModeSwitchFunctionKey: i32 = 63303; +pub const NSUpArrowFunctionKey: i32 = 0xF700; +pub const NSDownArrowFunctionKey: i32 = 0xF701; +pub const NSLeftArrowFunctionKey: i32 = 0xF702; +pub const NSRightArrowFunctionKey: i32 = 0xF703; +pub const NSF1FunctionKey: i32 = 0xF704; +pub const NSF2FunctionKey: i32 = 0xF705; +pub const NSF3FunctionKey: i32 = 0xF706; +pub const NSF4FunctionKey: i32 = 0xF707; +pub const NSF5FunctionKey: i32 = 0xF708; +pub const NSF6FunctionKey: i32 = 0xF709; +pub const NSF7FunctionKey: i32 = 0xF70A; +pub const NSF8FunctionKey: i32 = 0xF70B; +pub const NSF9FunctionKey: i32 = 0xF70C; +pub const NSF10FunctionKey: i32 = 0xF70D; +pub const NSF11FunctionKey: i32 = 0xF70E; +pub const NSF12FunctionKey: i32 = 0xF70F; +pub const NSF13FunctionKey: i32 = 0xF710; +pub const NSF14FunctionKey: i32 = 0xF711; +pub const NSF15FunctionKey: i32 = 0xF712; +pub const NSF16FunctionKey: i32 = 0xF713; +pub const NSF17FunctionKey: i32 = 0xF714; +pub const NSF18FunctionKey: i32 = 0xF715; +pub const NSF19FunctionKey: i32 = 0xF716; +pub const NSF20FunctionKey: i32 = 0xF717; +pub const NSF21FunctionKey: i32 = 0xF718; +pub const NSF22FunctionKey: i32 = 0xF719; +pub const NSF23FunctionKey: i32 = 0xF71A; +pub const NSF24FunctionKey: i32 = 0xF71B; +pub const NSF25FunctionKey: i32 = 0xF71C; +pub const NSF26FunctionKey: i32 = 0xF71D; +pub const NSF27FunctionKey: i32 = 0xF71E; +pub const NSF28FunctionKey: i32 = 0xF71F; +pub const NSF29FunctionKey: i32 = 0xF720; +pub const NSF30FunctionKey: i32 = 0xF721; +pub const NSF31FunctionKey: i32 = 0xF722; +pub const NSF32FunctionKey: i32 = 0xF723; +pub const NSF33FunctionKey: i32 = 0xF724; +pub const NSF34FunctionKey: i32 = 0xF725; +pub const NSF35FunctionKey: i32 = 0xF726; +pub const NSInsertFunctionKey: i32 = 0xF727; +pub const NSDeleteFunctionKey: i32 = 0xF728; +pub const NSHomeFunctionKey: i32 = 0xF729; +pub const NSBeginFunctionKey: i32 = 0xF72A; +pub const NSEndFunctionKey: i32 = 0xF72B; +pub const NSPageUpFunctionKey: i32 = 0xF72C; +pub const NSPageDownFunctionKey: i32 = 0xF72D; +pub const NSPrintScreenFunctionKey: i32 = 0xF72E; +pub const NSScrollLockFunctionKey: i32 = 0xF72F; +pub const NSPauseFunctionKey: i32 = 0xF730; +pub const NSSysReqFunctionKey: i32 = 0xF731; +pub const NSBreakFunctionKey: i32 = 0xF732; +pub const NSResetFunctionKey: i32 = 0xF733; +pub const NSStopFunctionKey: i32 = 0xF734; +pub const NSMenuFunctionKey: i32 = 0xF735; +pub const NSUserFunctionKey: i32 = 0xF736; +pub const NSSystemFunctionKey: i32 = 0xF737; +pub const NSPrintFunctionKey: i32 = 0xF738; +pub const NSClearLineFunctionKey: i32 = 0xF739; +pub const NSClearDisplayFunctionKey: i32 = 0xF73A; +pub const NSInsertLineFunctionKey: i32 = 0xF73B; +pub const NSDeleteLineFunctionKey: i32 = 0xF73C; +pub const NSInsertCharFunctionKey: i32 = 0xF73D; +pub const NSDeleteCharFunctionKey: i32 = 0xF73E; +pub const NSPrevFunctionKey: i32 = 0xF73F; +pub const NSNextFunctionKey: i32 = 0xF740; +pub const NSSelectFunctionKey: i32 = 0xF741; +pub const NSExecuteFunctionKey: i32 = 0xF742; +pub const NSUndoFunctionKey: i32 = 0xF743; +pub const NSRedoFunctionKey: i32 = 0xF744; +pub const NSFindFunctionKey: i32 = 0xF745; +pub const NSHelpFunctionKey: i32 = 0xF746; +pub const NSModeSwitchFunctionKey: i32 = 0xF747; diff --git a/icrate/src/AppKit/generated/NSFont.rs b/icrate/src/AppKit/generated/NSFont.rs index 1aa65ab68..6cbca8306 100644 --- a/icrate/src/AppKit/generated/NSFont.rs +++ b/icrate/src/AppKit/generated/NSFont.rs @@ -214,8 +214,8 @@ extern_methods!( } ); -pub const NSControlGlyph: i32 = 16777215; -pub const NSNullGlyph: i32 = 0; +pub const NSControlGlyph: i32 = 0x00FFFFFF; +pub const NSNullGlyph: i32 = 0x0; pub type NSFontRenderingMode = NSUInteger; pub const NSFontDefaultRenderingMode: NSFontRenderingMode = 0; diff --git a/icrate/src/AppKit/generated/NSFontAssetRequest.rs b/icrate/src/AppKit/generated/NSFontAssetRequest.rs index e426bc6b2..2c5800d39 100644 --- a/icrate/src/AppKit/generated/NSFontAssetRequest.rs +++ b/icrate/src/AppKit/generated/NSFontAssetRequest.rs @@ -6,7 +6,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, extern_methods, ClassType}; pub type NSFontAssetRequestOptions = NSUInteger; -pub const NSFontAssetRequestOptionUsesStandardUI: NSFontAssetRequestOptions = 1; +pub const NSFontAssetRequestOptionUsesStandardUI: NSFontAssetRequestOptions = 1 << 0; extern_class!( #[derive(Debug)] diff --git a/icrate/src/AppKit/generated/NSFontCollection.rs b/icrate/src/AppKit/generated/NSFontCollection.rs index 4ce306005..acedd0826 100644 --- a/icrate/src/AppKit/generated/NSFontCollection.rs +++ b/icrate/src/AppKit/generated/NSFontCollection.rs @@ -6,9 +6,9 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, extern_methods, ClassType}; pub type NSFontCollectionVisibility = NSUInteger; -pub const NSFontCollectionVisibilityProcess: NSFontCollectionVisibility = 1; -pub const NSFontCollectionVisibilityUser: NSFontCollectionVisibility = 2; -pub const NSFontCollectionVisibilityComputer: NSFontCollectionVisibility = 4; +pub const NSFontCollectionVisibilityProcess: NSFontCollectionVisibility = (1 << 0); +pub const NSFontCollectionVisibilityUser: NSFontCollectionVisibility = (1 << 1); +pub const NSFontCollectionVisibilityComputer: NSFontCollectionVisibility = (1 << 2); pub type NSFontCollectionMatchingOptionKey = NSString; diff --git a/icrate/src/AppKit/generated/NSFontDescriptor.rs b/icrate/src/AppKit/generated/NSFontDescriptor.rs index e095a2272..8c63ce0de 100644 --- a/icrate/src/AppKit/generated/NSFontDescriptor.rs +++ b/icrate/src/AppKit/generated/NSFontDescriptor.rs @@ -8,28 +8,29 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSFontSymbolicTraits = u32; pub type NSFontDescriptorSymbolicTraits = u32; -pub const NSFontDescriptorTraitItalic: NSFontDescriptorSymbolicTraits = 1; -pub const NSFontDescriptorTraitBold: NSFontDescriptorSymbolicTraits = 2; -pub const NSFontDescriptorTraitExpanded: NSFontDescriptorSymbolicTraits = 32; -pub const NSFontDescriptorTraitCondensed: NSFontDescriptorSymbolicTraits = 64; -pub const NSFontDescriptorTraitMonoSpace: NSFontDescriptorSymbolicTraits = 1024; -pub const NSFontDescriptorTraitVertical: NSFontDescriptorSymbolicTraits = 2048; -pub const NSFontDescriptorTraitUIOptimized: NSFontDescriptorSymbolicTraits = 4096; -pub const NSFontDescriptorTraitTightLeading: NSFontDescriptorSymbolicTraits = 32768; -pub const NSFontDescriptorTraitLooseLeading: NSFontDescriptorSymbolicTraits = 65536; -pub const NSFontDescriptorTraitEmphasized: NSFontDescriptorSymbolicTraits = 2; -pub const NSFontDescriptorClassMask: NSFontDescriptorSymbolicTraits = -268435456; -pub const NSFontDescriptorClassUnknown: NSFontDescriptorSymbolicTraits = 0; -pub const NSFontDescriptorClassOldStyleSerifs: NSFontDescriptorSymbolicTraits = 268435456; -pub const NSFontDescriptorClassTransitionalSerifs: NSFontDescriptorSymbolicTraits = 536870912; -pub const NSFontDescriptorClassModernSerifs: NSFontDescriptorSymbolicTraits = 805306368; -pub const NSFontDescriptorClassClarendonSerifs: NSFontDescriptorSymbolicTraits = 1073741824; -pub const NSFontDescriptorClassSlabSerifs: NSFontDescriptorSymbolicTraits = 1342177280; -pub const NSFontDescriptorClassFreeformSerifs: NSFontDescriptorSymbolicTraits = 1879048192; -pub const NSFontDescriptorClassSansSerif: NSFontDescriptorSymbolicTraits = -2147483648; -pub const NSFontDescriptorClassOrnamentals: NSFontDescriptorSymbolicTraits = -1879048192; -pub const NSFontDescriptorClassScripts: NSFontDescriptorSymbolicTraits = -1610612736; -pub const NSFontDescriptorClassSymbolic: NSFontDescriptorSymbolicTraits = -1073741824; +pub const NSFontDescriptorTraitItalic: NSFontDescriptorSymbolicTraits = 1 << 0; +pub const NSFontDescriptorTraitBold: NSFontDescriptorSymbolicTraits = 1 << 1; +pub const NSFontDescriptorTraitExpanded: NSFontDescriptorSymbolicTraits = 1 << 5; +pub const NSFontDescriptorTraitCondensed: NSFontDescriptorSymbolicTraits = 1 << 6; +pub const NSFontDescriptorTraitMonoSpace: NSFontDescriptorSymbolicTraits = 1 << 10; +pub const NSFontDescriptorTraitVertical: NSFontDescriptorSymbolicTraits = 1 << 11; +pub const NSFontDescriptorTraitUIOptimized: NSFontDescriptorSymbolicTraits = 1 << 12; +pub const NSFontDescriptorTraitTightLeading: NSFontDescriptorSymbolicTraits = 1 << 15; +pub const NSFontDescriptorTraitLooseLeading: NSFontDescriptorSymbolicTraits = 1 << 16; +pub const NSFontDescriptorTraitEmphasized: NSFontDescriptorSymbolicTraits = + NSFontDescriptorTraitBold; +pub const NSFontDescriptorClassMask: NSFontDescriptorSymbolicTraits = 0xF0000000; +pub const NSFontDescriptorClassUnknown: NSFontDescriptorSymbolicTraits = 0 << 28; +pub const NSFontDescriptorClassOldStyleSerifs: NSFontDescriptorSymbolicTraits = 1 << 28; +pub const NSFontDescriptorClassTransitionalSerifs: NSFontDescriptorSymbolicTraits = 2 << 28; +pub const NSFontDescriptorClassModernSerifs: NSFontDescriptorSymbolicTraits = 3 << 28; +pub const NSFontDescriptorClassClarendonSerifs: NSFontDescriptorSymbolicTraits = 4 << 28; +pub const NSFontDescriptorClassSlabSerifs: NSFontDescriptorSymbolicTraits = 5 << 28; +pub const NSFontDescriptorClassFreeformSerifs: NSFontDescriptorSymbolicTraits = 7 << 28; +pub const NSFontDescriptorClassSansSerif: NSFontDescriptorSymbolicTraits = 8 << 28; +pub const NSFontDescriptorClassOrnamentals: NSFontDescriptorSymbolicTraits = 9 << 28; +pub const NSFontDescriptorClassScripts: NSFontDescriptorSymbolicTraits = 10 << 28; +pub const NSFontDescriptorClassSymbolic: NSFontDescriptorSymbolicTraits = 12 << 28; pub type NSFontDescriptorAttributeName = NSString; @@ -165,27 +166,27 @@ extern_methods!( pub type NSFontFamilyClass = u32; -pub const NSFontUnknownClass: i32 = 0; -pub const NSFontOldStyleSerifsClass: i32 = 268435456; -pub const NSFontTransitionalSerifsClass: i32 = 536870912; -pub const NSFontModernSerifsClass: i32 = 805306368; -pub const NSFontClarendonSerifsClass: i32 = 1073741824; -pub const NSFontSlabSerifsClass: i32 = 1342177280; -pub const NSFontFreeformSerifsClass: i32 = 1879048192; -pub const NSFontSansSerifClass: i32 = -2147483648; -pub const NSFontOrnamentalsClass: i32 = -1879048192; -pub const NSFontScriptsClass: i32 = -1610612736; -pub const NSFontSymbolicClass: i32 = -1073741824; - -pub const NSFontFamilyClassMask: i32 = -268435456; - -pub const NSFontItalicTrait: i32 = 1; -pub const NSFontBoldTrait: i32 = 2; -pub const NSFontExpandedTrait: i32 = 32; -pub const NSFontCondensedTrait: i32 = 64; -pub const NSFontMonoSpaceTrait: i32 = 1024; -pub const NSFontVerticalTrait: i32 = 2048; -pub const NSFontUIOptimizedTrait: i32 = 4096; +pub const NSFontUnknownClass: i32 = 0 << 28; +pub const NSFontOldStyleSerifsClass: i32 = 1 << 28; +pub const NSFontTransitionalSerifsClass: i32 = 2 << 28; +pub const NSFontModernSerifsClass: i32 = 3 << 28; +pub const NSFontClarendonSerifsClass: i32 = 4 << 28; +pub const NSFontSlabSerifsClass: i32 = 5 << 28; +pub const NSFontFreeformSerifsClass: i32 = 7 << 28; +pub const NSFontSansSerifClass: i32 = 8 << 28; +pub const NSFontOrnamentalsClass: i32 = 9 << 28; +pub const NSFontScriptsClass: i32 = 10 << 28; +pub const NSFontSymbolicClass: i32 = 12 << 28; + +pub const NSFontFamilyClassMask: i32 = 0xF0000000; + +pub const NSFontItalicTrait: i32 = (1 << 0); +pub const NSFontBoldTrait: i32 = (1 << 1); +pub const NSFontExpandedTrait: i32 = (1 << 5); +pub const NSFontCondensedTrait: i32 = (1 << 6); +pub const NSFontMonoSpaceTrait: i32 = (1 << 10); +pub const NSFontVerticalTrait: i32 = (1 << 11); +pub const NSFontUIOptimizedTrait: i32 = (1 << 12); extern_methods!( /// NSFontDescriptor_TextStyles diff --git a/icrate/src/AppKit/generated/NSFontManager.rs b/icrate/src/AppKit/generated/NSFontManager.rs index eb0440547..1627e6538 100644 --- a/icrate/src/AppKit/generated/NSFontManager.rs +++ b/icrate/src/AppKit/generated/NSFontManager.rs @@ -6,21 +6,21 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, extern_methods, ClassType}; pub type NSFontTraitMask = NSUInteger; -pub const NSItalicFontMask: NSFontTraitMask = 1; -pub const NSBoldFontMask: NSFontTraitMask = 2; -pub const NSUnboldFontMask: NSFontTraitMask = 4; -pub const NSNonStandardCharacterSetFontMask: NSFontTraitMask = 8; -pub const NSNarrowFontMask: NSFontTraitMask = 16; -pub const NSExpandedFontMask: NSFontTraitMask = 32; -pub const NSCondensedFontMask: NSFontTraitMask = 64; -pub const NSSmallCapsFontMask: NSFontTraitMask = 128; -pub const NSPosterFontMask: NSFontTraitMask = 256; -pub const NSCompressedFontMask: NSFontTraitMask = 512; -pub const NSFixedPitchFontMask: NSFontTraitMask = 1024; -pub const NSUnitalicFontMask: NSFontTraitMask = 16777216; +pub const NSItalicFontMask: NSFontTraitMask = 0x00000001; +pub const NSBoldFontMask: NSFontTraitMask = 0x00000002; +pub const NSUnboldFontMask: NSFontTraitMask = 0x00000004; +pub const NSNonStandardCharacterSetFontMask: NSFontTraitMask = 0x00000008; +pub const NSNarrowFontMask: NSFontTraitMask = 0x00000010; +pub const NSExpandedFontMask: NSFontTraitMask = 0x00000020; +pub const NSCondensedFontMask: NSFontTraitMask = 0x00000040; +pub const NSSmallCapsFontMask: NSFontTraitMask = 0x00000080; +pub const NSPosterFontMask: NSFontTraitMask = 0x00000100; +pub const NSCompressedFontMask: NSFontTraitMask = 0x00000200; +pub const NSFixedPitchFontMask: NSFontTraitMask = 0x00000400; +pub const NSUnitalicFontMask: NSFontTraitMask = 0x01000000; pub type NSFontCollectionOptions = NSUInteger; -pub const NSFontCollectionApplicationOnlyMask: NSFontCollectionOptions = 1; +pub const NSFontCollectionApplicationOnlyMask: NSFontCollectionOptions = 1 << 0; pub type NSFontAction = NSUInteger; pub const NSNoFontChangeAction: NSFontAction = 0; diff --git a/icrate/src/AppKit/generated/NSFontPanel.rs b/icrate/src/AppKit/generated/NSFontPanel.rs index a9b321d09..2c3636cfa 100644 --- a/icrate/src/AppKit/generated/NSFontPanel.rs +++ b/icrate/src/AppKit/generated/NSFontPanel.rs @@ -6,17 +6,17 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, extern_methods, ClassType}; pub type NSFontPanelModeMask = NSUInteger; -pub const NSFontPanelModeMaskFace: NSFontPanelModeMask = 1; -pub const NSFontPanelModeMaskSize: NSFontPanelModeMask = 2; -pub const NSFontPanelModeMaskCollection: NSFontPanelModeMask = 4; -pub const NSFontPanelModeMaskUnderlineEffect: NSFontPanelModeMask = 256; -pub const NSFontPanelModeMaskStrikethroughEffect: NSFontPanelModeMask = 512; -pub const NSFontPanelModeMaskTextColorEffect: NSFontPanelModeMask = 1024; -pub const NSFontPanelModeMaskDocumentColorEffect: NSFontPanelModeMask = 2048; -pub const NSFontPanelModeMaskShadowEffect: NSFontPanelModeMask = 4096; -pub const NSFontPanelModeMaskAllEffects: NSFontPanelModeMask = 1048320; -pub const NSFontPanelModesMaskStandardModes: NSFontPanelModeMask = 65535; -pub const NSFontPanelModesMaskAllModes: NSFontPanelModeMask = 4294967295; +pub const NSFontPanelModeMaskFace: NSFontPanelModeMask = 1 << 0; +pub const NSFontPanelModeMaskSize: NSFontPanelModeMask = 1 << 1; +pub const NSFontPanelModeMaskCollection: NSFontPanelModeMask = 1 << 2; +pub const NSFontPanelModeMaskUnderlineEffect: NSFontPanelModeMask = 1 << 8; +pub const NSFontPanelModeMaskStrikethroughEffect: NSFontPanelModeMask = 1 << 9; +pub const NSFontPanelModeMaskTextColorEffect: NSFontPanelModeMask = 1 << 10; +pub const NSFontPanelModeMaskDocumentColorEffect: NSFontPanelModeMask = 1 << 11; +pub const NSFontPanelModeMaskShadowEffect: NSFontPanelModeMask = 1 << 12; +pub const NSFontPanelModeMaskAllEffects: NSFontPanelModeMask = 0xFFF00; +pub const NSFontPanelModesMaskStandardModes: NSFontPanelModeMask = 0xFFFF; +pub const NSFontPanelModesMaskAllModes: NSFontPanelModeMask = 0xFFFFFFFF; pub type NSFontChanging = NSObject; @@ -75,17 +75,17 @@ extern_methods!( } ); -pub const NSFontPanelFaceModeMask: i32 = 1; -pub const NSFontPanelSizeModeMask: i32 = 2; -pub const NSFontPanelCollectionModeMask: i32 = 4; -pub const NSFontPanelUnderlineEffectModeMask: i32 = 256; -pub const NSFontPanelStrikethroughEffectModeMask: i32 = 512; -pub const NSFontPanelTextColorEffectModeMask: i32 = 1024; -pub const NSFontPanelDocumentColorEffectModeMask: i32 = 2048; -pub const NSFontPanelShadowEffectModeMask: i32 = 4096; -pub const NSFontPanelAllEffectsModeMask: i32 = 1048320; -pub const NSFontPanelStandardModesMask: i32 = 65535; -pub const NSFontPanelAllModesMask: i32 = -1; +pub const NSFontPanelFaceModeMask: i32 = 1 << 0; +pub const NSFontPanelSizeModeMask: i32 = 1 << 1; +pub const NSFontPanelCollectionModeMask: i32 = 1 << 2; +pub const NSFontPanelUnderlineEffectModeMask: i32 = 1 << 8; +pub const NSFontPanelStrikethroughEffectModeMask: i32 = 1 << 9; +pub const NSFontPanelTextColorEffectModeMask: i32 = 1 << 10; +pub const NSFontPanelDocumentColorEffectModeMask: i32 = 1 << 11; +pub const NSFontPanelShadowEffectModeMask: i32 = 1 << 12; +pub const NSFontPanelAllEffectsModeMask: i32 = 0xFFF00; +pub const NSFontPanelStandardModesMask: i32 = 0xFFFF; +pub const NSFontPanelAllModesMask: i32 = 0xFFFFFFFF; pub const NSFPPreviewButton: i32 = 131; pub const NSFPRevertButton: i32 = 130; diff --git a/icrate/src/AppKit/generated/NSGestureRecognizer.rs b/icrate/src/AppKit/generated/NSGestureRecognizer.rs index f911e6713..b15feafd6 100644 --- a/icrate/src/AppKit/generated/NSGestureRecognizer.rs +++ b/icrate/src/AppKit/generated/NSGestureRecognizer.rs @@ -12,7 +12,8 @@ pub const NSGestureRecognizerStateChanged: NSGestureRecognizerState = 2; pub const NSGestureRecognizerStateEnded: NSGestureRecognizerState = 3; pub const NSGestureRecognizerStateCancelled: NSGestureRecognizerState = 4; pub const NSGestureRecognizerStateFailed: NSGestureRecognizerState = 5; -pub const NSGestureRecognizerStateRecognized: NSGestureRecognizerState = 3; +pub const NSGestureRecognizerStateRecognized: NSGestureRecognizerState = + NSGestureRecognizerStateEnded; extern_class!( #[derive(Debug)] diff --git a/icrate/src/AppKit/generated/NSGlyphGenerator.rs b/icrate/src/AppKit/generated/NSGlyphGenerator.rs index 8fc07e065..9482e9695 100644 --- a/icrate/src/AppKit/generated/NSGlyphGenerator.rs +++ b/icrate/src/AppKit/generated/NSGlyphGenerator.rs @@ -5,9 +5,9 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; -pub const NSShowControlGlyphs: i32 = 1; -pub const NSShowInvisibleGlyphs: i32 = 2; -pub const NSWantsBidiLevels: i32 = 4; +pub const NSShowControlGlyphs: i32 = (1 << 0); +pub const NSShowInvisibleGlyphs: i32 = (1 << 1); +pub const NSWantsBidiLevels: i32 = (1 << 2); pub type NSGlyphStorage = NSObject; diff --git a/icrate/src/AppKit/generated/NSGradient.rs b/icrate/src/AppKit/generated/NSGradient.rs index 3814a7582..c439bd563 100644 --- a/icrate/src/AppKit/generated/NSGradient.rs +++ b/icrate/src/AppKit/generated/NSGradient.rs @@ -6,8 +6,8 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, extern_methods, ClassType}; pub type NSGradientDrawingOptions = NSUInteger; -pub const NSGradientDrawsBeforeStartingLocation: NSGradientDrawingOptions = 1; -pub const NSGradientDrawsAfterEndingLocation: NSGradientDrawingOptions = 2; +pub const NSGradientDrawsBeforeStartingLocation: NSGradientDrawingOptions = (1 << 0); +pub const NSGradientDrawsAfterEndingLocation: NSGradientDrawingOptions = (1 << 1); extern_class!( #[derive(Debug)] diff --git a/icrate/src/AppKit/generated/NSGraphics.rs b/icrate/src/AppKit/generated/NSGraphics.rs index ee5b56e65..0da298619 100644 --- a/icrate/src/AppKit/generated/NSGraphics.rs +++ b/icrate/src/AppKit/generated/NSGraphics.rs @@ -66,9 +66,9 @@ pub const NSColorRenderingIntentSaturation: NSColorRenderingIntent = 4; pub type NSColorSpaceName = NSString; pub type NSWindowDepth = i32; -pub const NSWindowDepthTwentyfourBitRGB: NSWindowDepth = 520; -pub const NSWindowDepthSixtyfourBitRGB: NSWindowDepth = 528; -pub const NSWindowDepthOnehundredtwentyeightBitRGB: NSWindowDepth = 544; +pub const NSWindowDepthTwentyfourBitRGB: NSWindowDepth = 0x208; +pub const NSWindowDepthSixtyfourBitRGB: NSWindowDepth = 0x210; +pub const NSWindowDepthOnehundredtwentyeightBitRGB: NSWindowDepth = 0x220; pub type NSDisplayGamut = NSInteger; pub const NSDisplayGamutSRGB: NSDisplayGamut = 1; diff --git a/icrate/src/AppKit/generated/NSGridView.rs b/icrate/src/AppKit/generated/NSGridView.rs index 76e8a14c6..75d8a6dd3 100644 --- a/icrate/src/AppKit/generated/NSGridView.rs +++ b/icrate/src/AppKit/generated/NSGridView.rs @@ -9,9 +9,9 @@ pub type NSGridCellPlacement = NSInteger; pub const NSGridCellPlacementInherited: NSGridCellPlacement = 0; pub const NSGridCellPlacementNone: NSGridCellPlacement = 1; pub const NSGridCellPlacementLeading: NSGridCellPlacement = 2; -pub const NSGridCellPlacementTop: NSGridCellPlacement = 2; +pub const NSGridCellPlacementTop: NSGridCellPlacement = NSGridCellPlacementLeading; pub const NSGridCellPlacementTrailing: NSGridCellPlacement = 3; -pub const NSGridCellPlacementBottom: NSGridCellPlacement = 3; +pub const NSGridCellPlacementBottom: NSGridCellPlacement = NSGridCellPlacementTrailing; pub const NSGridCellPlacementCenter: NSGridCellPlacement = 4; pub const NSGridCellPlacementFill: NSGridCellPlacement = 5; diff --git a/icrate/src/AppKit/generated/NSLayoutConstraint.rs b/icrate/src/AppKit/generated/NSLayoutConstraint.rs index 7dbfef008..69f5706c9 100644 --- a/icrate/src/AppKit/generated/NSLayoutConstraint.rs +++ b/icrate/src/AppKit/generated/NSLayoutConstraint.rs @@ -26,27 +26,30 @@ pub const NSLayoutAttributeHeight: NSLayoutAttribute = 8; pub const NSLayoutAttributeCenterX: NSLayoutAttribute = 9; pub const NSLayoutAttributeCenterY: NSLayoutAttribute = 10; pub const NSLayoutAttributeLastBaseline: NSLayoutAttribute = 11; -pub const NSLayoutAttributeBaseline: NSLayoutAttribute = 11; +pub const NSLayoutAttributeBaseline: NSLayoutAttribute = NSLayoutAttributeLastBaseline; pub const NSLayoutAttributeFirstBaseline: NSLayoutAttribute = 12; pub const NSLayoutAttributeNotAnAttribute: NSLayoutAttribute = 0; pub type NSLayoutFormatOptions = NSUInteger; -pub const NSLayoutFormatAlignAllLeft: NSLayoutFormatOptions = 2; -pub const NSLayoutFormatAlignAllRight: NSLayoutFormatOptions = 4; -pub const NSLayoutFormatAlignAllTop: NSLayoutFormatOptions = 8; -pub const NSLayoutFormatAlignAllBottom: NSLayoutFormatOptions = 16; -pub const NSLayoutFormatAlignAllLeading: NSLayoutFormatOptions = 32; -pub const NSLayoutFormatAlignAllTrailing: NSLayoutFormatOptions = 64; -pub const NSLayoutFormatAlignAllCenterX: NSLayoutFormatOptions = 512; -pub const NSLayoutFormatAlignAllCenterY: NSLayoutFormatOptions = 1024; -pub const NSLayoutFormatAlignAllLastBaseline: NSLayoutFormatOptions = 2048; -pub const NSLayoutFormatAlignAllFirstBaseline: NSLayoutFormatOptions = 4096; -pub const NSLayoutFormatAlignAllBaseline: NSLayoutFormatOptions = 2048; -pub const NSLayoutFormatAlignmentMask: NSLayoutFormatOptions = 65535; -pub const NSLayoutFormatDirectionLeadingToTrailing: NSLayoutFormatOptions = 0; -pub const NSLayoutFormatDirectionLeftToRight: NSLayoutFormatOptions = 65536; -pub const NSLayoutFormatDirectionRightToLeft: NSLayoutFormatOptions = 131072; -pub const NSLayoutFormatDirectionMask: NSLayoutFormatOptions = 196608; +pub const NSLayoutFormatAlignAllLeft: NSLayoutFormatOptions = (1 << NSLayoutAttributeLeft); +pub const NSLayoutFormatAlignAllRight: NSLayoutFormatOptions = (1 << NSLayoutAttributeRight); +pub const NSLayoutFormatAlignAllTop: NSLayoutFormatOptions = (1 << NSLayoutAttributeTop); +pub const NSLayoutFormatAlignAllBottom: NSLayoutFormatOptions = (1 << NSLayoutAttributeBottom); +pub const NSLayoutFormatAlignAllLeading: NSLayoutFormatOptions = (1 << NSLayoutAttributeLeading); +pub const NSLayoutFormatAlignAllTrailing: NSLayoutFormatOptions = (1 << NSLayoutAttributeTrailing); +pub const NSLayoutFormatAlignAllCenterX: NSLayoutFormatOptions = (1 << NSLayoutAttributeCenterX); +pub const NSLayoutFormatAlignAllCenterY: NSLayoutFormatOptions = (1 << NSLayoutAttributeCenterY); +pub const NSLayoutFormatAlignAllLastBaseline: NSLayoutFormatOptions = + (1 << NSLayoutAttributeLastBaseline); +pub const NSLayoutFormatAlignAllFirstBaseline: NSLayoutFormatOptions = + (1 << NSLayoutAttributeFirstBaseline); +pub const NSLayoutFormatAlignAllBaseline: NSLayoutFormatOptions = + NSLayoutFormatAlignAllLastBaseline; +pub const NSLayoutFormatAlignmentMask: NSLayoutFormatOptions = 0xFFFF; +pub const NSLayoutFormatDirectionLeadingToTrailing: NSLayoutFormatOptions = 0 << 16; +pub const NSLayoutFormatDirectionLeftToRight: NSLayoutFormatOptions = 1 << 16; +pub const NSLayoutFormatDirectionRightToLeft: NSLayoutFormatOptions = 2 << 16; +pub const NSLayoutFormatDirectionMask: NSLayoutFormatOptions = 0x3 << 16; extern_class!( #[derive(Debug)] diff --git a/icrate/src/AppKit/generated/NSLayoutManager.rs b/icrate/src/AppKit/generated/NSLayoutManager.rs index 4358c3fe5..d39ea0113 100644 --- a/icrate/src/AppKit/generated/NSLayoutManager.rs +++ b/icrate/src/AppKit/generated/NSLayoutManager.rs @@ -10,18 +10,18 @@ pub const NSTextLayoutOrientationHorizontal: NSTextLayoutOrientation = 0; pub const NSTextLayoutOrientationVertical: NSTextLayoutOrientation = 1; pub type NSGlyphProperty = NSInteger; -pub const NSGlyphPropertyNull: NSGlyphProperty = 1; -pub const NSGlyphPropertyControlCharacter: NSGlyphProperty = 2; -pub const NSGlyphPropertyElastic: NSGlyphProperty = 4; -pub const NSGlyphPropertyNonBaseCharacter: NSGlyphProperty = 8; +pub const NSGlyphPropertyNull: NSGlyphProperty = (1 << 0); +pub const NSGlyphPropertyControlCharacter: NSGlyphProperty = (1 << 1); +pub const NSGlyphPropertyElastic: NSGlyphProperty = (1 << 2); +pub const NSGlyphPropertyNonBaseCharacter: NSGlyphProperty = (1 << 3); pub type NSControlCharacterAction = NSInteger; -pub const NSControlCharacterActionZeroAdvancement: NSControlCharacterAction = 1; -pub const NSControlCharacterActionWhitespace: NSControlCharacterAction = 2; -pub const NSControlCharacterActionHorizontalTab: NSControlCharacterAction = 4; -pub const NSControlCharacterActionLineBreak: NSControlCharacterAction = 8; -pub const NSControlCharacterActionParagraphBreak: NSControlCharacterAction = 16; -pub const NSControlCharacterActionContainerBreak: NSControlCharacterAction = 32; +pub const NSControlCharacterActionZeroAdvancement: NSControlCharacterAction = (1 << 0); +pub const NSControlCharacterActionWhitespace: NSControlCharacterAction = (1 << 1); +pub const NSControlCharacterActionHorizontalTab: NSControlCharacterAction = (1 << 2); +pub const NSControlCharacterActionLineBreak: NSControlCharacterAction = (1 << 3); +pub const NSControlCharacterActionParagraphBreak: NSControlCharacterAction = (1 << 4); +pub const NSControlCharacterActionContainerBreak: NSControlCharacterAction = (1 << 5); pub type NSTextLayoutOrientationProvider = NSObject; diff --git a/icrate/src/AppKit/generated/NSMediaLibraryBrowserController.rs b/icrate/src/AppKit/generated/NSMediaLibraryBrowserController.rs index 908ddce8c..db7ff5af6 100644 --- a/icrate/src/AppKit/generated/NSMediaLibraryBrowserController.rs +++ b/icrate/src/AppKit/generated/NSMediaLibraryBrowserController.rs @@ -6,9 +6,9 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, extern_methods, ClassType}; pub type NSMediaLibrary = NSUInteger; -pub const NSMediaLibraryAudio: NSMediaLibrary = 1; -pub const NSMediaLibraryImage: NSMediaLibrary = 2; -pub const NSMediaLibraryMovie: NSMediaLibrary = 4; +pub const NSMediaLibraryAudio: NSMediaLibrary = 1 << 0; +pub const NSMediaLibraryImage: NSMediaLibrary = 1 << 1; +pub const NSMediaLibraryMovie: NSMediaLibrary = 1 << 2; extern_class!( #[derive(Debug)] diff --git a/icrate/src/AppKit/generated/NSMenu.rs b/icrate/src/AppKit/generated/NSMenu.rs index 2c16b0ca5..1db1c3719 100644 --- a/icrate/src/AppKit/generated/NSMenu.rs +++ b/icrate/src/AppKit/generated/NSMenu.rs @@ -234,12 +234,12 @@ extern_methods!( pub type NSMenuDelegate = NSObject; pub type NSMenuProperties = NSUInteger; -pub const NSMenuPropertyItemTitle: NSMenuProperties = 1; -pub const NSMenuPropertyItemAttributedTitle: NSMenuProperties = 2; -pub const NSMenuPropertyItemKeyEquivalent: NSMenuProperties = 4; -pub const NSMenuPropertyItemImage: NSMenuProperties = 8; -pub const NSMenuPropertyItemEnabled: NSMenuProperties = 16; -pub const NSMenuPropertyItemAccessibilityDescription: NSMenuProperties = 32; +pub const NSMenuPropertyItemTitle: NSMenuProperties = 1 << 0; +pub const NSMenuPropertyItemAttributedTitle: NSMenuProperties = 1 << 1; +pub const NSMenuPropertyItemKeyEquivalent: NSMenuProperties = 1 << 2; +pub const NSMenuPropertyItemImage: NSMenuProperties = 1 << 3; +pub const NSMenuPropertyItemEnabled: NSMenuProperties = 1 << 4; +pub const NSMenuPropertyItemAccessibilityDescription: NSMenuProperties = 1 << 5; extern_methods!( /// NSMenuPropertiesToUpdate diff --git a/icrate/src/AppKit/generated/NSOpenGL.rs b/icrate/src/AppKit/generated/NSOpenGL.rs index d0a5f93a1..5865f8900 100644 --- a/icrate/src/AppKit/generated/NSOpenGL.rs +++ b/icrate/src/AppKit/generated/NSOpenGL.rs @@ -54,9 +54,9 @@ pub const NSOpenGLPFARemotePixelBuffer: i32 = 91; pub type NSOpenGLPixelFormatAttribute = u32; -pub const NSOpenGLProfileVersionLegacy: i32 = 4096; -pub const NSOpenGLProfileVersion3_2Core: i32 = 12800; -pub const NSOpenGLProfileVersion4_1Core: i32 = 16640; +pub const NSOpenGLProfileVersionLegacy: i32 = 0x1000; +pub const NSOpenGLProfileVersion3_2Core: i32 = 0x3200; +pub const NSOpenGLProfileVersion4_1Core: i32 = 0x4100; extern_class!( #[derive(Debug)] diff --git a/icrate/src/AppKit/generated/NSPDFPanel.rs b/icrate/src/AppKit/generated/NSPDFPanel.rs index 2969675af..87a998c51 100644 --- a/icrate/src/AppKit/generated/NSPDFPanel.rs +++ b/icrate/src/AppKit/generated/NSPDFPanel.rs @@ -6,9 +6,9 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, extern_methods, ClassType}; pub type NSPDFPanelOptions = NSInteger; -pub const NSPDFPanelShowsPaperSize: NSPDFPanelOptions = 4; -pub const NSPDFPanelShowsOrientation: NSPDFPanelOptions = 8; -pub const NSPDFPanelRequestsParentDirectory: NSPDFPanelOptions = 16777216; +pub const NSPDFPanelShowsPaperSize: NSPDFPanelOptions = 1 << 2; +pub const NSPDFPanelShowsOrientation: NSPDFPanelOptions = 1 << 3; +pub const NSPDFPanelRequestsParentDirectory: NSPDFPanelOptions = 1 << 24; extern_class!( #[derive(Debug)] diff --git a/icrate/src/AppKit/generated/NSPanel.rs b/icrate/src/AppKit/generated/NSPanel.rs index 28d008dfb..89e9a26d8 100644 --- a/icrate/src/AppKit/generated/NSPanel.rs +++ b/icrate/src/AppKit/generated/NSPanel.rs @@ -41,5 +41,5 @@ pub const NSAlertAlternateReturn: i32 = 0; pub const NSAlertOtherReturn: i32 = -1; pub const NSAlertErrorReturn: i32 = -2; -pub const NSOKButton: i32 = 1; -pub const NSCancelButton: i32 = 0; +pub const NSOKButton: i32 = NSModalResponseOK; +pub const NSCancelButton: i32 = NSModalResponseCancel; diff --git a/icrate/src/AppKit/generated/NSParagraphStyle.rs b/icrate/src/AppKit/generated/NSParagraphStyle.rs index 95081220d..7ef516845 100644 --- a/icrate/src/AppKit/generated/NSParagraphStyle.rs +++ b/icrate/src/AppKit/generated/NSParagraphStyle.rs @@ -15,9 +15,9 @@ pub const NSLineBreakByTruncatingMiddle: NSLineBreakMode = 5; pub type NSLineBreakStrategy = NSUInteger; pub const NSLineBreakStrategyNone: NSLineBreakStrategy = 0; -pub const NSLineBreakStrategyPushOut: NSLineBreakStrategy = 1; -pub const NSLineBreakStrategyHangulWordPriority: NSLineBreakStrategy = 2; -pub const NSLineBreakStrategyStandard: NSLineBreakStrategy = 65535; +pub const NSLineBreakStrategyPushOut: NSLineBreakStrategy = 1 << 0; +pub const NSLineBreakStrategyHangulWordPriority: NSLineBreakStrategy = 1 << 1; +pub const NSLineBreakStrategyStandard: NSLineBreakStrategy = 0xFFFF; pub type NSTextTabOptionKey = NSString; diff --git a/icrate/src/AppKit/generated/NSPasteboard.rs b/icrate/src/AppKit/generated/NSPasteboard.rs index 3487f566c..72e31ea0f 100644 --- a/icrate/src/AppKit/generated/NSPasteboard.rs +++ b/icrate/src/AppKit/generated/NSPasteboard.rs @@ -10,7 +10,7 @@ pub type NSPasteboardType = NSString; pub type NSPasteboardName = NSString; pub type NSPasteboardContentsOptions = NSUInteger; -pub const NSPasteboardContentsCurrentHostOnly: NSPasteboardContentsOptions = 1; +pub const NSPasteboardContentsCurrentHostOnly: NSPasteboardContentsOptions = 1 << 0; pub type NSPasteboardReadingOptionKey = NSString; @@ -183,15 +183,15 @@ extern_methods!( ); pub type NSPasteboardWritingOptions = NSUInteger; -pub const NSPasteboardWritingPromised: NSPasteboardWritingOptions = 512; +pub const NSPasteboardWritingPromised: NSPasteboardWritingOptions = 1 << 9; pub type NSPasteboardWriting = NSObject; pub type NSPasteboardReadingOptions = NSUInteger; pub const NSPasteboardReadingAsData: NSPasteboardReadingOptions = 0; -pub const NSPasteboardReadingAsString: NSPasteboardReadingOptions = 1; -pub const NSPasteboardReadingAsPropertyList: NSPasteboardReadingOptions = 2; -pub const NSPasteboardReadingAsKeyedArchive: NSPasteboardReadingOptions = 4; +pub const NSPasteboardReadingAsString: NSPasteboardReadingOptions = 1 << 0; +pub const NSPasteboardReadingAsPropertyList: NSPasteboardReadingOptions = 1 << 1; +pub const NSPasteboardReadingAsKeyedArchive: NSPasteboardReadingOptions = 1 << 2; pub type NSPasteboardReading = NSObject; diff --git a/icrate/src/AppKit/generated/NSPrintPanel.rs b/icrate/src/AppKit/generated/NSPrintPanel.rs index 16b446cdc..17499ef2d 100644 --- a/icrate/src/AppKit/generated/NSPrintPanel.rs +++ b/icrate/src/AppKit/generated/NSPrintPanel.rs @@ -6,14 +6,14 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, extern_methods, ClassType}; pub type NSPrintPanelOptions = NSUInteger; -pub const NSPrintPanelShowsCopies: NSPrintPanelOptions = 1; -pub const NSPrintPanelShowsPageRange: NSPrintPanelOptions = 2; -pub const NSPrintPanelShowsPaperSize: NSPrintPanelOptions = 4; -pub const NSPrintPanelShowsOrientation: NSPrintPanelOptions = 8; -pub const NSPrintPanelShowsScaling: NSPrintPanelOptions = 16; -pub const NSPrintPanelShowsPrintSelection: NSPrintPanelOptions = 32; -pub const NSPrintPanelShowsPageSetupAccessory: NSPrintPanelOptions = 256; -pub const NSPrintPanelShowsPreview: NSPrintPanelOptions = 131072; +pub const NSPrintPanelShowsCopies: NSPrintPanelOptions = 1 << 0; +pub const NSPrintPanelShowsPageRange: NSPrintPanelOptions = 1 << 1; +pub const NSPrintPanelShowsPaperSize: NSPrintPanelOptions = 1 << 2; +pub const NSPrintPanelShowsOrientation: NSPrintPanelOptions = 1 << 3; +pub const NSPrintPanelShowsScaling: NSPrintPanelOptions = 1 << 4; +pub const NSPrintPanelShowsPrintSelection: NSPrintPanelOptions = 1 << 5; +pub const NSPrintPanelShowsPageSetupAccessory: NSPrintPanelOptions = 1 << 8; +pub const NSPrintPanelShowsPreview: NSPrintPanelOptions = 1 << 17; pub type NSPrintPanelJobStyleHint = NSString; diff --git a/icrate/src/AppKit/generated/NSRunningApplication.rs b/icrate/src/AppKit/generated/NSRunningApplication.rs index db1c35972..5a751043f 100644 --- a/icrate/src/AppKit/generated/NSRunningApplication.rs +++ b/icrate/src/AppKit/generated/NSRunningApplication.rs @@ -6,8 +6,8 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, extern_methods, ClassType}; pub type NSApplicationActivationOptions = NSUInteger; -pub const NSApplicationActivateAllWindows: NSApplicationActivationOptions = 1; -pub const NSApplicationActivateIgnoringOtherApps: NSApplicationActivationOptions = 2; +pub const NSApplicationActivateAllWindows: NSApplicationActivationOptions = 1 << 0; +pub const NSApplicationActivateIgnoringOtherApps: NSApplicationActivationOptions = 1 << 1; pub type NSApplicationActivationPolicy = NSInteger; pub const NSApplicationActivationPolicyRegular: NSApplicationActivationPolicy = 0; diff --git a/icrate/src/AppKit/generated/NSSavePanel.rs b/icrate/src/AppKit/generated/NSSavePanel.rs index cdcbf817f..678a85730 100644 --- a/icrate/src/AppKit/generated/NSSavePanel.rs +++ b/icrate/src/AppKit/generated/NSSavePanel.rs @@ -5,8 +5,8 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; -pub const NSFileHandlingPanelCancelButton: i32 = 0; -pub const NSFileHandlingPanelOKButton: i32 = 1; +pub const NSFileHandlingPanelCancelButton: i32 = NSModalResponseCancel; +pub const NSFileHandlingPanelOKButton: i32 = NSModalResponseOK; extern_class!( #[derive(Debug)] diff --git a/icrate/src/AppKit/generated/NSSharingService.rs b/icrate/src/AppKit/generated/NSSharingService.rs index 9f52cf230..183d94eed 100644 --- a/icrate/src/AppKit/generated/NSSharingService.rs +++ b/icrate/src/AppKit/generated/NSSharingService.rs @@ -102,10 +102,10 @@ pub type NSSharingServiceDelegate = NSObject; pub type NSCloudKitSharingServiceOptions = NSUInteger; pub const NSCloudKitSharingServiceStandard: NSCloudKitSharingServiceOptions = 0; -pub const NSCloudKitSharingServiceAllowPublic: NSCloudKitSharingServiceOptions = 1; -pub const NSCloudKitSharingServiceAllowPrivate: NSCloudKitSharingServiceOptions = 2; -pub const NSCloudKitSharingServiceAllowReadOnly: NSCloudKitSharingServiceOptions = 16; -pub const NSCloudKitSharingServiceAllowReadWrite: NSCloudKitSharingServiceOptions = 32; +pub const NSCloudKitSharingServiceAllowPublic: NSCloudKitSharingServiceOptions = 1 << 0; +pub const NSCloudKitSharingServiceAllowPrivate: NSCloudKitSharingServiceOptions = 1 << 1; +pub const NSCloudKitSharingServiceAllowReadOnly: NSCloudKitSharingServiceOptions = 1 << 4; +pub const NSCloudKitSharingServiceAllowReadWrite: NSCloudKitSharingServiceOptions = 1 << 5; pub type NSCloudSharingServiceDelegate = NSObject; diff --git a/icrate/src/AppKit/generated/NSSliderCell.rs b/icrate/src/AppKit/generated/NSSliderCell.rs index 0204440b1..66a9bec81 100644 --- a/icrate/src/AppKit/generated/NSSliderCell.rs +++ b/icrate/src/AppKit/generated/NSSliderCell.rs @@ -8,8 +8,8 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSTickMarkPosition = NSUInteger; pub const NSTickMarkPositionBelow: NSTickMarkPosition = 0; pub const NSTickMarkPositionAbove: NSTickMarkPosition = 1; -pub const NSTickMarkPositionLeading: NSTickMarkPosition = 1; -pub const NSTickMarkPositionTrailing: NSTickMarkPosition = 0; +pub const NSTickMarkPositionLeading: NSTickMarkPosition = NSTickMarkPositionAbove; +pub const NSTickMarkPositionTrailing: NSTickMarkPosition = NSTickMarkPositionBelow; pub type NSSliderType = NSUInteger; pub const NSSliderTypeLinear: NSSliderType = 0; diff --git a/icrate/src/AppKit/generated/NSStatusItem.rs b/icrate/src/AppKit/generated/NSStatusItem.rs index 468a07859..a9322e544 100644 --- a/icrate/src/AppKit/generated/NSStatusItem.rs +++ b/icrate/src/AppKit/generated/NSStatusItem.rs @@ -8,8 +8,8 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSStatusItemAutosaveName = NSString; pub type NSStatusItemBehavior = NSUInteger; -pub const NSStatusItemBehaviorRemovalAllowed: NSStatusItemBehavior = 2; -pub const NSStatusItemBehaviorTerminationOnRemoval: NSStatusItemBehavior = 4; +pub const NSStatusItemBehaviorRemovalAllowed: NSStatusItemBehavior = (1 << 1); +pub const NSStatusItemBehaviorTerminationOnRemoval: NSStatusItemBehavior = (1 << 2); extern_class!( #[derive(Debug)] diff --git a/icrate/src/AppKit/generated/NSStringDrawing.rs b/icrate/src/AppKit/generated/NSStringDrawing.rs index 39a514d11..c0c59c902 100644 --- a/icrate/src/AppKit/generated/NSStringDrawing.rs +++ b/icrate/src/AppKit/generated/NSStringDrawing.rs @@ -70,12 +70,12 @@ extern_methods!( ); pub type NSStringDrawingOptions = NSInteger; -pub const NSStringDrawingUsesLineFragmentOrigin: NSStringDrawingOptions = 1; -pub const NSStringDrawingUsesFontLeading: NSStringDrawingOptions = 2; -pub const NSStringDrawingUsesDeviceMetrics: NSStringDrawingOptions = 8; -pub const NSStringDrawingTruncatesLastVisibleLine: NSStringDrawingOptions = 32; -pub const NSStringDrawingDisableScreenFontSubstitution: NSStringDrawingOptions = 4; -pub const NSStringDrawingOneShot: NSStringDrawingOptions = 16; +pub const NSStringDrawingUsesLineFragmentOrigin: NSStringDrawingOptions = 1 << 0; +pub const NSStringDrawingUsesFontLeading: NSStringDrawingOptions = 1 << 1; +pub const NSStringDrawingUsesDeviceMetrics: NSStringDrawingOptions = 1 << 3; +pub const NSStringDrawingTruncatesLastVisibleLine: NSStringDrawingOptions = 1 << 5; +pub const NSStringDrawingDisableScreenFontSubstitution: NSStringDrawingOptions = (1 << 2); +pub const NSStringDrawingOneShot: NSStringDrawingOptions = (1 << 4); extern_methods!( /// NSExtendedStringDrawing diff --git a/icrate/src/AppKit/generated/NSTableColumn.rs b/icrate/src/AppKit/generated/NSTableColumn.rs index 2bb37791f..155d9d85b 100644 --- a/icrate/src/AppKit/generated/NSTableColumn.rs +++ b/icrate/src/AppKit/generated/NSTableColumn.rs @@ -7,8 +7,8 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSTableColumnResizingOptions = NSUInteger; pub const NSTableColumnNoResizing: NSTableColumnResizingOptions = 0; -pub const NSTableColumnAutoresizingMask: NSTableColumnResizingOptions = 1; -pub const NSTableColumnUserResizingMask: NSTableColumnResizingOptions = 2; +pub const NSTableColumnAutoresizingMask: NSTableColumnResizingOptions = (1 << 0); +pub const NSTableColumnUserResizingMask: NSTableColumnResizingOptions = (1 << 1); extern_class!( #[derive(Debug)] diff --git a/icrate/src/AppKit/generated/NSTableView.rs b/icrate/src/AppKit/generated/NSTableView.rs index 3ebb6aa98..5013502e0 100644 --- a/icrate/src/AppKit/generated/NSTableView.rs +++ b/icrate/src/AppKit/generated/NSTableView.rs @@ -20,9 +20,9 @@ pub const NSTableViewFirstColumnOnlyAutoresizingStyle: NSTableViewColumnAutoresi pub type NSTableViewGridLineStyle = NSUInteger; pub const NSTableViewGridNone: NSTableViewGridLineStyle = 0; -pub const NSTableViewSolidVerticalGridLineMask: NSTableViewGridLineStyle = 1; -pub const NSTableViewSolidHorizontalGridLineMask: NSTableViewGridLineStyle = 2; -pub const NSTableViewDashedHorizontalGridLineMask: NSTableViewGridLineStyle = 8; +pub const NSTableViewSolidVerticalGridLineMask: NSTableViewGridLineStyle = 1 << 0; +pub const NSTableViewSolidHorizontalGridLineMask: NSTableViewGridLineStyle = 1 << 1; +pub const NSTableViewDashedHorizontalGridLineMask: NSTableViewGridLineStyle = 1 << 3; pub type NSTableViewRowSizeStyle = NSInteger; pub const NSTableViewRowSizeStyleDefault: NSTableViewRowSizeStyle = -1; @@ -60,13 +60,13 @@ pub const NSTableRowActionEdgeTrailing: NSTableRowActionEdge = 1; pub type NSTableViewAutosaveName = NSString; pub type NSTableViewAnimationOptions = NSUInteger; -pub const NSTableViewAnimationEffectNone: NSTableViewAnimationOptions = 0; -pub const NSTableViewAnimationEffectFade: NSTableViewAnimationOptions = 1; -pub const NSTableViewAnimationEffectGap: NSTableViewAnimationOptions = 2; -pub const NSTableViewAnimationSlideUp: NSTableViewAnimationOptions = 16; -pub const NSTableViewAnimationSlideDown: NSTableViewAnimationOptions = 32; -pub const NSTableViewAnimationSlideLeft: NSTableViewAnimationOptions = 48; -pub const NSTableViewAnimationSlideRight: NSTableViewAnimationOptions = 64; +pub const NSTableViewAnimationEffectNone: NSTableViewAnimationOptions = 0x0; +pub const NSTableViewAnimationEffectFade: NSTableViewAnimationOptions = 0x1; +pub const NSTableViewAnimationEffectGap: NSTableViewAnimationOptions = 0x2; +pub const NSTableViewAnimationSlideUp: NSTableViewAnimationOptions = 0x10; +pub const NSTableViewAnimationSlideDown: NSTableViewAnimationOptions = 0x20; +pub const NSTableViewAnimationSlideLeft: NSTableViewAnimationOptions = 0x30; +pub const NSTableViewAnimationSlideRight: NSTableViewAnimationOptions = 0x40; extern_class!( #[derive(Debug)] diff --git a/icrate/src/AppKit/generated/NSText.rs b/icrate/src/AppKit/generated/NSText.rs index 74b80e047..3ca2cad17 100644 --- a/icrate/src/AppKit/generated/NSText.rs +++ b/icrate/src/AppKit/generated/NSText.rs @@ -246,40 +246,40 @@ extern_methods!( } ); -pub const NSEnterCharacter: i32 = 3; -pub const NSBackspaceCharacter: i32 = 8; -pub const NSTabCharacter: i32 = 9; -pub const NSNewlineCharacter: i32 = 10; -pub const NSFormFeedCharacter: i32 = 12; -pub const NSCarriageReturnCharacter: i32 = 13; -pub const NSBackTabCharacter: i32 = 25; -pub const NSDeleteCharacter: i32 = 127; -pub const NSLineSeparatorCharacter: i32 = 8232; -pub const NSParagraphSeparatorCharacter: i32 = 8233; +pub const NSEnterCharacter: i32 = 0x0003; +pub const NSBackspaceCharacter: i32 = 0x0008; +pub const NSTabCharacter: i32 = 0x0009; +pub const NSNewlineCharacter: i32 = 0x000a; +pub const NSFormFeedCharacter: i32 = 0x000c; +pub const NSCarriageReturnCharacter: i32 = 0x000d; +pub const NSBackTabCharacter: i32 = 0x0019; +pub const NSDeleteCharacter: i32 = 0x007f; +pub const NSLineSeparatorCharacter: i32 = 0x2028; +pub const NSParagraphSeparatorCharacter: i32 = 0x2029; pub type NSTextMovement = NSInteger; -pub const NSTextMovementReturn: NSTextMovement = 16; -pub const NSTextMovementTab: NSTextMovement = 17; -pub const NSTextMovementBacktab: NSTextMovement = 18; -pub const NSTextMovementLeft: NSTextMovement = 19; -pub const NSTextMovementRight: NSTextMovement = 20; -pub const NSTextMovementUp: NSTextMovement = 21; -pub const NSTextMovementDown: NSTextMovement = 22; -pub const NSTextMovementCancel: NSTextMovement = 23; +pub const NSTextMovementReturn: NSTextMovement = 0x10; +pub const NSTextMovementTab: NSTextMovement = 0x11; +pub const NSTextMovementBacktab: NSTextMovement = 0x12; +pub const NSTextMovementLeft: NSTextMovement = 0x13; +pub const NSTextMovementRight: NSTextMovement = 0x14; +pub const NSTextMovementUp: NSTextMovement = 0x15; +pub const NSTextMovementDown: NSTextMovement = 0x16; +pub const NSTextMovementCancel: NSTextMovement = 0x17; pub const NSTextMovementOther: NSTextMovement = 0; pub const NSIllegalTextMovement: i32 = 0; -pub const NSReturnTextMovement: i32 = 16; -pub const NSTabTextMovement: i32 = 17; -pub const NSBacktabTextMovement: i32 = 18; -pub const NSLeftTextMovement: i32 = 19; -pub const NSRightTextMovement: i32 = 20; -pub const NSUpTextMovement: i32 = 21; -pub const NSDownTextMovement: i32 = 22; -pub const NSCancelTextMovement: i32 = 23; +pub const NSReturnTextMovement: i32 = 0x10; +pub const NSTabTextMovement: i32 = 0x11; +pub const NSBacktabTextMovement: i32 = 0x12; +pub const NSLeftTextMovement: i32 = 0x13; +pub const NSRightTextMovement: i32 = 0x14; +pub const NSUpTextMovement: i32 = 0x15; +pub const NSDownTextMovement: i32 = 0x16; +pub const NSCancelTextMovement: i32 = 0x17; pub const NSOtherTextMovement: i32 = 0; pub type NSTextDelegate = NSObject; -pub const NSTextWritingDirectionEmbedding: i32 = 0; -pub const NSTextWritingDirectionOverride: i32 = 2; +pub const NSTextWritingDirectionEmbedding: i32 = (0 << 1); +pub const NSTextWritingDirectionOverride: i32 = (1 << 1); diff --git a/icrate/src/AppKit/generated/NSTextAttachment.rs b/icrate/src/AppKit/generated/NSTextAttachment.rs index 3ed3d6dde..154016b2d 100644 --- a/icrate/src/AppKit/generated/NSTextAttachment.rs +++ b/icrate/src/AppKit/generated/NSTextAttachment.rs @@ -5,7 +5,7 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; -pub const NSAttachmentCharacter: i32 = 65532; +pub const NSAttachmentCharacter: i32 = 0xFFFC; pub type NSTextAttachmentContainer = NSObject; diff --git a/icrate/src/AppKit/generated/NSTextContentManager.rs b/icrate/src/AppKit/generated/NSTextContentManager.rs index f6ca14643..074f84582 100644 --- a/icrate/src/AppKit/generated/NSTextContentManager.rs +++ b/icrate/src/AppKit/generated/NSTextContentManager.rs @@ -7,7 +7,8 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSTextContentManagerEnumerationOptions = NSUInteger; pub const NSTextContentManagerEnumerationOptionsNone: NSTextContentManagerEnumerationOptions = 0; -pub const NSTextContentManagerEnumerationOptionsReverse: NSTextContentManagerEnumerationOptions = 1; +pub const NSTextContentManagerEnumerationOptionsReverse: NSTextContentManagerEnumerationOptions = + (1 << 0); pub type NSTextElementProvider = NSObject; diff --git a/icrate/src/AppKit/generated/NSTextLayoutFragment.rs b/icrate/src/AppKit/generated/NSTextLayoutFragment.rs index c7c8f0b3b..8cf2706cc 100644 --- a/icrate/src/AppKit/generated/NSTextLayoutFragment.rs +++ b/icrate/src/AppKit/generated/NSTextLayoutFragment.rs @@ -7,13 +7,14 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSTextLayoutFragmentEnumerationOptions = NSUInteger; pub const NSTextLayoutFragmentEnumerationOptionsNone: NSTextLayoutFragmentEnumerationOptions = 0; -pub const NSTextLayoutFragmentEnumerationOptionsReverse: NSTextLayoutFragmentEnumerationOptions = 1; +pub const NSTextLayoutFragmentEnumerationOptionsReverse: NSTextLayoutFragmentEnumerationOptions = + (1 << 0); pub const NSTextLayoutFragmentEnumerationOptionsEstimatesSize: - NSTextLayoutFragmentEnumerationOptions = 2; + NSTextLayoutFragmentEnumerationOptions = (1 << 1); pub const NSTextLayoutFragmentEnumerationOptionsEnsuresLayout: - NSTextLayoutFragmentEnumerationOptions = 4; + NSTextLayoutFragmentEnumerationOptions = (1 << 2); pub const NSTextLayoutFragmentEnumerationOptionsEnsuresExtraLineFragment: - NSTextLayoutFragmentEnumerationOptions = 8; + NSTextLayoutFragmentEnumerationOptions = (1 << 3); pub type NSTextLayoutFragmentState = NSUInteger; pub const NSTextLayoutFragmentStateNone: NSTextLayoutFragmentState = 0; diff --git a/icrate/src/AppKit/generated/NSTextLayoutManager.rs b/icrate/src/AppKit/generated/NSTextLayoutManager.rs index 16c513a5f..cad2da8fd 100644 --- a/icrate/src/AppKit/generated/NSTextLayoutManager.rs +++ b/icrate/src/AppKit/generated/NSTextLayoutManager.rs @@ -12,14 +12,16 @@ pub const NSTextLayoutManagerSegmentTypeHighlight: NSTextLayoutManagerSegmentTyp pub type NSTextLayoutManagerSegmentOptions = NSUInteger; pub const NSTextLayoutManagerSegmentOptionsNone: NSTextLayoutManagerSegmentOptions = 0; -pub const NSTextLayoutManagerSegmentOptionsRangeNotRequired: NSTextLayoutManagerSegmentOptions = 1; +pub const NSTextLayoutManagerSegmentOptionsRangeNotRequired: NSTextLayoutManagerSegmentOptions = + (1 << 0); pub const NSTextLayoutManagerSegmentOptionsMiddleFragmentsExcluded: - NSTextLayoutManagerSegmentOptions = 2; + NSTextLayoutManagerSegmentOptions = (1 << 1); pub const NSTextLayoutManagerSegmentOptionsHeadSegmentExtended: NSTextLayoutManagerSegmentOptions = - 4; + (1 << 2); pub const NSTextLayoutManagerSegmentOptionsTailSegmentExtended: NSTextLayoutManagerSegmentOptions = - 8; -pub const NSTextLayoutManagerSegmentOptionsUpstreamAffinity: NSTextLayoutManagerSegmentOptions = 16; + (1 << 3); +pub const NSTextLayoutManagerSegmentOptionsUpstreamAffinity: NSTextLayoutManagerSegmentOptions = + (1 << 4); extern_class!( #[derive(Debug)] diff --git a/icrate/src/AppKit/generated/NSTextList.rs b/icrate/src/AppKit/generated/NSTextList.rs index 1bf3ebe9b..4184d1427 100644 --- a/icrate/src/AppKit/generated/NSTextList.rs +++ b/icrate/src/AppKit/generated/NSTextList.rs @@ -8,7 +8,7 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSTextListMarkerFormat = NSString; pub type NSTextListOptions = NSUInteger; -pub const NSTextListPrependEnclosingMarker: NSTextListOptions = 1; +pub const NSTextListPrependEnclosingMarker: NSTextListOptions = (1 << 0); extern_class!( #[derive(Debug)] diff --git a/icrate/src/AppKit/generated/NSTextSelectionNavigation.rs b/icrate/src/AppKit/generated/NSTextSelectionNavigation.rs index f85cae0f3..a80b9e214 100644 --- a/icrate/src/AppKit/generated/NSTextSelectionNavigation.rs +++ b/icrate/src/AppKit/generated/NSTextSelectionNavigation.rs @@ -23,9 +23,9 @@ pub const NSTextSelectionNavigationDestinationContainer: NSTextSelectionNavigati pub const NSTextSelectionNavigationDestinationDocument: NSTextSelectionNavigationDestination = 6; pub type NSTextSelectionNavigationModifier = NSUInteger; -pub const NSTextSelectionNavigationModifierExtend: NSTextSelectionNavigationModifier = 1; -pub const NSTextSelectionNavigationModifierVisual: NSTextSelectionNavigationModifier = 2; -pub const NSTextSelectionNavigationModifierMultiple: NSTextSelectionNavigationModifier = 4; +pub const NSTextSelectionNavigationModifierExtend: NSTextSelectionNavigationModifier = (1 << 0); +pub const NSTextSelectionNavigationModifierVisual: NSTextSelectionNavigationModifier = (1 << 1); +pub const NSTextSelectionNavigationModifierMultiple: NSTextSelectionNavigationModifier = (1 << 2); pub type NSTextSelectionNavigationWritingDirection = NSInteger; pub const NSTextSelectionNavigationWritingDirectionLeftToRight: diff --git a/icrate/src/AppKit/generated/NSTextStorage.rs b/icrate/src/AppKit/generated/NSTextStorage.rs index fb1935400..f31dc7436 100644 --- a/icrate/src/AppKit/generated/NSTextStorage.rs +++ b/icrate/src/AppKit/generated/NSTextStorage.rs @@ -6,8 +6,8 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, extern_methods, ClassType}; pub type NSTextStorageEditActions = NSUInteger; -pub const NSTextStorageEditedAttributes: NSTextStorageEditActions = 1; -pub const NSTextStorageEditedCharacters: NSTextStorageEditActions = 2; +pub const NSTextStorageEditedAttributes: NSTextStorageEditActions = (1 << 0); +pub const NSTextStorageEditedCharacters: NSTextStorageEditActions = (1 << 1); extern_class!( #[derive(Debug)] diff --git a/icrate/src/AppKit/generated/NSTouch.rs b/icrate/src/AppKit/generated/NSTouch.rs index 7b548b17c..b08fe992b 100644 --- a/icrate/src/AppKit/generated/NSTouch.rs +++ b/icrate/src/AppKit/generated/NSTouch.rs @@ -6,21 +6,22 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, extern_methods, ClassType}; pub type NSTouchPhase = NSUInteger; -pub const NSTouchPhaseBegan: NSTouchPhase = 1; -pub const NSTouchPhaseMoved: NSTouchPhase = 2; -pub const NSTouchPhaseStationary: NSTouchPhase = 4; -pub const NSTouchPhaseEnded: NSTouchPhase = 8; -pub const NSTouchPhaseCancelled: NSTouchPhase = 16; -pub const NSTouchPhaseTouching: NSTouchPhase = 7; -pub const NSTouchPhaseAny: NSTouchPhase = -1; +pub const NSTouchPhaseBegan: NSTouchPhase = 1 << 0; +pub const NSTouchPhaseMoved: NSTouchPhase = 1 << 1; +pub const NSTouchPhaseStationary: NSTouchPhase = 1 << 2; +pub const NSTouchPhaseEnded: NSTouchPhase = 1 << 3; +pub const NSTouchPhaseCancelled: NSTouchPhase = 1 << 4; +pub const NSTouchPhaseTouching: NSTouchPhase = + NSTouchPhaseBegan | NSTouchPhaseMoved | NSTouchPhaseStationary; +pub const NSTouchPhaseAny: NSTouchPhase = 18446744073709551615; pub type NSTouchType = NSInteger; pub const NSTouchTypeDirect: NSTouchType = 0; pub const NSTouchTypeIndirect: NSTouchType = 1; pub type NSTouchTypeMask = NSUInteger; -pub const NSTouchTypeMaskDirect: NSTouchTypeMask = 1; -pub const NSTouchTypeMaskIndirect: NSTouchTypeMask = 2; +pub const NSTouchTypeMaskDirect: NSTouchTypeMask = (1 << NSTouchTypeDirect); +pub const NSTouchTypeMaskIndirect: NSTouchTypeMask = (1 << NSTouchTypeIndirect); extern_class!( #[derive(Debug)] diff --git a/icrate/src/AppKit/generated/NSTrackingArea.rs b/icrate/src/AppKit/generated/NSTrackingArea.rs index e6d6791f5..d636a7223 100644 --- a/icrate/src/AppKit/generated/NSTrackingArea.rs +++ b/icrate/src/AppKit/generated/NSTrackingArea.rs @@ -6,16 +6,16 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, extern_methods, ClassType}; pub type NSTrackingAreaOptions = NSUInteger; -pub const NSTrackingMouseEnteredAndExited: NSTrackingAreaOptions = 1; -pub const NSTrackingMouseMoved: NSTrackingAreaOptions = 2; -pub const NSTrackingCursorUpdate: NSTrackingAreaOptions = 4; -pub const NSTrackingActiveWhenFirstResponder: NSTrackingAreaOptions = 16; -pub const NSTrackingActiveInKeyWindow: NSTrackingAreaOptions = 32; -pub const NSTrackingActiveInActiveApp: NSTrackingAreaOptions = 64; -pub const NSTrackingActiveAlways: NSTrackingAreaOptions = 128; -pub const NSTrackingAssumeInside: NSTrackingAreaOptions = 256; -pub const NSTrackingInVisibleRect: NSTrackingAreaOptions = 512; -pub const NSTrackingEnabledDuringMouseDrag: NSTrackingAreaOptions = 1024; +pub const NSTrackingMouseEnteredAndExited: NSTrackingAreaOptions = 0x01; +pub const NSTrackingMouseMoved: NSTrackingAreaOptions = 0x02; +pub const NSTrackingCursorUpdate: NSTrackingAreaOptions = 0x04; +pub const NSTrackingActiveWhenFirstResponder: NSTrackingAreaOptions = 0x10; +pub const NSTrackingActiveInKeyWindow: NSTrackingAreaOptions = 0x20; +pub const NSTrackingActiveInActiveApp: NSTrackingAreaOptions = 0x40; +pub const NSTrackingActiveAlways: NSTrackingAreaOptions = 0x80; +pub const NSTrackingAssumeInside: NSTrackingAreaOptions = 0x100; +pub const NSTrackingInVisibleRect: NSTrackingAreaOptions = 0x200; +pub const NSTrackingEnabledDuringMouseDrag: NSTrackingAreaOptions = 0x400; extern_class!( #[derive(Debug)] diff --git a/icrate/src/AppKit/generated/NSTypesetter.rs b/icrate/src/AppKit/generated/NSTypesetter.rs index 06cd918ff..6d2616f51 100644 --- a/icrate/src/AppKit/generated/NSTypesetter.rs +++ b/icrate/src/AppKit/generated/NSTypesetter.rs @@ -307,12 +307,12 @@ extern_methods!( ); pub type NSTypesetterControlCharacterAction = NSUInteger; -pub const NSTypesetterZeroAdvancementAction: NSTypesetterControlCharacterAction = 1; -pub const NSTypesetterWhitespaceAction: NSTypesetterControlCharacterAction = 2; -pub const NSTypesetterHorizontalTabAction: NSTypesetterControlCharacterAction = 4; -pub const NSTypesetterLineBreakAction: NSTypesetterControlCharacterAction = 8; -pub const NSTypesetterParagraphBreakAction: NSTypesetterControlCharacterAction = 16; -pub const NSTypesetterContainerBreakAction: NSTypesetterControlCharacterAction = 32; +pub const NSTypesetterZeroAdvancementAction: NSTypesetterControlCharacterAction = (1 << 0); +pub const NSTypesetterWhitespaceAction: NSTypesetterControlCharacterAction = (1 << 1); +pub const NSTypesetterHorizontalTabAction: NSTypesetterControlCharacterAction = (1 << 2); +pub const NSTypesetterLineBreakAction: NSTypesetterControlCharacterAction = (1 << 3); +pub const NSTypesetterParagraphBreakAction: NSTypesetterControlCharacterAction = (1 << 4); +pub const NSTypesetterContainerBreakAction: NSTypesetterControlCharacterAction = (1 << 5); extern_methods!( /// NSTypesetter_Deprecated diff --git a/icrate/src/AppKit/generated/NSViewController.rs b/icrate/src/AppKit/generated/NSViewController.rs index d1358284b..4fceb42f5 100644 --- a/icrate/src/AppKit/generated/NSViewController.rs +++ b/icrate/src/AppKit/generated/NSViewController.rs @@ -6,15 +6,16 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, extern_methods, ClassType}; pub type NSViewControllerTransitionOptions = NSUInteger; -pub const NSViewControllerTransitionNone: NSViewControllerTransitionOptions = 0; -pub const NSViewControllerTransitionCrossfade: NSViewControllerTransitionOptions = 1; -pub const NSViewControllerTransitionSlideUp: NSViewControllerTransitionOptions = 16; -pub const NSViewControllerTransitionSlideDown: NSViewControllerTransitionOptions = 32; -pub const NSViewControllerTransitionSlideLeft: NSViewControllerTransitionOptions = 64; -pub const NSViewControllerTransitionSlideRight: NSViewControllerTransitionOptions = 128; -pub const NSViewControllerTransitionSlideForward: NSViewControllerTransitionOptions = 320; -pub const NSViewControllerTransitionSlideBackward: NSViewControllerTransitionOptions = 384; -pub const NSViewControllerTransitionAllowUserInteraction: NSViewControllerTransitionOptions = 4096; +pub const NSViewControllerTransitionNone: NSViewControllerTransitionOptions = 0x0; +pub const NSViewControllerTransitionCrossfade: NSViewControllerTransitionOptions = 0x1; +pub const NSViewControllerTransitionSlideUp: NSViewControllerTransitionOptions = 0x10; +pub const NSViewControllerTransitionSlideDown: NSViewControllerTransitionOptions = 0x20; +pub const NSViewControllerTransitionSlideLeft: NSViewControllerTransitionOptions = 0x40; +pub const NSViewControllerTransitionSlideRight: NSViewControllerTransitionOptions = 0x80; +pub const NSViewControllerTransitionSlideForward: NSViewControllerTransitionOptions = 0x140; +pub const NSViewControllerTransitionSlideBackward: NSViewControllerTransitionOptions = 0x180; +pub const NSViewControllerTransitionAllowUserInteraction: NSViewControllerTransitionOptions = + 0x1000; extern_class!( #[derive(Debug)] diff --git a/icrate/src/AppKit/generated/NSWindow.rs b/icrate/src/AppKit/generated/NSWindow.rs index 87ef8cb42..8fd8b459b 100644 --- a/icrate/src/AppKit/generated/NSWindow.rs +++ b/icrate/src/AppKit/generated/NSWindow.rs @@ -7,18 +7,18 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSWindowStyleMask = NSUInteger; pub const NSWindowStyleMaskBorderless: NSWindowStyleMask = 0; -pub const NSWindowStyleMaskTitled: NSWindowStyleMask = 1; -pub const NSWindowStyleMaskClosable: NSWindowStyleMask = 2; -pub const NSWindowStyleMaskMiniaturizable: NSWindowStyleMask = 4; -pub const NSWindowStyleMaskResizable: NSWindowStyleMask = 8; -pub const NSWindowStyleMaskTexturedBackground: NSWindowStyleMask = 256; -pub const NSWindowStyleMaskUnifiedTitleAndToolbar: NSWindowStyleMask = 4096; -pub const NSWindowStyleMaskFullScreen: NSWindowStyleMask = 16384; -pub const NSWindowStyleMaskFullSizeContentView: NSWindowStyleMask = 32768; -pub const NSWindowStyleMaskUtilityWindow: NSWindowStyleMask = 16; -pub const NSWindowStyleMaskDocModalWindow: NSWindowStyleMask = 64; -pub const NSWindowStyleMaskNonactivatingPanel: NSWindowStyleMask = 128; -pub const NSWindowStyleMaskHUDWindow: NSWindowStyleMask = 8192; +pub const NSWindowStyleMaskTitled: NSWindowStyleMask = 1 << 0; +pub const NSWindowStyleMaskClosable: NSWindowStyleMask = 1 << 1; +pub const NSWindowStyleMaskMiniaturizable: NSWindowStyleMask = 1 << 2; +pub const NSWindowStyleMaskResizable: NSWindowStyleMask = 1 << 3; +pub const NSWindowStyleMaskTexturedBackground: NSWindowStyleMask = 1 << 8; +pub const NSWindowStyleMaskUnifiedTitleAndToolbar: NSWindowStyleMask = 1 << 12; +pub const NSWindowStyleMaskFullScreen: NSWindowStyleMask = 1 << 14; +pub const NSWindowStyleMaskFullSizeContentView: NSWindowStyleMask = 1 << 15; +pub const NSWindowStyleMaskUtilityWindow: NSWindowStyleMask = 1 << 4; +pub const NSWindowStyleMaskDocModalWindow: NSWindowStyleMask = 1 << 6; +pub const NSWindowStyleMaskNonactivatingPanel: NSWindowStyleMask = 1 << 7; +pub const NSWindowStyleMaskHUDWindow: NSWindowStyleMask = 1 << 13; pub const NSDisplayWindowRunLoopOrdering: i32 = 600000; pub const NSResetCursorRectsRunLoopOrdering: i32 = 700000; @@ -30,18 +30,18 @@ pub const NSWindowSharingReadWrite: NSWindowSharingType = 2; pub type NSWindowCollectionBehavior = NSUInteger; pub const NSWindowCollectionBehaviorDefault: NSWindowCollectionBehavior = 0; -pub const NSWindowCollectionBehaviorCanJoinAllSpaces: NSWindowCollectionBehavior = 1; -pub const NSWindowCollectionBehaviorMoveToActiveSpace: NSWindowCollectionBehavior = 2; -pub const NSWindowCollectionBehaviorManaged: NSWindowCollectionBehavior = 4; -pub const NSWindowCollectionBehaviorTransient: NSWindowCollectionBehavior = 8; -pub const NSWindowCollectionBehaviorStationary: NSWindowCollectionBehavior = 16; -pub const NSWindowCollectionBehaviorParticipatesInCycle: NSWindowCollectionBehavior = 32; -pub const NSWindowCollectionBehaviorIgnoresCycle: NSWindowCollectionBehavior = 64; -pub const NSWindowCollectionBehaviorFullScreenPrimary: NSWindowCollectionBehavior = 128; -pub const NSWindowCollectionBehaviorFullScreenAuxiliary: NSWindowCollectionBehavior = 256; -pub const NSWindowCollectionBehaviorFullScreenNone: NSWindowCollectionBehavior = 512; -pub const NSWindowCollectionBehaviorFullScreenAllowsTiling: NSWindowCollectionBehavior = 2048; -pub const NSWindowCollectionBehaviorFullScreenDisallowsTiling: NSWindowCollectionBehavior = 4096; +pub const NSWindowCollectionBehaviorCanJoinAllSpaces: NSWindowCollectionBehavior = 1 << 0; +pub const NSWindowCollectionBehaviorMoveToActiveSpace: NSWindowCollectionBehavior = 1 << 1; +pub const NSWindowCollectionBehaviorManaged: NSWindowCollectionBehavior = 1 << 2; +pub const NSWindowCollectionBehaviorTransient: NSWindowCollectionBehavior = 1 << 3; +pub const NSWindowCollectionBehaviorStationary: NSWindowCollectionBehavior = 1 << 4; +pub const NSWindowCollectionBehaviorParticipatesInCycle: NSWindowCollectionBehavior = 1 << 5; +pub const NSWindowCollectionBehaviorIgnoresCycle: NSWindowCollectionBehavior = 1 << 6; +pub const NSWindowCollectionBehaviorFullScreenPrimary: NSWindowCollectionBehavior = 1 << 7; +pub const NSWindowCollectionBehaviorFullScreenAuxiliary: NSWindowCollectionBehavior = 1 << 8; +pub const NSWindowCollectionBehaviorFullScreenNone: NSWindowCollectionBehavior = 1 << 9; +pub const NSWindowCollectionBehaviorFullScreenAllowsTiling: NSWindowCollectionBehavior = 1 << 11; +pub const NSWindowCollectionBehaviorFullScreenDisallowsTiling: NSWindowCollectionBehavior = 1 << 12; pub type NSWindowAnimationBehavior = NSInteger; pub const NSWindowAnimationBehaviorDefault: NSWindowAnimationBehavior = 0; @@ -51,11 +51,11 @@ pub const NSWindowAnimationBehaviorUtilityWindow: NSWindowAnimationBehavior = 4; pub const NSWindowAnimationBehaviorAlertPanel: NSWindowAnimationBehavior = 5; pub type NSWindowNumberListOptions = NSUInteger; -pub const NSWindowNumberListAllApplications: NSWindowNumberListOptions = 1; -pub const NSWindowNumberListAllSpaces: NSWindowNumberListOptions = 16; +pub const NSWindowNumberListAllApplications: NSWindowNumberListOptions = 1 << 0; +pub const NSWindowNumberListAllSpaces: NSWindowNumberListOptions = 1 << 4; pub type NSWindowOcclusionState = NSUInteger; -pub const NSWindowOcclusionStateVisible: NSWindowOcclusionState = 2; +pub const NSWindowOcclusionStateVisible: NSWindowOcclusionState = 1 << 1; pub type NSWindowLevel = NSInteger; diff --git a/icrate/src/AppKit/generated/NSWorkspace.rs b/icrate/src/AppKit/generated/NSWorkspace.rs index db9f7a920..257ea4592 100644 --- a/icrate/src/AppKit/generated/NSWorkspace.rs +++ b/icrate/src/AppKit/generated/NSWorkspace.rs @@ -6,8 +6,8 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, extern_methods, ClassType}; pub type NSWorkspaceIconCreationOptions = NSUInteger; -pub const NSExcludeQuickDrawElementsIconCreationOption: NSWorkspaceIconCreationOptions = 2; -pub const NSExclude10_4ElementsIconCreationOption: NSWorkspaceIconCreationOptions = 4; +pub const NSExcludeQuickDrawElementsIconCreationOption: NSWorkspaceIconCreationOptions = 1 << 1; +pub const NSExclude10_4ElementsIconCreationOption: NSWorkspaceIconCreationOptions = 1 << 2; extern_class!( #[derive(Debug)] @@ -379,18 +379,18 @@ extern_methods!( pub type NSWorkspaceFileOperationName = NSString; pub type NSWorkspaceLaunchOptions = NSUInteger; -pub const NSWorkspaceLaunchAndPrint: NSWorkspaceLaunchOptions = 2; -pub const NSWorkspaceLaunchWithErrorPresentation: NSWorkspaceLaunchOptions = 64; -pub const NSWorkspaceLaunchInhibitingBackgroundOnly: NSWorkspaceLaunchOptions = 128; -pub const NSWorkspaceLaunchWithoutAddingToRecents: NSWorkspaceLaunchOptions = 256; -pub const NSWorkspaceLaunchWithoutActivation: NSWorkspaceLaunchOptions = 512; -pub const NSWorkspaceLaunchAsync: NSWorkspaceLaunchOptions = 65536; -pub const NSWorkspaceLaunchNewInstance: NSWorkspaceLaunchOptions = 524288; -pub const NSWorkspaceLaunchAndHide: NSWorkspaceLaunchOptions = 1048576; -pub const NSWorkspaceLaunchAndHideOthers: NSWorkspaceLaunchOptions = 2097152; -pub const NSWorkspaceLaunchDefault: NSWorkspaceLaunchOptions = 65536; -pub const NSWorkspaceLaunchAllowingClassicStartup: NSWorkspaceLaunchOptions = 131072; -pub const NSWorkspaceLaunchPreferringClassic: NSWorkspaceLaunchOptions = 262144; +pub const NSWorkspaceLaunchAndPrint: NSWorkspaceLaunchOptions = 0x00000002; +pub const NSWorkspaceLaunchWithErrorPresentation: NSWorkspaceLaunchOptions = 0x00000040; +pub const NSWorkspaceLaunchInhibitingBackgroundOnly: NSWorkspaceLaunchOptions = 0x00000080; +pub const NSWorkspaceLaunchWithoutAddingToRecents: NSWorkspaceLaunchOptions = 0x00000100; +pub const NSWorkspaceLaunchWithoutActivation: NSWorkspaceLaunchOptions = 0x00000200; +pub const NSWorkspaceLaunchAsync: NSWorkspaceLaunchOptions = 0x00010000; +pub const NSWorkspaceLaunchNewInstance: NSWorkspaceLaunchOptions = 0x00080000; +pub const NSWorkspaceLaunchAndHide: NSWorkspaceLaunchOptions = 0x00100000; +pub const NSWorkspaceLaunchAndHideOthers: NSWorkspaceLaunchOptions = 0x00200000; +pub const NSWorkspaceLaunchDefault: NSWorkspaceLaunchOptions = NSWorkspaceLaunchAsync; +pub const NSWorkspaceLaunchAllowingClassicStartup: NSWorkspaceLaunchOptions = 0x00020000; +pub const NSWorkspaceLaunchPreferringClassic: NSWorkspaceLaunchOptions = 0x00040000; pub type NSWorkspaceLaunchConfigurationKey = NSString; diff --git a/icrate/src/Foundation/generated/NSAppleEventDescriptor.rs b/icrate/src/Foundation/generated/NSAppleEventDescriptor.rs index b13576d4e..f83f70d72 100644 --- a/icrate/src/Foundation/generated/NSAppleEventDescriptor.rs +++ b/icrate/src/Foundation/generated/NSAppleEventDescriptor.rs @@ -6,17 +6,19 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, extern_methods, ClassType}; pub type NSAppleEventSendOptions = NSUInteger; -pub const NSAppleEventSendNoReply: NSAppleEventSendOptions = 1; -pub const NSAppleEventSendQueueReply: NSAppleEventSendOptions = 2; -pub const NSAppleEventSendWaitForReply: NSAppleEventSendOptions = 3; -pub const NSAppleEventSendNeverInteract: NSAppleEventSendOptions = 16; -pub const NSAppleEventSendCanInteract: NSAppleEventSendOptions = 32; -pub const NSAppleEventSendAlwaysInteract: NSAppleEventSendOptions = 48; -pub const NSAppleEventSendCanSwitchLayer: NSAppleEventSendOptions = 64; -pub const NSAppleEventSendDontRecord: NSAppleEventSendOptions = 4096; -pub const NSAppleEventSendDontExecute: NSAppleEventSendOptions = 8192; -pub const NSAppleEventSendDontAnnotate: NSAppleEventSendOptions = 65536; -pub const NSAppleEventSendDefaultOptions: NSAppleEventSendOptions = 35; +pub const NSAppleEventSendNoReply: NSAppleEventSendOptions = kAENoReply; +pub const NSAppleEventSendQueueReply: NSAppleEventSendOptions = kAEQueueReply; +pub const NSAppleEventSendWaitForReply: NSAppleEventSendOptions = kAEWaitReply; +pub const NSAppleEventSendNeverInteract: NSAppleEventSendOptions = kAENeverInteract; +pub const NSAppleEventSendCanInteract: NSAppleEventSendOptions = kAECanInteract; +pub const NSAppleEventSendAlwaysInteract: NSAppleEventSendOptions = kAEAlwaysInteract; +pub const NSAppleEventSendCanSwitchLayer: NSAppleEventSendOptions = kAECanSwitchLayer; +pub const NSAppleEventSendDontRecord: NSAppleEventSendOptions = kAEDontRecord; +pub const NSAppleEventSendDontExecute: NSAppleEventSendOptions = kAEDontExecute; +pub const NSAppleEventSendDontAnnotate: NSAppleEventSendOptions = + kAEDoNotAutomaticallyAddAnnotationsToEvent; +pub const NSAppleEventSendDefaultOptions: NSAppleEventSendOptions = + NSAppleEventSendWaitForReply | NSAppleEventSendCanInteract; extern_class!( #[derive(Debug)] diff --git a/icrate/src/Foundation/generated/NSArray.rs b/icrate/src/Foundation/generated/NSArray.rs index b20fd1765..d0450e2ec 100644 --- a/icrate/src/Foundation/generated/NSArray.rs +++ b/icrate/src/Foundation/generated/NSArray.rs @@ -38,9 +38,9 @@ extern_methods!( ); pub type NSBinarySearchingOptions = NSUInteger; -pub const NSBinarySearchingFirstEqual: NSBinarySearchingOptions = 256; -pub const NSBinarySearchingLastEqual: NSBinarySearchingOptions = 512; -pub const NSBinarySearchingInsertionIndex: NSBinarySearchingOptions = 1024; +pub const NSBinarySearchingFirstEqual: NSBinarySearchingOptions = (1 << 8); +pub const NSBinarySearchingLastEqual: NSBinarySearchingOptions = (1 << 9); +pub const NSBinarySearchingInsertionIndex: NSBinarySearchingOptions = (1 << 10); extern_methods!( /// NSExtendedArray diff --git a/icrate/src/Foundation/generated/NSAttributedString.rs b/icrate/src/Foundation/generated/NSAttributedString.rs index ab95da0e3..a2a916c83 100644 --- a/icrate/src/Foundation/generated/NSAttributedString.rs +++ b/icrate/src/Foundation/generated/NSAttributedString.rs @@ -31,9 +31,9 @@ extern_methods!( ); pub type NSAttributedStringEnumerationOptions = NSUInteger; -pub const NSAttributedStringEnumerationReverse: NSAttributedStringEnumerationOptions = 2; +pub const NSAttributedStringEnumerationReverse: NSAttributedStringEnumerationOptions = (1 << 1); pub const NSAttributedStringEnumerationLongestEffectiveRangeNotRequired: - NSAttributedStringEnumerationOptions = 1048576; + NSAttributedStringEnumerationOptions = (1 << 20); extern_methods!( /// NSExtendedAttributedString @@ -189,14 +189,14 @@ extern_methods!( ); pub type NSInlinePresentationIntent = NSUInteger; -pub const NSInlinePresentationIntentEmphasized: NSInlinePresentationIntent = 1; -pub const NSInlinePresentationIntentStronglyEmphasized: NSInlinePresentationIntent = 2; -pub const NSInlinePresentationIntentCode: NSInlinePresentationIntent = 4; -pub const NSInlinePresentationIntentStrikethrough: NSInlinePresentationIntent = 32; -pub const NSInlinePresentationIntentSoftBreak: NSInlinePresentationIntent = 64; -pub const NSInlinePresentationIntentLineBreak: NSInlinePresentationIntent = 128; -pub const NSInlinePresentationIntentInlineHTML: NSInlinePresentationIntent = 256; -pub const NSInlinePresentationIntentBlockHTML: NSInlinePresentationIntent = 512; +pub const NSInlinePresentationIntentEmphasized: NSInlinePresentationIntent = 1 << 0; +pub const NSInlinePresentationIntentStronglyEmphasized: NSInlinePresentationIntent = 1 << 1; +pub const NSInlinePresentationIntentCode: NSInlinePresentationIntent = 1 << 2; +pub const NSInlinePresentationIntentStrikethrough: NSInlinePresentationIntent = 1 << 5; +pub const NSInlinePresentationIntentSoftBreak: NSInlinePresentationIntent = 1 << 6; +pub const NSInlinePresentationIntentLineBreak: NSInlinePresentationIntent = 1 << 7; +pub const NSInlinePresentationIntentInlineHTML: NSInlinePresentationIntent = 1 << 8; +pub const NSInlinePresentationIntentBlockHTML: NSInlinePresentationIntent = 1 << 9; pub type NSAttributedStringMarkdownParsingFailurePolicy = NSInteger; pub const NSAttributedStringMarkdownParsingFailureReturnError: @@ -289,9 +289,9 @@ extern_methods!( pub type NSAttributedStringFormattingOptions = NSUInteger; pub const NSAttributedStringFormattingInsertArgumentAttributesWithoutMerging: - NSAttributedStringFormattingOptions = 1; + NSAttributedStringFormattingOptions = 1 << 0; pub const NSAttributedStringFormattingApplyReplacementIndexAttribute: - NSAttributedStringFormattingOptions = 2; + NSAttributedStringFormattingOptions = 1 << 1; extern_methods!( /// NSAttributedStringFormatting diff --git a/icrate/src/Foundation/generated/NSBundle.rs b/icrate/src/Foundation/generated/NSBundle.rs index 5d663d286..9c6643387 100644 --- a/icrate/src/Foundation/generated/NSBundle.rs +++ b/icrate/src/Foundation/generated/NSBundle.rs @@ -5,11 +5,11 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; -pub const NSBundleExecutableArchitectureI386: i32 = 7; -pub const NSBundleExecutableArchitecturePPC: i32 = 18; -pub const NSBundleExecutableArchitectureX86_64: i32 = 16777223; -pub const NSBundleExecutableArchitecturePPC64: i32 = 16777234; -pub const NSBundleExecutableArchitectureARM64: i32 = 16777228; +pub const NSBundleExecutableArchitectureI386: i32 = 0x00000007; +pub const NSBundleExecutableArchitecturePPC: i32 = 0x00000012; +pub const NSBundleExecutableArchitectureX86_64: i32 = 0x01000007; +pub const NSBundleExecutableArchitecturePPC64: i32 = 0x01000012; +pub const NSBundleExecutableArchitectureARM64: i32 = 0x0100000c; extern_class!( #[derive(Debug)] diff --git a/icrate/src/Foundation/generated/NSByteCountFormatter.rs b/icrate/src/Foundation/generated/NSByteCountFormatter.rs index 5fa652e45..3b49639c8 100644 --- a/icrate/src/Foundation/generated/NSByteCountFormatter.rs +++ b/icrate/src/Foundation/generated/NSByteCountFormatter.rs @@ -7,16 +7,16 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSByteCountFormatterUnits = NSUInteger; pub const NSByteCountFormatterUseDefault: NSByteCountFormatterUnits = 0; -pub const NSByteCountFormatterUseBytes: NSByteCountFormatterUnits = 1; -pub const NSByteCountFormatterUseKB: NSByteCountFormatterUnits = 2; -pub const NSByteCountFormatterUseMB: NSByteCountFormatterUnits = 4; -pub const NSByteCountFormatterUseGB: NSByteCountFormatterUnits = 8; -pub const NSByteCountFormatterUseTB: NSByteCountFormatterUnits = 16; -pub const NSByteCountFormatterUsePB: NSByteCountFormatterUnits = 32; -pub const NSByteCountFormatterUseEB: NSByteCountFormatterUnits = 64; -pub const NSByteCountFormatterUseZB: NSByteCountFormatterUnits = 128; -pub const NSByteCountFormatterUseYBOrHigher: NSByteCountFormatterUnits = 65280; -pub const NSByteCountFormatterUseAll: NSByteCountFormatterUnits = 65535; +pub const NSByteCountFormatterUseBytes: NSByteCountFormatterUnits = 1 << 0; +pub const NSByteCountFormatterUseKB: NSByteCountFormatterUnits = 1 << 1; +pub const NSByteCountFormatterUseMB: NSByteCountFormatterUnits = 1 << 2; +pub const NSByteCountFormatterUseGB: NSByteCountFormatterUnits = 1 << 3; +pub const NSByteCountFormatterUseTB: NSByteCountFormatterUnits = 1 << 4; +pub const NSByteCountFormatterUsePB: NSByteCountFormatterUnits = 1 << 5; +pub const NSByteCountFormatterUseEB: NSByteCountFormatterUnits = 1 << 6; +pub const NSByteCountFormatterUseZB: NSByteCountFormatterUnits = 1 << 7; +pub const NSByteCountFormatterUseYBOrHigher: NSByteCountFormatterUnits = 0x0FF << 8; +pub const NSByteCountFormatterUseAll: NSByteCountFormatterUnits = 0x0FFFF; pub type NSByteCountFormatterCountStyle = NSInteger; pub const NSByteCountFormatterCountStyleFile: NSByteCountFormatterCountStyle = 0; diff --git a/icrate/src/Foundation/generated/NSByteOrder.rs b/icrate/src/Foundation/generated/NSByteOrder.rs index 01f0f4bb4..8d55ca424 100644 --- a/icrate/src/Foundation/generated/NSByteOrder.rs +++ b/icrate/src/Foundation/generated/NSByteOrder.rs @@ -5,6 +5,6 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; -pub const NS_UnknownByteOrder: i32 = 0; -pub const NS_LittleEndian: i32 = 1; -pub const NS_BigEndian: i32 = 2; +pub const NS_UnknownByteOrder: i32 = CFByteOrderUnknown; +pub const NS_LittleEndian: i32 = CFByteOrderLittleEndian; +pub const NS_BigEndian: i32 = CFByteOrderBigEndian; diff --git a/icrate/src/Foundation/generated/NSCalendar.rs b/icrate/src/Foundation/generated/NSCalendar.rs index eef303031..de0e90637 100644 --- a/icrate/src/Foundation/generated/NSCalendar.rs +++ b/icrate/src/Foundation/generated/NSCalendar.rs @@ -8,50 +8,50 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSCalendarIdentifier = NSString; pub type NSCalendarUnit = NSUInteger; -pub const NSCalendarUnitEra: NSCalendarUnit = 2; -pub const NSCalendarUnitYear: NSCalendarUnit = 4; -pub const NSCalendarUnitMonth: NSCalendarUnit = 8; -pub const NSCalendarUnitDay: NSCalendarUnit = 16; -pub const NSCalendarUnitHour: NSCalendarUnit = 32; -pub const NSCalendarUnitMinute: NSCalendarUnit = 64; -pub const NSCalendarUnitSecond: NSCalendarUnit = 128; -pub const NSCalendarUnitWeekday: NSCalendarUnit = 512; -pub const NSCalendarUnitWeekdayOrdinal: NSCalendarUnit = 1024; -pub const NSCalendarUnitQuarter: NSCalendarUnit = 2048; -pub const NSCalendarUnitWeekOfMonth: NSCalendarUnit = 4096; -pub const NSCalendarUnitWeekOfYear: NSCalendarUnit = 8192; -pub const NSCalendarUnitYearForWeekOfYear: NSCalendarUnit = 16384; -pub const NSCalendarUnitNanosecond: NSCalendarUnit = 32768; -pub const NSCalendarUnitCalendar: NSCalendarUnit = 1048576; -pub const NSCalendarUnitTimeZone: NSCalendarUnit = 2097152; -pub const NSEraCalendarUnit: NSCalendarUnit = 2; -pub const NSYearCalendarUnit: NSCalendarUnit = 4; -pub const NSMonthCalendarUnit: NSCalendarUnit = 8; -pub const NSDayCalendarUnit: NSCalendarUnit = 16; -pub const NSHourCalendarUnit: NSCalendarUnit = 32; -pub const NSMinuteCalendarUnit: NSCalendarUnit = 64; -pub const NSSecondCalendarUnit: NSCalendarUnit = 128; -pub const NSWeekCalendarUnit: NSCalendarUnit = 256; -pub const NSWeekdayCalendarUnit: NSCalendarUnit = 512; -pub const NSWeekdayOrdinalCalendarUnit: NSCalendarUnit = 1024; -pub const NSQuarterCalendarUnit: NSCalendarUnit = 2048; -pub const NSWeekOfMonthCalendarUnit: NSCalendarUnit = 4096; -pub const NSWeekOfYearCalendarUnit: NSCalendarUnit = 8192; -pub const NSYearForWeekOfYearCalendarUnit: NSCalendarUnit = 16384; -pub const NSCalendarCalendarUnit: NSCalendarUnit = 1048576; -pub const NSTimeZoneCalendarUnit: NSCalendarUnit = 2097152; +pub const NSCalendarUnitEra: NSCalendarUnit = kCFCalendarUnitEra; +pub const NSCalendarUnitYear: NSCalendarUnit = kCFCalendarUnitYear; +pub const NSCalendarUnitMonth: NSCalendarUnit = kCFCalendarUnitMonth; +pub const NSCalendarUnitDay: NSCalendarUnit = kCFCalendarUnitDay; +pub const NSCalendarUnitHour: NSCalendarUnit = kCFCalendarUnitHour; +pub const NSCalendarUnitMinute: NSCalendarUnit = kCFCalendarUnitMinute; +pub const NSCalendarUnitSecond: NSCalendarUnit = kCFCalendarUnitSecond; +pub const NSCalendarUnitWeekday: NSCalendarUnit = kCFCalendarUnitWeekday; +pub const NSCalendarUnitWeekdayOrdinal: NSCalendarUnit = kCFCalendarUnitWeekdayOrdinal; +pub const NSCalendarUnitQuarter: NSCalendarUnit = kCFCalendarUnitQuarter; +pub const NSCalendarUnitWeekOfMonth: NSCalendarUnit = kCFCalendarUnitWeekOfMonth; +pub const NSCalendarUnitWeekOfYear: NSCalendarUnit = kCFCalendarUnitWeekOfYear; +pub const NSCalendarUnitYearForWeekOfYear: NSCalendarUnit = kCFCalendarUnitYearForWeekOfYear; +pub const NSCalendarUnitNanosecond: NSCalendarUnit = (1 << 15); +pub const NSCalendarUnitCalendar: NSCalendarUnit = (1 << 20); +pub const NSCalendarUnitTimeZone: NSCalendarUnit = (1 << 21); +pub const NSEraCalendarUnit: NSCalendarUnit = NSCalendarUnitEra; +pub const NSYearCalendarUnit: NSCalendarUnit = NSCalendarUnitYear; +pub const NSMonthCalendarUnit: NSCalendarUnit = NSCalendarUnitMonth; +pub const NSDayCalendarUnit: NSCalendarUnit = NSCalendarUnitDay; +pub const NSHourCalendarUnit: NSCalendarUnit = NSCalendarUnitHour; +pub const NSMinuteCalendarUnit: NSCalendarUnit = NSCalendarUnitMinute; +pub const NSSecondCalendarUnit: NSCalendarUnit = NSCalendarUnitSecond; +pub const NSWeekCalendarUnit: NSCalendarUnit = kCFCalendarUnitWeek; +pub const NSWeekdayCalendarUnit: NSCalendarUnit = NSCalendarUnitWeekday; +pub const NSWeekdayOrdinalCalendarUnit: NSCalendarUnit = NSCalendarUnitWeekdayOrdinal; +pub const NSQuarterCalendarUnit: NSCalendarUnit = NSCalendarUnitQuarter; +pub const NSWeekOfMonthCalendarUnit: NSCalendarUnit = NSCalendarUnitWeekOfMonth; +pub const NSWeekOfYearCalendarUnit: NSCalendarUnit = NSCalendarUnitWeekOfYear; +pub const NSYearForWeekOfYearCalendarUnit: NSCalendarUnit = NSCalendarUnitYearForWeekOfYear; +pub const NSCalendarCalendarUnit: NSCalendarUnit = NSCalendarUnitCalendar; +pub const NSTimeZoneCalendarUnit: NSCalendarUnit = NSCalendarUnitTimeZone; pub type NSCalendarOptions = NSUInteger; -pub const NSCalendarWrapComponents: NSCalendarOptions = 1; -pub const NSCalendarMatchStrictly: NSCalendarOptions = 2; -pub const NSCalendarSearchBackwards: NSCalendarOptions = 4; -pub const NSCalendarMatchPreviousTimePreservingSmallerUnits: NSCalendarOptions = 256; -pub const NSCalendarMatchNextTimePreservingSmallerUnits: NSCalendarOptions = 512; -pub const NSCalendarMatchNextTime: NSCalendarOptions = 1024; -pub const NSCalendarMatchFirst: NSCalendarOptions = 4096; -pub const NSCalendarMatchLast: NSCalendarOptions = 8192; +pub const NSCalendarWrapComponents: NSCalendarOptions = (1 << 0); +pub const NSCalendarMatchStrictly: NSCalendarOptions = (1 << 1); +pub const NSCalendarSearchBackwards: NSCalendarOptions = (1 << 2); +pub const NSCalendarMatchPreviousTimePreservingSmallerUnits: NSCalendarOptions = (1 << 8); +pub const NSCalendarMatchNextTimePreservingSmallerUnits: NSCalendarOptions = (1 << 9); +pub const NSCalendarMatchNextTime: NSCalendarOptions = (1 << 10); +pub const NSCalendarMatchFirst: NSCalendarOptions = (1 << 12); +pub const NSCalendarMatchLast: NSCalendarOptions = (1 << 13); -pub const NSWrapCalendarComponents: i32 = 1; +pub const NSWrapCalendarComponents: i32 = NSCalendarWrapComponents; extern_class!( #[derive(Debug)] @@ -432,7 +432,7 @@ extern_methods!( ); pub const NSDateComponentUndefined: i32 = 9223372036854775807; -pub const NSUndefinedDateComponent: i32 = 9223372036854775807; +pub const NSUndefinedDateComponent: i32 = NSDateComponentUndefined; extern_class!( #[derive(Debug)] diff --git a/icrate/src/Foundation/generated/NSCharacterSet.rs b/icrate/src/Foundation/generated/NSCharacterSet.rs index 0ddf323ca..69a29ae9b 100644 --- a/icrate/src/Foundation/generated/NSCharacterSet.rs +++ b/icrate/src/Foundation/generated/NSCharacterSet.rs @@ -5,7 +5,7 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; -pub const NSOpenStepUnicodeReservedBase: i32 = 62464; +pub const NSOpenStepUnicodeReservedBase: i32 = 0xF400; extern_class!( #[derive(Debug)] diff --git a/icrate/src/Foundation/generated/NSComparisonPredicate.rs b/icrate/src/Foundation/generated/NSComparisonPredicate.rs index 38b1c0fe5..9fa1069f6 100644 --- a/icrate/src/Foundation/generated/NSComparisonPredicate.rs +++ b/icrate/src/Foundation/generated/NSComparisonPredicate.rs @@ -6,9 +6,9 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, extern_methods, ClassType}; pub type NSComparisonPredicateOptions = NSUInteger; -pub const NSCaseInsensitivePredicateOption: NSComparisonPredicateOptions = 1; -pub const NSDiacriticInsensitivePredicateOption: NSComparisonPredicateOptions = 2; -pub const NSNormalizedPredicateOption: NSComparisonPredicateOptions = 4; +pub const NSCaseInsensitivePredicateOption: NSComparisonPredicateOptions = 0x01; +pub const NSDiacriticInsensitivePredicateOption: NSComparisonPredicateOptions = 0x02; +pub const NSNormalizedPredicateOption: NSComparisonPredicateOptions = 0x04; pub type NSComparisonPredicateModifier = NSUInteger; pub const NSDirectPredicateModifier: NSComparisonPredicateModifier = 0; diff --git a/icrate/src/Foundation/generated/NSData.rs b/icrate/src/Foundation/generated/NSData.rs index 686971af9..d99c4808a 100644 --- a/icrate/src/Foundation/generated/NSData.rs +++ b/icrate/src/Foundation/generated/NSData.rs @@ -6,36 +6,36 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, extern_methods, ClassType}; pub type NSDataReadingOptions = NSUInteger; -pub const NSDataReadingMappedIfSafe: NSDataReadingOptions = 1; -pub const NSDataReadingUncached: NSDataReadingOptions = 2; -pub const NSDataReadingMappedAlways: NSDataReadingOptions = 8; -pub const NSDataReadingMapped: NSDataReadingOptions = 1; -pub const NSMappedRead: NSDataReadingOptions = 1; -pub const NSUncachedRead: NSDataReadingOptions = 2; +pub const NSDataReadingMappedIfSafe: NSDataReadingOptions = 1 << 0; +pub const NSDataReadingUncached: NSDataReadingOptions = 1 << 1; +pub const NSDataReadingMappedAlways: NSDataReadingOptions = 1 << 3; +pub const NSDataReadingMapped: NSDataReadingOptions = NSDataReadingMappedIfSafe; +pub const NSMappedRead: NSDataReadingOptions = NSDataReadingMapped; +pub const NSUncachedRead: NSDataReadingOptions = NSDataReadingUncached; pub type NSDataWritingOptions = NSUInteger; -pub const NSDataWritingAtomic: NSDataWritingOptions = 1; -pub const NSDataWritingWithoutOverwriting: NSDataWritingOptions = 2; -pub const NSDataWritingFileProtectionNone: NSDataWritingOptions = 268435456; -pub const NSDataWritingFileProtectionComplete: NSDataWritingOptions = 536870912; -pub const NSDataWritingFileProtectionCompleteUnlessOpen: NSDataWritingOptions = 805306368; +pub const NSDataWritingAtomic: NSDataWritingOptions = 1 << 0; +pub const NSDataWritingWithoutOverwriting: NSDataWritingOptions = 1 << 1; +pub const NSDataWritingFileProtectionNone: NSDataWritingOptions = 0x10000000; +pub const NSDataWritingFileProtectionComplete: NSDataWritingOptions = 0x20000000; +pub const NSDataWritingFileProtectionCompleteUnlessOpen: NSDataWritingOptions = 0x30000000; pub const NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication: NSDataWritingOptions = - 1073741824; -pub const NSDataWritingFileProtectionMask: NSDataWritingOptions = 4026531840; -pub const NSAtomicWrite: NSDataWritingOptions = 1; + 0x40000000; +pub const NSDataWritingFileProtectionMask: NSDataWritingOptions = 0xf0000000; +pub const NSAtomicWrite: NSDataWritingOptions = NSDataWritingAtomic; pub type NSDataSearchOptions = NSUInteger; -pub const NSDataSearchBackwards: NSDataSearchOptions = 1; -pub const NSDataSearchAnchored: NSDataSearchOptions = 2; +pub const NSDataSearchBackwards: NSDataSearchOptions = 1 << 0; +pub const NSDataSearchAnchored: NSDataSearchOptions = 1 << 1; pub type NSDataBase64EncodingOptions = NSUInteger; -pub const NSDataBase64Encoding64CharacterLineLength: NSDataBase64EncodingOptions = 1; -pub const NSDataBase64Encoding76CharacterLineLength: NSDataBase64EncodingOptions = 2; -pub const NSDataBase64EncodingEndLineWithCarriageReturn: NSDataBase64EncodingOptions = 16; -pub const NSDataBase64EncodingEndLineWithLineFeed: NSDataBase64EncodingOptions = 32; +pub const NSDataBase64Encoding64CharacterLineLength: NSDataBase64EncodingOptions = 1 << 0; +pub const NSDataBase64Encoding76CharacterLineLength: NSDataBase64EncodingOptions = 1 << 1; +pub const NSDataBase64EncodingEndLineWithCarriageReturn: NSDataBase64EncodingOptions = 1 << 4; +pub const NSDataBase64EncodingEndLineWithLineFeed: NSDataBase64EncodingOptions = 1 << 5; pub type NSDataBase64DecodingOptions = NSUInteger; -pub const NSDataBase64DecodingIgnoreUnknownCharacters: NSDataBase64DecodingOptions = 1; +pub const NSDataBase64DecodingIgnoreUnknownCharacters: NSDataBase64DecodingOptions = 1 << 0; extern_class!( #[derive(Debug)] diff --git a/icrate/src/Foundation/generated/NSDateComponentsFormatter.rs b/icrate/src/Foundation/generated/NSDateComponentsFormatter.rs index bfdec9fe9..23fd4c03e 100644 --- a/icrate/src/Foundation/generated/NSDateComponentsFormatter.rs +++ b/icrate/src/Foundation/generated/NSDateComponentsFormatter.rs @@ -15,19 +15,22 @@ pub const NSDateComponentsFormatterUnitsStyleBrief: NSDateComponentsFormatterUni pub type NSDateComponentsFormatterZeroFormattingBehavior = NSUInteger; pub const NSDateComponentsFormatterZeroFormattingBehaviorNone: - NSDateComponentsFormatterZeroFormattingBehavior = 0; + NSDateComponentsFormatterZeroFormattingBehavior = (0); pub const NSDateComponentsFormatterZeroFormattingBehaviorDefault: - NSDateComponentsFormatterZeroFormattingBehavior = 1; + NSDateComponentsFormatterZeroFormattingBehavior = (1 << 0); pub const NSDateComponentsFormatterZeroFormattingBehaviorDropLeading: - NSDateComponentsFormatterZeroFormattingBehavior = 2; + NSDateComponentsFormatterZeroFormattingBehavior = (1 << 1); pub const NSDateComponentsFormatterZeroFormattingBehaviorDropMiddle: - NSDateComponentsFormatterZeroFormattingBehavior = 4; + NSDateComponentsFormatterZeroFormattingBehavior = (1 << 2); pub const NSDateComponentsFormatterZeroFormattingBehaviorDropTrailing: - NSDateComponentsFormatterZeroFormattingBehavior = 8; + NSDateComponentsFormatterZeroFormattingBehavior = (1 << 3); pub const NSDateComponentsFormatterZeroFormattingBehaviorDropAll: - NSDateComponentsFormatterZeroFormattingBehavior = 14; + NSDateComponentsFormatterZeroFormattingBehavior = + (NSDateComponentsFormatterZeroFormattingBehaviorDropLeading + | NSDateComponentsFormatterZeroFormattingBehaviorDropMiddle + | NSDateComponentsFormatterZeroFormattingBehaviorDropTrailing); pub const NSDateComponentsFormatterZeroFormattingBehaviorPad: - NSDateComponentsFormatterZeroFormattingBehavior = 65536; + NSDateComponentsFormatterZeroFormattingBehavior = (1 << 16); extern_class!( #[derive(Debug)] diff --git a/icrate/src/Foundation/generated/NSDateFormatter.rs b/icrate/src/Foundation/generated/NSDateFormatter.rs index 29f275a26..d9ae8b693 100644 --- a/icrate/src/Foundation/generated/NSDateFormatter.rs +++ b/icrate/src/Foundation/generated/NSDateFormatter.rs @@ -6,11 +6,11 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, extern_methods, ClassType}; pub type NSDateFormatterStyle = NSUInteger; -pub const NSDateFormatterNoStyle: NSDateFormatterStyle = 0; -pub const NSDateFormatterShortStyle: NSDateFormatterStyle = 1; -pub const NSDateFormatterMediumStyle: NSDateFormatterStyle = 2; -pub const NSDateFormatterLongStyle: NSDateFormatterStyle = 3; -pub const NSDateFormatterFullStyle: NSDateFormatterStyle = 4; +pub const NSDateFormatterNoStyle: NSDateFormatterStyle = kCFDateFormatterNoStyle; +pub const NSDateFormatterShortStyle: NSDateFormatterStyle = kCFDateFormatterShortStyle; +pub const NSDateFormatterMediumStyle: NSDateFormatterStyle = kCFDateFormatterMediumStyle; +pub const NSDateFormatterLongStyle: NSDateFormatterStyle = kCFDateFormatterLongStyle; +pub const NSDateFormatterFullStyle: NSDateFormatterStyle = kCFDateFormatterFullStyle; pub type NSDateFormatterBehavior = NSUInteger; pub const NSDateFormatterBehaviorDefault: NSDateFormatterBehavior = 0; diff --git a/icrate/src/Foundation/generated/NSDistributedNotificationCenter.rs b/icrate/src/Foundation/generated/NSDistributedNotificationCenter.rs index 00bf86b0e..fecf920c0 100644 --- a/icrate/src/Foundation/generated/NSDistributedNotificationCenter.rs +++ b/icrate/src/Foundation/generated/NSDistributedNotificationCenter.rs @@ -14,8 +14,8 @@ pub const NSNotificationSuspensionBehaviorHold: NSNotificationSuspensionBehavior pub const NSNotificationSuspensionBehaviorDeliverImmediately: NSNotificationSuspensionBehavior = 4; pub type NSDistributedNotificationOptions = NSUInteger; -pub const NSDistributedNotificationDeliverImmediately: NSDistributedNotificationOptions = 1; -pub const NSDistributedNotificationPostToAllSessions: NSDistributedNotificationOptions = 2; +pub const NSDistributedNotificationDeliverImmediately: NSDistributedNotificationOptions = (1 << 0); +pub const NSDistributedNotificationPostToAllSessions: NSDistributedNotificationOptions = (1 << 1); extern_class!( #[derive(Debug)] diff --git a/icrate/src/Foundation/generated/NSEnergyFormatter.rs b/icrate/src/Foundation/generated/NSEnergyFormatter.rs index b4cda6e50..b4f5887f9 100644 --- a/icrate/src/Foundation/generated/NSEnergyFormatter.rs +++ b/icrate/src/Foundation/generated/NSEnergyFormatter.rs @@ -8,8 +8,8 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSEnergyFormatterUnit = NSInteger; pub const NSEnergyFormatterUnitJoule: NSEnergyFormatterUnit = 11; pub const NSEnergyFormatterUnitKilojoule: NSEnergyFormatterUnit = 14; -pub const NSEnergyFormatterUnitCalorie: NSEnergyFormatterUnit = 1793; -pub const NSEnergyFormatterUnitKilocalorie: NSEnergyFormatterUnit = 1794; +pub const NSEnergyFormatterUnitCalorie: NSEnergyFormatterUnit = (7 << 8) + 1; +pub const NSEnergyFormatterUnitKilocalorie: NSEnergyFormatterUnit = (7 << 8) + 2; extern_class!( #[derive(Debug)] diff --git a/icrate/src/Foundation/generated/NSFileCoordinator.rs b/icrate/src/Foundation/generated/NSFileCoordinator.rs index 7c1f30c8b..3da86c699 100644 --- a/icrate/src/Foundation/generated/NSFileCoordinator.rs +++ b/icrate/src/Foundation/generated/NSFileCoordinator.rs @@ -6,19 +6,19 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, extern_methods, ClassType}; pub type NSFileCoordinatorReadingOptions = NSUInteger; -pub const NSFileCoordinatorReadingWithoutChanges: NSFileCoordinatorReadingOptions = 1; -pub const NSFileCoordinatorReadingResolvesSymbolicLink: NSFileCoordinatorReadingOptions = 2; +pub const NSFileCoordinatorReadingWithoutChanges: NSFileCoordinatorReadingOptions = 1 << 0; +pub const NSFileCoordinatorReadingResolvesSymbolicLink: NSFileCoordinatorReadingOptions = 1 << 1; pub const NSFileCoordinatorReadingImmediatelyAvailableMetadataOnly: - NSFileCoordinatorReadingOptions = 4; -pub const NSFileCoordinatorReadingForUploading: NSFileCoordinatorReadingOptions = 8; + NSFileCoordinatorReadingOptions = 1 << 2; +pub const NSFileCoordinatorReadingForUploading: NSFileCoordinatorReadingOptions = 1 << 3; pub type NSFileCoordinatorWritingOptions = NSUInteger; -pub const NSFileCoordinatorWritingForDeleting: NSFileCoordinatorWritingOptions = 1; -pub const NSFileCoordinatorWritingForMoving: NSFileCoordinatorWritingOptions = 2; -pub const NSFileCoordinatorWritingForMerging: NSFileCoordinatorWritingOptions = 4; -pub const NSFileCoordinatorWritingForReplacing: NSFileCoordinatorWritingOptions = 8; +pub const NSFileCoordinatorWritingForDeleting: NSFileCoordinatorWritingOptions = 1 << 0; +pub const NSFileCoordinatorWritingForMoving: NSFileCoordinatorWritingOptions = 1 << 1; +pub const NSFileCoordinatorWritingForMerging: NSFileCoordinatorWritingOptions = 1 << 2; +pub const NSFileCoordinatorWritingForReplacing: NSFileCoordinatorWritingOptions = 1 << 3; pub const NSFileCoordinatorWritingContentIndependentMetadataOnly: NSFileCoordinatorWritingOptions = - 16; + 1 << 4; extern_class!( #[derive(Debug)] diff --git a/icrate/src/Foundation/generated/NSFileManager.rs b/icrate/src/Foundation/generated/NSFileManager.rs index d749e16be..75e01525c 100644 --- a/icrate/src/Foundation/generated/NSFileManager.rs +++ b/icrate/src/Foundation/generated/NSFileManager.rs @@ -14,20 +14,23 @@ pub type NSFileProtectionType = NSString; pub type NSFileProviderServiceName = NSString; pub type NSVolumeEnumerationOptions = NSUInteger; -pub const NSVolumeEnumerationSkipHiddenVolumes: NSVolumeEnumerationOptions = 2; -pub const NSVolumeEnumerationProduceFileReferenceURLs: NSVolumeEnumerationOptions = 4; +pub const NSVolumeEnumerationSkipHiddenVolumes: NSVolumeEnumerationOptions = 1 << 1; +pub const NSVolumeEnumerationProduceFileReferenceURLs: NSVolumeEnumerationOptions = 1 << 2; pub type NSDirectoryEnumerationOptions = NSUInteger; -pub const NSDirectoryEnumerationSkipsSubdirectoryDescendants: NSDirectoryEnumerationOptions = 1; -pub const NSDirectoryEnumerationSkipsPackageDescendants: NSDirectoryEnumerationOptions = 2; -pub const NSDirectoryEnumerationSkipsHiddenFiles: NSDirectoryEnumerationOptions = 4; -pub const NSDirectoryEnumerationIncludesDirectoriesPostOrder: NSDirectoryEnumerationOptions = 8; -pub const NSDirectoryEnumerationProducesRelativePathURLs: NSDirectoryEnumerationOptions = 16; +pub const NSDirectoryEnumerationSkipsSubdirectoryDescendants: NSDirectoryEnumerationOptions = + 1 << 0; +pub const NSDirectoryEnumerationSkipsPackageDescendants: NSDirectoryEnumerationOptions = 1 << 1; +pub const NSDirectoryEnumerationSkipsHiddenFiles: NSDirectoryEnumerationOptions = 1 << 2; +pub const NSDirectoryEnumerationIncludesDirectoriesPostOrder: NSDirectoryEnumerationOptions = + 1 << 3; +pub const NSDirectoryEnumerationProducesRelativePathURLs: NSDirectoryEnumerationOptions = 1 << 4; pub type NSFileManagerItemReplacementOptions = NSUInteger; -pub const NSFileManagerItemReplacementUsingNewMetadataOnly: NSFileManagerItemReplacementOptions = 1; +pub const NSFileManagerItemReplacementUsingNewMetadataOnly: NSFileManagerItemReplacementOptions = + 1 << 0; pub const NSFileManagerItemReplacementWithoutDeletingBackupItem: - NSFileManagerItemReplacementOptions = 2; + NSFileManagerItemReplacementOptions = 1 << 1; pub type NSURLRelationship = NSInteger; pub const NSURLRelationshipContains: NSURLRelationship = 0; @@ -35,8 +38,8 @@ pub const NSURLRelationshipSame: NSURLRelationship = 1; pub const NSURLRelationshipOther: NSURLRelationship = 2; pub type NSFileManagerUnmountOptions = NSUInteger; -pub const NSFileManagerUnmountAllPartitionsAndEjectDisk: NSFileManagerUnmountOptions = 1; -pub const NSFileManagerUnmountWithoutUI: NSFileManagerUnmountOptions = 2; +pub const NSFileManagerUnmountAllPartitionsAndEjectDisk: NSFileManagerUnmountOptions = 1 << 0; +pub const NSFileManagerUnmountWithoutUI: NSFileManagerUnmountOptions = 1 << 1; extern_class!( #[derive(Debug)] diff --git a/icrate/src/Foundation/generated/NSFileVersion.rs b/icrate/src/Foundation/generated/NSFileVersion.rs index ce9d1c065..d2f34a879 100644 --- a/icrate/src/Foundation/generated/NSFileVersion.rs +++ b/icrate/src/Foundation/generated/NSFileVersion.rs @@ -6,10 +6,10 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, extern_methods, ClassType}; pub type NSFileVersionAddingOptions = NSUInteger; -pub const NSFileVersionAddingByMoving: NSFileVersionAddingOptions = 1; +pub const NSFileVersionAddingByMoving: NSFileVersionAddingOptions = 1 << 0; pub type NSFileVersionReplacingOptions = NSUInteger; -pub const NSFileVersionReplacingByMoving: NSFileVersionReplacingOptions = 1; +pub const NSFileVersionReplacingByMoving: NSFileVersionReplacingOptions = 1 << 0; extern_class!( #[derive(Debug)] diff --git a/icrate/src/Foundation/generated/NSFileWrapper.rs b/icrate/src/Foundation/generated/NSFileWrapper.rs index 529d2276c..e656575ad 100644 --- a/icrate/src/Foundation/generated/NSFileWrapper.rs +++ b/icrate/src/Foundation/generated/NSFileWrapper.rs @@ -6,12 +6,12 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, extern_methods, ClassType}; pub type NSFileWrapperReadingOptions = NSUInteger; -pub const NSFileWrapperReadingImmediate: NSFileWrapperReadingOptions = 1; -pub const NSFileWrapperReadingWithoutMapping: NSFileWrapperReadingOptions = 2; +pub const NSFileWrapperReadingImmediate: NSFileWrapperReadingOptions = 1 << 0; +pub const NSFileWrapperReadingWithoutMapping: NSFileWrapperReadingOptions = 1 << 1; pub type NSFileWrapperWritingOptions = NSUInteger; -pub const NSFileWrapperWritingAtomic: NSFileWrapperWritingOptions = 1; -pub const NSFileWrapperWritingWithNameUpdating: NSFileWrapperWritingOptions = 2; +pub const NSFileWrapperWritingAtomic: NSFileWrapperWritingOptions = 1 << 0; +pub const NSFileWrapperWritingWithNameUpdating: NSFileWrapperWritingOptions = 1 << 1; extern_class!( #[derive(Debug)] diff --git a/icrate/src/Foundation/generated/NSGeometry.rs b/icrate/src/Foundation/generated/NSGeometry.rs index 19c575b7a..664f471e7 100644 --- a/icrate/src/Foundation/generated/NSGeometry.rs +++ b/icrate/src/Foundation/generated/NSGeometry.rs @@ -12,38 +12,41 @@ pub type NSSize = CGSize; pub type NSRect = CGRect; pub type NSRectEdge = NSUInteger; -pub const NSRectEdgeMinX: NSRectEdge = 0; -pub const NSRectEdgeMinY: NSRectEdge = 1; -pub const NSRectEdgeMaxX: NSRectEdge = 2; -pub const NSRectEdgeMaxY: NSRectEdge = 3; -pub const NSMinXEdge: NSRectEdge = 0; -pub const NSMinYEdge: NSRectEdge = 1; -pub const NSMaxXEdge: NSRectEdge = 2; -pub const NSMaxYEdge: NSRectEdge = 3; +pub const NSRectEdgeMinX: NSRectEdge = CGRectMinXEdge; +pub const NSRectEdgeMinY: NSRectEdge = CGRectMinYEdge; +pub const NSRectEdgeMaxX: NSRectEdge = CGRectMaxXEdge; +pub const NSRectEdgeMaxY: NSRectEdge = CGRectMaxYEdge; +pub const NSMinXEdge: NSRectEdge = NSRectEdgeMinX; +pub const NSMinYEdge: NSRectEdge = NSRectEdgeMinY; +pub const NSMaxXEdge: NSRectEdge = NSRectEdgeMaxX; +pub const NSMaxYEdge: NSRectEdge = NSRectEdgeMaxY; pub type NSAlignmentOptions = c_ulonglong; -pub const NSAlignMinXInward: NSAlignmentOptions = 1; -pub const NSAlignMinYInward: NSAlignmentOptions = 2; -pub const NSAlignMaxXInward: NSAlignmentOptions = 4; -pub const NSAlignMaxYInward: NSAlignmentOptions = 8; -pub const NSAlignWidthInward: NSAlignmentOptions = 16; -pub const NSAlignHeightInward: NSAlignmentOptions = 32; -pub const NSAlignMinXOutward: NSAlignmentOptions = 256; -pub const NSAlignMinYOutward: NSAlignmentOptions = 512; -pub const NSAlignMaxXOutward: NSAlignmentOptions = 1024; -pub const NSAlignMaxYOutward: NSAlignmentOptions = 2048; -pub const NSAlignWidthOutward: NSAlignmentOptions = 4096; -pub const NSAlignHeightOutward: NSAlignmentOptions = 8192; -pub const NSAlignMinXNearest: NSAlignmentOptions = 65536; -pub const NSAlignMinYNearest: NSAlignmentOptions = 131072; -pub const NSAlignMaxXNearest: NSAlignmentOptions = 262144; -pub const NSAlignMaxYNearest: NSAlignmentOptions = 524288; -pub const NSAlignWidthNearest: NSAlignmentOptions = 1048576; -pub const NSAlignHeightNearest: NSAlignmentOptions = 2097152; -pub const NSAlignRectFlipped: NSAlignmentOptions = -9223372036854775808; -pub const NSAlignAllEdgesInward: NSAlignmentOptions = 15; -pub const NSAlignAllEdgesOutward: NSAlignmentOptions = 3840; -pub const NSAlignAllEdgesNearest: NSAlignmentOptions = 983040; +pub const NSAlignMinXInward: NSAlignmentOptions = 1 << 0; +pub const NSAlignMinYInward: NSAlignmentOptions = 1 << 1; +pub const NSAlignMaxXInward: NSAlignmentOptions = 1 << 2; +pub const NSAlignMaxYInward: NSAlignmentOptions = 1 << 3; +pub const NSAlignWidthInward: NSAlignmentOptions = 1 << 4; +pub const NSAlignHeightInward: NSAlignmentOptions = 1 << 5; +pub const NSAlignMinXOutward: NSAlignmentOptions = 1 << 8; +pub const NSAlignMinYOutward: NSAlignmentOptions = 1 << 9; +pub const NSAlignMaxXOutward: NSAlignmentOptions = 1 << 10; +pub const NSAlignMaxYOutward: NSAlignmentOptions = 1 << 11; +pub const NSAlignWidthOutward: NSAlignmentOptions = 1 << 12; +pub const NSAlignHeightOutward: NSAlignmentOptions = 1 << 13; +pub const NSAlignMinXNearest: NSAlignmentOptions = 1 << 16; +pub const NSAlignMinYNearest: NSAlignmentOptions = 1 << 17; +pub const NSAlignMaxXNearest: NSAlignmentOptions = 1 << 18; +pub const NSAlignMaxYNearest: NSAlignmentOptions = 1 << 19; +pub const NSAlignWidthNearest: NSAlignmentOptions = 1 << 20; +pub const NSAlignHeightNearest: NSAlignmentOptions = 1 << 21; +pub const NSAlignRectFlipped: NSAlignmentOptions = 1 << 63; +pub const NSAlignAllEdgesInward: NSAlignmentOptions = + NSAlignMinXInward | NSAlignMaxXInward | NSAlignMinYInward | NSAlignMaxYInward; +pub const NSAlignAllEdgesOutward: NSAlignmentOptions = + NSAlignMinXOutward | NSAlignMaxXOutward | NSAlignMinYOutward | NSAlignMaxYOutward; +pub const NSAlignAllEdgesNearest: NSAlignmentOptions = + NSAlignMinXNearest | NSAlignMaxXNearest | NSAlignMinYNearest | NSAlignMaxYNearest; extern_methods!( /// NSValueGeometryExtensions diff --git a/icrate/src/Foundation/generated/NSISO8601DateFormatter.rs b/icrate/src/Foundation/generated/NSISO8601DateFormatter.rs index eb9cc506c..f63a9e0df 100644 --- a/icrate/src/Foundation/generated/NSISO8601DateFormatter.rs +++ b/icrate/src/Foundation/generated/NSISO8601DateFormatter.rs @@ -6,20 +6,30 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, extern_methods, ClassType}; pub type NSISO8601DateFormatOptions = NSUInteger; -pub const NSISO8601DateFormatWithYear: NSISO8601DateFormatOptions = 1; -pub const NSISO8601DateFormatWithMonth: NSISO8601DateFormatOptions = 2; -pub const NSISO8601DateFormatWithWeekOfYear: NSISO8601DateFormatOptions = 4; -pub const NSISO8601DateFormatWithDay: NSISO8601DateFormatOptions = 16; -pub const NSISO8601DateFormatWithTime: NSISO8601DateFormatOptions = 32; -pub const NSISO8601DateFormatWithTimeZone: NSISO8601DateFormatOptions = 64; -pub const NSISO8601DateFormatWithSpaceBetweenDateAndTime: NSISO8601DateFormatOptions = 128; -pub const NSISO8601DateFormatWithDashSeparatorInDate: NSISO8601DateFormatOptions = 256; -pub const NSISO8601DateFormatWithColonSeparatorInTime: NSISO8601DateFormatOptions = 512; -pub const NSISO8601DateFormatWithColonSeparatorInTimeZone: NSISO8601DateFormatOptions = 1024; -pub const NSISO8601DateFormatWithFractionalSeconds: NSISO8601DateFormatOptions = 2048; -pub const NSISO8601DateFormatWithFullDate: NSISO8601DateFormatOptions = 275; -pub const NSISO8601DateFormatWithFullTime: NSISO8601DateFormatOptions = 1632; -pub const NSISO8601DateFormatWithInternetDateTime: NSISO8601DateFormatOptions = 1907; +pub const NSISO8601DateFormatWithYear: NSISO8601DateFormatOptions = kCFISO8601DateFormatWithYear; +pub const NSISO8601DateFormatWithMonth: NSISO8601DateFormatOptions = kCFISO8601DateFormatWithMonth; +pub const NSISO8601DateFormatWithWeekOfYear: NSISO8601DateFormatOptions = + kCFISO8601DateFormatWithWeekOfYear; +pub const NSISO8601DateFormatWithDay: NSISO8601DateFormatOptions = kCFISO8601DateFormatWithDay; +pub const NSISO8601DateFormatWithTime: NSISO8601DateFormatOptions = kCFISO8601DateFormatWithTime; +pub const NSISO8601DateFormatWithTimeZone: NSISO8601DateFormatOptions = + kCFISO8601DateFormatWithTimeZone; +pub const NSISO8601DateFormatWithSpaceBetweenDateAndTime: NSISO8601DateFormatOptions = + kCFISO8601DateFormatWithSpaceBetweenDateAndTime; +pub const NSISO8601DateFormatWithDashSeparatorInDate: NSISO8601DateFormatOptions = + kCFISO8601DateFormatWithDashSeparatorInDate; +pub const NSISO8601DateFormatWithColonSeparatorInTime: NSISO8601DateFormatOptions = + kCFISO8601DateFormatWithColonSeparatorInTime; +pub const NSISO8601DateFormatWithColonSeparatorInTimeZone: NSISO8601DateFormatOptions = + kCFISO8601DateFormatWithColonSeparatorInTimeZone; +pub const NSISO8601DateFormatWithFractionalSeconds: NSISO8601DateFormatOptions = + kCFISO8601DateFormatWithFractionalSeconds; +pub const NSISO8601DateFormatWithFullDate: NSISO8601DateFormatOptions = + kCFISO8601DateFormatWithFullDate; +pub const NSISO8601DateFormatWithFullTime: NSISO8601DateFormatOptions = + kCFISO8601DateFormatWithFullTime; +pub const NSISO8601DateFormatWithInternetDateTime: NSISO8601DateFormatOptions = + kCFISO8601DateFormatWithInternetDateTime; extern_class!( #[derive(Debug)] diff --git a/icrate/src/Foundation/generated/NSJSONSerialization.rs b/icrate/src/Foundation/generated/NSJSONSerialization.rs index da6419f22..0db3c7ab6 100644 --- a/icrate/src/Foundation/generated/NSJSONSerialization.rs +++ b/icrate/src/Foundation/generated/NSJSONSerialization.rs @@ -6,18 +6,18 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, extern_methods, ClassType}; pub type NSJSONReadingOptions = NSUInteger; -pub const NSJSONReadingMutableContainers: NSJSONReadingOptions = 1; -pub const NSJSONReadingMutableLeaves: NSJSONReadingOptions = 2; -pub const NSJSONReadingFragmentsAllowed: NSJSONReadingOptions = 4; -pub const NSJSONReadingJSON5Allowed: NSJSONReadingOptions = 8; -pub const NSJSONReadingTopLevelDictionaryAssumed: NSJSONReadingOptions = 16; -pub const NSJSONReadingAllowFragments: NSJSONReadingOptions = 4; +pub const NSJSONReadingMutableContainers: NSJSONReadingOptions = (1 << 0); +pub const NSJSONReadingMutableLeaves: NSJSONReadingOptions = (1 << 1); +pub const NSJSONReadingFragmentsAllowed: NSJSONReadingOptions = (1 << 2); +pub const NSJSONReadingJSON5Allowed: NSJSONReadingOptions = (1 << 3); +pub const NSJSONReadingTopLevelDictionaryAssumed: NSJSONReadingOptions = (1 << 4); +pub const NSJSONReadingAllowFragments: NSJSONReadingOptions = NSJSONReadingFragmentsAllowed; pub type NSJSONWritingOptions = NSUInteger; -pub const NSJSONWritingPrettyPrinted: NSJSONWritingOptions = 1; -pub const NSJSONWritingSortedKeys: NSJSONWritingOptions = 2; -pub const NSJSONWritingFragmentsAllowed: NSJSONWritingOptions = 4; -pub const NSJSONWritingWithoutEscapingSlashes: NSJSONWritingOptions = 8; +pub const NSJSONWritingPrettyPrinted: NSJSONWritingOptions = (1 << 0); +pub const NSJSONWritingSortedKeys: NSJSONWritingOptions = (1 << 1); +pub const NSJSONWritingFragmentsAllowed: NSJSONWritingOptions = (1 << 2); +pub const NSJSONWritingWithoutEscapingSlashes: NSJSONWritingOptions = (1 << 3); extern_class!( #[derive(Debug)] diff --git a/icrate/src/Foundation/generated/NSKeyValueObserving.rs b/icrate/src/Foundation/generated/NSKeyValueObserving.rs index ef1d0740b..653017c30 100644 --- a/icrate/src/Foundation/generated/NSKeyValueObserving.rs +++ b/icrate/src/Foundation/generated/NSKeyValueObserving.rs @@ -6,10 +6,10 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, extern_methods, ClassType}; pub type NSKeyValueObservingOptions = NSUInteger; -pub const NSKeyValueObservingOptionNew: NSKeyValueObservingOptions = 1; -pub const NSKeyValueObservingOptionOld: NSKeyValueObservingOptions = 2; -pub const NSKeyValueObservingOptionInitial: NSKeyValueObservingOptions = 4; -pub const NSKeyValueObservingOptionPrior: NSKeyValueObservingOptions = 8; +pub const NSKeyValueObservingOptionNew: NSKeyValueObservingOptions = 0x01; +pub const NSKeyValueObservingOptionOld: NSKeyValueObservingOptions = 0x02; +pub const NSKeyValueObservingOptionInitial: NSKeyValueObservingOptions = 0x04; +pub const NSKeyValueObservingOptionPrior: NSKeyValueObservingOptions = 0x08; pub type NSKeyValueChange = NSUInteger; pub const NSKeyValueChangeSetting: NSKeyValueChange = 1; diff --git a/icrate/src/Foundation/generated/NSLengthFormatter.rs b/icrate/src/Foundation/generated/NSLengthFormatter.rs index fe6bcca8a..afa99901c 100644 --- a/icrate/src/Foundation/generated/NSLengthFormatter.rs +++ b/icrate/src/Foundation/generated/NSLengthFormatter.rs @@ -10,10 +10,10 @@ pub const NSLengthFormatterUnitMillimeter: NSLengthFormatterUnit = 8; pub const NSLengthFormatterUnitCentimeter: NSLengthFormatterUnit = 9; pub const NSLengthFormatterUnitMeter: NSLengthFormatterUnit = 11; pub const NSLengthFormatterUnitKilometer: NSLengthFormatterUnit = 14; -pub const NSLengthFormatterUnitInch: NSLengthFormatterUnit = 1281; -pub const NSLengthFormatterUnitFoot: NSLengthFormatterUnit = 1282; -pub const NSLengthFormatterUnitYard: NSLengthFormatterUnit = 1283; -pub const NSLengthFormatterUnitMile: NSLengthFormatterUnit = 1284; +pub const NSLengthFormatterUnitInch: NSLengthFormatterUnit = (5 << 8) + 1; +pub const NSLengthFormatterUnitFoot: NSLengthFormatterUnit = (5 << 8) + 2; +pub const NSLengthFormatterUnitYard: NSLengthFormatterUnit = (5 << 8) + 3; +pub const NSLengthFormatterUnitMile: NSLengthFormatterUnit = (5 << 8) + 4; extern_class!( #[derive(Debug)] diff --git a/icrate/src/Foundation/generated/NSLinguisticTagger.rs b/icrate/src/Foundation/generated/NSLinguisticTagger.rs index 244c7bad5..a9caea7cb 100644 --- a/icrate/src/Foundation/generated/NSLinguisticTagger.rs +++ b/icrate/src/Foundation/generated/NSLinguisticTagger.rs @@ -16,11 +16,11 @@ pub const NSLinguisticTaggerUnitParagraph: NSLinguisticTaggerUnit = 2; pub const NSLinguisticTaggerUnitDocument: NSLinguisticTaggerUnit = 3; pub type NSLinguisticTaggerOptions = NSUInteger; -pub const NSLinguisticTaggerOmitWords: NSLinguisticTaggerOptions = 1; -pub const NSLinguisticTaggerOmitPunctuation: NSLinguisticTaggerOptions = 2; -pub const NSLinguisticTaggerOmitWhitespace: NSLinguisticTaggerOptions = 4; -pub const NSLinguisticTaggerOmitOther: NSLinguisticTaggerOptions = 8; -pub const NSLinguisticTaggerJoinNames: NSLinguisticTaggerOptions = 16; +pub const NSLinguisticTaggerOmitWords: NSLinguisticTaggerOptions = 1 << 0; +pub const NSLinguisticTaggerOmitPunctuation: NSLinguisticTaggerOptions = 1 << 1; +pub const NSLinguisticTaggerOmitWhitespace: NSLinguisticTaggerOptions = 1 << 2; +pub const NSLinguisticTaggerOmitOther: NSLinguisticTaggerOptions = 1 << 3; +pub const NSLinguisticTaggerJoinNames: NSLinguisticTaggerOptions = 1 << 4; extern_class!( #[derive(Debug)] diff --git a/icrate/src/Foundation/generated/NSLocale.rs b/icrate/src/Foundation/generated/NSLocale.rs index f7f1ba478..da3a75793 100644 --- a/icrate/src/Foundation/generated/NSLocale.rs +++ b/icrate/src/Foundation/generated/NSLocale.rs @@ -170,11 +170,16 @@ extern_methods!( ); pub type NSLocaleLanguageDirection = NSUInteger; -pub const NSLocaleLanguageDirectionUnknown: NSLocaleLanguageDirection = 0; -pub const NSLocaleLanguageDirectionLeftToRight: NSLocaleLanguageDirection = 1; -pub const NSLocaleLanguageDirectionRightToLeft: NSLocaleLanguageDirection = 2; -pub const NSLocaleLanguageDirectionTopToBottom: NSLocaleLanguageDirection = 3; -pub const NSLocaleLanguageDirectionBottomToTop: NSLocaleLanguageDirection = 4; +pub const NSLocaleLanguageDirectionUnknown: NSLocaleLanguageDirection = + kCFLocaleLanguageDirectionUnknown; +pub const NSLocaleLanguageDirectionLeftToRight: NSLocaleLanguageDirection = + kCFLocaleLanguageDirectionLeftToRight; +pub const NSLocaleLanguageDirectionRightToLeft: NSLocaleLanguageDirection = + kCFLocaleLanguageDirectionRightToLeft; +pub const NSLocaleLanguageDirectionTopToBottom: NSLocaleLanguageDirection = + kCFLocaleLanguageDirectionTopToBottom; +pub const NSLocaleLanguageDirectionBottomToTop: NSLocaleLanguageDirection = + kCFLocaleLanguageDirectionBottomToTop; extern_methods!( /// NSLocaleGeneralInfo diff --git a/icrate/src/Foundation/generated/NSMassFormatter.rs b/icrate/src/Foundation/generated/NSMassFormatter.rs index 57863cd5b..e5aff98cf 100644 --- a/icrate/src/Foundation/generated/NSMassFormatter.rs +++ b/icrate/src/Foundation/generated/NSMassFormatter.rs @@ -8,9 +8,9 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSMassFormatterUnit = NSInteger; pub const NSMassFormatterUnitGram: NSMassFormatterUnit = 11; pub const NSMassFormatterUnitKilogram: NSMassFormatterUnit = 14; -pub const NSMassFormatterUnitOunce: NSMassFormatterUnit = 1537; -pub const NSMassFormatterUnitPound: NSMassFormatterUnit = 1538; -pub const NSMassFormatterUnitStone: NSMassFormatterUnit = 1539; +pub const NSMassFormatterUnitOunce: NSMassFormatterUnit = (6 << 8) + 1; +pub const NSMassFormatterUnitPound: NSMassFormatterUnit = (6 << 8) + 2; +pub const NSMassFormatterUnitStone: NSMassFormatterUnit = (6 << 8) + 3; extern_class!( #[derive(Debug)] diff --git a/icrate/src/Foundation/generated/NSMeasurementFormatter.rs b/icrate/src/Foundation/generated/NSMeasurementFormatter.rs index 634e11bfe..661106ba4 100644 --- a/icrate/src/Foundation/generated/NSMeasurementFormatter.rs +++ b/icrate/src/Foundation/generated/NSMeasurementFormatter.rs @@ -6,10 +6,12 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, extern_methods, ClassType}; pub type NSMeasurementFormatterUnitOptions = NSUInteger; -pub const NSMeasurementFormatterUnitOptionsProvidedUnit: NSMeasurementFormatterUnitOptions = 1; -pub const NSMeasurementFormatterUnitOptionsNaturalScale: NSMeasurementFormatterUnitOptions = 2; +pub const NSMeasurementFormatterUnitOptionsProvidedUnit: NSMeasurementFormatterUnitOptions = + (1 << 0); +pub const NSMeasurementFormatterUnitOptionsNaturalScale: NSMeasurementFormatterUnitOptions = + (1 << 1); pub const NSMeasurementFormatterUnitOptionsTemperatureWithoutUnit: - NSMeasurementFormatterUnitOptions = 4; + NSMeasurementFormatterUnitOptions = (1 << 2); extern_class!( #[derive(Debug)] diff --git a/icrate/src/Foundation/generated/NSNetServices.rs b/icrate/src/Foundation/generated/NSNetServices.rs index 66b772714..d899d55ac 100644 --- a/icrate/src/Foundation/generated/NSNetServices.rs +++ b/icrate/src/Foundation/generated/NSNetServices.rs @@ -17,8 +17,8 @@ pub const NSNetServicesTimeoutError: NSNetServicesError = -72007; pub const NSNetServicesMissingRequiredConfigurationError: NSNetServicesError = -72008; pub type NSNetServiceOptions = NSUInteger; -pub const NSNetServiceNoAutoRename: NSNetServiceOptions = 1; -pub const NSNetServiceListenForConnections: NSNetServiceOptions = 2; +pub const NSNetServiceNoAutoRename: NSNetServiceOptions = 1 << 0; +pub const NSNetServiceListenForConnections: NSNetServiceOptions = 1 << 1; extern_class!( #[derive(Debug)] diff --git a/icrate/src/Foundation/generated/NSNumberFormatter.rs b/icrate/src/Foundation/generated/NSNumberFormatter.rs index 762c04e19..088aa02b6 100644 --- a/icrate/src/Foundation/generated/NSNumberFormatter.rs +++ b/icrate/src/Foundation/generated/NSNumberFormatter.rs @@ -11,31 +11,43 @@ pub const NSNumberFormatterBehavior10_0: NSNumberFormatterBehavior = 1000; pub const NSNumberFormatterBehavior10_4: NSNumberFormatterBehavior = 1040; pub type NSNumberFormatterStyle = NSUInteger; -pub const NSNumberFormatterNoStyle: NSNumberFormatterStyle = 0; -pub const NSNumberFormatterDecimalStyle: NSNumberFormatterStyle = 1; -pub const NSNumberFormatterCurrencyStyle: NSNumberFormatterStyle = 2; -pub const NSNumberFormatterPercentStyle: NSNumberFormatterStyle = 3; -pub const NSNumberFormatterScientificStyle: NSNumberFormatterStyle = 4; -pub const NSNumberFormatterSpellOutStyle: NSNumberFormatterStyle = 5; -pub const NSNumberFormatterOrdinalStyle: NSNumberFormatterStyle = 6; -pub const NSNumberFormatterCurrencyISOCodeStyle: NSNumberFormatterStyle = 8; -pub const NSNumberFormatterCurrencyPluralStyle: NSNumberFormatterStyle = 9; -pub const NSNumberFormatterCurrencyAccountingStyle: NSNumberFormatterStyle = 10; +pub const NSNumberFormatterNoStyle: NSNumberFormatterStyle = kCFNumberFormatterNoStyle; +pub const NSNumberFormatterDecimalStyle: NSNumberFormatterStyle = kCFNumberFormatterDecimalStyle; +pub const NSNumberFormatterCurrencyStyle: NSNumberFormatterStyle = kCFNumberFormatterCurrencyStyle; +pub const NSNumberFormatterPercentStyle: NSNumberFormatterStyle = kCFNumberFormatterPercentStyle; +pub const NSNumberFormatterScientificStyle: NSNumberFormatterStyle = + kCFNumberFormatterScientificStyle; +pub const NSNumberFormatterSpellOutStyle: NSNumberFormatterStyle = kCFNumberFormatterSpellOutStyle; +pub const NSNumberFormatterOrdinalStyle: NSNumberFormatterStyle = kCFNumberFormatterOrdinalStyle; +pub const NSNumberFormatterCurrencyISOCodeStyle: NSNumberFormatterStyle = + kCFNumberFormatterCurrencyISOCodeStyle; +pub const NSNumberFormatterCurrencyPluralStyle: NSNumberFormatterStyle = + kCFNumberFormatterCurrencyPluralStyle; +pub const NSNumberFormatterCurrencyAccountingStyle: NSNumberFormatterStyle = + kCFNumberFormatterCurrencyAccountingStyle; pub type NSNumberFormatterPadPosition = NSUInteger; -pub const NSNumberFormatterPadBeforePrefix: NSNumberFormatterPadPosition = 0; -pub const NSNumberFormatterPadAfterPrefix: NSNumberFormatterPadPosition = 1; -pub const NSNumberFormatterPadBeforeSuffix: NSNumberFormatterPadPosition = 2; -pub const NSNumberFormatterPadAfterSuffix: NSNumberFormatterPadPosition = 3; +pub const NSNumberFormatterPadBeforePrefix: NSNumberFormatterPadPosition = + kCFNumberFormatterPadBeforePrefix; +pub const NSNumberFormatterPadAfterPrefix: NSNumberFormatterPadPosition = + kCFNumberFormatterPadAfterPrefix; +pub const NSNumberFormatterPadBeforeSuffix: NSNumberFormatterPadPosition = + kCFNumberFormatterPadBeforeSuffix; +pub const NSNumberFormatterPadAfterSuffix: NSNumberFormatterPadPosition = + kCFNumberFormatterPadAfterSuffix; pub type NSNumberFormatterRoundingMode = NSUInteger; -pub const NSNumberFormatterRoundCeiling: NSNumberFormatterRoundingMode = 0; -pub const NSNumberFormatterRoundFloor: NSNumberFormatterRoundingMode = 1; -pub const NSNumberFormatterRoundDown: NSNumberFormatterRoundingMode = 2; -pub const NSNumberFormatterRoundUp: NSNumberFormatterRoundingMode = 3; -pub const NSNumberFormatterRoundHalfEven: NSNumberFormatterRoundingMode = 4; -pub const NSNumberFormatterRoundHalfDown: NSNumberFormatterRoundingMode = 5; -pub const NSNumberFormatterRoundHalfUp: NSNumberFormatterRoundingMode = 6; +pub const NSNumberFormatterRoundCeiling: NSNumberFormatterRoundingMode = + kCFNumberFormatterRoundCeiling; +pub const NSNumberFormatterRoundFloor: NSNumberFormatterRoundingMode = kCFNumberFormatterRoundFloor; +pub const NSNumberFormatterRoundDown: NSNumberFormatterRoundingMode = kCFNumberFormatterRoundDown; +pub const NSNumberFormatterRoundUp: NSNumberFormatterRoundingMode = kCFNumberFormatterRoundUp; +pub const NSNumberFormatterRoundHalfEven: NSNumberFormatterRoundingMode = + kCFNumberFormatterRoundHalfEven; +pub const NSNumberFormatterRoundHalfDown: NSNumberFormatterRoundingMode = + kCFNumberFormatterRoundHalfDown; +pub const NSNumberFormatterRoundHalfUp: NSNumberFormatterRoundingMode = + kCFNumberFormatterRoundHalfUp; extern_class!( #[derive(Debug)] diff --git a/icrate/src/Foundation/generated/NSObjCRuntime.rs b/icrate/src/Foundation/generated/NSObjCRuntime.rs index ecfc6856b..6c7f67725 100644 --- a/icrate/src/Foundation/generated/NSObjCRuntime.rs +++ b/icrate/src/Foundation/generated/NSObjCRuntime.rs @@ -15,16 +15,16 @@ pub const NSOrderedSame: NSComparisonResult = 0; pub const NSOrderedDescending: NSComparisonResult = 1; pub type NSEnumerationOptions = NSUInteger; -pub const NSEnumerationConcurrent: NSEnumerationOptions = 1; -pub const NSEnumerationReverse: NSEnumerationOptions = 2; +pub const NSEnumerationConcurrent: NSEnumerationOptions = (1 << 0); +pub const NSEnumerationReverse: NSEnumerationOptions = (1 << 1); pub type NSSortOptions = NSUInteger; -pub const NSSortConcurrent: NSSortOptions = 1; -pub const NSSortStable: NSSortOptions = 16; +pub const NSSortConcurrent: NSSortOptions = (1 << 0); +pub const NSSortStable: NSSortOptions = (1 << 4); pub type NSQualityOfService = NSInteger; -pub const NSQualityOfServiceUserInteractive: NSQualityOfService = 33; -pub const NSQualityOfServiceUserInitiated: NSQualityOfService = 25; -pub const NSQualityOfServiceUtility: NSQualityOfService = 17; -pub const NSQualityOfServiceBackground: NSQualityOfService = 9; +pub const NSQualityOfServiceUserInteractive: NSQualityOfService = 0x21; +pub const NSQualityOfServiceUserInitiated: NSQualityOfService = 0x19; +pub const NSQualityOfServiceUtility: NSQualityOfService = 0x11; +pub const NSQualityOfServiceBackground: NSQualityOfService = 0x09; pub const NSQualityOfServiceDefault: NSQualityOfService = -1; diff --git a/icrate/src/Foundation/generated/NSOrderedCollectionDifference.rs b/icrate/src/Foundation/generated/NSOrderedCollectionDifference.rs index c4f341e55..bd98935bd 100644 --- a/icrate/src/Foundation/generated/NSOrderedCollectionDifference.rs +++ b/icrate/src/Foundation/generated/NSOrderedCollectionDifference.rs @@ -7,11 +7,11 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSOrderedCollectionDifferenceCalculationOptions = NSUInteger; pub const NSOrderedCollectionDifferenceCalculationOmitInsertedObjects: - NSOrderedCollectionDifferenceCalculationOptions = 1; + NSOrderedCollectionDifferenceCalculationOptions = (1 << 0); pub const NSOrderedCollectionDifferenceCalculationOmitRemovedObjects: - NSOrderedCollectionDifferenceCalculationOptions = 2; + NSOrderedCollectionDifferenceCalculationOptions = (1 << 1); pub const NSOrderedCollectionDifferenceCalculationInferMoves: - NSOrderedCollectionDifferenceCalculationOptions = 4; + NSOrderedCollectionDifferenceCalculationOptions = (1 << 2); __inner_extern_class!( #[derive(Debug)] diff --git a/icrate/src/Foundation/generated/NSPathUtilities.rs b/icrate/src/Foundation/generated/NSPathUtilities.rs index f15938914..48406476f 100644 --- a/icrate/src/Foundation/generated/NSPathUtilities.rs +++ b/icrate/src/Foundation/generated/NSPathUtilities.rs @@ -122,4 +122,4 @@ pub const NSUserDomainMask: NSSearchPathDomainMask = 1; pub const NSLocalDomainMask: NSSearchPathDomainMask = 2; pub const NSNetworkDomainMask: NSSearchPathDomainMask = 4; pub const NSSystemDomainMask: NSSearchPathDomainMask = 8; -pub const NSAllDomainsMask: NSSearchPathDomainMask = 65535; +pub const NSAllDomainsMask: NSSearchPathDomainMask = 0x0ffff; diff --git a/icrate/src/Foundation/generated/NSPersonNameComponentsFormatter.rs b/icrate/src/Foundation/generated/NSPersonNameComponentsFormatter.rs index a49bc481e..52d75bd48 100644 --- a/icrate/src/Foundation/generated/NSPersonNameComponentsFormatter.rs +++ b/icrate/src/Foundation/generated/NSPersonNameComponentsFormatter.rs @@ -13,7 +13,8 @@ pub const NSPersonNameComponentsFormatterStyleLong: NSPersonNameComponentsFormat pub const NSPersonNameComponentsFormatterStyleAbbreviated: NSPersonNameComponentsFormatterStyle = 4; pub type NSPersonNameComponentsFormatterOptions = NSUInteger; -pub const NSPersonNameComponentsFormatterPhonetic: NSPersonNameComponentsFormatterOptions = 2; +pub const NSPersonNameComponentsFormatterPhonetic: NSPersonNameComponentsFormatterOptions = + (1 << 1); extern_class!( #[derive(Debug)] diff --git a/icrate/src/Foundation/generated/NSPointerFunctions.rs b/icrate/src/Foundation/generated/NSPointerFunctions.rs index 2a4fdcb97..0214711c1 100644 --- a/icrate/src/Foundation/generated/NSPointerFunctions.rs +++ b/icrate/src/Foundation/generated/NSPointerFunctions.rs @@ -6,19 +6,19 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, extern_methods, ClassType}; pub type NSPointerFunctionsOptions = NSUInteger; -pub const NSPointerFunctionsStrongMemory: NSPointerFunctionsOptions = 0; -pub const NSPointerFunctionsZeroingWeakMemory: NSPointerFunctionsOptions = 1; -pub const NSPointerFunctionsOpaqueMemory: NSPointerFunctionsOptions = 2; -pub const NSPointerFunctionsMallocMemory: NSPointerFunctionsOptions = 3; -pub const NSPointerFunctionsMachVirtualMemory: NSPointerFunctionsOptions = 4; -pub const NSPointerFunctionsWeakMemory: NSPointerFunctionsOptions = 5; -pub const NSPointerFunctionsObjectPersonality: NSPointerFunctionsOptions = 0; -pub const NSPointerFunctionsOpaquePersonality: NSPointerFunctionsOptions = 256; -pub const NSPointerFunctionsObjectPointerPersonality: NSPointerFunctionsOptions = 512; -pub const NSPointerFunctionsCStringPersonality: NSPointerFunctionsOptions = 768; -pub const NSPointerFunctionsStructPersonality: NSPointerFunctionsOptions = 1024; -pub const NSPointerFunctionsIntegerPersonality: NSPointerFunctionsOptions = 1280; -pub const NSPointerFunctionsCopyIn: NSPointerFunctionsOptions = 65536; +pub const NSPointerFunctionsStrongMemory: NSPointerFunctionsOptions = (0 << 0); +pub const NSPointerFunctionsZeroingWeakMemory: NSPointerFunctionsOptions = (1 << 0); +pub const NSPointerFunctionsOpaqueMemory: NSPointerFunctionsOptions = (2 << 0); +pub const NSPointerFunctionsMallocMemory: NSPointerFunctionsOptions = (3 << 0); +pub const NSPointerFunctionsMachVirtualMemory: NSPointerFunctionsOptions = (4 << 0); +pub const NSPointerFunctionsWeakMemory: NSPointerFunctionsOptions = (5 << 0); +pub const NSPointerFunctionsObjectPersonality: NSPointerFunctionsOptions = (0 << 8); +pub const NSPointerFunctionsOpaquePersonality: NSPointerFunctionsOptions = (1 << 8); +pub const NSPointerFunctionsObjectPointerPersonality: NSPointerFunctionsOptions = (2 << 8); +pub const NSPointerFunctionsCStringPersonality: NSPointerFunctionsOptions = (3 << 8); +pub const NSPointerFunctionsStructPersonality: NSPointerFunctionsOptions = (4 << 8); +pub const NSPointerFunctionsIntegerPersonality: NSPointerFunctionsOptions = (5 << 8); +pub const NSPointerFunctionsCopyIn: NSPointerFunctionsOptions = (1 << 16); extern_class!( #[derive(Debug)] diff --git a/icrate/src/Foundation/generated/NSPort.rs b/icrate/src/Foundation/generated/NSPort.rs index 5a2c1c93b..641979936 100644 --- a/icrate/src/Foundation/generated/NSPort.rs +++ b/icrate/src/Foundation/generated/NSPort.rs @@ -81,8 +81,8 @@ pub type NSPortDelegate = NSObject; pub type NSMachPortOptions = NSUInteger; pub const NSMachPortDeallocateNone: NSMachPortOptions = 0; -pub const NSMachPortDeallocateSendRight: NSMachPortOptions = 1; -pub const NSMachPortDeallocateReceiveRight: NSMachPortOptions = 2; +pub const NSMachPortDeallocateSendRight: NSMachPortOptions = (1 << 0); +pub const NSMachPortDeallocateReceiveRight: NSMachPortOptions = (1 << 1); extern_class!( #[derive(Debug)] diff --git a/icrate/src/Foundation/generated/NSProcessInfo.rs b/icrate/src/Foundation/generated/NSProcessInfo.rs index 173c1c058..8658ad868 100644 --- a/icrate/src/Foundation/generated/NSProcessInfo.rs +++ b/icrate/src/Foundation/generated/NSProcessInfo.rs @@ -102,14 +102,16 @@ extern_methods!( ); pub type NSActivityOptions = u64; -pub const NSActivityIdleDisplaySleepDisabled: NSActivityOptions = 1099511627776; -pub const NSActivityIdleSystemSleepDisabled: NSActivityOptions = 1048576; -pub const NSActivitySuddenTerminationDisabled: NSActivityOptions = 16384; -pub const NSActivityAutomaticTerminationDisabled: NSActivityOptions = 32768; -pub const NSActivityUserInitiated: NSActivityOptions = 16777215; -pub const NSActivityUserInitiatedAllowingIdleSystemSleep: NSActivityOptions = 15728639; -pub const NSActivityBackground: NSActivityOptions = 255; -pub const NSActivityLatencyCritical: NSActivityOptions = 1095216660480; +pub const NSActivityIdleDisplaySleepDisabled: NSActivityOptions = (1 << 40); +pub const NSActivityIdleSystemSleepDisabled: NSActivityOptions = (1 << 20); +pub const NSActivitySuddenTerminationDisabled: NSActivityOptions = (1 << 14); +pub const NSActivityAutomaticTerminationDisabled: NSActivityOptions = (1 << 15); +pub const NSActivityUserInitiated: NSActivityOptions = + (0x00FFFFFF | NSActivityIdleSystemSleepDisabled); +pub const NSActivityUserInitiatedAllowingIdleSystemSleep: NSActivityOptions = + (NSActivityUserInitiated & !NSActivityIdleSystemSleepDisabled); +pub const NSActivityBackground: NSActivityOptions = 0x000000FF; +pub const NSActivityLatencyCritical: NSActivityOptions = 0xFF00000000; extern_methods!( /// NSProcessInfoActivity diff --git a/icrate/src/Foundation/generated/NSPropertyList.rs b/icrate/src/Foundation/generated/NSPropertyList.rs index ac4afe68d..f59278e78 100644 --- a/icrate/src/Foundation/generated/NSPropertyList.rs +++ b/icrate/src/Foundation/generated/NSPropertyList.rs @@ -6,14 +6,16 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, extern_methods, ClassType}; pub type NSPropertyListMutabilityOptions = NSUInteger; -pub const NSPropertyListImmutable: NSPropertyListMutabilityOptions = 0; -pub const NSPropertyListMutableContainers: NSPropertyListMutabilityOptions = 1; -pub const NSPropertyListMutableContainersAndLeaves: NSPropertyListMutabilityOptions = 2; +pub const NSPropertyListImmutable: NSPropertyListMutabilityOptions = kCFPropertyListImmutable; +pub const NSPropertyListMutableContainers: NSPropertyListMutabilityOptions = + kCFPropertyListMutableContainers; +pub const NSPropertyListMutableContainersAndLeaves: NSPropertyListMutabilityOptions = + kCFPropertyListMutableContainersAndLeaves; pub type NSPropertyListFormat = NSUInteger; -pub const NSPropertyListOpenStepFormat: NSPropertyListFormat = 1; -pub const NSPropertyListXMLFormat_v1_0: NSPropertyListFormat = 100; -pub const NSPropertyListBinaryFormat_v1_0: NSPropertyListFormat = 200; +pub const NSPropertyListOpenStepFormat: NSPropertyListFormat = kCFPropertyListOpenStepFormat; +pub const NSPropertyListXMLFormat_v1_0: NSPropertyListFormat = kCFPropertyListXMLFormat_v1_0; +pub const NSPropertyListBinaryFormat_v1_0: NSPropertyListFormat = kCFPropertyListBinaryFormat_v1_0; pub type NSPropertyListReadOptions = NSPropertyListMutabilityOptions; diff --git a/icrate/src/Foundation/generated/NSRegularExpression.rs b/icrate/src/Foundation/generated/NSRegularExpression.rs index 58f4a62dd..9e30cc192 100644 --- a/icrate/src/Foundation/generated/NSRegularExpression.rs +++ b/icrate/src/Foundation/generated/NSRegularExpression.rs @@ -6,13 +6,13 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, extern_methods, ClassType}; pub type NSRegularExpressionOptions = NSUInteger; -pub const NSRegularExpressionCaseInsensitive: NSRegularExpressionOptions = 1; -pub const NSRegularExpressionAllowCommentsAndWhitespace: NSRegularExpressionOptions = 2; -pub const NSRegularExpressionIgnoreMetacharacters: NSRegularExpressionOptions = 4; -pub const NSRegularExpressionDotMatchesLineSeparators: NSRegularExpressionOptions = 8; -pub const NSRegularExpressionAnchorsMatchLines: NSRegularExpressionOptions = 16; -pub const NSRegularExpressionUseUnixLineSeparators: NSRegularExpressionOptions = 32; -pub const NSRegularExpressionUseUnicodeWordBoundaries: NSRegularExpressionOptions = 64; +pub const NSRegularExpressionCaseInsensitive: NSRegularExpressionOptions = 1 << 0; +pub const NSRegularExpressionAllowCommentsAndWhitespace: NSRegularExpressionOptions = 1 << 1; +pub const NSRegularExpressionIgnoreMetacharacters: NSRegularExpressionOptions = 1 << 2; +pub const NSRegularExpressionDotMatchesLineSeparators: NSRegularExpressionOptions = 1 << 3; +pub const NSRegularExpressionAnchorsMatchLines: NSRegularExpressionOptions = 1 << 4; +pub const NSRegularExpressionUseUnixLineSeparators: NSRegularExpressionOptions = 1 << 5; +pub const NSRegularExpressionUseUnicodeWordBoundaries: NSRegularExpressionOptions = 1 << 6; extern_class!( #[derive(Debug)] @@ -53,18 +53,18 @@ extern_methods!( ); pub type NSMatchingOptions = NSUInteger; -pub const NSMatchingReportProgress: NSMatchingOptions = 1; -pub const NSMatchingReportCompletion: NSMatchingOptions = 2; -pub const NSMatchingAnchored: NSMatchingOptions = 4; -pub const NSMatchingWithTransparentBounds: NSMatchingOptions = 8; -pub const NSMatchingWithoutAnchoringBounds: NSMatchingOptions = 16; +pub const NSMatchingReportProgress: NSMatchingOptions = 1 << 0; +pub const NSMatchingReportCompletion: NSMatchingOptions = 1 << 1; +pub const NSMatchingAnchored: NSMatchingOptions = 1 << 2; +pub const NSMatchingWithTransparentBounds: NSMatchingOptions = 1 << 3; +pub const NSMatchingWithoutAnchoringBounds: NSMatchingOptions = 1 << 4; pub type NSMatchingFlags = NSUInteger; -pub const NSMatchingProgress: NSMatchingFlags = 1; -pub const NSMatchingCompleted: NSMatchingFlags = 2; -pub const NSMatchingHitEnd: NSMatchingFlags = 4; -pub const NSMatchingRequiredEnd: NSMatchingFlags = 8; -pub const NSMatchingInternalError: NSMatchingFlags = 16; +pub const NSMatchingProgress: NSMatchingFlags = 1 << 0; +pub const NSMatchingCompleted: NSMatchingFlags = 1 << 1; +pub const NSMatchingHitEnd: NSMatchingFlags = 1 << 2; +pub const NSMatchingRequiredEnd: NSMatchingFlags = 1 << 3; +pub const NSMatchingInternalError: NSMatchingFlags = 1 << 4; extern_methods!( /// NSMatching diff --git a/icrate/src/Foundation/generated/NSStream.rs b/icrate/src/Foundation/generated/NSStream.rs index fae9319e7..05c2ae080 100644 --- a/icrate/src/Foundation/generated/NSStream.rs +++ b/icrate/src/Foundation/generated/NSStream.rs @@ -19,11 +19,11 @@ pub const NSStreamStatusError: NSStreamStatus = 7; pub type NSStreamEvent = NSUInteger; pub const NSStreamEventNone: NSStreamEvent = 0; -pub const NSStreamEventOpenCompleted: NSStreamEvent = 1; -pub const NSStreamEventHasBytesAvailable: NSStreamEvent = 2; -pub const NSStreamEventHasSpaceAvailable: NSStreamEvent = 4; -pub const NSStreamEventErrorOccurred: NSStreamEvent = 8; -pub const NSStreamEventEndEncountered: NSStreamEvent = 16; +pub const NSStreamEventOpenCompleted: NSStreamEvent = 1 << 0; +pub const NSStreamEventHasBytesAvailable: NSStreamEvent = 1 << 1; +pub const NSStreamEventHasSpaceAvailable: NSStreamEvent = 1 << 2; +pub const NSStreamEventErrorOccurred: NSStreamEvent = 1 << 3; +pub const NSStreamEventEndEncountered: NSStreamEvent = 1 << 4; extern_class!( #[derive(Debug)] diff --git a/icrate/src/Foundation/generated/NSString.rs b/icrate/src/Foundation/generated/NSString.rs index d8b9ee7fd..e6f07454b 100644 --- a/icrate/src/Foundation/generated/NSString.rs +++ b/icrate/src/Foundation/generated/NSString.rs @@ -35,12 +35,12 @@ pub const NSWindowsCP1254StringEncoding: i32 = 14; pub const NSWindowsCP1250StringEncoding: i32 = 15; pub const NSISO2022JPStringEncoding: i32 = 21; pub const NSMacOSRomanStringEncoding: i32 = 30; -pub const NSUTF16StringEncoding: i32 = 10; -pub const NSUTF16BigEndianStringEncoding: i32 = 2415919360; -pub const NSUTF16LittleEndianStringEncoding: i32 = 2483028224; -pub const NSUTF32StringEncoding: i32 = 2348810496; -pub const NSUTF32BigEndianStringEncoding: i32 = 2550137088; -pub const NSUTF32LittleEndianStringEncoding: i32 = 2617245952; +pub const NSUTF16StringEncoding: i32 = NSUnicodeStringEncoding; +pub const NSUTF16BigEndianStringEncoding: i32 = 0x90000100; +pub const NSUTF16LittleEndianStringEncoding: i32 = 0x94000100; +pub const NSUTF32StringEncoding: i32 = 0x8c000100; +pub const NSUTF32BigEndianStringEncoding: i32 = 0x98000100; +pub const NSUTF32LittleEndianStringEncoding: i32 = 0x9c000100; pub type NSStringEncodingConversionOptions = NSUInteger; pub const NSStringEncodingConversionAllowLossy: NSStringEncodingConversionOptions = 1; @@ -79,9 +79,9 @@ pub const NSStringEnumerationByWords: NSStringEnumerationOptions = 3; pub const NSStringEnumerationBySentences: NSStringEnumerationOptions = 4; pub const NSStringEnumerationByCaretPositions: NSStringEnumerationOptions = 5; pub const NSStringEnumerationByDeletionClusters: NSStringEnumerationOptions = 6; -pub const NSStringEnumerationReverse: NSStringEnumerationOptions = 256; -pub const NSStringEnumerationSubstringNotRequired: NSStringEnumerationOptions = 512; -pub const NSStringEnumerationLocalized: NSStringEnumerationOptions = 1024; +pub const NSStringEnumerationReverse: NSStringEnumerationOptions = 1 << 8; +pub const NSStringEnumerationSubstringNotRequired: NSStringEnumerationOptions = 1 << 9; +pub const NSStringEnumerationLocalized: NSStringEnumerationOptions = 1 << 10; pub type NSStringTransform = NSString; diff --git a/icrate/src/Foundation/generated/NSTextCheckingResult.rs b/icrate/src/Foundation/generated/NSTextCheckingResult.rs index 11bbdde83..5ff7fda1e 100644 --- a/icrate/src/Foundation/generated/NSTextCheckingResult.rs +++ b/icrate/src/Foundation/generated/NSTextCheckingResult.rs @@ -6,25 +6,26 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, extern_methods, ClassType}; pub type NSTextCheckingType = u64; -pub const NSTextCheckingTypeOrthography: NSTextCheckingType = 1; -pub const NSTextCheckingTypeSpelling: NSTextCheckingType = 2; -pub const NSTextCheckingTypeGrammar: NSTextCheckingType = 4; -pub const NSTextCheckingTypeDate: NSTextCheckingType = 8; -pub const NSTextCheckingTypeAddress: NSTextCheckingType = 16; -pub const NSTextCheckingTypeLink: NSTextCheckingType = 32; -pub const NSTextCheckingTypeQuote: NSTextCheckingType = 64; -pub const NSTextCheckingTypeDash: NSTextCheckingType = 128; -pub const NSTextCheckingTypeReplacement: NSTextCheckingType = 256; -pub const NSTextCheckingTypeCorrection: NSTextCheckingType = 512; -pub const NSTextCheckingTypeRegularExpression: NSTextCheckingType = 1024; -pub const NSTextCheckingTypePhoneNumber: NSTextCheckingType = 2048; -pub const NSTextCheckingTypeTransitInformation: NSTextCheckingType = 4096; +pub const NSTextCheckingTypeOrthography: NSTextCheckingType = 1 << 0; +pub const NSTextCheckingTypeSpelling: NSTextCheckingType = 1 << 1; +pub const NSTextCheckingTypeGrammar: NSTextCheckingType = 1 << 2; +pub const NSTextCheckingTypeDate: NSTextCheckingType = 1 << 3; +pub const NSTextCheckingTypeAddress: NSTextCheckingType = 1 << 4; +pub const NSTextCheckingTypeLink: NSTextCheckingType = 1 << 5; +pub const NSTextCheckingTypeQuote: NSTextCheckingType = 1 << 6; +pub const NSTextCheckingTypeDash: NSTextCheckingType = 1 << 7; +pub const NSTextCheckingTypeReplacement: NSTextCheckingType = 1 << 8; +pub const NSTextCheckingTypeCorrection: NSTextCheckingType = 1 << 9; +pub const NSTextCheckingTypeRegularExpression: NSTextCheckingType = 1 << 10; +pub const NSTextCheckingTypePhoneNumber: NSTextCheckingType = 1 << 11; +pub const NSTextCheckingTypeTransitInformation: NSTextCheckingType = 1 << 12; pub type NSTextCheckingTypes = u64; -pub const NSTextCheckingAllSystemTypes: i32 = 4294967295; -pub const NSTextCheckingAllCustomTypes: i32 = -4294967296; -pub const NSTextCheckingAllTypes: i32 = -1; +pub const NSTextCheckingAllSystemTypes: i32 = 0xffffffff; +pub const NSTextCheckingAllCustomTypes: i32 = 0xffffffff << 32; +pub const NSTextCheckingAllTypes: i32 = + (NSTextCheckingAllSystemTypes | NSTextCheckingAllCustomTypes); pub type NSTextCheckingKey = NSString; diff --git a/icrate/src/Foundation/generated/NSURL.rs b/icrate/src/Foundation/generated/NSURL.rs index d081812d9..cc4649c80 100644 --- a/icrate/src/Foundation/generated/NSURL.rs +++ b/icrate/src/Foundation/generated/NSURL.rs @@ -20,21 +20,21 @@ pub type NSURLUbiquitousSharedItemRole = NSString; pub type NSURLUbiquitousSharedItemPermissions = NSString; pub type NSURLBookmarkCreationOptions = NSUInteger; -pub const NSURLBookmarkCreationPreferFileIDResolution: NSURLBookmarkCreationOptions = 256; -pub const NSURLBookmarkCreationMinimalBookmark: NSURLBookmarkCreationOptions = 512; -pub const NSURLBookmarkCreationSuitableForBookmarkFile: NSURLBookmarkCreationOptions = 1024; -pub const NSURLBookmarkCreationWithSecurityScope: NSURLBookmarkCreationOptions = 2048; +pub const NSURLBookmarkCreationPreferFileIDResolution: NSURLBookmarkCreationOptions = (1 << 8); +pub const NSURLBookmarkCreationMinimalBookmark: NSURLBookmarkCreationOptions = (1 << 9); +pub const NSURLBookmarkCreationSuitableForBookmarkFile: NSURLBookmarkCreationOptions = (1 << 10); +pub const NSURLBookmarkCreationWithSecurityScope: NSURLBookmarkCreationOptions = (1 << 11); pub const NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess: NSURLBookmarkCreationOptions = - 4096; + (1 << 12); pub const NSURLBookmarkCreationWithoutImplicitSecurityScope: NSURLBookmarkCreationOptions = - 536870912; + (1 << 29); pub type NSURLBookmarkResolutionOptions = NSUInteger; -pub const NSURLBookmarkResolutionWithoutUI: NSURLBookmarkResolutionOptions = 256; -pub const NSURLBookmarkResolutionWithoutMounting: NSURLBookmarkResolutionOptions = 512; -pub const NSURLBookmarkResolutionWithSecurityScope: NSURLBookmarkResolutionOptions = 1024; +pub const NSURLBookmarkResolutionWithoutUI: NSURLBookmarkResolutionOptions = (1 << 8); +pub const NSURLBookmarkResolutionWithoutMounting: NSURLBookmarkResolutionOptions = (1 << 9); +pub const NSURLBookmarkResolutionWithSecurityScope: NSURLBookmarkResolutionOptions = (1 << 10); pub const NSURLBookmarkResolutionWithoutImplicitStartAccessing: NSURLBookmarkResolutionOptions = - 32768; + (1 << 15); pub type NSURLBookmarkFileCreationOptions = NSUInteger; diff --git a/icrate/src/Foundation/generated/NSURLRequest.rs b/icrate/src/Foundation/generated/NSURLRequest.rs index 418f26502..59a3ed356 100644 --- a/icrate/src/Foundation/generated/NSURLRequest.rs +++ b/icrate/src/Foundation/generated/NSURLRequest.rs @@ -9,7 +9,8 @@ pub type NSURLRequestCachePolicy = NSUInteger; pub const NSURLRequestUseProtocolCachePolicy: NSURLRequestCachePolicy = 0; pub const NSURLRequestReloadIgnoringLocalCacheData: NSURLRequestCachePolicy = 1; pub const NSURLRequestReloadIgnoringLocalAndRemoteCacheData: NSURLRequestCachePolicy = 4; -pub const NSURLRequestReloadIgnoringCacheData: NSURLRequestCachePolicy = 1; +pub const NSURLRequestReloadIgnoringCacheData: NSURLRequestCachePolicy = + NSURLRequestReloadIgnoringLocalCacheData; pub const NSURLRequestReturnCacheDataElseLoad: NSURLRequestCachePolicy = 2; pub const NSURLRequestReturnCacheDataDontLoad: NSURLRequestCachePolicy = 3; pub const NSURLRequestReloadRevalidatingCacheData: NSURLRequestCachePolicy = 5; diff --git a/icrate/src/Foundation/generated/NSXMLNodeOptions.rs b/icrate/src/Foundation/generated/NSXMLNodeOptions.rs index e816324c9..d27e91bdf 100644 --- a/icrate/src/Foundation/generated/NSXMLNodeOptions.rs +++ b/icrate/src/Foundation/generated/NSXMLNodeOptions.rs @@ -7,30 +7,42 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSXMLNodeOptions = NSUInteger; pub const NSXMLNodeOptionsNone: NSXMLNodeOptions = 0; -pub const NSXMLNodeIsCDATA: NSXMLNodeOptions = 1; -pub const NSXMLNodeExpandEmptyElement: NSXMLNodeOptions = 2; -pub const NSXMLNodeCompactEmptyElement: NSXMLNodeOptions = 4; -pub const NSXMLNodeUseSingleQuotes: NSXMLNodeOptions = 8; -pub const NSXMLNodeUseDoubleQuotes: NSXMLNodeOptions = 16; -pub const NSXMLNodeNeverEscapeContents: NSXMLNodeOptions = 32; -pub const NSXMLDocumentTidyHTML: NSXMLNodeOptions = 512; -pub const NSXMLDocumentTidyXML: NSXMLNodeOptions = 1024; -pub const NSXMLDocumentValidate: NSXMLNodeOptions = 8192; -pub const NSXMLNodeLoadExternalEntitiesAlways: NSXMLNodeOptions = 16384; -pub const NSXMLNodeLoadExternalEntitiesSameOriginOnly: NSXMLNodeOptions = 32768; -pub const NSXMLNodeLoadExternalEntitiesNever: NSXMLNodeOptions = 524288; -pub const NSXMLDocumentXInclude: NSXMLNodeOptions = 65536; -pub const NSXMLNodePrettyPrint: NSXMLNodeOptions = 131072; -pub const NSXMLDocumentIncludeContentTypeDeclaration: NSXMLNodeOptions = 262144; -pub const NSXMLNodePreserveNamespaceOrder: NSXMLNodeOptions = 1048576; -pub const NSXMLNodePreserveAttributeOrder: NSXMLNodeOptions = 2097152; -pub const NSXMLNodePreserveEntities: NSXMLNodeOptions = 4194304; -pub const NSXMLNodePreservePrefixes: NSXMLNodeOptions = 8388608; -pub const NSXMLNodePreserveCDATA: NSXMLNodeOptions = 16777216; -pub const NSXMLNodePreserveWhitespace: NSXMLNodeOptions = 33554432; -pub const NSXMLNodePreserveDTD: NSXMLNodeOptions = 67108864; -pub const NSXMLNodePreserveCharacterReferences: NSXMLNodeOptions = 134217728; -pub const NSXMLNodePromoteSignificantWhitespace: NSXMLNodeOptions = 268435456; -pub const NSXMLNodePreserveEmptyElements: NSXMLNodeOptions = 6; -pub const NSXMLNodePreserveQuotes: NSXMLNodeOptions = 24; -pub const NSXMLNodePreserveAll: NSXMLNodeOptions = 4293918750; +pub const NSXMLNodeIsCDATA: NSXMLNodeOptions = 1 << 0; +pub const NSXMLNodeExpandEmptyElement: NSXMLNodeOptions = 1 << 1; +pub const NSXMLNodeCompactEmptyElement: NSXMLNodeOptions = 1 << 2; +pub const NSXMLNodeUseSingleQuotes: NSXMLNodeOptions = 1 << 3; +pub const NSXMLNodeUseDoubleQuotes: NSXMLNodeOptions = 1 << 4; +pub const NSXMLNodeNeverEscapeContents: NSXMLNodeOptions = 1 << 5; +pub const NSXMLDocumentTidyHTML: NSXMLNodeOptions = 1 << 9; +pub const NSXMLDocumentTidyXML: NSXMLNodeOptions = 1 << 10; +pub const NSXMLDocumentValidate: NSXMLNodeOptions = 1 << 13; +pub const NSXMLNodeLoadExternalEntitiesAlways: NSXMLNodeOptions = 1 << 14; +pub const NSXMLNodeLoadExternalEntitiesSameOriginOnly: NSXMLNodeOptions = 1 << 15; +pub const NSXMLNodeLoadExternalEntitiesNever: NSXMLNodeOptions = 1 << 19; +pub const NSXMLDocumentXInclude: NSXMLNodeOptions = 1 << 16; +pub const NSXMLNodePrettyPrint: NSXMLNodeOptions = 1 << 17; +pub const NSXMLDocumentIncludeContentTypeDeclaration: NSXMLNodeOptions = 1 << 18; +pub const NSXMLNodePreserveNamespaceOrder: NSXMLNodeOptions = 1 << 20; +pub const NSXMLNodePreserveAttributeOrder: NSXMLNodeOptions = 1 << 21; +pub const NSXMLNodePreserveEntities: NSXMLNodeOptions = 1 << 22; +pub const NSXMLNodePreservePrefixes: NSXMLNodeOptions = 1 << 23; +pub const NSXMLNodePreserveCDATA: NSXMLNodeOptions = 1 << 24; +pub const NSXMLNodePreserveWhitespace: NSXMLNodeOptions = 1 << 25; +pub const NSXMLNodePreserveDTD: NSXMLNodeOptions = 1 << 26; +pub const NSXMLNodePreserveCharacterReferences: NSXMLNodeOptions = 1 << 27; +pub const NSXMLNodePromoteSignificantWhitespace: NSXMLNodeOptions = 1 << 28; +pub const NSXMLNodePreserveEmptyElements: NSXMLNodeOptions = + (NSXMLNodeExpandEmptyElement | NSXMLNodeCompactEmptyElement); +pub const NSXMLNodePreserveQuotes: NSXMLNodeOptions = + (NSXMLNodeUseSingleQuotes | NSXMLNodeUseDoubleQuotes); +pub const NSXMLNodePreserveAll: NSXMLNodeOptions = (NSXMLNodePreserveNamespaceOrder + | NSXMLNodePreserveAttributeOrder + | NSXMLNodePreserveEntities + | NSXMLNodePreservePrefixes + | NSXMLNodePreserveCDATA + | NSXMLNodePreserveEmptyElements + | NSXMLNodePreserveQuotes + | NSXMLNodePreserveWhitespace + | NSXMLNodePreserveDTD + | NSXMLNodePreserveCharacterReferences + | 0xFFF00000); diff --git a/icrate/src/Foundation/generated/NSXPCConnection.rs b/icrate/src/Foundation/generated/NSXPCConnection.rs index dac15bc87..8abc51ae4 100644 --- a/icrate/src/Foundation/generated/NSXPCConnection.rs +++ b/icrate/src/Foundation/generated/NSXPCConnection.rs @@ -8,7 +8,7 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSXPCProxyCreating = NSObject; pub type NSXPCConnectionOptions = NSUInteger; -pub const NSXPCConnectionPrivileged: NSXPCConnectionOptions = 4096; +pub const NSXPCConnectionPrivileged: NSXPCConnectionOptions = (1 << 12); extern_class!( #[derive(Debug)] diff --git a/icrate/src/Foundation/generated/NSZone.rs b/icrate/src/Foundation/generated/NSZone.rs index 4ef5d73fc..1945db01b 100644 --- a/icrate/src/Foundation/generated/NSZone.rs +++ b/icrate/src/Foundation/generated/NSZone.rs @@ -5,5 +5,5 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; -pub const NSScannedOption: i32 = 1; -pub const NSCollectorDisabledOption: i32 = 2; +pub const NSScannedOption: i32 = (1 << 0); +pub const NSCollectorDisabledOption: i32 = (1 << 1);